Camelia, the Perl 6 bug

IRC log for #moe, 2013-02-07

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

All times shown according to UTC.

Time Nick Message
00:10 gizmomathboy joined #moe
00:44 japhb joined #moe
00:45 jnap joined #moe
01:20 stevan jasonmay: so I have been giving this subroutine thing some though
01:20 stevan t
01:21 stevan I think we need to traverse the sub body and look to see if it is a closure or not
01:21 stevan which should be easy
01:21 jasonmay yeah
01:21 stevan look for all vars accessed without being declared but which are not params
01:21 stevan if it is a closure, we need a special closure env
01:21 stevan to prevent the JS behavior of
01:21 stevan sub foo { $n } my $n = 10; foo() # 10
01:22 stevan I dont see any other way to do it
01:22 stevan cause if we just capture the declaration env and use that as the parent of the subroutines env
01:22 stevan then we will get that behavior
01:22 stevan we need to kind of bookmark the env at a particular state in time
01:23 stevan but to do that would insane (as you found out)
01:23 jasonmay yeah I was thinking of some sort of binding map
01:23 jasonmay which is basically an env
01:23 stevan yeah
01:23 * jasonmay punted and started fleshing out class/method stuff
01:23 stevan hehe :)
01:24 stevan might be worth it to poke the brains of the some p5p folks to see how they actually do it
01:24 jasonmay perlcall et al might have some useful insight too
01:26 jasonmay also I started shifting to using shouldmatchers
01:26 jasonmay and making custom matchers for classes and stuff
01:26 stevan nice
01:29 stevan ok, need to do some $work related crap, might try and commit all those .ast files soon too
01:42 bluescreen joined #moe
01:42 doy i'm pretty familiar with perl's scoping implementation, for what it's worth
01:43 doy one of the prerequisites to working on the p5-mop stuff
01:44 jasonmay cool
01:44 jasonmay I may pick your brain later this week then
01:45 doy sounds good
01:54 stevan hmm
01:54 stevan scala> java.lang.Long.parseLong( "DEADBEEF", 16 ).asInstanceOf[Int]
01:54 stevan res0: Int = -559038737
01:54 stevan scala> java.lang.Long.parseLong( "DEADBEEF", 16 )
01:54 stevan res1: Long = 3735928559
01:54 stevan this is a problem (kinda sorta)
01:57 stevan I think we want our Int to be a Long natively
01:57 stevan so we can support 64 bits
01:57 doy why not bigint?
01:57 doy (:
01:58 awwaiid how about automatic starting with machine int and then going up to double size blah blah and then to arbitrary, all without me doing anything? Now wouldn't _that_ be fun
01:58 doy that's perl 6's answer, anyway
01:58 awwaiid almost like I was programming in R or something
01:59 doy awwaiid: pretty sure most decent bigint libraries automatically do that all on their own
01:59 awwaiid oh. maybe I don't know what bigint is. I thought it was just 4-machine-words :)
02:00 doy no, bigint is arbitrary precision
02:00 doy four machine words is typically "long long"
02:01 doy perl6 uses bigints by default, for what it's worth
02:02 awwaiid well then
02:02 awwaiid that
02:03 awwaiid I'm pretty sure that's a spot that I'm quite willing to give up cperl-5 compat :)
02:03 doy yeah, automatic promotion of integers to floating point is a pretty huge misfeature
02:03 doy if you are ever in the position to have to rely on it
02:04 awwaiid yeah... though I prefer that over having to use different operators to force floats
02:05 awwaiid i.e. 5/3 != 1
02:05 awwaiid ok. enough commentary from me with no code
02:06 stevan perl -e 'print 0xDEADBEEF' # 3735928559
02:06 stevan for what its worth
02:06 stevan shit works fine on my machine
02:07 stevan I dont think Long is a floating point number, it is a 64 bit int
02:07 stevan doy: correct me if I am wrong please
02:09 doy stevan: whether ints are 32-bit or 64-bit in perl as it stands is a compile time option
02:09 doy most systems specify 64-bit these days
02:09 doy java defines "long" to always be 64-bit, and "int" to always be 32-bit, regardless of platform
02:10 stevan yeah
02:10 stevan ok, fuck it
02:10 stevan I will back out of this
02:10 doy i'm just saying that using BigInt instead of Long would be an even better decision
02:10 stevan we can just be 32 bit for now and worry about the rest later
02:10 stevan yeah
02:10 stevan word
02:14 moe [moe] stevan pushed 2 new commits to runtime-improvements: http://git.io/WYbiog
02:14 moe moe/runtime-improvements 07d0780 Stevan Little: had to tweak this to make it work within 32 bits (punt on the BigInt thing)
02:14 moe moe/runtime-improvements cdd612b Stevan Little: more AST tests
02:21 moe [moe] stevan pushed 1 new commit to runtime-improvements: http://git.io/DFyjWA
02:21 moe moe/runtime-improvements cd64f77 Stevan Little: more float AST tests
02:33 moe [moe] jasonmay created jasonmay/interpreter-oo from jasonmay/sub-arguments (+0 new commits): http://git.io/WeqQRg
02:34 jasonmay whoops
02:35 moe [moe] jasonmay pushed 1 new commit to jasonmay/interpreter-oo: http://git.io/gTGimA
02:35 moe moe/jasonmay/interpreter-oo b3b58d1 Jason May: Support basic class declaration in the interpreter
02:41 moe [moe] jasonmay pushed 1 new commit to jasonmay/interpreter-oo: http://git.io/0dVAAw
02:41 moe moe/jasonmay/interpreter-oo 9e8acf0 Jason May: Clarify the code portrayal in the comment
02:42 sahadev joined #moe
02:52 stevan nice
02:52 stevan jasonmay++
06:04 sivoais_ joined #moe
08:47 clintongormley joined #moe
09:37 melo joined #moe
09:53 clintongormley joined #moe
11:56 rob joined #moe
13:11 gizmomathboy joined #moe
15:00 stevan joined #moe
15:05 jnap joined #moe
15:34 bluescreen joined #moe
15:44 stevan joined #moe
15:52 moe [moe] stevan pushed 1 new commit to runtime-improvements: http://git.io/dTZXqw
15:52 moe moe/runtime-improvements 5971f76 Stevan Little: flesh out the string literal tests
16:01 moe [moe] stevan pushed 1 new commit to runtime-improvements: http://git.io/KO42Ww
16:01 moe moe/runtime-improvements 5acba22 Stevan Little: add support for undef in the parser so that the spec test can pass
16:07 moe [moe] stevan pushed 1 new commit to runtime-improvements: http://git.io/-2LpTQ
16:07 moe moe/runtime-improvements 79cacf1 Stevan Little: some more array literal nodes
16:08 clintongormley joined #moe
16:19 stevan joined #moe
17:08 rob_ joined #moe
18:07 kthakore oh hello
18:10 moe-docs [moe-docs] kthakore pushed 1 new commit to gh-pages: http://git.io/kwdX1A
18:10 moe-docs moe-docs/gh-pages 98c3026 Kartik Thakore: Doing doc for 2c07750
18:10 kthakore huzzah update docs in 2 cmd lines :D
18:24 kthakore also how can I compile to an executable?
18:27 moe [moe] kthakore pushed 1 new commit to master: http://git.io/3gtiFw
18:27 moe moe/master 37cb346 Kartik Thakore: Added docs to src/main/scala/org/moe/Moe.scala
18:27 moe-docs [moe-docs] kthakore pushed 1 new commit to gh-pages: http://git.io/OZDfNA
18:27 moe-docs moe-docs/gh-pages 4ee52bc Kartik Thakore: Doing doc for 37cb346
18:27 kthakore cause I see a REPL loop and main
18:33 stevan joined #moe
18:52 melo joined #moe
20:20 oalders joined #moe
21:29 gizmomathboy joined #moe
22:50 tadzik joined #moe

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