»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! Set by moritz on 22 December 2015. |
|||
00:08
skids joined
|
|||
RabidGravy | eek | 00:09 | |
nighty night good people | |||
00:14
vendethiel left
00:16
RabidGravy left
00:17
patrickz left,
espadrine left,
espadrine_ joined,
espadrine_ is now known as espadrine
00:19
vendethiel joined
00:23
llfourn joined
00:24
lucasb left
00:27
llfourn left
00:37
pjscott joined,
pjscott left
00:40
spider-mario left
00:43
pjscott joined
00:47
ugexe left,
bitmap left
00:49
pjscott left
00:51
bitmap joined
00:53
ugexe joined
|
|||
Rotwang | could someone tell me what's going on? : | 00:58 | |
m: my %c = (a => 1); say 'a' ~~ %c; | |||
camelia | rakudo-moar b8a75b: OUTPUT«True» | ||
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
|
|||
ugexe | m: say $*CWD ~~ :e | 01:05 | |
camelia | rakudo-moar b8a75b: OUTPUT«True» | ||
01:05
kid51 joined
|
|||
ugexe | m: say $*CWD.e; say %(:e(1)) | 01:06 | |
camelia | rakudo-moar b8a75b: OUTPUT«Truee => 1» | ||
Rotwang | : my %c = (a => 1); my %f = (b => [%c,]); 'a' ~~ %f<b>[0]; | 01:08 | |
m: my %c = (a => 1); my %f = (b => [%c,]); 'a' ~~ %f<b>[0]; | |||
camelia | ( no output ) | ||
Rotwang | m: my %c = (a => 1); my %f = (b => [%c,]); say 'a' ~~ %f<b>[0]; | ||
camelia | rakudo-moar b8a75b: OUTPUT«True» | ||
Rotwang | so if I put hash directly into array it gets "flattened" to the container? or it least it seems like it | 01:09 | |
01:10
lnrdo joined
|
|||
Mouq | m: my %c = (a => 1); my %f = (b => [%c,]); dd %f | 01:10 | |
camelia | rakudo-moar b8a75b: OUTPUT«Hash %f = {:b($[{:a(1)},])}» | ||
Mouq | m: my %c = (a => 1); my %f = (b => [%c]); dd %f | ||
camelia | rakudo-moar b8a75b: OUTPUT«Hash %f = {:b($[:a(1)])}» | ||
Mouq | m: my %c = (a => 1); my %f = (b => [$%c]); dd %f | ||
camelia | rakudo-moar b8a75b: OUTPUT«Hash %f = {:b($[{:a(1)},])}» | ||
skids | Rotwang: single argument rule docs.perl6.org/language/functions#S...onventions | 01:14 | |
01:15
lnrdo left
|
|||
Rotwang | x__X | 01:15 | |
perl6 is the best thing that happened to mankind since sliced bread | |||
(with a few notable exceptions of course) | |||
however I doubt it will go MAINstream, mostly because of it's "quirkiness" | 01:16 | ||
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:18 | |
01:18
espadrine left
|
|||
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:19 | |
(Not that ADA gained market share, but thats because it is no fun. :-) | 01:20 | ||
01:21
user74747 left
|
|||
BenGoldberg | m: my %c = (a => 1); my %f = (b => [|%c]); dd %f | 01:23 | |
camelia | rakudo-moar b8a75b: OUTPUT«Hash %f = {:b($[:a(1)])}» | ||
BenGoldberg | m: my %c = (a => 1); my %f = (b => |%c); dd %f | ||
camelia | rakudo-moar b8a75b: OUTPUT«Hash %f = {:b(slip$(:a(1),))}» | ||
BenGoldberg | m: my %c = (a => 1); my %f = (b => %c).flat; dd %f | ||
camelia | rakudo-moar b8a75b: OUTPUT«Hash %f = {:b(${:a(1)})}» | ||
BenGoldberg | m: my %c = (a => 1); my %f = (b => %c.flat); dd %f | ||
01:23
troydm joined
|
|||
camelia | rakudo-moar b8a75b: OUTPUT«Hash %f = {:b((:a(1),).Seq)}» | 01:23 | |
01:24
llfourn joined
|
|||
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
|
|||
BenGoldberg | m: my %f = (:b(:a(1)); dd %f | 01:24 | |
camelia | rakudo-moar b8a75b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/InJolmRaEsCannot use variable %f in declaration to initialize itselfat /tmp/InJolmRaEs:1------> 3my %f = (:b(:a(1)); dd %7⏏5f expecting any of: argument list term» | ||
BenGoldberg | m: my %f = (:b(:a(1))); dd %f; | 01:25 | |
camelia | rakudo-moar b8a75b: OUTPUT«Hash %f = {:b(:a(1))}» | ||
BenGoldberg | m: my %f = (:b(:a(1))); dd %f{b}; | ||
camelia | rakudo-moar b8a75b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/AIJ10dJ8icUndeclared routine: b used at line 1» | ||
BenGoldberg | m: my %f = (:b(:a(1))); dd %f<b>; | ||
camelia | rakudo-moar b8a75b: OUTPUT«Pair %f = :a(1)» | ||
01:27
joydon left
01:28
llfourn left,
pjscott joined
01:29
wamba joined
01:31
pjscott left
01:35
mopp joined
01:39
mopp left
01:41
mopp joined
|
|||
mopp | Perl 6. | 01:42 | |
hahainternet | indeed | ||
is $foo[*-1] really acceptable syntax? | 01:43 | ||
it seems rather odd | |||
$foo[$foo.end] works but also a little ugly | |||
wonder if it topicalises | |||
m: my $foo = (2,4,8); say $foo[.end] | 01:44 | ||
camelia | rakudo-moar b8a75b: OUTPUT«2» | ||
hahainternet | this is not what i expected! | ||
Mouq | m: my $foo = (2,4,8); say $foo[*.end] | ||
camelia | rakudo-moar b8a75b: OUTPUT«2» | ||
hahainternet | Mouq: yeah i found that works, same as *-1 | ||
but that .end works is bizarre | |||
Mouq | m: my $foo = (2,4,8); say $foo | ||
camelia | rakudo-moar b8a75b: OUTPUT«(2 4 8)» | ||
hahainternet | it's because the empty string or similar has a .end method also | 01:45 | |
oh i just noticed yours doesn't work lol | |||
Mouq | Oh, oh. Right. *.end is being executed with an argument of the number 3 | ||
hahainternet | it's a bit odd really | 01:46 | |
i like the ability to easily index from the end, but *-1 will have to do | |||
Mouq | m: my $foo = (2,4,8); say $foo[{$_ - 1}] # :P | 01:47 | |
camelia | rakudo-moar b8a75b: OUTPUT«8» | ||
hahainternet | indeed! | ||
skids | RT 127024 and RT 127129 can be merged if someone who can do that action is around | 01:49 | |
Mouq | skids: sure, I should be able to :) | 01:50 | |
skids | Mouq++ | 01:52 | |
01:59
mopp left
|
|||
Mouq | Does anyone happen to know what DESCEND used to do in ~2010 Rakudo? I imagine it's something like "nextsame" | 02:01 | |
02:04
yurivish_ left
|
|||
sprocket | if i have a variable that i’m using in a react { whenver { … }; whenever { … } } situation, is it threadsafe by default? | 02:04 | |
02:08
pjscott joined
02:11
TimToady left
02:13
TimToady joined
02:15
wamba left
02:18
llfourn joined
02:20
pjscott left
02:21
pjscott joined
02:23
llfourn left
02:27
zwu joined
|
|||
zwu | how to delete a variable in a scope? | 02:27 | |
leont | What do you mean? | 02:29 | |
zwu | like del in python to delete attribute of object: del foo.bar | 02:31 | |
tadzik | why would you ever want to do that | 02:32 | |
02:32
MadcapJake left
|
|||
tadzik | this is basically breaking the interface of your object | 02:32 | |
making your code unreliable and unpredictable in the general case | 02:33 | ||
skids | As far as variables in a scope, I do not believe there is a way to undeclare them. | 02:35 | |
02:35
MadcapJake joined
|
|||
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 | |
02:37
pjscott left
|
|||
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:37 | |
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:38 | |
Since variables are checked at compile time | 02:39 | ||
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:40
cdg left
02:41
cdg joined
02:45
cdg left
02:47
bitmap left,
ugexex joined,
molaf__ joined
02:49
ugexe left,
pjscott joined
|
|||
mort96 | hey | 02:51 | |
02:51
molaf_ left
|
|||
skids | o/ | 02:51 | |
mort96 | so, I've installed a module with panda. How do I include it with a script? | 02:52 | |
pjscott | use Foo; | ||
mort96 | ah awesome, thanks | ||
02:55
vendethiel left
02:58
cdg joined
02:59
yqt left,
cdg left
03:00
xyf joined
|
|||
dalek | kudo-star-daily: ce6a800 | coke++ | log/ (8 files): today (automated commit) |
03:02 | |
03:02
sno left
|
|||
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:06 | |
Unknown string encoding: 'gb2312' | 03:07 | ||
in block <unit> at -e line 1 | |||
03:07
llfourn joined
03:08
noganex joined
03:11
noganex_ left
|
|||
ugexex | utf8, utf16, utf32, ascii, iso-8859-1, and windows-1252 are the available encodings | 03:13 | |
xyf faint..... | 03:14 | ||
means gbk, gb18030 etc is not available in perl6 yet? | |||
skids | Not yet. | 03:15 | |
leont | Patches welcome! ;-) | 03:18 | |
xyf | ;) | 03:19 | |
03:20
cygx joined
|
|||
cygx | note that utf32 isn't implemented as well | 03:20 | |
m: "hallo".encode("utf32") | |||
camelia | rakudo-moar b8a75b: OUTPUT«Unknown string encoding: 'utf32' in block <unit> at /tmp/UdD7lvtYHX line 1» | ||
leont | No one uses that for interexchange anyway | ||
03:21
xxpor_lap joined
|
|||
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. | ||
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? | ||
mort96 | also on subsequent runs | ||
`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 ;) | ||
mort96 | in node.js, a=require("http"); console.log("hello world"); takes 0.06 seconds by comparison | ||
leont | Start-up performance isn't well optimized yet | 03:24 | |
cygx | mort96: what's your rakudo version? | ||
leont | (well, performance in general isn't our strong side at the moment, people are working on it) | ||
mort96 | "This is perl6 version 2015.11 built on MoarVM version 2015.11" | ||
from perl6 --version | |||
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? | ||
aside from adding a version to the NativeCall bindings | |||
Hotkeys | should get 2015.12 aka 6.c | ||
leont | Upgrading might help, yes | ||
mort96 | alright, will do that | 03:25 | |
sprocket | which i didn’t see in the documentation | ||
mort96 | it's not a dealbreaker in any case | ||
03:26
AlexDaniel joined
|
|||
ugexex | those encoding have various descriptors that can be used | 03:26 | |
AlexDaniel | m: my $foo = (2,4,8); say $foo[{.pred}] | ||
camelia | rakudo-moar b8a75b: OUTPUT«8» | ||
AlexDaniel | m: my $foo = (2,4,8); say $foo[*.pred] | ||
camelia | rakudo-moar b8a75b: OUTPUT«8» | ||
AlexDaniel | hahainternet: ↑ | ||
skids | sprocket: That is new and a bit annoying. To squash it I used e.g. is native('crypto', v0 but False) | ||
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 :) | ||
sprocket | skids: is there any way of saying “version 1 or greater?” | ||
or something to that effect? | |||
skids | sprocket: not that I could tell. | ||
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. | ||
sprocket | ok | ||
AlexDaniel | 1.0.0..* ? | ||
AlexDaniel feels like he has seen that somewhere | 03:29 | ||
03:30
psy_ left,
orbus joined
|
|||
skids | AlexDaniel: When I looked at the code it compared the major version number to the filename or something. | 03:31 | |
03:32
psy_ joined
|
|||
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. | ||
cygx agrees with skids | 03:34 | ||
the code expects a path, or a name + fixed version number | |||
ugexex | what makes locks non-composable (or bad form)? jnthn would mention that but i never found out why | 03:35 | |
03:36
nzkindest left,
yurivis__ joined
|
|||
skids | Two locks opened in opposite order can deadlock, and it's easy to do that inside a highly composed codebase. | 03:36 | |
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? | ||
ugexex | skids: what do you think this could be problematic? github.com/rakudo/rakudo/blob/nom/...ally.pm#L2 | ||
03:38
pjscott left
|
|||
skids | Well, it's not actually used to .protect so.... ? | 03:38 | |
03:40
kid51 left
|
|||
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. | ||
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? | ||
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? | ||
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? | ||
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 | ||
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. | ||
sprocket | mort96: perl6advent.wordpress.com/2015/12/...nous-data/ | ||
mort96 | I currently have HTTP::Client, which seems nice except that it's blocking | ||
03:44
pjscott joined
|
|||
ugexex | thats a limitation of libuv and scheduler-per-thread model | 03:44 | |
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 | doc.perl6.org/type/Promise#method_then | ||
ugexex | you could save to a file, close the file, notify another thread when its done, and then use it | ||
sprocket | mort96: there’s also IO::Socket::Async, but that’s not an http client | ||
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 | ||
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 | ||
i mean io::socket::async | |||
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? | ||
leont | openssl is a hard to use mess :-( | 03:47 | |
orbus | as far as I understand, yes | ||
ugexex | again, you cannot read data from an io::socket from 1 thread to another | ||
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. | ||
orbus | promises get scheduled on different threads | ||
mort96 | interesting | 03:48 | |
cygx | yurivis__: I think I mainly use := when interacting with nqp code | ||
if possible, I rather go with sigilless variables instead | |||
yurivis__ | there are sigilless variables? like, my x = 1, 2, 3? | ||
mort96 | I'm used to javascript, where blocking code in a promise would block everything | ||
yurivis__ | m: my x = 1, 2, 3; | ||
camelia | rakudo-moar b8a75b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/0C9OWgDYiKMalformed my (did you mean to declare a sigilless \x or $x?)at /tmp/0C9OWgDYiK:1------> 3my x7⏏5 = 1, 2, 3;» | ||
cygx | m: my \x = 42; say x | ||
camelia | rakudo-moar b8a75b: OUTPUT«42» | ||
yurivis__ | m my \x = 1, 2, 3; dd x; | ||
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; | ||
camelia | rakudo-moar b8a75b: OUTPUT«(1, 2, 3)» | ||
skids | yurivis__: see the last example in doc.perl6.org/type/Scalar | 03:50 | |
yurivis__ | cygx: interesting! thanks! I'm going to go read about sigilless variables | ||
orbus | m: my $p=start {sleep 2; put 1}; put 2; $p.result | 03:51 | |
camelia | rakudo-moar b8a75b: OUTPUT«21» | ||
orbus | simple example, but execution continues in the main thread while the promise thread is sleeping | 03:52 | |
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? | ||
ugexex | it should be noted start { } doesnt always mean a new thread. it just schedules work | ||
geekosaur | not so much pleasant as expected behavior, I think | ||
orbus | true | ||
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 | ||
camelia | rakudo-moar b8a75b: OUTPUT«1[2 3]» | ||
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 | ||
geekosaur | (and people do get , wrong in C all the time) | ||
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 | ||
but then you probably don't have that many cores anyway | |||
yurivis__ | oh, right, that's how you do multiple assignment. I kept trying to my $a = 1, $b = 2 | ||
orbus | probably | 03:55 | |
ugexex | you can have just 2 things and still get scheduled on a single thread | ||
orbus | hrm | ||
yurivis__ | (i guess it's "destructuring", rather than "multiple assignment" this way) | ||
orbus | well I'm hardly an expert so I'll defer to people who've studied it closer | ||
you can also use raw threads of course, but that's discouraged | 03:56 | ||
03:56
pjscott left
03:57
pjscott joined
|
|||
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«1234» | ||
skids | m: my $c = 3, my $d = 4; $c.say; $d.say; # also works | 03:58 | |
camelia | rakudo-moar b8a75b: OUTPUT«34» | ||
yurivis__ | right | ||
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 | ||
that's nice of it | |||
orbus | that's interesting | 03:59 | |
04:00
leont left
|
|||
orbus | presumably it didn't install all the way | 04:00 | |
did the bootstrap fail in the middle? | |||
ugexex | it just fails like that for some reason. i get it randomly as well | 04:01 | |
mort96 | no, all tests passed | ||
gfldex | mort96: what OS? | ||
mort96 | Linux | ||
Linux vor 4.2.5-1-ARCH #1 SMP PREEMPT Tue Oct 27 08:13:28 CET 2015 x86_64 GNU/Linux | |||
04:01
pjscott left
|
|||
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
|
|||
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. | ||
ugexex | i just submitted a PR to fix a different precomp error where it failed regenerating file structure | ||
mort96 | alright | ||
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 | ||
orbus | and I've bootstrapped panda | ||
cygx | *precompiled | ||
orbus | changed when? | ||
cygx | before christmas | ||
04:04
cdg joined
|
|||
orbus | oh, k - all the stuff I've done with panda has been on 2015.12 and post-christmas | 04:05 | |
before that I had whatever the latest star was | |||
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 | ||
orbus | you could force it to install in /usr/bin - it's just going to confuse your package manager | 04:06 | |
unless you feel like building your own packages | |||
mort96 | maybe, whenever package managers start providing perl 6 | ||
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? | ||
orbus | --prefix when you're building | ||
probably --prefix=/usr | |||
AlexDaniel | .seen jnthn | ||
yoleaux | I saw jnthn 25 Dec 2015 23:52Z in #perl6: <jnthn> Thanks! Really going, before I fall asleep on the keyboard :-) | ||
orbus | you'd have to do moar that way first, then nqp, then rakudo | 04:08 | |
so like perl ./Configure --prefix=/usr | |||
mort96 | and panda? | ||
orbus | I don't know about panda | ||
hrm | 04:09 | ||
cygx | AlexDaniel: jnthn is expected back in about a wekk or so | ||
orbus | I tried to force panda to install in a different directory | ||
but it then it got confused about where its libraries were | |||
ugexex | installing will install to the perl6 directory (in addition to the local .perl6 directory for some reaosn) | ||
04:09
cdg left
|
|||
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 | ||
and it comes out with bin, share, lib etc. under there | |||
so I don't see any reason you couldn't tell it /usr and get the same | |||
but panda's kind of weird | |||
gfldex | mort96: i'm using (to keep things tidy) --prefix=/home/gfldex/local and that works | ||
ugexex | you can look at the code, CompUnit::Repo::Installation uses $.prefix | ||
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 | |
I forget what I did now | |||
I think in the end I settled on symlinking it to the same place perl6 is installed | 04:12 | ||
it wanted to live off in some share directory | |||
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 | ||
ugexex | loads rather | ||
orbus | the symlink covered my bases, so I'm okay with how it is now | ||
but that's probably the *right* way | 04:14 | ||
AlexDaniel | interestingly, 2015.11 is now in debian unstable | ||
ugexex | you could use -I/custom/path (maybe PERL6LIB=/custom/path) to load them | 04:15 | |
TimToady | 2015.11 is "perl6 unstable" | ||
orbus | and 2015.11 is the latest star - they probably used that | ||
cygx | orbus: just ask mort96 what can happen if you settle on symlinking ;) | ||
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 | ||
mort96 | lol | ||
orbus | mort96: what happens if I settle on symlinking? | ||
mort96 | well, if you use rakudobrew, and symlink it to /usr/bin ... | ||
it used to delete all files in the directory it was in. | |||
orbus | oh, I don't know anything about rakudobrew | 04:17 | |
I just compiled from the tarballs | |||
llfourn | m: Bool.Int.^name.say # regression? | 04:18 | |
camelia | rakudo-moar b8a75b: OUTPUT«Bool» | ||
llfourn | m: True.Int.^name.say # regression? | ||
camelia | rakudo-moar b8a75b: OUTPUT«Bool» | ||
cygx | m: say Bool ~~ Int | 04:19 | |
camelia | rakudo-moar b8a75b: OUTPUT«True» | ||
llfourn | is that a new thing? | ||
cygx | feature, not bug | ||
llfourn | hmm ok :) | ||
cygx | relatively new | ||
04:19
yurivis__ left
|
|||
llfourn | Just sent some old code into infinite loop :D | 04:19 | |
orbus | currently I have perl6 in /home/orbus/perl6/christmas/install/bin | 04:20 | |
so I made a symlink for panda | |||
/home/orbus/perl6/christmas/install/bin/panda -> /home/orbus/perl6/christmas/install/share/perl6/site/bin/panda | |||
because that's where panda seemed to want to be | |||
but it's okay with me executing it from /home/orbus/perl6/christmas/install/bin | |||
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:21 | |
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» | ||
ugexex | maybe subset? | 04:23 | |
04:23
dalee joined
|
|||
llfourn | m: say 0 + True # works, reminds me of perl5 | 04:24 | |
camelia | rakudo-moar b8a75b: OUTPUT«1» | ||
skids | m: (+True).say | ||
camelia | rakudo-moar b8a75b: OUTPUT«1» | ||
llfourn | I guess that will have to do :) | ||
cygx | m: say Int.new(True) # Java version | ||
camelia | rakudo-moar b8a75b: OUTPUT«1» | ||
cygx | m: say True.Numeric | 04:25 | |
camelia | rakudo-moar b8a75b: OUTPUT«1» | ||
dalee | has anyone else had a hard time installing File::Find? | ||
llfourn | cygx: all in all I like the feature :) | ||
dalee | panda claims it isn't installed, but when it tries to isntall it errors out because it is already installed | ||
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 | ||
after all, True ~~ Numeric already | |||
TimToady: ^^ | |||
llfourn | cygx: that would be nice :) | ||
04:27
cdg joined
|
|||
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 | ||
at least last time I checked :) | 04:28 | ||
04:29
pjscott left
|
|||
TimToady | yeah, I agree that's a little weird | 04:29 | |
cygx | on the other hand, just adding a prefix + is a convenient way to construct an Int from an enum value... | 04:36 | |
04:36
xpen joined
|
|||
llfourn | m: enum <zero one two>; say +one # it works! | 04:37 | |
camelia | rakudo-moar b8a75b: OUTPUT«1» | ||
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» | ||
llfourn | m: #{ even though it is Numeric too } enum <zero one two>; say one ~~ Numeric | 04:39 | |
camelia | ( no output ) | ||
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
xpen left
|
|||
llfourn | m: #|{ even though it is Numeric too } enum <zero one two>; say one ~~ Numeric | 04:40 | |
camelia | rakudo-moar b8a75b: OUTPUT«True» | ||
AlexDaniel | llfourn: #`{ } | ||
llfourn | oops :P | ||
cygx | m: #`{ sure they do }; say "ok" | ||
camelia | rakudo-moar b8a75b: OUTPUT«ok» | ||
cygx | m: #`{ sure they do } say "ok" | 04:41 | |
camelia | rakudo-moar b8a75b: OUTPUT«ok» | ||
cygx | apparently, I've done enough Perl6 to automatically type }; if there's no newline | ||
04:42
bitmap joined
04:43
TEttinger joined
04:44
ugexe joined
04:50
Psyche^ joined
04:54
zwu left,
anaeem1_ joined
04:55
Psyche^_ left
05:00
anaeem1_ left
|
|||
flussence | dalee: panda has been flaky today for me too, no idea why or how to work around it, sorry | 05:03 | |
05:04
pjscott joined
|
|||
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 | |
so now i have two different state files for the libraries that are installed | |||
the other is /home/dale/.rakudobrew/moar-nom/install/share/perl6/site/panda/state | |||
flussence | inst#... shouldn't be a real directory. something's really gone wrong there. | 05:06 | |
dalee | seems to be somehow related to CompUnit/RepositoryRegistry.pm | 05:07 | |
05:08
loren joined
05:09
vendethiel joined
|
|||
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:09 | |
dalee | it looks like just copying the content of the bad state file into the real state file makes panda work properly | 05:10 | |
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
pjscott left
|
|||
llfourn | does '/home/dale/panda/inst#' actually exist | 05:12 | |
dalee | i'm not the only one this is happening to, according to github | ||
github.com/tadzik/File-Find/issues/17 | |||
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:13 | |
llfourn | .oO( maybe but what if you wanted inst#sftp://... ) |
05:15 | |
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 | ||
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 | ||
dalee | that's what $target is, but $prefix = $target.path-spec returns "inst#/home/dale/.rakudobrew/moar-nom/install/share/perl6/site" | ||
and right after that we do the mkdir | 05:18 | ||
05:22
ugexe left,
cdg left
05:23
cdg joined
05:28
cdg left
05:31
cdg joined
05:33
vendethiel left
05:35
loren left
05:37
pjscott joined
05:40
Cabanossi left,
nige1 joined
05:42
pjscott left
|
|||
dalee | i think i actually have a fix for that panda problem that makes some sense: github.com/tadzik/panda/pull/281 | 05:42 | |
05:44
Cabanossi joined
|
|||
llfourn | dalee++ | 05:46 | |
05:48
khw left,
Tonik joined
05:50
bitmap left
05:52
perlawhirl joined
05:53
dalee left,
dalee joined
|
|||
perlawhirl | hi perlers | 05:56 | |
skids | o/ | ||
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 | |
but where are these documented in the docs. | |||
cant find it | |||
there's is reference to some of them in the IO::Path docs, but not a rundown of each of them | |||
llfourn | heh I always though .e was exists | 05:59 | |
dalek | osystem: e25526a | yowcow++ | META.list: add String::CamelCase |
||
osystem: 849d601 | (Zoffix Znet)++ | META.list: Merge pull request #112 from yowcow/add-string-camelcase Add String::CamelCase |
|||
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. | ||
llfourn | perlawhirl: yep .e means exists :) | ||
like test -e | |||
perlawhirl | wait, you're right... .x for executable. | 06:01 | |
llfourn | yep the case for documenting it grows! | ||
geekosaur | er IO::Path Class. design.perl6.org/S16.html#IO%3A%3APath_Class | 06:02 | |
perlawhirl | skids: so the '-*' things from perl5 map accross, i imagine | ||
skids | Most of them I would think. | ||
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 | ||
skids | 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
|
|||
perlawhirl | ahh yes | 06:04 | |
geekosaur | windows does it by extensions and matching registry entries, not by mode bits | ||
skids | (and then there is selinux) | 06:05 | |
geekosaur | :p :b :c also have no windows analogs | ||
or :u :g :k for that matter | 06:06 | ||
and :S | 06:07 | ||
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«FalseFalse» | ||
geekosaur | perl5 does not cache them as such but has a hack instead | 06:11 | |
-e _ reuses the stat buffer from the previous stat()/lstat()/file test | |||
06:12
pjscott joined
|
|||
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 | ||
dalee | but Panda is installed in /lib | ||
06:12
cdg left
|
|||
dalee | i can override that with the PERL6LIB environment variable, but that seems weird to me | 06:12 | |
ugexex | i dont like how it doesnt act like a regular module either | 06:13 | |
06:13
pjscott left
|
|||
AlexDaniel | perlawhirl: hmm what about this? doc.perl6.org/type/IO::Path#File_Test_operators | 06:14 | |
perlawhirl | AlexDaniel: ... | 06:15 | |
AlexDaniel | “Instead of the colonpair syntax, you can use method calls too:” | ||
perlawhirl facepalms | |||
i was only looking up the top in the contents of method names | |||
06:15
pjscott joined
|
|||
perlawhirl | yah, i'm using method calls in a switch, ie: given $f { when .d { ... } } | 06:16 | |
AlexDaniel | you can probably do when :d | 06:17 | |
geekosaur | you do know that when smartmatches? | ||
so yes, the colonpair form works | |||
perlawhirl | yes colonpair works too | ||
i think for readability... these ops should have long aliases too... ie $f.readable | 06:18 | ||
just my thought | |||
ugexex | if $f.r#`{eadable} | 06:19 | |
gfldex | perlawhirl: the eco system is over there, where you could put that module :) | ||
perlawhirl | loud and clear gfldex :) | ||
AlexDaniel | gfldex: though nobody is going to add a dependency for such a tiny feature, IMO | ||
gfldex | perlawhirl: besides, if you have quite a few of those colon pairs, it may become tiresome to read | 06:20 | |
skids | Still, having a bunch of those little modules around might allow someone to merge them into a DSL/preferences module later. | 06:21 | |
06:23
kaare_ joined
|
|||
geekosaur | .oO { use English; } | 06:23 | |
skids | Heheh. Maybe more like use Flavor::Something | 06:25 | |
06:30
pjscott left
06:31
MadcapJake left
06:32
sprocket left,
perlawhirl left
06:33
cygx left
06:34
MadcapJake joined
06:36
aypea[2] joined
|
|||
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 | |
in Windows | |||
06:41
pjscott joined
06:43
pjscott left
|
|||
ugexex | MadcapJake: got something i can c&p? | 06:44 | |
06:44
pjscott joined
|
|||
MadcapJake | ugexex: echo hello world | type | 06:45 | |
ugexex | The syntax of the command is incorrect. The process tried to write to a nonexistent pipe. | 06:46 | |
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 | |
maybe 'echo "hello world" | type' | |||
06:48
bitmap joined
|
|||
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 | ||
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: github.com/perl6/doc/blob/master/b...oc#L56-L58 | ||
i added an optional flag to p6doc that prints right to stdout instead of pluging the text into a pager | 06:52 | ||
however, I don't think windows has a `cat` command | |||
ugexex | fwiw powershell has cat | ||
not cmd though | |||
MadcapJake | i'm guesing cygwin does too. but that leaves all the traditional cmd folks without this all-important option ;) | 06:53 | |
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 | ||
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? | ||
ugexex | because piping should handle the memory between the processes without like <fill memory with all of cmd1> -> next process | ||
geekosaur | hm? windows can keep scrollback | 06:56 | |
or did you mean more.exe? | |||
ugexex | it does let you scroll back wih the mouse at least... although im not sure how thats even done with the keyboard | ||
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? | ||
geekosaur | that sounds like windows 3.1... | ||
MadcapJake | geekosaur: i have no idea, i've done very little with cmd.exe, most of my programming life has been on linux | ||
geekosaur | maybe 95/98, certainly not the nt line | ||
MadcapJake | last time i used cmd.exe was probably 98-era | 06:58 | |
AlexDaniel | try this: | ||
my $x = run(‘sleep’, ‘5’, :out); say ‘hello’; $x.out.slurp-rest; say ‘done’ | |||
geekosaur | set more=/e and while there's no scroll 1 page back, =line takes you to that line | ||
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
|
|||
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 | |
thats if they are written to use pipes though | |||
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 | |
07:01
bitmap left
|
|||
ugexex | run is still filling memory somewhere, just because you are reading from that lazily doesnt mean that data isnt sitting somewhere already | 07:01 | |
AlexDaniel | my $x = run(‘sleep’, ‘5’, :out); say $x.out.WHAT | 07:02 | |
says (Pipe) | |||
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 | ||
otherwise what's the point :) | |||
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 "^"` | ||
ugexex | cmd.exe says "hello world" and powershell says "hello\nworld" | ||
AlexDaniel | ugexex: even your shell buffers it. Does it buffer it fully? | 07:05 | |
MadcapJake | oi vey | ||
07:05
asie left
|
|||
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
|
|||
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 | ||
ugexex | the last one is "hello world" with the quotes, and powershell doesnt understand find/v (is there supposed to be a space?) | ||
MadcapJake | no idea, just searching through stackexchange answers :P | 07:08 | |
ugexex | space says parameter format incorrect :/ | ||
MadcapJake | ok that' | 07:09 | |
's stupendous x_x | |||
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 | ||
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 | |||
is there a way to run Windows in a VM without having a registration key :P | 07:12 | ||
ugexex | FCKGW | 07:13 | |
MadcapJake | lol, guess not ;) | 07:14 | |
ugexex | maybe for windows just `shell xxx > doc.tmp` and then read from the file | ||
spin up an aws instance? | 07:15 | ||
AlexDaniel | I have just tested that on linux and it works perfectly | 07:16 | |
piping I mean | |||
that is, it is not going to wget all things until you actually read some of the input | |||
MadcapJake | i gotta get some rest, thanks for the help ugexex ! g'night all! | ||
AlexDaniel | I could even test that on jvm… but that is going to take some time to build | 07:17 | |
07:17
pjscott left
|
|||
AlexDaniel | Also, this is just waiting to blow up: shell "$*EXECUTABLE-NAME -I$i --doc=SectionFilter $path $fmt-string | $pager"; | 07:20 | |
anyway, anybody using rakudo on jvm can try this: gist.github.com/AlexDaniel/1015a8072fb43442c81c | 07:25 | ||
change “beep” to any other command of your liking | |||
that is, it beeps every 100 lines (when they were produced) | 07:26 | ||
when I run this on my system I get 4 beeps immediately. Then I get more beeps when I scroll down | |||
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:28 | ||
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:33 | ||
07:35
BenGoldberg left
07:42
molaf__ left
|
|||
AlexDaniel | ugexex: so, can you try that on jvm so that I can fill a bug report if it does not work correctly | 07:46 | |
07:47
AndyDee left
|
|||
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:47 | |
07:48
darutoko joined
|
|||
AlexDaniel | apparently rakudobrew is refusing to build it on my pc, no idea what the problem is… | 07:48 | |
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:51 | |
AlexDaniel | ugexex: so, is that on linux or on windows? | 07:52 | |
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 | ||
ugexex: ok, thanks | |||
ugexex | seems like it might be :in(xxx) | ||
07:55
user74747 joined
|
|||
ugexex | yeah it acts strange with :in | 07:57 | |
07:58
molaf joined,
sno joined
|
|||
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 | 07:59 | |
08:01
bitmap joined
|
|||
AlexDaniel | oh wow, I have no idea how to install perl 6 on windows | 08:01 | |
ugexex | i use rakudobrew on windows | 08:02 | |
AlexDaniel | oh, so it works on windows? | ||
ugexex | yeah | ||
AlexDaniel | cygwin required? | 08:03 | |
ugexex | i use visual studio for nmake. no cygwin | 08:04 | |
dalek | c: 715950e | lizmat++ | doc/Language/setbagmix.pod: Mention ∅ (U+2205 EMPTY SET) |
||
ugexex | and cl compiler that is | 08:06 | |
08:07
ugexe joined
|
|||
ugexex | oh boy how long until it gets DoSd off again | 08:09 | |
AlexDaniel | I don't think that I will ever manage to install it on windows… | 08:11 | |
“SET PATH "%USERPROFILE%\rakudobrew\bin;%PATH%"” does not work! Hmm… | 08:12 | ||
ugexex | i always do `perl $full-path\bin rakudobrew build moar` | 08:13 | |
AlexDaniel | oh right, I don't even have perl installed | ||
I give up. | |||
ugexex | perl you can just use the strawberry installer | 08:14 | |
AlexDaniel | that's just too much for me, I really give up | ||
08:18
user74747 left
|
|||
AlexDaniel | ugexex: there is a test for that: github.com/perl6/roast/blob/master...pipe.t#L46 | 08:20 | |
at least a simple case should work, what exactly have you tried? | |||
it does not seem to be fudged for JVM | 08:21 | ||
ugexex | cool, ill see if it works on windows too. maybe the command has to accept piped input to not error | 08:24 | |
it dies at line 38 | 08:27 | ||
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:28 | ||
08:28
molaf left
|
|||
ugexex | also the broken pipe error afterwards | 08:29 | |
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! github.com/coke/perl6-roast-data/b....out#L1483 | ||
ChoHag | (With a 'slightly' out of date politically aware pun thrown in for good measure) | 08:31 | |
masak | morning, #perl6 | ||
AlexDaniel | ugexex: since you probably understand more than me, perhaps you can report it? | ||
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 | ||
ChoHag | Shouldn't it be a bit 'smart'er? | 08:33 | |
AlexDaniel | ugexex: thank you! | 08:34 | |
08:34
skids left
08:36
SwellJoe left
08:37
molaf joined,
ugexex left
08:47
virtualsue left
08:50
hankache joined
|
|||
hankache | hello * | 08:58 | |
09:08
wamba joined
09:10
WAAOUGK joined
09:13
molaf left
09:15
ugexe left
09:16
bitmap left
|
|||
dalek | kudo/nom: ef92faa | (Dale Evans)++ | lib/NativeCall.pm6: typo just a typo |
09:19 | |
kudo/nom: b5cb005 | lizmat++ | lib/NativeCall.pm6: Merge pull request #669 from daleevans/patch-1 typo |
|||
[Tux] | csv-ip5xs 50000 18.352 18.224 | 09:24 | |
test 50000 24.391 24.263 | |||
test-t 50000 13.819 13.691 | |||
csv-parser 50000 52.760 52.631 | |||
09:25
domidumont joined
|
|||
dalee | does anyone know how this checksum-looking number in .rakudobrew/moar-nom/install/share/perl6/site/dist/81C4F7EC11D41848ECD6B188688BC57EFD15D2C8 is calculated? | 09:25 | |
is it tied to the file contents, module name, ?? | 09:26 | ||
09:26
domidumont left
09:30
molaf joined
|
|||
masak | tadzik++ # "I AM RAKUDOBREW. ALSO POSSIBLY SPARTACUS. OUTLOOK CLOUDY, ASK AGAIN LATER." | 09:30 | |
Hotkeys | how can I have leading zeros in a string? | 09:35 | |
09:36
RabidGravy joined
|
|||
Hotkeys | ie I want "8" to be "08" but "12" to stay "12" | 09:36 | |
s/ie/eg/ | 09:37 | ||
dalee | my $a = sprintf "%02d", 8; say $a; | ||
09:37
firstdayonthejob left
|
|||
cognominal | A joyful year to * : pbs.twimg.com/media/CXqZEqMWYAA9Ovg.jpg | 09:38 | |
RabidGravy | m: say 8.fmt("%02d"); # if you prefer | ||
camelia | rakudo-moar b5cb00: OUTPUT«08» | ||
09:39
firstdayonthejob joined,
domidumont joined
|
|||
zhmylove | RabidGravy: + | 09:40 | |
dalek | osystem: 7267c01 | (Maxim Khailo)++ | META.list: Adding PKafka Adding reference to my Perl 6 implementation of an Apache Kafka client. |
09:44 | |
osystem: 94ef367 | RabidGravy++ | META.list: Merge pull request #113 from mempko/patch-1 Adding PKafka |
|||
c: 28f2111 | (Jake Russo)++ | bin/p6doc: Allow -n flag on method/routine docs now it properly passes the flag along to `MAIN` or `show-docs`. |
09:46 | ||
c: ad7fd7d | RabidGravy++ | bin/p6doc: Merge pull request #311 from MadcapJake/master Allow -n flag on method/routine docs |
|||
RabidGravy | merge-tastic! | 09:47 | |
09:49
pmurias joined
|
|||
masak | cognominal: joie! I got that one! :D | 09:51 | |
I knew all those years of French would pay off somehow! \o/ | 09:52 | ||
firstdayonthejob: hi | |||
firstdayonthejob: that's an intriguing nick. is it a Perl 6 job, perchance? ;) | 09:53 | ||
09:53
pmurias_ joined
|
|||
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
pmurias left
09:57
spider-mario joined
|
|||
masak | in other happy news, I think I finally grok homology | 09:59 | |
haven't tried to grok cohomology yet, though :P | |||
10:00
pmurias_ is now known as pmurias
10:01
abraxxa joined
|
|||
nine | Is it possible that panda is older than most of the IO::Path goodness? | 10:01 | |
abraxxa | hi! | ||
10:02
rindolf joined
|
|||
masak | abraxxa: hi! | 10:03 | |
10:03
vividsnow left
|
|||
masak | nine: not just possible | 10:03 | |
10:09
pierre-vigier joined
10:10
domidumont left
10:12
pmurias left
10:13
pmurias joined
10:14
FROGGS_ joined,
bitmap joined,
domidumont joined
10:16
Sqirrel left
10:18
FROGGS left,
ugexe joined
10:19
bitmap left
|
|||
llfourn | can someone remind me of the equiv of use FindBin qw/$Bin/; use lib "$Bin/lib"; | 10:20 | |
10:21
bitmap joined
|
|||
masak | ooh, I'd like to know that too. I have that use case now and then. | 10:22 | |
RabidGravy | $*PROGRAM.parent.child("lib").Str | 10:23 | |
? | |||
llfourn | RabidGravy: I think it should be $?FILE? | ||
RabidGravy | $?FILE.IO.parent.child("lib").Str; then | 10:24 | |
but that is probably not what you want in a library | 10:25 | ||
llfourn | RabidGravy: works! thanks. | ||
dalee | "P6M Merging GLOBAL symbols failed: duplicate definition of symbol Find" | ||
llfourn | use lib $?FILE.IO.parent.child("lib").Str; | ||
10:26
vividsnow joined
|
|||
llfourn | feature request: $?DIR | 10:26 | |
this might warrant a mention in 5-to-6 | |||
dalee: I've seen at least one instance of that kind of annoying error around | 10:27 | ||
I think it was in an RT | |||
abraxxa | dalee: I have the same error with NativeCall | ||
hankache | dalee i did rebuild panda using "rakudobrew build-panda" and this error was gone. I hope it solves your issue. | 10:29 | |
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
|
|||
dalee | the version that is installed by panda has version "*", when panda installs File::Find again it installs version 0.1 | 10:37 | |
shouldn't this cause the old version to be uninstalled? | |||
or does perl6 allow multiple versions of a module to be installed simultaneously? | |||
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 | ||
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:39 | |
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 | ||
hankache | dalee have you tried using --force ? | ||
RabidGravy | is there a more fine-grained way of catching warnings than a CONTROL block? it appears to be interfering with my object construction | ||
llfourn didn't even know you could throw or catch warnings | 10:41 | ||
dalee | hankache: if i install with --force i still get the problems | 10:42 | |
nine | RabidGravy: CONTROL { when CX::Warn { "whatever" } } | ||
RabidGravy | yeah, that's what I'm doing | ||
nine | The answer is: we're still not smart enough at outdating precomp files. | ||
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
abraxxa left
|
|||
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. | ||
It was Ubuntu 14.04, no previous rakudo encounter. | |||
10:44
nige1 left
|
|||
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. | ||
Hotkeys | Like 100₃₆ for :36<100> | ||
RabidGravy | nine++ # that's the puppy | 10:46 | |
kaare_ | Something like "perl 6 is required, but we only have 5.18.2" | ||
10:46
nadim left
|
|||
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. | ||
nine | kaare_: that's caused by some PERL5 env var being set. PERL5LIB or something | ||
RabidGravy | kaare_, what nine said | ||
10:46
nadim joined
|
|||
RabidGravy | it definitely is PERL5LIB | 10:47 | |
10:47
bitmap left
|
|||
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 | ||
kaare_: rakudo doesn't, but rakudobrew is a Perl 5 script | |||
10:47
ugexe left
|
|||
kaare_ | Oh, that makes sense now. | 10:47 | |
nine | kaare_: and rakudo's Configure.pl is also a Perl 5 script. | ||
kaare_ | As I said, it's @work, so I can try to undef PERL5* from the environment, tomorrow | 10:48 | |
10:49
ugexe joined,
azawawi joined
|
|||
azawawi | hi | 10:49 | |
RabidGravy: ping | |||
RabidGravy | erp | ||
azawawi | RabidGravy: ping! :) | ||
RabidGravy | POWM! | 10:50 | |
azawawi | :) | ||
RabidGravy: starting rakudobrew on my old rpi board | |||
RabidGravy: and benchmarking | |||
RabidGravy | time for a three course meal then | ||
;-) | |||
azawawi | RabidGravy: what's your board model and card memory speed? | 10:51 | |
nine | azawawi: congrats on the Inline::Ruby progress :) | 10:52 | |
azawawi | nine: that's not me btw awwaiid i think :) | ||
nine: github.com/awwaiid/p6-Inline-Ruby | 10:53 | ||
nine: but thanks :) | |||
RabidGravy | I have two, a v2 which is slow but not too bad, and a Rev B with single core 700Mhz and 435MiB | ||
azawawi | awwaiid azawawi | 10:54 | |
:) | |||
RabidGravy | I don't know what the SD card is though | ||
azawawi | SD class that is | ||
kaare_ | The v2 is 1 GHz, AFAIK | ||
moritz | \o | 10:55 | |
kaare_ | And petter instruction set. Should be much faster | ||
s/p/b/ | |||
RabidGravy | to be honest it's probably a crap old SD card, I recycle the ones from audio gear when I get faster ones | ||
azawawi | RabidGravy: www.raspberrypi.org/products/raspb...2-model-b/ ? | 10:56 | |
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 :) | ||
RabidGravy | the lshw is less than descriptive with regard to the actual board | ||
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 | ||
azawawi | ARMv7 | ||
RabidGravy | FROGGS_, that's weird as I've never had a problem | ||
FROGGS_ | I've only 512MB RAM | 10:59 | |
10:59
FROGGS_ is now known as FROGGS,
pierre-vigier left
|
|||
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? | ||
nine | ugexe: left a comment on your PR | ||
FROGGS | azawawi: you need 1GB at least AFAIK | 11:00 | |
RabidGravy | the v2 has "BCM2709, ARMv7 Processor rev 5 (v7l)" with four cores | ||
nine | ugexe: can you split the commit? I'd gladly merge the second part. Thanks for debugging this! | ||
azawawi | FROGGS: or a bigger swap file if you wanna wait :) | ||
FROGGS | hmmmm, maybe I try again at some point... | ||
azawawi | FROGGS: im trying it right now | 11:01 | |
"Updating submodules " step now | |||
FROGGS | I'm (literally) working on a C program right now for the pi | ||
RabidGravy | I built, a 2015.12 with the 512Mb on the B, not using Raspbian though | ||
and I killed all the X stuff | |||
FROGGS | I'm using raspbian | ||
azawawi | RabidGravy: im already not using x stuff | 11:02 | |
RabidGravy: ssh session | |||
RabidGravy | yeah, but is it still running? | ||
the gdm and so forth | |||
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! | ||
yoleaux | nine: I'll pass your message to ugexe. | ||
11:02
hankache left
|
|||
azawawi | RabidGravy: i will check the services running ... i even have mysql-server running on it lol | 11:05 | |
11:06
lnrdo joined
|
|||
masak | can sprintf give thousands formatting? like rendering 1048576 as 1,048,576 ? | 11:06 | |
guess not. | |||
azawawi | RabidGravy: farabi btw (Perl 5 version) was working on a rpi without no hiccups :) | ||
RabidGravy: s/on a/on an/ | |||
RabidGravy | yeah, I had RabbitMQ, icecast and all sorts of stuff, I then bought a Gigabyte brix which wasn't much more expensive | ||
aypea[2] | masak: still? :( | ||
azawawi | RabidGravy: link it plz? | 11:07 | |
moritz | lol, I blogged: perlgeek.de/blog-en/automating-dep...oject.html (slightly off-topic, because it's not about Perl 6) | ||
RabidGravy | it's just a micro-atx PC in a cube shaped box | ||
'ang on | 11:08 | ||
masak | aypea[2]: to be honest, I'm not sure sprintf is the right tool for the job | ||
FROGGS | moritz: I was also thinking about blogging about my childrens-rooms-entertainment-app-for-raspi :o) | ||
azawawi | moritz: im getting on 403 (forbidden) on that link you posted | ||
moritz | azawawi: huh | ||
FROGGS | moritz: because it is also a rabbit hole like rakudo... | ||
I get a 404 O.o | 11:09 | ||
moritz | azawawi: can you tell (or privmsg) me your public IP? | ||
azawawi: and does it work with http (no https) for you? | 11:10 | ||
11:10
lnrdo left,
bitmap joined
|
|||
azawawi | moritz: fails on https, work on http | 11:10 | |
moritz | azawawi: ok, thanks. And fuck. | ||
RabidGravy | azawawi, like one of these www.gigabyte.com/products/product-p...id=5569#ov - it's actually a "GB-BXBT-2807" | 11:11 | |
azawawi | RabidGravy: thx | ||
moritz | azawawi: it looks like IPv4 and https don't work together on that site; work with IPv6 for me | ||
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 | ||
ecosystem either | |||
dalee | but installing any "new" version of File::Find causes it again | 11:13 | |
FROGGS | dalee: does that trigger precompilation by any chance? | 11:17 | |
11:19
krunen left
|
|||
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. | ||
FROGGS | uhh | ||
11:21
aypea[2] left
|
|||
FROGGS | nine: I mean, this is kinda correct and incorrect that we load both | 11:21 | |
11:22
molaf_ joined
|
|||
FROGGS | in the end we need to make the scenario work I think: A->B->C:v1, A->D->C:v2 | 11:22 | |
11:23
molaf left
|
|||
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:23 | |
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. | ||
FROGGS: it's not the same versions. panda claims '*' while standalone File::Find is at 0.1 | |||
11:25
frankjh joined
|
|||
FROGGS | ahh, its projects.json is buggy then | 11:25 | |
11:26
ChoHag left
|
|||
RabidGravy | kill all the things | 11:27 | |
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 | ||
maybe we should add more debugging output in the codes that decide about candidates | |||
11:30
tipdbmp left
|
|||
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:31 | |
FROGGS | :S | 11:32 | |
11:32
virtualsue left
|
|||
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:35 | |
nine | Oh! | 11:36 | |
I think, I found it. | |||
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. | ||
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? | ||
azawawi | FROGGS: ARM: Internal compiler error: in extract_insn | 11:39 | |
FROGGS | azawawi: interesting | ||
azawawi: I dont remember my error message though | |||
azawawi | FROGGS: running it again.... results in a couple of minutes | ||
11:40
bitmap left
|
|||
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 | |
(would love to understand) | |||
RabidGravy | "KiB Swap: 1048572 total" | ||
FROGGS | m: use NativeCall; sub foo (longlong) { 42 }; say foo 42 # frankjh: I can pass it just fine here | ||
nine | That's the commit: github.com/rakudo/rakudo/commit/0734842b | ||
camelia | rakudo-moar b5cb00: OUTPUT«42» | ||
nine | llfourn: because a repository further up in the chain may contain a newer version of a dependency. | ||
11:42
frankjh left
|
|||
llfourn | nine: ok. Will think about that.. | 11:42 | |
11:42
frankjh1 joined
|
|||
azawawi | FROGGS: gist.github.com/azawawi/e7a1228385de73f27d4c | 11:42 | |
11:42
virtualsue joined
|
|||
RabidGravy | azawawi, ah that's a different matter | 11:42 | |
you will need to use a more recent gcc | 11:43 | ||
azawawi | RabidGravy: 4.6.3 | ||
RabidGravy | gcc (GCC) 4.8.2 20131212 (Red Hat 4.8.2-8) | ||
FROGGS | azawawi: mine died when compiling the setting... in stage optimize or mast or so | ||
RabidGravy | you should be able to get a more recent version and then fiddle around the alternatives thing to make it the default | ||
azawawi | RabidGravy: that's stock raspbian settings fyi | 11:44 | |
RabidGravy | yeah 4.8.2 definitely works using it on both Pis | ||
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) | ||
RabidGravy | azawawi, yeah but the moarvm compile tickles a bug or some infelicity in the older gcc | ||
azawawi | so what's the minimum gcc recommended? | ||
RabidGravy | FROGGS, yeah it stopped working a few months ago | ||
FROGGS | frankjh1: what is $m? | 11:46 | |
is it a string? | |||
and where does it come from? | |||
11:46
bitmap joined
|
|||
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:46 | |
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, ..." | ||
FROGGS | frankjh1: can you golf it down? | ||
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
|
|||
FROGGS | RabidGravy++ | 11:48 | |
11:48
user74747 joined
|
|||
RabidGravy | it seems like sprocket is leading the way with actually making stuff for it | 11:48 | |
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 | ||
RabidGravy | I've got two modules in flight but I got pre-empted by a bunch of feature requests for Test::META | ||
azawawi++ | 11:53 | ||
11:53
ChoHag joined
|
|||
RabidGravy | regex gugus, is there a succinct way of saying "the string contains this substring and not this other one"? | 11:56 | |
11:57
nadim left,
_nadim joined
|
|||
frankjh1 | RabidGravy: Int($mlen) gives same error. | 11:57 | |
RabidGravy | :-O | ||
what's in $mlen then? | 11:58 | ||
azawawi | RabidGravy: compiling on gcc 4.8 now | 12:00 | |
RabidGravy | cool | ||
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 | ||
FROGGS | frankjh1: is crypto_box_int the native function? | ||
virtualsue | but in a good way | ||
frankjh1 | RabidGravy: 35. | ||
llfourn | m: say so "foobaz" ~~ /<!before .*"bar">foo/ # my attempt | 12:01 | |
camelia | rakudo-moar b5cb00: OUTPUT«True» | ||
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') { * } | ||
I have a perl6 wrapper function around that. | |||
12:02
bitmap left
|
|||
azawawi | RabidGravy: it seems to have worked. time for lunch :) | 12:02 | |
RabidGravy | yay! | ||
FROGGS | frankjh1: can you 'say $mlen.WHAT' before the call to crypto_box_int'? | 12:03 | |
12:03
pmurias left
|
|||
FROGGS | or... make it: sub crypto_box_int(CArray[int8], CArray[int8], longlong(), CArray[int8], CArray[int8]) | 12:03 | |
or... do what I said first :o) | |||
12:04
pmurias joined
12:08
whj2819 joined
|
|||
frankjh1 | FROGGS: The test runner 'prove' is eating my stdout. Somehow I do not see what I say. :) | 12:08 | |
12:08
virtualsue left
|
|||
FROGGS | frankjh1: try 'note' instead of 'say' | 12:09 | |
12:10
bitmap joined
12:13
TEttinger left
|
|||
masak | m: say ("0" x 3 ~ "1").substr(2) # [RT #123602] | 12:13 | |
camelia | rakudo-moar b5cb00: OUTPUT«00» | ||
masak | still wrong | 12:14 | |
FROGGS | m: say ("0" x 3 ~ "1") | ||
camelia | rakudo-moar b5cb00: OUTPUT«0001» | ||
12:14
bitmap left
|
|||
masak | maybe I should "learn the ropes", hehe | 12:14 | |
12:15
bitmap joined
12:21
Actualeyes joined
|
|||
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:24 | |
FROGGS | aha | 12:25 | |
well yeah, I suspected that something strange is going on | |||
12:26
nowan left
12:28
nowan joined
12:29
bitmap left,
Sqirrel joined
12:31
pdcawley joined
|
|||
AlexDaniel | m: .say for “hello\c[LINE SEPARATOR]world”.lines | 12:38 | |
camelia | rakudo-moar b5cb00: OUTPUT«helloworld» | ||
AlexDaniel | m: .say for “hello\x0085world”.lines | 12:39 | |
camelia | rakudo-moar b5cb00: OUTPUT«helloworld» | ||
12:39
wamba left
12:47
lnrdo joined
12:52
araujo joined
12:53
araujo left
12:55
araujo joined,
araujo left,
araujo joined
13:01
vendethiel joined
|
|||
RabidGravy | jdv79, Zoffix : I think github.com/jonathanstowe/Test-META...tag/v0.0.3 covers your wishes as far as I am prepared to go right now | 13:01 | |
13:05
whj2819 left
|
|||
azawawi | RabidGravy: "stage start" reached.... oh yeah :) | 13:06 | |
bonsaikitten | flussence: btw - second patch, doc strings don't apply cleanly | 13:07 | |
flussence: apart from that it's all good | |||
13:12
lnrdo left,
lnrdo joined
|
|||
dalek | c: a468121 | lizmat++ | doc/Language/setbagmix.pod: Fix header level |
13:15 | |
13:15
leont joined
13:16
bitmap joined
13:17
lnrdo left,
regreg joined
|
|||
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
|
|||
ChoHag | Even if the variable assigned to is subsequently unused by the time it goes out of scope? | 13:21 | |
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; } | ||
There's no code. I want to ensure I write the code sanely if there's a need to. | |||
If even the above example will never cause the assignment not to happen, I'm golden. | 13:23 | ||
lizmat | fwiw, as soon as something is lazy and can have side-effects, it can never be optimized away | 13:24 | |
if it is, it's probably somewhere losing the fact that it can have side-effects.. | |||
AlexDaniel | .u 🌃 | 13:25 | |
yoleaux | U+1F303 NIGHT WITH STARS [So] (🌃) | ||
13:25
regreg left
13:26
harrison_ joined,
gavinhi joined
|
|||
AlexDaniel | .u ⌣ | 13:27 | |
yoleaux | U+2323 SMILE [So] (⌣) | ||
AlexDaniel | Hm, I don't think that there is any symbol that is good enough for whatever star | 13:28 | |
13:33
kid51 joined
|
|||
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:33 | |
ChoHag | AlexDaniel: O | 13:34 | |
It's a blank face. | |||
AlexDaniel | ChoHag: blank face? | ||
ChoHag | Like ☺, but blank. | 13:35 | |
That or Vicky Pollard, but she's probably not in Unicode. | |||
AlexDaniel | I don't think that I'm following you :D | ||
actually, ⍰ is not too bad | 13:36 | ||
13:36
_mg_ left
|
|||
AlexDaniel | .u ⍰ | 13:36 | |
yoleaux | U+2370 APL FUNCTIONAL SYMBOL QUAD QUESTION [So] (⍰) | ||
llfourn | ⍰ a box with a question mark is pretty whatever to me | ||
leont | Sounds like AlexDaniel doesn't have some character in his fonts that ChoHag does have | ||
llfourn | although it's hard to to see it because it's so small | 13:37 | |
AlexDaniel | .u O | ||
yoleaux | U+004F LATIN CAPITAL LETTER O [Lu] (O) | ||
ChoHag | If asked a question, and you don't know the answer, your face would likely be blank. | ||
AlexDaniel | llfourn: I'm pretty sure that everything is rendered correctly here :) | ||
llfourn | AlexDaniel: it looks like it to me :) | 13:38 | |
ChoHag | Oh no not Vicky Pollard. I'm thinking of Catherine Tate. | ||
It's been a long time since I watched TV. | |||
13:39
CIAvash left
|
|||
azawawi | stage parse over rpi 1 (512MB) = 2330.433 seconds :) | 13:45 | |
13:49
vike left
|
|||
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? | ||
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 | ||
azawawi | slow upload connection? :) | ||
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 | |
What is the proper name for access_byte_at() ? | |||
AlexDaniel | frankjh1: good questions! | 13:56 | |
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 | ||
RabidGravy | but something like what AlexDaniel said | ||
AlexDaniel | frankjh1: yeah, well, strings are on grapheme level by default. If you want bytes you have to do something | 13:58 | |
ahhh | |||
hmm… | |||
RabidGravy | I'd probably go with "my Buf $m = "Hello".encode .... " | ||
which will definitely get you bytes | |||
AlexDaniel | yeah, that's probably one way to do it | ||
frankjh1 | So you encode a Str into a Buf? And with Bufs i can access Bytes with [] ? | 13:59 | |
13:59
vike joined
|
|||
RabidGravy | yeah | 14:00 | |
frankjh1 | Ok thanks I will try! | ||
gfldex | you better .comb and then encode on the one char string | ||
RabidGravy | then do "$msg[$_] = $buf[$_] for ^$buf.elems" | ||
saving the C stule loop | |||
14:00
bbkr joined
|
|||
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
|
|||
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. | ||
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. | ||
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)" | ||
RabidGravy | bbkr, yes | 14:05 | |
14:05
harrison_ left
14:06
pdcawley left
|
|||
dalek | c: dec7182 | lizmat++ | doc/Language/glossary.pod: Some work on the glossary As part of moving stuff from S99 in here |
14:06 | |
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 | ||
frankjh1 | RabidGravy: No I didn't know. And I need to add 24 zeros to the start of the Str first. | 14:08 | |
Cool | |||
RabidGravy | ah | ||
bbkr, if you pass a List ($libname, Version) as $libname, I think it should work | 14:12 | ||
jdv79 | RabidGravy: cool, thanks | ||
RabidGravy | (reading guess_library_name) | ||
14:12
Skarsnik joined
|
|||
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 | ||
bbkr | RabidGravy: thanks, indeed this one works "cglobal(("c", v6), "errno", int)". | 14:15 | |
RabidGravy | cool, I don't have to blame Skarsnik then ;-) | ||
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? | ||
Skarsnik | I should probably tag the routine as cached x) | 14:18 | |
RabidGravy | oh I see, I already did do that :) it works better with the resources thing | 14:19 | |
Skarsnik | it can be bad if you perform path search in system and such if you have like 20+ native sub x) | 14:20 | |
14:20
gavinhi left
14:21
pjscott joined,
pjscott left
14:23
colomon left
|
|||
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:25 | |
14:28
lucasb joined
14:29
colomon joined
|
|||
azawawi | RabidGravy: Done, moar-2015.12 built on RPi 1 512MB, ( real = 145m10.208s, user = 123m23.310s, sys = 3m22.210s) # final results | 14:30 | |
RabidGravy | haha | 14:31 | |
yeah, it would be cool if there could be a package for that really | |||
azawawi | RabidGravy: working on it :) | 14:32 | |
Skarsnik | did you manage to plug 2 sata disk on a pi? | 14:33 | |
azawawi | Skarsnik: it should be possible but not atm | 14:34 | |
14:35
vendethiel left
14:36
colomon left
14:37
colomon joined
|
|||
masak | this script gist.github.com/masak/81409152053431cac80b , which strangelyconsistent.org/blog/youre-...-all-alike says used to take 38 minutes, now takes 20. so someone++ for optimizing Rakudo by 50% :) | 14:41 | |
14:41
colomon left
|
|||
RabidGravy | :) | 14:41 | |
Skarsnik | Does adding a type to the @ speed up a bit? | 14:42 | |
gfldex | Skarsnik: it will make it slower | 14:43 | |
moritz | except for native types like int | ||
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:44 | |
14:46
telex left
|
|||
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 :) | ||
Skarsnik | I have 2 modules to write x) | 14:48 | |
14:48
colomon joined,
telex joined
|
|||
masak | I'm now running with a completely unrolled @cycles for loop, and next I will replace the regex by bit ops | 14:49 | |
14:50
frankjh1 left
|
|||
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:50 | |
14:50
colomon left
14:51
colomon joined
|
|||
lucasb | .oO( I don't know where your .pm files are... but I will find them... and I will use them! ) |
14:51 | |
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 | ||
masak .oO( how module get pragnent? ) | |||
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 | ||
gfldex | can panda be asked to execute some script before it installs .pm ? | ||
masak .oO( they need to do way instain build your own build system that does #include by hand... who kill their module ) | 14:54 | ||
nine | gfldex: Build.pm | 14:55 | |
gfldex | Skarsnik: your build system goes there ^^^ | 14:56 | |
lucasb | masak: I guess you already saw this book: pragprog.com/book/jbmaze/mazes-for-programmers | ||
Skarsnik | x) | 14:57 | |
stmuk_ wonders if memorizing the precomp sha1 hashing would speed things up | 15:02 | ||
lucasb | m: say "\xfa6b" | 15:05 | |
camelia | rakudo-moar b5cb00: OUTPUT«恵» | ||
masak | lucasb: I did not. thank you. | ||
lucasb | m: say "\xfa6c" | ||
camelia | rakudo-moar b5cb00: OUTPUT«(signal SEGV)» | ||
masak | ok, unrolling brought the time down to 17m53s | ||
lucasb: would you mind submitting that as a bug? | |||
shouldn't segfault :) | 15:06 | ||
gfldex | lucasb: Sir put that character down! | ||
lucasb | masak: I think someone already submitted... | ||
m: say "\xfa6d" | |||
camelia | rakudo-moar b5cb00: OUTPUT«舘» | ||
lucasb | I think 0xfa6 is just special... idk | ||
there are more "special" segfaulty chars less than 0xffff | 15:07 | ||
15:08
CIAvash joined
|
|||
gfldex | m: say "\xEFA9AC" | 15:08 | |
camelia | rakudo-moar b5cb00: OUTPUT«(signal SEGV)» | ||
masak | lucasb: let's find all of them :) | 15:09 | |
15:09
azawawi left
|
|||
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:11 | |
Skarsnik | wtf is this type: long long unsigned int | 15:12 | |
nine | stmuk_: ^^^ | ||
RabidGravy | Skarsnik I saw one of those the other day | ||
Skarsnik | it's in sqlite3 | ||
stmuk_ | nine: ok | ||
Skarsnik | size is 64 bits x) | 15:13 | |
RabidGravy | that's not where I saw it, but it's a uint64 | ||
the weather here is hideous | |||
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. | ||
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 | ||
\o/ | |||
RabidGravy | It's not particularly cold, it's just the rain hasn't stopped all day | ||
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 | ||
masak | I'm also not ruling out that the bit shifting could be simplified through some clever trick I haven't thought of | ||
Gray encoding, perhaps | |||
Skarsnik | RabidGravy, hm are these standard or plateform dependant type? | 15:16 | |
RabidGravy | I think a testing on an x86-64 and an ARM and they were both the same | 15:17 | |
15:17
sprocket joined
|
|||
RabidGravy | but that's not precluding some other architecture doing something else | 15:17 | |
Skarsnik | I should probably do something special with typedef that point to this type of type x) | ||
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! ;) | ||
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... | ||
RabidGravy | I'm struggling to remember where I saw that type now | 15:20 | |
Skarsnik | has num64 $.estimatedCost; | 15:25 | |
has sqlite_int64 $.estimatedRows; | |||
It's probably better like this | |||
orbus | I just tried it on gcc on x86_32 and it's 64 bits as well | 15:26 | |
15:27
sprocket left
|
|||
masak whips out TAoCP 4A to help speed this up | 15:27 | ||
orbus | and this is in stdint.h | 15:29 | |
typedef unsigned long long int uint64_t; | |||
Skarsnik | x) | 15:30 | |
orbus | well, actually that's defined if __WORDSIZE==64 | ||
is NOT rather | 15:31 | ||
if it is it's 64 it's typedef unsigned long int uint64_t; | |||
so yeah, probably better to use the header types to be on the safe side | 15:32 | ||
stmuk_ | it took far too long for me to spot the issue with github.com/tony-o/perl6-html-parse.../META.info | 15:34 | |
15:34
nige1 joined
|
|||
stmuk_ | I wonder if panda should warn if the "name" doesn't match "provides" - could also be a security issue | 15:34 | |
RabidGravy | stmuk_, that would break e.g. Task::Star or something that only distributed a script | 15:36 | |
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 | ||
RabidGravy | yes, I'm just thinking it through | ||
stmuk_ | I'm not sure warning would actually break anything | 15:38 | |
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
|
|||
Skarsnik | App::foo will probably not provide a App::foo.something | 15:40 | |
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. | ||
stmuk_ | Task::Star has an empty provides anyway | 15:42 | |
RabidGravy | interesting catch there stmuk_ | ||
15:42
spider-mario left
|
|||
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 | ||
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) | ||
RabidGravy | but a) that doesn't stop me putting another entry in the provides that does something bad | ||
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:44 | ||
15:45
raiph joined
|
|||
stmuk_ | I think the provides was probably ignored before precomp | 15:46 | |
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:: | ||
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 | ||
Skarsnik | test::meta should provide an small app to not have to write code x) | ||
RabidGravy | nah, but I'll accept a PR against META6 for a generator script :) | 15:49 | |
it should display what it is installing yes | |||
15:49
n0tjack joined
|
|||
Skarsnik | ==> Testing Test::META | 15:50 | |
===SORRY!=== | |||
Could not find META6:ver<0.0.4..*> in: | |||
damn | |||
I should probably update panda x) | |||
15:50
zakharyas joined
|
|||
RabidGravy | yeah, you need to do a panda update and then probably force install META6 | 15:51 | |
"META6:ver<0.0.4>" doesn't work in requires at the moment | |||
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:53 | ||
but I've done playing with that stuff for the day | 15:54 | ||
15:57
sprocket joined,
patrickz joined
|
|||
nine | RabidGravy: yes it does and it's causing problems | 15:58 | |
15:58
Actualeyes left
15:59
psy_ left
|
|||
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 | |
or something like that | |||
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 | ||
so yeah, panda should use the meta info from the distribution and not it's own | 16:03 | ||
there's a slight catch if anyone wanted to use tagged releases and was updating the META.list but hey | 16:04 | ||
16:04
xpen left
16:06
Zoffix joined
|
|||
RabidGravy | it's probably just do whatever it "panda install ." does after it has retrieved the distribution | 16:07 | |
stmuk_ | I was always suspicious panda still said "Fetching" in that case | 16:08 | |
RabidGravy | yeah | ||
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 | ||
Zoffix | RabidGravy++ | ||
sprocket | morning, p6! | ||
Zoffix | RabidGravy, why manually? | ||
16:09
xyf left
|
|||
RabidGravy | can't specify required version in the META.info currently | 16:09 | |
Zoffix | :/ | 16:10 | |
stmuk_ | arggg of course displaying what panda installs just displays SHA1 hashes :) | ||
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 | ||
sjn | .u U+1F98B | ||
yoleaux | No characters found | ||
RabidGravy | so yes, panda doesn't support that yet | ||
Zoffix | k | ||
16:12
Actualeyes joined,
_mg_ joined
|
|||
sjn | babelstone.blogspot.de/2016/01/what...de-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
|
|||
RabidGravy | all good | 16:13 | |
stmuk_ | sure its the source for the moarvm | ||
16:14
khw joined
16:16
mscha joined
|
|||
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? | ||
camelia | rakudo-moar b5cb00: OUTPUT«Instant:36.912049» | ||
arnsholt | Running MoarVM/NQP/Rakudo HEAD | ||
n0tjack | *pops head in* Congrats to everyone on the official release! | ||
Zoffix | Thanks | ||
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 | ||
mscha | Zoffix, 26 leap seconds sinds introduction in 1972 | 16:19 | |
stmuk_ | eg. ==> Installing HTML::Parser::XML | ||
nstalling HTTP::Parser::XML in block at /home/steve/sandbox/rakudo/install/share/perl6/site/sources/A8B5E32BE26CA290354B6CBDBED92C1486082961 line 62 | |||
Zoffix pats self on back for correct guess | |||
Zoffix unpats self on the back for incorrectly reading 36 as 26 | 16:20 | ||
16:21
hankache joined
|
|||
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 | ||
RabidGravy | Atomic Time! | 16:22 | |
moritz | but why the .91? | ||
looks too big to be a numeric error | |||
is one of them rounded to the nearest integer, maybe? | |||
flussence | .posix is truncated to int, instant isn't | ||
moritz | m: given DatTime.now { say .Instant - .posix } | 16:23 | |
camelia | rakudo-moar b5cb00: OUTPUT«5===SORRY!5=== Error while compiling /tmp/jfncwvQkgcUndeclared name: DatTime used at line 1. Did you mean 'DateTime'?» | ||
moritz | m: given DateTime.now { say .Instant - .posix } | ||
camelia | rakudo-moar b5cb00: OUTPUT«Instant:36.985177» | ||
flussence | Instant also *isn't* a Numeric, which is why the .gist looks like that | ||
mscha | m: given DateTime.now { say [ .Instant, .posix, .Instant - .posix ] } | 16:24 | |
camelia | rakudo-moar b5cb00: OUTPUT«[Instant:1451838293.682377 1451838257 Instant:36.682377]» | ||
hankache | hello #perl6 | ||
n0tjack | m: say DateTime.now.Instant.gist; | ||
camelia | rakudo-moar b5cb00: OUTPUT«Instant:1451838309.442177» | ||
moritz | ok, .posix is the integer | ||
n0tjack | looks numeric to me | ||
flussence | m: say DateTime.now.Instant.^mro | 16:25 | |
camelia | rakudo-moar b5cb00: OUTPUT«((Instant) (Cool) (Any) (Mu))» | ||
n0tjack | Cool is numeric-ish | ||
moritz | m: say DateTime.^roles | ||
camelia | rakudo-moar b5cb00: OUTPUT«((Dateish))» | ||
flussence | m: say DateTime.now.Instant.^roles | 16:27 | |
camelia | rakudo-moar b5cb00: OUTPUT«((Real) (Numeric))» | ||
flussence | oh, there it is | ||
16:27
Zoffix left
|
|||
stmuk_ | WARNING: installing HTTP::Parser::XML for HTML::Parser::XML | 16:33 | |
jdv79 | when did this meta6 version thing become a thing? | ||
flussence wishes git-push had an --allrmeotes switch | |||
s/rme/rem | |||
moritz | flussence: there's a possiblity to configure branches to be pushed to several remotes at once; might that help you? | 16:34 | |
flussence: 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 :) | ||
RabidGravy | jdv79, some time in the last week. | ||
16:35
_mg_ left
|
|||
lucasb | "HTTP::Parser::XML" : "lib/HTML/Parser/XML.pm6" # <-- HTML::Parser::XML's META.info 'provides' section | 16:36 | |
hankache | nine++ #panda fixes | ||
stmuk_ | lucasb: I submitted a PR | ||
16:36
_Vi left
|
|||
arnsholt | nine: Have you come across the "An exception occured while evaluating a constant" error during precomp? | 16:36 | |
lucasb | stmuk_: ah, ok. I just saw the PR, stmuk_++ | 16:37 | |
RabidGravy | stmuk_, just wondering how to test that in Test::META | 16:38 | |
stmuk_ | you could try and fuzzy match the RHS and LHS of the provides I guess | 16:39 | |
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 | ||
stmuk_ | yes that sounds better | ||
16:42
pmurias left,
BenGoldberg joined
|
|||
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:42 | |
RabidGravy adds it to the wishlist for Test::META | 16:44 | ||
dalek | osystem: 642c08b | (Sylvain Colinet)++ | META.list: Add App::GPTrixie, a NC code generator from C header github.com/Skarsnik/gptrixie |
16:45 | |
stmuk_ | installing IETF::RFC_Grammar for URI | ||
Skarsnik | Nooo | ||
it was not my fork >< | |||
stmuk_ | that looks a valid case | ||
Skarsnik | I should display the git repo in my shell prefix x) | 16:46 | |
RabidGravy | oh well :) | 16:49 | |
stmuk_ | installing X::JSON::RPC for JSON::RPC as well | 16:50 | |
which makes sense | |||
16:52
lucasb left
16:55
Actualeyes left
17:03
nzkindest joined
|
|||
Skarsnik | hm | 17:06 | |
17:07
SwellJoe joined
|
|||
Skarsnik | What should I use to have unencoded string? | 17:07 | |
17:07
user74747 left
17:08
Actualeyes joined
17:11
llfourn left
|
|||
AlexDaniel | Skarsnik: by unencoded you mean? | 17:11 | |
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:13 | |
I am not sure if that will not be mashed as a unicode graphem | 17:14 | ||
17:14
nowan left
|
|||
stmuk_ | nine: github.com/rakudo/rakudo/pull/670 | 17:15 | |
17:16
_Vi joined
|
|||
AlexDaniel | m: say “\x035” | 17:16 | |
camelia | rakudo-moar b5cb00: OUTPUT«5» | ||
AlexDaniel | m: say “\x035”.chars | ||
camelia | rakudo-moar b5cb00: OUTPUT«1» | ||
17:16
nowan joined
|
|||
AlexDaniel | m: say (“\x03” ~ “99,25”).chars | 17:17 | |
camelia | rakudo-moar b5cb00: OUTPUT«6» | ||
AlexDaniel | Skarsnik: it seems like it wont? | 17:18 | |
Skarsnik: also, it seems like everything that follows is just pure text, not bytes | 17:19 | ||
Skarsnik | m: say "\00302,05\0021" | 17:20 | |
camelia | rakudo-moar b5cb00: OUTPUT«␀0302,05␀021» | ||
Skarsnik | m: say "\x0302,05\x021" | 17:21 | |
camelia | rakudo-moar b5cb00: OUTPUT«̂,05!» | ||
Skarsnik | m: say "\x00302,05\x0021" | ||
camelia | rakudo-moar b5cb00: OUTPUT«̂,05!» | ||
AlexDaniel | m: say “\x03” ~ ‘02,05’ ~ “\x02” ‘1’ | ||
camelia | rakudo-moar b5cb00: OUTPUT«5===SORRY!5=== Error while compiling /tmp/h0FW1o9SSZConfusedat /tmp/h0FW1o9SSZ:1------> 3say “\x03” ~ ‘02,05’ ~ “\x02”7⏏5 ‘1’ expecting any of: infix infix stopper postfix sta…» | ||
AlexDaniel | m: say “\x03” ~ ‘02,05’ ~ “\x02” ~ ‘1’ | 17:22 | |
camelia | rakudo-moar b5cb00: OUTPUT«02,051» | ||
Skarsnik | ok it work | ||
hm it should be bold | 17:23 | ||
RabidGravy | :) | ||
it'sa kind of cerise and blue thing | |||
maybe that is "bold" here | |||
17:23
hankache left
|
|||
AlexDaniel | m: say ‘x’ | 17:24 | |
camelia | rakudo-moar b5cb00: OUTPUT«x» | ||
17:24
hankache joined
|
|||
Skarsnik | m: say “\x03” ~ ‘02,05’ ~ ‘1’ | 17:24 | |
camelia | rakudo-moar b5cb00: OUTPUT«02,051» | ||
Skarsnik | m: say “\x02" ~ ‘1’ | ||
camelia | rakudo-moar b5cb00: OUTPUT«5===SORRY!5=== Error while compiling /tmp/g6qlXEnHIDUnable 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…» | ||
Skarsnik | m: say "\x02" ~ '1'; | 17:25 | |
camelia | rakudo-moar b5cb00: OUTPUT«1» | ||
Skarsnik | m: say "\x02" ~ 'é'; | ||
camelia | rakudo-moar b5cb00: OUTPUT«é» | ||
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:26 | |
I'm thinking yes and no from experimentation | 17:28 | ||
Skarsnik | x) | ||
17:29
lsm left
|
|||
Skarsnik | I think I will cp the text method of cpansearch.perl.org/src/SCOLINET/Ac...IRC/Art.pm it's a big wtf xD | 17:30 | |
17:30
deepika joined
17:32
lsm-desktop joined
|
|||
stmuk_ | 17:32 | ||
17:34
nige1 left
|
|||
Skarsnik | m: for ^2 { say $_ }; | 17:38 | |
camelia | rakudo-moar b5cb00: OUTPUT«01» | ||
17:39
takdaram joined
|
|||
RabidGravy | gosh, the i2c library is made of crack | 17:39 | |
Skarsnik | x) | 17:41 | |
use gptrixie! | |||
17:41
takdaram left
|
|||
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 github.com/autarch/perl6-Test-Stream | ||
17:44
nzkindest left
|
|||
Skarsnik | RabidGravy, oh yeah, very likely | 17:44 | |
17:45
pierre-vigier joined
|
|||
flussence adds to crontab `find ~/code/perl6 -type d -name .precomp -exec rm -r {} +`... because it just cleaned up 27MB of space | 17:46 | ||
17:46
nzkindest joined
|
|||
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)» | ||
pochi | How come $! can do .perl, but .perl doesn't show up in methods? | ||
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 | ||
hankache | what would i need to build rakudo on Windows? | 17:50 | |
moritz | pochi: see doc.perl6.org/routine/methods | ||
pochi | aha | ||
17:50
pierre-vigier left
|
|||
pochi | where in the source code does the actual assignment to $! happen upon a try { die }? | 17:53 | |
17:59
Zoffix joined
|
|||
Zoffix | Should this cry and complain? | 17:59 | |
m: my %h = :foo<bar> :ber(<boor>); say %h | |||
camelia | rakudo-moar b5cb00: OUTPUT«foo => bar» | ||
Zoffix | Just had a bug due to this and it's only by chance that I noticed the missing comma | ||
Zoffix is starting to think avoiding commas in arg calls is a bad habit to get into | 18:00 | ||
18:00
nige1 joined
|
|||
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
18:02
Ben_Goldberg joined
|
|||
Zoffix | Oh, this is fun: | 18:04 | |
m: my $e = { foo => ['bar']}; my %h = :foo($e<foo>[0]); %h<foo>.subst-mutate: /^'ba'/; say [ %h, $e ] | |||
18:04
BenGoldberg left
|
|||
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 | ||
camelia | rakudo-moar b5cb00: OUTPUT«Memory allocation failed; could not allocate 16 bytes» | ||
Zoffix | ) | ||
hankache, I can counter that argument with: more typing and more reading | |||
18:06
pierre-vigier left
18:07
llfourn joined
18:11
llfourn left
|
|||
Zoffix | Rakudobugged both of those: commaless-hash-keys: rt.perl.org/Ticket/Display.html?id=127134 and the infinite loop on .subst-mutate: rt.perl.org/Ticket/Display.html?id=127135 | 18:13 | |
The 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 | |||
hankache | Zoffix++ | ||
18:13
pi1 left
18:14
pi1 joined,
skids joined
|
|||
dalek | albot: 6492214 | (Zoffix Znet)++ | irc.perl.org.conf: Add #perl6 to the list of channels on irc.perl.org |
18:15 | |
hankache | there is now a #perl6 on irc.perl.org ?? | 18:16 | |
18:16
pierre-vigier joined
|
|||
Zoffix | Seems to be | 18:17 | |
hankache | oh! | ||
18:17
pi1 left
18:18
Zoffix left
|
|||
Skarsnik | damn zoffix gone again xD | 18:18 | |
18:19
pi1 joined,
pierre-vigier left
18:21
pi1 left,
pi4 joined
|
|||
timotimo | probably watching AGDQ now? | 18:22 | |
18:22
dwarring joined
|
|||
Skarsnik | Monkey Ball is not really my thing, but it's still fun to watch | 18:22 | |
virtualsue | hankache: that's not the official #perl6 channel in any way, shape or form. | 18:23 | |
it might become fun, however | 18:24 | ||
hankache | hiya virtualsue | ||
yeah i just read that this one is the official | 18:25 | ||
virtualsue i am in for the fun! | |||
RabidGravy | eugh, "i2c_smbus_block_process_call" takes an array of uint8 values and modifies it in place | ||
18:25
_mg_ joined
18:26
wamba joined,
SwellJoe left
|
|||
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) | ||
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» | ||
dj_goku | :D | ||
18:30
sjoshi joined
|
|||
Rotwang | is there something like 'trace' module in python? | 18:31 | |
or set -x in bash? | |||
18:32
nowan left
|
|||
Ben_Goldberg | You could probably assign (or rather, bind with := ) a Proxy object to the variable you want to debug. | 18:33 | |
18:34
Actualeyes left
18:35
nowan joined
|
|||
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 | ||
sjoshi: yup, grab it while it's hot! | |||
sjoshi | timotimo: cool, thanks! | ||
18:35
mscha left
|
|||
timotimo | if you want more details, stick around :) | 18:36 | |
flussence | m: use trace; say 1; say 2; sub foo { 3 }; say 3; # Rotwang | ||
camelia | rakudo-moar b5cb00: OUTPUT«2 (/tmp/F7TIqPhlCl line 1)say 113 (/tmp/F7TIqPhlCl line 1)say 224 (/tmp/F7TIqPhlCl line 1)sub foo { 3 }7 (/tmp/F7TIqPhlCl line 1)say 33» | ||
timotimo | though i'm too distracted to give a speech | ||
18:37
Actualeyes joined
|
|||
Rotwang | flussence: cool! T.Hanks | 18:40 | |
Ben_Goldberg | Another way to debug your entire script, is to install this: github.com/jnthn/rakudo-debugger | ||
timotimo | i *think* the debugger currently has a problem? someone might have to look closer at that and fix it | 18:42 | |
it might be super easy, though | |||
18:48
SwellJoe joined
|
|||
sjoshi | Does perl6 has something to offer as we have like ipython? | 18:50 | |
Juerd | Not that I know of | 18:52 | |
Skarsnik | not yet? | ||
18:53
polyfloyd joined
|
|||
Juerd | polyfloyd: *wave* | 18:53 | |
polyfloyd | \o Juerd | ||
18:53
jameslenz left
18:54
nemsys joined
18:56
jameslenz joined
19:01
zakharyas left
|
|||
Rotwang | where are installed the perl6 core *.pm files when using rakudobrew? | 19:01 | |
19:01
ugexe left
19:02
firstdayonthejob left
19:03
pierre-vigier joined
|
|||
RabidGravy | Rotwang, the aren't install per-se | 19:03 | |
timotimo | sjoshi: working on it | ||
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 | ||
you will have to edit the source files and "make install" | |||
mst | Rotwang: .rakudobrew/moar-nom/install/share/perl6/dist/ | ||
19:04
Zoffix joined
|
|||
Zoffix | Hey. How do we do word boundaries in P6 regex? | 19:04 | |
timotimo | mst: not helping :) | ||
Zoffix | m: say so 'yo bot' ~~ /\b 'bot' \b/ # doesn't work | ||
camelia | rakudo-moar b5cb00: OUTPUT«False» | ||
timotimo | Zoffix: >> and << | ||
mst | timotimo: well, that tells you which file is which :) | 19:05 | |
Zoffix | m: say so 'yo bot' ~~ />> 'bot' <</ | ||
camelia | rakudo-moar b5cb00: OUTPUT«False» | ||
timotimo | mst: no, i don't think so | ||
Zoffix: other directionk :) | |||
mst: not with the core setting source files at least | |||
mst | timotimo: er, yeah | ||
Zoffix | m: say so 'yo bot' ~~ /<<'bot'>>/ | 19:06 | |
camelia | rakudo-moar b5cb00: OUTPUT«True» | ||
mst | timotimo: if I crack open the file in there, and find the name | ||
timotimo | but thanks for helping anyway :) | ||
Zoffix | timotimo++ thanks | ||
mst | moar-nom/install/share/perl6/sources/ contains the source | ||
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 | ||
sjoshi | timotimo: sounds cool :) | ||
mst | timotimo: I've found Test.pm at least :) | ||
timotimo | sjoshi: you can see the progress in github.com/timo/iperl6-kernel or something like that | ||
arnsholt has been working on it recently, i had left it alone for a few years before that, though :( | |||
RabidGravy | yeah, Test NativeCall and lib I think | 19:07 | |
Zoffix | Skarsnik, get a better browser :P | ||
Skarsnik, what are you using? | |||
Skarsnik | chrome | ||
it do the same thing on my desktop and my chromebook | 19:08 | ||
19:08
llfourn joined
|
|||
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
|
|||
Skarsnik | Yes because the page seens to always load something before displaying the right content | 19:09 | |
like a search result will display dumb content before refreshing itself to the result (when reloaded) | |||
dalek | href="https://modules.perl6.org:">modules.perl6.org: e6bf9ca | (Zoffix Znet)++ | public/js/main.js: Fix unwanted search box focus in Chrome The issue is it jumps back to search box when a BACK button is used after clicking on a search result |
19:12 | |
Zoffix | Skarsnik, ^ that probably fixes it | ||
19:12
Zoffix left
19:13
llfourn left
19:15
pierre-vigier left
|
|||
dalek | kudo/nom: 080ac18 | (Steve Mynott)++ | src/core/CompUnit/PrecompilationStore/File.pm: don't mkdir if it exists already - which it does sometimes |
19:16 | |
kudo/nom: 0639e1b | (Steve Mynott)++ | src/core/CompUnit/Repository/Installation.pm: 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 |
|||
kudo/nom: 4bb47d5 | lizmat++ | src/core/CompUnit/ (2 files): Merge pull request #670 from stmuk/nom Extra logging and check before creating an existing dir |
|||
19:16
lucasb joined
19:21
Ben_Goldberg is now known as BenGoldberg
19:26
fdsfdsfds joined
19:27
fdsfdsfds left,
dsfdsfds joined
|
|||
dsfdsfds | In one of the files I have this: | 19:28 | |
use MyLib::Namespace1::MyClass; | |||
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". | |||
**for some reason, otherwise the error is thrown | 19:29 | ||
Skarsnik | class MyClass is export | ||
dsfdsfds | where? | ||
Rotwang | is trick | ||
m: use NativeCall; sub gettimeofday() is native("linux-vdso.so.1") { ... }; await (start { gettimeofday } xx 20) | |||
Skarsnik | in your class definition | ||
camelia | rakudo-moar b5cb00: OUTPUT«Memory allocation failed; could not allocate 4194304 bytes» | ||
19:29
ugexe joined
|
|||
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…» | ||
dsfdsfds | thanks | 19:30 | |
Skarsnik | * not ... | ||
I am not sure ... work? | |||
19:30
dsfdsfds left
|
|||
Skarsnik | seems like it work | 19:30 | |
lizmat | m: say "Happy {[+] ^64}" | ||
camelia | rakudo-moar b5cb00: OUTPUT«Happy 2016» | ||
hankache | lizmagic!! | ||
19:31
nige1 left
|
|||
lizmat | .oO( courtesy of Perl 6 FaceBook group ) |
19:31 | |
BenGoldberg | m: use NativeCall; sub gettimeofday() is native("linux-vdso.so.1") { ... }; say gettimeofday; | 19:32 | |
camelia | rakudo-moar 4bb47d: OUTPUT«(Mu)» | ||
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; | ||
camelia | rakudo-moar 4bb47d: OUTPUT«(Mu)» | ||
Skarsnik | why Mu | ||
moritz | because you didn't declare a return type | ||
Skarsnik | m: use NativeCall; sub gettimeofday() is native("linux-vdso.so.1") returns num64 { * }; say gettimeofday; | 19:34 | |
camelia | rakudo-moar 4bb47d: OUTPUT«0» | ||
BenGoldberg | m: use NativeCall; sub int gettimeofday(int, int) is native("linux-vdso.so.1") { ... }; say gettimeofday(0, 0); | ||
camelia | rakudo-moar 4bb47d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xr2RbVaay2Did 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…» | ||
BenGoldberg | m: use NativeCall; my int sub gettimeofday(int, int) is native("linux-vdso.so.1") { ... }; say gettimeofday(0, 0); | ||
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(…» | ||
BenGoldberg | m: use NativeCall; my int sub gettimeofday(int32, int32) is native("linux-vdso.so.1") { ... }; say gettimeofday(0, 0); | ||
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…» | ||
BenGoldberg | m: use NativeCall; my int32 sub gettimeofday(int32, int32) is native("linux-vdso.so.1") { ... }; say gettimeofday(0, 0); | ||
camelia | rakudo-moar 4bb47d: OUTPUT«0» | ||
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)» | ||
BenGoldberg | m: use NativeCall; my int32 sub gettimeofday(int32, int32) is native("linux-vdso.so.1") { ... }; await (start { gettimeofday(0, 0) } xx 20 ); | ||
camelia | rakudo-moar 4bb47d: OUTPUT«(signal SEGV)» | ||
RabidGravy | m: m: use NativeCall; sub gettimeofday(int32, int32) returms int32 is native("linux-vdso.so.1") { ... }; say gettimeofday(0, 0) | ||
camelia | rakudo-moar 4bb47d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tvlbtS02I3Missing blockat /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» | ||
moritz | m: m: use NativeCall; sub gettimeofday(int32, int32) returns int32 is native(Str) { * }; say gettimeofday(0, 0); | ||
camelia | rakudo-moar 4bb47d: OUTPUT«0» | ||
BenGoldberg | m: use NativeCall; my int32 sub gettimeofday(int32, int32) is native("linux-vdso.so.1") { ... }; await (start { gettimeofday(0, 0) } xx 1 ); | ||
camelia | ( no output ) | ||
BenGoldberg | m: use NativeCall; my int32 sub gettimeofday(int32, int32) is native("linux-vdso.so.1") { ... }; say await (start { gettimeofday(0, 0) } xx 1 ); | ||
camelia | rakudo-moar 4bb47d: OUTPUT«(0)» | ||
BenGoldberg | m: use NativeCall; my int32 sub gettimeofday(int32, int32) is native("linux-vdso.so.1") { ... }; say await (start { gettimeofday(0, 0) } xx 2 ); | ||
camelia | rakudo-moar 4bb47d: OUTPUT«(0 0)» | ||
BenGoldberg | m: use NativeCall; my int32 sub gettimeofday(int32, int32) is native("linux-vdso.so.1") { ... }; say await (start { gettimeofday(0, 0) } xx 5 ); | ||
camelia | rakudo-moar 4bb47d: OUTPUT«(0 0 0 0 0)» | ||
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)» | ||
BenGoldberg | m: use NativeCall; my int32 sub gettimeofday(int32, int32) is native("linux-vdso.so.1") { ... }; say await (start { gettimeofday(0, 0) } xx 20 ); | ||
camelia | rakudo-moar 4bb47d: OUTPUT«Memory allocation failed; could not allocate 21496 bytes» | ||
RabidGravy | m: m: use NativeCall; sub gettimeofday(int32, int32) returns int32 is native("linux-vdso.so.1") { ... }; say gettimeofday(0, 0) | ||
camelia | rakudo-moar 4bb47d: OUTPUT«0» | ||
Skarsnik | maybe it's not a thread safe function? | ||
Rotwang | Skarsnik: had the same issue with getuid ;f | ||
19:36
user74747 left
|
|||
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
|
|||
Skarsnik | pubs.opengroup.org/onlinepubs/00969...g_02_09_01 | 19:38 | |
19:38
user74747 joined
|
|||
Rotwang | Skarsnik: gettimeofaday is more of a syscall and not library function | 19:38 | |
19:39
user74747 left
|
|||
Skarsnik | I don't know if the NC devs are still around x) | 19:39 | |
19:39
user74747 joined,
nige1 joined
19:40
user74747 left
|
|||
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«0timeval.new(tv_sec => 1451850032, tv_usec => 0)» | ||
19:40
user74747 joined
|
|||
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«0timeval.new(tv_sec => 1451850071, tv_usec => 0)Instant:1451850107.633534» | ||
19:41
kjk joined
|
|||
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/kJislfNkUoNo appropriate parametric role variant available for 'NativeCall::Native'at /tmp/kJislfNkUo:1» | ||
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«0timeval.new(tv_sec => 1451850123, tv_usec => 0)Instant:1451850159.826216» | ||
BenGoldberg wonders why tv_usec isn't getting filled in. | |||
Rotwang | moritz: I don't see any info that NativeCall subroutines can't be used in a promise/supply | 19:43 | |
besides that would be a major drawback | 19:44 | ||
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
|
|||
mempko_ | FYI, I published an alpha release of my Kafka client library github.com/mempko/PKafka | 19:46 | |
Happy to contribute a little to the perl6 community | |||
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 ); | ||
camelia | rakudo-moar 4bb47d: OUTPUT«((0 timeval.new(tv_sec => 1451850382, tv_usec => 0)))» | ||
Rotwang | RabidGravy: but shouldn't those subroutines have their own address space? | ||
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 ); | ||
camelia | rakudo-moar 4bb47d: OUTPUT«(1451850408 1451850408 1451850408 1451850408 1451850408 1451850408 1451850408 1451850408 1451850408 1451850408)» | ||
RabidGravy | mempko_, welcome aboard | ||
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 ); | ||
camelia | rakudo-moar 4bb47d: OUTPUT«Memory allocation failed; could not allocate 4194304 bytes» | ||
Rotwang | I know that from the moarvm perspective those are threads | ||
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 | ||
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
|
|||
Skarsnik | bbkr, there is really no libc.x.dylib? | 19:49 | |
19:49
ChoHag left
|
|||
bbkr | /usr/lib/libc.dylib -> libSystem.dylib | 19:49 | |
no version alias | |||
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? | ||
BenGoldberg | bbrk, what happens if you change "is native ('libc')" (or whatever) to "is native" ? | 19:51 | |
RabidGravy | (i.e. it should be loaded) | ||
bbkr | Skarsnik: and there is alias - /usr/lib/libSystem.dylib -> libSystem.B.dylib, but "B" is not valid version identifier | ||
RabidGravy | ah but you mean cglobal | ||
bbkr | trying... | ||
yes, I use it in cglobal | |||
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 [email@hidden.address] ? | ||
Skarsnik | Str should work too | ||
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); | ||
camelia | rakudo-moar 4bb47d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ioZmyfsF1RUndeclared routine: guess_library_name used at line 1» | ||
Skarsnik | m: use NativeCall :TEST; say guess_library_name(Str); | 19:53 | |
camelia | rakudo-moar 4bb47d: OUTPUT«» | ||
Skarsnik | you can probably pass Str to cglobal too | ||
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 | ||
RabidGravy | yeah | ||
19:54
regreg joined
|
|||
RabidGravy | m: say vB | 19:54 | |
camelia | rakudo-moar 4bb47d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/brcRxaKBv2Undeclared routine: vB used at line 1» | ||
Skarsnik | err | ||
RabidGravy | m: say Version.new("B") | ||
camelia | rakudo-moar 4bb47d: OUTPUT«vB» | ||
Skarsnik | Oh right it's... ambiquious | ||
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) | ||
since the libc is already loaded x) | |||
bbkr | that worked, but returns different value 2 than cglobal("c", "errno", int) which returns 10 | 19:58 | |
timotimo | isn't "int" unsafe here? | ||
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 | ||
flussence | it's defined as "int" in the errno.h file, so that's what you gotta use... | ||
Skarsnik | no, it should be int32 | ||
timotimo | bah, opengl on osx | ||
i've heard terrible things | 20:00 | ||
20:00
Zoffix joined
|
|||
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)» | ||
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 :) | ||
RabidGravy | Zoffix, yes | 20:02 | |
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 | ||
Zoffix | We probably should do the same :D | ||
Skarsnik | duh why libsqlite3.so | 20:03 | |
Zoffix | Why? is it wrong? | ||
Skarsnik | it should be libsqlite3.so.1 | ||
or .3 | |||
flussence | it's /usr/lib64/libsqlite3.so.0.8.6 on my system... | ||
Skarsnik | Well why the version number is missing | ||
20:03
ugexe left
|
|||
stmuk_ | doc.perl6.org/language/faq#Nativeca...oo.so.1.2! | 20:04 | |
Zoffix | Skarsnik, it probably just the error message. Works fine if I install the lib | ||
Skarsnik | Zoffix, did you set PERL6SQLITE or something? | ||
Zoffix | nope | 20:05 | |
Skarsnik | Are you using an old DBIish x) | ||
Zoffix | Perhaps | ||
How to find out what version I have? | |||
Skarsnik | constant LIB = %*ENV<DBIISH_SQLITE_LIB> || ('sqlite3', 0); | 20:06 | |
I should have bumped the version maybe | |||
20:07
llfourn joined
|
|||
Zoffix | Ala Perl 5's perl -MFoo -E 'say Foo->VERSION' | 20:07 | |
20:07
_nadim left
20:08
_nadim joined
|
|||
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:08 | |
Skarsnik | I am not sure how version work x) | 20:09 | |
20:09
tipdbmp left
|
|||
Skarsnik | I mean for panda/modules | 20:10 | |
20:10
tipdbmp joined
|
|||
Skarsnik | especially since DBIish has version everywhere | 20:10 | |
20:10
kjk_ joined
20:11
Tonik left,
llfourn left
|
|||
Zoffix notes the conversation above | 20:12 | ||
Is SQLite stuff with DBIish "thread safe"? | 20:13 | ||
autarch | hmm, how to check if all members of a junction are defined? | ||
m: all( Int, 42 ).defined; all( Int, 42 ) ~~ .defined; | |||
camelia | ( no output ) | ||
autarch | m: say all( Int, 42 ).defined; say all( Int, 42 ) ~~ .defined; | ||
camelia | rakudo-moar 4bb47d: OUTPUT«TrueTrue» | ||
Skarsnik | stmuk, this faq entry should be fixed x) | ||
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
darutoko left
|
|||
Rotwang | btw. does perl6 have GIL? | 20:15 | |
gfldex | Rotwang: no | ||
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 | |
20:16
sjoshi left,
vendethiel joined
|
|||
Skarsnik | I need to use := to write ($a, $b) = foo() ? | 20:19 | |
kjk | lucasb: thanks! Didn't know you can do that. | ||
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. | ||
RabidGravy | Skarsnik, or ($a, $b) = foo().list | ||
Zoffix | m: my ($x, $y ) = 42, 42; say so $x&$y .defined # autarch | 20:20 | |
camelia | rakudo-moar 4bb47d: OUTPUT«True» | ||
Zoffix | m: my ($x, $y ) = 42; say so $x&$y .defined # autarch | ||
camelia | rakudo-moar 4bb47d: OUTPUT«False» | ||
autarch | Rotwang: my understanding is that threading is pretty core to how Perl 6 works (or is defined to work) | ||
Zoffix | Not sure why all() doesn't work | ||
20:20
domidumont left
|
|||
Zoffix | And I may be wrong too. | 20:20 | |
m: my ($x, $y ) = 42, 0; say so $x&$y .defined | |||
camelia | rakudo-moar 4bb47d: OUTPUT«True» | ||
Skarsnik | my anwser for sqlite thread : Patch are welcome | 20:21 | |
20:21
kjk_ left
|
|||
autarch | Zoffix: I'm not sure that parses the way you think that parses ;) | 20:21 | |
Skarsnik | and does @_ still exist? x) | 20:28 | |
20:28
ghost_ joined,
kjk left
|
|||
Zoffix | m: my ($x, $y ) = 0, 42; say so $x&$y .defined | 20:28 | |
camelia | rakudo-moar 4bb47d: OUTPUT«False» | ||
Zoffix | autarch, ah :( | ||
Skarsnik | du I can just write *@tab now | ||
autarch | Zoffix: I'm just guessing, but I wonder if that's "$x & ($y.defined)" | ||
Zoffix | yes | ||
20:28
cdg joined
|
|||
Zoffix | Well, grep works | 20:28 | |
m: my ($x, $y ) = 42, 42; say so all($x, $y).grep: *.defined | |||
camelia | rakudo-moar 4bb47d: OUTPUT«True» | ||
Zoffix | IRC-- # waste of time | ||
s/waste of time/distraction/; | |||
20:28
Zoffix left
|
|||
Juerd | Er... | 20:28 | |
mst resists Zoffix-- # part of the problem | |||
Juerd | Please don't resist removing the k-line and apologising :) | ||
If that part message is true, that is. | |||
mst collapses giggling | |||
Rotwang | autarch: NativeCall not working in promises is pretty hughe drawback, so hopefully NativeCall people look at the perl rt | ||
mst | Zoffix++ # score! | ||
Juerd | Only now I realise that k-lines would result in quits, not parts :) | ||
In "multi method elems (::?CLASS:D:)", what is "::?"? | |||
flussence | I *think* it's a weird/only way of writing sigil-less "$?CLASS" | ||
lucasb | I think ::?CLASS is the current class you are in | ||
autarch | Rotwang: I'm sure people are reading RT | ||
lucasb | ah, I didn't know $?CLASS existed | ||
Juerd | Wow, it's fugly :) | 20:29 | |
But thanks or explaining. Am I correct in thinking '::' is a sigil and '?' is a twigil | |||
? | |||
lucasb | isn't that the "Don't repeat yourself" version of having to write (Foo:D:) in every method? | ||
flussence | :: is... not far off what it means in perl 5, ? is a twigil yes | 20:30 | |
RabidGravy | Rotwang, autarch github.com/jonathanstowe/Audio-Lib...ut.pm#L630 works fine - just need a thread safe library and/pr methods | ||
or | |||
20:31
sprocket left
|
|||
Rotwang | RabidGravy: ? | 20:31 | |
20:32
CIAvash left
|
|||
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 | ||
Rotwang | autarch: yep | ||
20:33
BenGoldberg left
|
|||
autarch | err, I responded to the wrong person | 20:33 | |
RabidGravy: rotwang seemed to find some issues just calling very simple glibc subs in promises | |||
Rotwang | RabidGravy: it doesn't pop up always, for example when I've added debug prints it dissapeared | ||
20:33
geraud joined
|
|||
Rotwang | RabidGravy: rt.perl.org/Public/Bug/Display.html?id=127138 | 20:34 | |
20:41
pierre-vigier left
|
|||
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
|
|||
timotimo | could be it's just slow to stringify a big int via libtommath | 20:42 | |
Juerd | m: my $x = ~ [*] 1..10000; say now - INIT now; | 20:43 | |
camelia | rakudo-moar 4bb47d: OUTPUT«1.46464939» | ||
Juerd | Yeah, could be :) | ||
timotimo | m: my $x = ~ [*] 1..10000; say $x.chars | ||
camelia | rakudo-moar 4bb47d: OUTPUT«35660» | ||
timotimo | m: print "1" xx 35660; | ||
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 …» | ||
timotimo | m: print "1" x 35660; | 20:44 | |
camelia | rakudo-moar 4bb47d: OUTPUT«1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111…» | ||
timotimo | ... it's kind of hard to get the timing in there, too :P | ||
RabidGravy | pubs.opengroup.org/onlinepubs/00969...g_02_09_01 - non "thead safe" libc funcs (getimeofday not one) | ||
autarch | Rotwang: looking at that list I note that getenv is _not_ thread safe | 20:47 | |
20:47
regreg left
|
|||
dalee | what is this colon doing in the push method of hashes? my %a; %a.push: (b => 1); | 20:48 | |
RabidGravy | I'm quite willing to accept that NativeCall does expose you to threading issues but I would be surprised otherwsise | 20:49 | |
lucasb | dalee: if you use the colon, you don't need to call method with parentheses | 20:50 | |
20:51
nige1 left
|
|||
dalee | lucasb thx | 20:51 | |
lucasb | m: say ({ 42 } while $++ < 3) | ||
camelia | rakudo-moar 4bb47d: OUTPUT«(-> ;; $_? is raw { #`(Block|58687808) ... } -> ;; $_? is raw { #`(Block|58687880) ... } -> ;; $_? is raw { #`(Block|58687952) ... })» | ||
lucasb | FROGGS++ removed the error, but I think the result is not right | 20:52 | |
m: say ({ 42 } if True) | |||
camelia | rakudo-moar 4bb47d: OUTPUT«42» | ||
dalek | c: 1aacfb0 | lizmat++ | doc/Language/glossary.pod: First part of S99 -> Glossary migration With thanks to all of the original authors of S99 |
||
20:53
pierre-vigier joined,
TEttinger joined
|
|||
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:54 | |
lucasb | the 'c => 2' is a named parameter, which is silently discarded :( | 20:55 | |
masak | m: repeat while my $x == 0 { $x = get().chars } | ||
camelia | rakudo-moar 4bb47d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Qxy2Ko45LEPreceding context expects a term, but found infix = insteadat /tmp/Qxy2Ko45LE:1------> 3repeat while my $x ==7⏏5 0 { $x = get().chars }» | ||
lucasb | you would have to right %a.push((c => 2)) or %a.push('c' => 2) | ||
masak | TimToady: was surprised that ^^ gave that error message today | 20:56 | |
I mean, I can see how it happens, I just think it shouldn't :) | |||
lucasb | *to write | ||
20:56
pierre-vigier left,
pierre-vigier joined
20:57
deepika left
|
|||
autarch | masak: I thought that'd written as ... | 20:58 | |
m: while get().chars -> $x { } | |||
camelia | ( no output ) | ||
autarch | or something like that | ||
masak | autarch: `repeat while` evaluates condition after the loop; `while` before | 20:59 | |
so they're different | |||
autarch | m: repeat while get().chars -> $x { } | ||
camelia | ( no output ) | ||
FROGGS | masak: the fix to 'my $x == 0' might be very simple... | ||
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 | |
21:00
_mg_ left
|
|||
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 1True» | ||
lucasb | m: say my $ == 42 | ||
camelia | rakudo-moar 4bb47d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/KtyB5nmtExPreceding context expects a term, but found infix = insteadat /tmp/KtyB5nmtEx:1------> 3say my $ ==7⏏5 42» | ||
masak | autarch: then I guess we just have to disagree on that ;) | ||
autarch | heh | ||
masak | autarch: it makes perfect sense to me, at least if it's an "item context" `my` | ||
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
|
|||
lizmat | doc.perl6.org/language/glossary#Col...Colon_List # dalee | 21:05 | |
doc.perl6.org/language/glossary#Adverb # also dalee | |||
21:06
mempko_ left
|
|||
dalee | lizmat thank you | 21:06 | |
awwaiid | lizmat: I think dalee is looking for the : in @foo.map: ... | ||
lizmat | ah, that one | ||
awwaiid | oh wait, maybe dalee is looking for all the colons | ||
lucasb | yeah, colon is overloaded in P6 for lots of uses :) | ||
:foo <-- adverb notation for pairs | 21:07 | ||
awwaiid | the one in map:, I can't find a good spot for it. doc.perl6.org/language/syntax#Subroutine_calls should mention it at least but doesn't | ||
lucasb | obj.meth: 1,2,3 <-- precedence drop | ||
foo(obj: 1,2,3) <-- invocant marker | |||
awwaiid | what's an invocant marker? | ||
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) | ||
awwaiid | oh, is that like meth(obj: 1,2,3) | ||
ahh | |||
21:08
llfourn joined
|
|||
vendethiel | but not the same as meth (obj): 1,2,3 | 21:08 | |
awwaiid | that's a new one! | ||
(for me) | |||
lizmat | dalee: that would be the invocant marker | 21:09 | |
21:09
SwellJoe left
|
|||
dalee | ah design.perl6.org/S03.html#Invocant_marker | 21:09 | |
lizmat | yeah, that didn't make it to the glossary or other docs yet, it seems | 21:10 | |
working on that | |||
nine | ugexe: you here? | 21:11 | |
awwaiid | I'm adding it to the list of invocation methods in syntax (without elaboration) | ||
ugexe | nine: yea | ||
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
llfourn left,
RUR joined
|
|||
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» | ||
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. | ||
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 | ||
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? | ||
dalek | c: a55ebdd | (Brock Wilcox)++ | doc/Language/syntax.pod: Add some examples of method invocation |
21:16 | |
Ulti | m: my num64 @matrix[10;10]; say @matrix[1]; | ||
camelia | rakudo-moar 4bb47d: OUTPUT«Partially dimensioned views of arrays not yet implemented. Sorry.  in block <unit> at /tmp/IKoE9xn69p line 1» | ||
Ulti | m: my num64 @matrix[10;10]; say @matrix[1;*]; | ||
camelia | rakudo-moar 4bb47d: OUTPUT«Partially dimensioned views of arrays not yet implemented. Sorry.  in block <unit> at /tmp/TC5FCGk3aL line 1» | ||
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» | ||
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 | ||
Ulti | blogs.perl.org/users/pierre_vigier/...perl6.html | ||
21:18
hankache left
|
|||
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 | ||
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 :) | ||
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 | |
compunit::repository rather | |||
21:20
RUR left
|
|||
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:20 | |
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:21 | ||
It's the API design that's really taking time. Because whatever we add now, we'll have to support it indefinitely. | 21:22 | ||
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 :) | ||
jdv79 | literally indefinitely? | ||
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. | ||
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? | ||
nine | Skarsnik: you can't. You do that in BUILD. | ||
moritz | you don't, because the object hasn't been created yet | ||
lucasb | nine: aww :( ok, thanks for listening :) | ||
moritz | doc.perl6.org/language/objects#Obje...nstruction | ||
21:25
pierre-v_ joined
|
|||
jdv79 | wonder how much can be deprecated in future lang versions | 21:25 | |
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 | ||
jdv79 | where forever may be just til a few versions forward? | 21:27 | |
otherwise spaghetti code:( | 21:28 | ||
21:28
pierre-vigier left
|
|||
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. | ||
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 | ||
mst | eh. we were always going to hate the first attempt after getting it some real world use | ||
all of this has happened before; all of this will happen again | |||
21:29
Zoffix joined
|
|||
moritz | Skarsnik: only accepting named parameters is great for composabity | 21:29 | |
Zoffix | I'm having trouble with this: | ||
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
kaare_ left
|
|||
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 | ||
lucasb | xx, not x :) | ||
moritz | Zoffix: use xx | ||
Zoffix: x is string repetition, xx is list repetition | |||
Zoffix: and no need for the akward trailing comma :-) | |||
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(?,?,?)» | ||
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. | ||
moritz | m: my @z = <foo bar baz>; say "DELETE FROM factoids WHERE id IN({join ',', @z.map({'?'})})" | ||
camelia | rakudo-moar 4bb47d: OUTPUT«DELETE FROM factoids WHERE id IN(?,?,?)» | ||
Zoffix | Thanks. Out of the gazillion ways I've tried, I guess one escaped :) | ||
nine | ugexe: I would have loved to be part of those discussions :/ | ||
Skarsnik | moritz, I need to add an ugly attribute just for that? | ||
moritz | Skarsnik: no | ||
Skarsnik: you can have non-attribute named params in BUILD | 21:32 | ||
21:32
lucasb left
|
|||
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» | ||
moritz | m: class A { has $.len; submethod BUILD(:$x, :$y) { $!len = $x + $y } }; say A.new(:x(5), :y(8)).len | ||
camelia | rakudo-moar 4bb47d: OUTPUT«13» | ||
21:32
pdcawley left
|
|||
dalek | kudo/nom: 2aee270 | (Stefan Seifert)++ | src/core/CompUnit/PrecompilationRepository.pm: Fix confusing debug information |
21:32 | |
Skarsnik | Oooh self.bless call build | 21:34 | |
RabidGravy | yeah, I think it calls CREATE which calls BUILDALL which calls BUILD or something like that | 21:35 | |
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:36 | |
RabidGravy | :) | 21:37 | |
Skarsnik | m: use Test; say Test::EXPORT::DEFAULT::.keys; | ||
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…» | ||
hoelzro | o/ #perl6 | 21:39 | |
Skarsnik | hm should is_approx be removed? (DEPRECATED maybe? | ||
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 | ||
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? | ||
Zoffix | How can I have this named param optional? | ||
m: sub foo (:$x where Dateish|Instant) {}; foo | |||
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» | ||
Skarsnik | Oh | 21:41 | |
it get False | |||
m: sub foo (:?$x where Dateish|Instant) {}; foo | |||
camelia | rakudo-moar 4bb47d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tq6vLJiuwrMissing blockat /tmp/tq6vLJiuwr:1------> 3sub foo (:7⏏5?$x where Dateish|Instant) {}; foo» | ||
Skarsnik | m: sub foo (:$x? where Dateish|Instant) {}; foo | ||
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» | ||
dalek | kudo/nom: 3734ea8 | (Stefan Seifert)++ | src/core/CompUnit/Repository/Installation.pm: Fix file ids changing on reinstallation of a module Precompiled modules are checked against their source files on loading to detect outdated precomp files. This is done by recording the source file's id. Thus this id must be stable and survive reinstallation of a module. Otherwise the precompilation file's modification time will be compared to an outdated source file. Note that this also means that the source file's path must be stable. A patch to panda will fix those paths. |
21:42 | |
Zoffix | m: sub foo (:$x) {}; foo; # being optional is the default | ||
camelia | ( no output ) | ||
lizmat | nine++ | ||
Skarsnik | Zoffix, it just set to False I think | 21:43 | |
m: sub foo (:$x) {say $x.WHAT}; foo | |||
camelia | rakudo-moar 4bb47d: OUTPUT«(Any)» | ||
Skarsnik | or not | ||
nine | This was one tough nut to crack. Especially as the full fix is three changes to rakudo and panda. | ||
Skarsnik | Zoffix, look like a bug to me | 21:44 | |
Zoffix | great | 21:45 | |
m: sub foo (:$x where Any|Dateish|Instant) {}; foo; | |||
camelia | ( no output ) | ||
RabidGravy | doesn't to me | ||
Zoffix | RabidGravy, why? | ||
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 | |
? | |||
nine | lizmat: bootstrap doesn't loose modules | ||
lizmat | ahhhh | ||
Skarsnik | m: sub foo (:$x where Mu|Dateish|Instant) {}; foo; | ||
camelia | ( no output ) | ||
lizmat | cool, nine++ | ||
nine | boostrap.pl just installs panda | ||
RabidGravy | because it's always going to be an Any when it's not supplied | ||
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 | ||
m: sub foo (:$x where Any|Dateish|Instant) {}; my $x; foo :x($x) | |||
camelia | ( no output ) | ||
21:47
hoelzro left
|
|||
Skarsnik | m: sub foo (:$x where Mu|Dateish|Instant) {say "foo"}; foo; foo(now); foo("Str"); | 21:47 | |
camelia | rakudo-moar 4bb47d: OUTPUT«fooToo 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» | ||
Zoffix | ^ that should cry that $x is invalid | ||
21:47
hoelzro joined
|
|||
Zoffix | Well, I mean in real code | 21:47 | |
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«foofoofoo» | ||
Skarsnik | that not good x) | ||
nine | Oh it seems like the second fix to rakudo is not even needed. | ||
RabidGravy | m: subset Foo of Mu where Dateish|Instant; sub foo(Foo :$m) {}; foo; | ||
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» | ||
dalek | kudo/nom: 7d4cdbc | lizmat++ | src/core/ (2 files): Fix for RT #127135 |
||
RabidGravy | m: subset Foo of Mu where * ~~ Dateish|Instant; sub foo(Foo :$m) {}; foo; | ||
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» | ||
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/jHz2TqlkW7Malformed parameterat /tmp/jHz2TqlkW7:1------> 3sub foo (:$x where $x.defined7⏏5 and Dateish|Instant) {say "foo"}; foo;  expecting any of: constraint infix …» | ||
Zoffix | needs curlies | ||
m: sub foo (:$x where {not($_) or ($_ and Dateish|Instant)}) {}; foo :x(now) | |||
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 :) | ||
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
|
|||
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) | ||
Zoffix | :o | ||
Skarsnik, agreed | |||
Zoffix rakudobugs it | |||
nine | hoelzro: it's really just that I write dependency ids to STDOUT and read them back in in the calling process | 21:51 | |
21:51
brrt joined
|
|||
brrt | hi #perl6 | 21:54 | |
Zoffix | \o | 21:55 | |
21:56
yurivish_ joined
|
|||
Zoffix | Done: rt.perl.org/Ticket/Display.html?id=127142 | 21:57 | |
Skarsnik | m: say " "x5; | 21:58 | |
camelia | rakudo-moar 3734ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/6esDgbkTOMTwo terms in a rowat /tmp/6esDgbkTOM:1------> 3say " "7⏏5x5; expecting any of: infix infix stopper postfix statement end statemen…» | ||
Skarsnik | m: say " "x 5; | ||
camelia | rakudo-moar 3734ea: OUTPUT« » | ||
Zoffix | m: say (" "x5) | ||
camelia | rakudo-moar 3734ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7_Dx18gB6PTwo terms in a rowat /tmp/7_Dx18gB6P:1------> 3say (" "7⏏5x5) expecting any of: infix infix stopper statement end statement modifier …» | ||
RabidGravy | m: subset Foo of Mu where { !$_.defined ||$_ ~~ Dateish|Instant }; sub foo(Foo :$m) {}; foo | 21:59 | |
camelia | ( no output ) | ||
Skarsnik | How the hell perl5 accept that, it's so ambiquois x) | ||
RabidGravy | perl5 is "special" | 22:00 | |
Zoffix | Skarsnik, what's the ambiguity? | ||
m: subset Foo of Mu where { !$_.defined ||$_ ~~ Dateish|Instant }; sub foo(Foo :$m) {}; foo :m(now) | |||
Skarsnik | x5 look like a sub name | ||
camelia | ( no output ) | ||
Zoffix | Skarsnik, but it's in an invalid place | ||
dalek | c: 183d8fb | (Dale Evans)++ | doc/Type/Hash.pod: clarifying push usage 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 | |
c: 25bdb05 | moritz++ | doc/Type/Hash.pod: Merge pull request #313 from daleevans/patch-1 clarifying push usage |
|||
c: b874994 | moritz++ | doc/Type/Hash.pod: Explain why hash keys need to be quoted |
22:03 | ||
c: eafa0de | LLFourn++ | htmlify.p6: preparing for removal of extra "" Putting some redundant when statements to catch the new .contents format when that happens |
22:04 | ||
c: f6ac8ca | moritz++ | htmlify.p6: Merge pull request #261 from LLFourn/master preparing for removal of extra "" |
|||
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» | ||
Skarsnik | is there something replace \002 from p5 that allow to write a number just after in a string? | 22:07 | |
Zoffix | What's \002? | 22:08 | |
22:08
_nadim left
|
|||
flussence | \x[2]? | 22:08 | |
Skarsnik | The ascii number 2 | ||
22:08
_nadim joined
|
|||
Skarsnik | or the raw | 22:09 | |
not even sure how to call that xD | |||
22:09
frankjh joined,
frankjh left
|
|||
Zoffix | \x02 | 22:09 | |
hoelzro | nine: ahhhh ok | ||
RabidGravy | moritz++ | ||
Zoffix | m: say "\x[2]" == "\x02" | ||
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 1Actually thrown at: in block <unit> at /tmp/9TKJbeJ6qm line 1» | ||
22:09
llfourn joined
|
|||
hoelzro | I'll re-open the ticket, explain the situation, and think on a fix | 22:09 | |
Zoffix | m: say "\x[2]" eq "\x02" | ||
camelia | rakudo-moar 3734ea: OUTPUT«True» | ||
nine | ++hoelzro | 22:10 | |
Skarsnik | Zoffix, the issue with \x02 is for string like \0023 :) | 22:11 | |
22:11
nadim joined
|
|||
lizmat | good night, #perl6! | 22:12 | |
RabidGravy | toodles | ||
Zoffix | night | ||
22:13
brrt left
|
|||
dalek | kudo/nom: 8150686 | ugexe++ | src/core/CompUnit/Repository/Locally.pm: Use an uncached IO::Path for $.prefix method prefix fixes instances of $path.mkdir unless $path.e that pass around an IO::Path where !$path.e or !$path.w erroneously. This avoids adding stringification code throughout the rest of the codebase (or adding .IO all over) |
22:13 | |
22:13
_nadim left
22:14
llfourn left
|
|||
timotimo | anything you people have been up to that ought to be mentioned on the weekly? | 22:16 | |
flussence | hmmm... could mention there's packages for various OSes in the works (arch/gentoo/mac) | 22:17 | |
hoelzro | timotimo: panda install $ModuleThatIndirectlyDependsOnFileFind now works without --force | 22:18 | |
nine++ # for adapting my fix to something long term-friendly | |||
flussence | I think the arch one's in best shape right now, it has panda too | ||
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:18
nadim left
|
|||
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
|
|||
autarch | timotimo: File::LibMagic | 22:19 | |
22:19
rindolf left
|
|||
autarch | github.com/autarch/perl6-File-LibMagic | 22:19 | |
22:19
nadim left
|
|||
hoelzro | I also opened a ticket on panda to promote discussion of how to handle backwards compat, which is pending discussion =) | 22:20 | |
22:20
nadim joined
|
|||
hoelzro | nine: ticket re-opened, re-named, and suggestions offered | 22:20 | |
I can't speak to the quality of said suggestions, though =P | 22:21 | ||
Zoffix | Another caveat with comma-less named args: | ||
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>; | |||
camelia | rakudo-moar 7d4cdb: OUTPUT«[newfoo] [bar] [baz][foo] [bar] [baz][newfoo] [bar] [baz]» | ||
Zoffix | SUB |%args, :foo<newfoo>; overrides existing arg, while SUB |%args :foo<newfoo> doesn't | ||
RabidGravy | timotimo, you might mention that we're > < far away from 500 modules in the ecosystem :) | ||
timotimo | cool | 22:22 | |
nine | hoelzro: one word: Windows | ||
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 =/ | ||
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) | ||
hoelzro | nine: and passing a filename via a command line option wouldn't work on Windows either? | ||
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 | ||
camelia | rakudo-moar 7d4cdb: OUTPUT«[newfoo] [bar] [baz][foo] [bar] [baz][newfoo] [bar] [baz]» | ||
22:25
nzkindest left,
adhoc left
|
|||
Zoffix | er fail | 22:25 | |
m: sub SUB(:$foo) {say "[$foo]" }; my %args = :foo<foo>; SUB :foo<foo> :foo<newfoo>; SUB |%args :foo<newfoo>; SUB |%args, :foo<newfoo>; | |||
camelia | rakudo-moar 7d4cdb: OUTPUT«[newfoo][foo][newfoo]» | ||
timotimo | Skarsnik: what does the name mean? o_O | ||
22:25
nzkindest joined
|
|||
Skarsnik | nothing I did not have a clever idea for a name, so I pick up a MLP pony name xD | 22:26 | |
RabidGravy | Skarsnik++ # top naming scheme | 22:27 | |
Zoffix | heh | ||
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 | ||
timotimo | which one is trixie? | 22:29 | |
Skarsnik | mlp.wikia.com/wiki/Trixie a 'vilain' character that appear in 2 episodes | 22:30 | |
RabidGravy | Trixie Lulamoon | 22:31 | |
Zoffix | Rakudobugged: rt.perl.org/Ticket/Display.html?id=127143 | 22:32 | |
This makes it 5th ticket for today... Time to give up coding and shoot some dudes on Warframe | |||
BTW, whoever has access, this can be closed: rt.perl.org/Ticket/Display.html?id=127118 | |||
night all | 22:33 | ||
22:33
Zoffix left
|
|||
RabidGravy | Skarsnik, you should get this for a logotype vignette1.wikia.nocookie.net/mugen/...0526033312 | 22:33 | |
nine | hoelzro: that may work | ||
Skarsnik | I put her cutie mark | ||
hoelzro | nine: would you mind leaving your Windows feedback in the ticket? | ||
nine | hoelzro: tomorrow. I'm on my way to bed now. | 22:34 | |
Good night! | |||
hoelzro | 'night nine | 22:35 | |
timotimo | gnite nine :) | ||
dalek | rakudo/nom: cffa688 | ugexe++ | src/core/CompUnit/Repository/ (2 files): | ||
rakudo/nom: Bypass path attribute caching in CompUnit | |||
rakudo/nom: | |||
rakudo/nom: * Fixes issues where installation of modules fails on the | |||
rakudo/nom: first run but works on subsequent tries. | |||
22:35
dalek left
22:36
dalek joined,
ChanServ sets mode: +v dalek
22:38
yqt joined
|
|||
Juerd | m: my uint8 $c = 255; $c++; say $c | 22:39 | |
camelia | rakudo-moar 815068: OUTPUT«256» | ||
Juerd | What's wrong with my expectation of '0'? | 22:40 | |
And what's a nice way to get that behavior? | |||
Skarsnik | of even -1 x) | ||
m: my int8 $c = 255; $c++; say $c; | |||
camelia | rakudo-moar 815068: OUTPUT«0» | ||
22:41
pierre-v_ left
|
|||
Juerd | Skarsnik: Huh?! | 22:41 | |
m: my int8 $c = -5; say $c; | |||
camelia | rakudo-moar 815068: OUTPUT«-5» | ||
Juerd | m: my int8 $c = -5; $c++; say $c; | ||
camelia | rakudo-moar 815068: OUTPUT«-4» | ||
Juerd | m: my int8 $c = 255; say $c; | ||
camelia | rakudo-moar 815068: OUTPUT«-1» | ||
Juerd | Ah. | 22:42 | |
Skarsnik | I think uint type are 'fake' | ||
Juerd | That hurts my brain :( | ||
masak | Juerd: I agree with you, a uint8 shouldn't be able to take on the value 256. | 22:44 | |
unless I'm missing something major. | |||
Skarsnik | m: say int8.REPR; uint8.REPR; | 22:45 | |
camelia | rakudo-moar 815068: OUTPUT«P6int» | ||
Skarsnik | m: say int8.REPR; say uint8.REPR; | ||
camelia | rakudo-moar 815068: OUTPUT«P6intP6int» | ||
Skarsnik | m: say int8.REPR; say uint8.nativesize; | 22:46 | |
camelia | rakudo-moar 815068: OUTPUT«P6intMethod 'nativesize' not found for invocant of class 'uint8' in block <unit> at /tmp/RUwhoEMr2U line 1» | ||
Skarsnik | m: say int8.REPR; say int8.nativesize; | ||
camelia | rakudo-moar 815068: OUTPUT«P6intMethod 'nativesize' not found for invocant of class 'int8' in block <unit> at /tmp/WZbifUOusl line 1» | ||
Skarsnik | should probably add tests for type bondary in roast? | ||
*boundary | 22:47 | ||
22:47
Tonik joined
|
|||
Juerd | m: my uint16 $foo = 2**16; say $foo; ++$foo; say $foo | 22:48 | |
camelia | rakudo-moar 815068: OUTPUT«01» | ||
Juerd | m: my uint16 $foo = 2**16-1; say $foo; ++$foo; say $foo | ||
camelia | rakudo-moar 815068: OUTPUT«6553565536» | ||
Juerd | Now my brain hurts even more. | ||
m: my uint16 $foo = 2**16-1; say $foo; $foo = $foo + 1; say $foo | 22:49 | ||
camelia | rakudo-moar 815068: OUTPUT«655350» | ||
22:50
niceperl joined
|
|||
flussence | now *mine* does /o\ | 22:53 | |
masak | auugh | ||
22:57
vendethiel left
22:58
niceperl left
|
|||
masak | 'night, #perl6 | 22:59 | |
Skarsnik | good night masak | ||
Juerd | Good night :) | 23:00 | |
gfldex | m: my uint16 $foo = 2**16-1; say $foo; ++$foo; say $foo.WHAT | ||
camelia | rakudo-moar e95c62: OUTPUT«65535(Int)» | ||
gfldex | m: my uint16 $foo = 2**16-1; say $foo.WHAT; ++$foo; say $foo.WHAT | ||
camelia | rakudo-moar e95c62: OUTPUT«(Int)(Int)» | ||
timotimo | seems like it autoboxes the Int for you when you .WHAT? | 23:01 | |
m: my uint16 $foo = 1; say $foo.VAR.WHAT | |||
camelia | rakudo-moar e95c62: OUTPUT«(IntLexRef)» | ||
timotimo | ^- that means we have a native int inside a lexical slot that we're refering to | 23:02 | |
Juerd | I can't find where nqp::add_i is implemented in moar | 23:06 | |
timotimo | need to search for add_I | 23:07 | |
it's inside the bigint ops file | |||
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? | ||
Juerd | timotimo: Oh, from Int.pm I reckoned that add_i and add_I would be different. | ||
timotimo | oh! | ||
yeah, they are different | |||
add_i is most likely implemented in interp.c then | 23:09 | ||
Juerd | Yep. Thanks :) | ||
timotimo | because it's really just GET_REG(cur_op, 0).i64 = GET_REG(cur_op, 2).i64 + GET_REG(cur_op, 4).i64 | ||
Juerd | That's a weird implementation for <64 ints :) | ||
timotimo | with sized ints, though, the code gen is generating truncate and extend ops for you | 23:10 | |
that's in nqp's QASTCompilerMAST likely | |||
you should be able to find about that in the recent commits | |||
as proper support for sized int lexicals and registers is rather young | |||
Juerd | This is way beyond what I comprehend. I should learn some internals stuff some day. | ||
23:10
llfourn joined
|
|||
timotimo | hehe | 23:11 | |
Rotwang | autarch: it totally is, look again | ||
timotimo | are you looking for something specific? is there a bug somewhere? | ||
Rotwang | besides both gettimeofaday and getenv doesn't mutate anything | ||
autarch | Rotwang: pubs.opengroup.org/onlinepubs/00969...g_02_09_01 says that getenv is not thread safe | ||
Juerd | timotimo: Well, that uint8 will hold 256 after a ++, see 30 minutes ago | 23:12 | |
timotimo | oh, hmm. | ||
Rotwang | autarch: so? getenv is on the list? | ||
23:12
cdg left
|
|||
autarch | Rotwang: yes | 23:12 | |
Juerd | $foo = $foo + 1 works as expected, $foo++ does magic. | ||
timotimo | potentially because we have inc_i and dec_i? | ||
(do we?) | |||
Rotwang | aaand it does not need to be threadsafe | ||
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. | ||
timotimo | Juerd: anyway, is there a rakudobug yet? | 23:13 | |
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. | ||
Juerd | Thanks. Will send mail. | ||
Skarsnik | nadim, that a good question :) | ||
m: say int8.WHAT | |||
camelia | rakudo-moar e95c62: OUTPUT«(int8)» | ||
Skarsnik | m: say uint8.WHAT | ||
camelia | rakudo-moar e95c62: OUTPUT«(uint8)» | ||
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 | ||
camelia | rakudo-moar e95c62: OUTPUT«5===SORRY!5=== Error while compiling /tmp/kW0cuPD4ZHTwo terms in a rowat /tmp/kW0cuPD4ZH:1------> 3say int87⏏5 $a; say $a.WHAT expecting any of: infix infix stopper postfix statement end …» | ||
23:15
llfourn left
|
|||
Skarsnik | m: my int8 $a; say $a.WHAT | 23:15 | |
camelia | rakudo-moar e95c62: OUTPUT«(Int)» | ||
Rotwang | autarch: this list implies that it is ok to use getenv in threads, at least that's my understanding | ||
23:15
bpetering joined
|
|||
autarch | Rotwang: oh, you're right, I misread the text | 23:16 | |
no, wait, I didn't, it's saying that everything should be implemented as thread-safe _except_ the functions on that list | |||
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 | ||
Juerd | timotimo: I can commit to roast directly but I don't know if people will be upset over the failing tests :) | ||
Rotwang | autarch: following functions1 need not be thread-safe. | ||
The getenv() function need not be reentrant. A function that is not required to be reentrant is not required to be thread-safe | 23:18 | ||
autarch: besides, even if a function isn't threadsafe it just means that you can be sure to its outcome | 23:19 | ||
it doesn't mean that it will crash | |||
Juerd | Hmmm | ||
Rotwang | and crash is what happens with NativeCall | ||
timotimo | Juerd: yes, they would be upset; usually you'd mark them todo and it'd be fine | ||
Juerd | There are surprisingly few tests for native ints :) | ||
timotimo | yeah | 23:20 | |
23:20
Tonik left
|
|||
Skarsnik | NC test suite is rather small too x) | 23:20 | |
Juerd | Any suggestion for a test file where to put these? | ||
timotimo | that's a thing i also always have a hard time with :) | ||
Juerd | I'll rakudobug it now, and write the tests tomorrow | 23:21 | |
timotimo | thank you kindly :) | ||
23:22
patrickz left
|
|||
Rotwang | s/can/can't/ | 23:23 | |
Juerd | Bug submitted; rt.perl.org/Public/Bug/Display.html?id=127144 | 23:26 | |
Good night! | |||
timotimo | Juerd: i may have just found the place where the fix ought to happen | ||
Juerd | That's great. I'll read the rest when I wake up :) | 23:27 | |
timotimo | hm. no, maybe not. | ||
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()" | ||
sounds like a boom waiting to happen in a threaded environment | 23:28 | ||
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:34 | |
in other places we have a bunch of special handling code just for those two ops, too | 23:35 | ||
23:35
FROGGS left
23:36
yurivish_ left
23:37
BenGoldberg joined
|
|||
timotimo | nope. i don't see the right way to go here | 23:38 | |
23:38
virtualsue left
|
|||
timotimo | wait .. huh, we're not even using that opcode for ++ | 23:39 | |
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:40 | |
23:41
lucasb joined
|
|||
timotimo | hum ... i'm not sure you can do it without getting a bit of code into moar | 23:42 | |
if you had something like in jnthn's OO::Monitor, you could mixin something into all cstructs | |||
Rotwang | RabidGravy: autarch: we need to agree on something ;f can we agree that sleep() is thread safe? | ||
timotimo | but that'd require "cstruct foobar" instead of "class foobar is repr<CStruct>" | ||
Rotwang | sleep is defined in POSIX1.2008: pubs.opengroup.org/onlinepubs/96999...tag_16_560 | 23:43 | |
and posix states that: All functions defined by this volume of POSIX.1-2008 shall be thread-safe [...] | |||
except for those from the list we were talking about earlier | |||
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 left,
nadim joined
|
|||
lucasb | m: my $x = 42; $x.subst-mutate(/o/,'x'); say $x.WHAT | 23:47 | |
camelia | rakudo-moar e95c62: OUTPUT«(Str)» | ||
lucasb | ^^ should the type change even if the match was not successful? | 23:48 | |
m: my $x = 42; $x ~~ s/o/x/; say $x.WHAT | 23:49 | ||
camelia | rakudo-moar e95c62: OUTPUT«(Int)» | ||
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 | ||
gfldex | no return type given, so it can do whatever it wants | ||
RabidGravy | I'm not sure sleep is a good example as it does something odd, threads or no threads | ||
Rotwang | RabidGravy: what? :D | 23:51 | |
RabidGravy | I suspect it screws up the inbuilt event loop | ||
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. | ||
lucasb | gfldex: I... I don't understand you :) | ||
.subst-mutate *always* returns either a match object or Nil | 23:53 | ||
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:54 | |
23:55
firstdayonthejob left
|
|||
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:55 | |
timotimo | RabidGravy: unlikely that it breaks something; it should effectively be equivalent to a busy loop, no? | 23:56 | |
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. | 23:58 |