Camelia, the Perl 6 bug

IRC log for #moe, 2013-03-27

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

All times shown according to UTC.

Time Nick Message
00:01 chansen I'm working on implementing a DateTime module in c/XS and I can't tell you how much I'm fed up with XS! Overloading, nightmare (as in p5 language), Where is the API for a proper MOP or Roles? Methodsignatures?
00:01 sartak yup.
00:03 mattp my hope with moe is some cpan compatibility at some point in the future, particularly in modules that work to support both cperl and moe
00:03 mattp is this even remotely feasible?
00:05 awwaiid chansen, have you tried FFI::Raw?
00:06 awwaiid mattp -- as time goes, it seems that direct cperl5 is unlikely, but that there might be a subset of perl5 which many modules can become compliant with once it is defined
00:07 awwaiid or a simple transformation for a subset of perl5
00:07 awwaiid but as-is ... sketchy at best
00:07 doy more likely would be cperl bindings
00:07 doy (in both directions)
00:08 awwaiid true that
00:08 awwaiid but I guess we can make it pretty transparent
00:09 doy similar to how you're looking into being able to call java code, i guess
00:09 awwaiid then we can make cpython and pypy and cruby and jruby and clojure and ocaml and lua bindings, then the WORLD WILL BE OURS
00:09 doy (:
00:10 awwaiid man oh man... imagine that. why don't we have that already? I guess we have Inline:: which, when ever I've used it, works pretty darn well
00:10 melo1 joined #moe
00:11 doy inline is nice, but it still requires a compiler at runtime
00:11 doy which makes it a non-starter for a lot of cases
00:11 awwaiid oh right! runtime compiler
00:11 chansen awwaiid: No haven't, even though the core is implemented as a c library <https://github.com/chansen/c-dt>, here is the result so far, look a the boilerplate of XS <https://github.com/chansen/p5-chrono>
00:12 awwaiid whereas my plan only requires you to embed pypy, python, ruby, jruby, lua, clojure, ... runtimes etc into our system
00:12 awwaiid chansen: that's way more XS than I've ever been patient enough to write :)
00:13 chansen hehe
00:17 mattp doy: by 2 way bindings, you mean needing cperl interpreter running on the other end?
00:19 chansen awwaiid: I'm considering a rewrite and only warp the essentials of c-dt and write the rest in p5, currenty it's ~ 20K - 50K% more efficient than DateTime, I guess I'll loose a bit of performance but maintenance would probably be easier
00:19 * chansen s/warp/wrap/
00:22 doy mattp: yes
00:25 chansen In many cases, if moe would be sufficiently fast (yeah, it's relative, but in Java most library are written in native language), there would be very few c modules that needed to be wrapped
00:26 doy right
00:28 chansen I'm assuming it will be possible to call/invoke Java libraries?
00:31 doy that is the plan
01:00 chansen Excellent =)
01:32 chansen Since I have not tried rakudo for a few years, I guess it's a sensitive question to ask where moe thinks it is within it's estimated progress?
01:43 stevan chansen: Rakudo will be much better off once it is multi VM (meaning, is not tied to the dead weight of Parrot)
01:44 stevan mattp: I have been thinking a lot about CPAN compat and what CPAN means to the Perl community
01:44 stevan in fact, it will be a key subject in my YAPC talk
01:45 stevan the short answer to your question about even a minimal level of CPAN compat is "pretty much impossible"
01:46 stevan this is simply because very few popular and useful modules dont either 1) have a direct or indirect XS dependency and 2) most of them actually rely on many of the features we want to jetison
01:46 stevan ex: DBI relys heavily on tie() and XS, LWP relies on AUTOLOAD
01:47 stevan and think of how many of your favorite modules, at some layer, use those two
01:47 stevan also, one of the key things for Moe is to adopt the p5-mop object model
01:48 stevan in which case, why would I want to also support the old p5 blessed-ref-to-package-name model too?
01:49 stevan the only way to really do CPAN compat is to have an interoprability layer
01:54 chansen stevan: (I figured that much, and was pleased when rakudo decided to try other VM's :)
01:55 stevan yes, doy and I spoke a lot with pm and jthn at YAPC::EU about it
01:56 stevan I was very pleased that they actually decided to jump into it
01:56 chansen being the same VM as scala couldn't been any better for moe, could it?
01:57 stevan :)
02:03 chansen I sincerely hope that p6  and p5 (read moe) becomes a viable alternative on the same VM, it would make my life so much easier, I care more for moe than p6, if anyone cares about my opinion ;)
02:05 sri stevan: no AUTOLOAD in moe?
02:06 sri (no alternative?)
02:08 doy the alternative would be something at the mop layer
02:08 sri ah, so nothing philosophical then :)
02:08 chansen sri: AUTOLOAD is "pretty" perlish, how would hou solve signatures or overlloading?
02:08 doy but it really shouldn't be enabled by default
02:09 doy if we have a full mop, there's not really any way to prevent people from implementing something like autoload
02:09 doy it is in some sense the entire point
02:10 chansen doy: true, it would make it possible to state overloading operators as in C# ot Java
02:11 doy sure
02:11 doy well, operators would require some syntactical suport too
02:11 doy but method overloading would be entirely doable
02:12 hobbs operators are standing by
05:18 hiratara joined #moe
05:27 hiratara joined #moe
12:22 stevan joined #moe
13:00 jnap joined #moe
13:10 bluescreen joined #moe
13:17 gizmomathboy_ joined #moe
13:36 sivoais joined #moe
13:46 jnap joined #moe
14:30 jnap joined #moe
14:45 mattp stevan: dbix::class is the only thing on my mind really
14:46 mattp stevan: you are correct wrt DBI and lwp, but dbic itself is architected to support different backends, not just DBI. it just so happens DBI is the only one currently
14:50 mattp i understand the technical hurdles are immense to _ANY_ cpan support, but i dont see why you would use moe vs anything else if the ecosystem isn't there
14:51 jnap mattp:  and I would probably say at this point its hard for me to grasp a sane non DBI storage for dbic, given how the code has evolved
14:51 mattp 'experiment' is probably the answer to that
14:56 mattp jnap: out of curiousity, what comes to mind that would make it insane? Im not super familiar with dbic internals :)
15:00 mattp if Moe::JDBC could provide a similar enough interface to implement Storage::JDBC .. im armchairing from a point so far from current reality its probably moot to even discuss it
15:06 PerlJam mattp: have you read about DBDI?  (https://github.com/timbunce/DBDI)
15:09 jnap joined #moe
15:10 mattp PerlJam: ive not. interesting that it is a word for word clone of jdbc
15:19 jnap1 joined #moe
15:20 mattp jnap1: you could really use a irc shell or a bnc :)
15:21 jnap1 I have a T1 line on order, that will solve all my connection woes
15:22 mattp jnap1: you might have missed from timing out. i was just curious where (if you know) offhand dbixc is coupled to DBI outside of the storage interface?
15:24 jnap1 well, off the top of my head can't mention anything in particular, to be honest, but I do think the overall system anticipates a relational DB more than anything.  Has to be some reason why nobodies added anything but, right?
15:26 mattp jnap1: i was thinking of a moe JDBC implementation of a storage - so still interfacing to rdbms, just without the crufty DBI dependency
15:27 jnap1 that would probably be good to have
15:27 jnap1 and would save a lot of work related to getting databases working for moe
15:27 jnap1 if I could use DBIC I'd suggestion doing Catalyst6 in moe :)
15:28 PerlJam jnap1: overwhelming success means that no one has needed to try something different (re DBI backend to DBIC)
15:31 jnap1 well, or that its so imponderable that we just stick to what we got
15:31 jnap1 or a mix of the two
15:32 jnap1 like how we all just grunted and worked around cpan until someone bothered to do cpanm...
15:32 mattp i wonder where typeglobs fall in Moe-land. with a real mop will that be done away with?
15:33 PerlJam mattp: Perl 6 doesn't need typeglobs :)
15:33 doy typeglobs don't have much to do with a mop, but yeah, they're going away
15:34 mattp PerlJam: just thinking in terms of perl5 interop.. or lack thereof
15:39 stevan mattp: first, remember moe is an experiement :)
15:39 stevan second, yes, I have pondered the "why bother writing moe if you have to reimplement CPAN anyway"
15:39 stevan and actually, i have been playing with reimplementing parts of CPAN in Scala
15:40 stevan doy was too (he did Test::More, which is complete, I actually just have some things I am messing around with)
15:40 stevan but the fact is
15:40 stevan (and this is by no means a justification of using moe)
15:40 stevan porting Perl to other languages ends up not being very perlish
15:40 stevan doy's Test::More was, but that is a simple interface
15:41 stevan but something like DBI, DBIx::Class, LWP, etc
15:41 stevan they are very perlish
15:41 stevan and therefore don't fit as well in other languages
15:43 stevan if Moe can plant itself between the legacy-world Perl 5 and the future-world of Perl 6
15:43 stevan then perhaps we have a reasonable target for re-implementing CPAN and still keeping it Perl-ish
15:43 stevan and one more stepping stone to Perl 6
15:44 stevan of course then the question is "well, wtf not just jump to 6?"
15:44 stevan to which I have no answer
15:44 stevan and I think about a lot
15:44 stevan :)
15:45 masak I think there is definitely room for a stepping-stone like moe.
15:45 masak and I think stevan is great for exploring exactly that space. you go, stevan++!
15:45 stevan says the other guy writing a Perl6 Lite ;)
15:46 stevan masak++ # thanks
15:46 masak well, I'm doing it mine for egotistical reasons. :)
15:46 masak instead of arguing to death with TimToady over details I don't like about Perl 6, I'm becoming my own language designer instead.
15:47 masak result: I have a lot more sympathy for what TimToady has done. :P
15:47 awwaiid haha
15:47 awwaiid I was just thinking that
15:47 stevan :)
15:47 PerlJam masak: that you didn't have enough sympathy for him to begin with was a bug in your wetware  :)
15:47 stevan yeah, same here
15:47 stevan this job is hard
15:47 masak PerlJam: maybe I expressed that wrong. :)
15:48 masak PerlJam: my sympathy for TimToady *before* this experiment of mine... wasn't exactly low.
15:48 masak PerlJam: but now it has backing from some painful-ish first-hand experience.
15:48 awwaiid ya
15:48 stevan you have empathy now, you had sympathy before
15:48 awwaiid nicely put
15:48 * stevan takes a bow
15:49 PerlJam stevan: So ... when will moe be production ready?   ;>
15:49 masak my language has 1 user, and designing to meet everyone's needs is *still* tricky! :P
15:49 * awwaiid shoots himself in the side to have more emphathy with gangsters and gunshot victims
15:49 stevan PerlJam: I am trying to decide between Halloween and Easter
15:49 masak stevan: *lol*
15:49 PerlJam oh!  Halloween sounds perfect!
15:49 awwaiid eastween
15:49 masak I thought Halloween belonged to Pumpkin Perl... :)
15:49 stevan oh right
15:50 stevan ok, easter it is
15:50 stevan jnap1: cool, I just noticed you were coming to DCBPW
15:50 PerlJam so ... Perl 6 is equated to the birth of Christ, but Moe to his death?  or maybe the birth of christianity (which in some ways is worse)
15:51 stevan actually, I was just gonna stick with Moe being about chocolate eggs and fuzzy bunnies
15:51 awwaiid stevan, we're making jnap1 keynote
15:51 stevan awwaiid++ # nice!
15:51 masak stevan: deal! this Easter, I will be celebrating moe! probably by downloading it and trying it out :)
15:52 PerlJam masak: He still didn't say *which* easter :)
15:53 masak I don't care. I'm downloading it now to get some practice.
15:53 stevan well, this easter it will have the "Write your own AST"  dialect available at least :)
15:53 masak yay
16:04 tobyink joined #moe
16:28 jnap joined #moe
17:30 jnap joined #moe
18:16 phaylon masak: is your language publicly viewable somewhere? I'm doing something similar and had a similar experience :)
18:20 gizmomathboy_ joined #moe
18:24 stevan and then there were three ...
18:26 masak phaylon: no, not yet. I have a spec, but I'd prefer to keep it out of the public eye at this early stage.
18:26 masak phaylon: currently writing a parser and a JavaScript backend.
18:28 phaylon ah, I went with scheme :D
18:30 phaylon kind of in a messed up state now though. I can compile lambdas but am still a bit undecided on truthiness
18:36 masak yeah, truthiness is a bitch.
18:39 masak and I'm still trying to make the balance of gradual typing come out right.
18:40 phaylon oh yea, I'm not even at that point yet, but it'll probably just be runtime validation/dispatch
18:41 phaylon mostly due to my ignorance in that area :)
18:52 masak Perl 6 has some nice stuff there, but insufficiently static to do some neat things :)
18:53 phaylon yea
18:55 phaylon mine is gonna be pretty strict, just the general syntax is perlish. kind of like a very dynamic vala with a mop instead of glib
19:06 jasonmay aw
19:06 jasonmay I was hoping vala was scala but run in v8
19:09 masak mine kinda looks like a very Perl 6-inspired mix of JavaScript and Rust.
19:13 phaylon it certainly sounds interesting :)
19:13 phaylon you doing the parsing in js as well or something else?
19:13 phaylon jasonmay: I actually really like it for small gtk apps, haven't tried anything bigger yet
19:15 masak phaylon: yes, writing the first parser and backend in js, until I get it self-hosting.
19:18 phaylon how is javascript for that? never used it for such a purpose
19:19 phaylon oh, and another thing that bites: regex syntax
19:22 melo joined #moe
19:34 masak phaylon: JavaScript is pretty neat for that. see for example http://javascript.crockford.com/tdop/
19:34 masak phaylon: and I've learned a few tricks of my own, too. it was a nice thing to realize that I could make the tokenizer lazy with basically no change at all to the code.
19:35 doy text::xslate is based on tdop
19:35 doy it's pretty nice to work with
19:44 masak I should add that my parser switches to operator precedence once it gets down to expressions. similar to how Perl 6 does it. :)
19:46 phaylon ah, tdop was new to me, thanks :D
19:47 phaylon I cheated and used an external parser, so the heavy lifting is all not mine :)
19:49 masak since I plan to self-host, I figure the manual work is worth it.
19:49 phaylon yea, I'm not planning on going that far :)
19:50 phaylon the scheme compiles to C, that's good enough for me. and maybe one day I'll figure out how to make it a .so and load it into perl. that would be nice
20:04 masak :)
20:15 jnap joined #moe
20:51 jnap joined #moe
20:56 jnap1 joined #moe
21:35 chansen joined #moe
22:01 gizmomathboy joined #moe
22:08 tobyink joined #moe

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