Camelia, the Perl 6 bug

IRC log for #mojo, 2012-01-09

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

All times shown according to UTC.

Time Nick Message
00:22 alnewkirk joined #mojo
00:25 keedi joined #mojo
00:41 mire joined #mojo
02:34 sugar joined #mojo
02:39 hshong` joined #mojo
03:38 Psyche^ joined #mojo
03:40 rsimoes1 joined #mojo
03:44 tempire I really wish perl had a keyword for non-destructive keyword for the first argument of a subroutine that was prettier than $_[0]
03:54 ccushing_ joined #mojo
03:59 d4rkie joined #mojo
05:36 sri tempire: pretty sure class and method keywords will be added to perl soon
05:36 sri which would mean $self would just work without initialization
05:37 tempire hope they have something for regular subs too
05:37 sri doubt it, backcompat
05:41 Foxcool joined #mojo
05:59 sri wonder if we should deprecate Mojo::DOM->attrs for Mojo::DOM->attr, or if it's still too confusing
06:07 tempire both are the same.  every once in a while a person will mess it up, look at the docs, and fix it
06:08 sri nono
06:08 sri jquery uses attr
06:08 tempire oh
06:08 sri we've chosen attrs because Mojo::DOM used to be a subclass of Mojo::Base
06:08 sri but that's not the case anymore
06:09 sri so Mojo::DOM->attr is an option now
06:12 sri with confusion i mostly mean mix up Mojo::Base->attr and Mojo::DOM->attr
06:13 tempire I wonder how many people use attrs
06:13 sri prolly not many since we allow direct hash access
06:16 sri guess there's no real value in changing the name
06:18 tempire agreed
06:28 GitHub108 joined #mojo
06:28 GitHub108 [mojo] kraih pushed 1 new commit to master: http://git.io/ftPnew
06:28 GitHub108 [mojo/master] more Mojo::DOM examples - Sebastian Riedel
06:28 GitHub108 left #mojo
06:31 koban joined #mojo
06:40 sri sometimes i really hate github
06:40 sri my last few documentation edits did cost 4 followers
06:41 sri the end result will be that i write less documentation
06:41 tempire can't you just push it less?
06:42 sri that's kinda against collaboration
06:43 sri would you like it if i just push one big blob with a dozen commits every few days?
06:51 batman joined #mojo
06:54 tempire it's better for the community to do what you've been doing.  followers are cool, but I don't know that it really matters.
07:10 crab sri: what does it matter how many followers you have?
07:10 crab and how do you know it was the documentation edits that got rid of them, anyway?
07:11 crab the evidence is somewhat weak, circumstantial, and anyway if the followers are the kind that are discouraged by documentation edits, they're not going to be much help to mojo anywya.
07:13 tempire It's the spammish nature of the github newsfeed he doesn't like
07:13 tempire spammish feel, I should say
07:14 crab oh.
07:14 abra joined #mojo
07:18 stephan48 the only way to solve that would be to just dont commit anything wouldnt it?
07:19 crab yay! a solution!
07:20 alnewkirk joined #mojo
07:22 sri :D
07:23 sri crab: it's a pattern i've observed before
07:23 sri too frequent commits and you lose followers
07:26 sri crab: and i'm more annoyed about github not making the feed more user friendly than about those unfollowing
07:27 Vandal joined #mojo
07:32 ki0 joined #mojo
07:35 batman joined #mojo
07:38 sri oh… new sherlock episode
07:38 sri this will be a slow monday :)
07:54 batman joined #mojo
08:01 berov joined #mojo
08:12 rsimoes left #mojo
08:18 batman joined #mojo
08:41 rhaen joined #mojo
08:41 rhaen hi.
09:08 sri ho ho ho
09:08 purl Now I have a machine gun!
09:09 * Debolaz ponders resuming hacking on his own web framework (While still using mojo for "real world" stuff)
09:14 cosmincx joined #mojo
09:20 sri everybody should try it
09:21 sri but what we really need are more higher level frameworks
09:22 sri drupal-ish
09:22 sri bit strange nobody really dares to solve that problem
09:23 abra_ joined #mojo
09:26 Debolaz sri: That is the goal of the end of the road. Now if I could only get on with starting to walk down that road.
09:26 * Debolaz has quite a few design ideas.
09:31 cosmincx joined #mojo
10:33 marcus Debolaz: maybe smarter to build it on mojo than to start from scratch?
10:34 Debolaz marcus: Frankly, I was afraid you'd say "but we already have movable type, why do we need something else?" :)
10:34 marcus Debolaz: I would never say that.
10:35 Debolaz You have a tendency to be negative to new ideas. :)
10:35 sri i'd actually say it's the opposite
10:36 marcus Debolaz: Maybe that should tell you something about your ideas :p
10:36 Debolaz Hehe, perhaps. But I don't think I've ever seen any words of encouragement from you in any situation marcus.
10:36 Debolaz There's always something wrong with everything.
10:37 marcus Debolaz: that doesn't sound like me at all.
10:37 marcus Debolaz: you're the one who want to reinvent everything ;)
10:38 Debolaz Now, I know this is how you are so I don't really take it all that seriously, but I figure I should tell you this perception I have to explain why I don't really want to get into a debate about the idea with you.
10:38 Debolaz I don't think anything constructive would come of it.
10:38 sri maybe you don't highlight enough how you want to make the things you reinvent better
10:39 sri reinventing by itself is boring, what makes it interesting is the original ideas
10:41 fmerges joined #mojo
10:41 marcus Debolaz: I try to be pragmatic and focus on real world value, but to say I always think there's wrong with everything is a bit strange, seeing as I've spent the last 5 years promoting catalyst and then mojolicious in varous conference presentations and blog posts.
10:41 marcus I'm more like an evangelical guy, I'd say :)
10:42 Debolaz sri: I see web frameworks as existing in 3 layers, each with their own current implementations and current problems. You have the bottom layer which is the basic plumbing. Plack is an example. You have the middle layer which you make actual applications on, like Catalyst. Then you have the top layer, a CMS, such as Movable Type. I have specific ideas I want to try out for each of these layers.
10:43 sri and those ideas are what you should share
10:43 Debolaz sri: Obviously, some frameworks encompass several layers, Mojo covers bottom and middle. Catalyst a bit mish-mash.
10:44 Debolaz sri: Yes, and I don't mind sharing, but marcus didn't ask me to share, he just outright dismissed everything.
10:44 marcus :-o
10:44 Debolaz And that is my experience with marcus. He's a *really* nice guy, friendly, etc. But he has always come across to me as very conservative to new ideas.
10:45 marcus Debolaz: I suggested that if you want to make a higher level framework it's a good idea to build on something existing. How is that dismissing everything?
10:45 Debolaz marcus: I don't mind to talk about you like you're not here, I'm just explaining my reaction. :-)
10:45 Debolaz Err
10:45 Debolaz s/mind/mean/
10:46 sri well, i think you got the wrong impression of marcus
10:47 Debolaz Anyway, let me try to put into words some of my ideas now, because that would also explain why I don't want to simply build on Mojo. Mojo is great for making real world applications (Like I said at the start), it solves real problems and does so much better than say Catalyst. I wouldn't dream of recommending anything but Mojo if someone asked me how to make a web application.
10:48 sri we design web frameworks here, we love talking about new design ideas ;)
10:49 Debolaz I wouldn't say "there's Catalyst and Mojo", I'd just say "Go use Mojo". But, in my head, I always think, "could this have been designed simpler?". And that's not just true for Mojo, but for almost any code I see. I like to try to imagine the perfect object graph for any given problem.
10:49 sri even if it's not for us
10:50 sri exploring that is a worthy goal
10:50 marcus Debolaz: we're interested in hearing your ideas, and I'm sure some of them could be applied to mojolicious as well?
10:50 Debolaz And yes, my impression of marcus may be dead wrong, you've talked to him a lot more than me. But that is my impression. Just as he has an impression of me. And that's fine, I just want to have it out in the open.
10:50 Debolaz Frankly, his impression of me might be a tad bit accurate.
10:50 marcus Debolaz: I think my main problem is that you seem to start out every idea thinking 'I gotta fork this', rather than 'how can I contribute to making this better'.
10:51 sri actually, i would be very much interested in simplifying the mojo class structure
10:51 sri *if* it is possible
10:52 Debolaz marcus: Thing is, fork implies simply making an alternative. I don't want to make alternatives. I want to make perfection. As silly as that might sound. If I find that I can't make something better, I drop it. I hate the idea of having several things that does the exact same task with no improvements, that's why I dislike all the Moosalikes that has popped up on CPAN.
10:52 sri forget about perfection
10:52 purl sri, I didn't have anything matching about perfection
10:52 * sri hugs purl
10:52 * purl hugs sri back
10:53 Debolaz sri: I have no idea if it's possible. I don't even know if my idea is an improvement. But I like putting together pieces of code to test it.
10:53 sri the web is built on failures, specs are flawed all over the place
10:53 marcus oh btw, t
10:53 marcus I'm so impressed by simpsons lately!
10:53 Debolaz When I say, "I want to try this", that doesn't mean I seriously think I can make a working alternative, that simply means I want to try something..
10:53 Debolaz marcus: :O
10:53 sri don't spoil the latest episode :)
10:53 marcus sri: just watch it :)
10:53 * Debolaz has been severely disappointed by Simpsons the last few years.
10:54 marcus last two episodes have been awesome
10:54 sri this season was quite good
10:54 Debolaz The episode about norwegians was hillarious, but I suspect that was only hillarious to some very specific people. :-)
10:54 marcus yeah, swedes
10:54 purl yeah, swedes are only the single biggest influence on design in this century =)
10:56 Debolaz Meanwhile, Family Guy has been steadily increasing in quality from their low point at the start of season 4 (After the de-cancellation)
10:58 * sri wonders how to explain event loops to beginners
10:58 berov "sri: bit strange nobody really dares to solve that problem" I dare
10:59 marcus berov: url? :)
10:59 berov second
10:59 berov https://github.com/kberov/MYDLjE
11:00 berov about drupal-ish framework based on Mojolicious
11:00 berov I need help ofcourse :)
11:00 marcus interesno :)
11:01 berov Speak bulgarian :)
11:01 berov ?
11:01 Debolaz sri: I think one of the most fundamental parts I want in place is building the web application on a Bread::Board type model. I believe the different layers should simply be a progressive addition of objects on top of a container.
11:01 berov I am open to all suggestions and refactoring
11:03 berov Like in a way Contao (Contao.org) - a cleaned up solution stealing paradigms from TYPO3
11:03 berov very much based on the idea of hooks
11:03 marcus berov: net, nimnoga russki
11:04 berov :) ok I am Bulgarian - no problem :) English is enough :)
11:04 berov I also learned Russian back in the days of the socialism Era :)
11:04 berov anyway
11:05 cosmincx joined #mojo
11:05 berov About Higher level framework on top of Mojolicious
11:05 berov ...
11:05 berov Mojolicious has already all the goodness we need for such a framework
11:06 cosmincx joined #mojo
11:07 berov Movable Type/Melody... too much dependencies of Proven but old  times code
11:07 berov they ar ok tough
11:08 berov I learned many things from there
11:08 marcus :)
11:09 berov so I would like to Initiate some discussion for such aframework on top of Mojolicious
11:09 berov MYDLjE i smy attempt...
11:09 berov However I realise  I miss some knowledge :)
11:10 berov and one man is ok in the toilet only ;)
11:10 marcus It's good to try, can only make it better.
11:10 berov so what about join forses?
11:11 berov yep I tryed
11:11 marcus 2 suggestions for now, it's a very PHP idea to put the whole framework inside the apache htdocs root, and I think you should start writing some unit tests :)
11:11 * marcus goes to eat lunch
11:11 berov :) i know ok I will go to lunch too
11:11 sri yay lunch
11:14 berov marcus, sri: Theare *some* unit tests already https://github.com/kberov/​MYDLjE/tree/master/perl/t
11:15 berov but after lunch :)
11:15 sri don't steal my developers, marcus has to learn more about mojo internals first! :)
11:15 * sri cracks the whip
11:16 sugar joined #mojo
11:16 * sri wonders if crab has looked into the io layer yet
11:28 sri btw. i still would like for someone to take over Mojo::IOWatcher::AnyEvent
11:29 sri https://gist.github.com/1239684
11:30 sri actually have no idea if it still works
11:46 cosmincx joined #mojo
11:46 marcus sri: did you see nginx-perl ? Wonder if it would be suitable for a IOWatcher::
11:47 marcus http://zzzcpan.github.com/nginx-perl/
11:47 sri marcus: don't think so
11:48 sri we work with handles, last i looked it outsourced all io to nginx
11:49 sri yea, it works with chunks of data
11:49 sri you'd have to use a higher layer
11:55 marcus fairy snuff
12:04 berov "sri: don't steal my developers" AU Contraire (French) :)
12:05 j3nnn1 joined #mojo
12:05 berov I think a higher level framework on top of Mojolicious will be a strong testing tool among other things
12:06 berov Like https://github.com/divio/django-cms is
12:07 berov and source of examples of how to use mojolicious
12:07 berov not that what I've done already is the best way to use Mojo :)
12:07 sri Hab SoSlI' Quch! (Klingon)
12:07 berov it is a try tough
12:07 sri since we're using fancy languages today
12:08 berov do not understand :)
12:08 sri good :)
12:09 berov http://mentalmultivitamin.blogspo​t.com/2003/12/hab-sosli-quch.html
12:09 marcus :-o
12:09 marcus My mother has no such thing!
12:10 berov I ment "on the contrary"
12:10 berov :)
12:11 sri it's the only klingon quote i know :/
12:11 berov understand NP
12:12 berov about the PHP-ish way of putting things right in the public_html...
12:13 berov I did it so it is a 5 minutes install
12:13 berov like drupal,typo3,wordpress etc.
12:13 berov Most users just want to use the tool
12:14 berov they do not want to program
12:14 berov when it comes to programmming they hire a Developer
12:14 berov and..
12:15 berov this deployment does not get in the way of deploing the app as an NGINX backend for example
12:15 berov all stays hidden
12:15 marcus cool enough
12:16 berov like in here https://github.com/kberov/MYDLjE/blob/m​aster/conf/nginx-vhost-example.com.conf
12:16 berov again I realise tehre are better ways
12:16 berov they you can use hypnotoad
12:17 berov *then*
12:17 berov I made it as a bundle of 3 apps
12:18 berov https://github.com/kberov/MYDLjE#readme
12:18 berov As i remember i stolen from you marcus "Web-presence" ... rewritten/rethought
12:19 berov if I can remember well
12:19 marcus :)
12:20 berov so ... each app has it's purpose :)
12:20 berov the way I envisage to extend the base framework with user defined plugins is Mojolicious way
12:20 berov Mojolicious::Plugin::*
12:21 berov but MYDLjE::Plugin
12:21 berov sri allowed for Plugin namespaces
12:21 berov and I leveraged this
12:22 netfeed do you ship your cms(?) with mojo inside?
12:23 netfeed i mean, it's not downloaded as a seperate module from cpan?
12:23 berov yes
12:23 berov Mojo and several other are bundled
12:24 berov https://github.com/kberov/M​YDLjE/tree/master/perl/lib
12:24 berov The idea is to have everything ready to run
12:24 berov and later
12:24 berov I think to bundle local::lib and cpanm
12:25 berov so the developer can just do "cpanm Some::Module"
12:25 netfeed not to complain or anything, just curious, doesn't this make it more, eh, bloated?
12:25 berov mmm how big is drupal?
12:25 berov or TYPO3
12:25 berov or contao
12:25 berov several MB zipped
12:26 berov MYDLjE will be not more
12:26 berov but leveraging cpanm and local::lib makes an izolated environment
12:27 berov so you can have several such deployments on the same mashine
12:27 berov which is gread for shared hosting deployments
12:27 berov great
12:28 berov basically these are the things I pursued
12:28 netfeed ah, i don't mean the size of it, wouldn't it be easier to maintain if you pulled packages from cpan? and/or if you would make say a deb-package out of it, wouldn't it then be easier to have it pull in what it needs?
12:28 berov I succeded to this with djangocms
12:28 berov I do not stop this possibility
12:29 berov I mean if we bundle cpanm, we have all the CPAN available
12:30 berov but still the app is isolated in its $MOJO_ROOT
12:30 berov or something like that
12:30 netfeed is there anything like rubys bundler available for perl?
12:31 berov I do not know "rubys bundler" what is it
12:32 netfeed you build a Gemfile which downloads the gems(packages) you associate with the distribution
12:32 netfeed and either download a specified version or download newest
12:33 netfeed basically, if you write "bundle install", then it checks the Gemfile for gems to download and installs/updates them if needed
12:33 berov there are actually - old way is ..... Bundle::Something and new is Task::Another
12:33 berov tehse are not existing modules
12:33 berov these are just exammple names
12:34 berov Yes tehre is such thing in Perl, actually Ruby should have copied the idea from Perl
12:35 netfeed copy? that would break rubys NIH-syndrome :)
12:35 berov "NIH" ?
12:35 netfeed not invented here
12:36 berov ook anyway
12:37 berov :)
12:37 netfeed how would you solve it then in perl?
12:37 abra__ joined #mojo
12:38 berov netfeed, solve what ?
12:39 berov I lost you
12:39 netfeed download packages based on some sort of config file
12:40 berov I am also not so good at this but you make Module Task::*
12:40 purl okay, berov.
12:41 netfeed build a Makefile then?
12:41 berov http://search.cpan.org/~ad​amk/Task-1.04/lib/Task.pm
12:41 berov see this
12:41 purl i heard see this was a lesson you shouldn't get involved in things :)
12:42 berov ye I regret already :)
12:42 netfeed :)
12:42 netfeed thanks
12:42 berov wellcome hope this helps :)
12:43 Debolaz berov: Distribution of web application is a problem I've been contemplating on how to solve. One thing is clear, Catalyst didn't do a brilliant job of it. It wasn't even mentioned in the docs.
12:43 berov I went the PHP-ish way just to have the chance of addoption by end users
12:44 berov this the Movable Type way too
12:44 Debolaz PHP apps are quite convenient distribution-wise, because they don't require intimate knowledge of PHP to install them.
12:44 berov but  MYDLjE has no PHP in it
12:45 berov yes, that is what I pursued
12:47 Debolaz I've been thinking about one possibility, some kind of "perl-package-running-doohickey" type of application, which provides a common environment for applications in terms of modules available, then you download the application itself as a .par file (Or equivalent) and just run "perl-app myapp.par". The advantage with this is that you really only need to fix compatibility with different systems (And packages) at one specific point
12:47 Debolaz rather than making a .deb for every single application you write.
12:47 sri miyagawa has been porting bundler, it's called carton
12:49 berov Movable Type/Melody are good examples of bundling with only tested versions of modules and I adopted this way
12:49 netfeed sri: nice
12:49 Debolaz perl-app would provide non-core modules such as Moose, DBIx::Class, etc in the environment so they wouldn't have to be bundled. Specific versions of said modules can be maintained for compatibility. And then the problem wouldn't have to be solved for every single application since they would all get this environment for free.
12:50 Debolaz Mojo too obviously.
12:50 berov DBIx::Class requers modules which require compilation
12:51 Debolaz berov: That isn't an issue.
12:51 berov and  a user that tryes your ap
12:51 berov It is because....
12:51 Debolaz berov: DBIx::Class is provided *independently* of your web app.
12:51 Debolaz berov: So you don't have to bundle it.
12:51 berov but your hosting provider does not want to install it
12:52 berov and you as a user on the hosting mashine
12:52 berov do not have access to a C compiler
12:52 berov you can count only on what is on the hosting provider mashine
12:53 berov OR you have to deploy an Active Perl there
12:54 berov the way I solve the issue with missing access to a C compiler is to deploy an ActivePerl on the hosting mashine
12:54 Debolaz berov: It's true that this is sometimes the situation, but you have the same problem with PHP; If they don't have a given plugin installed, you're not getting that plugin no matter what. If the hosting provider don't provide modules for database access (Which are not part of standard perl installations), then you are not going to get database access no matter what you bundle unless you got access to a C compiler.
12:54 Debolaz berov: How does ActivePerl work in this context?
12:54 * Debolaz is unfamiliar with it.
12:55 berov my application uses activeperl interperter instead the /usr/bin/perl
12:55 berov and all modules bundled with ActivePerl
12:56 Debolaz Actually, the solution I described above can be deployed in a similar way.
12:56 berov Actually NO end user will bother to do all this
12:56 berov they just want to unpack and run.
12:56 berov PHP frameworks have all they need usually
12:56 Debolaz You simply download an installer onto your shell, type ./install-perl-app.sh and they get perl and everything.
12:57 Debolaz And all modules needed for their platform assuming its binary supported (Which is the same constraint as activeperl is under)
12:57 sri sherlock is awesome
12:57 Debolaz I think you and me are talking about very similar ideas.
12:58 berov Will see what sherlock is..
12:58 berov sri, an url for sherlock
12:59 berov ?
12:59 berov please
12:59 sri the bbc tv series
12:59 marcus berov: http://www.imdb.com/title/tt1475582/
12:59 berov Thanks, marcus
12:59 marcus Debolaz: in practice, I've never seen any perl apps do well with an installer. I'd love to be proven wrong tho.
13:00 marcus I'd love to be able to ship http://mojomojo.org/ with an installer ;)
13:00 marcus sri: this week's episode so great.
13:00 sri marcus: indeed!
13:00 Debolaz marcus: Ideally, you would use a .deb file or something if you have control of your environment. I'm just giving a solution for the constraints berov mentions here.
13:01 marcus sri: too bad there will only be 3 episodes in this season.
13:01 Debolaz marcus: Or CPAN for that matter.
13:01 marcus Debolaz:sure, we're in debian and in freebsd.
13:01 Debolaz marcus: Remember, it's not a complex application we're talking about here, it's an environment with a common set of modules that gets installed by the installer. The actual web app is bundled in a .par file.
13:01 mire joined #mojo
13:03 berov Bundling Mojolicious and collected Pure-Perl modules solves my problems
13:04 marcus <o/ \o> \o/
13:04 berov every Hosting provider has DBI and DBD::mysql installed
13:04 ki0 joined #mojo
13:04 berov If I need newer perl I deploy ActivePerl in my home box there
13:05 berov and use it that is it
13:05 Debolaz berov: Explaining to users that they need to install activeperl might be a bit of an undertaking though.
13:06 berov Debolaz: agree
13:06 Debolaz berov: Though I agree with the concept of your solution.
13:06 berov I assume the hosting has perl 5.10.1+ + DBI
13:06 Debolaz Which ORM do you use?
13:06 Debolaz If any?
13:06 berov I was speaking for cases where on the hosting is only 5.8.8
13:07 berov Do not use ORM
13:07 berov I use DBIx::Simple + SQL::Abstract
13:07 berov that is enough
13:08 berov imho of course :)
13:08 berov Pure perl again
13:08 Debolaz Well, to each their own. I would need to use an ORM because I don't want to compromise on code elegance. But it wouldn't have to be DBIx::Class.
13:09 marcus I've moved away from ORMs
13:09 berov any Pure-Perl ORM and I will use it
13:09 berov ?
13:09 marcus I realized they aren't helping me with any problems I have
13:09 marcus since I like writing SQL
13:09 berov actually I do the same in most cases
13:09 marcus mostly I fight ORMs to make them effecient enough, and struggle with the mapping to single table rows
13:09 berov actually in work I do PL/SQL :)
13:10 berov and just call procedures from perl
13:10 berov but this is another question :)
13:10 marcus I'm not so machoistic that I work with Oracle
13:10 berov well I need money :)
13:11 berov and my company pays me to use oOracle :)
13:12 Debolaz marcus: I'm more of a hard-core OO kind of guy. I like the idea of interacting with a row as if it were an object. For large applications, it tends to produce cleaner and simpler code. Not to imply your code is crap, but I see you perhaps as having more mental discipline than most programmers.
13:12 Debolaz And I know there will be other programmers that has to maintain my crap after I'm done with it. So I write code to be friendly to others. :)
13:13 marcus Debolaz: often my SQL queries need to pick rows from various tables. And aggregates
13:13 marcus this doesn't map well to DBIC Row objects.
13:13 berov I made for MYDLjE a naive OO mapper...
13:14 marcus Debolaz: nothing inheritly more maintainable about SQL::Abstract compared to SQL, afaict.
13:14 marcus Of course you should abstract your sql into the model, just like you do with complex dbic queries.
13:14 berov but it isactually just an Object persistence
13:14 berov https://github.com/kberov/MYDLjE/​blob/master/perl/lib/MYDLjE/M.pm - the base class
13:14 berov https://github.com/kberov/MYDLjE/bl​ob/master/perl/lib/MYDLjE/M/User.pm a
13:14 Debolaz marcus: If you have perfect knowledge of SQL; Sure. Not going to be the case for many people.
13:15 berov marcus: yes this is that I intended  with MYDLjE::M::*
13:15 marcus Debolaz: Optimized DBIC requires just as much SQL understanding, you just need to understand the perl syntax in addition.
13:16 berov and when SQL needs to be complex I just write it and put it in a file(https://github.com/kberov/MYDLjE/b​lob/master/conf/mysql.queries.sql), then use it in the code - Simple
13:18 berov marcus: Debolaz:  This is how I achiev clean perl code
13:18 marcus Debolaz: I mean something like https://gist.github.com/1582892 - You still need to understand the SQL it generates...
13:18 Debolaz marcus: Not really, most people can make out data structures easier than SQL syntax. Convoluted DBIC queries can be a bit tricky, but they are usually not the typical case in my experience. And when people ask about them, they can typically be explained in a few lines of chat, while the equivalent SQL will not be so easy to convey the meaning of.
13:20 Debolaz marcus: I have no idea how the SQL would look. I can still understand what it does. Granted, I have a lot of experience with DBIx::Class, other people would probably need to ask. But I could explain it to them relatively easily because of the structure the ORM provides.
13:20 Debolaz This is in my opinion the true value of ORMs.
13:20 Debolaz That is not to say it's wrong to use raw SQL for that reason, it's just my preference.
13:21 marcus Debolaz: Well, I have used DBIC more than most, and this is my experience. I'm fine with other people having a different opinion.
13:22 Debolaz marcus: But what I'm saying here is that even though *you* find it easier to just use SQL, when other people get involved in the picture, they most likely will struggle more with hacking on a raw SQL than an ORM based solution.
13:23 marcus Debolaz: I very seldom work alone :)
13:24 marcus Debolaz: SQL, HTML, JS  CSS is common basic requirements for all of our developers.
13:24 marcus Perl, PHP, Objective-C, Ruby, and so on, depends on the project
13:24 Debolaz That having been said, DBIx::Class certainly has several drawbacks in how it's designed. Some forms of joins were just plain impossible until very recently which annoyed the hell out of me since I wanted to use them a lot. I can certainly think of several situations where DBIx::Class would add to complexity rather than remove it.
13:24 Debolaz Which is why I am talking about ORM in general.
13:25 Debolaz marcus: Sure, when you hire someone, you get to put requirements to what they have to know. But in say a free software project, this is not as easy.
13:25 marcus Debolaz: well, I bought into the ORM idea for years, and looking back, I don't think it lives up to it's promise, because table based objects does not really map well to how a lot of sql queries work.
13:25 hshong joined #mojo
13:26 marcus I'm fine with basic functionality for simple updates, deletes, selects tho.
13:26 Debolaz When a new person volunteers to fix something you don't have time for fixing, you may need to explain how to do it to them. Certain approaches will require little explanation, certain approaches will require a lot of explanation.
13:26 berov "marcus: Debolaz: well, I bought into the ORM" agree
13:27 marcus But I'm more likely to pick something like https://metacpan.org/module/DBIx::Sunny or https://metacpan.org/module/DBIx::Simple than DBIC for a new project.
13:27 berov marcus: DBIx::Simple i sjust so OKKKK :)
13:28 Debolaz Like I said, I can certainly agree that DBIC may not be suitable. But the idea of objectifying database-interactions in general isn't a bad one even if DBIx::Class has chosen a bad approach in some situations.
13:28 Debolaz *may not always be suitable
13:31 Debolaz In fact, I do feel that throwing DBIx::Class::Row objects directly into a web apps business logic is a bad idea. Because, exactly like you say, tables simply do not translate very well to objects. Which is why I prefer to use a domain mapper. I still use DBIx::Class behind it, but there's nothing wrong with replacing that with something else.
13:32 marcus sounds like overengineering to me.
13:32 Debolaz Yes and no. For a simple application, it is overengineering.
13:32 Debolaz For a CMS, it's not.
13:33 berov well .. :)  my example MYDLjE::M::User is a wrapper for DBIx::Simple :)
13:34 berov it just simplifyes the DBI interface
13:34 berov and it is needed as an abstraction in a CMS
13:39 Debolaz What I do want, is to generalize my domain mapper approach into a module.
13:44 berov "Debolaz: What I do want"... I would do domain specific classes that use DBIx::Class + SQL::Abstract and embed SQL when needed - nothing more (like i did in the above mentioned )
13:44 berov enoug abstract and enough lite
13:45 berov sri: any ORM recommended for use with  Mojolicious :) ?
13:45 Debolaz berov: The domain classes would not have any SQL-related code in them at all in my approach. Not even DBIx::Class code.
13:46 sri berov: i agree with marcus about ORMs
13:46 berov Debolaz:  oh sorry I ment DBIx::Simple :)
13:47 Debolaz berov: My point is still the same. The object that the web apps business logic gets a hold of has no knowledge of anything SQL at all in it. It's created by the mapper, which fills it with information from the SQL database, and stored by the mapper, retrieving the necessary information from it. It does not know how to do this itself.
13:48 berov sri: so in an Imaginary Mojo-based higher level framework would depend only on DBI and DBD::* ?
13:48 sri you tell me
13:48 Debolaz berov: This is not an ORM approach btw. :)
13:48 r0bert joined #mojo
13:48 marcus berov: I think using ::Simple is a fine approach.
13:49 berov no this is an Object persistence approach :)
13:49 berov If I dare to name it
13:51 berov "sri: you tell me" I even think about bundling DBD::mysqlPP/DBD::PgPP
13:51 Debolaz berov: I would describe your approach as ORMish.
13:52 berov Debolaz: well ok :)
13:52 Debolaz -ish because it's not really an ORM, but it's working on basically the same principle, approaching towards an ORM and will eventually become one if developed further.
13:52 sri i actually hate all sql databases, with and without orm
13:52 berov I do not know, I never used DBIx::Class in a heavy production environment
13:52 Debolaz People tend to reinvent the ORM wheel when they try to avoid using ORMs.
13:53 berov aha :)
13:53 sri in a perfect world we would have databases that understood data structures like redis does for example
13:54 berov sri I actually do not understand all the buzz around nosql DBs
13:54 Debolaz Which is one of the reasons I tend to recommend using premade ORMs, rather than maintaining what will essentially be a more and more complex ORM.
13:55 berov Debolaz:  I am trying to just  store  data of my object i na table row - nothing more
13:55 berov really
13:56 sri http://redis.io/topics/data-types
13:56 sri i want my database to be a global namespace for persistent variables
13:57 berov sorry for asking, but what about transactions in the sense "All or nothing"
13:57 berov and relations ? may be I need to read  more
13:57 sri sadly, redis is only good when your data fits into memory
13:57 berov but I really need those things
13:58 berov a Shop system would need more
14:01 Debolaz sri: What do you think about MongoDB?
14:01 sri Debolaz: i'm writing a pure perl driver for it right now
14:08 netfeed i like sql-databases, but in my perfect world there wouldn't be any joins or unions or the like, you ask one table nicely for one or more rows in that table and that's that :)
14:08 netfeed a fancy key-value database
14:08 Debolaz netfeed: Exactly what NoSQL is all about.
14:09 netfeed that depends, i don't want to start writing MapReduce functions in javascript just to get some data
14:10 netfeed i kinda like the query language from SQL, but don't like joins
14:10 Debolaz One thing I do not like the idea of giving up from SQL databases are complex transactions though.
14:10 sri netfeed: thats mongodb
14:11 netfeed i started writing a system to query "databases" in ruby in a unison way, ended up with a pretty nice way to work on datasets in sql :)
14:12 netfeed sri: i've looked at mongodb, but i've been a bit scared away from horror stories about it, i probably want one or two more major versions of it before i take another look at it
14:13 * Debolaz will in all likelihood stick with SQLite and PostgreSQL for some time to come.
14:13 netfeed same if you scratch sqlite :)
14:14 Debolaz I use SQLite for simple things, because it has almost zero mental overhead, you just use it and it magically is there. For production stuff, I use PostgreSQL.
14:14 amoore joined #mojo
14:16 D4RK-PH0ENiX joined #mojo
14:18 jnap joined #mojo
14:21 sugar_ joined #mojo
14:29 inokenty joined #mojo
14:53 mire joined #mojo
14:56 baton8_ joined #mojo
14:58 tholen42 joined #mojo
15:14 metaperl joined #mojo
15:17 berov so... does anyone imagine how a higher level Mojolicious-based Framework should look like? :)
15:18 Mikey higher level?
15:18 berov like Drupal? like Django-CMS :)?
15:19 berov TYPO3
15:19 berov etc
15:19 Mikey i believe a higher level mojolicious-based framework should be a human
15:19 berov i.e. ?
15:20 sri i'd imagine it to be very minimalistic and pragmatic
15:20 sri a set of plugins that define many hooks for higher level plugins, with good documentation
15:20 berov TYPO3 made FLOW3 just to have a lower level framework :)
15:21 noganex joined #mojo
15:21 berov "sri: a set of plugins that define many hooks" - yes that is why I asked about hooks some time ago :)
15:22 sri the core would be something extremely simple, like a blog, which can then be extended
15:23 sri reduced to the abolute minimal feature set to make it easy to grasp
15:23 berov sri "like a blog" - OK and... :)?
15:23 berov aha agree
15:23 netfeed kinda like wordpress?
15:24 berov no dependencies other than mojo(bundled) and DBI(bundled)
15:24 sri not many templates, but the few that are there would be drop dead gorgeous
15:24 sri mine would be mojo + mongodb
15:24 sri but that's my preference
15:25 berov but it still need to be functional enough to make th eusers addicted
15:25 berov sri: aha ok
15:25 marcus berov: I think it would be nice to use either boostrap or foundation as a basis for such a framework.
15:25 netfeed everyone uses bootstrap these days
15:25 berov marcus: "boostrap or foundation as a basis" please explain
15:25 marcus bootstrap 2.0 will support media queries.
15:26 marcus berov: http://twitter.github.com/bootstrap/
15:26 berov thanks
15:26 marcus or http://foundation.zurb.com/
15:28 berov I included jquery_ui CSS and JS
15:28 berov in MYDLjE
15:29 berov + ElastiCSS
15:29 berov for the layout
15:29 jnap joined #mojo
15:30 marcus why elastiCSS?
15:30 jnap joined #mojo
15:31 berov " marcus: why elastiCSS?" well :)  this is what I found while searching and it had examples
15:32 berov bootstrap looks promising tough :)
15:32 berov I will take further look at it
15:32 jnap_ joined #mojo
15:32 berov to see what it gives me more
15:33 berov is elastiCSS bad :) ?
15:33 berov marcus ?
15:33 purl i heard marcus was pretty sure lisp adoption is being hampered by being named after a speech defect. or http://picasaweb.google.com/olga.r​amberg/Lisboa#5240395957801479314 or a moose farmer?
15:34 marcus berov: I've never heard of it, so I dunno :)
15:34 berov ah wait.
15:34 berov http://elasticss.com/blog/
15:36 marcus berov: I think one of those two I suggested are more mature and featureful
15:36 marcus they work well with jquery as well.
15:37 berov ok will really take a further look, thanks, marcus
15:37 * sri wonders if we should redo the mojobar with bootstrap, dropdown for documentation would be neat
15:38 netfeed i like the jquery-ui plugin that works for bootstrap, makes it look slick
15:38 berov sri, marcus: so bootstrap could come bundled with Mojolicious
15:38 berov ?
15:38 marcus berov: I've been thinking about making a helper plugin for bootstrap that bundles it.
15:38 sri even twitter is using the jquery + prettify + bootstrap combination
15:39 marcus sri: well, twitter did make bootstrap so .. :)
15:39 berov sri: BTW I miss very much a sidebar showing a tree of modules in the PodRenderer
15:39 sri marcus: yes, so they designed it for that combination
15:39 berov will haelp very much navigating
15:39 berov the docs
15:39 purl the docs are very good.. a lot better than some projects
15:40 berov purl: yes, but a sidebar(tree) will make it best
15:40 purl berov: i'm not following you...
15:42 sri you're not supposed to rely on the templates, css and js we bundle
15:42 sri it can be changed at any time
15:42 berov purl: PodRenderer should have a side bar with perl modules tree
15:42 purl berov: i'm not following you...
15:42 sri and purl is a bot
15:42 berov really :)
15:43 sri botsnack!
15:43 purl thanks sri :)
15:43 berov like any file browser as Nautilus and Windows explorer for examle
15:43 berov is that clear enough?
15:44 sri marcus/tempire/crab: thoughts about using bootstrap for a more pretty menu bar?
15:45 berov http://perldoc.perl.org/index-modules-D.html like this or something
15:45 berov to allow me to navigate in the docs
15:46 berov this should be easy enough even for me :D
15:46 berov by using File::Find
15:48 berov " sri: you're not supposed..." I rely on the PodRenderer to show me docs in HTML for the end users
15:48 berov I have some help written in POD
15:48 berov which want to show to End users
16:02 sri guess pulling in bootstrap would be a bit much just for a pull down menu
16:02 sri berov: you're being a bit naive, making an index of all accessible documentation is not that easy
16:03 netfeed bootstrappify all the things!
16:03 berov sri: only the folder where mojolicious is
16:04 berov for example
16:04 berov site/lib
16:04 purl site/lib is where the modules you install are placed.
16:04 berov yes
16:04 marcus sri: I don't even like pulldown menus
16:04 sri /o\
16:04 berov sidebar , cached on the disk
16:04 berov like a static HTML
16:04 sri berov: not gonna happen
16:04 berov built on the first run
16:05 berov "sri: berov: not gonna happen" I like very much when somebody says this :)
16:05 berov makes me ambitious :)
16:05 sri it's a maintenance nightmare
16:11 berov sri: may be
16:13 berov sri: I am busy making money for a living, but will think about a sidebar for mojo, i promise
16:13 berov will offer it then and you deside
16:28 kaare__ joined #mojo
16:28 metaperl|2 joined #mojo
16:43 xaka joined #mojo
16:50 jnap_ joined #mojo
16:58 tholen42 joined #mojo
17:26 kaare__ joined #mojo
17:52 mire joined #mojo
18:31 amoore joined #mojo
18:36 geira joined #mojo
18:42 metaperl|2 joined #mojo
18:45 avkhozov joined #mojo
18:45 grim_fandango joined #mojo
19:02 ccushing joined #mojo
19:27 tempire loves me some bootstrap
19:28 tempire might be nice to have the guides listed in a drop down to emphasize order of intent
19:28 tempire don't know that it's necessary, though
19:29 tempire I wonder if it would cut down on complaints made by not reading docs in the correct order
19:29 sri could make it worse
19:29 sri right now we actually tell them to read it in order
19:30 tempire true enough
19:30 tempire I'd leave it alone.  the benefit isn't obvious enough
19:30 * sri nods
19:30 tempire for mojocasts, for example, the drop down makes the site infinitely more usable.  obvious benefit.
19:32 sri marcus: simpsons episode was great!
19:35 mattastrophe joined #mojo
19:42 d4rkie joined #mojo
20:21 metaperl joined #mojo
20:50 Kovensky joined #mojo
21:07 mattastrophe joined #mojo
21:21 DaTa "favorite part of attending a marathon is watching the reaction of runners who grab my plastic cup of vodka."
21:45 jwang joined #mojo
21:45 xaka sri: interesting situation. if you have code like: my $data = {param1 => $self->param("param1")}; and request has no "param1" parameter, "Odd number of elements in anonymous hash" warning happens. I found that it because "param" sub of Mojo::Parameters goes to "wantarray" branch and returns empty array
21:46 xaka i'm not sure, but may be "param" sub should return ref to array if there is more than one value (i believe it should be expectable by developer who knows what he wants). In that case if there is no value - undef will be returned
21:54 lukep joined #mojo
22:02 nuba joined #mojo
22:45 metaperl joined #mojo
22:53 marcus Sri: yeah!
22:55 marcus Xaka: doing it wrong!
22:55 purl doing it wrong is http://dave.bastardised.net/doingitwrong.jpg or http://adrinael.net/wrong.jpg or http://www.doingitwrong.com/ or http://youtube.com/watch?v=1Ow1kPwImDY or http://www.aftonbladet.se/​nyheter/article8266367.ab
22:55 * marcus goes to bed.
23:15 metaperl joined #mojo
23:31 tempire marcus: I've never thought you were coming across as negative
23:32 * tempire agrees with the movement away from ORMs
23:32 tempire I'd like to see someone port C#'s massive to perl
23:32 tempire it would be easy, only about 500 lines of C#, so it could be made smaller in Perl, I'd bet
23:32 tempire the big thing about it is that you can call subroutines dynamically, which is just normal Perl
23:33 tempire seems like a good mix between embedded sql and unintuitive forcing of data into objects
23:34 tempire I used to looooove DBIC
23:34 tempire but then I realized that I was spending so much time examining the sql it was creating
23:34 tempire made me wonder what the purpose was
23:37 tempire clsql is good too (functional lisp database interface)
23:37 tempire like most things, lisp found the way decades ago
23:45 d4rkie joined #mojo

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