Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2011-11-23

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:00 Sarten-X joined #perl6
00:03 cooper joined #perl6
00:07 cognominal___ how to control the optimization level? I may have hit a bug.
00:19 Sarten-X joined #perl6
00:56 cognominal___ given a string, how can I get to the class object which name is that string?
01:08 woosley joined #perl6
01:12 Sarten-X joined #perl6
01:14 daniel-s joined #perl6
01:18 cognominal nom: class B; say (try { ::B }).WHAT
01:18 p6eval nom 4a57bd: OUTPUT«B()␤»
01:19 djanatyn hey, it's lue!
01:19 djanatyn hi, lue!
01:19 lue hello djanatyn o/
01:19 djanatyn are you doing GCI?
01:28 lue right now, I don't think so.
01:34 Sarten-X joined #perl6
01:39 djanatyn ah, okay.
02:01 rsimoes joined #perl6
02:01 Sarten-X joined #perl6
02:04 tokuhirom joined #perl6
02:04 rsimoes Is there a built-in sub or method to list a class's methods by name?
02:09 awwaiid I think it is: TheClass.^methods(:local)
02:09 awwaiid rakudo: Rat.^methods(:local)
02:09 p6eval rakudo 4a57bd:  ( no output )
02:10 awwaiid rakudo: say Rat.^methods(:local).join(',')
02:10 p6eval rakudo 4a57bd: OUTPUT«new,nude,Num,Int,Bridge,Rat,succ,pred,Str,perl,numerator,denominator␤»
02:10 rsimoes !
02:10 awwaiid see http://perl6advent.wordpress.com/2010/12/22/day-22-the-meta-object-protocol/
02:11 rsimoes Thanks a bunch, awwaiid
02:16 rsimoes I can see p6eval getting addictive...
02:17 japhb rsimoes, that's why it has a private message mode.  ;-)
02:17 awwaiid fortunately it's not to hard to get rakudo (and other) repls going locally :)
02:17 awwaiid s/\bto\b/too/
02:17 rsimoes Yeah, I'm having all sorts of private back-and-forth with p6eval
02:30 rsimoes Is there a published catalogue of native classes/roles and their respective attributes and methods?
02:30 rsimoes I'm rummaging through the spec docs now but haven't found anything yet
02:40 rsimoes looks like setting-library is it
02:44 wolfman2000 joined #perl6
02:49 Sarten-X joined #perl6
03:17 Sarten-X joined #perl6
03:34 Chillance joined #perl6
03:37 Sarten-X joined #perl6
03:59 Sarten-X joined #perl6
04:05 molaf joined #perl6
04:06 japhb What's the necessary incantation to be able to directly run the output of 'perl6 --target=pir' ?
04:07 japhb Just running it with '/path/to/installed/parrot foo.pir' doesn't work
04:14 birdwindupbird joined #perl6
04:18 sorear good * #perl6
04:33 japhb sorear, would you happen to know the answer to my question just above about running the output of 'perl6 --target=pir'?
04:40 Tene japhb: as I recall, you need to first load perl6.pbc
04:41 Tene but, that was a couple of years ago last time I tried it. :)
04:44 japhb Tene, yeah, these days there is a pile of .include and .loadlib directives at the top of the --target=pir output, plus a lot of code that does load_bytecode and load_module calls, so I would *think* that was taken care of now.  But clearly something is missing.  :-(
04:44 packetknife joined #perl6
04:44 Tene japhb: 'sec, I'll update rakudo and try it
04:47 japhb thanks
04:51 sorear japhb: I haven't really played with rakudo for months
04:51 japhb sorear, ah.  I figured it was worth a try because every so often you pipe up with some internal detail of Rakudo in response to a random question.  :-)
04:56 Tene japhb: no idea with a quick look; sorry.
04:58 japhb Tene, no problem.  Thanks for trying!
05:02 sorear japhb: AFAIK what you're trying to do is impossible, but I'm not very confident
05:03 japhb sorear, :-/
05:04 sorear also I don't like to be in a situation spreading fud and lies
05:05 japhb The slow edit/compile/test cycle of debugging the Rakudo setting is driving me to distraction.  Sadly, I can't just test the code outside the setting, because I tried that -- and it works perfectly.  It's only when moved from user space to the setting that it blows up.
05:05 japhb sorear, I can understand that.  ;-)
05:13 thou joined #perl6
05:47 benabik joined #perl6
05:49 sorear o/ benabik
06:01 kaleem joined #perl6
06:01 localhost joined #perl6
06:37 koban joined #perl6
06:38 koban left #perl6
06:41 hundskatt joined #perl6
06:57 wtw joined #perl6
07:08 Trashlord joined #perl6
07:44 jnthn japhb: The pre-compilation stuff with --target=pir only works for modules for now.
07:45 jnthn japhb: I think we can make it work for scripts - I'm aware it doesn't yet, but forget the exact reason.
07:51 japhb jnthn, gotcha.  I hope it can be made to work, it would be useful to me.
07:52 jnthn Should be possible...
07:52 jnthn commute time, bbiab
07:54 woosley left #perl6
08:08 sayu joined #perl6
08:12 Trashlord joined #perl6
08:17 Trashlord joined #perl6
08:18 mj41 joined #perl6
08:24 sayu_ joined #perl6
08:29 worr joined #perl6
08:37 * jnthn about...though at $dayjob :)
08:39 djanatyn okay, so I kind of implemented a bit of my idea in java
08:39 djanatyn I really want to write it in perl6, and then compare the two!
08:39 djanatyn https://github.com/djanatyn/jtask -- the java version
08:40 djanatyn it's 3:39am so I guess I'll do the transcription tommorow
08:40 djanatyn in the meantime, is bailador installable with panda?
08:42 djanatyn and, I was wondering, will all the perl6 tasks be submitted at once, or one at a time?
08:47 mj41 joined #perl6
09:07 Moukeddar joined #perl6
09:13 overrosy joined #perl6
09:15 sayu joined #perl6
09:22 sayu joined #perl6
09:39 dakkar joined #perl6
09:45 envi_ joined #perl6
10:04 tokuhirom joined #perl6
10:09 daxim joined #perl6
10:19 satyavvd joined #perl6
10:20 molaf joined #perl6
10:51 tadzik djanatyn: no; I don't know
10:51 tadzik bailador probably doesn't work for HTTP::Server::Simple doesn't
10:52 tadzik I can look at it, but I have to review some GCI tasks first
10:53 am0c joined #perl6
10:59 xinming_ joined #perl6
11:08 flussence .oO( NativeCall being worked on again? This already sounds as good as last christmas... )
11:39 jnthn flussence: The new NativeCall should be rather better too :)
11:42 flussence I remember the one thing that tripped me up was trying to use a C function where one string was optional, but saying "use the default value" was passing in a null pointer, and I couldn't. Will that work any better this time?
11:43 flussence (I'd argue that passing an empty string should've done the same, since it's not a meaningful value otherwise, but I didn't write that library :)
11:44 jnthn flussence: Null will generally map to "just pass the type object"
11:44 flussence \o/
11:48 donri joined #perl6
11:59 flussence Haskell has done something to my brain... I'm cleaning up perl5 code in $dayjob and ended up creating a subref with two layers of closures. The scary part is I have no difficulty understanding it...
12:07 jnthn :)
12:07 * jnthn sometimes does things like that at $dayjob and then finds some folks around me are like...omgwtfhuh :)
12:12 Psyche^ joined #perl6
12:21 mkramer joined #perl6
12:23 birdwindupbird joined #perl6
12:25 mj41 joined #perl6
12:27 mkramer joined #perl6
12:34 birdwindupbird joined #perl6
12:38 mkramer joined #perl6
12:39 mls hi!
12:40 mls can someone please review/accept https://github.com/rakudo/rakudo/pull/41 ? Thanks!
12:43 tadzik I can accept, but I'm afraid reviewing is beyond my comprehension :)
12:44 mls no prob. maybe jnthn if his $dayjob permits
12:49 tadzik aye
13:07 jnthn mls: Does https://github.com/mlschroe/rakudo/commit/939696a47c5ef9f91543fc2f384e8d9bc06d5b56 mostly just improve startup time? It's not exception related?
13:10 jnthn mls: Why the do_not_inline? What distinguishes inlinable and non-inlinable handlers?
13:13 felher Why do i get a list of pairs instead of a list of hashes when i do:
13:13 felher nom: my @array = hash(1,2), hash(3,4); say @array.perl;
13:13 p6eval nom 4a57bd: OUTPUT«Array.new("1" => 2, "3" => 4)␤»
13:17 mkramer1 joined #perl6
13:18 leprevost joined #perl6
13:19 bluescreen10 joined #perl6
13:20 felher I guess it's because of item and list context or such. But i thought { 1 => 2 } is equivalent to hash(1 => 2).
13:20 donri but is it equivalent to hash(1,2)?
13:23 felher donri: no.
13:23 felher donri: its not equivalent to either of those.
13:24 felher nom: my @array = {1 => 2}, {3 => 4}; say @array.perl;
13:24 p6eval nom 4a57bd: OUTPUT«Array.new({"1" => 2}, {"3" => 4})␤»
13:24 donri what does perl6 call (a,b) again
13:24 donri nom: (1,2).WHAT
13:24 p6eval nom 4a57bd:  ( no output )
13:24 donri nom: (1,2).WHAT.say
13:24 p6eval nom 4a57bd: OUTPUT«Parcel()␤»
13:25 * donri really thinks p6eval should .say by default
13:25 mkramer joined #perl6
13:30 mtk joined #perl6
13:34 mkramer joined #perl6
13:43 mkramer joined #perl6
13:49 mtk joined #perl6
13:52 mkramer joined #perl6
13:53 bbkr nom: any(False,True).say # LTA stringification, known bug?
13:53 p6eval nom 4a57bd: OUTPUT«any(Bool.new(), Bool.new())␤»
13:54 bbkr if True.say is "Bool::True" then one may expect the same behavior when element of junction is printed
13:57 mkramer joined #perl6
14:00 lumi_ nom: True.perl.say
14:00 p6eval nom 4a57bd: OUTPUT«Bool.new()␤»
14:02 bbkr lumi_: so this looks like perl method on Bool bug. causing inconsistent mixes of object types and values like
14:03 bbkr nom: any(True, 1).say
14:03 p6eval nom 4a57bd: OUTPUT«any(Bool.new(), 1)␤»
14:04 mkramer joined #perl6
14:05 felher So, i guess { 1 => 2 } is the same as $(%(1 => 2)).  So is there a nicer way to write 'my @array = $(%(1..10)), $(%(11..20))'? One can't use { 1..10 } i think, because it would be a block and no hash.
14:09 jnthn bbkr: Yeah, that stringification is LTA
14:09 mls back from meeting
14:10 mls jnthn: 939696a4 is not exception related
14:11 mls it's part of my "inline blocks with lexical vars" master plan, cause in that case there's a lexinfo but no sub
14:12 mkramer joined #perl6
14:12 mls do_not_inline: we can't inline CATCH/CONTROL blocks, because we want do to that callframe fiddling to get perl6 semantics
14:13 mls i.e. perl6_invoke_catchhandler needs the real sub, not a stub that dies with "this has been inlined" ;)
14:13 mls note also that this is about inlining blocks with handlers, not the handlers themselfs
14:14 mls (Actually I don't know if those handler blocks are really of type "immediate", I just wanted to make sure nothing goes wrong)
14:14 Exodist joined #perl6
14:16 mkramer1 joined #perl6
14:16 lumi_ bbkr: Also maybe junction needs a .gist method?
14:27 envi_ joined #perl6
14:27 Trashlord joined #perl6
14:27 mkramer joined #perl6
14:29 jnthn mls: OK, I think that do not inline thingy is probably unrequired. The optimizer should be able to go on immediate.
14:30 jnthn mls: And probably can.
14:30 jnthn mls: Nice work on letting us inline blocks with handlers.
14:30 s1n joined #perl6
14:31 am0c joined #perl6
14:36 mls the grammar says CATCH/CONTROL is followed by a "block", so I don't think it's of "immediate" type. So shall I delete the "do_not_inline" check?
14:39 mkramer1 joined #perl6
14:47 tokuhirom joined #perl6
14:49 ab5tract joined #perl6
14:49 jnthn mls: Well, the immediate decision is supplied by the context rather than the block itself
14:49 jnthn mls: Yes, delete that...CATCH and CONTROL will never mark the thing as immediate.
14:50 jnthn And the default is declaration.
14:50 mls ok, will delete it
14:50 jnthn So it all works out.
14:50 jnthn Anyway, I don't see anything else to complain about in these patches. And plenty to be happy about. :)
14:50 jnthn btw, is the startup win from the lexpad thing measurable?
14:51 mls dunno, probably not much (if any)
14:51 mls it saves a method call, i.e. a call context PMC creation
14:52 jnthn Well, and the PCCMETHOD signature fun
14:53 mls yes, but I don't think it'll matter much. I did it 1) because the code gets smaller and nicer, and 2) we need it if we want to inline subs with lexinfos.
14:53 jnthn *nod*
14:53 jnthn Not quite sure I like the :returns(...) way of getting at it, but I don't have a better suggestion off hand.
14:53 jnthn So it's fine for now and we can worry about it when doing QAST. :)
14:54 mls returns is alread used to define the type, i.e. "Integer", so it fits nicely
14:55 jnthn Anyway, provided the patches all pass spectest, +1 to apply the pull request.
14:55 jnthn tadzik: ^^ if you have chance
14:56 mls Actually S04-blocks-and-statements/pointy.rakudo fails one test
14:57 mls but the test seems to be broken, it does last/redo in a pointy block
14:57 jnthn Oh.
14:57 jnthn hm
14:57 mls I don't think that qualifies as a loop
14:57 mls So now I die with a "not in a loop" error
14:57 jnthn perl6: (-> { last })()
14:57 p6eval niecza v11-24-gcdd4e66: OUTPUT«Unhandled exception: Illegal control operator: last␤  at /tmp/LoeAx1MF7B line 1 (ANON @ 1) ␤  at /tmp/LoeAx1MF7B line 1 (mainline @ 1) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2224 (ANON @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2225 (mod…
14:57 p6eval ..pugs b927740: OUTPUT«*** Cannot use this control structure outside a 'loop' structure␤    at /tmp/siUzN8AgJo line 1, column 7-12␤»
14:57 p6eval ..rakudo 4a57bd: OUTPUT«Warning␤»
14:57 mls before, it printed "Warning" instead
14:58 jnthn yeah, improvement :)
14:58 jnthn and wrong test it seems
14:58 mls yes
14:59 jnthn mls++
15:05 moritz \o home /
15:05 mls hi moritz!
15:06 jnthn o/ moritz
15:06 lumi_ Where should the tests for Junction.gist and Bool.perl be?
15:08 mls jnthn: yep, seems to work without the do_not_inline safety guard
15:10 mls pushed
15:10 mls github++ automatically updates the request, nice
15:13 jnthn lumi_: One of the S03-junctions files for the first...misc if no other one seems more appropriate
15:13 jnthn I guess there's some S02 data types one for bool
15:14 moritz S02-types/bool.t or so
15:32 bluescreen10 joined #perl6
15:35 sftp joined #perl6
15:49 aubreyja_ joined #perl6
15:50 jnthn Today's favorite find in a test file: "I have a dalmation called 'spot'!"
15:51 jnthn ...beats "foo" :)
15:53 flussence aha, I figured out why the test suite at $dayjob kept bombing with out of RAM errors
15:53 jnthn nice :)
15:53 flussence Test::More keeps every pass/fail message in an internal array for some reason or other, and I had five million of those accumulating...
15:54 ab5tract joined #perl6
15:54 flussence most of the input data is redundant, so I just skipped the bits already done and that fixed it
15:55 flussence (and as a side effect of trying to chase this down, I ended up refactoring out about 0.5kloc...)
15:55 jnthn 5 *million* test cases? :)
15:56 flussence the input's more or less a database of badly-formatted log ring buffers, and I have to pull out the interesting stuff...
15:57 flussence (it's a *big* database)
15:57 flussence with most of the redundant work removed, it's down to about 150k tests though. Not quite as impressive...
15:59 molaf joined #perl6
16:00 uniejo joined #perl6
16:00 jnthn decommute &
16:02 mls -> home
16:08 sorear good * #perl6
16:08 sorear #phasers in 82?
16:08 slavik1 I hate dealing with stupid people
16:12 * sorear does not know what to think about rindolf's latest jab at xmonad :/
16:16 Sarten-X joined #perl6
16:22 kfo joined #perl6
16:23 dalek rakudo/nom: 939696a | mls++ | src/Perl6/ (2 files):
16:23 dalek rakudo/nom: use direct lexinfo access instead of calling get_lexinfo on the sub
16:23 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/939696a47c
16:23 dalek rakudo/nom: bbf207c | mls++ | src/ (2 files):
16:23 dalek rakudo/nom: Cleanup exception handling, so blocks with handlers can also be inlined.
16:23 tadzik oh noes
16:23 dalek joined #perl6
16:28 * sorear offers hugs to tadzik
16:37 sorear #phasers in ...?
16:38 tadzik oh, I have to pre-report
16:48 djanatyn I started using rake yesterday, and it was great
16:48 djanatyn I liked how easy it was to add testing
16:49 djanatyn is there anything like rake for perl6, and for doing tests?
16:49 thou_ joined #perl6
16:52 daxim when asking for "equivalent of X from Y in Z", then explain the features of X.  that way, you do not restrict the answers from people who are familiar with both Y and Z, but also people who only know Z may answer
16:53 tadzik djanatyn: yes
16:53 tadzik it's called PSGI I believe
16:53 tadzik rack is this idea that a webapp is a subref and stuff?
16:54 djanatyn daxim: ah, good idea
16:54 * djanatyn needs to get better at asking higher quality questions
16:55 arnsholt tadzik: I think rake is make for Ruby, rack is the webapp thing
16:55 * djanatyn isn't really familiar with ruby very much at all, and just tried using rake yesterday night
16:55 tadzik oh
16:55 tadzik I thought rack
16:55 djanatyn I was kinda wondering, isn't PSGi for Plack and webapps? :)
16:56 djanatyn rake seems like a very open-ended make that's easy to use
16:57 djanatyn and, with ruby syntax and power. is there anything similar with perl5 or perl6 syntax and power, that's suitable for building and testing applications?
16:57 tadzik hmm, there was a tool like that
16:57 tadzik mbuild. mbuild, mbuild test, mbuild install
16:57 djanatyn even if it's not perl6, I'm interested
16:57 tadzik it died a common death :)
16:58 tadzik do you know ufo?
16:58 tadzik it's nothing smart, it just generates makefiles
17:14 MayDaniel joined #perl6
17:22 am0c joined #perl6
17:22 Trashlord joined #perl6
17:23 lumi_ I've written the Bool.perl and Junction.gist methods for rakudo, and the spec tests.. How should I submit them?
17:24 sorear rakudo: say True.perl
17:24 p6eval rakudo fec538: OUTPUT«Bool.new()␤»
17:24 sorear wah?
17:24 sorear b: say True.perl
17:24 p6eval b 1b7dd1: OUTPUT«Bool::True␤»
17:24 sorear lumi_: rakudobug@perl.org I'd say
17:27 lumi_ sorear: Thanks, should I just email patches from git?
17:27 sorear ??
17:29 dalek niecza: 3f9c278 | sorear++ | tools/digest-ucd-xml.pl:
17:29 dalek niecza: Remove digest-ucd-xml.pl, now being developed externally
17:29 dalek niecza: review: https://github.com/sorear/niecza/commit/3f9c2785fa
17:29 moritz lumi_: the tests should go straight to the roast repo
17:30 moritz lumi_: for the rakudo patches, a pull request would be nice
17:30 moritz lumi_: what's your github ID?
17:31 lumi_ moritz: lumimies
17:31 lumi_ moritz: OK, so I'll fork and push the patches there
17:31 moritz lumi_: right
17:31 lumi_ moritz: As to "straight to the roast repo", how should I do that?
17:31 sorear git push
17:32 dalek roast: fe84061 | (Zohar Kelrich)++ | S02-types/bool.t:
17:32 dalek roast: Test Bool.perl
17:32 dalek roast: review: https://github.com/perl6/roast/commit/fe840615dc
17:32 dalek roast: a4ed986 | (Zohar Kelrich)++ | S03-junctions/misc.t:
17:32 dalek roast: Test for some Junction stringifications
17:32 dalek roast: review: https://github.com/perl6/roast/commit/a4ed986d22
17:49 sorear niecza: say :7<100>
17:49 p6eval niecza v11-24-gcdd4e66: OUTPUT«49␤»
17:58 dalek niecza: 2a190da | sorear++ | docs/announce.v12:
17:58 dalek niecza: Draft v12 announcement (may have stuff added later if I get anything done)
17:58 dalek niecza: review: https://github.com/sorear/niecza/commit/2a190da5ad
17:58 zby_home joined #perl6
18:10 jnthn sorear: typo: beleive
18:11 masak oh hai, p6ies.
18:12 masak ooh, a Niecza release.
18:12 jnthn masak! \o/
18:12 masak niecza: say :7{"100"}
18:12 p6eval niecza v11-26-g2a190da: OUTPUT«[31m===[0mSORRY![31m===[0m��Malformed radix number at /tmp/msshRl7vRC line 1:�------> [32msay :7[33m�[31m{"100"}[0m��Parse failed��»
18:12 masak jnthn! \o/
18:17 dalek niecza: daa9117 | sorear++ | docs/announce.v12:
18:17 dalek niecza: typo: jnthn
18:17 dalek niecza: review: https://github.com/sorear/niecza/commit/daa9117eb4
18:17 sorear masak: not until Monday ofc, but I want to get stuff sorted now
18:17 masak sorear: ah, right. it's next Monday.
18:18 masak kudos for preparing early.
18:23 sorear yeah.  I'll be out of town this weekend
18:24 sorear will be visiting family 1000km north, by car
18:25 masak 1000km north? Alaska?
18:26 masak no, not quite that far, I think.
18:26 jnthn If you drive 1000km north, are you even in a different state? ;)
18:26 jnthn Oh wait, this ain't Texas we're talking about :P
18:26 masak oh, 1000km is nothing, when looking at maps.google.com
18:26 masak definitely still the US.
18:27 masak probably OR.
18:27 jnthn I...think Alaska is part of the US too. :P
18:28 masak *mumble*exclave*mumble*
18:28 sorear jnthn: I live in the extreme SE corner of CA; I'm going to a place NW of Sacramento
18:29 masak oh, so still CA.
18:30 sorear Tests=10750 nice (PASS)
18:31 masak \o/
18:31 sorear one advantage of a quiet month is I don't have much to unbreak. :D
18:31 moritz tadzik: can I add you as a possible mentor for new GCI tasks?
18:35 * moritz does, at least for the "style for faq.perl6.org" task
18:39 jnthn moritz, tadzik: If either of you has chance - would be good to see if the nci branch configures/builds for somebody not on Windows. :)
18:39 moritz jnthn: will do
18:40 moritz it configures OK (the guesses look right)
18:40 jnthn Once we're comfortable it doesn't cause lots of build breakage, there's no reason it has to be developed in a branch. And it'll be nice if it's not once I get to the point of having a NativeCall.pm :)
18:40 moritz uhm, the build is noisy
18:41 moritz ... and fails
18:41 jnthn Curious. Which bit?
18:41 jnthn oh, darn :(
18:41 jnthn Build is pretty quiet and fast on Windows. :)
18:41 moritz cd src/ops && cc -o nqp_dyncall_ops.so nqp_dyncall_ops.o ../6model/reprs/NativeCall.o ../../3rdparty/dyncall-0.6/dyncall/libdyncall_s.a ../../3rdparty/dyncall-0.6/dyncallback/libdyncallback_s.a ../../3rdparty/dyncall-0.6/dynload/libdynload_s.a -fstack-protector -L/usr/local/lib  -shared -O2 -L/usr/local/lib -fstack-protector -fPIC  -lnsl -ldl -lm -lcrypt -lutil -lpthread -lrt -lgmp -lreadline  -lffi    -ldl -lm   -L/usr/lib  -licuuc -licudata  -ldl -lm
18:41 moritz cc: ../../3rdparty/dyncall-0.6/dyncall/libdyncall_s.a: No such file or directory
18:41 moritz cc: ../../3rdparty/dyncall-0.6/dyncallback/libdyncallback_s.a: No such file or directory
18:41 moritz cc: ../../3rdparty/dyncall-0.6/dynload/libdynload_s.a: No such file or directory
18:41 moritz sorry, that should have gone to a nopaste :(
18:42 jnthn moritz: Can you verify that those files don't exist?
18:42 jnthn er, or if there's a .a file in those directories at all?
18:42 moritz there's one in 3rdparty/dyncall-0.6/dyncall/build_out/linux_x64_gcc_release/libdyncall_s.a
18:42 jnthn oh great, it puts the build files in different places?!
18:48 Vlavv` joined #perl6
18:49 sorear masak: Actually I live in the extreme SW corner and I'm seeing family NE of Sacremento.  Must've installed my brain backward this morning.
18:51 Guest2721 joined #perl6
18:53 birdwindupbird joined #perl6
18:53 masak sorear: just corroborates further my claim that the east/west directions are/feel more arbitrary than north/south. :)
18:54 moritz on the contrary
18:54 moritz east is in the rotation direction of the earth
18:54 masak that's not evident from a map, though.
18:55 moritz whereas north/south is pretty arbitrary
18:55 moritz well, I'm talking more from a very general point of view
18:55 masak north is usually pointing away from me (on a horizontal surface) or same direction as my head (on a screen)
18:56 masak the arbitrariness of east/west comes, of course, from the arbitrariness of left/right.
18:59 moritz nom: sub f($x) { say $x }; f nqp::unbox_s("foo")
19:00 p6eval nom fec538: OUTPUT«foo␤»
19:00 moritz nom: sub f($x) { say $x }; f pir::new__PS("String")
19:00 p6eval nom fec538: OUTPUT«␤»
19:00 moritz nom: sub f($x) { say $x }; f pir::new__PS("ResizablePMCArray")
19:00 p6eval nom fec538: OUTPUT«␤»
19:07 ab5tract joined #perl6
19:07 ashleydev sorear: interestingly you're still traveling NW (LA is east of Reno...)
19:12 moritz jnthn: http://nopaste.snit.ch/96670 that's what I'd write as a comment on the Hague grant proposal
19:12 moritz does that sound sane?
19:13 jnthn moritz: looking
19:15 jnthn moritz: Well, it's not so much that it just boxes the primitive types - in fact, nom is capable of working on unboxed types (int, num) now. But it's right that they aren't just subclasses of the Parrot PMCs.
19:16 jnthn and no, you can't just throw a Parrot Object in and expect things to end well
19:16 Moukeddar joined #perl6
19:17 jnthn moritz: Anyway, largely sane :)
19:17 moritz right, but the unboxed types need extra care on the callee side
19:17 jnthn moritz: true
19:17 masak joined #perl6
19:17 Util joined #perl6
19:18 * moritz adds a sentence about native types, and submits
19:18 Juerd joined #perl6
19:19 masak moritz++
19:20 mvangala joined #perl6
19:29 vmspb joined #perl6
19:30 Woodi any new news from pmichaud ?
19:31 masak today while giving a TDD course, I built this Roman numeral converter as an example of TDD: https://gist.github.com/1389646 -- pretty happy with the result. comments are welcome.
19:33 Moukeddar interesting!
19:35 masak it surprised me how much aggressive refactoring actually helped in reducing the code size and enabling DRY.
19:39 masak nom: my %a = "foo" => (1, 2, 3); say %a.perl; say %a<foo>.WHAT
19:39 p6eval nom fec538: OUTPUT«("foo" => (1, 2, 3)).hash␤Parcel()␤»
19:39 masak nom: my %a = "foo" => (1, 2, 3); my ($a, $b, $c) = %a<foo>; say $b
19:39 p6eval nom fec538: OUTPUT«Nil␤»
19:39 masak nom: my %a = "foo" => (1, 2, 3); my ($a, $b, $c) = %a<foo>.list; say $b
19:40 p6eval nom fec538: OUTPUT«2␤»
19:40 masak ah, still needs .list
19:40 masak nom: my %a = "foo" => (1, 2, 3); my ($a, $b, $c) = |%a<foo>; say $b
19:40 p6eval nom fec538: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&prefix:<|>' called (line 1)␤»
19:40 masak b: my %a = "foo" => (1, 2, 3); my ($a, $b, $c) = |%a<foo>; say $b
19:40 p6eval b 1b7dd1: OUTPUT«Any()␤»
19:41 jnthn nom: my %a = "foo" => (1, 2, 3); my ($a, $b, $c) = @(%a<foo>);
19:41 p6eval nom fec538:  ( no output )
19:41 jnthn nom: my %a = "foo" => (1, 2, 3); my ($a, $b, $c) = @(%a<foo>); say $b
19:41 p6eval nom fec538: OUTPUT«2␤»
19:41 jnthn nom: my %a = "foo" => (1, 2, 3); my ($a, $b, $c) = @%a<foo>; say $b # guess this is wrong prec though
19:41 p6eval nom fec538: OUTPUT«===SORRY!===␤Invalid hard reference syntax at line 1, near "%a<foo>; s"␤»
19:41 jnthn aye
19:41 jnthn std: my %a = "foo" => (1, 2, 3); my ($a, $b, $c) = @%a<foo>; say $b # guess this is wrong prec though
19:41 p6eval std be1f10e: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Invalid hard reference syntax at /tmp/wo54KCcdcI line 1:â�¤------> [32m "foo" => (1, 2, 3); my ($a, $b, $c) = @[33mâ��[31m%a<foo>; say $b # guess this is wrong pr[0mâ�¤    expecting any of:â�¤ desigilnameâ�¤    twigilâ�¤Parse failedâ�¤FAILED 00:01 1…
19:42 masak nom: my $l = [1, 2, 3]; say @$l
19:42 p6eval nom fec538: OUTPUT«1 2 3␤»
19:42 masak \o/
19:42 masak will take me a while to learn that that syntax finally works :)
19:43 birdwindupbird left #perl6
19:56 jnthn Sorry for confusing you with improvements :P
19:57 masak it's so confusing!
20:00 jnthn Pain in the @$$
20:01 wk joined #perl6
20:02 masak std: @$$
20:02 p6eval std be1f10e: OUTPUT«[31m===[0mSORRY![31m===[0m�Non-declarative sigil is missing its name at /tmp/urnhqK0IvY line 1:�------> [32m@$[33m�[31m$[0m�Use of uninitialized value $first in string eq at STD.pm line 65363.�Use of uninitialized value $sigil in string eq at STD.pm line 6536…
20:02 * masak thought so
20:02 jnthn std: @$$!
20:02 p6eval std be1f10e: OUTPUT«ok 00:01 119m␤»
20:05 masak Solve It By Exclaiming It
20:05 moritz std: '@$$!'
20:05 p6eval std be1f10e: OUTPUT«ok 00:01 118m␤»
20:05 moritz Solve It By Quoting It
20:05 moritz ok, that's... simplistic
20:05 masak it's amazing how many unsyntactical things quoting makes syntactical.
20:06 jnthn :P
20:07 tadzik joined #perl6
20:07 masak std: 'ok 00:01 118m␤'
20:07 p6eval std be1f10e: OUTPUT«ok 00:01 118m␤»
20:07 masak \o/
20:07 tadzik :P
20:07 moritz well yes, it's also universal :-)
20:07 tadzik I love this joke
20:07 tadzik ENOSAY
20:08 masak std: q[ say "OK" and we'll be friends forever! ]
20:08 p6eval std be1f10e: OUTPUT«ok 00:01 118m␤»
20:20 abercrombie joined #perl6
20:20 mj41 joined #perl6
20:21 vmspb joined #perl6
20:27 dalek nqp/nci: a2d4ea1 | jnthn++ | src/ops/nqp_dyncall.ops:
20:27 dalek nqp/nci: Start to get string passing in place; support a choice of ways to encode the string being passed. Note that memory management not done yet.
20:27 dalek nqp/nci: review: https://github.com/perl6/nqp/commit/a2d4ea1d91
20:32 donri joined #perl6
20:41 tadzik jnthn: yep, the build fails :)
20:41 tadzik that's probably something I can fix though
20:41 tadzik it's in 3rdparty/dyncall-0.6/dynload/dynload_syms_elf.c
20:42 jnthn tadzik: Patches very welcome for build stuff :)
20:42 jnthn Wow. Something that builds great on Windows, but less so elsewhere. That's a first. :P
20:43 masak enjoy it while it lasts :P
20:43 tadzik jnthn: you have a permissive compiler :)
20:43 tadzik also, it fails on -j3
20:45 tadzik cc: error: ../../3rdparty/dyncall-0.6/dyncall/libdyncall_s.a: No such file or directory
20:45 tadzik and two other things alike
20:45 tadzik jnthn: did you omit a git add or such?
20:46 Tene tadzik: .a is an artifact of compilation, not a source file
20:46 jnthn What Tene said
20:46 jnthn tadzik: It seems to dump built files in different places depending on platform or something :S
20:46 Tene tadzik: so, the makefile has an undeclared dependency
20:46 Tene or that
20:47 tadzik oh
20:47 Tene if it works on -j1, then it's what I said
20:47 tadzik nope, this fail is on -j1
20:47 jnthn tadzik: moritz said they ended up in a build_output directory
20:48 jnthn tadzik: Feel free to do some Configure.pl hackery to set the location to find the build files in some @foo@ variable in the makefile
20:49 jnthn tadzik: It already branches on nmake vs not.
20:49 tadzik eww. Ok, I'll take a look
20:56 Lothar joined #perl6
21:02 wallberg joined #perl6
21:03 tadzik bah, I don't grok this wizardry, sorry
21:03 jnthn tadzik: OK. Just live me the paths to the .a files
21:04 tadzik I guess some makefile-fu is needed to add /build_out/linux_x64_gcc_release in the middle of this path in some cases
21:04 tadzik but the second part looks highly platform dependant
21:04 tadzik jnthn: it's in ./3rdparty/dyncall-0.6/dyncall/build_out/linux_x64_gcc_release/libdyncall_s.a here
21:05 felher Hm, regarding the @$$!. $! is the current exception object, the first $ enforces item-context and the @ list-context? Is that about right?
21:05 tadzik oh, and this https://gist.github.com/1389908 fixes the compilation issues
21:05 tadzik felher: ...why do you need to know that? :>
21:05 tadzik but I'd guess so, yes
21:06 tadzik std: @$$!
21:06 p6eval std be1f10e: OUTPUT«ok 00:01 119m␤»
21:06 tadzik horrible!
21:06 MayDaniel joined #perl6
21:07 jnthn tadzik: please feel free to commit the "this" bit :)
21:07 felher tadzik: thnx :)
21:09 tadzik jnthn: okay :)
21:09 voraratis joined #perl6
21:09 dalek nqp/nci: 060905c | tadzik++ | 3rdparty/dyncall-0.6/dynload/dynload_syms_elf.c:
21:09 dalek nqp/nci: Fix some compilation issues on gcc
21:09 dalek nqp/nci: review: https://github.com/perl6/nqp/commit/060905c776
21:10 Util perl6: my Num $n =   0; say $n;
21:10 p6eval rakudo fec538: OUTPUT«Type check failed in assignment to '$n'; expected 'Num' but got 'Int'␤  in block <anon> at /tmp/bW2XBuJD1C:1␤  in <anon> at /tmp/bW2XBuJD1C:1␤»
21:10 p6eval ..niecza v11-27-gdaa9117: OUTPUT«Unhandled exception: Nominal type check failed for scalar store; got Int, needed Num or subtype␤  at /tmp/XlNuvSMfH0 line 0 (mainline @ 0) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2224 (ANON @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2225 …
21:10 p6eval ..pugs b927740: OUTPUT«0␤»
21:10 Util perl6: my Num $n = 0.0; say $n;
21:10 p6eval rakudo fec538: OUTPUT«Type check failed in assignment to '$n'; expected 'Num' but got 'Rat'␤  in block <anon> at /tmp/RKbvn29yZa:1␤  in <anon> at /tmp/RKbvn29yZa:1␤»
21:10 p6eval ..niecza v11-27-gdaa9117: OUTPUT«Unhandled exception: Nominal type check failed for scalar store; got Rat, needed Num or subtype␤  at /tmp/I3bDwKt5Vi line 0 (mainline @ 0) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2224 (ANON @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2225 …
21:10 p6eval ..pugs b927740: OUTPUT«0␤»
21:10 Util perl6: my Num $n = 0e0; say $n;
21:10 p6eval pugs b927740, rakudo fec538, niecza v11-27-gdaa9117: OUTPUT«0␤»
21:10 Util According to the specs, and sane thinking, shouldn't all 3 of these work?
21:10 Util Is the failure of the first two just an artifact of current implementations?
21:11 jnthn 0.0 is a Rat
21:11 jnthn The implementations are correct
21:12 Util Shouldn't Int be a subset of Rat, with both being subsets of Num?
21:12 jnthn no
21:12 Util That is part of their mathematical meanings, after all.
21:14 jnthn Implementation reality means the mathematical meanings lose their meanings somewhat though.
21:14 jnthn For example, Int can represent a wider range of values than Num.
21:15 jnthn (Because Int is mostly limited by your available RAM, whereas Num is IEEE and limited to 8 bytes worth of combinations)
21:16 Util I acknowlege that I am not up to speed on type-coersion vs type-anything-else in the Specs, and that coersion is inappropriate in some places where programmers expect it to work, but
21:16 jnthn You're expressing constraints, not coercions.
21:17 Util 0 is a *digit*. To have the simple statement `my Num $n = 0;` not recognize that the 0 digit represents a valid valie for assignment, it just feels like the bad parts of some other languages.
21:18 dalek nqp/nci: cef885f | jnthn++ | src/ops/nqp_dyncall.ops:
21:18 dalek nqp/nci: Add a way to free any C strings we pass; always do it initially.
21:18 dalek nqp/nci: review: https://github.com/perl6/nqp/commit/cef885f7fe
21:18 dalek nqp/nci: c490223 | jnthn++ | src/6model/reprs/NativeCall.c:
21:18 dalek nqp/nci: Don't leak library names.
21:18 dalek nqp/nci: review: https://github.com/perl6/nqp/commit/c49022341e
21:18 dalek nqp/nci: 3255210 | jnthn++ | src/ops/nqp_dyncall.ops:
21:18 dalek nqp/nci: Enable control over whether we free strings after passing them.
21:18 dalek nqp/nci: review: https://github.com/perl6/nqp/commit/325521037e
21:18 dalek nqp/nci: 7b8dfa4 | jnthn++ | src/ops/nqp_dyncall.ops:
21:18 dalek nqp/nci: Avoid allocating 0 bytes on argumentless call.
21:18 dalek nqp/nci: review: https://github.com/perl6/nqp/commit/7b8dfa4f6c
21:19 Util If `$n = $foo` fails when $n is Num and $foo is Int, well that is annoying, but I will listen to arguments of why it must be.
21:20 Util If `$n = 5;` fails when $n is Num and the 5 is hardcoded, then that seems completely silly.
21:20 Util Un-perlish
21:22 Util jnthn: Thanks, though! I appreciate your comments. I will study the Specs before stirring up this hornet's nest.
21:22 jnthn Util: Well, and if it's a spec change you're after, I'm not really the person you need to convince ;)
21:26 masak Util: if you don't want it to typefail, don't assign an inconsistent type :)
21:26 masak Util: I'm channeling moritz++ here; he once told me this, and it hit home.
21:27 masak any "magic" auto-casting we add basically detracts from the strictness of strict typing. and there are reasons to be explicit there.
21:28 jnthn There's also the whole fact that types are optional :)
21:28 masak so if you want to be able to store any number in the variable, don't type it as Num. type it as Real, or Cool, or not at all.
21:37 vmspb joined #perl6
21:38 masak 'night, #perl6
21:38 jnthn 'night, masak o/
21:38 Util masak: thx. I will study Ral vs Num
21:40 masak Num is what other languages call "float or double".
21:40 masak Real is any real number.
21:40 masak 'night, Real-ly
21:41 fridim_ joined #perl6
21:57 tadzik g'night #perl6
21:57 jnthn 'night, tadzik
21:59 bluescreen100 joined #perl6
22:04 donri left #perl6
22:08 bluescreen10 joined #perl6
22:08 bluescreen100 joined #perl6
22:09 bluescreen100 joined #perl6
22:09 bluescreen10 joined #perl6
22:10 dalek rakudo/nom: e3246ea | jnthn++ | src/Perl6/Metamodel/ (2 files):
22:10 dalek rakudo/nom: Fix postcircumfix:<( )> overriding issue.
22:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e3246eab2a
22:11 arlinius joined #perl6
22:13 bluescreen100 joined #perl6
22:13 bluescreen10 joined #perl6
22:14 am0c joined #perl6
22:29 dalek nqp/nci: da7528a | jnthn++ | tools/build/Makefile.in:
22:29 dalek nqp/nci: Install the dyncall oplib.
22:29 dalek nqp/nci: review: https://github.com/perl6/nqp/commit/da7528aab0
22:29 dalek nqp/nci: f7e601c | jnthn++ | src/ (2 files):
22:29 dalek nqp/nci: Little refactor - we now pass in the object already initialized to build the native call site in. More flexible.
22:29 dalek nqp/nci: review: https://github.com/perl6/nqp/commit/f7e601c3c1
22:31 envi_ joined #perl6
22:36 sayu joined #perl6
22:40 jnthn woo, just got the new NativeCall.pm to make a call to a void, argless function :)
22:40 Tene the best kind of function!
22:46 dalek rakudo/nci: c4ae651 | jnthn++ | src/Perl6/SymbolTable.pm:
22:46 dalek rakudo/nci: Add loading code for native call ops.
22:46 dalek rakudo/nci: review: https://github.com/rakudo/rakudo/commit/c4ae651a21
22:46 dalek rakudo/nci: f50ef0e | jnthn++ | src/ (2 files):
22:46 dalek rakudo/nci: Add userland support for box_target trait, which we need for NCI module.
22:46 dalek rakudo/nci: review: https://github.com/rakudo/rakudo/commit/f50ef0e40a
22:51 jnthn enough for tonight...more tomorrow :)
22:51 jnthn &
23:03 bluescreen100 joined #perl6
23:03 bluescreen10 joined #perl6
23:06 sorear good * #perl6
23:33 dalek joined #perl6
23:34 drbean joined #perl6
23:52 Moukeddar joined #perl6

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

Perl 6 | Reference Documentation | Rakudo