Camelia, the Perl 6 bug

IRC log for #parrot, 2013-04-13

Parrot | source cross referenced

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

All times shown according to UTC.

Time Nick Message
01:23 Psyche^ joined #parrot
01:49 woosley joined #parrot
02:03 dukeleto ~~
02:37 woosley joined #parrot
02:47 preflex_ joined #parrot
06:24 Mike-PerlRecruiter_ joined #parrot
07:34 tangentstorm is IMCC dead and gone?
07:38 sorear no
07:38 sorear IMCC is undead.  it cannot be killed, and it drains the life out of everything it touches.
07:39 tangentstorm cool
07:39 tangentstorm but where is it?
07:39 sorear what, imcc?
07:39 tangentstorm gah
07:39 tangentstorm i don't know why i couldn't find it
07:40 tangentstorm oh because it wasn't in the install directory when i did make install for rakudo. my bad. i'm catching up on 10 years of changes and not very organized tonight :)
07:41 tangentstorm what happened to the PIRC thing that was meant to replace it?
08:28 moritz it got tuit-starved, afaict
08:33 tangentstorm is leo still around?
08:35 moritz no
08:36 moritz hasn't been for ages
08:36 tangentstorm yeah, didn't think so... hrm.. so where is the repo for pirc?
08:37 xcombelle joined #parrot
08:38 moritz https://github.com/parrot/pirc
08:38 tangentstorm oh. thanks! :)
08:41 tangentstorm Project Manager ENOBODY    -- https://github.com/parrot/parrot​/blob/master/RESPONSIBLE_PARTIES   ?
08:55 dalek rakudo/nom: 070f3a4 | moritz++ | src/Perl6/Metamodel/BOOTSTRAP.pm:
08:55 dalek rakudo/nom: RT #117583: guard against NULL container spec
08:55 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/070f3a4e94
10:09 woosley joined #parrot
12:09 PacoAir joined #parrot
12:44 contingencyplan joined #parrot
15:18 xcombelle joined #parrot
15:36 dukeleto tangentstorm: howdy
15:36 dukeleto tangentstorm: you seem to be old skool. When was the last time you were around these parts?
15:37 dukeleto tangentstorm: and you are right, nobody wants to be a Project Manager for us, and I don't blame them
16:25 tangentstorm hey dukeleto :)
16:26 tangentstorm actually I dropped in a few weeks or months ago for a day or two, but mostly I was working on a python->parrot compiler in 2003, around the time of the pie-thon (but mine was a different approach from san sugalski's)
16:26 tangentstorm http://pirate.he.sabren.com/viewvc.cgi/pirate/
16:26 tangentstorm <- went by sabren back then
16:35 tangentstorm I would be kind of interested in being a project manager, but I don't think you guys would like the direction I would take parrot in.
16:36 larks joined #parrot
16:37 masak tangentstorm: let's hear it :)
16:38 tangentstorm Well... I would prioritize the multi-language aspect.
16:38 masak \o/
16:39 tangentstorm That would mean actively competing with the other vm options for rakudo, but not at the expense of other platforms.
16:40 tangentstorm And it might mean merging in code from other vms, like cog for squeak/pharo, or http://code.google.com/p/dwscript/
16:40 tangentstorm vms that aren't necessarily written in c...
16:40 tangentstorm or aren't necessarily purely register based.
16:41 tangentstorm maybe v8
16:43 tangentstorm Somewhere a while back I saw a post on the wiki about finding a much smaller instruction set and implementing the rest of the instructions around that core... I think that's a really strong idea.
16:43 dukeleto tangentstorm: great to meet you
16:43 dukeleto tangentstorm: are you a college student by any chance?
16:43 dukeleto tangentstorm: that is called M0
16:43 tangentstorm nope
16:44 dukeleto tangentstorm: look at the m0 branch in parrot.git
16:44 dukeleto tangentstorm: cotto and I need help with it
16:44 dukeleto tangentstorm: real life has causes has required a stack of work that is preventing cotto and I from merging m0
16:44 dukeleto tangentstorm: there is also the beginning of llvm support in parrot, but we are not leveraging it much
16:45 dukeleto tangentstorm: we need a way of generating the glue code to LLVM, because it moves faster than parrot. We can't be writing glue code to LLVM manually
16:45 tangentstorm There is a game called hedgewars that is also doing GSoC.
16:45 dukeleto tangentstorm: there are 177 orgs, 40 new this year
16:45 tangentstorm Yeah
16:45 dukeleto tangentstorm: parrot is lucky to be part of it this year
16:46 tangentstorm But I've been recruited to mentor for hedgewars. :)
16:46 dukeleto many many old skool orgs were not included, like VLC and Minix. But this is to allow new orgs a chance, and I think that is great.
16:46 dukeleto tangentstorm: what is hedgewars?
16:46 dukeleto if parrot was not accepted one year, I would not take offense.
16:46 tangentstorm Hedgewars is a GPL multiplayer game like worms or scorched earth, but with hedgehogs.
16:46 dukeleto TPF doesn't seem to be part of it, but I am not sure if they applied.
16:47 tangentstorm It's written in a mix of pascal, haskell, and c++.
16:47 dukeleto tangentstorm: wow.
16:47 dukeleto tangentstorm: never heard that combination before
16:47 tangentstorm And probably a few other things I'm not remembering. I know there's a port for java and a really bad experimental one for javascript.
16:48 dukeleto tangentstorm: what is your current interest in Parrot?
16:48 dukeleto tangentstorm: we just got really awesome threads in master, but they are barely used
16:48 tangentstorm :D I don't know.
16:48 tangentstorm I mostly just decided to try perl5 on a whim yesterday because I needed to parse some log files. :)
16:49 dukeleto tangentstorm: we have hybrid threads, where you can choose an M:N ratio between threads and cores
16:49 dukeleto tangentstorm: I did that 17 years ago and I never stopped using Perl :)
16:49 tangentstorm That sounds pretty cool.
16:49 dukeleto tangentstorm: this is some background: https://perl6advent.wordpress.com/​2012/12/11/day-11-parrot-threads/
16:54 tangentstorm I don't really use threads much very often so I'm not really an expert, but I do think that parrot's support for continuations and async i/o is one of it's strongest points. To be able to add threads and multi-processor support on top of that is pretty darn cool.
16:57 tangentstorm http://code.google.com/p/besen/  <- This is a complete implementation of ecmascript 5, written in free pascal / delphi... It has at least some JIT support.
16:58 tangentstorm the author is currently working on an object pascal -> llvm compiler (one of about 3 than i know of)
16:58 tangentstorm If that's not obscure enough, there are also several people working on oberon compilers. :D
16:59 tangentstorm These are mostly individuals doing all this stuff on their own, by hand.
17:01 tangentstorm Someone said either here or on perl6 a while back (maybe last night or in the logs, i don't know) that the goal shouldn't be to make compiler geeks happy... Which I think makes sense for perl6 but not necessarily for parrot.
17:03 tangentstorm Because people who are seriously writing compilers tend to be rather set on doing things their own way, either because they want to learn or they want to attack the overwhelming complexity in the software world, or just because they're the smartest person they know and they want to remake everything in their image. ;D
17:04 tangentstorm Or else they're business guys who have a vested interest in keeping a particular language alive or something, like the guy funding one of the pascal->llvm ports.
17:06 tangentstorm I think if parrot could somehow give these people a way to contribute and collaborate without giving up their own projects, that would be a way it could gain some momentum.
17:07 tangentstorm This vm has ports to something like 10-12 different languages, mostly contributed by random people who just thought it was cool: http://rx-core.org/docs/The​_Ngaro_Virtual_Machine.html
17:08 tangentstorm It's nowhere near as sophisticated or useful as parrot, but you can write it by yourself in under a week.
17:08 tangentstorm And so people have, and now you can run it pretty much anywhere. :)
17:09 tangentstorm If m0 can be that small and portable, that would help tremendously.
17:09 tangentstorm But then there might not just be one parrot, but a whole collection of little m0 VMs.
17:10 tangentstorm Anyway I will stop ranting now. :)
17:17 tangentstorm AFK for a bit, but also one last thing: I would revive the parrot forth project, rewrite it in pure pasm if it isn't already, and implement IMCC in that.
17:27 dukeleto tangentstorm: interesting thought
17:27 dukeleto tangentstorm: PIR is the new PASM
17:27 dukeleto tangentstorm: :)
17:27 dukeleto tangentstorm: IMCC is a bad idea
17:28 dukeleto tangentstorm: but your plan intrigues me
17:44 dalek nqp: 71fab2d | jnthn++ | src/core/ (3 files):
17:44 dalek nqp: Clean up JVM/Parrot divergences in src/core.
17:44 dalek nqp: review: https://github.com/perl6/nqp/commit/71fab2d059
17:44 dalek nqp: 84d8cc0 | jnthn++ | src/how/RoleToClassApplier.pm:
17:44 dalek nqp: Fix to role collision handling from NQP JVM.
17:44 dalek nqp:
17:44 dalek nqp: The collisions list is just names, not code objects.
17:44 dalek nqp: review: https://github.com/perl6/nqp/commit/84d8cc08f7
17:56 tangentstorm hmm. does PIR co
17:56 tangentstorm compile to pasm? or is it a replacement?
17:56 tangentstorm (the "I" sounds like intermediate)
17:57 * tangentstorm looks at the code
17:59 dalek nqp: dacc4d7 | jnthn++ | src/QAST/ (7 files):
17:59 dalek nqp: Resolve divergence in QAST nodes.
17:59 dalek nqp: review: https://github.com/perl6/nqp/commit/dacc4d79e0
18:05 tangentstorm i'm not clear what the difference between imc and pir is ... they look the same (the languages, not the compiler)
18:06 tangentstorm ah ok. imc = pir, from the imcfaq
18:07 tangentstorm yeah, I would write the tool that compiles pir -> pasm in pasm
18:08 tangentstorm possibly by way of forth
18:12 dukeleto tangentstorm: take a look at the m0 branch
18:12 dukeleto tangentstorm: i will get you a link in a second
18:12 dukeleto tangentstorm: https://github.com/parrot/parrot/bl​ob/m0/docs/pdds/draft/pdd32_m0.pod
18:12 dukeleto tangentstorm: make a pot of coffee, and read that :)
18:12 tangentstorm thanks. i found the branch but ton sure what i'm looking for... aha.
18:13 dukeleto tangentstorm: it is a spec for about 40 opcodes
18:13 dukeleto tangentstorm: m0 stands for "magic level 0"
18:13 dukeleto tangentstorm: we want to shrink the amount of C in Parrot to the tiniest amount necessary
18:14 tangentstorm lorito was what I was looking for.
18:14 tangentstorm glad that lorito = m0 :)
18:14 dukeleto tangentstorm: yes. m0 is a step on the staircase of lorito :)
18:15 dukeleto tangentstorm: once m0 is in place, we can build many shiny things on top of it. Like a JIT that can have a chance of working
18:16 dukeleto tangentstorm: we deleted our old JIT in 1.7.0 because it was unmaintanable and couldn't work well because of how parrot internals changes between PIR/PASM and C constantly
18:16 dukeleto making optimizations impossible or very hard at best
18:16 dukeleto tangentstorm: m0 has a test suite
18:17 dukeleto tangentstorm: there is a reference implementation in Perl, and the beginning of a C implementation
18:17 dukeleto tangentstorm: you can tell the test suite to run against each of them, iirc. I think I worked on that.
18:17 dukeleto tangentstorm: git blame is your friend :)
18:18 dukeleto tangentstorm: there may be some bugs in the doc
18:19 tangentstorm pretty cool stuff.
18:20 tangentstorm I really like this, but I would make one significant change.
18:20 dukeleto tangentstorm: i think the "m0" branch is the combination of m0-prototype and m0-spec, and those two need to be removed, but I am not sure
18:20 dukeleto tangentstorm: do tell
18:20 dukeleto tangentstorm: or send a pull request :)
18:21 tangentstorm well, two i guess, but they're abouth the same concept: move the ffi/pmcs out of the vm
18:21 tangentstorm for strings, just put the string data in the vm's ram
18:21 tangentstorm the thing that is so awesome about ngaro (at least to me) is the port concept.
18:22 tangentstorm ngaro itself has 30 opcodes and it can run pretty much anywhere.
18:22 tangentstorm any kind of IO is done through a set of ports.
18:23 tangentstorm so if you wanted to add a general-purpose c ffi, you would just create an "FFI device" and talk to that device through the port.
18:24 tangentstorm but once you did that, you're no longer coupled to c, and you could use the same interface for talking to javascript or assembly language, or go, or whatever.
18:24 dukeleto whoa!
18:24 tangentstorm or you could be talking across the network to an ffi device there
18:24 dukeleto tangentstorm: have you played with Factor before?
18:24 tangentstorm yeah
18:24 dukeleto tangentstorm: forth-inspired
18:24 tangentstorm retro and factor are very very similar
18:24 dukeleto tangentstorm: it has an "alien" ffi system
18:24 tangentstorm but factor's vm is much bigger
18:25 dukeleto tangentstorm: i am familiar with factor and know some of the core devs personally
18:25 tangentstorm http://games.tangentcode.com/mineswpr/
18:25 tangentstorm ^ this is ngaro/retro running in a browser
18:25 tangentstorm unfortunately, i introduced some bugs and if you type while it's refreshing the screen the whole thing locks up
18:25 dukeleto tangentstorm: what you are describing to me sounds way better than the "alien" concept, or perhaps it is just one more abstraction on top of the "alien" concept
18:26 Mike-PerlRecruiter_ joined #parrot
18:26 tangentstorm i can't take credit for it... i was going to make my own simple stack vm until i found ngaro.
18:26 dukeleto tangentstorm: so you have an abstract "ffi device" listening on a port?
18:26 dukeleto tangentstorm: have you heard of NekoVM?
18:26 tangentstorm yeah for haxe but i don't know a lot about it.
18:26 dukeleto tangentstorm: that seems to have a small but dedicated developerbase
18:26 dukeleto tangentstorm: isn't talking over a port hella slow?
18:27 dukeleto tangentstorm: is that the price to pay for portability?
18:27 dukeleto tangentstorm: it may be a good deal :)
18:27 tangentstorm by "port" i mean an array of numbers.
18:27 dukeleto tangentstorm: ah!
18:27 tangentstorm which could be registers
18:27 dukeleto tangentstorm: so that is the same as an "alien" in Factor-speak
18:27 tangentstorm in the js version here, there's no ffi yet
18:27 dukeleto tangentstorm: binary data, essentially?
18:27 tangentstorm yah, one sec.. i'll show you the code
18:28 tangentstorm btw, this is the official demo: http://retroforth.org/demo/
18:28 tangentstorm the main version is written in C and is much much faster obviously.
18:29 dukeleto cool!
18:29 tangentstorm the minesweepr game is my port to try and speed up the javascript one
18:29 dukeleto tangentstorm: so how do we keep m0 from knowing as little as possible about FFI?
18:29 tangentstorm one of the the things I  did is I took a javascript library called escapes.js that does ANSI terminal emulation and I converted it to an ngaro device.
18:30 dukeleto tangentstorm: what hooks does it actually need?
18:30 tangentstorm by defining interfaces/protocols for each kind of device.
18:30 tangentstorm I've never designed an FFI before but I know someone who has.
18:30 tangentstorm http://elm-lang.org/
18:30 tangentstorm (haskell-like language that compiles to javascript)
18:31 tangentstorm I hounded him to add interaction with real javascript and he surprised me by implementing a really nice event-based FFI
18:31 tangentstorm I'd have to study it a bit more to tell you about it though. :/
18:33 tangentstorm here is the port interface: https://github.com/tangentstorm/nga​ro-js/blob/master/src/ngaro.js#L438
18:33 tangentstorm 4 lines of code :)
18:34 tangentstorm basically there are 3 opcodes in ngaro:  OUT, IN, and WAIT
18:34 tangentstorm OUT writes a number to a port, IN reads a number from a port, and WAIT runs the IO loop here so one of the devices runs.
18:34 tangentstorm each port has a port handler, which is just a function that takes a value and returns a value.
18:35 tangentstorm value being one 32 bit integer.
18:35 tangentstorm but it's not super clean, because the port handlers can then proceed to push and pop numbers off the stack, and occasionally poke around at arbitrary places in the VM's ram.
18:36 tangentstorm this minesweepr game runs identically on the C and pascal vm's in the linux console btw.
18:36 tangentstorm in theory, you can run it on an arduino or pic or whatever.
18:37 tangentstorm like over a serial device or something. i don't have the hardware to try it, but there are ports of the vm to those platforms.
18:38 tangentstorm This javascript code isn't anywhere near close to optimized, btw. It was the author's first javascript program.
18:39 dukeleto tangentstorm: this is seriously interesting stuff
18:39 tangentstorm (all i did was add tests and refactor it a bit to make it run on node.js in the console)
18:39 tangentstorm i'm trying to make a game engine off this stuff.
18:39 tangentstorm with a "sprite device"
18:39 tangentstorm where a sprite would be a lot like a PMC for parrot, and the device would sort of manage it, if that makes sense.
18:40 tangentstorm I kind of had the same idea for "string devices"... but i haven't tried it yet.
18:41 tangentstorm dukeleto: There's also a guy who hangs out in #retro making another vm that compiles to a 4-bit instruction set. He treats it as a bytecode to avoid extra bit-shifting
18:42 tangentstorm So there are 256-instructions that each just do some combination of 2 ops :)
18:42 tangentstorm The point is it's insanely fast, and the whole vm can live inside the cpu cache.
18:43 tangentstorm like on intel/amd you have these 128-bit registers for MMX and SSE that are just sitting around doing notihng because everyone uses the graphics card to do vector stuff these days.
18:45 tangentstorm you can pack 32 of the instructions into one of those registers, and you can use bit-rotation operations to give yourself an automatic infinite loop :)
18:45 tangentstorm The point is: make it small enough that some random guy with a cool idea like that can come and tinker with it, and they will, because it's easier than starting from scratch.
18:45 dalek rakudo/nom: b5bdbe4 | (Geoffrey Broadwell)++ | src/core/Str.pm:
18:45 dalek rakudo/nom: Convert pir::const::CCLASS_PRINTING to nqp::
18:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b5bdbe459f
18:46 tangentstorm (and i think m0 does this quite nicely for parrot!)
18:51 tangentstorm Oh
18:51 tangentstorm Another reason for moving PMCs and the C api out of the vm and into an external "device" is that once you do that you can put m0 on an FPGA.
19:05 dalek nqp: 49dd649 | jnthn++ | src/QRegex/NFA.nqp:
19:05 dalek nqp: Remove some bogus type constraints.
19:05 dalek nqp:
19:05 dalek nqp: Since we typically calculate with floats in NQP, we can't rely on the
19:05 dalek nqp: arguments being int here. Somehow we get away with this on Parrot, but
19:05 dalek nqp: NQP JVM enforces them more Perl 6-ishly. Also, they may have led to
19:05 dalek nqp: reboxing, so we may be better off without them anyway.
19:05 dalek nqp: review: https://github.com/perl6/nqp/commit/49dd649ba2
19:05 dalek nqp: 008a923 | jnthn++ | src/QRegex/NFA.nqp:
19:05 dalek nqp: Remove misleading commented out code and a hack.
19:05 dalek nqp:
19:05 dalek nqp: The code explained what the C op it was replaced with at the point it
19:05 dalek nqp: was translated. However, now things have evolved, so better to just
19:05 dalek nqp: toss it.
19:05 dalek nqp: review: https://github.com/perl6/nqp/commit/008a923550
19:19 dalek nqp: b48d067 | jnthn++ | src/QAST/Operations.nqp:
19:19 dalek nqp: Add nqp::setelems.
19:19 dalek nqp:
19:19 dalek nqp: To abstract away pir::assign__0Pi.
19:19 dalek nqp: review: https://github.com/perl6/nqp/commit/b48d067581
19:19 dalek nqp: d8426fc | jnthn++ | src/stage0/ (9 files):
19:19 dalek nqp: Update bootstrap to get some nqp:: ops.
19:19 dalek nqp: review: https://github.com/perl6/nqp/commit/d8426fce7d
19:19 dalek nqp: a3d1061 | jnthn++ | src/QRegex/Cursor.nqp:
19:19 dalek nqp: Clean up Cursor and related classes.
19:19 dalek nqp:
19:19 dalek nqp: Means that most code now matches the JVM version.
19:19 dalek nqp: review: https://github.com/perl6/nqp/commit/a3d106155f
19:20 PacoAir joined #parrot
19:32 dalek nqp: 67270f7 | jnthn++ | src/QRegex/P6Regex/Grammar.nqp:
19:32 dalek nqp: Add SC handle uniqueness fix from NQP JVM.
19:32 dalek nqp: review: https://github.com/perl6/nqp/commit/67270f7475
20:06 mtk joined #parrot
20:10 dalek nqp: 08d0103 | jnthn++ | src/HLL/Actions.pm:
20:10 dalek nqp: s/atkey/atpos/ fix from NQP JVM.
20:10 dalek nqp: review: https://github.com/perl6/nqp/commit/08d0103677
20:10 dalek nqp: ea56c24 | jnthn++ | src/ (3 files):
20:10 dalek nqp: Various tweaks to HLL and NQP for JVM compat.
20:10 dalek nqp: review: https://github.com/perl6/nqp/commit/ea56c2433f
20:54 dalek nqp: d46b465 | jnthn++ | src/HLL/ (2 files):
20:54 dalek nqp: Final couple of syncs with NQP JVM.
20:54 dalek nqp:
20:54 dalek nqp: Remaining differences are bits that need to be backend specific.
20:54 dalek nqp: review: https://github.com/perl6/nqp/commit/d46b46539a
21:35 davidfetter joined #parrot
21:43 dalek nqp/jvm-support: b7c2129 | jnthn++ | / (63 files):
21:43 dalek nqp/jvm-support: Use .nqp extension consistently.
21:43 dalek nqp/jvm-support: review: https://github.com/perl6/nqp/commit/b7c212948e
21:43 dalek nqp/jvm-support: 491b38b | jnthn++ | 3rdparty/asm/ (2 files):
21:43 dalek nqp/jvm-support: Add 3rdparty/asm from nqp-jvm-prep repo.
21:43 dalek nqp/jvm-support: review: https://github.com/perl6/nqp/commit/491b38b533
21:43 dalek nqp/jvm-support: a8721d5 | jnthn++ | / (123 files):
21:43 dalek nqp/jvm-support: Move C code, ops and PMCs under src/vm/parrot/.
21:43 dalek nqp/jvm-support: review: https://github.com/perl6/nqp/commit/a8721d5fb8
21:44 dalek nqp/jvm-support: 669532a | jnthn++ | .gitignore:
21:44 dalek nqp/jvm-support: Update .gitignore.
21:44 dalek nqp/jvm-support: review: https://github.com/perl6/nqp/commit/669532a77b
22:13 dalek nqp/jvm-support: 48af6ff | jnthn++ | / (3 files):
22:13 dalek nqp/jvm-support: ModuleLoader.nqp will be VM-specific.
22:13 dalek nqp/jvm-support: review: https://github.com/perl6/nqp/commit/48af6ffeda
22:13 dalek nqp/jvm-support: 7b9b760 | jnthn++ | src/Regex/constants.pir:
22:13 dalek nqp/jvm-support: Toss dead code.
22:13 dalek nqp/jvm-support: review: https://github.com/perl6/nqp/commit/7b9b760c4b
22:13 dalek nqp/jvm-support: ba54813 | jnthn++ | / (7 files):
22:13 dalek nqp/jvm-support: Parrot QAST backed moves under src/vm/parrot.
22:13 dalek nqp/jvm-support: review: https://github.com/perl6/nqp/commit/ba54813b87
22:41 dalek nqp/jvm-support: af466c8 | jnthn++ | / (3 files):
22:41 dalek nqp/jvm-support: Split out HLL::Backend from HLL::Compiler.
22:41 dalek nqp/jvm-support: review: https://github.com/perl6/nqp/commit/af466c8d3e
22:41 dalek nqp/jvm-support: d6ff63d | jnthn++ | / (3 files):
22:41 dalek nqp/jvm-support: NQP Ops.nqp is also VM-specific.
22:41 dalek nqp/jvm-support: review: https://github.com/perl6/nqp/commit/d6ff63da09

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

Parrot | source cross referenced