»ö« 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:03 xerx joined 00:10 cokebot9000 joined
cokebot9000 Can't ssh into hack.p6c.org atm. 00:10
Juerd samcv: Finally got around to copy/pasting the huge license identifier :) 00:14
00:20 cokebot9000 left 00:25 Cabanossi left 00:27 Cabanossi joined 00:33 raschipi left 00:35 raschipi joined 00:43 void1 joined 00:46 void1 left 00:47 jeek_ is now known as jeek, DarthGandalf left, void1 joined 00:50 raschipi left
timotimo Juerd: funny, just an hour or two ago i looked at your mqtt library 00:52
01:10 aborazmeh joined, aborazmeh left, aborazmeh joined, Cabanossi left 01:12 Cabanossi joined 01:21 ctilmes left 01:22 BenGoldberg joined 01:42 kyclark joined, Cabanossi left, DarthGandalf joined 01:43 Cabanossi joined 01:46 ilbot3 left 01:48 ilbot3 joined, ChanServ sets mode: +v ilbot3 01:54 kyclark left 02:12 Sgeo_ left 02:16 Sgeo joined 02:17 kurahaupo left, kurahaupo joined 02:39 noganex joined 02:41 MasterDuke left 02:42 noganex_ left 02:45 MasterDuke joined 02:46 kyclark joined 02:48 kyclark left 03:33 araraloren joined 03:53 geekosaur left 03:55 Cabanossi left, geekosaur joined 03:57 Ben_Goldberg joined, Cabanossi joined, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg 04:02 khw left 04:16 pilne left 04:27 xtreak joined 04:31 mr-fooba_ left 04:32 aborazmeh left 04:36 curan joined 04:40 xerx left 04:46 mr-foobar joined 04:48 cioran89 joined 04:52 cioran89 left, cioran89 joined 04:54 xerx joined 04:55 cioran89 left, xerx left 04:56 Actualeyes left 05:09 xtreak left 05:10 xtreak joined 05:12 Actualeyes joined, xtreak left, xtreak joined 05:34 araujo left 05:35 BenGoldberg left 05:43 adu joined 05:55 Cabanossi left 05:56 Cabanossi joined 06:15 maettu left 06:26 Cabanossi left, mr-foobar left, Cabanossi joined 06:31 mr-foobar joined 06:43 domidumont joined 06:47 wamba joined 06:48 domidumont left 06:49 domidumont joined 06:54 rindolf joined 07:02 domidumont left 07:06 rindolf left 07:09 gregf_ left 07:18 rindolf joined 07:22 skids left 07:23 nadim joined 07:34 xtreak left, xtreak joined 07:36 mr-foobar left 07:39 xtreak left 07:48 mr-foobar joined 07:49 xtreak joined, xtreak left 07:50 xtreak joined 07:53 xtreak left, xtreak joined 07:54 xtreak left 07:58 skids joined 08:06 CacoS joined 08:09 skids left
zengargoyle does anybody/everybody use `hub` (hub.github.com/) for their CLI based github interactions? or is there something else i should investigate? 08:18
moritz there's also github.com/ingydotnet/git-hub 08:19
zengargoyle ah, i think part of my confusion was assuming Debian git-hub package was just a renamed version of hub, seems it's yet another git-hub thing (github.com/sociomantic/git-hub). 08:27
ingy's seem to be of the query/follow/star/etc things instead of the issues/pull-request things. 08:33
moritz I think it also does issues/PRs 08:35
08:36 xtreak joined
zengargoyle ah, i just looked at the quick synopsis and didn't go further down the docs. 08:39
samcv zengargoyle, i use hub 08:41
it's great
i've also used it to automate pull requests and such from perl 6
08:43 Cabanossi left 08:44 Cabanossi joined
zengargoyle not suprisingly, ingy's looks pretty cool on further scrolling down the page. :) i'll have to re-check hub and the other git-hub now that i know they're different things. 08:45
09:06 paule32 joined
paule32 hello 09:06
can i run perl6 programs with perl5 by using: use v6 ? 09:07
zengargoyle no
paule32 how can i use "our $foo" 09:08
zengargoyle same way for the most part. 09:10
m: our $foo = "hello"; say $foo;
camelia hello
zengargoyle i thought at one time there was an idea to have 'use v6;' try to re-exec with perl6 or to have perl5 notice a #!perl6 and do something. guess it had too many problems/pitfalls. 09:16
paule32 thank you 09:18
09:20 rindolf left
zengargoyle there is a 'v6' module for Perl5 that uses Perlito, but i know nothing about how close it is to implementing all of Perl6 features. 09:20
zengargoyle only knows of Perlito by name, haven't followed it's progress. 09:21
docs.perl6.org/syntax/our 09:24
09:24 parv joined 09:28 Cabanossi left 09:30 Cabanossi joined 09:37 parv left 09:42 setty1 joined 09:44 parv joined 09:58 adu left 10:02 parv left 10:05 AlexDaniel joined, curan left 10:25 kurahaupo left
paule32 codepad.org/3ugXTzQD 10:40
what is that - missing lib? 10:41
10:42 Cabanossi left
lizmat m: use warnings 10:43
camelia ===SORRY!===
Could not find warnings at line 1 in:
/home/camelia/.perl6
/home/camelia/rakudo-m-inst-1/share/perl6/site
/home/camelia/rakudo-m-inst-1/share/perl6/vendor
/home/camelia/rakudo-m-inst-1/share/perl6
CompUnit::Re
lizmat hmmm...
paule32: warnings are always enabled in Perl 6
m: no warnings 10:44
camelia ===SORRY!===
Don't know how to 'no warnings' just yet
lizmat and you can't silence them like that either
what you *can* do:
paule32 how is Term::ReadKey?
default, too? 10:45
10:45 Cabanossi joined
lizmat m: my $a; "$a".say 10:45
camelia Use of uninitialized value $a of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.
in block <unit> at <tmp> line 1
lizmat m: my $a; quietly "$a".say
camelia
lizmat quietly { } or quietly statement 10:46
paule32: re Term::ReadKey , please check modules.perl6.org 10:47
paule32 ok, thanks for helping
lizmat paule32: depends on what you need to do 10:48
paule32 have to go
10:48 salv0 joined
paule32 ehm, AI 10:48
ai.neocities.org/perlmind.txt
10:49 rindolf joined 11:00 lizmat left 11:03 lizmat joined 11:28 jferrero joined
nadim good morning! I have an object's method that returns an object that has data that shouldbe hidden for the receiver but accessed by the creating object. Something like 'friend' in C++. 11:31
the questions being: can we do it in P6? Should we do it? is there another way of doint it?
jnthn It's rarely wise, but see `trusts` 11:33
Which does that
(It allows calling of private methods by the trusted class) 11:34
nadim jnthn: thanks. in this case I think it would be unwise to not do it. the only way I could think about is the opaque class to have a method to return whatever data the trusted class has and make sure it is called by a trusted class; something like Opaque::method(TrustedClass $t, ...); 11:36
that has the advantage of fine granularity trusting 11:42
Geth Swapped META.info → META6.json in 2 dists in github.com/perl6/ecosystem/commit/af1861cfd9 11:51
11:54 eveo joined
eveo So ecosystem updater runs on www server in ecosystem-api.perl6.org user, but we don't got perlbrewed perl on that box? 11:54
I need a module installed. Wondering if I should install it systemwide :/ 11:55
11:57 Cabanossi left
Geth doc: a3539d0dc8 | (Jan-Olof Hendig)++ | doc/Type/Supply.pod6
Added jnthn++ doc of Supply.on-close
11:57
12:00 Cabanossi joined 12:05 geekosaur left 12:06 setty1 left
eveo *crickets* 12:06
System wide it is then
12:07 geekosaur joined
Geth doc: 5c7fd3be88 | (Jan-Olof Hendig)++ | 2 files
Removed trailing ws

Closes #1372
12:10
12:13 aborazmeh joined, aborazmeh left, aborazmeh joined
Geth ecosystem: ffe71f7583 | (Zoffix Znet)++ | server/updatelist.pl
Update ecosystem JSON atomically

Fixes #345
12:18
12:19 TEttinger left 12:22 xtreak left
zengargoyle wonders if there's like an activity graph of #perl6* somewhere. 12:24
12:24 xtreak joined
MasterDuke irclog.perlgeek.de/ and irclog.perlgeek.de/perl6/ 12:25
eveo talk about crap graphs.. no axis labels. Was it is? A decade or an hour? and what's the peak? 2 people talking or 2000? 12:26
Geth ecosystem: f9e499ea22 | (Zoffix Znet)++ (committed using GitHub Web editor) | README.md
Remove travis badge

Since travis tests new addition of modules, not the repo health
12:27
zengargoyle heh, i was thinking like a bot commandable sparkline graph or msgs/h in a rrd or graphite? like graph. 12:28
just because timezone seems to play a large role. 12:29
eveo oh crap 12:31
:} 12:32
(ecosystem json was 401 for about 30 seconds) 12:33
Geth ecosystem: dc99c51cd1 | (Zoffix Znet)++ | server/updatelist.pl
Fix file mode in atomic write
12:36
12:41 xtreak left 12:42 Cabanossi left 12:45 Cabanossi joined
zengargoyle ▁▂▂▇▁▂▂▂▁▁▁█▆▃▁▅▆▄▁▃▁ 12:46
(yesterday) 12:47
12:47 travis-ci joined
travis-ci Doc build errored. Jan-Olof Hendig 'Added jnthn++ doc of Supply.on-close' 12:47
travis-ci.org/perl6/doc/builds/241498696 github.com/perl6/doc/compare/e6c3b...539d0dc85b
12:47 travis-ci left
eveo heh 12:48
12:49 kaare_ left
eveo buggable: speed 60 12:51
buggable eveo, ▁▂▁▁▃▃▃▃▃▃▂▂▁▂▆▇▂▂▂▂▃▃▃▄▂▆█▅▆▅▃▄▄▄▅▇▄▃▆▆↑▅▄▄██▄▆↑▄▅▅▃▂▄▄▅▃▄▄ data for 2017-05-15–2017-06-10; range: 4.194s–5.038s; 5% slower
eveo ZofBot: you call that a graph?! Now THIS is a graph!
zengargoyle what are the ↑ bits? 12:54
eveo outliers 12:55
github.com/zoffixznet/perl6-buggab...m6#L43-L50 12:56
zengargoyle does this mean there's already a p6 sparkline module (or at least implementation) ... seems so. 12:57
eveo Nope
Well, there's the code ^ in that file.
13:00 travis-ci joined
travis-ci Doc build errored. Jan-Olof Hendig 'Removed trailing ws 13:00
travis-ci.org/perl6/doc/builds/241501148 github.com/perl6/doc/compare/a3539...7fd3be884e
13:00 travis-ci left
eveo ^ timeout 13:02
zengargoyle close enough to steal from. :) 13:03
Geth doc: 936c854a91 | (Jan-Olof Hendig)++ | doc/Language/control.pod6
Fixed broken 'redo' code example

Closes #1370
eveo m: my @a = 1..*; sub (|a) { say a.list.is-lazy }(|@a) 13:05
booo
Need to figure out the number of args in a Capture :/
camelia (timeout)
zengargoyle wonders if scraping irclogs from perlgeek.de is ok...
13:05 cdg joined
eveo zengargoyle: better ask moritz++ for a dump 13:06
Oh, it's hanging even before .list or even capturing 13:07
zengargoyle yeah, sorta the plan. there might already be raw numbers or some such already.
eveo works for me
zengargoyle: the plan for what? 13:08
zengargoyle that i would ask moritz before doing more than a couple .txt dumps to test against...
eveo zengargoyle: I mean what are you doing with those text dumps? 13:09
There'a repo for the log site. You could submit your graphs to add to the site: github.com/moritz/ilbot
zengargoyle i want to see pretty graphs of historical activity.
like network interface traffic graphs or something. or d3.js sparklines month by month. 13:10
13:10 zakharyas joined
eveo k, looks like ecosystem update worked fine 13:11
eveo flies away
13:11 eveo left
moritz zengargoyle: if you use the normal URLs with an Accept: application/json header, you get the log data in JSON format 13:13
MasterDuke zengargoyle: there's a way to get json dumps. AlexDaniel did it for quotable6
AlexDaniel and I did exactly what moritz said
now, you may possibly face some issues when trying to decode these json files…
13:14 nadim left
AlexDaniel but I *think* JSON::Fast should be able to do it now 13:14
13:14 cognominal left
zengargoyle sweet. if it ever becomes more than a pipe dream, i was planning to store the hourly? counts locally to not really have to hit the site more than needed. unless there's a dump somewhere. 13:16
i really just need the hour of the timestamp and the *? username (to filter out bots maybe) and pretty much just uniq -c them. :) 13:18
JSON may actually be overload.
but it's just another random idea at the moment. :P 13:19
Geth doc: 07a34141f2 | (Jan-Olof Hendig)++ | doc/Type/Supply.pod6
Added much improved documentation for Supply.migrate. Written by jnthn++
13:21
13:21 kyclark joined, kyclark left 13:28 mr-foobar left 13:30 aborazmeh left 13:32 mr-foobar joined 13:36 anon joined, Exodist left, anon is now known as Guest23558, Exodist joined 13:43 Cabanossi left 13:44 Cabanossi joined 13:54 travis-ci joined
travis-ci Doc build errored. Jan-Olof Hendig 'Fixed broken 'redo' code example 13:54
travis-ci.org/perl6/doc/builds/241509458 github.com/perl6/doc/compare/5c7fd...6c854a91de
13:54 travis-ci left 13:57 Guest23558 left, anon_ joined 14:05 cdg_ joined, cdg left 14:11 travis-ci joined
travis-ci Doc build errored. Jan-Olof Hendig 'Added much improved documentation for Supply.migrate. Written by jnthn++' 14:11
travis-ci.org/perl6/doc/builds/241512350 github.com/perl6/doc/compare/936c8...a34141f26d
14:11 travis-ci left 14:27 Cabanossi left 14:29 khw joined, Cabanossi joined 14:49 aborazmeh joined, aborazmeh left, aborazmeh joined
bioduds_ mans, how do I reuse a grammar in a grammar? 14:49
14:50 nico64 joined, nico64 left
bioduds_ gist.github.com/bioduds/cff61d5071...7c9c4cc107 here's the idea 14:51
Geth doc: 9f60666a93 | (Jan-Olof Hendig)++ | doc/Type/Supply.pod6
Added some pod directives
14:57
zengargoyle bioduds_: token TIMESTAMP { <TIMESTAMP::TOP> } 15:01
bioduds_ oh, very easy, beautiful, thank man
15:02 kaare_ joined
zengargoyle i'm pretty sure grammar's are just classes in disguise. just pretend it's Class and Method and it'll probably work. 15:02
15:03 Sgeo_ joined 15:04 Sgeo left 15:08 zakharyas left
zengargoyle bioduds_: if you haven't, you might check out design.perl6.org/S05.html#Grammars the synopses aren't really valid anymore, but sometimes they explain the ideas a bit better than the docs do. 15:13
bioduds_ great, thanks, haven't yet
zengargoyle i.e. you'll find some not-yet-implemented, and some we-just-changed-this, but on the whole, it's a better *idea* of the design goals that mostly work. 15:14
and a bit more verbose and techie. 15:15
15:19 eveo joined
eveo PSA: some people were asking why zef asks for github pass when installing modules and the answer they received is because of https URL in source. That's not accurate. https URLs are fine, but the password ask usually means an incorrect source-url that leads to a 404 15:20
15:21 BenGoldberg joined 15:25 aborazmeh left 15:26 Camel_ joined
Geth ecosystem: da0fa74d23 | (Zoffix Znet)++ | server/updatelist.pl
Push to modules after all error checks
15:26
15:26 yadzi joined 15:27 yadzi left
Camel_ hello 15:27
15:27 Cabanossi left
eveo \o 15:27
15:27 yadzi joined
Camel_ hello 15:29
eveo Hi
15:29 Cabanossi joined
eveo Camel_: what's up? 15:29
Camel_ i'am trying to run perl6 program on windows 7 moar vm it doesn't worf 15:30
"sorry error while compiling" 15:31
eveo Camel_: what's the error output? Pastebin it (e.g. on gist.github.com/ )
Camel_ error while compiling confused expecting any of: colon pair 15:32
eveo Camel_: and what's the code?
That produces that error 15:33
araraloren This is maybe syntax error
Camel_ #!/usr/bin/env perl6 use v6; say "Hello";
on 3 lines
araraloren How you run your code ? perl6 **scrpit** ? 15:34
eveo Camel_: what's the actual program? Pastebin it somewhere.
Camel_ i write a text file then i change the name .pl6 then i execute it in Rakudo Perl 6 15:35
araraloren In Win please use #!perl6 15:36
try it
Camel_ ok i try it now
araraloren I mean the shebang, first line in your script 15:37
eveo araraloren: does Windows even use it?
araraloren Em ?
I don't know, I use `#!/usr/bin/env perl6` under *unix 15:38
eveo araraloren: above you say "on Win please use #!perl6". Why?
Camel_ no it doesn't work it makes the same error
araraloren Windows dont' have env . 15:39
eveo araraloren: but it doesn't use shebangs at all
15:39 mr-foobar left
Camel_ i tried without shebang it doesn't work either i'm stuck 15:40
araraloren eveo, yeah, you are right 15:41
Camel_, Is command **perl6** available under your cmd ? 15:42
Try perl6 -v
Camel_ yes it works when i type directly in cmd
zengargoyle invisible characters? weird windows utf-16 thing? 15:43
eveo Camel_: what's the program are you running?
Camel_ just testing a hello world
to begin
zengargoyle wordpad vs notepad and line endings?
araraloren Yeah, maybe the file encoding is not correct ?. and line ending should not be `\r\n` 15:44
Camel_ so i should write in notepad++ ?
eveo Camel_: The actual program. Don't type it in the channel. Don't described it. Show the actual code. There's no point in retyping it and describing it since that doesn't show the actual erroneous code.
zengargoyle Camel_: what did you write it in?
Camel_ i just wrote a text file with say "Hello"; in order to test if it works 15:45
zengargoyle what did you create the text file with?
Camel_ windows notepad 15:46
araraloren wonder is perl6 installed correctly. 15:47
eveo This is ridiculous.
15:47 zacts left 15:48 travis-ci joined
travis-ci Doc build errored. Jan-Olof Hendig 'Added some pod directives' 15:48
travis-ci.org/perl6/doc/builds/241529170 github.com/perl6/doc/compare/07a34...60666a93e4
15:48 travis-ci left
zengargoyle Camel_: i might try notepad++ but i don't think that's the problem. can you paste your code and the error message you get into pastebin.com so we can maybe see what's going on. 15:49
15:50 Sgeo__ joined
Camel_ pastebin.com/AQJWWhFe 15:51
araraloren ... 15:52
eveo Oh my god
Camel_: dude, what's the program are you running?
araraloren You should use `perl6 yuur-file.p6` run you script
15:52 Sgeo_ left
araraloren eveo, He is in REPL 15:52
eveo Ah 15:53
Jesus
Yeah, now I remember why I hate help channels
15:53 eveo left
zengargoyle Camel_: you don't start perl6 and then ask it to run your file. just type `perl6 C:\Users\remo\Desktop\1.pl6` on the command line. 15:54
araraloren Camel_, please exit, and type `perl6 1.pl6` in your cmd, the click enter
s/the/then/
15:55 mr-foobar joined
zengargoyle »ö« 15:55
Camel_ i'm going to log off and ask the admin to have full rights on my machine 15:56
maybe thats the problem
15:56 raiph joined
Camel_ repl works fine 15:56
zengargoyle Camel_: exit the repl, you don't use the repl to run a program from a file. 15:57
Camel_ ok
zengargoyle instead of typing `perl6` to run the repl, you type `perl6 C:\Users\remo\Desktop\1.pl6` to run the program. 15:58
or `perl6 1.pl6` if you're in the same directory as the file. 15:59
Camel_ yes it works ! very nice thanks a lot sorry for my stypidy just beginning programming 16:00
BenGoldberg Does anybody know if perl6 possesses some simple equivilant of perl5's "do $file"? Would "EVAL $file.IO" work?
Camel_ yes
Voldenet evalfile
or EVALFILE
zengargoyle it's cool, we're mostly patient people. :) 16:01
Camel_ thank you all
araraloren :)
16:01 zacts joined
Camel_ yes of course 16:01
everything has a beginning
Voldenet btw, why EVALFILE is uppercase?
geekosaur as a warning that it is dangerous
araraloren (๑•̀ㅂ•́)و✧ 16:02
zengargoyle weird things you should think twice about using are UPPERCASE
BenGoldberg Camel_, Since perl6 has inherited from perl5, the motto "There is more than one way to do it," you could, from with the repl, type the command: EVALFILE 'C:\Users\remo\Desktop\1.pl6'
Voldenet sub evalfile(|c){ EVALFILE(|c); };
;-)
16:03 pilne joined
zengargoyle . o >o< »o« »ö« ... 16:03
Camel_ ok i will remember it
geekosaur you might need the MONKEY-SEE-NO-EVAL pragma to enable it
araraloren m: '(๑•̀ㅂ•́)و✧'.flip.say 16:04
camelia ✧و)•́ㅂ•̀๑(
zengargoyle and it might need to be on one line... because... REPL
Voldenet geekosaur: actually, you only need it for eval, not evalfile
evalfile is a lot safer most of the times, because it won't execute the code that's not there 16:05
16:05 Sgeo joined
zengargoyle wonders if anybody is working on a 'notebook' thingy for p6. 16:06
Voldenet (perl6 does not do any funky stuff with files it opens, so it doesn't execute commands anymore, right)
16:06 Sgeo__ left
Voldenet s/right/right\?/ 16:07
zengargoyle like '|rm -rf /'? 16:08
16:08 xzhao left
zengargoyle define 'funky stuff' 16:09
geekosaur it leads to evaluation of arbitrary perl 6 code in your lexical context
Voldenet Yeah, things like this exactly: open F, "ls|"; print while <F>; close F 16:10
geekosaur and you believe that is the only way things can go wrong. 16:11
Voldenet I wonder if it's safe to only escape/remove/discard '/' in path to get a "safe to use" string 16:12
oh, and \
zengargoyle you should probably ensure that it's a child of some known location. 16:13
16:14 Camel_ left
Voldenet with IO::Path.is-relative? 16:14
hm, it makes sense to do that instead of relying of my own validation, thanks 16:16
s/relying of/relying on/
zengargoyle i don't know, just throwing out ideas. :) i doubt p6 does the magic pipe open, and there's resolving to an absolute path and ensuring that path is in a trusted location....
i'm not sure of the best way to check that $given is a $file somewhere under $trusted-dir 16:18
geekosaur so now we're up to arbitrary unchecked perl 6 code and race attacks.
any more security holes you'd like to design in?
zengargoyle heh 16:19
Voldenet geekosaur: EVAL and likes are very useful in dynamic code generation and most languages support it in one way or another 16:20
geekosaur whihc is why it's enableable _witha pragma_
but never mind me, convenience is always far mroe important than security as everyone knows 16:21
Voldenet Yeah, I understand the reason and it's totally sane.
geekosaur and then wonders why pretty much every web server is trivially hackable
zengargoyle well IO::Path i believe is just a string that can be manipulated under the rules of the current filesystem. you should be able to absolute it and compare it to another without ever doing something like open.
Voldenet *trivially* ;-) 16:22
zengargoyle there's no reason for it to be able to evade your decision that it *has* to be somewhere under the $top that you've determined. 16:24
and if they can write some other way under $top then you have a different problem. :P 16:25
16:27 Ben_Goldberg joined, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg 16:28 cdg_ left 16:29 yadzi left
zengargoyle sorta likes the 'prog |' open sometimes. as long as the program is only accessible to those who should be able to use the power. _muahahaha_ 16:31
Geth ecosystem/meta-checker: 3cfd691ffb | (Zoffix Znet)++ | server/updatelist.pl
Check for valid source URLs

This is one way to address the issue[^1] of wrong source urls in META files. However, if there's github connectivity issue, we might get false negatives and temporarily toss modules from ecosystem.
This needs to be done in modules.perl6.org codebase, so that the module ... (5 more lines)
16:35
geekosaur zengargoyle, I see you've never heard of symbolic link attacks
16:36 lucasb joined
geekosaur that's fine, we have determined security is an unnecessary impediment to convenience, carry on 16:36
16:36 eveo joined
zengargoyle no, i assume the absolute resolves links to absolute before checking wheter it's a valid file under control. 16:37
readlink isn't a vulnerability?
eveo Voldenet: no, it's not safe. You could have `foo/bar/ber` that leads outside of foo. Use IO::Path::ChildSecure or wait until 6.d when IO::Path.child will be secure by default
buggable: eco ChildSecure
buggable eveo, IO::Path::ChildSecure 'Secure version of IO::Path.child': github.com/zoffixznet/perl6-IO-Path-ChildSecure 16:38
Voldenet eveo: Thanks for clarifying
16:38 kurahaupo joined
eveo zengargoyle: IO::Path is slightly more than just a string. It's a string + CWD (path that string is relative to, if it's relative) + SPEC (IO-specific rules for operating on that path) 16:40
m: '.'IO.perl.say
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3'.'7⏏5IO.perl.say
expecting any of:
infix
infix stopper
statement end
statement modifier
statement m…
eveo m: '.'.IO.perl.say
camelia IO::Path.new(".", :SPEC(IO::Spec::Unix), :CWD("/home/camelia"))
16:43 domidumont joined
zengargoyle but does it do it's stuff as strings? can it turn '../../foo' into '/foo' without interacting with the system? 16:44
eveo Turn how? Those are different paths.
zengargoyle /home/camelia + ../../foo = /foo 16:45
BenGoldberg m: ".".IO.absolute.say;
camelia /home/camelia
BenGoldberg m: ".".IO.absolute.perl.say;
camelia "/home/camelia"
16:46 ugjka left
BenGoldberg m: "../../foo".IO.perl.say; 16:46
camelia IO::Path.new("../../foo", :SPEC(IO::Spec::Unix), :CWD("/home/camelia"))
BenGoldberg m: "../../foo".IO.absolute.say;
camelia /home/camelia/../../foo
BenGoldberg Clearly, it's not interacting with the system :P 16:47
zengargoyle :(
eveo zengargoyle: they're still different paths in that case, if, say, /home/camelia is a symlink 16:48
You can't turn /home/camelia + ../../foo to /foo without accessing the filesystem
zengargoyle i thought it would split on / and delete before/.. in some sane manner.
i'm assuming readlink is a safe operation. 16:49
eveo that's "accessing the filesystem" :/
You can do that with .resolve
But you really shouldn't care how IO::Path does things, whether it's strings or whatever.
Voldenet m: "../../foo".IO.resolve.say 16:50
camelia "/foo".IO
zengargoyle yeah, i think we're on different think here... i was talking about ensuring $string as a $path was under $allowed-dir
you can do that without "security holes" 16:51
eveo You can't ensure that just by looking at $string. You have to access the filesystem and resolve all links and then see where it ended up at
16:51 anon_ left
zengargoyle right, but resolve does not change the system and is a safe operation. 16:51
security wise, it's safe to turn any $string into an absolute resolved path. 16:52
eveo Yeah. Probably.
16:52 eveo left
Voldenet Hm, there could be a race condition in it, when you play with symlinks too much ;) 16:53
zengargoyle and then it's trivial to assure that the resolved is a child of some safe directory (pathwise).
before opening or testing for existance or whatnot.
16:54 anon joined 16:55 anon is now known as Guest91928
zengargoyle Voldenet: but still in the end you have the test that it's under your controlled space. 16:55
Voldenet Yeah. I guess it could be a problem in shared environment though 16:56
zengargoyle you can totally take a string from a user and decide whether or not it's a file under what you consider to be safe.
Voldenet > ln -s /var/www/my_dir/safe test ; rm test ; ln -s /etc test
then, make a script run as admin and use a "test/shadow" file ;) 16:57
zengargoyle before doing anything with it. you may end up with the wrong endpoint, but still you'll only be EVAL or whatever something you trust.
16:57 itaylor57 left
Voldenet therefore, if I cared about security, I'd not follow /any/ symlinks at all, unless I got a table of symlinks that I'm allowed to follow before 16:57
so it can't be modified at runtime 16:58
but I think I might be too paranoid about this 16:59
zengargoyle /var/www/my_dir/safe is just a string that is matched against the absolute resolved input string. no need to readlink on the safe dir.
17:00 wamba left, itaylor57 joined
zengargoyle my absolute resolved path & /var/www/my_dir/safe ?? 17:00
unless my absolute resolved path starts with /var/www/my_dir/safe then you can reject it. 17:01
Voldenet ah, right
zengargoyle if they can symlink safe, you've got other problems. :)
17:03 Guest91928 left
Voldenet So, .resolve used right makes it safe (but you need to resolve the full path to each file to resolve and validate resolved path every time). 17:03
zengargoyle pretty much. in my head it's just like network routing with subnet masks and such. it's eith inside the thing or outside the thing. 17:04
17:04 anon_ joined
zengargoyle and i expect IO::Path could do that somehow without being subject to some sort of trickery. 17:05
(as long as readlink isn't a security risk) :) 17:07
17:08 geekosaur left, geekosaur joined
tinita hey YAML users! it would be cool if you would try out our new YAML module and give some feedback 17:08
github.com/yaml/yaml-perl6
everything should be in the README.md. if not, bug me (or ingy)
zengargoyle prepares to steal some code from a Zoffix bot ... 17:09
17:15 kurahaupo left, kurahaupo joined
Voldenet tinita: I think your example should include what does $yaml contain, but I'm nitpicking 17:16
tinita Voldenet: yeah, that's a good idea 17:17
Geth doc: fe2398a56e | (Jan-Olof Hendig)++ | doc/Type/Supply.pod6
Added docs for Supply.skip. ugexe++
17:20
17:29 Ben_Goldberg joined, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg 17:32 Ben_Goldberg joined, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg
ugexe tinita: "Install from Source" can be reduced to `zef install github.com/yaml/yaml-perl6.git` 17:33
tinita ugexe: thanks, added 17:34
17:36 xzhao joined
Voldenet Can I tell "open" method to ignore symlinks? 17:38
17:44 zakharyas joined
Voldenet Basically, I've got this specific problem, if I could somehow tell the IO to "never follow symlinks" it would not work like that ix.io/x2w 17:45
Obviously, malicious user just spams the malicious part until it succeeds, so he can get an access to the "secret" 17:46
ugexe lock the file?
Voldenet hm, but then I can't access the file concurrently 17:47
(can I?)
ugexe you are just locking it until you "validate" it and slurp it
zengargoyle my-secrets is not readable/writeable by user. 17:52
Voldenet zengargoyle: It certainly isn't, but you don't need permissions for my-secrets to make a symlink for it! :) 17:53
and the executing user can have access to i
t
Basically, "O_NOFOLLOW" might help solve this particular issue, but open method can't do this 17:54
zengargoyle i'm wondering why original user and malicious user are intermixed. 17:56
Voldenet I might temporarily use the ugexe's solution to validate the path after opening the file
zengargoyle why is the validation shared between multiple users? 17:57
Voldenet zengargoyle: it's in the same script just for the purpose of the example, I could make it more real-world-like 17:58
zengargoyle # the resolved-path is validated already -- for different users? 17:59
where is the session or whatnot seperating the users from each other? 18:00
Voldenet zengargoyle: okay, basically, the example consists of two scripts
but I couldn't show you the race condition without actually doing it like this 18:01
oh wait, I could
18:03 BenGoldberg left 18:07 cdg joined
Voldenet zengargoyle: thanks for a suggestion, I tried to make it clearer ix.io/x2H 18:11
18:15 MilkmanDan left
Voldenet obviously it's oversimplified, and demonstrating that in real world would take a lot of time and patience, since sleep(3) in this specific place is very optimistic for the malicious user :P 18:16
18:17 raschipi joined, MilkmanDan joined
zengargoyle Voldenet: sorry, i still don't get it. malicious user seems to have more permission than he should. how can he make a request for my-secret/secret go anywhere else unless he can delete/link my-secret? 18:21
Voldenet zengargoyle: he doesn't, the problem is that original request has a lot higher permissions than malicious user 18:22
18:22 bioduds_ left
zengargoyle how are the requests from two users getting mixed? 18:23
Voldenet zengargoyle: try doing, as a normal user "cat /etc/shadow"
zengargoyle no problem. -rw-r--r-- 1 root root 1624 Nov 25 2016 /etc/shadow it's world readable 18:24
Voldenet ಠ_ಠ
Wait..., so any user can read all hashes from a script? 18:25
zengargoyle yes, isn't that the point of hashes? 18:26
Voldenet > -rw-r----- uid: root, gid: shadow
zengargoyle heh.
Voldenet Hashes are secure enough, but I wouldn't count on them being unbreakable :) 18:27
in fact, just the fact that "john the ripper" tool exists makes it a bit scary for me
even if it takes months to crack them
zengargoyle that's why when asking for a file you restrict it to under 'trusted' path. 18:28
Voldenet But then, you can first create a regular, nice file in /var/www/safe/etc/ssl/private/ssl-cert.key 18:30
count on the process being suspended for some reason, replace the "safe" with symlink to "/" 18:31
zengargoyle it seems your point is: symlink($secret-dir, $test-dir); is that `ln -s /my-secret /tmp/malicious` or is it backwards? one does nothing the other means my-secret isn't protected.
Voldenet and then, the resolved path legitimately pointing at /var/www/safe/etc/ssl/private/ssl-cert.key actually points to "/etc/ssl/private/ssl-cert.key" after being replaced 18:32
zengargoyle user A asking for my-secret/secret can only be duped if user B has write to my-secret or above. 18:34
unless you're sharing info between user A and user B. 18:35
18:35 bioduds joined
zengargoyle or i just don't get it. :P 18:35
bioduds hello
is zoffixznet on?
thanks zofixznet for the fix 18:36
zengargoyle bioduds: i think he's away. 18:37
bioduds just wanted to thank him, he fixed something I didn't see in my module
zengargoyle Zoffix++
bioduds Zoffix++
zengargoyle or there's a .tell command 18:38
raschipi "/etc/shadow it's world readable" --> Shouldn't be
zengargoyle .tell Zoffix biodude says thaks
yoleaux zengargoyle: I'll pass your message to Zoffix.
Voldenet it's bioduds, but close enough :D
raschipi "-rw-r----- 1 root shadow 1719 mai 6 23:11 /etc/shadow" in my system 18:39
bioduds thanks :D
raschipi Zoffix has a bot that sends any messages with his name on it to his twitter. 18:40
zengargoyle just pondering mentioning that the Z word sorta pings the Z dude. :P
18:42 zakharyas left
bioduds my $conn = IO::Socket::INET.new( :host<localhost>, :port(80) ); #Failed to connect: connection refused 18:43
any ideas?
on why? my port 80 is opened
zengargoyle strange, one of my debian boxes have different permissions and groups for {passwd,shadow}* but one has been alive for like forever-ish.
is there a web server listening on port 80? 18:47
18:47 espadrine_ joined
zengargoyle m: say so IO::Socket::INET.new( :host<localhost>, :port(80) ); 18:48
camelia IO::Socket::INET is disallowed in restricted setting
in sub restricted at src/RESTRICTED.setting line 1
in method new at src/RESTRICTED.setting line 32
in block <unit> at <tmp> line 1
raschipi zengargoyle: Yes, mentioning his name does summon him.
zengargoyle remembers the days of grepping /var/spool/news 18:49
bioduds: perl6 -e 'say so IO::Socket::INET.new( :host<localhost>, :port(80) );' --> True on my box. 18:50
bioduds let me
zengargoyle is the server listening on 127.0.0.1?
bioduds bioduds@BITWORKERS ~/bitworkers/EscrowChain/dev $ perl6 -e 'say so IO::Socket::INET.new( :host<localhost>, :port(80) );' Failed to connect: connection refused in block <unit> at -e line 1
rightfold Does 'use lib' use the current working directory?
bioduds weird?
zengargoyle does localhost resolve on your machine? 18:51
bioduds any ideas?
rightfold There is no documentation on 'use lib'.
bioduds let me check
zengargoyle does it connect to anywhere else?
bioduds bioduds@BITWORKERS ~/bitworkers/EscrowChain/dev $ more /etc/hosts 127.0.0.1 localhost 127.0.1.1 BITWORKERS # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters
looks like it does
zengargoyle does `host localhost` and `curl localhost` seem reasonable? 18:54
18:55 AlexDaniel left
bioduds bioduds@BITWORKERS ~/bitworkers/EscrowChain/dev $ ping localhost PING localhost (127.0.0.1) 56(84) bytes of data. 64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.018 ms 64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.026 ms 18:55
rightfold Seems BEGIN { use lib "{$?FILE.IO.dirname}/../lib" } works
:)
bioduds on your box it says True? 18:56
let me test on su
might be a permission problem, right?
nope 18:57
zengargoyle shouldn't be. also try 127.0.0.1 instead of localhost
bioduds not working as su as well
firewall?
bioduds@BITWORKERS ~/bitworkers/EscrowChain/dev $ sudo ufw enable Die Firewall ist beim System-Start aktiv und aktiviert bioduds@BITWORKERS ~/bitworkers/EscrowChain/dev $ sudo ufw status Status: Aktiv Zu Aktion Von -- ------ --- 5000 ALLOW Anywhere 80 ALLOW Anywhere 5000 (v6) 18:58
zengargoyle localhost is rarely firewalled. maybe webserver is only listening on your *real* IP?
bioduds oh, let me try with real IP
rightfold `use lib BEGIN { "{$?FILE.IO.dirname}/../lib" };` also works
zengargoyle or `curl` or `wget` or just your browser, localhost should work..... 18:59
or check your webserver logs for errors. 19:00
bioduds curl localhost?
rightfold Oh, `use lib "{$?FILE.IO.dirname}/../lib";`, even.
bioduds bioduds@BITWORKERS ~/bitworkers/EscrowChain/dev $ curl localhost curl: (7) Failed to connect to localhost port 80: Verbindungsaufbau abgelehnt
let me browse 19:01
Diese Website ist nicht erreichbar
it's offline
19:01 labster joined
zengargoyle you have some other probem of webserver you think you have on localhost:80 isn't really there. :) 19:02
bioduds worked 19:03
sort of
it blocks connections
perhaps because it is syncronous 19:04
let me check async
zengargoyle shouldn't matter.
if you can't use curl or browser, something else is wrong besides IO::Socket::INET 19:05
bioduds with async it did not hang 19:06
but also it did not respond
zengargoyle different problem... make curl work first.
bioduds weird behavior though
curl works 19:07
curl localhost:5000 <!doctype html> <html class="no-js" lang=""> <head> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <title>Bitcoin ATM by bitworkers</title>
im running it
zengargoyle did you change the port?
bioduds I mean I putted up this server on port 5000
zengargoyle did you change your IO::Socket::INET to try port 5000 19:08
raschipi bioduds: You probably have a good webserver running on localhost:631 too, you could try that. 19:12
zengargoyle does IO::Socket::INET understand IPv6? 19:13
:host<::1> and :host<[::1]> both fail :( 19:14
rightfold Is there a short way to export by default? 19:15
raschipi rightfold: Besides "is export(:MANDATORY)"? 19:18
rightfold I mean add `is export` to everything in the module. 19:19
Not `:DEFAULT`.
zengargoyle hrmmmmmm..... curl [::1] works, :host<::1> doesn't, :host<fdff:baab::1> does work..... i smell broken-ness. 19:22
zengargoyle don't hack me bro 19:23
19:24 cdg left, domidumont left 19:25 cdg joined
bioduds sorry, I was away for a while 19:27
raschipi why 631?
I'll try on later on 19:29
19:30 cdg left
raschipi bioduds: 631 is the default port for the CUPS web interface. 19:32
CUPS is the Unix print server.
zengargoyle OMG weirdness. :host<fdff:baab::1> worked once and now it doesn't work anymore
lpd is the unix print server, CUPS is a pretender!!!! but a better one. :P 19:34
raschipi zengargoyle: There are no valid IP numbers that start with "fdff" 19:36
You can see all alocations in this table: www.iana.org/assignments/ipv6-addr...pace.xhtml 19:37
bioduds ok, thanks raschipi, I'll try that 19:38
Voldenet uh, can I somehow do ".resolve and .open" methods on IO::Path?
bioduds 631 refused as well
zengargoyle raschipi: it's a bridge device. might be some other weirdness....
Voldenet but without any race conditions?
bioduds perl6 -e 'say so IO::Socket::INET.new( :host<localhost>, :port(631) );' Failed to connect: connection refused 19:39
raschipi 631 refused? That sounds like a firewall.
zengargoyle lxcbr0: ... inet6 fdff:baab::1
bioduds bioduds@BITWORKERS ~/bitworkers/EscrowChain/dev $ sudo ufw allow 631 [sudo] Passwort für bioduds: Regel hinzugefügt Regel hinzugefügt (v6) bioduds@BITWORKERS ~/bitworkers/EscrowChain/dev $ perl6 -e 'say so IO::Socket::INET.new( :host<localhost>, :port(631) );' Failed to connect: connection refused in block <unit> at -e line 1
not firewall, I'd say 19:40
I'm confused, I still have reading to do I believe
don't worry for now
I'll come back later if I don't figure this out
see ya :D 19:41
zengargoyle *cough* it fails with my real global IPv6 address as well.... 19:42
rightfold Crazy idea: when backtracking is possible, parse all branches parallel :D
Voldenet pulls hairs out of his head
19:42 Cabanossi left
Voldenet I can't make this work anyhow, no matter what order of .open and .resolve I do on filepath, I can't get them both correctly ix.io/x36 19:42
19:44 anon_ left
Voldenet I can either open a handle and then get invalid path to validate out of it 19:44
zengargoyle does IO::Socket::INET even support IPv6 or does it have a weird syntac that isn't just the hex or [hex]? because curl works and INET fails....
Voldenet or I can validate a requested path and open an invalid file 19:45
19:45 Cabanossi joined
zengargoyle pissed if INET doesn't do IPv6 :P 19:45
zengargoyle prepares to be pissed :) 19:46
Voldenet it does ipv6 19:47
you need to set :family(3) parameter
> say so IO::Socket::INET.new(:host<::> :port(80) :family(3)) 19:48
19:48 anon joined
zengargoyle gah, where is transparency with regards to host? 19:48
19:48 anon is now known as Guest20488
Voldenet I see you can set family(3) for ipv4 too 19:49
> say so IO::Socket::INET.new(:host<127.0.0.1> :port(80) :family(3))
zengargoyle if hostname is given and it resolves to v4 it works and if it resolves to v6 it breaks????
:family(3) does nothing. 19:50
raschipi It should do happy eyballs, per RFC6555 19:51
19:51 Possum left
zengargoyle eh, strike that, it does notihing with [IPv6] but works with bare IPv6. 19:52
that's broken. 19:53
how is one to know that $hostname is v6 or v4 in order to supply the :family(3) to make it work? 19:54
raschipi zengargoyle: The standard is that you shouldn't specify and it should choose on it's own. 19:56
zengargoyle v4 without :family(3) works, v4 with :family(3) works, v6 requires the :family(3) or it fails....
raschipi: exactly, it's broken.
20:01 TEttinger joined 20:06 wamba joined
zengargoyle fakudobug's 20:07
rakudobug'd 20:08
zengargoyle 's graarr tank is empty. :)
ingy raschipi: re: parsing something like +a + b 20:12
raschipi: I think there's no conflict
zengargoyle watches Attack on Titan and goes to bed. 20:13
20:13 zengargoyle is now known as zengargoyle_
ingy raschipi: because at the time you are looking for an operand, you look for a unary and then interpret it as (_ <+> a) + b 20:13
raschipi: where _ is a dummy token and <+> is a unary plus (for whatever a unary plus should do. 20:14
20:14 javan joined
ingy then you just treat it as a binary op, assign it a precedence, and you are done. this *might* mean that all unary ops can be included in a binary expression grammar that way 20:15
masak too: ^^ 20:16
Voldenet zengargoyle_: using v4 only by default helps a lot in most common scenarios, because "try using v6 and then fall back to v4" leads you into waiting 30s for v6 timeout 20:18
in case the network itself supports v6, but the routers don't
i wonder what does rfc say about this, because it's very puzzling 20:19
raschipi Voldenet: The standard is to use the "happy eyballs" algorithm. i.e. Try to connect to both at the same time and keep using the first one that connects. 20:20
Voldenet Oh.
raschipi This way IPv6 isn't used if the IP legacy connection has lower latency, even. 20:22
Voldenet it's a bit wasteful, but sane 20:23
raschipi Because the v6 connection sometimes goes through a tunnel and that leads to 'IPv6 brokenness'.
Which is when the system chooses a high latency IPv6 connection over a low latency legacy connection. That's why the latency is measured by trying to connect to both. 20:25
It's not just about choosing one that works, it's important to choose the one with lower latency. 20:26
20:26 cdg joined
raschipi So, not wasteful at all, it's the only way it can actually work. Can't know which has lower latency without trying. 20:26
20:27 uberbaud joined, uberbaud left
Voldenet well yeah, autodetection needs to do that, "wasteful" is the part where there could be just one request over one, specified proto 20:29
20:30 cdg left, uberbaud joined
Voldenet but I like the name for this algorithm :) 20:32
20:32 uberbaud left 20:33 uberbaud joined
raschipi The opposite case also happens, some mobile carriers have IPv6-only networks and all legacy IP connections go through a tunel. In that case, if v6 native connectiona are available, they should be chosen. 20:34
One can't know at all which connection should be used before trying both. 20:36
Voldenet Oh, I didn't know there are networks that actually use 6to4 tunels already 20:37
20:37 uberbaud left
Voldenet the only real scenario of disabling that is the case where user knows he doesn't have v6 (which is majority, and I guess that's why :family(2) is used by default) 20:38
raschipi If IPv6 is disabled, it will fail immediatly, so no need to deal with it at this level. 20:39
Just the fact that there won't be a default IPv6 route will make the system reject the connection. 20:40
20:41 bioduds left
raschipi As these things come and go, networks connect and disconnect at will, a programm running in the computer never knows what to expect. It should try IPv6 anew in every connection. 20:42
20:42 Cabanossi left 20:44 uberbaud joined
raschipi Giving an option to never try either protocol is reasonable, but the default should be what's in the RFC. 20:44
20:44 Cabanossi joined
raschipi Anything else is broken, like zengargoyle_ said. 20:44
Voldenet yeah, DWIM is "do whatever works best", definitely 20:45
20:46 szabgab joined, javan left
szabgab Hi, I hope someone can help me understand what's going on with my installation: Fresh Rakudo Star 2017.04 installation on Linux from tar.gz. 'zef install Bailador' claims to install 0.0.4, but actually sees the dependency list of 0.0.3 which was missing a dependency. This file: github.com/ugexe/Perl6-ecosystems/...r/p6c.json still lists 0.0.3 20:48
moritz szabgab: was Bailador 0.0.4 released recently? 20:50
szabgab yes, about 2 hours ago.
zengargoyle_ I've seen things you people wouldn't believe. Attack ships on fire off the shoulder of Orion. I watched C-beams glitter in the dark near the Tannhäuser Gate. All those moments will be lost in time, like tears in rain. Time to die.
szabgab so as I understand that json file in the ecosystem will be updated in 1-2 hours
but then why did zef report that it is installing 0.0.4 ? 20:51
20:52 rindolf left
moritz it might have cloned the current version of the repo, but used the meta data from that .json file 20:52
for the dependencies at least
szabgab that's my only explanation too, but now I am really afraid to guess as apparently that does not work well for me 20:53
20:54 CacoS left
szabgab And I could not find an explanation how these things work to understand what to really expect and how to help the other people on the Bailador channel 20:54
I hope by the time I get up this will be resolved by some cron-job. & 20:57
20:57 szabgab left 20:58 uberbaud left
Voldenet re-requesting some help: how do I validate the path of opened file before opening it? 21:01
This is what I got atm, but it's plagued by a race condition between "resolve" and "open" operation, no matter how I try ix.io/x36
Oops, I copied one test twice for no reason, here's the version without that ix.io/x3F 21:04
Geth doc: c2de7ab667 | (Jan-Olof Hendig)++ | doc/Type/Hash.pod6
Fixed example output
21:07
21:12 Cabanossi left 21:14 Cabanossi joined 21:18 espadrine_ left
raschipi Voldenet: Have you tried readlink into /proc/sef/fd ? 21:19
"resolve" is just String manipulation as far as I know, you need to ask the kernel where the file descriptor in poiting at. 21:20
"/proc/self/fd"* 21:21
Voldenet raschipi: resolve is doing nqp::stat and nqp::fileislink in its core 21:23
and readlink: docs.perl6.org/language/5to6-perlfunc#readlink 21:26
raschipi Well, I'm talking about using the readlink binary with run or the libc readlink function with NativeCall. 21:27
Voldenet but how do I open the file after I have the link? The link I got might be replaced with a symlink already 21:28
raschipi You look into /proc/self/fd, there will be a link there to the file each file descriptor represents. You do realink on them to see where they are pointing to. Can't do that without opening the file first. 21:29
Voldenet Ah, that sounds sane!
raschipi Well, it was created specifically to allow this operation, so it better be sane! 21:33
Create the readlink Nativecall binding and publish it as a module.
21:43 AlexDaniel joined
Geth ecosystem: 97b7439c60 | (Jonathan Scott Duff)++ | META.list
Add Time::Duration::Parser
21:45
21:57 travis-ci joined
travis-ci Doc build errored. Jan-Olof Hendig 'Fixed example output' 21:57
travis-ci.org/perl6/doc/builds/241597515 github.com/perl6/doc/compare/fe239...de7ab667e2
21:57 travis-ci left
ugexe github.com/ugexe/Perl6-ecosystems/...r/p6c.json is just a mirror of the ecosystem, and its not even the primary one 22:00
and its installing because you've presumably installed it before locally so its cached. this would be apparent if you used -v 22:01
installing 0.0.4^ 22:02
well, if you are using zef:ver<0.1.15+> or some such and not the 0.1.9 rakudo star 2017.04 comes with 22:03
or its already updated on the p6c ecosystem list 22:04
your dependency problem is probably related to bad versioning and caching
22:12 Cabanossi left 22:14 Cabanossi joined 22:24 |oLa| joined 22:29 BenGoldberg joined 22:31 nadim joined 22:34 BenGoldberg left 22:36 BenGoldberg joined
Voldenet A propos NativeCall, is there any good way to include constants from headers, like limits.h? 22:49
timotimo there's GPTrixie which uses clang or gcc to get everything out of header files 22:51
23:06 bioduds joined
Voldenet I'm afraid it doesn't work very well for limits.h and unistd.h - how smelly is the idea of writing C/Cpp code for native methods? 23:12
raschipi Voldenet: Code is good if it's delivered before your boss fires you. 23:19
Voldenet it's even better if you're delivering it instead of getting fired ;) 23:20
not before
raschipi Yeah, as long as you keep the job, it's good code. 23:21
Voldenet but still, some code would be trivial in C, but extremely hard in p6 (due to magic constants for error handling and so on) 23:27
jnthn It's not that hard to read a header file and turn `#define FOO 42` into `constant FOO = 42;` 23:29
Or an enum, like github.com/jnthn/p6-ssh-libssh/blo...aw.pm6#L40 23:30
BenGoldberg One thing we can't *yet* do in perl6 is translate `typedef int (*function_pointer_t)(blahblahblah)` into a meaningful perl6 type... which is important for things like guis. 23:41
jnthn Well, you can inline it into each signature, if that's where it's used, which is enough for callbacks, if a tad verbose. 23:42
23:42 Cabanossi left
jnthn But yeah, if it's a "fill up a struct of function pointers" then you're out of luck at the moment 23:42
jnthn ran into that
23:45 Cabanossi joined 23:49 AlexDaniel left 23:58 wamba left