»ö« 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:05 BenGoldberg joined 00:09 mrons joined, mrons left 00:10 haircode joined, haircode left, haircode joined 00:11 mrons joined, firstdayonthejob left 00:12 mrons left 00:15 daxim left 00:16 daxim joined 00:19 teachmeUNIX left 00:20 raiph left 00:27 cdg left 00:29 raiph joined, lokien_ left 00:32 ruoso_ left 00:33 roguelazer left, perlawhirl joined 00:34 arlenik_ joined 00:44 hippie1 left 00:48 geraud left 00:49 spider-mario left, lichtkind left, geraud joined 00:53 roguelazer joined 00:56 xpen joined, ruoso joined 00:57 yeahnoob joined, lnrdo joined 01:00 ELBeavers joined 01:01 xpen left 01:02 lnrdo left 01:05 ELBeavers left 01:11 meth joined 01:13 cognominal joined 01:14 arlenik_ left 01:15 meth is now known as teachmeUNIX 01:19 pierre-vigier joined 01:23 yqt left 01:31 Actualeyes joined 01:35 Zoffix joined 01:36 Zoffix left 01:39 average joined
average a word of caution for all the CoC purists in here 01:39
lobste.rs/s/3hwckc/banning_mr_nutt...harassment
notice what has happened in the misuse of CoC , basically the bashing of an individual in a public blogpost 01:40
and the CoC and policies are used to support that
this is not ok
it's a very bad example for any OSS project to do that
and these CoC-backed disputes are on the rise, you can see them in a lot of places these days: 01:42
- github issues
- blogposts
- mailing lists
01:43 leont left
average but GH issues are increasingly becoming this sort of pugilistic parking lot where devs are duking it out 01:45
01:58 zacts joined 02:03 maslan left 02:08 Zoffix joined
Zoffix I'm trying to install SDL module and I'm getting "Cannot locate native library 'liblibSDL.so': liblibSDL.so: cannot open shared object file: No such file or directory".... that double-lib is suspicious. Were there NativeCall changes that removed the need to use the "lib"? 02:09
02:10 average left
skids .tell hoelzro I don't use any of those IDPs used by disqus, so here's comment on your pod blog: gist.github.com/skids/5c768ad78302a6b85142 02:11
yoleaux skids: I'll pass your message to hoelzro.
Zoffix Hmmm... "Hi Zoffix, I really enjoyed your Mojo talk and I see that you've been making a splash by blogging about Perl6. :) What would you think about presenting something to TPM about Perl6? I'm sure a lot of folks would be interested." 02:12
Anyone near Toronto who wants to do a Perl 6 talk?
jdv79 aren't you? 02:13
02:13 avs_ joined 02:15 pierre-vigier left
Zoffix I am.... It's just... it's a really homogenous dude-only group. I kinda felt weirded out a bit during my Mojo talk :) 02:15
02:15 pierre-vigier joined, kaare_ joined
jdv79 sounds like every tech meeting i've been too 02:15
*to
well, smaller ones at least. 02:16
02:17 xdoctor left 02:18 xpen joined 02:20 Juerd left 02:21 avs__ joined 02:24 avs_ left 02:28 Juerd joined
Zoffix Well... there goes nothing.... 02:29
"Yes, I would be interested in doing a Perl 6 presentation. Which month were you thinking to do it in?"
02:32 Juerd left 02:33 Juerd joined 02:36 teachmeUNIX left 02:40 Jesmaybe joined 02:41 kaare_ left, lustlife joined 02:42 meth joined, pierre-vigier left 02:45 pierre-vigier joined 02:46 ilbot3 left, onMeth joined 02:48 ilbot3 joined, onMeth left, onMeth joined 02:49 ELBeavers joined, onMeth left 02:50 meth left
Zoffix Well, SDL module seems to be broken beyond repair. I progressed beyond my 'liblib' only to be stymied by everything else... github.com/PerlGameDev/SDL6/issues/9 02:51
Jesmaybe hmmm, so perl6 games might be a thing? haha 02:52
Zoffix There seems to be at least one that I was trying to run: modules.perl6.org/#q=games 02:53
I'm also making Dice Poker that I kinda wanted to make look good too
02:54 ELBeavers left, AlexDaniel left
Zoffix And there appear to be a couple of games in github.com/timo/SDL2_raw-p6 that I'm about to try to run 02:54
02:54 FreezerburnV joined
Jesmaybe cool, cool. 02:54
02:59 meth joined 03:00 lnrdo joined, meth left
Zoffix timotimo, seems both conditions assign the same values here: github.com/timo/SDL2_raw-p6/blob/m.../Raw.pm#L4 03:04
03:05 lnrdo left
hoelzro skids: thanks for that input; I hadn't considered nesting declarative POD inside of other POD blocks! 03:14
yoleaux 02:11Z <skids> hoelzro: I don't use any of those IDPs used by disqus, so here's comment on your pod blog: gist.github.com/skids/5c768ad78302a6b85142
hoelzro that should definitely be a thing 03:15
03:15 cognominal left, cognominal joined 03:18 addison left, kid51 left, meth joined, meth left 03:19 meth joined, meth left 03:25 Actualeyes left
FreezerburnV So I have a class that takes in the parameter named $event, it then tries to call "self.bless($:event)", where I have a BUILD sub with :$event as a parameter. I'm getting the error "Redeclaration of symbol $:event as a placeholder parameter" when this worked pre-Christmas 03:25
What am I doing wrong here?
Zoffix is surprised $:event is a thing 03:26
geekosaur so'm I
not sure if that should be :$event or something else
Zoffix Well, yeah, it should be :$event
geekosaur I thik $: twigil is reserved?
FreezerburnV Ah, maybe it didn't work then
And I'm just confused
Haven't touched this code in a few weeks 03:27
geekosaur but I think $: was accidentally accepted without error pre-Christmas
Zoffix Ah
geekosaur I vaguely recall a bug about that
FreezerburnV Aaah
Zoffix doc.perl6.org/language/variables#The_%3A_Twigil
FreezerburnV, I think you should remove the :$event in the parameter list
That, or change the bless to :$event 03:28
FreezerburnV So: sub BUILD($:event), then call self.bless(:$event)
Zoffix m: sub foo (:$event) { say $:event }
camelia rakudo-moar 775271: OUTPUT«5===SORRY!5=== Error while compiling /tmp/VxaKIybGXe␤Redeclaration of symbol $:event as a placeholder parameter␤at /tmp/VxaKIybGXe:1␤------> 3sub foo (:$event) { say $:event7⏏5 }␤»
03:28 meth joined
FreezerburnV I have "sub BUILD(SDL_Event :$event)" compiling somehow 03:29
Zoffix hmmm
FreezerburnV Theoretically, at least. I have some missing symbols due to an old version of a file I have
Zoffix m: sub foo (:$event) { bar :$event }; sub bar () { say $:event }; foo "meow"
camelia rakudo-moar 775271: OUTPUT«5===SORRY!5=== Error while compiling /tmp/LdyEAtAFoe␤Placeholder variable '$:event' cannot override existing signature␤at /tmp/LdyEAtAFoe:1␤------> 3sub foo (:$event) { bar :$event }; sub7⏏5 bar () { say $:event }; foo "meow"␤»
03:30 stmuk_ joined, telex left
Zoffix m: sub foo (:$event) { bar :$event }; sub bar { say $:event }; foo :event<meow> 03:30
camelia rakudo-moar 775271: OUTPUT«meow␤»
03:32 stmuk left, telex joined 03:38 vendethiel joined 03:41 mrons joined
mrons msg NickServ SENDPASS mrons 03:43
03:44 MadcapJake left 03:46 cpage_ joined
geekosaur ewps 03:46
03:47 noganex_ joined
ugexe .tell jdv79 thanks, managed to get a basic distro request, deps fetched, tars extracted, and finally installed with it. would have a better idea if the dists weren't months old heh 03:49
yoleaux 20 Jan 2016 22:53Z <jdv79> ugexe: its back up. maybe its time to run it better.
ugexe: I'll pass your message to jdv79.
03:49 noganex left
mrons /msg NickServ SETPASS mrons axzawkbxygyy Hey1Hey1 03:53
03:56 yeahnoob left 03:59 mrons left, kanishka left 04:01 BenGoldberg left, khw joined, mrons joined, vendethiel left 04:02 mrons left
cognominal is there a way to test if a named argument is absent? which is different from a present named argument with an undefined value. 04:03
04:03 mrons joined
cognominal this a nqp question btw 04:04
llfourn cognominal: I don't think so. Though it would weird if someone manually set a named arg to NQPMu to trick you :P 04:05
04:07 molaf joined 04:09 davido joined
cognominal ok, then I will test for NQPMu to assess an absent argument 04:09
llfourn yes I think that's the way to do it
cognominal I want to add an :actions parameter to the LANG method 04:10
llfourn cognominal: interesting. what is LANG in this case?
04:10 araujo_ joined 04:11 pierre-vigier left
cognominal github.com/perl6/nqp/blob/master/s...r.nqp#L656 04:11
llfourn cognominal: cool so you could use your own actions with P6 grammar? 04:12
cognominal motivation: I am writing a slang generating AST. I use the variable rule put depending on the context, it generate a QAST::Var or a nqp var. 04:13
04:14 araujo left
llfourn so this is to help you write slangs? 04:14
cognominal lifourn: yes, you can you use a lang but with your own action class or none.
llfourn I will be interested to see what you come up with. Slangs are very releveant to my interests. 04:15
also parsing P6 without actually compiling any code is relevant to lots of peoples interests I think 04:16
04:17 davido left 04:20 meth left
cognominal lifourn: I am not sure that's currently possible. I fear a lot of context is set in the actions that are necessary for further parsing. Probably the actions class should be broken in a context setting Actions class and a derived class that does the code generation. 04:20
llfourn cognominal: yeah I was going to say... Maybe all the context settings thing could put into the grammar itself. 04:21
but packaged in some way that it doesn't make a mess
cognominal I am happy to see there is a lot of interest like the P6FE author (forgot his nick). 04:23
llfourn MadCapJake 04:24
yeah being able to re-use the Perl 6 grammar for completions and editor support would be awesome obviously
04:24 n0tjack joined 04:26 MadcapJake joined 04:30 molaf left 04:37 ELBeavers joined 04:41 ELBeavers left 04:44 Actualeyes joined 04:46 yeahnoob joined 04:47 lokien_ joined 04:50 FreezerburnV left
MadcapJake I've been casually posting links to this new site for developers called Hashnode hashnode.com 04:51
It's kind of like reddit + stackoverflow + twitter polls all rolled into one and only about software dev
I'm only posting Perl 6 content from around the web. Gotta represent! ✊ 04:53
skids follows. 04:56
04:58 km3 joined 05:02 lnrdo joined 05:06 lnrdo left 05:10 skids left 05:20 Herby_ joined
Herby_ Good evening, everyone! 05:20
cognominal m: my %a = 'a'..'d'; use nqp; say nqp::atkey(%a, 'a') 05:24
camelia rakudo-moar 775271: OUTPUT«b␤»
Herby_ o/ 05:25
cognominal \o
05:39 n0tjack left
Herby_ anyone familiar with the Gumbo Parser? 05:42
Trying to figure out how to install it on Ubuntu 05:43
github.com/google/gumbo-parser
I'm new to linux and I don't quite understand the installation instructions
trying to install Gumbo Parser, so I can use the perl6 Gumbo binding
05:44 CIAvash joined 05:46 maslan joined, Cabanossi left 05:48 Cabanossi joined 05:50 yeahnoob left 05:54 yeahnoob joined 05:57 petercom1and left, petercom1and joined, petercom1and is now known as petercommand 06:05 maslan left 06:07 Herby_ left, khw left 06:11 arlenik_ joined 06:12 pierre-vigier joined 06:16 arlenik_ left, yurivish_ left
MadcapJake .tell Herby_ I think it's just sudo apt-get install libgumbo1 06:16
yoleaux MadcapJake: I'll pass your message to Herby_.
perlawhirl m: ?('!?.,;;:' ~~ /<:punct>/), ?('!?.,;;:' ~~ /<:Punct>/) 06:18
camelia rakudo-moar 775271: OUTPUT«WARNINGS for /tmp/ZYkLZWUNf3:␤Useless use of "?" in expression "?('!?.,;;:' ~~ /<:Punct>/)" in sink context (line 1)␤Useless use of "?" in expression "?('!?.,;;:' ~~ /<:punct>/)" in sink context (line 1)␤»
perlawhirl m: say ?('!?.,;;:' ~~ /<:Punct>/)
camelia rakudo-moar 775271: OUTPUT«False␤»
perlawhirl m: say ?('!?.,;;:' ~~ /<:punct>/)
camelia rakudo-moar 775271: OUTPUT«True␤»
perlawhirl Looks like unicode_db is missing Punct with a capital P 06:19
06:42 jme` left 06:49 lokien_ left 06:52 alber left 06:58 marmay_ joined 07:02 geraud left 07:07 perlawhirl left 07:13 avs_ joined 07:17 avs__ left 07:19 _mg_ joined 07:30 nakiro joined 07:35 FROGGS joined 07:37 darutoko joined 07:43 pdcawley_ left 07:44 firstdayonthejob joined 07:45 domidumont joined 07:50 domidumont left 07:51 domidumont joined 07:56 zakharyas joined 07:57 kanishka joined 07:59 mrons left, pierre-vigier left 08:04 lnrdo joined 08:09 Actualeyes left, yurivish joined, lnrdo left 08:13 pierre-vigier joined 08:14 abraxxa joined
abraxxa good morning! 08:15
08:24 pierre-vigier left
moritz good morning 08:24
is there a good reason for the Unicode properties to be case sensitive at all?
08:25 pierre-vigier joined, cschwenz joined
FROGGS moritz: I dunno... I mean, for a property Foo_Bar we also support FooBar and foobar 08:26
08:26 cschwenz left, pierre-vigier left
FROGGS on the other hand everything is case sensitive 08:27
so why should there be an exception?
08:27 cc9989 joined 08:29 ely-se joined 08:30 abaugher left
moritz I'm trying to find out how Unicode names that property 08:30
08:30 abaugher joined 08:31 RabidGravy joined, yurivish_ joined 08:32 yurivish left 08:37 pierre-vigier joined
RabidGravy marnin! 08:39
DrForr o/ 08:42
08:42 adhoc_ left 08:44 xinming left 08:45 xinming joined 08:46 pierre-vigier left 08:52 domidumont left 09:01 rindolf joined 09:04 jast joined
masak good antenoon, #perl6 09:05
09:05 nowan left 09:08 leont joined 09:09 bjz joined 09:10 g4 joined, g4 left, g4 joined, nowan joined
RabidGravy RARR! 09:14
09:16 kjs_ joined 09:19 bjz left 09:20 dakkar_ joined, pierre-vigier joined 09:21 rindolf left 09:22 raiph left 09:27 bjz joined
RabidGravy m: sub fib(Int $i) { (0 .. $i).reduce( { $^a + $^b });}; say fib(100) 09:29
camelia rakudo-moar 775271: OUTPUT«5050␤»
09:29 araujo_ left
RabidGravy m: sub fib(Int $i) { (0 .. $i).reduce( { $^a + $^b });}; say fib(100); say now - INIT now 09:29
camelia rakudo-moar 775271: OUTPUT«5050␤0.012489␤»
RabidGravy m: sub fib(Int $i) { (0 .. $i).reduce( { $^a + $^b });}; say fib(100); say now - BEGIN now
camelia rakudo-moar 775271: OUTPUT«5050␤0.03500472␤»
09:29 araujo joined, araujo left, araujo joined
RabidGravy m: sub fib(Int $i) { (0 .. $i).reduce( { $^a + $^b });}; say fib(1000); say now - BEGIN now 09:29
camelia rakudo-moar 775271: OUTPUT«500500␤0.06357005␤»
RabidGravy m: sub fib(Int $i) { (0 .. $i).reduce( { $^a + $^b });}; say fib(10000); say now - BEGIN now 09:30
camelia rakudo-moar 775271: OUTPUT«50005000␤0.2198037␤»
RabidGravy m: sub fib(Int $i) { (0 .. $i).reduce( { $^a + $^b });}; say fib(100000); say now - BEGIN now
camelia rakudo-moar 775271: OUTPUT«5000050000␤2.6733089␤»
09:30 perlawhirl joined
RabidGravy why is that last one ~ ten times slower rather than approximately four times as I would have guessed? 09:31
09:33 avs_ left
RabidGravy no, biggy still waaaaaaaaay faster for larger numbers than the python version in www.rabbitmq.com/tutorials/tutorial...ython.html 09:34
09:35 domidumont joined 09:37 leont left, Actualeyes joined 09:40 CIAvash left
RabidGravy e.g. 09:43
m: multi fib(0) { 0 }; multi fib(1) { 1 }; multi fib(Int $i) { fib($i - 1) + fib($i - 2) }; say fib(10); say now - BEGIN now
camelia rakudo-moar 775271: OUTPUT«55␤0.0332950␤»
RabidGravy m: multi fib(0) { 0 }; multi fib(1) { 1 }; multi fib(Int $i) { fib($i - 1) + fib($i - 2) }; say fib(20); say now - BEGIN now
camelia rakudo-moar 775271: OUTPUT«6765␤0.6049244␤»
RabidGravy m: multi fib(0) { 0 }; multi fib(1) { 1 }; multi fib(Int $i) { fib($i - 1) + fib($i - 2) }; say fib(30); say now - BEGIN now 09:44
09:44 Guest11472 is now known as luiz_lha, zakharyas left
camelia rakudo-moar 775271: OUTPUT«(timeout)» 09:44
RabidGravy at which point it craps out
09:45 zakharyas joined 09:46 nadim joined 09:47 M-eternaleye left, M-eternaleye joined 09:48 M-eternaleye is now known as eternaleye 09:51 kjs_ left 09:52 Actualeyes left 10:01 yeahnoob left 10:02 ELBeavers joined 10:06 perlawhirl left, lnrdo joined 10:07 ELBeavers left, salv0 joined 10:11 lnrdo left
dalek rl6-most-wanted: bba23ad | pmqs++ | most-wanted/modules.md:
Update modules.md
10:11
rl6-most-wanted: ea88356 | (Fritz Zaucker)++ | most-wanted/modules.md:
Merge pull request #14 from pmqs/patch-3

Fix typo for Archive::SimpleZip
10:12 maslan joined, nadim left 10:14 domidumont left 10:15 perlawhirl joined, domidumont joined 10:17 espadrine joined 10:19 perlawhirl left 10:20 perlawhirl joined
perlawhirl moritz: re "is there a good reason for the Unicode properties to be case sensitive at all?" 10:20
'Punct' is how it's written in the docs
so i guess you could just update the docs :D 10:21
10:22 espadrine_ joined 10:23 espadrine left 10:29 huggable left, rodarmor left 10:32 rodarmor joined
moritz perlawhirl: sounds surprisingly sensible 10:32
m: say so '2' ~~ /<:Digit>/
camelia rakudo-moar 775271: OUTPUT«True␤»
timotimo o/
moritz m: say so '2' ~~ /<:Cntrl>/
camelia rakudo-moar 775271: OUTPUT«False␤»
moritz m: say so "\r" ~~ /<:Cntrl>/ 10:33
camelia rakudo-moar 775271: OUTPUT«False␤»
moritz m: say so "\r" ~~ /<:cntrl>/
camelia rakudo-moar 775271: OUTPUT«True␤»
timotimo Zoffix: yeah, they do. i could only fix the linux version of that, because i don't have a windows. it may need fixing, too, with the latest nativecall changes, but i can't test it.
dalek c: 68fa353 | moritz++ | doc/Language/regexes.pod:
Fix case of abbreviated Unicode properties, perlawhirl++
perlawhirl m: say so '2' ~~ /<:digit>/ 10:35
camelia rakudo-moar 775271: OUTPUT«True␤»
perlawhirl i ... just search DDG for 'pure functions' and it's showing me images of sex toys? 10:40
so yeah... fair warning 10:41
ely-se What is the opposite of slurp? 10:44
timotimo spurt
ely-se ah, thanks 10:45
TEttinger perlawhirl: is that some kind of metaphor for academic pure functional programming being intellectual masturbation?
llfourn DDG often shows me different types of perversions when searching for perl stuff 10:46
TEttinger perlversions
perl 6 is a perlversion 10:47
ely-se m: $*SPEC.catpath('/', 'etc', 'passwd').say
camelia rakudo-moar 775271: OUTPUT«etc/passwd␤»
ely-se hmm, interesting.
m: $*SPEC.catpath('etc', 'passwd').say
camelia rakudo-moar 775271: OUTPUT«Too few positionals passed; expected 4 arguments but got 3␤ in block <unit> at /tmp/_Zc9FMnafX line 1␤␤»
TEttinger m: $*SPEC.catpath('/', 'etc', 'passwd').text 10:48
camelia rakudo-moar 775271: OUTPUT«Method 'text' not found for invocant of class 'Str'␤ in block <unit> at /tmp/65pTinTTPs line 1␤␤»
10:48 km3 left 10:51 frankjh joined
timotimo ely-se: it may want the first argument to be like a drive letter? 10:51
m: $*SPEC.catpath('', '/', 'etc', 'passwd').say
camelia rakudo-moar 775271: OUTPUT«Too many positionals passed; expected 4 arguments but got 5␤ in block <unit> at /tmp/CHbXp7aedr line 1␤␤»
timotimo um ...
or not?
ely-se moritz: are there plans for pretty-printing in JSON::Tiny? 10:52
RabidGravy there is JSON::Pretty already 10:53
10:54 kjs_ joined 10:55 bjz_ joined
ely-se oh I see 10:56
FROGGS m: say to_json { foo => <one two three> }
camelia rakudo-moar 775271: OUTPUT«5===SORRY!5=== Error while compiling /tmp/IvQf7BoOJg␤Undeclared routine:␤ to_json used at line 1. Did you mean 'to-json'?␤␤»
FROGGS m: say to-json { foo => <one two three> }
camelia rakudo-moar 775271: OUTPUT«{␤ "foo" : [␤ "one",␤ "two",␤ "three"␤ ]␤}␤»
FROGGS ely-se: and that's the same --^
10:57 bjz left
timotimo doesn't JSON::Fast also have pretty-printing? 10:58
github.com/timo/json_fast/blob/mas...ast.pm#L13
this to-json is also significantly faster compared to JSON::Tiny's to-json
11:00 kjs_ left, lnrdo joined, lnrdo left 11:03 rindolf joined
ely-se timotimo: no idea. catpath is poorly documentd 11:08
the first argument is unnamed, even
timotimo :\ 11:09
11:11 mprelude joined
FROGGS m: say $*SPEC.^find_method('catpath').signature 11:11
camelia rakudo-moar 775271: OUTPUT«(IO::Spec::Unix $:, $dirname, $file, *%_)␤»
FROGGS ely-se: that $ is the invocant
($*SPEC here)
m: $*SPEC.catpath('etc', 'passwd').say 11:12
camelia rakudo-moar 775271: OUTPUT«Too few positionals passed; expected 4 arguments but got 3␤ in block <unit> at /tmp/WGf63Djvse line 1␤␤»
11:14 perlawhirl left, perlawhirl joined 11:21 Peter_R joined
sortiz o/ #perl6, just send my first PR for the ecosystem 11:24
dalek osystem: e2f7e4c | (Salvador Ortiz)++ | META.list:
Add p6-LMDB to ecosystem

See github.com/salortiz/p6-LMDB
11:27
osystem: 98bc743 | moritz++ | META.list:
Merge pull request #129 from salortiz/master

Add p6-LMDB to ecosystem
DrForr Cthulhu save me from git newbs...
moritz DrForr: if you pray to Cthulhu, it might help you in ways you didn't anticipate. Like eating you whole. That would save you from the git newbs, to be sure :-) 11:28
sortiz moritz++ # Thank you 11:29
11:29 lnrdo joined
DrForr That's all I ask, to be found crunchy and good with ketchup. 11:29
moritz sortiz: you're welcome. Our nicks seem to have a frightening low edit distance :-) 11:30
11:31 kjs_ joined
sortiz moritz, I hope soon that distance is reflected in the knowledge of perl6 :-) 11:35
masak sortiz++ # first PR
11:36 g4 left 11:38 g4 joined
DrForr The annoying part is really that to make any headway whatsoever I can't make a single assumption, like "Are you up-to-date?"... 11:40
Which results in the usual "Oh, you got that command from your coworker which only works if you do X, and you instead were doing Y but didn't know, so you ended up with result Z." 11:41
RabidGravy goes with 11:42
m: use nqp; say nqp::sha1(rand ~ $*PID ~ DateTime.now.Str)
camelia rakudo-moar 775271: OUTPUT«9A73EB104EB91EB6F56024F6B95F1DA981C4B89D␤»
RabidGravy rather than using Data::UUID 11:43
sortiz masak, *, All comments, questions, guidance, etc. are welcome
masak sortiz: start small. iterate often. ask "stupid" questions. :) 11:44
11:46 pmurias joined
pmurias hi 11:46
11:46 ely-se left, kaare_ joined 11:50 ELBeavers joined 11:53 colomon left
masak hi, pmurias 11:54
11:56 ELBeavers left 11:57 kid51 joined 11:58 colomon joined 12:01 pierre-vigier left 12:04 marmay joined 12:05 nowan left 12:07 keix joined 12:08 jdrab left, nowan joined 12:09 _mg_ left 12:12 espadrine_ is now known as espadrine 12:14 _mg_ joined 12:18 Actualeyes joined 12:24 perlawhirl left 12:27 pierre-vigier joined 12:29 sm0x_ is now known as sm0x 12:31 Alina-malina joined 12:33 ely-se joined 12:37 pierre-vigier left 12:39 Alina-malina left 12:40 zakharyas left
ely-se m: $*SPEC.join('a', 'b', 'c').say 12:43
camelia rakudo-moar 775271: OUTPUT«b/c␤»
ely-se m: $*SPEC.dir-sep.say 12:44
camelia rakudo-moar 775271: OUTPUT«/␤»
12:47 arlenik joined 12:48 FreezerburnV joined
ely-se :m $*PERL.gist.say 12:52
m: $*PERL.gist.say
camelia rakudo-moar 775271: OUTPUT«Perl 6 (6.c)␤»
ely-se can I get the "6.c" part? there doesn't seem to be a method for it 12:53
12:53 Actualeyes left 12:54 skids joined
ely-se Also, if I say "use vXXX;" for some valid version XXX, does $*PERL report XXX or the most recent supported version? 12:55
12:56 rindolf left
timotimo m: say $*PERL.^attributes 12:57
camelia rakudo-moar 775271: OUTPUT«(Compiler $!compiler Str $!name Str $!auth Version $!version Blob $!signature Str $!desc)␤»
timotimo m: say $*PERL.version
camelia rakudo-moar 775271: OUTPUT«v6.c␤»
ely-se oh I tried .^methods
interesting
timotimo m: say $*PERL.^methods
camelia rakudo-moar 775271: OUTPUT«(BUILD VMnames DISTROnames KERNELnames Str gist <anon> <anon> <anon> <anon> <anon> <anon>)␤»
timotimo huh. it seems to be one of those anon methods, then
annoying. 12:58
ely-se hmm
yeah
thanks
ilmari why aren't attribute accessors named?
timotimo smells like a bug :)
ilmari Attribute.compose() does set the name 12:59
$meth.set_name($meth_name);
$package.^add_method($meth_name, $meth);
skids m: $*PERL.^attributes.say 13:00
camelia rakudo-moar 775271: OUTPUT«(Compiler $!compiler Str $!name Str $!auth Version $!version Blob $!signature Str $!desc)␤»
skids Oh, ENOTENOUGHBACKLOGGING 13:01
13:02 skids left
ely-se use v{$*PERL.version}; refreshing :) 13:03
FreezerburnV ely-se: Won'T that end up as "use vv6.c"? I think the version string is "v6.c" 13:04
ely-se nope
m: say ~$*PERL.version
camelia rakudo-moar 775271: OUTPUT«6.c␤»
ely-se m: say $*PERL.version.gist 13:05
camelia rakudo-moar 775271: OUTPUT«v6.c␤»
ely-se m: say $*PERL.version.perl 13:06
camelia rakudo-moar 775271: OUTPUT«Version.new('6.c')␤»
13:06 kid51 left
timotimo FreezerburnV: did you see my comment on your SDL2::Raw pull request? 13:06
13:07 sammers left
FreezerburnV timotimo: Yep. I was originally going to respond about how it couldn't find the SDL2 dylib on OS X, but I realized that the lib string was "libSDL2" a the time I was working on it, so I think I had a different solution 13:08
timotimo i see you defined a bunch of GL constants. are you playing around with some OpenGL binding together with SDL2?
FreezerburnV timotimo: Indeed. I'm also working on an OpenGL::Raw package. Though the constants defined in SDL2::Raw are all inside SDL2 13:09
13:10 sammers joined
timotimo neat! 13:10
FreezerburnV When it's more than 2 exported functions, I'll be sure to put it up on github
timotimo are you using the OGL API thingie?
the xml file?
13:11 vendethiel joined
timotimo i've been wanting to build something on top of that, but it's not really something that can be built in little increments :| 13:11
so it became a bit too daunting and i ended up not doing anything at all
13:11 sufrosti1o joined
FreezerburnV No, but I probably should. I tend to handwrite any FFI code I work on. And yeah, I don't feel like writing all the xml handling code either :( 13:11
timotimo github.com/bartschuller/perl6-OpenGL - there's also this POC that isn't going to be developed any further by bartschuller himself
FreezerburnV I don't think I found that one 13:12
timotimo yeah, it didn't get much publicity
FreezerburnV At the very least, that's a useful jumping-off point 13:13
timotimo i'm very glad you're working on OpenGL stuff :)
FreezerburnV I'll probably pull out the GL.pm6 part and keep it as the only piece of OpenGL::Raw
timotimo i'm very much looking forward to the point where NativeCall gets sufficiently re-written so that moar itself can just jit a native call into an actually native call
FreezerburnV Then theoretically write a nicer wrapper on top of it. Same that I'm currently doing for SDL2
That would be very nice indeed! 13:14
timotimo yay! i was hoping someone would wrap SDL2::Raw with something more high-level
FreezerburnV Compete with LuaJIt
timotimo you're making me very happy
FreezerburnV Haha
timotimo luajit isn't really what we're using in moar, actually
we only use dynasm, which is what luajit uses, but not the other way around
FreezerburnV My main interest with programming languages is for gamedev, so it's in my interest to have FFIs to SDL2 and OpenGl
timotimo \o/ 13:15
FreezerburnV Well I figured MoarVM didn't use LuaJIT, just saying that we would be competing with its CFFI
To soem degree, at least
I'm not sure of which other JITs out there actually output native code calls to the C code like LuaJIT does 13:16
timotimo i haven't looked into how LuaJIT does it, but we'll definitely be in a position to do it like that 13:17
13:17 _Vi left
FreezerburnV Nice! I'm definitely looking forward to the future of Perl6 even more then 13:17
timotimo me, too 13:18
2016 will be a year with a lot more work put into performance
FreezerburnV That sounds exciting
timotimo doesn't it :) 13:19
FreezerburnV Is $*VM.config<dll> defined for every OS? 13:21
Actually, lemme just double-check my mac 13:22
timotimo i can only check for linux
13:23 kjs_ left
Woodi Yay! sortiz++ # LMDB 13:26
hallo #perl6 :)
FROGGS FreezerburnV: the VM config is per VM, so every OS should have the same VM config keys
13:27 s_kilk joined 13:29 s_kilk left 13:32 vendethiel left
sortiz Woodi, Thanks! By now all the documentation is in the tests. :-) Feedback is welcome 13:34
13:35 vendethiel joined
FreezerburnV FROGGS: Awesome, thanks 13:35
13:39 ELBeavers joined 13:43 ELBeavers left 13:44 lokien_ joined
FreezerburnV timotimo: I'll submit a new pull request with better handling of lib name later. For now, I need to head off to work. Good to talk to you! 13:56
13:58 brrt joined
dalek osystem: 6256d13 | rightfold++ | META.list:
Add Module::Skeleton to ecosystem

See github.com/rightfold/Module-Skeleton
13:59
osystem: 23bf3b6 | moritz++ | META.list:
Merge pull request #130 from rightfold/master

Add Module::Skeleton to ecosystem
14:00 vendethiel left 14:03 pierre-vigier joined, _Vi joined, webstrand joined 14:05 vendethiel joined
webstrand I remember reading that it's possible to extend the language with grammars, does anyone know where I can find documentation for this feature? 14:05
mspo docs.perl6.org/language/grammars
webstrand mspo: I don't see anything that discusses extension of the perl language, just the syntax and usage of grammars. 14:06
14:07 FreezerburnV left
PerlJam webstrand: maybe read the code of one of the slangs? (you'll have to google it as I don't have a link handy) 14:07
14:08 zakharyas joined
ely-se webstrand: here is an example github.com/FROGGS/p6-if/blob/master/lib/if.pm 14:08
PerlJam webstrand: maybe ask FROGGS or nine or ...
moritz or look for "slang" on modules.perl6.org/
webstrand that's what I'm looking for, thanks
PerlJam huh. 14:09
PerlJam didn't even realize we has a Slang:: namespace yet
mspo slang isn't mentioned in docs.perl6.org
RabidGravy well it's all a bit ad hoc at the moment 14:10
moritz also, doc.perl6.org is known to be incomplete 14:11
mspo are they all this? docs.perl6.org/syntax/augment
14:12 cdg joined
mspo also docs.perl6.org/language/functions#D..._Operators 14:13
14:20 g4 left 14:22 webstrand left 14:23 n0tjack joined 14:24 Actualeyes joined 14:26 webstrand joined, skids joined 14:27 vendethiel left 14:29 webstrand left 14:31 bpmedley left 14:34 Sgeo joined, Sgeo_ left 14:35 Arsad joined, lichtkind joined
Arsad hi 14:38
Zoffix \o
Arsad \help
Zoffix ?
timotimo o/ 14:39
what can we do for you?
14:39 Arsad left
masak Arsad: come back soon! :) 14:40
14:40 kjs_ joined
masak decommute & 14:40
lichtkind it looks to be like lc flattens an LoL 14:41
14:42 rindolf joined
colomon lichtkind: doesn’t lc stringify whatever it is given? 14:42
moritz I sure hope it does 14:43
m: say lc(['a', 'b', ['c', 'd']).perl
camelia rakudo-moar 775271: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xnRqiisTHm␤Unable to parse expression in array composer; couldn't find final ']' ␤at /tmp/xnRqiisTHm:1␤------> 3say lc(['a', 'b', ['c', 'd']7⏏5).perl␤ expecting any of:␤ statement end…»
moritz m: say lc(['a', 'b', ['c', 'd']]).perl
camelia rakudo-moar 775271: OUTPUT«"a b c d"␤»
moritz m: say (['a', 'b', ['c', 'd']])>>.lc.perl 14:44
camelia rakudo-moar 775271: OUTPUT«["a", "b", ["c", "d"]]␤»
moritz m: say (['a', 'B', ['C', 'd']])>>.lc.perl
camelia rakudo-moar 775271: OUTPUT«["a", "b", ["c", "d"]]␤»
RabidGravy anyone here use blogger and found a better way of posting code than sticking it in a gh gist?
14:44 vendethiel joined 14:45 prammer joined 14:46 CIAvash joined
moritz does blogger allow HTML input? 14:47
if yes, pipe through Text::VimColor first :-)
RabidGravy ooh 14:48
moritz or pygementize
14:48 _Vi left 14:51 _Vi joined 14:54 Skarsnik joined
Zoffix suspects Skarsnik will enjoy trying out www.ponyos.org/ 15:00
15:00 raiph joined
lichtkind colomon, thanks yes that would explain a lot 15:00
colomon are you still working on the Math::vector? 15:01
15:02 FreezerburnV joined
colomon lichtkind: I haven’t touched it in ages except for fixing occasional test failures caused by rakudo updates 15:03
Skarsnik Zoffix, Happy April Fools Day at the bottom x) 15:04
15:04 pierre-vigier left
lichtkind colomon, i currently work on Math::Matrix and would like to touch some corders even its just for interoperability 15:04
15:04 vendethiel left
colomon lichtkind++ 15:04
Zoffix Skarsnik, that probably explains why it didn't run last time I tried it X) 15:05
lichtkind thanks so you maybe want me to add as author or you accept pull requests
but its still lot of work till we get Math::Matrix on the level of octave 15:06
what would be the most perlish name for a pretty printer method ?
Skarsnik pretty ?
ilmari .gist? 15:07
lichtkind well my current candidate is table because its basically a table few liek spreadsheet
gist sounds to me like essence
but what does gist in rest of perl6?
ugexe gist is the pretty, human version of .perl
ilmari it's used for stringifying objects 15:08
e.g. by say
lichtkind thank you that sounds like pretty much it
geekosaur .gist is supposed to produce just the essence, whereas .perl produces everything (visible)
lichtkind becasue Math::Matrix has a .perl method
telling you type and the condensed view
geekosaur++ 15:09
ilmari .perl is meant to be something you can EVAL to get an equivalent object back, isn't it?
pmurias yes
lichtkind well not in our case
but thats easy ficable
i do that today
needs just some little extra chars, fixed content 15:10
ilmari++ 15:11
my fault i verlooked the small new our .erl is allright 15:13
mspo isn't .perl limited to some number of outputs? 15:20
or is that .somethingelse
geekosaur .perl isn't limited, aside from the visibility thing (IIRC by design it does not show private data) 15:22
brrt \quit
15:22 brrt left
[Coke] .gist is limited. 15:26
AlexDaniel - there is no tag for optimization issues at this time. I don't think the tags are highly used anyway, so I wouldn't worry about it. If you still worry about it, use [OPT] 15:27
Zoffix - I'm a 7 hour drive to Toronto, which is slightly out of my day trip comfort zone. :)
timotimo to ronto or not to ronto 15:28
Zoffix Unless you love driving :P 15:29
ely-se pronto 15:31
timotimo proto-ronto? 15:33
ely-se pronto sub f() { } # invokes f immediately 15:35
timotimo hah
i like that more than the javascript equivalent
ely-se var f = pronto(() => { }); 15:36
RabidGravy quick reboot to get the inotify working again 15:39
15:40 RabidGravy left 15:42 khisanth_ joined, mr_ron joined 15:44 domidumont left
mr_ron m: <a b c> ==> $*OUT 15:44
camelia rakudo-moar 775271: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤ in block <unit> at /tmp/TysiQlK4Jq line 1␤␤»
mr_ron m: gather for <a b c> {say "letter"; take $_} ==> say()
camelia rakudo-moar 775271: OUTPUT«letter␤letter␤letter␤(a b c)␤»
mr_ron anyone know how to do lazy feed output? 15:45
timotimo m: my $things = <a b c>.map({ say "letter"; $_ }); $things.map(*.say)
camelia rakudo-moar 775271: OUTPUT«letter␤a␤letter␤b␤letter␤c␤»
timotimo dunno how exactly to turn that into a feed-based thing 15:46
jnthn ==> map(&say)
15:46 Khisanth left
mr_ron m: gather for <a b c> {say "letter"; take $_} ==> map(&say) # thx jnthn++ there you have it 15:48
camelia rakudo-moar 775271: OUTPUT«letter␤a␤letter␤b␤letter␤c␤»
timotimo ah
oh, right, because ==> say() means invoke say with the list as argument 15:49
and say has no reason to be lazy
15:49 domidumont joined
mr_ron FWIW design.perl6.org/S06.html#Feed_operators says ... the operand on the sharp end of a feed ... something ... that can be evaluated to produce an object that does the KitchenSink role, such as an IO object. 15:51
[Coke] m: say KitchenSink;
camelia rakudo-moar 775271: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xKIQ89VlWK␤Undeclared name:␤ KitchenSink used at line 1␤␤»
[Coke] so, that is probably speculative. 15:52
15:53 sftf joined 15:54 _Vi left
mr_ron m: gather for <a b c> {say "letter"; take $_} ==> map { .say } # also seems to work 15:55
camelia rakudo-moar 775271: OUTPUT«letter␤a␤letter␤b␤letter␤c␤»
15:56 perl6newbee joined
timotimo aye. not too much difference between map &say and { .say } or *.say 15:56
15:57 _Vi joined
PerlJam "not too much difference"? hopefully it's only syntactic difference. 15:59
Zoffix oh god... I can't enter any Unicode chars any more at all... Not even the default ones I had
ely-se PerlJam: &say picks the say in local scope
lexical*
[Coke] PerlJam: one's calling the sub - one's calling the method...
Zoffix My revert of nemo's suggested instructions for using a better Compose file failed :|
mr_ron Oh just remembered ... I didn't notice feed operators mentioned on doc.perl6.org just synopses. Anyone seen them on public facing docs?
timotimo the difference is the signature
{ .say }, { say $_ }, *.say all have a single argument 16:00
but &say takes as many as you want
m: say 1, 2, 3, 4
camelia rakudo-moar 775271: OUTPUT«1234␤»
timotimo m: ({ .say })(1, 2, 3, 4)
camelia rakudo-moar 775271: OUTPUT«Too many positionals passed; expected 0 or 1 arguments but got 4␤ in block <unit> at /tmp/2h_ix05Sia line 1␤␤»
timotimo that can make a difference with reduction operators, for example
[Coke] mr_ron: they're mentioned on design.perl6.org, but not docs, yet.
design.perl6.org/S03.html#Feed_operators 16:01
Zoffix nemo, any idea what broke my system? I followed your instructions on doc.perl6.org/language/unicode_entry#XCompose and, as you recall, I wasn't getting the updated Compose file. So I removed GTK_IM_MODULE=xim and uninstalled uim-xim, and now I can't enter any Unicode chars at all... 16:02
ely-se m: say(*.perl)
camelia rakudo-moar 775271: OUTPUT«WhateverCode.new␤»
ely-se m: say(("a", "b", "c").map(*.perl))
camelia rakudo-moar 775271: OUTPUT«("a" "b" "c")␤»
ely-se this is niteresting
oh wait, it isn't. :D 16:03
Zoffix map takes a block to run, so it executes the Whatever
ely-se I mistook "WhateverCode.new" for "Whatever.new"
m: say Whatever.new.perl
camelia rakudo-moar 775271: OUTPUT«*␤»
ely-se m: say *.perl 16:04
camelia rakudo-moar 775271: OUTPUT«WhateverCode.new␤»
Zoffix I wonder how good an idea it would be to spend my short vacation updating my system to newer Linux, considering all the problems I'm having :}
mr_ron Coke: can/should I add an issue to github.com/perl6/doc/issues? I didn't notice one there. 16:05
Zoffix mr_ron, yeah
16:06 mr-foobar joined
timotimo how many years old is your linux installation there? :) 16:07
Zoffix Linux ZofMain 3.5.0-11-generic #11 SMP Wed Aug 22 14:45:14 CDT 2012 i686 i686 i386 GNU/Linux 16:08
My unicode entry is broken. My drive is on its last breath (I wanna get an SSD). I can't try out your SDL2::Raw, because I don't got the lib. And it's a 32bit OS :)
16:08 kjs_ left
timotimo that doesn't tell me how old the installation is, though? 16:08
Zoffix 2012
timotimo oh?
Zoffix Or is that the kernel release? 16:09
timotimo good question. probably is.
Zoffix Dunno "old and broken" is a good approximation :P
timotimo fair enough
ely-se Hmm, my code seems to be faster when being benchmarked. :S 16:11
Volkswagen code
timotimo you found our cheat code! oh no!
16:13 nakiro left
Zoffix When I make changes in rakudo repo and do configure; make; make test; make install... the new perl6 executable is in install/bin/perl6, right? 16:13
For some reason it's behaving as if I haven't made any changes :/
timotimo that's the default, but you might have changed it? 16:14
Zoffix Nope. 16:15
16:15 vendethiel joined
timotimo you can also try ./perl6-m and see if it makes a difference 16:16
Zoffix Aha, that one works
timotimo++ 16:17
16:18 marmay__ joined
timotimo so the "make install" did something wrong 16:18
16:19 cc9989 left
Zoffix This was the output from it FWIW: gist.github.com/zoffixznet/a14dcf0dd003e9199685 16:20
timotimo dunno 16:21
Zoffix Ahh... I'm a dummy
timotimo maybe perl6-m was still running somewhere and so something got "text file busy"?
Zoffix I went to install/bin and ran "perl6 -e ''" instead of "./perl6 -e"
timotimo hah
FROGGS ahh :o)
16:22 marmay_ left 16:23 mohae left, arlenik left
hoelzro o/ #perl6 16:24
Zoffix \o 16:25
timotimo ro ro ro your hölz :)
hoelzro timotimo: =)
nemo Zoffix: so... WRT your ping above, I wasn't really offering instructions, I was giving an example of an IME bridge that might be needed
instructions would be more complex 😝
Zoffix :) 16:26
k
nemo Zoffix: were you using uim prior?
or IBus or SCIM 16:27
Zoffix No idea. I did have to install "uim-xim" package
nemo had to?
ah
do you have any other uim packages still installed?
or any other IME anything 16:28
16:28 pmurias left
Zoffix Are these roast failures expected? gist.github.com/zoffixznet/231e36c148d051a1235f I made a fix for #127252, which has no relation to sockets :/ 16:29
16:29 ely-se left 16:30 ninereasons joined
timotimo yeah, those tests are flappy :( 16:30
Zoffix nemo, hm, I have "uim-utils" and "uim-common" installed
16:31 jevin_ left, ninereasons left 16:32 mr_ron left 16:33 jevin joined, raiph left, RabidGravy joined 16:34 jme` joined 16:35 mre left, _mg_ left, mre joined 16:36 mst left, pmurias joined, mst joined 16:37 vendethiel left, khw joined
Zoffix Omh WOOO \o/ I've just played a graphical snake game written in Perl 6 :D i.imgur.com/sSYUtKQ.png 16:38
timotimo++
timotimo yay
FreezerburnV Zoffix: Oooh, nice 16:39
Did you write that? 16:40
Zoffix FreezerburnV, no, it's in timotimo's repo: github.com/timo/SDL2_raw-p6
(in examples/)
16:40 zakharyas left
FreezerburnV Aah, did not pay attention to that 16:40
nemo Zoffix: yeah. detailed support for IMEs would have probably included links to all the various arch and ubuntu help docs on IMEs and their various options for xim, such as ibus --xim, uim-xim, scim_xim 16:42
Zoffix: maybe that page should just say, your IME might need a xim bridge
rather than suggesting a package that could get people into trouble
Zoffix *shrug*
16:48 vendethiel joined, pmurias_ joined 16:49 lokien_ left 16:51 FROGGS left, CIAvash left, pmurias left, frankjh left 16:53 pmurias_ left, pmurias joined 16:56 kaare_ left 16:57 kaare_ joined 16:58 rindolf left, sufrostico left 16:59 sufrosti1o left 17:00 Amnez777 left, domidumont left 17:10 vendethiel left 17:16 ELBeavers joined 17:19 sufrostico joined, sufrosti1o joined 17:21 ELBeavers left 17:23 [particle]1 left
[Coke] timotimo: github.com/timo/SDL2_raw-p6/blob/m.../Raw.pm#L5 - that conditional seems odd. :) 17:24
Zoffix Creepy. ssh to whoami.filippo.io and it'll tell you your GitHub username: twitter.com/zoffix/status/690223477308133380 17:25
17:25 domidumont joined 17:28 nadim joined 17:30 Sgeo left, Aankhen`` joined, Sgeo joined 17:31 rindolf joined 17:32 ely-se joined
ely-se Morning. 17:32
Zoffix 'noon 17:33
timotimo yo
[Coke] timotimo: I have trouble running that on OS X. gist.github.com/coke/0351bd85b2f06d2dd982
ely-se Is there a (de-facto) standard place to put files used by tests? (like fixtures) 17:34
llfourn when I needed to I just put them in t/lib 17:35
dunno if there's a better way
ely-se ok :3
llfourn then: use lib $?FILE.IO.parent.child("lib").Str; :S 17:36
in the test file
17:36 Zoffix left
llfourn I wish there was $?DIR.child("lib") 17:37
[Coke] timotimo: ah, this appears to be a bug in my libsdl, not in your nativecall. :|
17:38 bowtie left 17:41 leont joined, bowtie joined
[Coke] if this were c, I'd tell gcc -L/opt/local/lib - how do I tell nativecall? 17:41
jdv79 firmly
yoleaux 03:49Z <ugexe> jdv79: thanks, managed to get a basic distro request, deps fetched, tars extracted, and finally installed with it. would have a better idea if the dists weren't months old heh
mspo [Coke]: it's loading the wrong libjpeg? 17:42
jdv79 .tell ugexe oh wow. is it available to play with yet? its only ~ 1 month cause i loaded it up for the advent post. i'll move on that tomorrow. 17:44
yoleaux jdv79: I'll pass your message to ugexe.
RabidGravy [Coke], some environment variable like LD_LIBRARY_PATH I guess
[Coke] RabidGravy: on OS X, that's typically DYLD_LIBRARY_PATH, which the gist shows with an error. 17:45
mspo osx uses different stuff
ely-se One of my fixture file names ends in ".t" :( 17:46
[Coke] ah. DYLD_FALLBACK_LIBRARY_PATH is best.
mspo does nm -o /opt/local/lib//libJPEG.dylib show that ymbol?
17:48 hankache joined
[Coke] something similar, but not exactly. The problem was the wrong DYLD var, my bad. 17:48
FreezerburnV [Coke]: Is there something you'd prefer the conditional to be when detecting which lib to use for the native calls? (currently it seems like it might not need a conditional, actually) 17:49
Though I remember having an issue at one point running SDL2::Raw on OS X, I just don't remember what the problem was
17:50 bowtie left
[Coke] timotimo++ 17:55
FreezerburnV: I'm saying that both the if and the else are the same value.
17:56 abraxxa left
FreezerburnV Gotcha 17:56
17:56 bowtie joined 17:57 SCHAAP137 joined
FreezerburnV I'm doing work on the Raw bindings, and currently I"m considering dumping the conditionals because it honestly does seem to be the same across platforms. I need to take a minute to double-check OS X later though 17:58
Either that or leaving them in case something changes on one platform that needs specific things, that way a specific branch can easily be added. (with basically no actual cost other than a few lines of code)
[Coke] I am now working on OSX using the FALLBACK en var. 17:59
18:00 Amnez777 joined
ely-se where in META.info should I specify test-only dependencies? 18:01
FreezerburnV And that's with lib set to "SDL2"?
ugexe test-depends
yoleaux 17:44Z <jdv79> ugexe: oh wow. is it available to play with yet? its only ~ 1 month cause i loaded it up for the advent post. i'll move on that tomorrow.
FreezerburnV Where is your library located? I'm also considering adding a few simple tests for common locations in case it isn't somewhere that perl6 would normally look 18:02
ely-se ugexe: thanks
18:02 molaf joined 18:03 _mg_ joined
RabidGravy there, all the RabbitMQ tutorials made in Perl 6 github.com/jonathanstowe/Perl6-RMQ-Examples 18:03
18:03 Amnez777 left, Amnez777 joined 18:05 Actualeyes left 18:08 sjoshi joined
mspo RabidGravy: very nice 18:08
rabbitmq doesn't totally suck :)
18:09 dakkar_ left 18:11 lokien_ joined 18:12 ely-se left
RabidGravy It's the best messaging broker I've worked with over the years and the model plays nicely wth the Perl 6 asynchronous features 18:13
18:13 sftf left 18:16 pmurias_ joined 18:18 hankache left 18:19 pmurias left, addison joined
mspo it's a little too easy to slow down and I've had some (probably erlang) issues running on vmware 18:19
it's a cpu-per-queue or something like that 18:20
RabidGravy I dunno, the one running on this laptop has 78 threads 18:24
18:25 prammer left 18:26 zakharyas joined 18:27 AlexDaniel joined, _Vi left
Skarsnik FreezerburnV, does NC try to find the right file under os X? (not even considering the path) 18:29
18:29 [particle] joined 18:30 Sgeo left
[Coke] FreezerburnV: It's with whatever's checked in. 18:30
FreezerburnV Skarsnik, I think NC looks at standard locations for libraries (I'm not sure how it determines what those locations are, however). E.g.: /usr/lib/libSDL2.so on Linux or the current directory in Windows
Skarsnik NC use what dlopen/whatever has for default directory 18:31
it's not very clever x)
FreezerburnV Heh
18:31 alber joined
FreezerburnV That's why I want to try and put a little logic into the module to check common locations (/usr/local/lib/libSDL2.dylib for OS X, for example, where homebrew will install the library) 18:32
I don't know if dlopen will check there, though I think it does
Skarsnik should it be added to the env?
m: use NativeCall :TEST; guess_library_name('foo', v0.0.0);
camelia rakudo-moar 775271: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤ in sub guess_library_name at /home/camelia/rakudo-m-inst-1/share/perl6/sources/075EFE4B4CDAAF73190194EA876F81A1F128D1A2 line 169␤ in block <unit> at /tmp/gD94Iz2sr_ line 1␤␤»
Skarsnik m: use NativeCall :TEST; say guess_library_name(('foo', v0.0.0)); 18:33
camelia rakudo-moar 775271: OUTPUT«libfoo.so.0.0.0␤»
Skarsnik libSDL2 does not have versionning?
FreezerburnV Wait, using "is native($lib, v1.0.0)" will actually add the version number to the library name? 18:34
RabidGravy yep 18:35
FreezerburnV Hm
Skarsnik that why it warn if you don't do it btw
18:36 rindolf left
Skarsnik m: use NativeCall :TEST; say guess_library_name(('foo'); 18:36
camelia rakudo-moar 775271: OUTPUT«5===SORRY!5=== Error while compiling /tmp/4KVW32pXM1␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/4KVW32pXM1:1␤------> 3l :TEST; say guess_library_name(('foo');7⏏5<EOL>␤ expecting any of:␤ argu…»
Skarsnik m: use NativeCall :TEST; say guess_library_name('foo');
camelia rakudo-moar 775271: OUTPUT«NativeCall: Consider adding the api version of the library you want to use, sub foo is native(foo, v1)␤libfoo.so␤»
FreezerburnV But what if I want it to just be libfoo?
Skarsnik it's just a warning 18:37
FreezerburnV An irritating one :) And I don't like having warnings spewed out of code I write
18:37 Juerd left
Skarsnik well you should provide a version 18:37
RabidGravy m: use NativeCall :TEST; say guess_library_name(('foo', Version)) 18:38
camelia rakudo-moar 775271: OUTPUT«Use of uninitialized value $apiversion of type Version in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in sub guess_library_name at /home/camelia/rakudo-m-inst-1/share/perl6/sources/075EFE4B4CDAAF7319019…»
FreezerburnV Though I suppose if I add everything from the current SDL2 version, I'll probably need it to be v2.0.4 (or however it names it) due to features being added in their minor versions
18:38 FROGGS joined 18:39 ely-se joined
Skarsnik Yes, maybe can add an hidden feature to hide the version like False 18:39
18:39 leont left, _mg_ left
Skarsnik Like mysqlcient annoy me 18:39
their version is not an ABI version
RabidGravy I think so, there's stuff out there that isn't versioned or weirdly versioned 18:40
Skarsnik like 14-18 have the same api
18:40 Juerd joined, llfourn left
Skarsnik Yes, but I don't want that to be documented, this warning is not for nothing x) 18:41
FROGGS o/
Skarsnik since it avoid installing devel package on distrib to have the version
Hello freeze
18:41 Aankhen`` left
Skarsnik FROGGS, 18:41
arnsholt Skarsnik: That warning is super-annoying though
Skarsnik This routine should be made cached btw 18:42
arnsholt There should be a way to turn it off, documented. With the appropriate warnings of knowing what you do, but that holds for basically all of NativeCall
Skarsnik the warning will happen once x)
arnsholt If you wouldn't be capable of writing the equivalent code to your Perl 6 binding in C, you really shouldn't be using NativeCall 18:43
It's basically syntactic (and some semantic) sugar on top of the semantics of C
And if you're not comfortable with C, you're gonna have a bad time
Anyways, sometimes you really do want to load a library without a version number. That should be possible without cluttering the client code's stderr 18:44
Skarsnik if you give a full path it does not warn
m: use NativeCall :TEST; say guess_library_name('/iknow/where/is/mylib/foo.so'); 18:45
camelia rakudo-moar 775271: OUTPUT«/iknow/where/is/mylib/foo.so␤»
Skarsnik m: use NativeCall :TEST; say guess_library_name('/iknow/where/is/mylib/foo');
camelia rakudo-moar 775271: OUTPUT«/iknow/where/is/mylib/libfoo.so␤»
RabidGravy there are 89 .so files without versions on my system 18:46
Skarsnik with -devel package installed?
18:46 _mg_ joined
Skarsnik or just that does not have a versionned eqv? 18:47
RabidGravy not symlinks
Skarsnik how did you check that?
arnsholt find(1), probably
RabidGravy ls -l /usr/lib64/*.so | grep -v '^l' | w 18:48
Skarsnik yes but where. I have a bunch of .so that are plugins
arnsholt find /lib /usr/lib -name \*.so -ftype f # Or something along those lines
Can't remember the directive to check file type off the top of my head
Also, producing warnings in cases that are not 100% unambiguiously problems is pretty bad mannered. *Especially* in infrastructure-type code like NativeCall 18:49
18:49 rindolf joined
Skarsnik well specs about dynamic lib are quite clear (for linux/bsd), you should provide an abi/api version to your file. unversionned are for devel only 18:51
even os X doc recommand it
mspo -type f 18:52
FreezerburnV What about Windows? I know most of the time a library is "something.dll"
(if not basically every time) 18:53
Skarsnik dll on windows are quite tricky
most of the time just saying you want mylib.dll windows will not find it
18:54 _mg_ left
Skarsnik it has to be in the PATH or in the system directory 18:54
FreezerburnV Don't most programs ship a dll with the program? I know I would ship something with SDL2.dll right next to the .exe
Skarsnik Yes, so you know the path
18:54 vendethiel joined
FreezerburnV Most games I've looked at directories for tend to have a glut of them there as well 18:54
Skarsnik so no warning x)
FreezerburnV hah
Fair enough
Skarsnik m: use NativeCall :TEST; say guess_library_name('hello.dll'); 18:55
18:55 Zero_Dogg left
camelia rakudo-moar 775271: OUTPUT«hello.dll␤» 18:55
FreezerburnV Puts a little extra work into getting the lib though, since it needs to get the current absolute path for the .exe and put that before the correct dll name. But not too much
Would be nice to have the absolute path thing documented. Don't remember reading about it
18:55 Zero_Dogg joined
Skarsnik blame me x) 18:56
FreezerburnV Heh
Skarsnik I should probably explain how this sub work
FreezerburnV So a question about all this: How do we ensure something will work on any give machine for a major version of something? SDL2 has added new capabilities in minor version (2.0.4 has more than 2.0.0). How can I make sure I get the correct version number and only export the correct subs for whatever exists on the machine (which could very likely be 2.0.0 for all I know!) 18:57
(but the module might have 2.0.4 features) 18:58
Or even a module which might encompass multiple major versions, or odd versioning, etc.
18:58 lnrdo left
Skarsnik You probably need more advanced stuff to dectect the lib 18:59
colomon YAPC::NA in Orlando!
Skarsnik and blame the META spec for having nothing (yet) to handle external dependancy stuff related
FreezerburnV Heh 19:00
Skarsnik There is nothing to check the version at run time of sdl?
sqlite has it
FreezerburnV There is
19:00 prammer joined
FreezerburnV But the problems exists that if someone has production 2.0.2, and I write expecting 2.0.4, I can't even find the library 19:00
e.g.: An old package in a manager 19:01
Skarsnik like you can still say is native(('sdl2', v2)) and check if you the right version
FROGGS Skarsnik: linked_version
ely-se I think if statements where the body is not a used labeled statement should start with the iff keyword instead of the if keyword. 19:04
19:04 khw left, ELBeavers joined
FreezerburnV Ah, so you can specify major version only. Cool. Then generate native definitions only for what's supported in the version of SDL returned by a function call from the library? 19:05
skids Conditionally generating the native definitions is probably tricky.
FreezerburnV Maybe generate the unsupported functions as normal Perl6 subs and put a "die" into them?
Could the native definitions always exist, but a perl sub wrapper is created that might die if the version is too low? 19:06
19:06 bowtie left 19:07 bowtie joined
FreezerburnV (with a message such as "SDL2 on system is only vX.Y.Z whereas functions A is only supported in version B.C.D"? 19:07
19:07 _mg_ joined
skids I would think you would want to export the "die" versions instead of the NC versions. 19:07
19:07 mohae joined
FreezerburnV skids, yeah, that's what I meant. Perl subs get generated that just die if the SDL2 version is too low for a specific function 19:08
With a nice message for the user about why it died
ugexe people do that currently in their Build.pm to prevent installation
skids The problem is that normally one would generate subs at compile time -- and the user can change the SDL lib under your feet between runs, so you essentially have no choice but to not precompile those subs and have to regenerate them at runtime after checking the version.
19:08 ELBeavers left
skids Which sucks probably for startup time and general efficiency. 19:09
FreezerburnV Hm
Skarsnik the native trait does not build the nc call. it's done at run time 19:10
like the guess_library_name is called the firs ttime the sub is called
skids Ah good. Well good from one point of view.
FreezerburnV Then maybe: Each sub can possibly generate a version check at compile time based on whether or not it's being compiled for debug or not, and die nicely in the optional conditional. Production code wouldn't version check
19:11 musiKk joined
FreezerburnV Or, since NC does stuff at run time, it could just generate the native stuff that is supported at compile time 19:13
Though that still doesn't solve the "lib changing from under you" issue...
19:14 leont joined
FreezerburnV I wonder if I could always have a static set of functions that are supported at the base level, then have a bunch of other stuff that is only supported at certain version levels and swap those into the proper names at run time based on version 19:14
Won't have to compile more than once, with a small amount of time needed to shuffle some functions around 19:15
19:16 frankjh joined
DrForr Um, is it a bug that Test::use-ok() doesn't seem to actually load the module in question? 19:17
skids m: use NativeCall; "OHAI".say; sub cprint(str $) is native is symbol("printf") { }; cprint "foo\n"; sub nyiprint(str $) is native is symbol("printfoo") { }; nyiprint "foo";
camelia rakudo-moar 775271: OUTPUT«OHAI␤Cannot locate symbol 'printfoo' in native library ''␤ in method setup at /home/camelia/rakudo-m-inst-1/share/perl6/sources/075EFE4B4CDAAF73190194EA876F81A1F128D1A2 line 263␤ in method CALL-ME at /home/camelia/rakudo-m-inst-1/share/perl6/source…»
skids Hrm locally that manages to call the good printf before bailing.
m: use NativeCall; "OHAI".say; sub cprint(str $) is native is symbol("printf") { }; cprint "foo\n";
camelia rakudo-moar 775271: OUTPUT«OHAI␤foo␤» 19:18
DrForr use-ok 'Foo'; Foo.new; # throws "Could not find symbol '&Foo'" error rather than loading Foo.pm6 and continuing. 19:19
19:19 alber left
skids FreezerBurnV: well if the checks are runtime, maybe just let the user fall through to NC's error message -- it isn't awful, and if they wanted to handle multiple versions they should not be calling them. 19:20
[Tux] csv-ip5xs 17.699
test 22.469
test-t 12.173
csv-parser 49.324
FreezerburnV skids, I just like providing very nice error message :) "You're using SDL2 2.0.1, function blabla was added in 2.0.3. Consider upgrading, otherwise you will be unable to use blabla." for example 19:21
If someone somehow has an old version of SDL2, and is not aware of it 19:22
Or is limited by their package manager
skids Hrm I wonder whether you could CATCH NC errors. 19:23
m: use NativeCall; "OHAI".say; sub cprint(str $) is native is symbol("printf") { }; cprint "foo\n"; sub nyiprint(str $) is native is symbol("printfoo") { }; nyiprint "foo"; CATCH { $!.WHAT.say }
AlexDaniel like which ones? Segmentation faults? :DD
camelia rakudo-moar 775271: OUTPUT«OHAI␤Nil␤Cannot locate symbol 'printfoo' in native library ''␤ in method setup at /home/camelia/rakudo-m-inst-1/share/perl6/sources/075EFE4B4CDAAF73190194EA876F81A1F128D1A2 line 263␤ in method CALL-ME at /home/camelia/rakudo-m-inst-1/share/perl6/…»
skids No, like "can't find symbol in lib" 19:24
19:24 espadrine left
skids m: use NativeCall; "OHAI".say; sub cprint(str $) is native is symbol("printf") { }; cprint "foo\n"; sub nyiprint(str $) is native is symbol("printfoo") { }; nyiprint "foo"; CATCH { $_.WHAT.say } 19:25
camelia rakudo-moar 775271: OUTPUT«OHAI␤(AdHoc)␤Cannot locate symbol 'printfoo' in native library ''␤ in method setup at /home/camelia/rakudo-m-inst-1/share/perl6/sources/075EFE4B4CDAAF73190194EA876F81A1F128D1A2 line 263␤ in method CALL-ME at /home/camelia/rakudo-m-inst-1/share/pe…»
skids Hrm that one is not typed yet.
19:27 pmurias_ left 19:28 cdg left
RabidGravy yeah, there should be a set of X::Native suckers 19:31
[Coke] DrForr: the use-ok is inside a block. theoretically that shouldn't leak out. 19:35
frankjh Hi, I have a question related to ecosystem/modules. IN META6.json I have "version" : "0.0.2", is the name of a branch I have to create on github, or is it a tag name? Or how does it relate to my repo?
[Coke] m: try { use "Test"; } ; ok(True, "hi");
camelia rakudo-moar 775271: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ZdnMX9MQXn␤Undeclared routines:␤ ok used at line 1␤ use used at line 1␤␤»
FROGGS m: try { use "Test"; }; say Test
camelia rakudo-moar 775271: OUTPUT«5===SORRY!5=== Error while compiling /tmp/E8pHQLDNTG␤Undeclared name:␤ Test used at line 1␤Undeclared routine:␤ use used at line 1␤␤»
[Coke] m: try { use Test; } ; ok(True, "hi"); # oops
camelia rakudo-moar 775271: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Ya94rKkeAv␤Undeclared routine:␤ ok used at line 1␤␤»
FROGGS m: try { use Test; }; say Test 19:36
camelia rakudo-moar 775271: OUTPUT«(Test)␤»
FROGGS global symbol ^^
DrForr [Coke]: Again, I was just used to the p5 behavior, wanted to check my expectations before filing a perl6bug.
RabidGravy frankjh, I use it as a tagname, but as it stands at the moment the version isn't used for what gets pulled to do the installation
[Coke] FROGGS: Test is available, but 'ok' ain't.
FROGGS aye
skids maybe at some point we'll be able to sub is native { {*} CATCH { } }
FROGGS [Coke]: I'd like to see that the Test symbol would be lexical also, but I don't know if we get there 19:37
frankjh RabidGravy: What does it (panda?) do instead, pull HEAD? 19:38
RabidGravy yeah, you could make it pull a tag or branch or something by what you put in the source-url 19:39
ely-se I want to write a compiler in Perl 6.
DrForr I suppose having a file of nothing but 'use-ok' statements, and then another file of 'use' statement is okay, but since both file are run anyway, there doesn't seem to be a point to use-ok in that case.
ely-se: drforr/perl6-ANTLR -
ely-se lol why would I use ANTLR
DrForr It's an ANTLR -> Perl 6 compiler. 19:40
ely-se I figured that much.
DrForr You were just talking about writing a compiler, I thought I'd point you to one that's already (sort of - epsilon GLR) working. 19:41
ely-se ohh I see
I thought you were suggesting I use ANTLR 19:42
frankjh RabidGravy: That would be nice, but I do not know how. Where should I do my development, after my module is added to the modules list, if I would want avoid problems for users of my module?
DrForr Well, you can use that to avoid using ANTLR :)
RabidGravy to be honest I haven't given it much thought
Skarsnik We need an authoring tool to do the version stuff x) 19:44
leont I would love to imagine how much coffee I can make in the amount of time dzil would take on p6 :-p 19:46
19:49 _Vi joined
frankjh So currently the best way is to fork the repo? Having perl6-mymodule and perl6-mymodule-dev repos? 19:50
FROGGS leont: like, watching the plants grow? 19:51
Skarsnik frankjh, depend, having a 'stable' branch for the ecosystem and a dev branch for you?
AlexDaniel frankjh: I think that having a stable master and other branches for unstable stuff should work fine
Skarsnik erff panda use master <
frankjh So master and dev branch is ok too? This would probably be easier. 19:53
Skarsnik yes
frankjh And if my module ever gets a new user, the user would get the lastest contents of the stable branch? 19:54
Skarsnik yes, panda always clone the master git repo 19:55
AlexDaniel m: say Duration.new(Inf) 19:56
camelia rakudo-moar 775271: OUTPUT«Type check failed in assignment to $!tai; expected Rat but got Num␤ in block <unit> at /tmp/vqjCVUi2zS line 1␤␤»
frankjh Ok thanlks, I will try to make a PR on ecosystem soon. :)
20:01 n0tjack left 20:04 addison left
AlexDaniel does anybody know what is Duration? 20:06
skids An amount of time, not pinned to any calendar. 20:07
Skarsnik It's the difference between two Instant
skids (a delta-T)
Skarsnik ? 20:08
frankjh OK done PR done. 20:09
20:10 n0tjack joined 20:11 FROGGS left 20:13 ely-se left 20:14 ely-se joined, zakharyas left, perl6newbee left 20:15 marmay__ left
dalek osystem: 8278af7 | (Frank Hartmann)++ | META.list:
Add perl6-tweetnacl to ecosystem
20:16
osystem: 9b1e71f | (David Warring)++ | META.list:
Merge pull request #131 from soundart/master

Add perl6-tweetnacl to ecosystem
AlexDaniel is there any way to provide alternative “source-url”? 20:18
e.g. I want to list github and bitbucket repos at the same time
20:20 spider-mario joined, addison joined
Skarsnik probably not? 20:22
AlexDaniel I see. What would be the most appropriate place to create an issue about this?
frankjh Uh and how do I add these logos? Some modules have a nice logo on modules.perl6.org/? 20:23
20:23 n0tjack left, darutoko left
Skarsnik add a logotype directory 20:24
well look at a module that have it x)
20:24 n0tjack joined
skids AlexDaniel: github.com/perl6/specs/issues probably. S22 is the spec that would handle META. 20:25
ugexe source-url is not spec though 20:26
20:26 domidumont left
skids support { source: } is. 20:26
ugexe yes, big distinction 20:27
AlexDaniel ugexe: so what is it then? Common convention? 20:29
Skarsnik panda spec 20:30
S22 is... quite sparse
AlexDaniel but what about zef?… 20:32
ugexe one having multiple sources of the same auth. if source-url were specced i imagine it would be like metacpan "download_url", where the content storage sets it
support: source i can see having multiple urls 20:33
AlexDaniel actually, a lot of stuff that is written in S22 makes sense 20:34
20:36 laz78 joined 20:38 maslan left
AlexDaniel m: say ('test' x *)(5) 20:41
camelia rakudo-moar 775271: OUTPUT«testtesttesttesttest␤»
AlexDaniel m: say ('test' xx *)(5)
camelia rakudo-moar 775271: OUTPUT«Cannot find method 'CALL-ME'␤ in block <unit> at /tmp/DA8qdZr8qO line 1␤␤»
AlexDaniel m: say 'test' x Inf
camelia rakudo-moar 775271: OUTPUT«Cat object not yet implemented. Sorry. ␤ in block <unit> at /tmp/z8BhXiZssK line 1␤␤Actually thrown at:␤ in block <unit> at /tmp/z8BhXiZssK line 1␤␤»
AlexDaniel m: say 'test' xx Inf
camelia rakudo-moar 775271: OUTPUT«(...)␤»
20:43 sjoshi left 20:47 _mg_ left, n0tjack left 20:49 nadim left, n0tjack joined 20:51 salv0 left 20:53 nadim joined, sufrosti1o left, sufrostico left, rindolf left 20:56 frankjh left, frankjh1 joined 20:59 Calibellus joined 21:00 nadim left 21:01 prammer left 21:02 prammer joined 21:05 prammer left 21:06 nadim joined 21:07 frankjh1 left, cdg joined 21:08 _mg_ joined
ely-se I'm gonna write a foo.wyrd.name/en:bearlibterminal binding and make a video game in Perl 6. :3 21:08
RabidGravy coooooool 21:09
oooh so whacking up fs.inotify.max_user_watches to 4 times what it was fixes IO::Notification.watch-path 21:12
Skarsnik fun
21:12 _mg_ left, Jesmaybe left
RabidGravy something is chewing through 'em 21:12
21:15 laz78 left 21:19 geraud joined, kaare_ left 21:31 dfcarpenterak joined 21:34 salv0 joined, addison left 21:37 llfourn joined
[Coke] .u later 21:37
yoleaux U+01C1 LATIN LETTER LATERAL CLICK [Lo] (ǁ)
flussence RabidGravy: default seems to be 8192 here, what the heck could possibly need that many? 21:38
21:41 cpage_ left, llfourn left 21:42 n0tjack left, maslan joined 21:43 bjz_ left
RabidGravy I dunno, there are 25 processes using inotify, I suspect tracker-miner-fs is the culprit 21:47
flussence oh right, one of those indexing things, that'd make sense... 21:49
RabidGravy [jonathan@coriolanus perl6]$ tracker status
Currently indexed: 241922 files, 23308 folders
21:53 nadim left 21:54 alwpex joined 21:57 skids left 21:58 laz78 joined 22:04 addison joined 22:09 kanishka left 22:13 FreezerburnV left, FreezerburnV joined
MadcapJake i want to put a `-d` flag before a path in a MAIN signature, but it's complaining that it's variadic: «multi sub MAIN ('complete', Bool :$d!, $filepath)» 22:19
DrForr I seem to be having difficulties capturing output from "run 'perl6 -c', $filename;" - 'syntax OK' should appear on STDERR but I can't figure out how to capture it. 22:20
timotimo yo yo yo
i'm back from all the errands
FreezerburnV ...what? "Constraint type check failed for parameter '$precomp-id'" when attempting to run some code. I don't think I have anything defined with that name 22:21
22:21 sortiz left
MadcapJake DrForr: syntax OK is printed to STDOUT I believe 22:22
22:23 sortiz joined
DrForr Hmm,yeah, it is stdout, but the statement still doesn't appear to be capturing it. 22:23
DrForr retries the paste in case soemthing went pear-shaped.
FreezerburnV Also: Is it possible to just pass in a string when specifying version for a native sub? e.g.: "is native($lib, $versionString)" 22:24
And if so, can an empty string be passed?
geekosaur FreezerburnV, that precomp-id thing is a known bug 22:25
MadcapJake FreezerburnV: you can assemble the proper native string via a sub: doc.perl6.org/language/nativecall#Routine
DrForr Not working with sample code, but I'll have to check into it tomorrow. 22:26
FreezerburnV MadcapJake: Oooh, nice! Do I need to return a tuple from the sub to get the lib and version number, or do I pass in 2 subs? 22:27
geekosaur: Any way to get around it? It suddenly showed up when the code was previously working
geekosaur is there a module associated with the error? you have to add 'no precomp;' at the top of a module that is triggering it 22:28
22:28 espadrine joined 22:29 SCHAAP137 left, nadim joined
FreezerburnV geekosaur: Hm, now it's gone and replaced by an error about a missing or wrong dependency. Gimme a sec 22:30
Ok I _think_ it has something to do with SDL2/Raw.pm because it's complaining about missing a dependency on it directly after the preomp thing 22:31
22:32 FreezerburnV left, FreezerburnV joined
FreezerburnV And putting in "no precomp;" just gives an error that it doesn't know how to do that 22:32
I changed the logic of how a string is computed from being in a BEGIN block to just being done at runtime, which is when it started complaining. the string is used in "is native($lib)" 22:34
Putting it back into a BEGIN block does nothing 22:35
22:37 espadrine_ joined, espadrine left, llfourn joined
MadcapJake FreezerburnV: what do you want native to do with the version number? 22:38
FreezerburnV MadcapJake: I want to be able to look for the absolute path of a library, and if so, not use a version number. Otherwise append the version that is expected of the library
On Windows a dll is usually in the same directory sans version number, but on unix I usually just want to give an expected version to dlopen, so I want to be able to change how I use "is native" without having to put ifs over every sub definition 22:39
MadcapJake yeah so you would write that as a sub and then just do `is native(&lib)` for each routine
but the sub should only return one string in the end
FreezerburnV Got it
And no warnings about not having a version number? 22:40
MadcapJake it will search in the whatever the manual places for whatever string you provide
22:40 ELBeavers joined 22:41 leont left
MadcapJake in other words, I don't know what the Windows DLL location is, but it'll search there :P 22:41
FreezerburnV Haha
timotimo FreezerburnV: the error about "precomp-id" could be from outputting text on stdout (or perhaps stderr?) during compile time
22:42 musiKk left, llfourn left
FreezerburnV Well on Windows, I can be confident it will be in the same directory as the script. It's on Unix that, apparently, having a version number is the well-defined way of finding a library, and is native will warn if a version is not passed. So I want to be able to output an absolute path on Windows, which will not warn, and libname with version on Unix 22:42
So no warnings and it's well-defined which version of the lib is getting opened
timotimo: Hm, I'll take a look around to see if that's happening 22:43
22:45 yqt joined, ELBeavers left
FreezerburnV Can IO be done at compile time? 22:46
ely-se FreezerburnV: sure
m: BEGIN { say "hello world" }
camelia rakudo-moar 775271: OUTPUT«hello world␤»
Skarsnik FreezerburnV, you can have the verision number on windows
it does nothing
ely-se m: sub f() is native is symbol(do { say "hello world"; 'pipe' }) {*} 22:47
camelia rakudo-moar 775271: OUTPUT«hello world␤5===SORRY!5=== Error while compiling /tmp/yRBgFaUsg9␤Can't use unknown trait 'is native' in a sub declaration.␤at /tmp/yRBgFaUsg9:1␤ expecting any of:␤ rw raw hidden-from-backtrace hidden-from-USAGE␤ pure defaul…»
FreezerburnV Hmm
Skarsnik and if you need to do specific change for windows just set the thing you give to the native trait according to the os
22:48 nadim left
FreezerburnV I'm gonna have to work on this more a bit later. Gotta go for now. Thanks for all the help! 22:48
ely-se I did this in my library recently: github.com/rightfold/NativeCall-Er...rno.pm6#L6
should find a nicer way probably :p
I should make a module for each platform and import conditinoally
Skarsnik well for the symbol you don't have a choice 22:49
It's fine really
using cglobals does not work for errno ?
ely-se no
22:49 vendethiel left
ely-se errno is thread-local, not global 22:50
geekosaur errno is not a global variable on any system with thred suypport
geekosaur eyes finfers
ely-se errno in <errno.h> is typically defined as a macro that expands to something along the lines of (*__errno_location()) or __errno()
Skarsnik m: my $var := cglobal(('c', v6), 'errno', int): say $var; 22:51
camelia rakudo-moar 775271: OUTPUT«5===SORRY!5=== Error while compiling /tmp/VVvHI1hZ0J␤Confused␤at /tmp/VVvHI1hZ0J:1␤------> 3var := cglobal(('c', v6), 'errno', int):7⏏5 say $var;␤ expecting any of:␤ colon pair␤»
Skarsnik m: my $var := cglobal(('c', v6), 'errno', int); say $var;
camelia rakudo-moar 775271: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xfqsfvnUCn␤Undeclared routine:␤ cglobal used at line 1␤␤»
ely-se you have to use NativeCall
Skarsnik m: use NativeCall; my $var := cglobal(('c', v6), 'errno', int); say $var;
camelia rakudo-moar 775271: OUTPUT«2␤»
lichtkind good night 22:52
22:52 lichtkind left
ely-se that probably "works" because of legacy support for errno as a global variable 22:52
it'll probably break if you use it in multiple threads
there's a reason C headers use macros
22:53 FreezerburnV left
geekosaur yep 22:53
ely-se it's best to exactly mimic such implementations
Skarsnik m: use NativeCall; my $var := cglobal(('c', v6), '__errno_location', int); say $var; 22:54
camelia rakudo-moar 775271: OUTPUT«7205820969213332296␤»
Skarsnik fun
ely-se need to dereference
well, dereference the result of a call to __errno_location
m: use NativeCall; sub __errno_location(--> Pointer[int]) is native {*}; __errno_location.deref.say 22:55
camelia rakudo-moar 775271: OUTPUT«2␤»
22:55 ely-se left
Skarsnik fun fact: deref is buggy 22:55
well I had weird issue replacing nativecast with a Pointer[struct].deref 22:56
22:56 yurivish_ left
Skarsnik even if deref just call nativecast xD 22:56
geekosaur not all systems provide the back-compat thing, even. (OS X, and this stuff appears to be copied from FreeBSD, does not have a legacy errno.)
Skarsnik Well I trust you on this x) 22:57
23:02 cpage_ joined 23:03 yurivish joined 23:05 yurivish left, yurivish joined 23:09 lokien_ left 23:12 yossarian left 23:13 RabidGravy left, mcmillhj left, cpage_ left 23:14 mcmillhj joined 23:15 molaf left 23:20 woodruffw joined, woodruffw left 23:21 woodruffw joined
Skarsnik Good night #perl6 23:25
23:28 Skarsnik left 23:42 firstdayonthejob left 23:45 addison left 23:51 kid51 joined 23:53 addison joined 23:55 Peter- joined