»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:00 Sarten-X joined 00:01 cooper left 00:03 cooper joined 00:07 hundskatt left
cognominal___ how to control the optimization level? I may have hit a bug. 00:07
00:08 Sarten-X left 00:19 Sarten-X joined
cognominal___ given a string, how can I get to the class object which name is that string? 00:56
00:56 cognominal___ is now known as cognominal 01:00 tokuhirom left 01:03 Sarten-X left 01:08 woosley joined 01:12 Sarten-X joined 01:14 daniel-s joined 01:18 Sarten-X left
cognominal nom: class B; say (try { ::B }).WHAT 01:18
p6eval nom 4a57bd: OUTPUT«B()␤»
djanatyn hey, it's lue! 01:19
hi, lue!
lue hello djanatyn o/
djanatyn are you doing GCI?
01:23 thou left
lue right now, I don't think so. 01:28
01:34 Sarten-X joined
djanatyn ah, okay. 01:39
01:44 Sarten-X left 02:01 rsimoes joined, Sarten-X joined 02:04 tokuhirom joined
rsimoes Is there a built-in sub or method to list a class's methods by name? 02:04
awwaiid I think it is: TheClass.^methods(:local) 02:09
rakudo: Rat.^methods(:local)
p6eval rakudo 4a57bd: ( no output )
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␤»
rsimoes !
awwaiid see perl6advent.wordpress.com/2010/12/2...-protocol/
rsimoes Thanks a bunch, awwaiid 02:11
I can see p6eval getting addictive... 02:16
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 :)
s/\bto\b/too/
rsimoes Yeah, I'm having all sorts of private back-and-forth with p6eval
Is there a published catalogue of native classes/roles and their respective attributes and methods? 02:30
I'm rummaging through the spec docs now but haven't found anything yet
02:37 Sarten-X left
rsimoes looks like setting-library is it 02:40
02:44 wolfman2000 joined 02:48 packetkn_ left 02:49 Sarten-X joined 02:55 Guest29400 left 03:09 Sarten-X left 03:17 Sarten-X joined 03:25 Chillance left 03:28 Sarten-X left 03:34 Chillance joined 03:37 Sarten-X joined 03:51 Sarten-X left 03:59 Sarten-X joined 04:05 molaf joined
japhb What's the necessary incantation to be able to directly run the output of 'perl6 --target=pir' ? 04:06
Just running it with '/path/to/installed/parrot foo.pir' doesn't work 04:07
04:07 envi_ left 04:14 birdwindupbird joined
sorear good * #perl6 04:18
04:33 tokuhirom left
japhb sorear, would you happen to know the answer to my question just above about running the output of 'perl6 --target=pir'? 04:33
Tene japhb: as I recall, you need to first load perl6.pbc 04:40
but, that was a couple of years ago last time I tried it. :) 04:41
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
04:44 packetknife joined
Tene japhb: 'sec, I'll update rakudo and try it 04:44
japhb thanks 04:47
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. :-)
Tene japhb: no idea with a quick look; sorry. 04:56
japhb Tene, no problem. Thanks for trying! 04:58
sorear japhb: AFAIK what you're trying to do is impossible, but I'm not very confident 05:02
japhb sorear, :-/ 05:03
sorear also I don't like to be in a situation spreading fud and lies 05:04
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
sorear, I can understand that. ;-)
05:13 thou joined 05:24 molaf left 05:48 benabik joined
sorear o/ benabik 05:49
06:00 localhost left 06:01 kaleem joined, localhost joined 06:37 koban joined 06:38 koban left 06:41 hundskatt joined 06:57 wtw joined 06:58 Chillance left 07:08 Trashlord joined 07:34 thou left
jnthn japhb: The pre-compilation stuff with --target=pir only works for modules for now. 07:44
japhb: I think we can make it work for scripts - I'm aware it doesn't yet, but forget the exact reason. 07:45
japhb jnthn, gotcha. I hope it can be made to work, it would be useful to me. 07:51
jnthn Should be possible... 07:52
commute time, bbiab
07:54 woosley left 08:06 Trashlord left 08:08 sayu joined 08:12 Trashlord joined 08:16 Trashlord left 08:17 Trashlord joined 08:18 mj41 joined 08:24 sayu left, sayu_ joined 08:29 worr joined 08:34 mj41 left
jnthn about...though at $dayjob :) 08:37
djanatyn okay, so I kind of implemented a bit of my idea in java 08:39
I really want to write it in perl6, and then compare the two!
github.com/djanatyn/jtask -- the java version
it's 3:39am so I guess I'll do the transcription tommorow 08:40
in the meantime, is bailador installable with panda?
and, I was wondering, will all the perl6 tasks be submitted at once, or one at a time? 08:42
08:47 mj41 joined 09:07 Moukeddar joined 09:13 overrosy joined, sayu_ left 09:15 sayu joined 09:21 sayu left 09:22 sayu joined 09:33 sayu left 09:39 dakkar joined 09:45 envi_ joined 10:04 tokuhirom joined 10:09 daxim joined 10:19 tokuhirom left, satyavvd joined 10:20 molaf joined 10:26 Moukeddar left 10:39 molaf left 10:46 cooper left
tadzik djanatyn: no; I don't know 10:51
bailador probably doesn't work for HTTP::Server::Simple doesn't
I can look at it, but I have to review some GCI tasks first 10:52
10:53 am0c joined 10:59 xinming_ joined
flussence
.oO( NativeCall being worked on again? This already sounds as good as last christmas... )
11:08
11:18 packetknife left 11:20 lue left
jnthn flussence: The new NativeCall should be rather better too :) 11:39
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:42
(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:43
jnthn flussence: Null will generally map to "just pass the type object" 11:44
flussence \o/
11:44 satyavvd left 11:47 mtk left 11:48 donri joined
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... 11:59
jnthn :) 12:07
jnthn sometimes does things like that at $dayjob and then finds some folks around me are like...omgwtfhuh :)
12:10 mj41 left 12:12 Psyche^ joined 12:13 Patterner left, Psyche^ is now known as Patterner 12:20 birdwindupbird left 12:21 mkramer joined 12:23 birdwindupbird joined 12:25 mkramer left, mj41 joined 12:27 mkramer joined 12:31 birdwindupbird left 12:34 birdwindupbird joined 12:36 mkramer left 12:38 mkramer joined
mls hi! 12:39
can someone please review/accept github.com/rakudo/rakudo/pull/41 ? Thanks! 12:40
tadzik I can accept, but I'm afraid reviewing is beyond my comprehension :) 12:43
mls no prob. maybe jnthn if his $dayjob permits 12:44
tadzik aye 12:49
12:58 Exodist left 13:00 envi_ left
jnthn mls: Does github.com/mlschroe/rakudo/commit/...9bc06d5b56 mostly just improve startup time? It's not exception related? 13:07
mls: Why the do_not_inline? What distinguishes inlinable and non-inlinable handlers? 13:10
felher Why do i get a list of pairs instead of a list of hashes when i do: 13:13
nom: my @array = hash(1,2), hash(3,4); say @array.perl;
p6eval nom 4a57bd: OUTPUT«Array.new("1" => 2, "3" => 4)␤»
13:17 mkramer1 joined, mkramer left 13:18 leprevost joined 13:19 bluescreen10 joined
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)?
felher donri: no. 13:23
donri: its not equivalent to either of those.
nom: my @array = {1 => 2}, {3 => 4}; say @array.perl; 13:24
13:24 mkramer1 left
p6eval nom 4a57bd: OUTPUT«Array.new({"1" => 2}, {"3" => 4})␤» 13:24
donri what does perl6 call (a,b) again
nom: (1,2).WHAT
p6eval nom 4a57bd: ( no output )
donri nom: (1,2).WHAT.say
p6eval nom 4a57bd: OUTPUT«Parcel()␤»
donri really thinks p6eval should .say by default 13:25
13:25 mkramer joined 13:30 mtk joined 13:32 mkramer left, mtk left 13:34 mkramer joined 13:39 donri left 13:41 mkramer left 13:43 mkramer joined 13:49 mtk joined 13:51 mkramer left 13:52 mkramer joined
bbkr nom: any(False,True).say # LTA stringification, known bug? 13:53
p6eval nom 4a57bd: OUTPUT«any(Bool.new(), Bool.new())␤»
bbkr if True.say is "Bool::True" then one may expect the same behavior when element of junction is printed 13:54
13:56 mkramer left 13:57 mkramer joined
lumi_ nom: True.perl.say 14:00
p6eval nom 4a57bd: OUTPUT«Bool.new()␤»
14:02 mkramer left, am0c left
bbkr lumi_: so this looks like perl method on Bool bug. causing inconsistent mixes of object types and values like 14:02
nom: any(True, 1).say 14:03
p6eval nom 4a57bd: OUTPUT«any(Bool.new(), 1)␤»
14:04 mkramer joined
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:06
jnthn bbkr: Yeah, that stringification is LTA 14:09
14:09 mkramer left
mls back from meeting 14:09
jnthn: 939696a4 is not exception related 14:10
it's part of my "inline blocks with lexical vars" master plan, cause in that case there's a lexinfo but no sub 14:11
14:12 mkramer joined
mls do_not_inline: we can't inline CATCH/CONTROL blocks, because we want do to that callframe fiddling to get perl6 semantics 14:12
i.e. perl6_invoke_catchhandler needs the real sub, not a stub that dies with "this has been inlined" ;) 14:13
note also that this is about inlining blocks with handlers, not the handlers themselfs
(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
14:14 Exodist joined 14:16 mkramer1 joined
lumi_ bbkr: Also maybe junction needs a .gist method? 14:16
14:16 mkramer left 14:26 Trashlord left 14:27 envi_ joined, Trashlord joined, mkramer joined 14:28 mkramer1 left
jnthn mls: OK, I think that do not inline thingy is probably unrequired. The optimizer should be able to go on immediate. 14:29
mls: And probably can. 14:30
mls: Nice work on letting us inline blocks with handlers.
14:30 s1n joined 14:31 am0c joined 14:34 kaleem left
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:36
14:39 mkramer1 joined, mkramer left, mkramer1 left 14:47 tokuhirom joined 14:48 ab5tract joined
jnthn mls: Well, the immediate decision is supplied by the context rather than the block itself 14:49
mls: Yes, delete that...CATCH and CONTROL will never mark the thing as immediate.
And the default is declaration. 14:50
mls ok, will delete it
jnthn So it all works out.
Anyway, I don't see anything else to complain about in these patches. And plenty to be happy about. :)
btw, is the startup win from the lexpad thing measurable?
mls dunno, probably not much (if any) 14:51
it saves a method call, i.e. a call context PMC creation
jnthn Well, and the PCCMETHOD signature fun 14:52
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*
Not quite sure I like the :returns(...) way of getting at it, but I don't have a better suggestion off hand.
So it's fine for now and we can worry about it when doing QAST. :)
mls returns is alread used to define the type, i.e. "Integer", so it fits nicely 14:54
jnthn Anyway, provided the patches all pass spectest, +1 to apply the pull request. 14:55
tadzik: ^^ if you have chance
mls Actually S04-blocks-and-statements/pointy.rakudo fails one test 14:56
but the test seems to be broken, it does last/redo in a pointy block 14:57
jnthn Oh.
hm
mls I don't think that qualifies as a loop
So now I die with a "not in a loop" error
jnthn perl6: (-> { last })()
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…
..pugs b927740: OUTPUT«*** Cannot use this control structure outside a 'loop' structure␤ at /tmp/siUzN8AgJo line 1, column 7-12␤»
..rakudo 4a57bd: OUTPUT«Warning␤»
mls before, it printed "Warning" instead
jnthn yeah, improvement :) 14:58
and wrong test it seems
mls yes
jnthn mls++ 14:59
moritz \o home / 15:05
mls hi moritz!
jnthn o/ moritz 15:06
lumi_ Where should the tests for Junction.gist and Bool.perl be?
mls jnthn: yep, seems to work without the do_not_inline safety guard 15:08
pushed 15:10
github++ automatically updates the request, nice
jnthn lumi_: One of the S03-junctions files for the first...misc if no other one seems more appropriate 15:13
I guess there's some S02 data types one for bool
moritz S02-types/bool.t or so 15:14
15:17 bluescreen10 left, jaldhar left 15:26 wtw left 15:32 bluescreen10 joined 15:33 sftp left 15:35 sftp joined 15:41 ab5tract left 15:49 aubreyja_ joined
jnthn Today's favorite find in a test file: "I have a dalmation called 'spot'!" 15:50
...beats "foo" :) 15:51
flussence aha, I figured out why the test suite at $dayjob kept bombing with out of RAM errors 15:53
jnthn nice :)
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
flussence most of the input data is redundant, so I just skipped the bits already done and that fixed it 15:54
(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? :)
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:56
(it's a *big* database) 15:57
with most of the redundant work removed, it's down to about 150k tests though. Not quite as impressive...
15:59 molaf joined 16:00 uniejo joined
jnthn decommute & 16:00
mls -> home 16:02
16:05 Sarten-X left
sorear good * #perl6 16:08
#phasers in 82?
slavik1 I hate dealing with stupid people
sorear does not know what to think about rindolf's latest jab at xmonad :/ 16:12
16:16 Sarten-X joined 16:22 kfo joined
dalek kudo/nom: 939696a | mls++ | src/Perl6/ (2 files):
use direct lexinfo access instead of calling get_lexinfo on the sub
16:23
rakudo/nom: bbf207c | mls++ | src/ (2 files):
rakudo/nom: Cleanup exception handling, so blocks with handlers can also be inlined.
tadzik oh noes
16:23 tokuhirom left, dalek joined, ChanServ sets mode: +v dalek 16:26 kfo_ left
sorear offers hugs to tadzik 16:28
#phasers in ...? 16:37
tadzik oh, I have to pre-report 16:38
16:44 birdwindupbird left
djanatyn I started using rake yesterday, and it was great 16:48
I liked how easy it was to add testing
is there anything like rake for perl6, and for doing tests? 16:49
16:49 thou_ joined 16:51 am0c left
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:52
tadzik djanatyn: yes 16:53
it's called PSGI I believe
rack is this idea that a webapp is a subref and stuff?
djanatyn daxim: ah, good idea 16:54
djanatyn needs to get better at asking higher quality questions
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
tadzik oh
I thought rack
djanatyn I was kinda wondering, isn't PSGi for Plack and webapps? :)
rake seems like a very open-ended make that's easy to use 16:56
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
mbuild. mbuild, mbuild test, mbuild install
djanatyn even if it's not perl6, I'm interested
tadzik it died a common death :)
do you know ufo? 16:58
it's nothing smart, it just generates makefiles
17:09 daxim left 17:14 MayDaniel joined 17:19 Trashlord left 17:22 am0c joined, Trashlord joined
lumi_ I've written the Bool.perl and Junction.gist methods for rakudo, and the spec tests.. How should I submit them? 17:23
sorear rakudo: say True.perl 17:24
p6eval rakudo fec538: OUTPUT«Bool.new()␤»
sorear wah?
b: say True.perl
p6eval b 1b7dd1: OUTPUT«Bool::True␤»
sorear lumi_: [email@hidden.address] I'd say
lumi_ sorear: Thanks, should I just email patches from git? 17:27
sorear ??
dalek ecza: 3f9c278 | sorear++ | tools/digest-ucd-xml.pl:
Remove digest-ucd-xml.pl, now being developed externally
17:29
moritz lumi_: the tests should go straight to the roast repo
lumi_: for the rakudo patches, a pull request would be nice 17:30
lumi_: what's your github ID?
lumi_ moritz: lumimies 17:31
moritz: OK, so I'll fork and push the patches there
moritz lumi_: right
lumi_ moritz: As to "straight to the roast repo", how should I do that?
sorear git push
dalek ast: fe84061 | (Zohar Kelrich)++ | S02-types/bool.t:
Test Bool.perl
17:32
ast: a4ed986 | (Zohar Kelrich)++ | S03-junctions/misc.t:
Test for some Junction stringifications
17:34 mj41 left 17:40 ab5tract left
sorear niecza: say :7<100> 17:49
p6eval niecza v11-24-gcdd4e66: OUTPUT«49␤»
17:51 dakkar left
dalek ecza: 2a190da | sorear++ | docs/announce.v12:
Draft v12 announcement (may have stuff added later if I get anything done)
17:58
17:58 zby_home joined, MayDaniel left
jnthn sorear: typo: beleive 18:10
masak oh hai, p6ies. 18:11
ooh, a Niecza release. 18:12
jnthn masak! \o/
masak niecza: say :7{"100"}
p6eval niecza v11-26-g2a190da: OUTPUT«===SORRY!===␤␤Malformed radix number at /tmp/msshRl7vRC line 1:␤------> say :7⏏{"100"}␤␤Parse failed␤␤»
masak jnthn! \o/
dalek ecza: daa9117 | sorear++ | docs/announce.v12:
typo: jnthn
18:17
sorear masak: not until Monday ofc, but I want to get stuff sorted now
masak sorear: ah, right. it's next Monday.
kudos for preparing early. 18:18
sorear yeah. I'll be out of town this weekend 18:23
will be visiting family 1000km north, by car 18:24
masak 1000km north? Alaska? 18:25
no, not quite that far, I think. 18:26
jnthn If you drive 1000km north, are you even in a different state? ;)
Oh wait, this ain't Texas we're talking about :P
masak oh, 1000km is nothing, when looking at maps.google.com
definitely still the US.
probably OR. 18:27
jnthn I...think Alaska is part of the US too. :P
18:27 estrabd_afk is now known as estrabd
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
masak oh, so still CA. 18:29
sorear Tests=10750 nice (PASS) 18:30
masak \o/ 18:31
18:31 envi_ left
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?
moritz does, at least for the "style for faq.perl6.org" task 18:35
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
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 :)
moritz uhm, the build is noisy
... and fails 18:41
jnthn Curious. Which bit?
oh, darn :(
Build is pretty quiet and fast on Windows. :)
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
cc: ../../3rdparty/dyncall-0.6/dyncall/libdyncall_s.a: No such file or directory
cc: ../../3rdparty/dyncall-0.6/dyncallback/libdyncallback_s.a: No such file or directory
cc: ../../3rdparty/dyncall-0.6/dynload/libdynload_s.a: No such file or directory
sorry, that should have gone to a nopaste :(
jnthn moritz: Can you verify that those files don't exist? 18:42
er, or if there's a .a file in those directories at all?
moritz there's one in 3rdparty/dyncall-0.6/dyncall/build_out/linux_x64_gcc_release/libdyncall_s.a
jnthn oh great, it puts the build files in different places?!
18:48 Vlavv` joined
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:49
18:51 Guest2721 joined 18:52 leprevost left 18:53 birdwindupbird joined
masak sorear: just corroborates further my claim that the east/west directions are/feel more arbitrary than north/south. :) 18:53
moritz on the contrary 18:54
east is in the rotation direction of the earth
masak that's not evident from a map, though.
moritz whereas north/south is pretty arbitrary 18:55
well, I'm talking more from a very general point of view
masak north is usually pointing away from me (on a horizontal surface) or same direction as my head (on a screen)
the arbitrariness of east/west comes, of course, from the arbitrariness of left/right. 18:56
moritz nom: sub f($x) { say $x }; f nqp::unbox_s("foo") 18:59
p6eval nom fec538: OUTPUT«foo␤» 19:00
moritz nom: sub f($x) { say $x }; f pir::new__PS("String")
p6eval nom fec538: OUTPUT«␤»
moritz nom: sub f($x) { say $x }; f pir::new__PS("ResizablePMCArray")
p6eval nom fec538: OUTPUT«␤»
19:02 thou_ is now known as thou 19:07 ab5tract joined
ashleydev sorear: interestingly you're still traveling NW (LA is east of Reno...) 19:07
moritz jnthn: nopaste.snit.ch/96670 that's what I'd write as a comment on the Hague grant proposal 19:12
does that sound sane?
jnthn moritz: looking 19:13
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:15
and no, you can't just throw a Parrot Object in and expect things to end well 19:16
19:16 Moukeddar joined
jnthn moritz: Anyway, largely sane :) 19:17
19:17 hugme left
moritz right, but the unboxed types need extra care on the callee side 19:17
19:17 aubreyja_ left
jnthn moritz: true 19:17
19:17 tadzik left, masak joined, Util joined
moritz adds a sentence about native types, and submits 19:18
19:18 Juerd joined
masak moritz++ 19:19
19:20 mvangala joined 19:29 vmspb joined, ab5tract left
Woodi any new news from pmichaud ? 19:30
masak today while giving a TDD course, I built this Roman numeral converter as an example of TDD: gist.github.com/1389646 -- pretty happy with the result. comments are welcome. 19:31
Moukeddar interesting! 19:33
masak it surprised me how much aggressive refactoring actually helped in reducing the code size and enabling DRY. 19:35
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()␤»
masak nom: my %a = "foo" => (1, 2, 3); my ($a, $b, $c) = %a<foo>; say $b
p6eval nom fec538: OUTPUT«Nil␤»
masak nom: my %a = "foo" => (1, 2, 3); my ($a, $b, $c) = %a<foo>.list; say $b
p6eval nom fec538: OUTPUT«2␤» 19:40
masak ah, still needs .list
nom: my %a = "foo" => (1, 2, 3); my ($a, $b, $c) = |%a<foo>; say $b
p6eval nom fec538: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&prefix:<|>' called (line 1)␤»
masak b: my %a = "foo" => (1, 2, 3); my ($a, $b, $c) = |%a<foo>; say $b
p6eval b 1b7dd1: OUTPUT«Any()␤»
jnthn nom: my %a = "foo" => (1, 2, 3); my ($a, $b, $c) = @(%a<foo>); 19:41
p6eval nom fec538: ( no output )
jnthn nom: my %a = "foo" => (1, 2, 3); my ($a, $b, $c) = @(%a<foo>); say $b
p6eval nom fec538: OUTPUT«2␤»
jnthn nom: my %a = "foo" => (1, 2, 3); my ($a, $b, $c) = @%a<foo>; say $b # guess this is wrong prec though
p6eval nom fec538: OUTPUT«===SORRY!===␤Invalid hard reference syntax at line 1, near "%a<foo>; s"␤»
jnthn aye
std: my %a = "foo" => (1, 2, 3); my ($a, $b, $c) = @%a<foo>; say $b # guess this is wrong prec though
p6eval std be1f10e: OUTPUT«===SORRY!===␤Invalid hard reference syntax at /tmp/wo54KCcdcI line 1:␤------> "foo" => (1, 2, 3); my ($a, $b, $c) = @⏏%a<foo>; say $b # guess this is wrong pr␤ expecting any of:␤ desigilname␤ twigil␤Parse failed␤FAILED 00:01 1…
masak nom: my $l = [1, 2, 3]; say @$l 19:42
p6eval nom fec538: OUTPUT«1 2 3␤»
masak \o/
19:42 mvangala left
masak will take me a while to learn that that syntax finally works :) 19:42
19:43 birdwindupbird left 19:54 vmspb left, daniel-s left
jnthn Sorry for confusing you with improvements :P 19:56
masak it's so confusing! 19:57
jnthn Pain in the @$$ 20:00
20:01 wk joined
masak std: @$$ 20:02
p6eval std be1f10e: OUTPUT«===SORRY!===␤Non-declarative sigil is missing its name at /tmp/urnhqK0IvY line 1:␤------> @$⏏$␤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…
masak thought so
jnthn std: @$$!
p6eval std be1f10e: OUTPUT«ok 00:01 119m␤»
masak Solve It By Exclaiming It 20:05
moritz std: '@$$!'
p6eval std be1f10e: OUTPUT«ok 00:01 118m␤»
moritz Solve It By Quoting It
ok, that's... simplistic
masak it's amazing how many unsyntactical things quoting makes syntactical.
jnthn :P 20:06
20:07 tadzik joined
masak std: 'ok 00:01 118m␤' 20:07
p6eval std be1f10e: OUTPUT«ok 00:01 118m␤»
masak \o/
tadzik :P
moritz well yes, it's also universal :-)
tadzik I love this joke
ENOSAY 20:08
masak std: q[ say "OK" and we'll be friends forever! ]
p6eval std be1f10e: OUTPUT«ok 00:01 118m␤»
20:20 abercrombie joined, mj41 joined 20:21 vmspb joined
dalek p/nci: a2d4ea1 | jnthn++ | src/ops/nqp_dyncall.ops:
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
20:32 donri joined 20:37 estrabd is now known as estrabd_afk 20:40 mj41 left
tadzik jnthn: yep, the build fails :) 20:41
that's probably something I can fix though
it's in 3rdparty/dyncall-0.6/dynload/dynload_syms_elf.c
jnthn tadzik: Patches very welcome for build stuff :) 20:42
Wow. Something that builds great on Windows, but less so elsewhere. That's a first. :P
20:43 Lothar left
masak enjoy it while it lasts :P 20:43
tadzik jnthn: you have a permissive compiler :)
also, it fails on -j3
cc: error: ../../3rdparty/dyncall-0.6/dyncall/libdyncall_s.a: No such file or directory 20:45
and two other things alike
jnthn: did you omit a git add or such?
Tene tadzik: .a is an artifact of compilation, not a source file 20:46
jnthn What Tene said
tadzik: It seems to dump built files in different places depending on platform or something :S
Tene tadzik: so, the makefile has an undeclared dependency
or that
tadzik oh 20:47
Tene if it works on -j1, then it's what I said
jnthn tadzik: moritz said they ended up in a build_output directory
tadzik nope, this fail is on -j1
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:48
tadzik: It already branches on nmake vs not. 20:49
tadzik eww. Ok, I'll take a look
20:56 am0c left, Lothar joined 21:00 cbk1090 left 21:02 wallberg joined
tadzik bah, I don't grok this wizardry, sorry 21:03
jnthn tadzik: OK. Just live me the paths to the .a files
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
but the second part looks highly platform dependant
jnthn: it's in ./3rdparty/dyncall-0.6/dyncall/build_out/linux_x64_gcc_release/libdyncall_s.a here
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 gist.github.com/1389908 fixes the compilation issues
felher: ...why do you need to know that? :>
but I'd guess so, yes
std: @$$! 21:06
p6eval std be1f10e: OUTPUT«ok 00:01 119m␤»
tadzik horrible!
21:06 MayDaniel joined 21:07 vmspb left
jnthn tadzik: please feel free to commit the "this" bit :) 21:07
felher tadzik: thnx :)
tadzik jnthn: okay :) 21:09
21:09 voraratis joined
dalek p/nci: 060905c | tadzik++ | 3rdparty/dyncall-0.6/dynload/dynload_syms_elf.c:
Fix some compilation issues on gcc
21:09
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␤»
..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 …
..pugs b927740: OUTPUT«0␤»
Util perl6: my Num $n = 0.0; say $n;
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␤»
..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 …
..pugs b927740: OUTPUT«0␤»
Util perl6: my Num $n = 0e0; say $n;
p6eval pugs b927740, rakudo fec538, niecza v11-27-gdaa9117: OUTPUT«0␤»
Util According to the specs, and sane thinking, shouldn't all 3 of these work?
Is the failure of the first two just an artifact of current implementations?
jnthn 0.0 is a Rat 21:11
The implementations are correct
21:11 voraratis left
Util Shouldn't Int be a subset of Rat, with both being subsets of Num? 21:12
jnthn no
Util That is part of their mathematical meanings, after all.
jnthn Implementation reality means the mathematical meanings lose their meanings somewhat though. 21:14
For example, Int can represent a wider range of values than Num.
(Because Int is mostly limited by your available RAM, whereas Num is IEEE and limited to 8 bytes worth of combinations) 21:15
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
21:16 MayDaniel left
jnthn You're expressing constraints, not coercions. 21:16
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:17
dalek p/nci: cef885f | jnthn++ | src/ops/nqp_dyncall.ops:
Add a way to free any C strings we pass; always do it initially.
21:18
p/nci: c490223 | jnthn++ | src/6model/reprs/NativeCall.c:
Don't leak library names.
p/nci: 3255210 | jnthn++ | src/ops/nqp_dyncall.ops:
Enable control over whether we free strings after passing them.
p/nci: 7b8dfa4 | jnthn++ | src/ops/nqp_dyncall.ops:
Avoid allocating 0 bytes on argumentless call.
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:19
If `$n = 5;` fails when $n is Num and the 5 is hardcoded, then that seems completely silly. 21:20
Un-perlish
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 ;)
masak Util: if you don't want it to typefail, don't assign an inconsistent type :) 21:26
Util: I'm channeling moritz++ here; he once told me this, and it hit home.
any "magic" auto-casting we add basically detracts from the strictness of strict typing. and there are reasons to be explicit there. 21:27
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
masak 'night, #perl6 21:38
jnthn 'night, masak o/
Util masak: thx. I will study Ral vs Num
masak Num is what other languages call "float or double". 21:40
Real is any real number.
21:40 wk left
masak 'night, Real-ly 21:40
21:41 fridim_ joined 21:51 zby_home left 21:57 skangas left
tadzik g'night #perl6 21:57
jnthn 'night, tadzik
21:59 bluescreen100 joined, Exodist left 22:03 Guest2721 left 22:04 donri left 22:07 bluescreen100 left, bluescreen10 left 22:08 bluescreen10 joined, bluescreen100 joined 22:09 bluescreen10 left, bluescreen100 left, bluescreen100 joined, bluescreen10 joined
dalek kudo/nom: e3246ea | jnthn++ | src/Perl6/Metamodel/ (2 files):
Fix postcircumfix:<( )> overriding issue.
22:10
22:11 arlinius joined 22:12 bluescreen100 left, bluescreen10 left 22:13 bluescreen100 joined, bluescreen10 joined 22:14 am0c joined 22:17 Moukeddar left
dalek p/nci: da7528a | jnthn++ | tools/build/Makefile.in:
Install the dyncall oplib.
22:29
p/nci: f7e601c | jnthn++ | src/ (2 files):
Little refactor - we now pass in the object already initialized to build the native call site in. More flexible.
22:31 envi_ joined 22:34 molaf left 22:36 sayu joined
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:42 sayu left
dalek kudo/nci: c4ae651 | jnthn++ | src/Perl6/SymbolTable.pm:
Add loading code for native call ops.
22:46
kudo/nci: f50ef0e | jnthn++ | src/ (2 files):
Add userland support for box_target trait, which we need for NCI module.
22:51 bluescreen10 left, bluescreen100 left
jnthn enough for tonight...more tomorrow :) 22:51
&
23:03 bluescreen100 joined, bluescreen10 joined 23:05 bluescreen10 left, bluescreen100 left 23:06 wolfman2000 left
sorear good * #perl6 23:06
23:10 wallberg left 23:12 vmspb left 23:20 drbean left 23:32 thou left, dalek left 23:33 dalek joined, ChanServ sets mode: +v dalek 23:34 fridim_ left, drbean joined 23:37 envi_ left 23:52 Moukeddar joined