Camelia, the Perl 6 bug

IRC log for #parrot, 2011-05-30

Parrot | source cross referenced

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

All times shown according to UTC.

Time Nick Message
00:01 lucian dukeleto: heh, now it actually works in parrot. just printed 3
00:04 bubaflub lucian++
00:05 lucian this at least made me sure which testing framework i want
00:05 lucian py.test can easily integrate external tools (in this case parrot)
00:27 kid51 joined #parrot
00:50 preflex left #parrot
00:53 preflex joined #parrot
00:54 tcurtis lucian++
00:55 lucian thanks. i've realised that testing generated code is hard, and a little silly
00:56 tcurtis lucian: How are you doing your codegen, ooc?
00:58 lucian tcurtis: an AST walker written in python http://bitbucket.org/lucian1900/puffin
00:59 lucian hmm. can i get 'parrot' to run a string instead of a file?
01:04 tcurtis lucian: Why did you decide on directly generating PIR?
01:05 davidfetter left #parrot
01:05 lucian tcurtis: the other option was winxed. i figured i'd have to override a lot of winxed semantics
01:06 tcurtis lucian: As far as I can tell, Winxed doesn't really have much in the way of semantics beyond those of Parrot itself. Why not PAST?
01:06 lucian tcurtis: can't get at PAST from python
01:10 tcurtis lucian: Would you use it if you were able to?
01:10 lucian tcurtis: i guess. ast->ast is shorter than ast->assembly
01:13 lucian tcurtis: i'd need a textual representation for PAST that's easy enough to generate
01:15 tcurtis lucian: I'm considering writing a parser for such. I don't expect it would be especially complicated.
01:17 bubaflub left #parrot
01:18 lucian tcurtis: that might help. i'm not promising i'll use it, though :)
01:18 lucian so far PIR seems ok
01:18 tcurtis lucian: no worries. Even if you don't, I expect someone might find use for it eventually.
01:20 * lucian nods
01:20 bubaflub joined #parrot
01:20 lucian i don't know PAST very well to suggest a good format
01:20 lucian s-exps, json and xml were suggested
01:20 lucian yaml too
01:24 kid51 commit  8c04cc3e6: make test PASS on Darwin/PPC; make fulltest pass on linux/i386
01:26 mikehh left #parrot
01:39 bubaflub left #parrot
01:45 bubaflub joined #parrot
01:45 bubaflub left #parrot
01:53 lucian left #parrot
01:53 kid51 left #parrot
02:22 * soh_cah_toa discovers the power of ctags and NERD tree
02:40 mikehh joined #parrot
02:43 cotto ohai
02:43 cotto this feels like the first time I've been still all weekend
02:45 soh_cah_toa cotto: busy weekend?
02:47 cotto soh_cah_toa, unusually full
02:47 cotto I'm glad I have Monday off.
02:50 cotto full of good things though.  I've got a small mountain of topics to blog about now.
02:54 woosley joined #parrot
02:58 soh_cah_toa cotto: m0 stuff, i presume?
02:58 cotto soh_cah_toa, among other things
03:04 cotto soh_cah_toa, do you have any blockers?
03:07 soh_cah_toa cotto: hmmm...kinda maybe. i think i understand where to go now w/ breakpoints (see my blog). now i have to actually take that idea and make into something
03:07 cotto oh good.  you blogged
03:11 cotto soh_cah_toa++
03:18 preflex left #parrot
03:20 preflex joined #parrot
03:21 hudnix left #parrot
03:23 cotto soh_cah_toa, who's Michael Fair?
03:24 soh_cah_toa cotto: no idea. he says he doesn't frequent irc much anymore but emails occasionally
03:25 soh_cah_toa cotto: he's crazy smart though. i'll forward that email
03:25 cotto soh_cah_toa, sweet
03:26 cotto The name doesn't ring a bell, but I like smart people.
03:26 cotto I keep hoping the smart will rub off on me, but I usually just end up confused and disoriented.
03:26 soh_cah_toa ha
03:27 soh_cah_toa it was nuts. he just popped up out of nowhere w/ this really long and detailed message about parrot and debuggers
03:27 cotto great
03:33 wagle_ left #parrot
03:33 soh_cah_toa btw, i've been meaning to ask someone...what are all these installable_* executables for? obviously, they are "installable" but don't you just run 'make install' to install these?
03:34 wagle joined #parrot
03:36 cotto those are the files that make install installs
03:36 cotto so yes
03:38 soh_cah_toa so 'make install' creates installable_foo in addition to /usr/bin/foo?
03:39 cotto make creates the file, make install installs it
03:40 soh_cah_toa oh
03:41 soh_cah_toa that seems kinda weird though. what if i don't want them installed? now i have all these file cluttering my directory anyway. i don't think it was always like that, was it? i started seeing them around 3.3.0
03:41 cotto or not
03:42 cotto I was wrong.  make install builds and installs the installable_* files
03:45 soh_cah_toa installs them as /usr/bininstallable_* or /usr/bin/foo? after installing to /usr/bin does it still leave installable_* hanging around? i'd do it myself but i think i installed from rpm and don't wanna mess it up
03:46 cotto the location depends on how Parrot was configured, but the installable_* file do stick around in the build dir.
03:49 soh_cah_toa alright. good, i can get rid of these annoying things then
03:51 cotto anything that's generated by a make target can be safely deleted
03:53 soh_cah_toa would 'make clean' take care of that? i'm always afraid to run that command
03:53 cotto why?
03:54 cotto yes
03:55 soh_cah_toa i'm afraid i'll mess things up and have to rebuild or reinstall or something. i never know what it "cleans". the Makefile only says "basic cleaning up."
03:56 cotto I have "maek" aliased to make in case I mess up.
03:57 cotto sometimes I try to type maek and type make by accident
03:58 cotto I don't understand the concern.  If make clean or realclean deletes anything important, that's a bug.
03:59 soh_cah_toa it also means bye bye "something important"
03:59 cotto that's what git is for
03:59 cotto if you have something important that's not in version control, that's also bad
04:00 dukeleto Interesting language I've never heard of before: http://lisaac.org
04:00 jsut_ joined #parrot
04:00 * dukeleto has m aliased to make, for maximum laziness
04:00 dukeleto and g for git
04:00 soh_cah_toa wow
04:00 soh_cah_toa yeah, that's lazy
04:01 dukeleto soh_cah_toa: if you think of how many thousands of times you type "git", typing "g" is a huge savings
04:01 cotto sites that have scrolling content make me sad
04:01 cotto adding it to your bash completions isn't too hard, so you don't even have to sacrifice those
04:03 cotto (it = "g as an alias for git")
04:04 soh_cah_toa aliases are great. i have proot aliased to take me back to the parrot root directory
04:04 cotto you only have one parrot root? ;)
04:05 jsut left #parrot
04:06 soh_cah_toa sproot is for soh-cah-toa/parrot, proot is for parrot/parrot
04:07 cotto ha
04:07 cotto ah
04:07 cotto I can't even type a two-letter word correctly.
04:07 soh_cah_toa sproot. that's sounds pretty ridiculous if you try to say it
04:07 cotto delightful word
04:08 soh_cah_toa you should alias h='ha'
04:09 cotto um...
04:11 soh_cah_toa yeah, i know. it's late
04:13 soh_cah_toa and on that note, i shall leave
04:14 soh_cah_toa see you tomorrow
04:14 soh_cah_toa left #parrot
04:19 dukeleto cotto: i wrote up a bunch of stuff about the M0 meeting. Need to digitize it.
04:19 woosley left #parrot
04:20 cotto dukeleto, awesome.  I was trying to be lazy by making the gist my primary source, but I still ended up writing a bunch of notes during my free time today.
04:28 dukeleto cotto: do we want a bytecode verifier? http://www.informit.com/articles/a​rticle.aspx?p=1187967&seqNum=2 and http://www.ebb.org/bkuhn/a​rticles/thesis/node8.html are good explanations
04:30 cotto I remember looking for links like those but not finding anything.
04:32 dukeleto cotto: here is how the Dalvik bytecode verifier works: http://www.netmite.com/android/m​ydroid/dalvik/docs/verifier.html
04:32 cotto dukeleto, is that intended as a good or a bad example?
04:33 cotto It'll be a good read either way.
04:35 dukeleto cotto: and here is the dalvik bytecode reference: http://www.netmite.com/android/mydro​id/dalvik/docs/dalvik-bytecode.html
04:35 cotto brain overflow; core dumped
04:36 dukeleto cotto: lulz
04:36 dukeleto cotto: haskell bytecode verification! http://www.cs.princeton.edu/~rdockins/​presentations/tfp2007/slideshow.xhtml
04:37 dukeleto "You end up with an intermediate language capable of encoding
04:37 dukeleto most of Haskell which has a strong metatheory."
04:37 dukeleto sounds suspiciously like what we are doing with M0
04:41 cotto a bytecode verifier is starting to sound like more than a good idea
04:41 cotto depending on whether we expect m0b to be distributed or not
04:42 dukeleto cotto: i was thinking, if we take a sha1 hash of some type of verification metadata, we could distribute "verified" code
04:43 dukeleto cotto: i.e. verification wouldn't necessarily need to happen at runtime
04:44 cotto dukeleto, that idea suggested itself to me too
04:44 cotto I suspect that it defeats the purpose of verification though.
04:46 cotto The idea behind verification is that you know that this random m0b file you got with your copy of Bonzi Buddy is safe to run.
04:47 cotto or that it at least won't crash the interpreter while it's stealing all your personal information
04:58 woosley joined #parrot
06:08 davidfetter joined #parrot
06:08 davidfetter left #parrot
06:17 Kulag left #parrot
06:17 Kulag joined #parrot
06:38 jsut joined #parrot
06:43 jsut_ left #parrot
06:45 fperrad joined #parrot
07:27 SHODAN joined #parrot
07:28 jsut_ joined #parrot
07:32 jsut left #parrot
07:36 mj41 joined #parrot
08:04 ligne left #parrot
08:22 he joined #parrot
08:30 bacek joined #parrot
08:57 jsut joined #parrot
09:02 jsut_ left #parrot
09:31 nopaste left #parrot
09:31 TonyC left #parrot
09:31 TonyC joined #parrot
09:34 woosley left #parrot
09:35 nopaste joined #parrot
09:38 lucian joined #parrot
09:38 nopaste left #parrot
09:38 TonyC left #parrot
09:38 TonyC joined #parrot
09:45 nopaste joined #parrot
09:53 bacek left #parrot
10:05 bacek joined #parrot
10:06 contingencyplan left #parrot
10:09 ligne joined #parrot
10:10 lucian left #parrot
10:12 lucian joined #parrot
10:28 bacek left #parrot
11:05 whiteknight joined #parrot
11:19 whiteknight good morning, #parot
11:19 whiteknight or #parrot
11:28 lucian whiteknight: 'morning
11:28 whiteknight hello lucian
11:29 dodathome joined #parrot
11:29 lucian whiteknight: i have a compiler for a subset of python that can add numbers. ain't that grand ...
11:30 whiteknight lucian: yes, I saw that yesterday. Very nice
11:30 lucian whiteknight: meh :)
11:31 whiteknight lucian: it's only been a week into GSoC. Nobody expects the Taj Mahal
11:31 lucian i'm gonna start with the object system next, there's little point in following pynie's mistake
11:31 whiteknight at least, no yet :)
11:31 lucian whiteknight: i'll have a look at your rosella trick
11:32 whiteknight okay, it's interesting but I'm not currently happy with it
11:32 lucian (btw, pynie's mistake imo is not doing an object system earlier)
11:32 whiteknight right
11:32 lucian python is quite self-referential. objects need dicts, function calls need tuples, lists, dicts, etc.
11:34 lucian i think i'll end up only using winxed for syntax support
11:34 lucian and introduce some inline PIR in the compiler, so i can write the stdlib in python
11:36 lucian whiteknight: i'd previously assumed special-casing compiler tricks would be hard, but it's not, at all
11:38 dodathome left #parrot
11:49 arnsholt lucian: Like whiteknight I'm suitably impressed with a compiler that can add numbers after a week
11:49 arnsholt Compilers are fickle beasts =)
11:49 lucian arnsholt: well, a day. but don't, i'm not writing a parser https://bitbucket.org/lucian1900/puffin
11:49 lucian it's really tiny
11:54 arnsholt Tiny is good. Easier to work with that way
11:55 lucian sure. i'm just writing a codegen for an existing parser
12:15 lucian left #parrot
12:15 lucian joined #parrot
12:23 lucian left #parrot
12:36 kid51 joined #parrot
12:36 lucian joined #parrot
12:37 lucian hmm, i'm starting to wish parrot bundled winxed
12:41 bacek joined #parrot
12:47 hudnix joined #parrot
12:53 whiteknight lucian: welcome to the group. We meet on wednesdays
12:53 whiteknight lucian: I started adding some library routines inspired heavily by Python's os and sys modules
12:53 bluescreen joined #parrot
12:54 whiteknight I was reading my python book, decided it was a good idea, and put together a quick version of os.path.walk
12:54 lucian whiteknight: that's a bit ironic, most people dislike os's path bits
12:54 whiteknight I dislike Parrot's current OS PMC, so anything is a step up
12:55 lucian i see
12:55 whiteknight I thought os.path.walk was pretty nifty
12:59 lucian i guess i'm spoilt
13:00 lucian try this: bla = os.path.join(os.path.expand('~'), '.local'); f = open(bla)
13:00 lucian vs f = open(path('~/.local'))
13:01 tadzik what kind of thing is os.path.walk? Like File::Find in Perl, a directory traverser
13:03 lucian tadzik: don't know about perl's, os.path.walk is just a recursive walker
13:03 dalek Rosella: 5db9824 | Whiteknight++ | t/filesystem/ (2 files):
13:03 dalek Rosella: Add in some basic tests for File and Directory
13:03 dalek Rosella: review: https://github.com/Whiteknig​ht/Rosella/commit/5db9824cc1
13:03 dalek Rosella: eee95de | Whiteknight++ | src/unstable/filesystem/Directory.winxed:
13:03 dalek Rosella: make sure directories have a trailing slash
13:03 dalek Rosella: review: https://github.com/Whiteknig​ht/Rosella/commit/eee95de812
13:03 dalek Rosella: 6a3688b | Whiteknight++ | src/unstable/filesystem/Directory.winxed:
13:03 dalek Rosella: Add Directory.get_pmc_keyed, so we can look up contents by name
13:03 dalek Rosella: review: https://github.com/Whiteknig​ht/Rosella/commit/6a3688b71b
13:03 dalek Rosella: a10746d | Whiteknight++ | / (2 files):
13:03 dalek Rosella: Add exists_keyed and delete_keyed vtables to Directory, so we can work on it more like a hash
13:03 dalek Rosella: review: https://github.com/Whiteknig​ht/Rosella/commit/a10746d113
13:03 dalek Rosella: e808370 | Whiteknight++ | src/unstable/filesystem/Directory.winxed:
13:03 dalek Rosella: some docs for the new functions
13:03 dalek Rosella: review: https://github.com/Whiteknig​ht/Rosella/commit/e808370191
13:08 ambs joined #parrot
13:27 lucian where could i get a precompiled winxed?
13:29 whiteknight I could send you one
13:29 whiteknight or, I could send you the .pir
13:29 lucian whiteknight: pir is fine. it refuses to bootstrap on this netbook
13:30 lucian i admit i don't really understand NotFound's wish to keep the boostrapping
13:31 lucian i'd just dump C++ and ship compiled versions
13:33 whiteknight I have to decipher the makefile, to make sure I'm sending you everything
13:33 lucian right. thanks
13:33 lucian oh, wait
13:33 lucian silly me
13:33 lucian no need to bother, i can use the x86 machine to build it first
13:34 lucian then move the pir over
13:37 whiteknight oh, I just sent the mail
13:38 whiteknight do you have setup.pir in your winxed repo?
13:38 whiteknight or is that bootstrapped too?
13:39 lucian whiteknight: haven't checked, i just replaced it with the one built on x86
13:39 whiteknight ok
13:42 whiteknight I don't think there is any way to reset a coroutine
13:42 whiteknight and that makes me a sad panda
13:43 lucian uh, should there be? why not just make a new one?
13:43 lucian oh, and i have a working winxed. finally
13:43 lucian it should *really* be bundled with parrot
13:43 whiteknight my thoughts exactly
13:44 lucian what'd take to get that done?
13:44 whiteknight NotFound's blessing, dark magic
13:44 lucian NotFound: bless our endeavour, oh holy one
13:44 lucian what kind of dark magic?
13:44 lucian i thought nqp was bundled
13:45 whiteknight I don't remember the details. I'm out of sacrificial goats, so it doesn't matter anyway
13:45 lucian i see
13:45 whiteknight nqp is bundled. It's really not that hard to do
13:46 whiteknight Bring up the topic this week at #parrotsketch
13:46 lucian if i remember, i will
13:48 whiteknight msg NotFound we would like to talk about snapshotting Winxed into Parrot, since so many GSOC students are using it. Let me know what you think
13:48 aloha OK. I'll deliver the message.
13:49 nopaste "kid51" at 192.168.1.3 pasted "Quoted verbatim from the front page of news.google.com" (1 line) at http://nopaste.snit.ch/48685
13:51 whiteknight awesome
13:53 hudnix left #parrot
13:54 Limbic_Region joined #parrot
13:56 kid51 left #parrot
14:00 SHODAN left #parrot
14:45 cotto ~~
14:45 lucian left #parrot
14:46 lucian joined #parrot
14:55 gbacon joined #parrot
15:03 lucian is there a winxed vim plugin?
15:12 lucian eh, js is alright
15:40 lucian whiteknight: i don't think i'll use your prototype
15:48 bubaflub joined #parrot
15:48 bubaflub ~
16:13 lucian i can't make heads or tails of winxed error messages
16:17 dalek nqp: 1c65083 | jonathan++ | src/6model/reprs/P6opaque.c:
16:17 dalek nqp: Update P6opaque to more fully handle box/unbox of native types.
16:17 dalek nqp: review: https://github.com/perl6/nqp/commit/1c65083452
16:26 bluescreen left #parrot
16:40 whiteknight lucian: yeah, winxed error reporting leaves much to be desired
16:41 whiteknight lucian: I don't expect you'l be able to use the rosella version verbatim, but I think you can steal some ideas from it
16:41 whiteknight lucian: and feel free to ask questions if any detail doesn't make a lot of sense
16:41 bluescreen joined #parrot
16:43 mj41 left #parrot
16:54 lucian left #parrot
16:55 lucian joined #parrot
17:27 cotto dukeleto, ping
17:27 cotto whiteknight, also ping
17:27 whiteknight PONG
17:27 whiteknight pong
17:27 whiteknight (sorry for yelling)
17:28 cotto whiteknight, on Saturday chromatic mentioned an interesting possibility for gc.  he suggested that it be made essentially a link-time option, i.e. that the .o file for the requested gc would be linked into libparrot
17:28 whiteknight cotto: yeah, I've considered that before too
17:29 cotto also, that we make macros the interface to the GC rather than functions that limit optimization possibilities
17:29 whiteknight our current system of function pointer indirection is very bad
17:29 cotto for the gc, quite
17:29 whiteknight you're still going to need a standard function API for the .o file to be linked against
17:29 whiteknight but yes, we can do much better
17:29 cotto not necessarily a function api
17:30 whiteknight a linker isn't going to work with macros
17:30 whiteknight somewhere along the line we need functions to link by name
17:30 cotto no, but the object file can be generated just fine with macros as part of the C code
17:31 lucian_ joined #parrot
17:31 whiteknight yes
17:34 cotto I'm not seeing the problem, apart from requiring a bunch of fairly monotonous code changes.
17:35 whiteknight no, there's no problem
17:35 cotto on
17:35 lucian left #parrot
17:35 cotto ok
17:35 whiteknight I could put together something benchmarkable soon
17:36 whiteknight brb, I have to take the kid to the park
17:36 cotto It might be a good task to increase the bus number on the gc.
17:36 whiteknight be back in ~1hr
17:36 cotto have fun
17:36 cotto or don't.  your call
17:44 lucian_ anyone using winxed's HLL syntax? i can't figure it out and the example doesn't even compile
17:44 lucian_ is now known as lucian
17:55 mj41 joined #parrot
17:56 davidfetter joined #parrot
18:02 contingencyplan joined #parrot
18:08 whiteknight lucian: no, I haven't used it yet
18:09 dukeleto ~~
18:09 lucian whiteknight: guess i'll have to wait for NotFound, which cannot be found
18:09 dukeleto cotto: pong
18:09 lucian btw, if you're interested in python's object system, this is great http://www.cafepy.com/article/python_types_and_obj​ects/python_types_and_objects.html#basic-concepts
18:10 whiteknight lucian: hmm, that looks like a weird bug
18:11 lucian whiteknight: try running examples/hlltest.winxed
18:11 lucian it has an unbalanced brace
18:11 lucian and i don't know what else is wrong with it
18:14 cotto dukeleto, what we've been thinking about for m0b security is more like checksumming.  If m0b is going over the wire (still an open question) and a mitm can intercept it, it'll be fairly easy to modify the file and re-sign it.
18:15 cotto I like the idea of an embedded checksum to verify that the file didn't get corrupted, but we shouldn't call that security.
18:15 cotto If we want actual security such that a m0b file can't be tampered with without evidence, we'll need something more.
18:15 lucian cotto: i don't understand the need for that
18:16 lucian cotto: why not leave security to the transporting protocol?
18:17 davidfetter left #parrot
18:19 whiteknight yeah, that's my opinion too. Encryption and signing are part of the transportation protocl
18:19 whiteknight protocol
18:19 whiteknight checksumming is interesting to verify against transmission errors, but nothing more than that should be built in to M0
18:20 cotto whiteknight, I'm coming to that conclusion too.
18:20 whiteknight we aren't going to come up with anything as good as existing standards like SSL or PGP
18:20 cotto no argument there
18:21 whiteknight nor any set of stuff as flexible as existing protocol options
18:21 cotto that also gets into the issue of key distribution
18:22 lucian i do however think that w/e bytecode parrot ends up with as an equivalent to java bytecode should certainly be endianess-agnostic
18:24 cotto lucian, it's still not fully decided if we expect m0b to be distributed.  If we do, it should run everywhere.
18:24 dukeleto cotto: SSL and PGP still have the key distribution problem, so that is a straw man ;)
18:25 dukeleto cotto: i am fine with M0 just having checksumming, for now
18:25 lucian cotto: well, what else should be distributed as executables?
18:25 cotto flash--
18:25 lucian dukeleto: i disagree even with that :)
18:25 dukeleto cotto: because baking in proper crypto will take a nontrivial amount of time
18:26 lucian dukeleto: again, i don't see why checksuming should be done in an assembly/bytecode format
18:27 dukeleto lucian: because harddrives corrupt data, network protocols fail, OS kernels have bugs, and neutrinos occasionally flip a bit
18:27 lucian whiteknight: a winxed tutorial/ref would really be useful, i can't figure out which are class attributes and which are instance attributes
18:28 lucian dukeleto: sure, but why do it there? why not on top, like everything else?
18:28 whiteknight lucian: yes, adequate documentation is not one of the strong points of winxed
18:28 dukeleto lucian: i have no idea what you mean
18:28 cotto lucian, laziness
18:28 * dukeleto goes back to his writing cave
18:28 lucian why not just hand parrot the bytecode, after checksuming it?
18:28 lucian s/parrot/the interpreter/
18:33 soh_cah_toa joined #parrot
18:34 dukeleto lucian: Use case: I distribute an application written in some Parrot language. I want to distribute bytecode. The user wants to verify that the bytecode was not mangled in the process of downloading it.
18:36 lucian dukeleto: is it considered undesirable to leave it to the user?
18:36 lucian i'm trying to think of advantages and disadvantages to embedding it in the bytecode
18:37 dukeleto lucian: yes, leaving it to the user is undesirable
18:37 lucian wow, how useful "syntax error ... somewhere "
18:38 dukeleto imcc--
18:38 lucian imcc-- indeed
18:42 dukeleto cotto: this is my rough draft: https://github.com/leto/writing/blob/m​aster/blog_posts/parrot/m0_meeting.md
18:42 lucian are Object attributes always private?
18:44 cotto reading now
18:46 dukeleto lucian: not that i know of
18:46 cotto dukeleto, it'd be good to specify some of the reasons we ripped out the old jit.  It's a fading memory at this point and many more recent developers are likely to be unfamiliar with the rationale.
18:46 lucian dukeleto: i'm trying to access one in winxed and i get "error:imcc:The opcode 'getattribute_p_ic_sc' (getattribute<3>) was not found."
18:47 dukeleto cotto: sure. I will add some deets
18:47 dukeleto lucian: that signature for getattribute doesn't exist i.e. PMC = getattribute integer_constant, string_constant
18:48 dukeleto lucian: you need to box or autobox something
18:48 dukeleto s/autobox/unbox/
18:48 lucian dukeleto: hmm. i'm trying to print a Hash. is that naughty ?
18:48 cotto dukeleto, " that their were many"
18:48 hudnix joined #parrot
18:51 lucian i think pdd15 lies a lot
18:52 dukeleto lucian: patches welcome
18:52 dukeleto cotto: reload. Added details about JIT and fixed some grammerz
18:53 lucian dukeleto: ah, but that means i'd have to figure out what exactly is true :)
18:54 * cotto hands lucian some work gloves
18:54 dukeleto lucian: indeed. But we take our PDDs seriously, so we want them to be correct. But figuring out *what* is correct is sometimes quite complicated.
18:55 cotto The closer we get to integrating M0 with libparrot, the more important it'll get to have 6model in core.  It's not an immediate blocker, but has the potential to be.
18:56 cotto dukeleto, looking better
18:57 cotto dukeleto, "fact tha too much"
18:58 * dukeleto installs ispell
18:58 lucian cotto: i think i'd welcome 6model right about now
18:59 jsut_ joined #parrot
18:59 jsut left #parrot
18:59 cotto <3 ispell
19:02 ambs <3 jspell
19:21 dukeleto i guess it is a sign of the times that i had to teach my spell checker more words than it found incorrectly spelled.
19:24 mj41 left #parrot
19:28 Limbic_Region left #parrot
19:32 lucian boostrapping myself out of the Object tarpit is really annoying
19:34 jnthn__ Tell me about it. :P
19:34 * jnthn__ had to bootstrap nqp out of it...
19:35 lucian jnthn__: i guess i'll try 6model, i have a week scheduled for deciding
19:35 lucian jnthn__: how should i go about doing that?
19:36 lucian is it this https://github.com/rakudo/raku​do/tree/master/src/metamodel? i'm a bit confused
19:37 jnthn__ lucian: That's nqp's meta-objects
19:37 jnthn__ lucian: They use the 6model core.
19:37 jnthn__ lucian: You have two options.
19:37 jnthn__ 1) Write your meta-objects in NQP, thus in terms of NQP's meta-objects. This is what Rakudo is doing.
19:37 jnthn__ 2) Just use the 6model core directly.
19:37 lucian i guess i'd rather do 2). any pointers?
19:38 lucian i don't really know where to start
19:39 jnthn__ Actually reading through src/metamodel/ will give you an idea of what meta-objects look like
19:39 jnthn__ The main thing to realize is that knowhow and the stuff within it maps to a bunch of calls on a KnowHOW.HOW meta-object, which is the only one in the 6model core.
19:41 jnthn__ So you can piece together your case meta-objects as a series of method calls and do it from any language that lets you access PIR ops and load nqp_ops
19:41 jnthn__ s/case/base/
19:41 lucian hmm. so is all of 6model in the rakudo repo?
19:42 jnthn__ No
19:42 jnthn__ none of 6model is in the Rakudo repo :)
19:42 jnthn__ It's all in the nqp repo.
19:42 jnthn__ wait wait
19:42 lucian here https://github.com/perl6/nqp-rx?
19:42 jnthn__ When you said src/metamodel/, which repo did you mean?
19:43 jnthn__ https://github.com/perl6/nqp/
19:43 jnthn__ gah
19:43 jnthn__ I shoulda noticed
19:43 lucian ah, so https://github.com/perl6/n​qp/tree/master/src/6model
19:43 jnthn__ it's not even called that in the nqp repo
19:43 jnthn__ OK, so https://github.com/perl6/nqp/ is the repo you want.
19:43 jnthn__ Not nqp-rx or Rakudo one
19:44 jnthn__ https://github.com/perl6/nqp/tree/master/src/how is the meta-objects for NQP that you may find interesting to read through.
19:44 jnthn__ https://github.com/perl6/n​qp/tree/master/src/6model is the 6model core.
19:44 bluescreen left #parrot
19:44 jnthn__ https://github.com/perl6/nqp/blob/​master/src/6model/sixmodelobject.h is one of the most educational files in there.
19:46 lucian jnthn__: so 6model is a C parrot extension
19:46 lucian and i'd have to modify said extension to match python's object system?
19:46 lucian are there any docs on this?
19:47 jnthn__ lucian: No, the idea is mostly that you write meta-objects using 6model.
19:47 lucian i'll have a look at nqp's
19:48 lucian right, so there's this pm DSL for defining meta-objects?
19:49 jnthn__ The code in src/how/ is just NQP code.
19:49 jnthn__ You could define yours in that too, but it's not required.
19:49 jnthn__ It wouldn't surprise me if you could find a way to use 6model from Winxed.
19:50 lucian i'm still a bit confused :)
19:50 jnthn__ :)
19:50 lucian so nqp comes with a C extension called 6model
19:50 jnthn__ So the idea is that the 6model core is really like a set of very simple building blocks.
19:50 jnthn__ It doesn't know what a class is, or a subset type, or a role, or whatever.
19:51 lucian right. and what API does 6model offer?
19:51 jnthn__ The only things it knows about are representations (how we lay an object out in memory), a couple of types of performance-enhancing caches and the prototype-y metaobject (known as KnowHOW, for Perl 6-y reasons...).
19:52 lucian right, sounds good
19:52 jnthn__ So a starting point is to use the KnowHOW meta-object to start defining your own meta-objects that does your language's version of OO.
19:52 jnthn__ YOu'd also pick a representation that is suited to how your language wants to store attributes.
19:52 jnthn__ Basically, type = representation + meta-object.
19:53 lucian sure, makes sense
19:53 jnthn__ Actually 6model is built to support representation poly, but not many languages actually need that. What it does mean is you're not stuck using a storage model that doesn't suit your language.
19:53 lucian i don't care much about storage model efficiencu
19:54 lucian i basically just need hashes and arrays
19:54 jnthn__ Well, it's not just efficiency.
19:54 jnthn__ It's also semantics.
19:54 jnthn__ Languages that view an object as basically a hash, so attribute foo in a sueprclass is the same as attribute foo in a subclass, fall neatly into "just use a hash".
19:54 jnthn__ But for other languages those are two different attributes and need two different storage slots.
19:55 jnthn__ That's a representation difference.
19:58 lucian sure, but it's not a big deal
19:58 whiteknight jnthn__: on a related note, one of my biggest difficulties in reading 6model source is the problem of terminology. my mind doesn't think in terms of the words Perl6 uses
19:58 lucian what i'd like to now is how to actually use 6model
19:58 whiteknight jnthn__: is there a handy cheat-sheet for what the various things in 6model mean?
19:58 bluescreen joined #parrot
19:59 lucian jnthn__: i can't figure out from reading the source what sort of API 6model offers, and to what language, for example
19:59 ligne left #parrot
19:59 jnthn__ whiteknight: No, but that's probably a good idea.
20:00 whiteknight jnthn__: for example, is the REPR the metaobject, or is that the REPR or the STable?
20:00 whiteknight and what is a HOW, and a WHAT
20:00 lucian i agree with whiteknight here, i also find perl6's terminology odd
20:00 jnthn__ Well, it's not all Perl 6 terminology either.
20:00 jnthn__ STable isn't Perl 6 terminology. I needed a name for the concept. :)
20:00 whiteknight when it gets moved into Parrot, we're either going to need a handy translator, or we're going to want to change what some things are called to a more language-agnostic lexicon
20:00 jnthn__ OK, so I need to write a glossary. :)
20:01 whiteknight jnthn__: pretty pretty please, with karma on top :)
20:01 dukeleto ++jnthn # 6model glossary
20:02 * jnthn__ will get started on multi-dispatch refactor for Rakudo, and then do a bit more docs later on :)
20:04 whiteknight jnthn__: In case you were't aware, I am bumped off the 6model-to-parrot project and am focusing on profiling first
20:04 whiteknight jnthn__: so when I get back to 6model, I'll have many many questions for you. I'm keeping a log of questions, which always seems to be growing :)
20:05 jnthn__ whiteknight: pmichaud has also threatened me with lots of questions in the coming days :)
20:06 whiteknight jnthn__: well, when he starts peppering you with them, I may want to watch and take notes
20:06 jnthn__ whiteknight: It'll at least end up as an FAQ. :)
20:06 whiteknight jnthn__++
20:08 pmichaud I'm expecting to redevelop lolcode in nqp in the next few days
20:08 pmichaud hopefully as a tutorial, including the 6model aspects
20:08 whiteknight that would be awesome
20:08 jnthn__ pmichaud: object oriented lolcode :D
20:09 whiteknight right now it's just LOL-Oriented
20:09 jnthn__ HOW A dog WORKZ
20:09 jnthn__ HAZ tail
20:09 jnthn__ CAN bark()
20:09 jnthn__ ... :)
20:10 whiteknight runtime type reflection with IM IN UR dog EXAMININ UR tail
20:11 jnthn__ dog DOEZ WUT?
20:11 whiteknight LOL NO
20:19 lucian bah, heavily self-referential object systems are really a pain to boostrap
20:20 lucian i have 'object', which references 'type', which references 'object', which needs type from __builtins__, which is a model, which is an object, which has a type
20:20 lucian s/model/module/
20:20 lucian IM IN UR 'IM IN UR' EXAMININ UR 'EXAMININ UR' ...
20:22 perlite_ joined #parrot
20:23 baest left #parrot
20:24 whiteknight lucian: it is hard. that's why we pay the GSoC students to do it :)
20:25 lucian heh
20:25 tadzik tricky bastards
20:25 lucian hmm, apparently CPython fakes it bigtime
20:25 perlite left #parrot
20:26 perlite_ is now known as perlite
20:28 lucian that bastard Guido cheated :)
20:29 lucian also, refcounting really is evil
20:31 whiteknight yessir
20:36 lucian and now watch carefully, as i pull the hat out of the rabbit out of the hat
20:37 lucian any tips on "too few positional arguments: 1 passed, 2 (or more) expected" ?
20:40 bubaflub left #parrot
20:41 * whiteknight is not sure he wants to see lucian pull the hat out of the rabbit
20:41 whiteknight lucian: that is an arity failure on a PCC call. Could be a sub called with too few args, or a method executed without an invocant
20:41 whiteknight since the invocant is the first arg
20:41 bubaflub joined #parrot
20:42 lucian whiteknight: ah, found it. a constructor. how do i pass arguments at construction in winxed, if you don't mind?
20:43 whiteknight lucian: new My.Example.Class(args)
20:43 whiteknight constructors use the short-name of the class
20:43 whiteknight so in the example above, the constructor would be "function Class(args...)"
20:43 lucian ah, so not passed to 'init'
20:43 lucian thanks
20:43 whiteknight lucian: and I never mind answering questions
20:44 whiteknight lucian: actually now that you mention it, I don't know how init_pmc would be called in winxed
20:44 lucian apparently it gets called at construction if you have function init[vtable]()
20:45 whiteknight yes, init[vtable]() would get called init_pmc[vtable]() would not
20:45 whiteknight I have to figure out how to do that
20:46 whiteknight var c = class My.Example.Class \n var obj; \n ${ new obj, class, initpmc }; \n obj.Class(args...);
20:46 whiteknight although that's hideous
20:46 lucian quite
20:46 lucian i'm really starting to hate PIR's effects on HLLs
20:46 whiteknight msg NotFound is there a non-ugly way to call init_pmc[vtable]() in winxed?
20:46 aloha OK. I'll deliver the message.
20:47 whiteknight lucian: that's what I've been saying for years
20:47 whiteknight PIR creates assumptions that other languages need to deal with
20:47 * lucian nods
20:47 lucian while writing the compiler part, i've been thinking of generating pbc
20:47 whiteknight we shouldn't have init_pir. We should maybe, *maybe* have a slot somewhere for storing a constructor PMC
20:47 whiteknight init_pmc*
20:49 whiteknight does 6model have storage for constructors?
20:50 lucian whiteknight: i'm trying to think of a case where a constructor should be anything other than just another function/method
20:51 whiteknight lucian: in some languages the constructor is not callable as a method after the language is created
20:51 lucian whiteknight: wouldn't hiding it still be better~?
20:51 whiteknight of course, we could achieve the same result if we could give constructors names which are not valid identifiers in the HLL
20:52 jnthn__ So you stash the constructor in the meta-object or something. :)
20:52 whiteknight .sub '!!CONSTRUCTOR!!'
20:52 jnthn__ has $!ctor;
20:52 lucian whiteknight: how about lisps? :)
20:52 whiteknight lucian: what about them?
20:52 lucian whiteknight: *everything* tends to be a valid identifier there
20:52 whiteknight lucian: .sub
20:53 whiteknight .sub ')()())CONSTRUCTOR()()('
20:53 lucian touché
20:53 whiteknight it's doable, just not pretty
20:53 whiteknight Rosella uses '!!!' as the prefix for attributes that I want to be invisible to user code
20:54 whiteknight NQP and Winxed can't access them without dropping into inline PIR, for instance
20:54 whiteknight I don't do that with methods just because there is no good way to define methods with weird names in Winxed
20:55 lucian hmm
20:55 lucian doesn't [anon] do something?
20:56 whiteknight makes it so you can't look up something in the namespace
20:56 whiteknight but if it's a method, it would still be findable with find_method
20:56 lucian i see
21:01 ShaneC joined #parrot
21:14 lucian whiteknight: how can i call super's constructor?
21:14 lucian it doesn't seem to happen automatically
21:14 whiteknight as a method
21:14 whiteknight no, it doesn't happen automatically
21:15 lucian so self.superclassname() ?
21:15 lucian ah, that seems to work. thanks
21:15 whiteknight yes
21:16 whiteknight Rosella used to have a construct_r function to recursively call constructors on all parent classes with the same args, but that wasn't too useful
21:17 lucian hmm. i agree with calling it explicitly, but i disagree with the method of finding it
21:17 whiteknight right, a super() method would be nice
21:17 lucian i guess Class doesn't support multiple inheritance?
21:18 lucian or just super as a reference to the parent
21:18 whiteknight I could prototype something like that together, if you thnk you would want it
21:18 gbacon left #parrot
21:18 lucian nah, it works and i'm fine with it
21:18 whiteknight ok
21:18 lucian does rosella have any utils for printing things better? printing a hash is frustratingly useless
21:20 whiteknight it should, but it doesnt
21:20 whiteknight there is a dumper module somewhere that can print out arbitrary neste structures
21:21 whiteknight https://github.com/parrot/parrot/blob/m​aster/runtime/parrot/library/dumper.pir
21:21 ShaneC left #parrot
21:21 whiteknight probably "load_bytecode('dumper.pbc')"
21:21 lucian thanks, i'll try that
21:21 whiteknight then call it with "_dumper(thing)"
21:21 * lucian nods
21:22 lucian i think i've found a semi-elegant way to express boundless recursion
21:22 whiteknight do tell
21:22 whiteknight do { tell(); } while(Whiteknight.is_listening());
21:23 lucian :)
21:23 lucian http://www.cafepy.com/article/pytho​n_types_and_objects/python_types_an​d_objects.html#bring-in-the-objects
21:23 lucian the picture is helpful
21:23 lucian for type's self-reference, i just use a self-reference ...
21:23 whiteknight ok
21:23 lucian i'll have to check when type() is called if i'm recursing, and that's about it
21:24 lucian i can't believe it took me 30mins to realise i need no more magic
21:24 whiteknight magic--
21:27 lucian useful, that dumper
21:27 lucian should be a PIR keyword, along with say
21:29 ambs left #parrot
21:34 theory joined #parrot
21:46 Psyche^ joined #parrot
21:49 lucian whiteknight: another one: is 'self' rebound in winxed closures?
21:50 PacoLinux left #parrot
21:51 Patterner left #parrot
21:51 Psyche^ is now known as Patterner
21:58 bluescreen left #parrot
22:01 ambs joined #parrot
22:04 cotto dukeleto, I'm going to be updating the M0 spec with a bunch of changes in the next hour or so.  Do you have anything pending?
22:05 ligne joined #parrot
22:08 fperrad left #parrot
22:20 cotto dukeleto, ping
22:21 cotto dukeleto, unping
22:23 dukeleto cotto: unpong
22:23 cotto dukeleto, I was thinking about the memory ops that we decided to add, but answered my own question
22:24 bacek left #parrot
22:24 cotto if a chunk from gc_alloc is reachable, a competent gc won't nuke it
22:24 dukeleto cotto: sure
22:24 dukeleto cotto: i added the list of next actions and a few more paragraphs to the end of https://github.com/leto/writing/blob/m​aster/blog_posts/parrot/m0_meeting.md
22:25 cotto dukeleto, just to verify, we decided to add sys_alloc, sys_free and gc_alloc as permanent ops, right?
22:25 cotto dukeleto, I saw
22:26 cotto dukeleto, make sure to put 6model as Parrot's core object metamodel in there sometime around noop integration.
22:26 dukeleto cotto: i think so. those will prevent the bytecode from depending on the gc currently being used, right?
22:26 * cotto is performing a i/o on dukeleto
22:27 * dukeleto does IO
22:27 dukeleto cotto: i am going to add links to the blog post and then ship it
22:27 cotto dukeleto, it should.  we may find that we need a richer set of controls, but that's a minimum
22:27 cotto dukeleto++
22:28 cotto also, "exit" was the temporary op that we couldn't think of
22:29 dukeleto cotto: ever heard of this? http://www.eecs.umich.edu/gasm/index.html
22:29 dukeleto cotto: ah! good catch
22:29 cotto dukeleto, nope
22:29 lucian dukeleto: theoretically, it works
22:29 lucian the issue is whether it has the potential for efficiency
22:29 lucian (in general, for any turing-like machine i meant)
22:34 NotFound ~~
22:34 ambs left #parrot
22:35 lucian NotFound: hi, i've been using winxed and have questions
22:36 NotFound lucian: shot
22:36 lucian NotFound: what's the syntax for .hll ? the example that comes with winxed's broken
22:37 NotFound Looks like I broke it in a recent change. Let me look at it.
22:40 sorear how does Winxed compare to PIR performance-wise?
22:40 lucian also, what's the syntax for calling methods on pmcs? self.hashvalue() for example doesn't work
22:40 lucian sorear: same
22:40 elmex left #parrot
22:41 NotFound lucian: found and fixed, thanks.
22:41 cotto dukeleto, eliminating the variable table brings up a question since we're storing both string and numeric data in the variables segment.
22:41 cotto dukeleto, how do we want to make sure both types can be loaded correctly?
22:41 lucian NotFound: oh, great. and is the syntax just namespace HllName [HLL] ?
22:42 NotFound sorear: in most usages I've done, the difference is negiglible.
22:42 NotFound lucian: yes, but remember that is an experimental feature, be ready for problems.
22:42 pjcj left #parrot
22:42 lucian NotFound: ok
22:42 whiteknight sorear: Winxed translates very cleanly to PIR code, so the two seem to have very similar performance
22:42 pjcj joined #parrot
22:43 lucian NotFound: in the worst case, i'll take winxed's output and move to PIR
22:43 NotFound lucian: How doe you have the 'self' of a PMC?
22:43 lucian NotFound: it's an object
22:43 lucian since Objects are pmcs, i'd expect to be able to call pmc methods
22:43 dalek winxed: r1023 | NotFound++ | trunk/winxedst1.winxed:
22:43 dalek winxed: fix a problem in the optimize phase of Modifier, lucian++
22:43 dalek winxed: review: http://code.google.com/p/w​inxed/source/detail?r=1023
22:45 NotFound lucian: yes, you can, but The object that you are using has such method?
22:46 lucian NotFound: no, but the base PMC does
22:46 dukeleto cotto: please give me an example. I don't quite understand your quesiton.
22:47 NotFound lucian: oh, understood now. It should work, let me see an example that fails.
22:47 lucian NotFound: i'll write one, one sec
22:49 cotto dukeleto, sure.  We're storing int 42 and string "forty-two" in the table.  Loading the int is easy because we just copy the word into a register, but if we do that for the string we'll just get the first few bytes.
22:49 cotto dukeleto, if we use a pointer for both, int manipulation will be inefficient
22:50 NotFound lucian: Now that I look at it, hashvalue is a vtable function, not a method.
22:50 lucian NotFound: i see. and how can i call those in winxed?
22:51 NotFound Mmmmm AFAIK there is no direct way to invoke it from pir.
22:51 lucian NotFound: oh. so i can't call vtable functions?
22:52 lucian https://gist.github.com/999602
22:52 NotFound lucian: No, just the ones that have a pir op that directly calls it.
22:53 dalek parrot: 9f4f83c | dukeleto++ | docs/pct/gettingstarted.pod:
22:53 dalek parrot: [doc] Fix some broken links in our PCT getting started doc
22:53 dalek parrot: review: https://github.com/parrot/parrot/commit/9f4f83c0c7
22:53 lucian NotFound: hmm. thanks
22:53 NotFound lucian: you can, for example, use the Parrot_PMC_hashvalue function via NCI.
22:53 lucian NotFound: and one more thing: would you be willing to include precompiled pir/pbc with winxed?
22:53 NotFound A bit convoluted, but should work.
22:53 lucian and/or have that snapshoted in parrot?
22:54 lucian bah
22:54 NotFound lucian: I do.
22:54 lucian oh, you do? i must've missed that ...
22:54 lucian i tried building winxed on my 800mhz 400mh ram netbook and it failed :)
22:54 NotFound lucian: if you install winxed with plumage, it uses a precompiler pir version to compile itself.
22:55 pjcj left #parrot
22:55 pjcj joined #parrot
22:55 lucian i see. so i should figure out plumage
22:55 lucian oh, is it setup.pir ?
22:56 NotFound About including a snapshot in parrot, no problem for me.
22:56 NotFound lucian: setup.pir invoke it. You can use: parrot setup.pir install
22:57 NotFound The precompiled pir for the compiler and the driver are in the pir directory.
22:57 lucian found it
22:57 lucian i guess i'm biased, i think parrot should really have a system language
22:58 lucian hmm, i still get Null PMC access in find_method('optimizeargs')  with "namespace Python [HLL] {..."
22:59 GodFather joined #parrot
22:59 NotFound lucian: the precompile versions is synchronized by hand. Until I update them, the recent fixes are not on it.
22:59 lucian NotFound: ah, i see
22:59 NotFound One moment....
22:59 lucian i can just make, i guess
22:59 NotFound make preinstall do that job.
23:00 lucian btw, i really like winxed :)
23:00 NotFound Full bootstrap is a risky business ;)
23:00 lucian i have an almost correct and almost working object model for python in 79loc
23:02 NotFound Good
23:02 whiteknight NotFound: I would really like to see Winxed be snapshotted in Parrot repo
23:02 whiteknight We should bring it up in #parrotsketch tomorrow
23:02 whiteknight (I won't be there, but my vote is strong +1)
23:02 cotto dukeleto, I'm thinking it may be necessary to have a separate copy_val and copy_ref ops for interacting with the variables table.
23:03 NotFound whiteknight: No problem for me, and also a +1
23:03 dukeleto cotto: hmm, perhaps.
23:04 lucian http://docs.parrot.org/parrot/lat​est/html/src/pmc/default.pmc.html, find "hashvalue"
23:04 lucian that's what i was trying to call
23:04 cotto dukeleto, either that or put some metadata into the variables (now a.k.a. constants) table.
23:04 dalek winxed: r1024 | NotFound++ | trunk/pir/winxed_compiler.pir:
23:04 dalek winxed: update installable compiler
23:04 dalek winxed: review: http://code.google.com/p/w​inxed/source/detail?r=1024
23:05 NotFound lucian: several PMCs have the sections in its POD doc highly outdated. vtable functions aren't called "methods" since log time ago, but...
23:05 lucian i see. bah
23:06 lucian the address would serve me just fine as well. just need a unique number for an object
23:07 cotto NotFound, yeah.  We've been trying to eliminate that for a long time, but it still persists.
23:08 NotFound lucian: I think rakudo had that same problem, don't know what are they using now.
23:08 lucian right now all objects have the very unique number 42
23:08 NotFound Is a good number, at least.
23:10 sorear looks like Rakudo uses $I0 = get_addr self
23:10 NotFound cotto: I think is a good time to quote the Jedi teachings...
23:10 bubaflub dukeleto: ping - question about some C-types and their equivalent NCI types
23:10 cotto NotFound, you want me to run around with a muppet on my back?
23:10 dukeleto bubaflub: pong
23:11 NotFound cotto: Yes please, an upload it to youtube.
23:12 GodFather left #parrot
23:12 cotto NotFound, you provide the muppet...
23:12 lucian NotFound: and ops i can only call with inline PIR, right?
23:12 NotFound cotto: I'll give you one at the first world winxed users conference.
23:13 NotFound lucian: yes
23:13 bubaflub dukeleto: i'm seeing an 'unsigned long int' in the source - that's just a long and hence an 'l' NCI type, right?
23:13 cotto NotFound, I'll be there.
23:18 NotFound lucian: that 79 loc are pure winxed, or using rosella prototype class?
23:19 lucian NotFound: pure winxed
23:19 NotFound Amazing
23:19 lucian nah, it's incomplete
23:19 dalek nqp: e08c5ca | jonathan++ | docs/6model/ (2 files):
23:19 dalek nqp: Add a little 6model documentation.
23:19 dalek nqp: review: https://github.com/perl6/nqp/commit/e08c5cac2c
23:19 lucian and it's that short because i'm not trying to use Objects much
23:19 lucian for example, getting an attribute is obj.getattr('attribute')
23:20 lucian the syntax is completely irrelevant since i'll be generating code to call these things
23:20 lucian i can generate w/e i want
23:20 NotFound My experience with python is limited, I can't judge.
23:22 lucian NotFound: if you're interested http://www.cafepy.com/article/pytho​n_types_and_objects/python_types_an​d_objects.html#bring-in-the-objects
23:25 NotFound lucian: I've read some articles on the subject, but reading articles is not enough experience, and I have other priorities.
23:25 lucian sure
23:26 lucian in short, everything is an object, and objects are backed by hashes
23:27 bubaflub lucian: in python world is has == dictionary ?
23:27 NotFound I suppose the hard part can be using appropiate shortcuts in the most speed critical parts.
23:27 bubaflub lucian: s/has/hash/
23:28 lucian bubaflub: yes, dicts are hashes
23:28 lucian NotFound: i don't care at all about speed right now
23:29 lucian maybe later i will, but correctness is top priority
23:29 NotFound Good
23:31 lucian hmm "int a = ${get_addr s};" doesn't work
23:32 NotFound lucian: no, winxed pir ops are not expressions. You should use; int a; ${ get_addr a, s };
23:32 lucian ah, i see
23:33 lucian and it works! thanks
23:35 NotFound You can use expressions in the operands in most case, though.
23:37 whiteknight you can use expressions in the operands for inline pir?
23:38 NotFound whiteknight: in 'in' operands, in general yes, but it may be some exception.
23:38 whiteknight awesomeness
23:39 lucian here's what i'm doing https://bitbucket.org/lucian1900/puffin​/src/d8170bc3255f/Objects/object.winxed
23:39 NotFound That is the reason for not allowing key operands, syntax conflicts with expressions.
23:39 whiteknight lucian: is Puffin on github now?
23:39 lucian whiteknight: no
23:40 whiteknight lucian: where is it hosted? It should be somewhere public
23:40 lucian look up
23:40 whiteknight oh, bitbucket?
23:40 lucian yep
23:40 NotFound lucian: looks good
23:40 whiteknight why bitbucket, if I may ask?
23:41 lucian whiteknight: it's a good hg host
23:41 whiteknight ...and why hg?
23:41 lucian just because
23:41 lucian it's more popular than git among python folk, i guess
23:41 lucian i prefer it too, and so does the PSF
23:42 lucian NotFound: btw, is there any string interpolation or similar in winxed?
23:42 lucian adding strings isn't exactly fun
23:42 whiteknight lucian: okay, good enough reason
23:42 NotFound lucian: you can use a parrot StringBuilder
23:42 lucian whiteknight: i guess i could mirror it on github if you really wanted
23:43 lucian NotFound: hmm, i'll try that. thanks
23:43 NotFound lucian: winxed compiler itself does that.
23:43 lucian i see. good
23:44 whiteknight lucian: the instructions email I sent out after the acceptance deadline mentioned that the code should be hosted at github
23:44 whiteknight lucian: I'll talk to dukeleto about it, I'm not against making an exception if it makes integration with PSF code easier
23:44 NotFound I must leave now, good night.
23:45 lucian NotFound: g'night
23:45 lucian whiteknight: ah, i must've missed that
23:50 lucian whiteknight: done https://github.com/lucian1900/puffin
23:50 lucian by the magic of http://hg-git.github.com/

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

Parrot | source cross referenced