Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-12-19

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:13 naddiseo joined #perl6
00:14 naddiseo Is there a way to declare union types?
00:14 ab5tract joined #perl6
00:20 vendethiel naddiseo: no
00:20 vendethiel naddiseo: you might be interested in timotimo's adt module
00:21 naddiseo Does subset Foo where (Int | Str); work ?
00:21 raiph m: subset Foo where (Int | Str)
00:21 camelia rakudo-moar 30edf7: ( no output )
00:21 vendethiel naddiseo: yeah, but as a untagged union.
00:21 vendethiel (and runtime-typechecked)
00:22 naddiseo K, I think that's what I want.
00:22 naddiseo Now to figure out "P6opaque: no such attribute '$!signature'"
00:35 aborazmeh joined #perl6
00:36 raydiak m: subset Foo of Str|Int; my Foo $foo; $foo = "foo"; say $foo;
00:36 camelia rakudo-moar 30edf7: OUTPUT«foo␤»
00:36 raydiak m: subset Foo of Str|Int; my Foo $foo; $foo = 123; say $foo;
00:36 camelia rakudo-moar 30edf7: OUTPUT«Type check failed in assignment to '$foo'; expected 'Foo' but got 'Int'␤  in block <unit> at /tmp/VLfMSGO_zs:1␤␤»
00:37 raydiak ^, ^^  which of those is broken?
00:40 night0x joined #perl6
00:41 * raydiak thought we were of the strict typing persuasion, meaning maybe the "foo" shouldn't have worked, but ianae
00:42 * raydiak rather hopes he is wrong about that
00:43 naddiseo m: enum A <Block>;subset B;
00:43 camelia rakudo-moar 30edf7: OUTPUT«===SORRY!===␤P6opaque: no such attribute '$!signature'␤»
00:43 naddiseo Yeah.. what's that about?
00:44 naddiseo I know it's something to do with "Block"
00:44 naddiseo but that error is very uninformative.
00:49 raydiak naddiseo: agreed it's not very helpful...sometimes --ll-exception can help give a clue with those unhelpful internal error messages
00:50 raiph m: enum A <Code>
00:50 camelia rakudo-moar 30edf7: OUTPUT«===SORRY!===␤P6opaque: no such attribute '$!signature'␤»
00:50 raiph m: enum A <Block>
00:50 camelia rakudo-moar 30edf7: ( no output )
00:50 raiph m: enum A <Foobar>
00:50 camelia rakudo-moar 30edf7: ( no output )
00:52 raiph m: enum A <Named>
00:52 camelia rakudo-moar 30edf7: ( no output )
00:55 naddiseo Thanks for your help. I'm off now.
00:56 night0x joined #perl6
00:57 Brian_ joined #perl6
01:00 aborazmeh joined #perl6
01:07 dayangkun joined #perl6
01:08 night0x joined #perl6
01:10 PZt joined #perl6
01:58 labster joined #perl6
02:08 night0x joined #perl6
02:09 Vlavv joined #perl6
02:15 ab5tract joined #perl6
02:17 rmgk_ joined #perl6
02:26 raiph joined #perl6
02:27 hekmek joined #perl6
02:45 ninjazach joined #perl6
03:07 raiph m: enum A <Code> #123457
03:07 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=123457
03:07 camelia rakudo-moar 30edf7: OUTPUT«===SORRY!===␤P6opaque: no such attribute '$!signature'␤»
03:09 atroxaper joined #perl6
03:17 dj_goku joined #perl6
03:21 ssqq joined #perl6
03:25 ninjazach joined #perl6
03:32 Mso150 joined #perl6
03:46 jack_rabbit joined #perl6
03:55 JimmyZ m: enum A <Str>
03:55 camelia rakudo-moar 30edf7: ( no output )
03:58 noganex joined #perl6
04:12 anaeem1_ joined #perl6
04:13 anaeem1 joined #perl6
04:14 atroxaper joined #perl6
04:18 anaeem1 joined #perl6
04:31 aborazmeh joined #perl6
04:37 doublelel joined #perl6
04:43 TimToady m: le 42   #  French?
04:43 camelia rakudo-moar 30edf7: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/RUKgoSEL0Mâ�¤Undeclared routine:â�¤    le used at line 1. Did you mean 'lc'?â�¤â�¤Â»
04:43 TimToady don't get the error here either
04:43 TimToady m: == 42   #  French?
04:43 camelia rakudo-moar 30edf7: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/FL5NlYBVcxâ�¤Preceding context expects a term, but found infix == insteadâ�¤at /tmp/FL5NlYBVcx:1â�¤------> [32m==[33mâ��[31m 42   #  French?[0mâ�¤Â»
04:44 TimToady .oO(c'est la life, universe, and everything)
04:46 TimToady (continuing a conversaton that started on #moarvm)
05:02 ab5tract joined #perl6
05:06 esaym153 joined #perl6
05:08 kaare_ joined #perl6
05:11 doublelel joined #perl6
06:21 moritz timotimo: at least for the perl6.org domains, yes
06:26 mathw Does anyone know how NativeCall looks for libraries and more importantly how I can get it to look somewhere it's not currently looking?
06:32 moritz mathw: iirc you can pass absolute pathes to the "is natve" trait
06:36 kaare_ joined #perl6
06:40 mathw hmm I don't think this is a library path problem
06:51 ab5tract joined #perl6
07:02 erkan joined #perl6
07:02 moritz I looked at prices for signing of wildcard certs: https://www.sslshopper.com/best-ssl-wildcard-certificate.html
07:02 moritz "ouch"
07:02 rindolf joined #perl6
07:03 moritz maybe we should wait for https://letsencrypt.org/
07:03 moritz or offer self-signed certificates until then
07:08 perturbation joined #perl6
07:14 ab5tract joined #perl6
07:21 moritz it's a bit perverse that firefox shows more security warnings for self-signed certificate than for an unencrypted connection
07:21 Isp-sec joined #perl6
07:24 darutoko joined #perl6
07:30 erkan joined #perl6
07:44 gfldex joined #perl6
07:52 FROGGS joined #perl6
08:06 dalek mu: 9f8892a | FROGGS++ | misc/perl6advent-2014/schedule:
08:06 dalek mu: picked slot 20
08:06 dalek mu: review: https://github.com/perl6/mu/commit/9f8892a761
08:07 FROGGS I hope that's okay (I didn't follow discussions here on channel for a few days)
08:12 JimmyZ masak: s/sekkind/second/ ?
08:14 virtualsue joined #perl6
08:22 brrt joined #perl6
08:23 blackbolt joined #perl6
08:25 Woodi joined #perl6
08:27 blackbolt hi, can someone help me? "cannot look up attributes in a type object" here's code: http://pastebin.com/wsgmxy6D
08:27 brrt blackbolt - i'll try
08:29 blackbolt :)
08:30 rurban joined #perl6
08:31 brrt ok, first thing i spot is that in perl6, class instance variable are prefixed with a twigil
08:31 brrt m: class Foo { has $.bar; }; my $f = Foo.new(:bar(4));
08:31 camelia rakudo-moar 30edf7: ( no output )
08:31 brrt or
08:32 blackbolt ohhh, i rebuild code. there is "$.dataBase"
08:32 brrt m: class Foo { has $!bar; method gist { $!bar.gist } }; say Foo.new(:bar("Hai"))
08:32 camelia rakudo-moar 30edf7: OUTPUT«(Any)␤»
08:33 brrt (i would have somewhat expected that to work, hmm)
08:33 brrt and... i'm a little foggy on initializers, but i think you want submethod BUILD rather than method new
08:33 brrt or even sub new
08:34 blackbolt i want to create connection with DB
08:37 erkan joined #perl6
08:37 erkan joined #perl6
08:41 FROGGS m: class Foo { has $.bar; method gist { $!bar.gist } }; say Foo.new(:bar("Hai"))
08:41 camelia rakudo-moar 30edf7: OUTPUT«Hai␤»
08:41 FROGGS make the attribute public
08:42 Mso150 joined #perl6
08:43 FROGGS so in http://pastebin.com/wsgmxy6D line 3 should read 'has $.dataBase;' and line 12 should be '$!dataBase = ...
08:43 FROGGS though, the variables in line 13 are undeclared
08:44 FROGGS (at least in the pasted code, I guess they are declared and initialized before the class definition)
08:45 blackbolt ohhh thanks, that help FROGGS
08:46 FROGGS :o)
08:48 kaleem joined #perl6
08:50 telex joined #perl6
08:50 Woodi hallo today :)
08:51 Woodi q: can I clone from git repo in one directory to other dir ? or maybe copy will do ?
08:52 jnthn Woodi: Yes, just git clone /that/directory /where/you/want/it
08:54 Woodi ok. I can. but for backap I just pack&unpack repo directory ? or git is more sensitive ?
08:57 jnthn The .git directory contains the full repo history, so if that's in your backup then you've what you need.
08:59 Woodi I wonder about inodes and some such becouse I hear git is "filesystem"... but for now I just need somewhere to compile :) thanx jnthn++
08:59 davido__ joined #perl6
09:05 Woodi anyway, R* probably is a lot of work, could we cut something down ?
09:06 |Tux| joined #perl6
09:09 molaf__ joined #perl6
09:11 atroxaper joined #perl6
09:28 hekmek joined #perl6
09:30 masak JimmyZ: fixed; thanks.
09:30 masak antenoon, #perl6
09:31 erkan joined #perl6
09:31 mvuets joined #perl6
09:42 mathw hi #perl6
09:48 JimmyZ m: my num $x = 3.5;
09:48 camelia rakudo-moar 30edf7: OUTPUT«This type cannot unbox to a native number␤  in block <unit> at /tmp/i0Olun1iis:1␤␤»
09:48 JimmyZ m: my num $x = 3.5e0 # known?
09:48 camelia rakudo-moar 30edf7: ( no output )
09:49 jnthn Yes, and correct.
09:50 rindolf mathw: hi, sup?
09:52 mathw I was trying to get NativeCall to talk to ncurses and I couldn't :(
09:53 mathw jnthn: oh I ran into that one earlier, what's the reasoning?
09:53 jnthn 3.5 is a Rat
09:53 mathw oh
09:53 mathw well no wonder it won't unbox
09:54 jnthn The error could do with mentioning the type in question, mind...
09:59 fhelmberger joined #perl6
10:04 mathw yes it's a LTA error message
10:05 erkan joined #perl6
10:05 erkan joined #perl6
10:05 mathw Now I just need to memorise literal formats for things which can unbox to num and I'll be a happy man
10:05 mathw except for the ncurses problem that is
10:06 mathw However, ncurses is a problem by itself
10:08 virtualsue joined #perl6
10:12 ptc_p6 joined #perl6
10:19 mathw are there kinds of native library that NativeCall just can't handle yet?
10:20 mathw I keep getting "cannot locate native library libncurses.so" but it's right there - however, it's a text file which says INPUT(libncurses.so.5 -ltinfo) in it
10:21 moritz mathw: Num literals always contain an e, like 1e0
10:21 ab5tract joined #perl6
10:21 jnthn mathw: That's a linker script, looks like, not an actual library.
10:21 mathw yeah
10:22 jnthn So no surprise trying to dynamically load it doesn't end well...
10:22 mathw I'm trying to find the real library...
10:22 jnthn It's named right there in the script?
10:22 jnthn libncurses.so.5 ?
10:22 mathw presumably gcc, if it saw that, would know what to do with it
10:22 mathw yes it is
10:22 mathw but it appears to be invisible
10:22 jnthn Oh. :S
10:22 mathw also
10:22 mathw Cannot locate native library 'libncurses.so.5.so' in method postcircumfix:<( )> at lib/NativeCall.pm6:129
10:23 mathw it's putting .so on the end for me
10:23 mathw that's from an is native('libncurses.so.5') trait
10:27 Woodi mathw: there was same problems with ncurses before. maybe corect one is in /lib somewhere ?
10:28 mathw Woodi: hah! it is
10:28 mathw silly
10:28 Woodi ppls use some tricks in modules to get corect one
10:29 mathw on the other hand, if NativeCall insists on looking for libncurses.so.5.so it's going to be perpetually disappointed regardless of the path searched
10:29 itz I put a sym link in on debian so I had a shared lib with .so on the end
10:29 itz (probably not a good solution)_
10:30 mathw it's a solution if you happen to be in a position to do that
10:30 mathw it's not a good long-term solution though
10:30 Woodi but that linker "script" problem should be resolved by linker or some other _system_ tool... or NativeCalls works in not standard way ?
10:31 itz I assume NativeCall should be modified to support .so.\d as well as .so
10:31 jnthn Patches welcome ;)
10:31 jnthn Gotta go for a bit &
10:32 FROGGS itz: NativeCall does not attempt to locate a library, though it fiddles with its name...
10:32 FROGGS mathw: is it possible that your NativeCall is outdated?
10:32 FROGGS mathw: there were patches in that area lately
10:32 itz oh so it just appends .so to libfoo?
10:32 FROGGS itz: yes
10:33 FROGGS sort of
10:33 itz I should just look :)
10:33 FROGGS mathw: I am thinking of that commit: https://github.com/jnthn/zavolaj/commit/147cdf0120a2669eeb3774f77cdb7ee17f94b6f7
10:33 FROGGS itz: https://github.com/jnthn/zavolaj/blob/master/lib/NativeCall.pm6#L104
10:35 erkan joined #perl6
10:35 mathw FROGGS: I installed it this morning
10:36 mathw yeah that's not going to help because <alpha> won't match a digit will it
10:36 moritz correct
10:36 mathw It doesn't mess with it until I put the .5 on the end
10:37 abraxxa joined #perl6
10:37 itz # TODO: more extension guessing
10:37 mathw yeah I'm just trying to think of what the rules should be
10:37 itz maybe glob a number and pick the highest>
10:38 Woodi hmm, NativeCall is not a part of Rakudo ? NC is probably very good candidate for standard module. actually I prefer to have NC in the "core" over object stuff and grammars ;)
10:39 nige joined #perl6
10:41 itz hmmm I'm wondering whether this is actually a path rather than filename issue
10:42 itz mathw: are you a debianish 32/64 bit mixed library system?
10:42 mathw itz: yeah it's an Ubuntu box
10:43 mathw Woodi: it's in Rakudo Star, that's about as core as it gets
10:43 itz locate libncurses.so shows one without a numerical suffix
10:43 ab5tract joined #perl6
10:43 FROGGS which is the linker script, no?
10:43 mathw itz: which is a linker script. NativeCall doesn't seem to be able to handle it
10:43 itz oh yeah ASCII text
10:43 FROGGS mathw: NativeCall just delegates to dlload or what it is called
10:44 mathw dlopen()
10:44 mathw I assume
10:44 FROGGS yeah, that
10:44 mathw or whatever the VM uses - NativeCall just asks NQP to do it
10:44 mathw I'll have to hack NativeCall to not mess with the name and see if that works
10:44 mathw thent ry to figure out a suitable patch
10:45 FROGGS https://github.com/MoarVM/MoarVM/blob/master/src/core/nativecall.c#L578
10:45 Woodi mathw: R* is *such* official thing ? I didn't know that...
10:46 FROGGS Woodi: it is what we think official means
10:49 Woodi I like R* and also that official bit :)  but I thinked it was: let's show the World we are here, we have something working and we are damn you forum-X NOT dead!"
10:50 mathw R* is what it's expected people will actually install and use
10:50 mathw so you get a compiler and some useful modules
10:51 mathw so ultimately it should be safe to assume people will have NativeCall
10:51 mathw among other things
10:51 mathw rather like Perl 5 programmers can assume that you've got Data::Dumper
10:52 Woodi but by removing some modules from R* we can promote our modules online repository :) make habits of using it in CPAN way
10:53 Woodi and "where is D::D" is FAQ #1 :)
10:53 brrt left #perl6
10:54 darutoko- joined #perl6
10:56 mathw yes! Once I get NativeCall looking for the right library it works nicely
10:56 mathw oh there'll be loads of modules that aren't in *
10:56 mathw but I think NativeCall ought to be
10:57 mathw this ncurses binding I'm working on probably oughtn't
11:01 mathw jnthn: I sent a pull request for a fix to NativeCall which detects ".so.<.digit>+$" and leaves it alone, to allow loading libfoo.so.43 etc. Working for me.
11:04 itz mathw++
11:04 erkan joined #perl6
11:05 atroxaper joined #perl6
11:06 geekosaur that's not a general solution since the runtime library can look like libfoo.so.1.5.9 or etc.
11:07 mathw good point
11:08 mathw easy enough to fix though
11:09 smls joined #perl6
11:09 geekosaur and, as a general thing, it still bugs me a bit that NativeCall needs what the primary Linux distributions consider devel / link-time libraries even though they only need it for the .so symlink
11:09 geekosaur but I have no idea how to fix that sanely
11:11 smls Maybe it should be possible to specify both the library name and version (as separate fields), and let it construct/guess the .so name based on both?
11:12 mathw I think there's a more general solution in here somewhere
11:12 mathw that allows cross-platformness as well
11:12 mathw but I don't have time to do that right now. Time to go wrestle with .NET again
11:13 mathw The pull request is updated anyway, now handles .so.1.2.3.2.2.3.2 etc.
11:14 moritz mathw++
11:23 ab5tract joined #perl6
11:24 rurban are there ever more than 3 subversions?
11:24 rurban I think the limit is 3
11:28 Woodi but why dlopen not all that automatically ?
11:28 Woodi not do*
11:34 itz "Plain Threads are the GOTO of todays computing"
11:34 erkan joined #perl6
11:36 huf what's manual memory management then? :)
11:36 huf i guess threads fit a bit better since they're also used to muck up control flow :)
11:38 rurban I believe they prefer coros via fibers
11:38 Ulti manual memory management was the GOTO of last Tuesday
11:38 Woodi modularisation with routine calls replaced gotos ?
11:39 huf dont forget loops and if/else
11:40 Woodi dye
11:40 Woodi they don't have loops back there ??
11:40 huf well, they had at *least* if by the time we got the goto we know
11:43 Woodi so we need to lern to like shedulers in every not trivial case ?
11:46 JimmyZ top
11:57 atroxaper joined #perl6
11:58 Ugator joined #perl6
12:01 krunen joined #perl6
12:02 Woodi defining  <<constant lib = 'libncursesw.so.5';>> and using it in <<is native( lib );>> works for me. so probably '.5' suffix makes the trick, on Debian at least.
12:04 Woodi but I have /usr/lib/libncursesw.so which is a linker script... anyone know what should deal with that script ? do dload() should trigger execution of that script or script needs to be parsed to have file for dload() call ?
12:14 vendethiel wow, can't believe I didn't knew about ?&
12:14 masak it's mostly there for consistency with ~& and +&, IIUC.
12:14 masak it's not very useful.
12:15 masak unless you happen to be Dijkstra and hate short-circuiting.
12:15 vendethiel "¿¿ ¡¡ for the job. Ah, Unicode." You mean spanish, not Unicode :)
12:16 masak I guess.
12:16 erkan joined #perl6
12:16 erkan joined #perl6
12:16 vendethiel masak++
12:17 moritz how would you describe a Channel in a short sentence?
12:17 vendethiel .oO( use the stream word, I dare you )
12:23 ab5tract joined #perl6
12:24 rurban Channel: typed messages
12:27 moritz rurban: not in Perl 6 land
12:31 JimmyZ https://gist.github.com/zhuomingliang/26e30224f06848908793 # help, I can't get it working
12:33 moritz JimmyZ: the problem is that $!x and $!y are natives, so you can't bind to them
12:33 moritz JimmyZ: you have to say submethod BUILD(:$x, :$y) { $!x = $x; $!y = $y }
12:34 moritz JimmyZ: or leave out submethod BUILD altogether; the default works fine.
12:37 moritz fwiw, the profiler shows that this program spends nearlly all its time in Point constructor
12:37 moritz (method new)
12:38 JimmyZ moritz: the default is a bit slower
12:44 moritz JimmyZ: well, better than not working at all :-)
12:46 robinsmidsrod joined #perl6
12:47 raydiak joined #perl6
12:47 Alula joined #perl6
12:47 ingy joined #perl6
12:48 hugme joined #perl6
12:52 JimmyZ moritz: yeah, I'm tryig profile some codes.
12:56 abraxxa tadzik: should i send the pull request for rakudobrew?
12:57 anaeem1__ joined #perl6
12:57 woolfy PerlJam: I will do a release when my head clears up, when I can learn again, and I will learn how to program in Perl 6, try to understand all the stuff related to a release...
12:58 erkan joined #perl6
12:58 woolfy PerlJam: and I am afraid that might not happen in my lifetime anymore...  Sorry.
13:02 tadzik abraxxa: dind't you? :) I didn't have time to look through it properly yet
13:02 * masak hugs woolfy
13:02 abraxxa tadzik: no, wanted to know before if you're ok with my code
13:03 woolfy masak++
13:03 * moritz also hugs woolfy
13:04 masak woolfy: I wish you get better, but regardless of that, you're a very important help to the Perl 6 community.
13:04 tadzik abraxxa: oh, just send it, if I'm not it'll be easier for me to point it out :)
13:04 masak woolfy: thank you.
13:04 masak woolfy: if you want, I could explain closures to you every Thursday. I think I would enjoy that. :P
13:05 woolfy oww...  too many hugz and too many nice words, can't handle that.
13:05 masak fwiw, Perl 6 is a very nice language to grok closures in for the first time.
13:05 moritz woolfy: no need to handle it, just let it happen :-)
13:05 woolfy No idea what closures are.  Even lizmat cannot explain them too me, and she really tried, several times.
13:06 * masak resists the urge to explain right now
13:07 * woolfy is happy with that resistance
13:08 masak .u 𝌛
13:08 yoleaux U+1D31B TETRAGRAM FOR RESISTANCE [So] (𝌛)
13:08 dayangkun joined #perl6
13:11 rurban woolfy: closures are just functions with lexical variables
13:12 rurban lexical: compile-time private
13:13 woolfy rurban: thanks for the explanation, that's what lizmat told me repeatedly, and still, I don't get it, nor do I know what the significance is.
13:13 woolfy rurban: so leave it at that...
13:13 rurban nothing special. a normal function
13:13 masak rurban: that's what Wikipedia says too. I find it a most unhelpful explanation -- and wrong -- unless you understand closures already.
13:14 masak that "are just" part hides all the interesting bits, and the reason you'd want them in the first place.
13:14 rurban the big difference was in 1984 when all vars were dynamic
13:14 moritz woolfy: there's no significance, they are just handy sometimes :-)
13:15 hekmek joined #perl6
13:15 woolfy eekkk...  stop that, all go back to developing Perl 6, MoarVM, NQP, Parrot!  Grrr!  :-)
13:16 masak hehe
13:16 * moritz happily does
13:16 * masak aussi
13:16 moritz actually, doc writing
13:16 masak actually, sekkrit project
13:16 * rurban just endless regression tests on various machines
13:16 moritz masak: to be revealed in the advent post on the 24th? :-)
13:19 moritz when I have a Promise instance, how do I schedule code to be run when the promise is broken?
13:22 moritz m: my $p = start { sleep 0.1; say "done 1" }; $p.in(10).then({ say 'done 2'}).result
13:22 camelia rakudo-moar 30edf7: OUTPUT«Invocant requires a type object, but an object instance was passed␤  in method in at src/gen/m-CORE.setting:20897␤  in block <unit> at /tmp/e9pFhStUFA:1␤␤»
13:22 masak moritz: no, I can't promise that. development's been slower than I initially thought.
13:23 arnsholt masak: I find that a common theme with technical Wikipedia articles. Clear and straightforward if you know it already, all but inscrutable if you don't
13:23 andreoss joined #perl6
13:24 arnsholt Heck, some of them are inscrutable even if you do know it. The article on Hidden Markov Models for example, is complete gibberish (unless you're a statistican)
13:24 andreoss do cached functions share a cache between threads?
13:25 nige here is a draft advent post - http://perl6advent.wordpress.com/2014/12/21/perl6-roles/?preview=true&amp;preview_id=2721&amp;preview_nonce=83df5bcefa
13:25 Rounin joined #perl6
13:25 nige feedback welcome
13:26 kaleem joined #perl6
13:27 andreoss nige: 404
13:28 moritz nige: you could link to http://doc.perl6.org/type/Perl6%3A%3AMetamodel%3A%3AClassHOW#method_methods when talking about .^methods
13:28 nige hmm - ok
13:28 nige moritz: looking
13:28 moritz andreoss: you need a wordpress account (and be logged in) to preview, I believe
13:29 moritz andreoss: if you /msg me your email address, I'll send you an invitation
13:29 moritz nige: nice post
13:30 nige moritz good suggestion - have added link
13:34 vendethiel do we have an extensive advent post about MAIN subroutines? I think I could write something on abusing it, along with subsets, for great good
13:34 vendethiel I thought about writing a role-abusing post, but that's nowhere near mainstream reasonable
13:35 moritz vendethiel: http://perl6advent.wordpress.com/2010/12/02/day-2-interacting-with-the-command-line-with-main-subs/
13:35 moritz vendethiel: but that's four years ago; if you want to write about it again (and add some new facets), that's fine
13:38 * vendethiel starts on writing a gist
13:38 vendethiel I'll see if I can come up with more interesting stuff :)
13:39 vendethiel Ha, but, what's the syntax wordpress accepts? bbcode?
13:40 moritz vendethiel: HTMLish
13:40 vendethiel doesn't look great. but hey, I can use <a> and stuff I guess
13:40 moritz vendethiel: basically HTML, but it'll insert <br/> for linebreaks, and <p> boundaries for newlines
13:42 vendethiel alright, thanks.
13:43 psch joined #perl6
13:43 psch hi #perl6 \o
13:50 andreoss m: my int $x = 4; my int $y = 2; my int $r = $x / $y ;
13:50 camelia rakudo-moar 30edf7: OUTPUT«This type cannot unbox to a native integer␤  in block <unit> at /tmp/57YkYcK2G6:1␤␤»
13:50 timotimo yeah, the / operator gives you a Rat
13:50 timotimo you want div instead
13:59 moritz m: my $p = Promise.new; $p.break; say $p.result
13:59 camelia rakudo-moar 30edf7: OUTPUT«False␤  in method result at src/gen/m-CORE.setting:20851␤  in block <unit> at /tmp/DPnqRJb6YW:1␤␤»
14:00 moritz m: my $p = Promise.new; $p.break; say $p.cause
14:00 camelia rakudo-moar 30edf7: OUTPUT«False␤␤Error while creating backtrace: Op 'backtrace' needs an exception object␤  in method new at src/gen/m-CORE.setting:12115␤  in method backtrace at src/gen/m-CORE.setting:12266␤  in code  at src/gen/m-CORE.setting:12276␤  in method gist at…»
14:00 moritz bug, I'd say?
14:02 moritz m: say so Promise
14:02 camelia rakudo-moar 30edf7: OUTPUT«Invocant requires an instance, but a type object was passed␤  in method Bool at src/gen/m-CORE.setting:20855␤  in sub prefix:<so> at src/gen/m-CORE.setting:4296␤  in block <unit> at /tmp/DzQ3LHQz2i:1␤␤»
14:02 moritz also a bug
14:06 moritz m: say Vow
14:06 camelia rakudo-moar 30edf7: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/ahBo0I3hPuâ�¤Undeclared name:â�¤    Vow used at line 1â�¤â�¤Â»
14:12 dalek doc: 8000e26 | moritz++ | util/new-type.p6:
14:12 dalek doc: Add a util for generating a stub doc for a new type
14:12 dalek doc: review: https://github.com/perl6/doc/commit/8000e266e0
14:12 dalek doc: 43b8eb8 | moritz++ | lib/Type/Promise.pod:
14:12 dalek doc: document Promise
14:12 dalek doc: review: https://github.com/perl6/doc/commit/43b8eb8d65
14:13 dalek rakudo/nom: 413a2d5 | moritz++ | src/core/Promise.pm:
14:13 dalek rakudo/nom: Make Promise.Bool a multi
14:13 dalek rakudo/nom:
14:13 dalek rakudo/nom: otherwise "so Promise" dies
14:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/413a2d5078
14:14 nige vendethiel I'd like to see another MAIN advent entry - always been partial to a Perl5 modulino - and MAIN is modulinos on steroids
14:15 nige http://www.drdobbs.com/scripts-as-modules/184416165
14:15 nige for a 'modulino' reference
14:15 moritz also MAIN now supports better usage messages when semantic comments/pod is attached
14:16 nige indeed
14:16 moritz that's something that has been mentioned before, but only in passing
14:18 nige a work colleague uses "Munner" - multiple runner - for lots of devops work - http://search.cpan.org/~micvu/App-Munner-0.57/lib/App/Munner.pm
14:18 nige a mash up of MAIN + Munner + Modulinos could be an interesting advent post idea ...
14:19 nige talking of $work bbl &
14:20 * colomon ponders
14:21 * colomon suspects modulinos may not be the best way of doing things in p6
14:23 vendethiel moritz: do we have an advent post on subsets?
14:23 colomon vendethiel: pretty sure there's one of those from the early days
14:24 moritz vendethiel: I'd have to search too (I don't know all the 120+ topics so far by heart :-)
14:24 vendethiel yeah, you knew the other one because you wrote it :)
14:25 moritz vendethiel: well, I (co-)wrote at least 20 advent posts so far, I'm pretty sure I don't remember all the topics I wrote about :-)
14:26 vendethiel moritz: yes, pod comments is a big part ofi t
14:28 moritz vendethiel: day 24 is still up for taking (unless TimToady++ wants to claim it)
14:28 moritz vendethiel: or a 25th post-advent special :-)
14:29 andreoss how to evaluate a list eagerly, but not wait until calculation is ready?
14:30 moritz andreoss: my $promise = start { eager @list };
14:30 moritz andreoss: and when you want to wait, say 'await $promise'
14:30 andreoss i.e always evaluate ahead
14:31 andreoss moritz: it won't work with infinite lists
14:31 dalek rakudo/nom: deb1e6d | timotimo++ | src/core/Attribute.pm:
14:31 dalek rakudo/nom: a tiny speedup for auto-generated attribute accessors
14:31 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/deb1e6dfa1
14:31 moritz andreoss: don't wait for the promise then
14:32 moritz andreoss: or you can simply iterate the list, that will evaluate it
14:32 timotimo m: say "an improvement of { 19718.16ms
14:32 camelia rakudo-moar 30edf7: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/oViOY2Qc2Jâ�¤Unable to parse expression in block; couldn't find final '}' â�¤at /tmp/oViOY2Qc2J:1â�¤------> [32msay "an improvement of { 19718.16[33mâ��[31mms[0mâ�¤    expecting any of:â�¤      â€¦Â»
14:32 timotimo ...
14:32 timotimo m: say "an improvement of { 18815.48 / 19718.16 } was had in one benchmark."
14:32 camelia rakudo-moar 30edf7: OUTPUT«an improvement of 0.9542209 was had in one benchmark.␤»
14:32 ecocode joined #perl6
14:32 timotimo 4.5% is definitely not "nothing". nice.
14:33 timotimo the commit also reduces the amount of scalars generated
14:34 timotimo to 1/3rd in this benchmark's case
14:35 timotimo m: say "gc time went down to { 3374.84 / 3733.63 }"
14:35 camelia rakudo-moar 30edf7: OUTPUT«gc time went down to 0.9039032␤»
14:35 liztormato joined #perl6
14:35 timotimo interesting
14:35 liztormato moritz: vendethiel i'll gladly give up my slot
14:35 vendethiel no no no
14:37 liztormato No?
14:37 liztormato I've already done 3
14:40 masak arnsholt: "it's easy if you know it"
14:41 masak arnsholt: it's a really hard problem to explain something to someone whose background/prior knowledge you don't have a handle on.
14:42 masak arnsholt: nLab is the same, for what it's worth. I can sort of see that what they say makes sense, and hangs together, and consistently uses a vocabulary and a set of techniques -- but it all hangs together in such a way that the only way to know something is to know everything.
14:43 arnsholt Yeah. AKA, teaching is hard
14:44 mathw yes, teaching is hard
14:44 PerlJam arnsholt: yeah, but nLab is an example of making it *harder*  :)
14:45 masak despite this, I like nLab.
14:45 * arnsholt has never heard about nLab
14:48 masak arnsholt: this is a good place to start. http://ncatlab.org/nlab/show/nPOV
14:49 arnsholt Right. Looks interesting
14:50 arnsholt I think. Modulo not knowing anything about category theory, or much math beyond basic calculus \=
14:50 arnsholt =)
14:51 masak category theory is basically a useful mapping language between disciplines of mathematics.
14:52 masak it's useful to computer scientists exactly to the extent computer science is mathematics. i.e. some branches of it more than others.
14:52 andreoss moritz: it defenetly evaluates iterations one by one http://paste.fedoraproject.org/161315/14190007/
14:53 mathw I've never managed to get my head around category theory
14:53 mathw this was a slight impediment while attempting to get a PhD in a language research group
14:53 andreoss any time it starts a promise a dot printed, new line will be printed when promise is accessed
14:53 masak maybe I should hold a category theory seminar on IRC.
14:54 mathw I don't really think I need to know it anymore
14:54 mathw I'm not designing type theories
14:54 Woodi woolfy: probably easiest way to start programming (or needeing it) is to become sysadmin on some *nix system :) eg. agregate some common things into script
14:58 PerlJam Woodi: I dunno  ... there are many Perl people that starting programming for entirely different reasons and I'd say "become a sysadmin" would have been way too high a bar for many of them.
15:00 ecocode left #perl6
15:01 isBEKaml joined #perl6
15:01 andreoss i don't know what this type of evaluation is called, "lazy" is not the right term i guess.
15:01 andreoss "lookahead evaluation"". is it a thing?
15:02 vendethiel not sure
15:02 Woodi PerlJam: I think administration is simpler then programming. and I can't agree that sysadmin job is way to high for anyone :) but I understand it in "traditional" Unix/BSD way - rc scripts or /etc/init.d, /etc thingies, /var thingies..
15:04 isBEKaml Woodi: that's because you know where to look and what those stuff entails. Can't generalize/extrapolate that for the rest...
15:09 Woodi isBEKaml: key thing is _need_ to do something or wanting it. sysadmin job is simpler then netadmin job which is simpler to expert programming and so on...
15:09 * masak doesn't think woolfy needs to be a sysadmin ;)
15:10 hoelzro morning #perl6
15:12 erkan joined #perl6
15:12 erkan joined #perl6
15:13 PerlJam Woodi: Any, need is a prerequisite; but there are many more needs than just those relating to computing fields.   Look at the human genome project, the need was for sequencing the genome; programming just became a way to get computers to tell you stuff about your lab results.
15:13 PerlJam er, s/Any/Aye/
15:14 mathw the way to start programming is to have a problem you can solve by writing a program
15:14 mathw OR to just be really interested
15:16 PerlJam people come to programming from many fields.  Some of the ones I've bumped into came from "library science" (I'm still not quite sure what that is :), publishing, astronomy, bioinformatics, GIS, and nursing.  None of those people would have ever learned to program if they had gone through "sysadmin" to get there :)
15:17 * psch aughs at PerlJam tripping his balanced parens parser
15:17 mathw library science is about the remarkably difficult task of classifying, indexing and finding published information
15:17 PerlJam heck, I started programming "seriously" because I was playing with AutoCAD in the mid 1980s and wanted it to automatically tally materials costs for the things I designed.
15:18 mathw my boyfriend does a bit of coding just because he needs AutoCAD to do stuff sometimes
15:18 mathw although his last thing was some kind of Excel VBA atrocity
15:18 mathw I decided not to enquire too closely
15:18 mathw don't want to risk actually having to see the code
15:19 PerlJam mathw: where is the scientific method employed in library science?
15:19 andreoss left #perl6
15:19 * jnthn is squeemish enough about having to see VB, let alone VBA :)
15:19 isBEKaml PerlJam: autoLISP? :-)
15:20 PerlJam isBEKaml: yep :)
15:20 isBEKaml does AutoCAD still come with that LISP variant these days?
15:20 PerlJam I dunno I haven't used AutoCAD in years
15:20 vendethiel moritz: how do you write a piece of code in wordpress-html?
15:21 isBEKaml vendethiel: dunno about WP. Why not just use <pre></pre> for preformatted tags?
15:21 vendethiel well, because you don't get syntax hl
15:21 isBEKaml ah
15:22 mathw PerlJam: no idea. I didn't say it was well-named.
15:24 psch vendethiel: WP has [code] and <code>, the former can take a language="" attribute and adds a horizontal scrollbar.  beware html entities with both of those
15:24 davido__ joined #perl6
15:24 dylanwh My wife does cad -- yes, autolisp still exists.
15:25 PerlJam someone had some excellent syntax highlighting in one of the earlier advent entries this year.  Find the entry and ask how he/she did it.  :)
15:25 dylanwh "every other language/framework they've added is in some sort of deprecation cycle"
15:26 rurban Many people came from AutoLISP
15:28 dylanwh I've oftne used autolisp as a counter-point when people say elisp is horrible. Although I've only recently used elisp, I once had to make autolisp speak to a perl webapp and Lotus Notes
15:28 moritz vendethiel: I personally just write pod, and then use pod2html
15:28 moritz no syntax hilighting, but that's OK, IMHO
15:28 dylanwh (for lotus notes, I implemented a bad 1-lisp so I didn't have to write business login in Lotus BASIC)
15:29 hoelzro I was bringing some old (2+ years) code up to speed, and I noticed that Str.encode returns a specific type depending on the encoding (ex. utf8)
15:30 hoelzro I had a method declared as 'returns Buf', but apparently a utf8 isn't a Buf, so it always failed; what would be the proper returns declaration to deal with the results of a Str.encode
15:30 hoelzro (without getting as specific as utf8, that is)
15:30 moritz m: say utf8 ~~ Blob
15:30 camelia rakudo-moar deb1e6: OUTPUT«True␤»
15:30 moritz hoelzro: Blob
15:30 hoelzro ah ha
15:31 hoelzro thanks moritz
15:31 moritz m: say Buf ~~ Blob
15:31 camelia rakudo-moar deb1e6: OUTPUT«True␤»
15:31 treehug88 joined #perl6
15:31 hoelzro so utf8 isa Blob, and Blob does Buf?
15:33 Woodi hey, thes day "sysadmin job" is just doing stuff on your laptop :) and I still think that way is very simple way to some need for programming. never say that it is _only_ way, just good.
15:33 dalek zavolaj: fc4fdf6 | (Matthew Walton)++ | lib/NativeCall.pm6:
15:33 dalek zavolaj: Detect libnames with .so.<.digit>$ and use them unchanged.
15:33 dalek zavolaj:
15:33 dalek zavolaj: This allows things like "is native('libncurses.so.5')" which would previously attempt to load libncurses.so.5.so.
15:33 dalek zavolaj: review: https://github.com/jnthn/zavolaj/commit/fc4fdf620a
15:33 dalek zavolaj: 64b11de | (Matthew Walton)++ | lib/NativeCall.pm6:
15:33 dalek zavolaj: Extend recognition of libraries with .so.<digit>+ to .so(.<digit>+)+
15:33 dalek zavolaj:
15:33 dalek zavolaj: This allows calling libraries named like libfoo.so.1.2.2
15:33 dalek zavolaj: review: https://github.com/jnthn/zavolaj/commit/64b11deb9b
15:33 dalek zavolaj: a0e685f | jnthn++ | lib/NativeCall.pm6:
15:33 dalek zavolaj: Merge pull request #53 from mathw/master
15:33 dalek zavolaj:
15:33 dalek zavolaj: Detect libnames with .so.<.digit>$ and use them unchanged.
15:33 dalek zavolaj: review: https://github.com/jnthn/zavolaj/commit/a0e685fcac
15:34 jnthn hoelzro: No, Buf ~~ Blob. Buf is a mutable Blob, at least by spec.
15:34 hoelzro ahhhh
15:34 jnthn hoelzro: utf8 is a Blob 'cus if you can modify it, well, you can make it not be utf8 any more... :)
15:34 * hoelzro always forgets the order of the arguments for ~~
15:34 hoelzro it's RHS.ACCEPTS(LHS), right?
15:34 jnthn Right
15:35 jnthn Yeah, catches me out occasionally do, though the design makes sense.
15:35 jnthn s/do/too/
15:35 hoelzro $str ~~ $regex is a good mnemonic for me
15:35 Woodi actually, is .so.x(.\d)+$ a good thing ?
15:37 Woodi will work, no doubt :)
15:45 geekosaur will work until you hit something like old openssl (libssl.so.0.9.8f)
15:47 Ugator maybe only expand to .so if there is no .so?
15:50 sqirrel joined #perl6
15:51 vendethiel moritz: we have a very old post (2010) about smart matching which shows subset but not subset itself
15:53 mathw \o/
15:53 mathw Woodi: feel free to provide patches
15:54 mathw This fixes my requirements for the immediate future
15:54 mathw but I'm not convinced it's the right fix for all of the future
15:54 vendethiel mathw: I tried writing some tests for it, but it relies a lot on global $*ENV state
15:55 moritz vendethiel: then go for it
15:56 vendethiel moritz: I'm writing a MAIN advent right now :)
15:59 moritz vendethiel: do allocate a day in the 'perl6/mu' repo in file misc/perl6advent-2014/schedule
16:00 vendethiel moritz: only if I'm satisfied with what I wrote
16:01 moritz http://doc.perl6.org/type/Promise # feedback very welcome
16:06 vendethiel "my Int $a" <- typed variable? type-checked variable?
16:06 moritz typed variable
16:09 vendethiel is .IO.e still the prefered way to check if a file exists? I havn't been following up most of the latest IO refactorings...
16:09 vendethiel .oO( if I take lizmat's post place on it, maybe I'll never know )
16:10 jnthn vendethiel: I don't recall that changing, though I've only been following so closely too
16:13 mathw I'm sure I saw that in someone's code recently
16:13 moritz vendethiel: yes, .IO.e is fine
16:13 mathw and it certainly works :)
16:13 liztormato joined #perl6
16:14 liztormato vendethiel: IO.e will continue to work
16:14 vendethiel amazing :)
16:14 ecocode` joined #perl6
16:14 liztormato Refactoring is mostly under the hood
16:15 vendethiel Do we have an advent calendar about POD-ing a subroutine parameters and stuff?
16:15 vendethiel okay, good to know
16:16 PerlJam vendethiel: We've got http://perl6advent.wordpress.com/2011/12/10/documenting-perl-6/, but things have changed since then.
16:17 moritz liztormato: if you have a bit of time, a review of http://doc.perl6.org/type/Promise would be great
16:17 hoelzro PerlJam: did I forget to update that post?
16:18 doublelel joined #perl6
16:18 liztormato I was just looking at it
16:18 PerlJam hoelzro: not sure actually
16:18 moritz liztormato: I guess I should be more patient then :-)
16:18 * hoelzro looks
16:18 hoelzro I did
16:19 liztormato moritz: I understand method new is inherited.
16:19 liztormato But maybe it deserves a manual entry as well
16:19 liztormato At least stating the absence of named parameters
16:20 jnthn moritz: For .anyof, a cute example is Promise.anyof($something, Promise.in(2));
16:20 mr-foobar joined #perl6
16:20 moritz liztormato: he, I also considered that :-)
16:20 moritz jnthn: will add, thanks
16:20 liztormato Now you get the impression you cant or shouldnt Promise.new
16:21 FROGGS joined #perl6
16:21 moritz liztormato: maybe just an example in the synopsis at the beginning would help
16:21 liztormato Yup.
16:22 anaeem1_ joined #perl6
16:22 [Coke] once I install a fresh perl6, I have to do a panda rebootstrap from the panda source dir?
16:23 moritz [Coke]: yes
16:23 moritz [Coke]: or you can use rakudobrew to do it all for you
16:24 jnthn moritz: It's worth maybe being more clear somehow that Promise.in, start, anyof, and allof are Promise "factories" that keep/break the Promise, and it's only ones made by Promise.new where you grab the vow and keep/break them yourself.
16:25 [Coke] moritz: note to self. never. ever. ever. do this at work.
16:25 [Coke] because I do it every six weeks or so, long enough for me to forget that it just dies.]
16:25 moritz [Coke]: and I thought it opened a porn site while your boss was watching, or something like that
16:25 moritz :-)
16:26 moritz jnthn: good point
16:28 [Coke] moritz: normal path: upgrade perl6, reinstall. realize I've broken every installed module. run panda. panda is also broken. go to panda source, rebuild... dies halfway through because I forgot to set the http_proxy; rerun; dies near the end because something doesn't support http_proxy; switch to non-work wifi network, realize that at some point, the rebootstrap failed, and it didn't reinstall all my modules.
16:28 moritz [Coke]: :(
16:28 [Coke] so, nothing quite as bad as your scenario, but very frustrating, and I do it constantly. then I remember why I waited so long to do the update! ;)
16:29 [Coke] ok, I think I am recovered now. :P
16:36 lizmat joined #perl6
16:36 dalek doc: 347e492 | moritz++ | lib/Type/Promise.pod:
16:36 dalek doc: [Promise] incorporate feedback from jnthn++ and lizmat++
16:36 dalek doc:
16:36 dalek doc: * explain that you can only keep and break promises yourself if you created them with .new
16:36 dalek doc: * timeout example for Promise.anyof
16:36 dalek doc: review: https://github.com/perl6/doc/commit/347e492968
16:37 * lizmat is finally back after a ~4 hour upgrade to Yosemite
16:38 dalek doc: 79a7a83 | moritz++ | lib/Type/Promise.pod:
16:38 dalek doc: [Promise] Make it clear that method vow returns a Vow
16:38 dalek doc: review: https://github.com/perl6/doc/commit/79a7a83f48
16:39 moritz https://gist.github.com/moritz/b3819df0106dd7ff9b24 # draf for day 23
16:40 moritz ... now formatted
16:40 kaare_ joined #perl6
16:40 moritz *draft
16:44 lumimies moritz: s/time address/time to address/
16:48 moritz lumimies: thanks
16:48 moritz fixed
16:50 vendethiel seems like S26 link is broken
16:51 moritz eeks, that's not generated by the usual synopsis build process :(
16:52 * moritz tries   perl6-m --doc=HTML S26-documentation.pod > S26.html
16:54 * itz wonders why they bothered with 0x213B
16:54 moritz http://design.perl6.org/S26.html restored
16:54 vendethiel moritz++
16:55 dalek specs: d8509e2 | moritz++ | S (2 files):
16:55 dalek specs: Update perlcabal.org/syn/ links to design.perl6.org
16:55 dalek specs: review: https://github.com/perl6/specs/commit/d8509e2513
16:55 atroxaper joined #perl6
16:57 dalek perl6.org: fd08d90 | moritz++ | source/ (30 files):
16:57 dalek perl6.org: Update perlcabal.org/syn/ links to design.perl6.org
16:57 dalek perl6.org: review: https://github.com/perl6/perl6.org/commit/fd08d908fd
16:57 dalek mu: d1f7714 | moritz++ | / (11 files):
16:57 dalek mu: Update perlcabal.org/syn/ links to design.perl6.org
16:57 dalek mu: review: https://github.com/perl6/mu/commit/d1f7714364
17:01 moritz lumimies: did you like the draft?
17:03 vendethiel moritz: where is in S26 the part about adding comments to parameters?
17:06 hoelzro vendethiel: look for method cast in S26
17:06 hoelzro method cast(#|{ A spell } Spell $s)
17:06 hoelzro you could also put the params on separate lines interspersed by #|/#=
17:06 vendethiel hoelzro++ #was looking for "argument" or "parameter"
17:06 hoelzro vendethiel: I just happen to know that document fairly well =P
17:07 lumimies moritz: Yeah, especially the web scale :)
17:08 hoelzro vendethiel: #|/#= should work for any declaration
17:12 vendethiel alright
17:12 telex joined #perl6
17:14 vendethiel hoelzro: yeah, I know you made major changes to it =)
17:23 moritz lumimies: :-) great
17:36 woolfy masak, Woodi: I have been "sort of a sysadmin" for quite some years, and used Perl (4 & 5) for that...   Just the capability of learning new stuff and remembering stuff is a problem.  Don't get a severe burnout, it will change your life.
17:39 gtodd ++ on masak not getting burned out
17:39 gtodd well  ++ everyone not getting burned out
17:46 * TimToady has been planning to do the 24th
17:48 \Grrr joined #perl6
17:48 \Grrr left #perl6
17:49 erkan joined #perl6
17:50 dalek mu: c576b49 | (Carl Masak)++ | misc/perl6advent-2014/schedule:
17:50 dalek mu: book TimToady++ on 24th
17:50 dalek mu: review: https://github.com/perl6/mu/commit/c576b49ce5
17:50 erkan joined #perl6
17:50 masak hey, I want it to happen ;)
17:55 flussence m: await Promise.in(1).then({ fail }) # um, what? :)
17:55 camelia rakudo-moar deb1e6: OUTPUT«===SORRY!===␤Could not find symbol '&Return'␤»
17:56 FROGGS flussence: `fail` tries to return from the surrounding routine
17:56 FROGGS therefore it tries to locate a Return symbol
17:56 FROGGS m: { fail }
17:56 camelia rakudo-moar deb1e6: OUTPUT«Unhandled exception: ␤   at <unknown>:1  (/home/camelia/rakudo-inst-1/languages/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:13845  (/home/camelia/rakudo-inst-1/languages/perl6/runtime/CORE.setting.moarvm:sink:29)␤…»
17:57 FROGGS m: my $foo = -> { fail }; $foo()
17:57 camelia rakudo-moar deb1e6: OUTPUT«Unhandled exception: ␤   at <unknown>:1  (/home/camelia/rakudo-inst-1/languages/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:13845  (/home/camelia/rakudo-inst-1/languages/perl6/runtime/CORE.setting.moarvm:sink:29)␤…»
17:57 moritz m: await Promise.in(1).then(sub { fail })
17:57 camelia rakudo-moar deb1e6: OUTPUT«===SORRY!===␤Too many positionals passed; expected 0 arguments but got 1␤»
17:57 FROGGS m: await Promise.in(1).then(sub ($) { fail })
17:57 camelia rakudo-moar deb1e6: OUTPUT«Unhandled exception: ␤   at <unknown>:1  (/home/camelia/rakudo-inst-1/languages/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:13845  (/home/camelia/rakudo-inst-1/languages/perl6/runtime/CORE.setting.moarvm:sink:29)␤…»
17:58 FROGGS m: await Promise.in(1).then({ .break })
17:58 camelia rakudo-moar deb1e6: OUTPUT«===SORRY!===␤Access denied to keep/break this Promise; already vowed␤»
17:58 FROGGS eww :o)
17:59 moritz FROGGS: works as designed
18:00 jnthn you break it in then by throwing :)
18:00 flussence after reading the code, I'm guessing the first error is referring to X::ControlFlow::Return...
18:02 flussence it's a LTA error message (imho), and I think I've seen it happen before around faily code
18:02 jnthn I'm not really sure what the semantics of a Promise.start evaluating to a Failure should be
18:03 dalek mu: c19d955 | lizmat++ | misc/perl6advent-2014/schedule:
18:03 dalek mu: Free up day #22 for ++vendethiel
18:03 dalek mu: review: https://github.com/perl6/mu/commit/c19d9554c4
18:03 jnthn Does it break the Promise, or does it keep the Promise but the result is a Failure?
18:03 jnthn The latter keeps it non-fatal
18:03 lizmat vendethiel: there is no escape now
18:03 lizmat :-)
18:03 flussence I'm not really sure what I'm *doing*, but I bet other people are gonna try the same thing somewhere down the line :)
18:04 TimToady lizmat: oops, he escaped
18:04 lizmat oh dear  :-(
18:04 flussence anyway I thought the whole point of Failure is that it's a non-fatal, lazy exception that you can pass around...
18:04 flussence second seems right to me
18:05 FROGGS moritz: yes, I thought so...
18:05 FROGGS the 'eww' was more like: 'I should finally take a look at Promises'
18:05 jnthn flussence: That's my gut feeling too.
18:06 TimToady is it trying to pass it through a type constraint that doesn't allow for Failure?
18:09 jnthn Dunno
18:10 jnthn m: say Promise.start(sub ($) { fail "foo" }).result.perl
18:10 camelia rakudo-moar deb1e6: OUTPUT«===SORRY!===␤Too few positionals passed; expected 1 argument but got 0␤»
18:10 jnthn huh...
18:11 jnthn m: say Promise.start(sub ($) { fail "foo" })
18:11 camelia rakudo-moar deb1e6: OUTPUT«Promise.new(scheduler => ThreadPoolScheduler.new(initial_threads => 0, max_threads => 16, uncaught_handler => Callable), status => PromiseStatus::Broken)␤»
18:11 * jnthn will have to take a closer look...
18:12 jnthn Though I should probably be packing at the moment... :)
18:13 tony-o anyone using perl6+jvm on freebsd?
18:15 vendethiel joined #perl6
18:19 grettis joined #perl6
18:23 spider-mario joined #perl6
18:24 eiro joined #perl6
18:25 rindolf joined #perl6
18:28 tgt joined #perl6
18:35 lizmat jnthn: I'll have a look at that Promise issue
18:35 lizmat go pack!  have fun!  don't get (too) sick!
18:37 Mso150 joined #perl6
18:58 moritz method send(Channel:D: \item) {
18:58 moritz X::Channel::SendOnClosed.new.throw if $!closed;
18:58 moritz nqp::push($!queue, nqp::decont(item));
18:58 moritz }
18:58 moritz isn't that prone to race conditions?
18:59 vendethiel probably is
19:01 flussence today I fixed a failing test in my code, but I still don't know *why* this works, and that's really bothering me... https://github.com/flussence/Test-ClientServer/commit/4a85758a#diff-c167219ff83ed3c2d91725257cea759b
19:03 lizmat moritz: hopefully the locking happens in the nqp::push on the $!queue ?
19:03 lizmat alternately, nqp::push in inherently lock free ?
19:04 jnthn lizmat: It's not that the op is
19:04 moritz lizmat: yes, but somebody could close the queue between the $!closed check and nqp::push, no?
19:04 jnthn lizmat: It's that $!queue has the REPR BlockingConcQueue
19:04 lizmat moritz: in which case you would get a different (or no) error
19:04 jnthn moritz: Yes, there's a race there
19:05 d4l3k_ joined #perl6
19:05 jnthn And you'd get no error, just a lost value.
19:05 bartolin tony-o: I'm running daily builds+spectests of rakudo.jvm on freebsd. but I don't do anything else with those.
19:06 jnthn It's a little tricky to fix in combination with the queue providing backpreassure, which it's going to need to.
19:06 moritz I'll open an issue
19:06 kaare__ joined #perl6
19:07 __rnddim__ joined #perl6
19:07 petercom1and joined #perl6
19:07 shlomif joined #perl6
19:07 BooK_ joined #perl6
19:07 hekmekk joined #perl6
19:07 muraiki_ joined #perl6
19:08 orevdiabl joined #perl6
19:08 vike1 joined #perl6
19:08 eviltwin_b joined #perl6
19:08 prammer_ joined #perl6
19:08 SHODAN joined #perl6
19:09 tony-o bartolin: i'm getting an error trying to build tag 2014.06 on freebsd with make: don't know how to make j-all
19:10 tony-o configures fine, make fails with that error, any ideas?
19:10 moritz tony-o: did you configure with --backends=jvm?
19:10 tony-o yes
19:11 tony-o i built with --gen-nqp --gen-parrot --gen-moar --backends=moar,jvm,parrot
19:11 tony-o i haven't tried building with *just* jvm
19:11 moritz tony-o: does 'make m-all' and 'make p-all' work?
19:11 tony-o i'll give those a shot
19:11 bartolin tony-o: hmm, my daily builds started in october only.
19:12 bartolin tony-o: I'd try that first (only building with --backends=jvm)
19:12 tony-o bartolin: maybe i'll bump it up to october if m-all and p-all works
19:12 moritz tony-o: but why the interest in such an old version?
19:12 tony-o moritz: generating module graphs and all of that jazz
19:12 moritz tony-o: btw --backends=all exists
19:13 tony-o ty
19:13 bartolin tony-o: my daily builds are quite stable
19:14 tony-o bartolin: did you use pkg or ports to install jdk ?
19:14 bartolin tony-o: mom, have to look that up
19:14 tony-o mom?
19:15 moritz "moment"
19:16 tony-o moritz: gonna have to try it when i get home, accidentally disabled ssh
19:16 moritz tony-o: :-)
19:17 moritz tony-o: the other day I ran an "ifdown br0" to disable the bridge interface, not knowing that it acted as the primary interface of the host
19:17 tony-o i know FROGGS has a matrix but i'm building out a huge array of OSes + perl6s to test all modules and create some graphs
19:17 bartolin tony-o: obiously I installed jdk with pkg ("pkg install openjdk")
19:17 tony-o moritz: lol, i've done that before too :)
19:18 moritz tony-o: and then had to do a trip to the data center to recover
19:18 tony-o mine was a ticket cause the server was in quebec
19:18 lizmat dinner&
19:19 tony-o moritz: i'm working on something like this (this is a mockup) http://darcsys.com/smoke/module_build.html
19:20 moritz tony-o: nice
19:20 tony-o like npm for perl6
19:20 tony-o but with all the cool stuff metacpan has
19:21 erkan joined #perl6
19:21 erkan joined #perl6
19:24 bartolin moritz: if I fiddle with network or firewall configuration I sometimes schedule a (network-restart|firewall-reset|reboot) via at or cron -- say half an hour later. maybe the biggest problem is to re-schedule it if everything works fine
19:27 El_Che bartolin, moritz : I've found that at does a good job for that kind of thing
19:27 El_Che at +5m restore_something
19:27 moritz El_Che: yes, I think that's a good idea
19:28 El_Che of course, if you have console access, it's not as important
19:28 moritz though on the virtual systems, I can just use virt-manager to open a terminal
19:28 El_Che there you go :)
19:29 TimToady oh for the good old days when a computer was just a computer... :)
19:29 moritz jnthn, lizmat: is Channel.poll the non-blocking version of Channel.receive?
19:30 jnthn moritz: Yes; returns Nil if there's nothing to receive, iirc
19:30 moritz jnthn: that seems to match my reading of the source code.
19:34 itz where does readdir live? if it has a home
19:34 moritz itz: there's a dir() function
19:34 moritz m: say dir()
19:34 camelia rakudo-moar deb1e6: OUTPUT«"/home/camelia/rakudo-inst-2".IO "/home/camelia/ugexe-was-here".IO "/home/camelia/evalbot".IO "/home/camelia/test".IO "/home/camelia/.viminfo".IO "/home/camelia/rakudo-inst-1".IO "/home/camelia/.bashrc".IO "/home/camelia/.ssh".IO "/home/camelia/std".IO "/h…»
19:34 moritz those are IO::Path objects
19:35 itz ah ty
19:38 anaeem1 joined #perl6
19:45 rurban joined #perl6
19:48 FROGGS joined #perl6
19:51 FROGGS tony-o: what if you'd use the testers.perl6.org reports from its database?
19:54 bartolin tony-o: I was able to build rakudo.jvm 2014.06 on FreeBSD 10.1 (using OpenJDK 1.7.0_71 installed via pkg). my build command was 'perl Configure.pl --gen-moar --backends=jvm; make'
19:55 FROGGS tony-o: you can then still generate reports for all compilers and backends using panda
19:57 hoelzro does anyone know off hand where the "$^VAR" behavior is documented, particularly the part about $^ being ordered, and that order determining which parameter they represent?
19:57 bartolin FROGGS: could you point me to some instructions how to provide data for testers.perl6.org?
19:58 FROGGS bartolin: PANDA_SUBMIT_TESTREPORTS=1 panda install Foo
19:59 FROGGS and
19:59 FROGGS bartolin: PANDA_SUBMIT_TESTREPORTS=1 panda smoke
19:59 FROGGS though, smoke will just attempt to install everything
20:00 FROGGS it is not what one would expect by a smoke option
20:01 bartolin FROGGS: great. I hope I find some time to extend my daily test runs to smoke panda as well
20:01 itz everything in the ecosystem?
20:01 FROGGS that'd be awesome :o)
20:01 FROGGS itz: yes
20:02 raydiak hoelzro: http://design.perl6.org/S06.html#Placeholder_variables
20:02 hoelzro thanks raydiak
20:02 raydiak yw
20:03 raydiak oh nice...design.perl6.org is more pleasant to read at than perlcabal.org/syn
20:03 moritz raydiak: you mean the URL? or the layout?
20:04 raydiak s/ at/
20:04 FROGGS [Coke]: we've got a problem: https://github.com/coke/rakudo-star-daily/blob/master/log/MoarVM-configure.log
20:04 raydiak moritz: the url
20:04 raydiak moritz: does it want a new layout?
20:04 cognominal joined #perl6
20:07 moritz raydiak: it wants, yes
20:07 moritz raydiak: something more p6ish :-)
20:08 El_Che "p6ish" :)
20:10 raydiak moritz: I can let that percolate in my head...feel free to spam out any more specific ideas you may have and I'll throw them in the pressure cooker too :)
20:10 El_Che are there any p6 books planned now it's closer to christmas?
20:10 El_Che the O'reilly one would be somewhat outdated :)
20:11 moritz raydiak: well, it has much more text content than www.perl6.org, so it shouldn't be as generous with the margins
20:11 raydiak moritz: indeed, the different structure of it will make it turn out differently than docs in several ways (esp the nav too)
20:11 moritz raydiak: and that also makes it more important that the body text remains black on white
20:12 raydiak sure
20:12 hoelzro moritz: re: your channel race condition ticket, I found similar behavior in IO.pm
20:12 raydiak oh, anyone else who has input to give is welcome too, of course...just don't tell me to write the whole thing as a webgl js app or something :)
20:13 hoelzro I was hoping to clean some of that up, but $work&$life
20:13 moritz raydiak: being able to read it with JS disabled is also a hard requirement from me :-)
20:13 raydiak moritz: we're on the same page there :)
20:15 * raydiak has never in his past life as a professional software engineer and web developer, broken down and used js for things like layout or text rendering or other such fragile nonsense
20:15 moritz raydiak++
20:16 dalek perl6-roast-data: 00088f9 | coke++ | / (5 files):
20:16 dalek perl6-roast-data: today (automated commit)
20:16 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/00088f939c
20:19 dalek doc: f7ed0e0 | moritz++ | lib/Type/Channel.pod:
20:19 dalek doc: document class Channel
20:19 dalek doc: review: https://github.com/perl6/doc/commit/f7ed0e052c
20:20 raydiak moritz: no promises on exact timing, things have been a bit rough here for me lately, and the impending holidays...but things like this which are fairly easy for me and make P6 look better generally go to the top of my list instead of the bottom :)
20:20 raiph joined #perl6
20:20 moritz raydiak: that's great, and no pressure :-)
20:21 moritz raydiak: the mechanism that generates the synopsis HTML is a bit arcane, but I'll do my best in assisting with patching it
20:22 moritz synopsebot: give me link to S02, will you?
20:22 moritz or S02/Literals/
20:22 FROGGS S02:1
20:22 synopsebot Link: http://perlcabal.org/syn/S02.html#line_1
20:22 moritz who runs it? and can change the link to design.perl6.org?
20:22 FROGGS S02#Literals
20:22 FROGGS tadzik does
20:22 dalek nqp/parrot-rpa: 25963c3 | rurban++ | src/vm/parrot/ (2 files):
20:22 dalek nqp/parrot-rpa: nqp.ops: fix parrot compiler warnings, enable --debugging
20:22 dalek nqp/parrot-rpa:
20:22 dalek nqp/parrot-rpa: BUFFER_IS_EMPTY was undeclared
20:22 dalek nqp/parrot-rpa: pmc_sub.h is from parrot
20:22 dalek nqp/parrot-rpa: fix const casts for comp_sc, nqp_nfa_run, IO_VTABLE*
20:22 dalek nqp/parrot-rpa: fix wrong free(fates) => mem_sys_free(fates)
20:22 dalek nqp/parrot-rpa: review: https://github.com/perl6/nqp/commit/25963c3673
20:23 moritz oh, it's on github
20:23 moritz then I can too :-)
20:25 moritz https://github.com/tadzik/synopsebot/pull/4 opened
20:26 Isp-sec joined #perl6
20:27 raydiak moritz: thanks, that'll be helpful to stop me from nerd-sniping myself over a tangled knot of sed or some other creativity-sapping obstacle
20:27 * raydiak notices perl6now.com
20:27 raydiak whats that about?
20:28 moritz no idea, but it looks dangerous :-)
20:28 atroxaper joined #perl6
20:29 moritz or like a mis-configured webserver
20:29 raydiak moritz: doesn't it?  anyway, while my head is in this space, do you think the fixed-width on the docs site is a mistake?
20:30 moritz raydiak: fixed width? what do you mean?
20:30 raydiak moritz: the content area is fixed to like 800 wide or so
20:31 moritz raydiak: doesn't look like it for me
20:31 moritz raydiak: if I resize my browser window, it follows
20:31 moritz raydiak: we're talking about doc.perl6.org, rightß
20:31 raydiak moritz: not if you go wide enough
20:31 raydiak moritz: yes
20:31 moritz s/ß/?/
20:31 moritz ah, a max-width
20:32 raydiak yep
20:32 moritz that seems reasonable to me
20:32 moritz because if lines becomes too long, it's hard to find the correct line
20:32 raydiak it's something I do when I'm worried about the spacey broken look of small text in big wide boxes
20:32 moritz when the eye scans from the right end of the line to left of the next line, and loses the correct vertical position
20:33 raydiak ah, that's what it is...some of these things I understand in a little more instinctual way...just look at it and feel "ugh"
20:34 raydiak anyway, I thought maybe that was part of what you were saying you don't want for design.perl6.org, which makes sense because there aren't any short parts to speak of :)
20:34 raydiak but thought I'd ask if it's offensive on the docs site too while I'm at it
20:35 moritz raydiak: no, what I meant is http://perl6.org/
20:35 moritz raydiak: that one has lots of whitespace everywhere, and probably too much for the design notes
20:35 mvuets joined #perl6
20:35 moritz (though maybe I'm misjudging that)
20:35 raydiak moritz: oic.../agree
20:37 raydiak nah really it's good for what perl6.org is (a collection of small parts) but I totally agree that it wouldn't be quite right for the design docs
20:37 moritz raydiak: then we're in violent agreement :-)
20:39 * moritz wonders why the new types, Channel and Promise, won't show up in the search on doc.perl6.org
20:39 * raydiak has noticed at different times many things seem to be missed by the search
20:40 raydiak esp keywords like the loops and so forth
20:40 raydiak moritz: I see Promise and Channel, think you have a cache issue
20:41 moritz they seem to be misisn in js/search.js
20:41 moritz *missing
20:41 moritz the good part is that it means I won't have to debug js
20:41 moritz the bad part is that it means I'll have to debug htmlify.p6 :/
20:43 raydiak moritz: you mean for the keywords?  I do see channel and promise in the search here
20:44 moritz raydiak: I mean in the search box in the top right (needs JS)
20:44 raydiak yes, the search box does show Promise and Channel for me
20:45 raydiak so either you have an old cached version loaded and it's not broken, or it is broken and I'm the one with the old cached version
20:46 moritz moritz@pat:~/p6/doc>grep Channel html/js/search.js
20:46 moritz { label: "Type: Channel", value: "Channel", url: "/type/Channel" },
20:46 moritz I could have sworn it wasn't there just a moment ago
20:46 moritz oh well
20:46 tony-o FROGGS: is testers.perl6.org down?
20:47 moritz raydiak: a ctrl + shift + r fixed it, thanks
20:47 FROGGS tony-o: not for me
20:47 raydiak moritz: yw...sometimes even that doesn't fix it for me, and I have to directly navigate to the js file and reload that
20:48 moritz raydiak: I think you just saved a ton of fruitless debugging time :-)
20:48 jnthn FROGGS, tony-o: Works for me here too
20:48 FROGGS tony-o: though very slow, because it still does too much dynamicly
20:48 raydiak \o/ /me did something genuinely useful today :)
20:48 jnthn FROGGS: http://testers.perl6.org/authors is "not found", though
20:48 tony-o there we go
20:48 moritz raydiak: one thing you could try it open a private tab/window (ctrl+shift+p) and load the site there
20:48 FROGGS jnthn: that's NYI :D
20:49 jnthn Oh, then I can assume I'm an awesome author until it is :P
20:49 tony-o lol
20:49 FROGGS *g*
20:49 FROGGS I bet
20:49 moritz jnthn, lizmat: http://doc.perl6.org/type/Channel another thing to review when you have free time
20:49 raydiak moritz: oh nice one, never thought to use that for much besides multiple simultaneous logins to the same site
20:50 moritz raydiak: many people aren't even aware of the multiple logins use case
20:51 jnthn moritz: "...a thread-safe queue that helps you to a series of objects..."
20:51 jnthn I that's missing a verb... :)
20:52 jnthn moritz++ # working on concurrency docs
20:52 raydiak moritz: it blows peoples minds when I show them and they realize how many accounts they can have logged in to farmville at the same time :P
20:52 dalek doc: 60a9e31 | moritz++ | lib/Type/Channel.pod:
20:52 dalek doc: Channel: missing verb, jnthn++
20:52 dalek doc: review: https://github.com/perl6/doc/commit/60a9e3175f
20:52 moritz raydiak: :-)
20:54 raydiak afk for a while...thanks for the chat moritz, makes my day a little better when I connect with a human being for a moment :)
20:55 moritz raydiak: have a fun afk time :-)
20:58 [Coke] FROGGS: that's from september 26th.
20:59 [Coke] there is still a perl6 eval server running on host07
20:59 [Coke] er, host07
21:00 [Coke] ER HOST08!
21:00 FROGGS ohh, my bad
21:01 [Coke] FROGGS: looks like I dropped that on the floor when I stopped running things on host08.
21:01 [Coke] I will see about getting that running again on hack.
21:14 azriel joined #perl6
21:21 Sqirrel joined #perl6
21:31 ptc_p61 joined #perl6
21:33 atroxaper joined #perl6
21:36 masak 'night, #perl6
21:50 go|dfish joined #perl6
21:57 moritz http://support.ntp.org/bin/view/Main/SecurityNotice#Buffer_overflow_in_ctl_putdata I'm glad I haven't installed ntp on the new machines yet
22:10 gtodd left #perl6
22:10 gtodd joined #perl6
22:10 dalek doc: 35f76f6 | lizmat++ | lib/Type/Channel.pod:
22:10 dalek doc: Some text tweaks, hope moritz++ is ok with them
22:10 dalek doc: review: https://github.com/perl6/doc/commit/35f76f6a58
22:10 geekosaur aaaand support.ntp.org is either not reachable from here or smashed flat...
22:12 lizmat smashed flat, I would presume
22:14 moritz geekosaur: buffer overflow in the ntp server, might allow remote code execution through crafted NTP packets
22:14 moritz lizmat++ # doc rewording
22:14 geekosaur so I gathered from the url (I know far too much about ntp these days...)
22:16 * moritz -> sleep
22:17 lizmat gnight, moritz
22:20 erkan joined #perl6
22:20 erkan joined #perl6
22:24 grettis_ joined #perl6
23:06 carlin joined #perl6
23:23 atroxaper joined #perl6
23:26 telex joined #perl6
23:30 araujo joined #perl6
23:31 Ugator joined #perl6
23:39 tony-o moritz: bartolin: appears the problem is that the JVM configure runs out of memory but it continues to configure for everything else (and i was sitting here watching text fly by)
23:53 TimToady you should use make for that so it'll track the dependencies :P
23:58 TimToady Those who do not understand make are doomed to reinvent it--poorly.  Then again, those who do understand make don't seem to do it any better...

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

Perl 6 | Reference Documentation | Rakudo