Camelia, the Perl 6 bug

IRC log for #mojo, 2013-03-19

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

All times shown according to UTC.

Time Nick Message
00:02 Averna joined #mojo
00:03 riche yah would like to see them deploy to cloud with xs .. oh yes, please store binaries in svn
00:03 riche sorry in sarcasm mode
00:04 gtodd when clouds != to regular server hardware ..... here we would likely have development servers and mojo running on devs workstations and do checkins to somewhere testing etc. then an official change managed "development checkin" to svn (with comments code review etc.) then to deploy one half of the duplicate production server duo would check out the tag from svn into the live site  ... production server production running
00:04 riche so shortsighted i want to puke
00:04 gtodd (just copying from what people did with java server pages or whatever it was 5-10 years back
00:05 gtodd but translating to perl)
00:05 riche yah great so deploy differently betw dev, qa, prod ... and who knows god else .. shoot, we won't have any surprises in dev, will we
00:05 gtodd misgivings with hypnotoad are only the fact that it doesn't include tempire's animated psychedelic toad graphic
00:05 riche er, prod
00:06 sri riche: please be nice
00:09 riche yeps got it .. btw considering writing plugin for svg rendering.. is this already planned?
00:12 gtodd sorry about the toad comment it's just a very nice graphic :-)
00:13 gtodd riche: would the idea be to svg rendered according to browser support? (convert to png or ...) or set dimensions for screen size or ...
00:16 riche user agent is a major issue for svg.  it would follow support according to w3c spec and rely on compat ... normally I rely on cssshools to cross check that
00:18 riche what i am considering most is how this can be exposed without having large "surprise factor" ... so sometimes its just not prudent to ship
00:19 riche in fact i still havent checked w epiphany ... I could really anger all my debian friends
00:19 riche hmmm more thinking required
00:23 MeierM joined #mojo
00:25 riche I would appreciate (if anyone cares) to respond to my post http://community.activestate.com/node/9602 to back up my case
00:32 shmuel joined #mojo
00:39 Akron joined #mojo
00:40 gtodd richeL I hope the strength with respect to parsing and munging text along with the  coverage in CPAN for file formats like XML/RDF/etc in perl means perl-based solutions will be able to do something like what IFC BIMserver does with building information models .... and do that in other niche industry verticals (where data is often housed in esoteric but open and ISO standardized file formats) for the next 10 years :)  ...
00:45 gtodd riche: are there any nice svg rendering examples out there you'd want to emulate? there's some css/j "libraries" that let you wrap images with CSS and have the browser degrade/fallback to png/gif etc. would you want mojo to detect support from a hash of known useragents and serve appropriate image files itself?
00:45 riche okay, maybe I will just keep it private ... lol ... i am just frustrated w data and the raphael library ...
00:49 riche svg2png is pretty easy ... I can do that backend .. I am more thinking about how to render initial svg w mojo ... and sending changes (to changeable canvas) via ajax
00:50 riche kinda crazy but right now I am generating (data driven) javascript from ep.  it isn't sustainable.  and not readable.
00:52 gtodd wow
00:53 riche yah. .. the things u do for eye candy
00:57 gtodd yeah .. so with svg and html5 support pretty standard (and decent) on phones/tablets/ffox/chrome/opera maybe you want something that can *generate* svg  (from data or user input ...).
00:58 gtodd even though animated gifs rock: http://i118.photobucket.com/albu​ms/o82/GillyWibble/hypnotoad.gif
00:58 gtodd :)
00:59 riche i think i am scarred for life following that link
01:01 gtodd heh  will peruse  http://community.activestate.com/node/9602
01:01 gtodd cheers
01:01 gtodd left #mojo
01:05 gtodd joined #mojo
01:05 gtodd left #mojo
01:08 Akron gtodd: Did you get any reaction from AS?
01:11 Akron I better should read the chat log whenever someone is leaving ...
01:18 jberger joined #mojo
01:19 Akron Bender's alive again?
01:22 ka2u joined #mojo
01:26 hlin joined #mojo
01:28 egopro joined #mojo
01:34 asarch joined #mojo
01:42 d4rkie joined #mojo
01:46 sri hmm, looks like futures are in fashion again judging by developments in the python and javascript communities
01:47 sri wonder how that could work for classes that are blocking/non-blocking hybrids like Mojo::UserAgent
01:48 sri common pattern is $foo->bar(yada => sub {...}) and my $future = $foo->bar('yada')
01:52 xaka joined #mojo
01:54 avenj seems like a fair bit of interest in LeoNerd's Future and stevan's Promises, too
01:55 sri judging by recent commits by stevan, i think we might have lost him to scala
01:58 avenj seems so
01:59 avenj can't really blame him, scala's awfully nice. (but still "feels" immature after all this perling)
02:01 D4RK-PH0ENiX joined #mojo
02:27 riche i just feel too old to learn another language in such detail
02:27 riche mustve been like how cobol programmers felt 20-25y ago
02:50 tempire futures went out of style?
02:50 tempire doesn't seem possible
02:57 crab futures are so yesterday
03:29 rem_lex joined #mojo
04:15 mattastrophe joined #mojo
04:41 preflex_ joined #mojo
04:57 mattastrophe joined #mojo
04:59 freman are these like jqueries deferred? cos they are just confusing...
05:02 ka2u joined #mojo
05:14 anaio joined #mojo
05:16 * tempire hugs sri
05:18 d4rkie joined #mojo
05:30 ver joined #mojo
05:37 basiliscos joined #mojo
06:15 beyondcreed joined #mojo
06:37 yakudza joined #mojo
06:57 Averna joined #mojo
07:03 hesperaux joined #mojo
07:04 Fremean joined #mojo
07:17 dpetrov_ joined #mojo
07:32 Vandal joined #mojo
07:42 dod joined #mojo
07:42 ladnaV joined #mojo
07:48 Fremean hmph, mojolicious-plugin-accesslog is fail :(
08:08 Vandal joined #mojo
08:11 suy joined #mojo
08:17 dod joined #mojo
08:32 egopro joined #mojo
08:33 jamesw joined #mojo
08:33 nelio joined #mojo
08:41 fhelmber_ joined #mojo
08:57 wk joined #mojo
09:04 egopro joined #mojo
09:07 egopro_ joined #mojo
09:11 hrupp joined #mojo
09:19 amirite_ joined #mojo
09:20 egopro joined #mojo
09:20 arthas joined #mojo
09:26 Andreas2 joined #mojo
09:28 maxhq joined #mojo
09:29 Slatibart hi everyone. I'm new to mojolicious but find it very amazing. I'm still have to evolve from CGI.pm style to the modern world
09:29 Slatibart I'm wondering if there are simple crud examples exists ?
09:33 crab joined #mojo
09:34 amirite_ joined #mojo
09:43 suy Slatibart: what do you mean?
09:44 Slatibart Dancer has a simple example which shows how to interact with a database through a simple webform. What you usually call CRUD, create read update delete
09:44 Slatibart That's what I am wondering If something similar exist
09:45 suy OK. I was afraid you meant something like that. The closest I've seen so far (but I'm totally new as well) is this example: https://github.com/tempire/mojoexample
09:46 Slatibart :-)
09:47 Slatibart I saw that but at the moment this is a bit too sophisticated for me
09:48 crab tempire will be disappointed to hear that
09:48 Slatibart well, his mojocast are great
09:49 Slatibart But If you want to upgrade your perl coding from the 5.8 world there is a lot to learn
09:49 crab if you know how to use DBI, there's nothing more than that needed in mojo apps, you know.
09:50 crab in other words, whatever way of interacting with the db you're used to, you can use it in mojo without much effort
09:52 Slatibart True, but was hoping to see how the "new" stuff would be properly used with Mojo. I am come from a world where I did handcraft sql statements. And I know there are now smarter ways in perl. It is not a mojolicious problem of course.
09:53 dabudabu joined #mojo
09:54 crab you may want to look at DBIx::Class
09:54 Slatibart There a lots of way to do stuff in perl. But would love to see more simple examples
09:54 crab (but note that not every prefers that kind of thing. i still write SQL, for example, and you'd have to pry my sql out of my cold dead hands to part me from it. ;)
09:56 Slatibart hehe, right. DBIx seems something cool but big. At least to get it going.
09:57 dotan joined #mojo
10:04 Slatibart is that referecend on the mojo site ? https://github.com/kraih/moj​o/wiki/Example-applications Some more example for me too look at :)
10:05 dabudabu Hello~ Is there a way of using routes to take requests to a clean-up subroutine after a route has been processed and something has been rendered?
10:12 dabudabu Say I've got these routes: http://pastebin.com/TASng2r5
10:13 dabudabu How would I get a request for '/' to call common#test3 after these existing routes are processed?
10:19 Vandal joined #mojo
10:29 bowtie joined #mojo
10:32 nic dabudabu: Sounds like a hook might be what you're looking for
10:33 jpn joined #mojo
10:33 marcus o/
10:38 Britzel_ joined #mojo
10:44 mattastrophe joined #mojo
11:03 nelio joined #mojo
11:06 dabudabu nic: Thanks
11:09 nelio joined #mojo
11:17 egopro joined #mojo
11:26 amirite_ joined #mojo
11:34 amirite_ joined #mojo
11:40 moltar joined #mojo
11:45 amirite_ joined #mojo
11:46 nicolaas joined #mojo
11:46 nicolaas hello, how should i do to render a grid fs file ?
11:53 mire joined #mojo
11:58 amirite_ joined #mojo
12:03 ladnaV joined #mojo
12:07 shmuel joined #mojo
12:11 Fremean Would the mojo project be interested in init scripts for various platforms (eg: I'm about to write a gentoo one, I also have a centos one)
12:19 Vandal joined #mojo
12:30 SmokeMachine joined #mojo
12:34 marty nicolaas:  afaik, mango does not yet support gridfs
12:35 marty but you can store binary files (under 16mb) with the bson_bin data type
13:13 gryphon joined #mojo
13:18 bluescreen joined #mojo
13:25 maxhq joined #mojo
13:33 ladnaV joined #mojo
13:37 Slatibart Q: When I process a route, let's say '/view' , can I decide there to go to '/' . If yes, how could I call '/' correctly ?
13:38 coff Slatibart: depending on what you want to achieve (and me understanding the question correctly), you could use redirect_to('/');
13:39 amirite__ joined #mojo
13:39 Slatibart ah, so $self->redirect_to('/'); ?
13:45 coff Slatibart: Yeah, depending on how you have structured your app. Try and see what happens. :)
13:45 crab Fremean: init scripts for what?
13:45 crab Slatibart: do you know what an "internal redirect" is?
13:46 Slatibart coff: thanks , that did the trick    return $self->redirect_to('/');
13:46 crab if so, is that what you were looking for? if so: mojo doesn't do them. either issue a redirect_to(...) as you did, or structure things so you can call the sub that does whatever you want.
13:46 coff Slatibart: np. Glad to help.
13:51 mattastrophe joined #mojo
13:56 Vandal joined #mojo
13:57 mire joined #mojo
14:00 mattastrophe joined #mojo
14:00 amirite__ hmm
14:01 amirite__ i wonder why i have three instances of myself
14:01 coff Cloning worked?
14:01 coff The question is; whick of them would you sodomize then kill, and which would you just kill?
14:01 coff *which
14:06 Slatibart Q: in CGI.pm I can do submit(-name=>'button_name',-value=>'value'). But how can I generate a name field with %= submit_button 'value'. In the doc there is an option for an id field but not for name ?
14:09 coff just do %= submit_button 'Label', id=>'foo', name=>'bar', faz => 'fez'
14:09 coff Or something similar?
14:09 coff I'm a bit fuzzy on the syntax atm.
14:10 nicolaas marty: ok thanks .. i tried some work arounds but it doesn't seem to be working
14:14 Slatibart coff: working. Thx. It is just not an example at http://search.cpan.org/~sri/Mojolicious-3.91/lib​/Mojolicious/Plugin/TagHelpers.pm#submit_button
14:15 inokenty joined #mojo
14:15 baton8 joined #mojo
14:20 btyler joined #mojo
14:25 ryozi joined #mojo
14:27 dod joined #mojo
14:31 coff Slatibart: Not everything will be an example. One of the pleasures I've had with mojo is fiddling around and finding out how it works.
14:31 coff The doc is great, up to a point. :)
14:31 SmokeMachine joined #mojo
14:32 Slatibart coff: fair enough ,but always room for improvement :) So far it is one of the better documentation I had to fiddle with
14:33 coff Indeed it is.
14:35 sri mongodb 2.4 is out, with fulltext search \o/
14:39 * sri really needs to finish support for parallel connections in mango
14:39 coff sri: With performance matching other projects with fulltext search?
14:40 sri http://blog.mongodb.org/post/45​754637343/mongodb-2-4-released
14:41 sri geojson looks interesting too
14:43 sh4 joined #mojo
14:46 sh4 joined #mojo
15:01 newbie joined #mojo
15:08 xaka joined #mojo
15:10 marty_ joined #mojo
15:13 marty joined #mojo
15:18 marty joined #mojo
15:18 Molaf__ joined #mojo
15:20 SmokeMachine joined #mojo
15:38 mattastrophe joined #mojo
15:42 btyler joined #mojo
15:54 chinaXing joined #mojo
16:02 mattastrophe joined #mojo
16:12 marty yeh! mongodb fulltext search.
16:16 marty I wonder if fulltext search will be faster than a regex search.  ie...  {'$regex' => '.*' . $value . '.*', '$options' => 'i'}
16:19 crab what's the point, if it isn't?
16:23 sri marty: it depends i assume
16:23 sri if you have a normal index on the field and anchor the regex with ^, it should be very similar
16:25 sri regexes are optimized with normal indexes in some cases, but of course you have to know them, full-text is much more powerful and predictable
16:25 marty either way, the syntax is a little nicer to look at I suppose.
16:25 sri http://docs.mongodb.org/manu​al/applications/text-search/
16:26 sri http://docs.mongodb.org/manu​al/tutorial/search-for-text/
16:28 marty ahhh, ok.  Thanks for that link, sri.   Makes sense now.  You can index an arbitrary number of fields then do a text search on the index.
16:30 marty oooo, you can even filter with conditions.  handy
16:30 sri text might be a candidate for a new class
16:30 * marty nods
16:30 marty still beta
16:31 sri $collection->text('foo and bar')->language('german')->limit(2)->all
16:31 basiliscos joined #mojo
16:31 sri then again... there is only one reply
16:32 sri the 16mb limit applies again, like with aggregate
16:33 marty $collection->text('foo and bar')->language('german')->filter({baz => 'boo'});
16:33 sri of course, you can limit the results to _id fields and fetch the actual documents yourself
16:34 marty ya, that would probably be the smart choice unless you know your results were going to be small
16:34 sri when do you need huge documents in search results anyway, i assume everyone will use "project"
16:35 sri to get maybe _id and title or so
16:35 basiliscos joined #mojo
16:35 marty Also nice that you get score and stats returned.
16:37 mire joined #mojo
16:39 sri https://github.com/promises-aplus/promises-spec # javascript folks seem to have a spec for futures/promises now
16:40 dod joined #mojo
16:41 sri i have a feeling there could be a huge divide in the node.js community soon
16:42 sri core node.js is anti promises, and the authors of major frameworks like express.js, mongoose and socket.io are pro promises
16:43 amirite_ joined #mojo
16:45 dod joined #mojo
16:45 maxhq1 joined #mojo
16:48 dlyke joined #mojo
16:52 malikai is there a mojo equivalent to node's proccess.exit()?
16:52 malikai die seems to get pretty weird
16:57 amirite__ joined #mojo
16:58 marty hmm, so it seems like the power of promises is the chaining ability with 'then'.   sounds reasonable.   I can't wait until I get done with my project so I can play with all the fun new stuff.
17:02 chinaXing left #mojo
17:03 dabudabu joined #mojo
17:03 chinaXing joined #mojo
17:03 chinaXing left #mojo
17:04 edenc joined #mojo
17:16 amirite_ joined #mojo
17:27 sri marty: kinda, promises kinda suck without generators/coroutines
17:27 sri s/kinda//
17:27 sri they are only more verbose versions of the old callback pattern without
17:28 sri https://www.dropbox.com/s/xk​nbe58zcvjhzhv/PyCon2013.pptx # towards the end is an example for how composable generators can be used to make a promise based non-blocking api look blocking
17:28 sri the code block with the @coroutine decorator
17:30 sri http://pastie.org/6629555
17:39 TitanOfOld joined #mojo
17:49 btyler joined #mojo
17:56 dlyke joined #mojo
18:05 nelio joined #mojo
18:33 yakudza joined #mojo
18:38 wk joined #mojo
19:05 labrown joined #mojo
19:11 Grrrr joined #mojo
19:13 amirite_ joined #mojo
19:26 btyler joined #mojo
19:41 d4rkie joined #mojo
19:42 basiliscos joined #mojo
19:55 btyler_ joined #mojo
20:00 * sri thinks he knows how to implement Mango::GridFS now
20:00 anewkirk yessss
20:01 anewkirk do it
20:05 sri my $file = $db->gridfs('foo.txt'); $file->write($_) for 1 .. 10000; while (my $chunk = $file->read(1024)) { say $chunk }
20:05 sri something simple like that
20:05 sri no file handle bullshit like the official driver
20:06 sri just a basic api, similar to the ruby driver
20:06 marcus The File Handle is a lie?
20:06 sri but the cake is real
20:06 * sri goes to get some cake
20:07 amirite_ joined #mojo
20:08 sri i suppose $file->close would be required too if you're writing a new file
20:08 sri to make it work non-blocking
20:12 sri node.js driver does $file->write($chunk, {close => 1})
20:12 sri not as elegant, but you're saving a roundtrip
20:13 sri maybe $file->finish($chunk) or so would be more elegant, similar to how mojolicious handles chunked streams
20:13 sri $file->write($chunk)->writ​e($chunk)->finish($chunk)
20:15 sri actually, the node.js driver has $file->close too
20:15 amirite__ joined #mojo
20:15 sri yea, i think i have a design :)
20:16 anewkirk yes, I agree with everything said since my last remark
20:16 sri my $writer = $db->gridfs('foo.txt', 'w'); $writer->write($chunk); $writer->close;
20:17 sri my $reader = $db->gridfs('foo.txt', 'r'); while (my $chunk = $reader->read) { say $_ }
20:18 sri and the usual, append a callback to make it non-blocking for ->read/close/write
20:20 sri oh right $reader->seek() should also be available
20:21 sri (and attributes for meta data like mime type... but that's not as important)
20:21 amirite_ joined #mojo
20:26 mire joined #mojo
20:31 dpetrov_ joined #mojo
20:36 lukep joined #mojo
21:09 mugenken joined #mojo
21:11 xaka joined #mojo
21:24 perlite joined #mojo
22:06 TitanOfOld joined #mojo
22:36 ka2u joined #mojo
22:56 sri wow, fat arrow functions in javascript look pretty damn sweet
22:57 Meiermann joined #mojo
22:57 sri [1, 2, 3, 4, 5].map(x => x * x); //[1, 4, 9, 16, 25]
22:57 Adura joined #mojo
22:58 sri they've just been added to spidermonkey
23:20 al joined #mojo
23:29 xaka joined #mojo

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