The web in a box - a next generation web framework for the Perl programming language

IRC log for #mojo, 2013-12-04

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

All times shown according to UTC.

Time Nick Message
00:31 tianon joined #mojo
00:38 Bender joined #mojo
00:42 meshl joined #mojo
00:46 AdmWiggin joined #mojo
00:52 dvinciguerra joined #mojo
01:03 laouji joined #mojo
01:07 davido joined #mojo
01:40 d4rkie joined #mojo
01:41 ka2u joined #mojo
01:51 russum joined #mojo
01:54 russum left #mojo
01:58 russum joined #mojo
01:58 russum left #mojo
02:15 athenot joined #mojo
02:24 maxhq joined #mojo
02:40 laouji_ joined #mojo
02:52 good_news_everyone joined #mojo
02:52 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/jgknqA
02:52 good_news_everyone mojo/master 490e48b Sebastian Riedel: added support for the X-CSRF-Token request header
02:52 good_news_everyone left #mojo
02:58 laouji joined #mojo
03:02 good_news_everyone joined #mojo
03:02 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/Diw3Kw
03:02 good_news_everyone mojo/master 59ca3a4 Sebastian Riedel: a few more CSRF tests
03:02 good_news_everyone left #mojo
03:17 beyondcreed joined #mojo
03:19 robinsmidsrod joined #mojo
03:27 athenot joined #mojo
03:33 asarch joined #mojo
04:08 laouji joined #mojo
04:14 noahasm joined #mojo
04:29 preflex_ joined #mojo
05:07 ka2u joined #mojo
05:17 d4rkie joined #mojo
05:21 laouji joined #mojo
05:22 laouji joined #mojo
05:27 laouji_ joined #mojo
06:01 noahasm joined #mojo
06:21 Vandal joined #mojo
07:24 denisboyun joined #mojo
07:45 bzero joined #mojo
07:51 basiliscos joined #mojo
07:55 preflex joined #mojo
07:58 rem_lex joined #mojo
08:42 laouji joined #mojo
08:54 laouji_ joined #mojo
09:01 alnewkirk joined #mojo
09:02 themage joined #mojo
09:07 laouji joined #mojo
09:20 dotan joined #mojo
09:31 abra joined #mojo
09:36 Lucas1 joined #mojo
09:42 hummeleBop joined #mojo
09:58 laouji joined #mojo
10:01 nicolaas joined #mojo
10:13 fhelmber_ joined #mojo
10:19 laouji joined #mojo
10:20 womble joined #mojo
10:24 denisboyun joined #mojo
10:26 womble @crab: did you ever implement a nice solution to your multi-user tail -f problem? (http://irclog.perlgeek.de/mojo/2011-06-13#i_3913700).. if I'm gone when you see this I'll check the channel log
10:29 womble i know the answer is there from sri, I'm just too stupid to implement it myself :/
10:38 mire_ joined #mojo
10:49 punter joined #mojo
11:01 womble Can anyone explain why this warning exists for Mojo::IOLoop::ForkCall - https://github.com/jberger/Mojo-IOLoop-ForkCall#warnings - but there is no equivalent for Mojo::IOLoop::ReadWriteFork
11:01 womble forgive me if this is a naive question
11:05 maxhq joined #mojo
11:09 D4RK-PH0ENiX joined #mojo
11:17 d4rkie joined #mojo
11:17 denisboyun joined #mojo
11:24 crab womble: yes, i did. http://toroid.org/ams/etc/mojolicious-http-streaming
11:26 ver joined #mojo
11:29 nic crab++
11:32 hrupp joined #mojo
11:32 d4rkie joined #mojo
11:33 womble crab: fantastic, thank you.
11:33 bpmedley joined #mojo
11:34 * nic hopes someone will publish a websocket version
11:34 * womble heartily agrees
11:36 crab i wish it were easier to reuse/extend the built-in taghelpers
11:36 crab a websocket version? hum, i could do that
11:37 nic woohoo!
11:37 crab isn't it kinda trivial? like a hello world for wesockets?
11:37 womble I almost asked if you could foresee any non-blindingly obvious complications... but chickened out
11:37 crab s/we/web/
11:38 ryozi joined #mojo
11:38 womble Don't ask me. Me stupid.
11:44 crab me too.
11:45 cfedde joined #mojo
11:48 womble Mojolicious makes it dangerously easy to write crapplications
11:51 crab writing non-crapplications will always be harder than writing crapplications
11:53 womble the barrier of entry is too low to deter simpletons (e.g. me)
11:54 crab patches welcome ;-)
11:59 womble Do you have it on github?
12:00 womble I'm tempted to tamper with it
12:00 womble it would be good to have the option to tail from the start
12:00 athenot joined #mojo
12:00 womble and use it to tail a log file written to by code in Mojo::IOLoop::ForkCall
12:01 crab what is "it"?
12:01 purl "it" is dbix-class.org?
12:02 crab oh, my tail thingy? no, it's not on github.
12:02 womble the code in your blog post
12:05 womble joined #mojo
12:09 meshl joined #mojo
12:21 groundnuty hey, I', trying to use test::mojo. based on https://github.com/kraih/mojo/blob/master/t/mojolicious/charset_lite_app.t
12:22 groundnuty it is supposed to create a real web serer which then is tested
12:22 groundnuty I tried to add 'sleep 100;' to the end of the file in order to experience the existance of the server
12:23 groundnuty not sure how to access it
12:25 nicolaas joined #mojo
12:27 dvinciguerra joined #mojo
12:30 womble What is the current equivalent of Mojo::IOLoop->drop from 2011?
12:30 womble ->stop?
12:30 purl ->stop is probably the method used to indicate to the server that it should begin to stop
12:31 womble or ->remove?
12:38 dotan yaarau
12:55 denisboyun joined #mojo
13:01 crab remove
13:05 jaiballistic joined #mojo
13:08 dotan groundnuty: Test::Mojo changes the port its web server runs on with each request, so you can't really experience the server from outside the test script.
13:08 dotan exit
13:09 dotan ... I really should pay attention to which window I'm typing in :(
13:19 jovial_chat yeah also learn what ^D does ;)
13:25 batman sri: would you take a patch for starting hypnotoad with a application class instead of script path?
13:25 arthas joined #mojo
13:27 crab why?
13:27 D4RK-PH0ENiX joined #mojo
13:27 batman one file less to maintain
13:27 marcus batman: I thought that couldn't work because of the restarter
13:28 batman marcus: i don't see how that's related...
13:28 batman you start hypnotoad using a fork+exec
13:29 batman and then you load the application.
13:30 [1]womble joined #mojo
13:31 sri batman: nope, i wouldn't
13:31 batman ok.
13:31 asarch joined #mojo
13:32 sri crab: how could reusing tag helpers be easier?
13:33 moritz with magic!
13:34 crab sri: i don't think there's any reasonable way
13:34 sri dotan: that't not quite correct, it only changes the port if the server needs to be restarted, and you can find out the port through the user agent
13:35 sri http://mojolicio.us/perldoc/Mojo/UserAgent#server
13:42 nicolaas hello .. do the render json method encodes the data in a specific charset ? can I disable it ?
13:44 crab json is specified to be in utf-8. if you disable it, it won't be json.
13:45 chansen It's not specified to be in UTF-8, it can be in any Unicode encoding, UTF-32{BE,LE} UTF-16{BE,LE} and UTF-8
13:45 nicolaas mh yes but I have an accent problem, as my data is already stored as utf8
13:45 nicolaas so I have a double encoding
13:48 nicolaas how can I solve this ?
13:49 crab chansen: you're right. utf-8 is just the "default encoding". i guess i forgot. sorry.
13:50 crab nicolaas: are you really sure your data is already stored as utf-8? where's the data coming from?
13:51 jberger_ joined #mojo
13:51 nicolaas I store data in MongoDB so yes, I'm quite sure it's already encoded
13:52 jberger_ womble: it probably should have such a warning
13:52 jberger_ I was porting from ae::util which has such a warning
13:53 jberger_ And also in porting I tripped on it a few times
13:53 * sri is quite sure nicolaas misunderstands encoding in perl
13:53 * nicolaas deserves an explanation
13:53 jberger_ As far as tail goes, I expect that readwritefork will be better suited
13:54 * sri deserves a beer
13:54 jberger_ ForkCall only communicates back to the parent when the child is complete
13:54 * nicolaas deal
13:54 * jberger_ hands sri a beer
13:55 jberger_ Eww it's probably warm
13:55 nicolaas c'mon, tell me how to get out of my accents war
13:55 nicolaas please
13:57 nicolaas it's a nightmare
13:58 nicolaas I thought I could just tell the render json function not to re-encode my values
13:58 nicolaas but I guess I was dreaming in my nightmare, so I would be like in Inception, which could be fun, but is not
13:59 jberger_ nicolaas: minimal example?
13:59 purl somebody said minimal example was just there to show you how auth works without other stuff getting in the way
14:01 chansen crab: no worries =)
14:02 nicolaas jberger ok will try to show something
14:02 nicolaas actually, this data will come out from a postgresql db
14:02 sri mongodb stores and returns characters for perl strings, not bytes
14:03 jberger_ already expects that that is the problem
14:03 rhaen ho.
14:03 sri Mojo::JSON works with characters, not bytes
14:03 sri so, if you understood encoding, there wouldn't be any problem
14:04 nicolaas okay
14:04 nicolaas but I don't
14:04 nicolaas so far
14:04 jovial_chat nicolaas: if you're getting weird characters out
14:05 jovial_chat it's because you're getting weird characters in
14:05 nicolaas jovial_chat ok
14:05 jovial_chat you're looking at the wrong end to fix your encoding
14:05 nicolaas jovial_chat ok will try to fix the good part then, thanks
14:06 womble jberger: I'm not really familiar with event loop concepts so the warning in ForkCall confused me. Can you explain in more basic terms what would happen if a child triggered an event in the parent? Does "event" mean event loop event?
14:06 sri with a little luck everything in your mongodb is double encoded
14:07 womble crab: I managed to get your code working with WebSockets, well chuffed!
14:08 jberger_ womble it has to do with how the loop watches for events
14:09 mire_ joined #mojo
14:09 womble jberger: reason I am asking this is I was thinking, can the child periodically send some signal to the parent to indicate progress of the long running task
14:10 womble in that context, would that "signal" be an "event", or does it just mean event loop event
14:10 jberger_ signal might be safe
14:10 jberger_ The warning means directly cause an event
14:11 jberger_ I guess the warning could be more clear
14:11 womble are you talking signal as in signal(3C)/signal.h?
14:11 womble i was using it as a generic term
14:12 jberger_ Communication via any ipc should be safe
14:12 crab womble: congratulations, how about a gist?
14:12 jberger_ It's attempting to communicate via the forked loop that is the problem
14:13 sh4 joined #mojo
14:14 womble ok.. what also confused me was the fact that ReadWriteFork appears to constantly communicate back and forth, I thought that communication in ReadWriteFork might be defined as an event in the terminology used by ForkCall
14:14 womble crab: I'll see if I can present something useful
14:20 womble next step is to integrate large files with streamtable.js http://blog.joshsoftware.com/2013/04/23/streamtable-js-the-next-generation-search-filter/
14:22 laouji joined #mojo
14:22 jberger_ basically you can't prevent the loop from forking into the child, but you shouldn't use it, that is really the warning
14:24 jberger_ sri: io watchers are harder to grok than timers for uv record
14:25 jberger_ *reactor
14:26 gryphon joined #mojo
14:28 jberger_ womble, batman in rwfork is the child side ipc blocking?
14:36 batman jberger_: don't get the question
14:37 jberger_ Probably easier for me to just look at the code
14:37 batman ah!
14:37 batman it's supposed to flush to parent
14:37 batman it's not line-by-line
14:38 batman that would make it suck big time, since i'm using it to talk to telnet and ssh in the child :)
14:41 good_news_everyone joined #mojo
14:41 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/zJmFBw
14:41 good_news_everyone mojo/master 37a1c8d Sebastian Riedel: more CSRF protection tests
14:41 good_news_everyone left #mojo
14:42 gryphon_ joined #mojo
14:43 gryphon__ joined #mojo
14:44 batman jberger_: ^^^
14:44 good_news_everyone joined #mojo
14:44 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/TscEVQ
14:44 good_news_everyone mojo/master 230d86f Sebastian Riedel: test missing form as well
14:44 good_news_everyone left #mojo
14:45 jaiballistic joined #mojo
14:45 jberger_ batman, oh the child just communicates via its std* handles
14:45 batman is there any other way..?
14:46 jberger_ forkcall doesn't
14:47 batman no, but you're running perl
14:47 jberger_ womble, so no, rwfork needs no such warning
14:47 batman which warning? the don't do ioloop warning?
14:47 womble jberger_: I will have to read all the above many times before it makes sense
14:48 jberger_ As batman just said, forkcall can run Perl code so the warning is necessary
14:48 * batman is confused
14:48 batman do i need the warning or not?
14:48 jberger_ batman no
14:48 batman i do need the warning. rwfork can also run perl code.
14:49 jberger_ I forgot that rwfork only executes an external policies
14:49 jberger_ Process
14:49 batman that's wrong
14:49 purl batman is channeling thoth!
14:49 jberger_ Darn swipe type
14:49 batman rwfork CAN also execute perl code
14:49 * jberger_ might need to read again
14:49 sri wow, libuv lost it's biggest contributor
14:50 jberger_ Over the pronoun thing
14:50 batman rwfork live under this rule as well: https://metacpan.org/pod/release/JBERGER/Mojo-IOLoop-ForkCall-0.01/README.pod#WARNINGS
14:50 sri yea
14:50 * batman have no idea what the questions is.
14:50 batman ...about rwfork
14:51 Adurah_ Wonder if EV has any offending pronouns...
14:51 sri his explanation is exactly what i expected https://github.com/joyent/libuv/pull/1015#issuecomment-29568172
14:51 jberger_ Ha
14:51 sri seriously, these american witchhunts are scary
14:52 batman womble: sending a signal (like TTIN or whatever) to the parent would be pretty much insane from both ForkCall and ReadWriteFork
14:53 batman womble: if you want to send status updates to the parent, you should probably use ReadWriteFork or send status updates through another channel (file, redis, ...) instead of kill(getppid)
14:53 batman insane = my opinion (but it think it's correct)
14:54 womble batman: Sorry, I didn't mean signal as in SIGKILL/SIGQUIT... I just meant passing some data to the parent from the child
14:54 batman you can't communicate IOLoop events from a child process to a parent process. that's the whole point of an IOLoop: do many things in ONE process (not many)
14:54 womble it's the "file, redis, ..." stuff I was interested in :)
14:55 batman womble: right. if you want, you can print STDOUT "progress..."; with Mojo::IOLoop::ReadWriteFork
14:55 batman let's say you're doing "rsync" backup, then ReadWriteFork can read the progressbar directly.
14:55 batman though these things should not really be done in a mojo worker, since it probably takes tooooooo long
14:55 batman then you need an external queue system.
14:56 womble the application I have in mind is "NOC" to run shell scripts, external commands etc from a central location
14:56 womble my plan was to use Resque
14:56 batman ForkCall is created for stuff that takes...uhm...let's say five seconds. five seconds is toooo long for an IOLoop, but not for a web request
14:56 batman NOC?
14:56 purl NOC is Network Operation Center
14:56 batman purl: sure?
14:56 purl But are you sure you're sure?
14:56 womble with workers picking jobs, updating the controller with status of the job etc
14:57 womble i would feed the bot if I could remember how from the logs
14:57 womble it got it right
14:57 jberger_ batman I see it now, yes you would need that warning
14:57 batman jberger_: except i don't care as much as you.
14:57 dotan sri: thanks for pointing that out. I should fix this test sometime: https://github.com/dotandimet/hadashot/blob/master/t/03-feed-find.t#L20
14:57 batman i would take a pull request though :)
14:58 womble at higher level I am a sysadmin bored of bouncing application stacks all over the shop. An Oracle application might have 15 sub components that need to be operated on in a given sequence
14:58 batman womble: ok. so the problem you're solving is using Mojo::IOLoop but is not triggered from a webserver?
14:58 womble i am basically storing that sequence in a database, along with definitions of how you start/stop/status stuff (custom Perl modules), and I want the Resque workers to do the work
14:59 womble with the controller managing the ordering etc
14:59 batman womble: looked at Ubic..?
14:59 * womble googles
14:59 crab sri: and the blog post from joyent smugly saying "it's sad he chose to leave" or whatever is a bit stomach-turning too
14:59 batman womble: https://metacpan.org/release/Ubic
15:00 jberger_ Ok time for $work
15:00 batman womble: sorry, i don't have much time. got a dealine to meet :(
15:00 batman womble: good luck. don't worry too much about the details. just make sure you can worry about them later :)
15:00 marcus crab: agree
15:00 womble batman: many thanks, I'm well on the way there with my current code
15:00 jberger_ will read read the logs as usual
15:01 jberger_ o/
15:01 batman womble: sweet! then you should probably not look at Ubic.
15:01 batman i was thinking you needed process control system with logic, and didn't know where to start
15:01 crab my gh0d, ubic seems huge and monstrous
15:02 batman crab: it's pretty sweet actually
15:02 batman crab: but there are things which could be solved more easily.
15:02 womble No I've got a Perl wrapper around all the external commands that need to be run, using IPC::Run (if that's what you meant)
15:02 womble with ssh
15:03 batman ok. if you want to run many scripts at once, then you can use Mojo::IOLoop::ReadWriteFork instead of IPC::Run
15:03 batman s/scripts/ssh/
15:03 batman you will receive events from the objects when STDOUT/ERR comes from the ssh process and you can write data to it
15:03 batman data = commands, username, password, ...
15:04 womble like Expect?
15:04 batman not quite. you need to implement the Expect part yourself on top
15:05 batman you just get the "read" event, and then you need to handle the buffer yourself
15:05 batman https://metacpan.org/pod/Mojo::IOLoop::ReadWriteFork#Standalone
15:06 batman crap. i forget to work.....
15:06 womble no worries. thanks agian
15:06 womble 2am in my timezone :/
15:06 womble i forget to sleep
15:06 batman 4pm here
15:10 btyler joined #mojo
15:10 crab i forgot what i'm doing
15:10 batman :D
15:13 meshl joined #mojo
15:27 crab hm. i found a helper in some old code. let me explain what it does. then maybe someone can tell me if there's a better way to do it.
15:29 crab it's named widget. it's like include, but it takes an optional begin...end block as the last argument.
15:30 crab in the widget-included template stash('content') is the contents of the begin...end block, or empty.
15:31 crab (this is used to, e.g. generate a search form that's an input in most place, but on some pages you need an extra checkbox or two next to the input, or some such.)
15:33 crab hm. i don't see an obvious way to replace or get rid of it.
15:34 nicolaas sri my utf8 problem came from the DBD Pg driver, I had to set it up to : $db->dbh->{pg_enable_utf8} = 1;
15:35 crab nicolaas: that was exactly the reason why i asked where the data was coming from.
15:35 crab if you'd said postgres, i'd have told you about pg_enable_utf8.
15:35 crab but you said mongo, so i thought it was something else.
15:36 marcus batman: going to Oslo.pm today?
15:36 crab no alternate suggestions? ok, i guess my widget helper can stay.
15:36 nicolaas crab, you're right, I was about to post my example from postgre, as I announced, but I found the bug
15:38 jaiballistic joined #mojo
15:40 batman marcus: no. got a deadline :/
15:41 marcus "I love deadlines. I like the whooshing sound they make as they fly by." -- Douglas Adams
15:53 * sri sets the deadline for csrf protection for today
15:55 marcus woosh
15:55 crab oh, ok. guess i'd better stop working on it then.
15:55 good_news_everyone joined #mojo
15:55 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/n8-o2w
15:55 good_news_everyone mojo/master a82a5be Sebastian Riedel: token may not be available
15:55 good_news_everyone left #mojo
16:00 sri but seriously, if nobody has any objections it will get released soon
16:02 nicolaas crab thanks for your help anyway !
16:02 stephan48 is it still optin?
16:04 denis_boyun joined #mojo
16:08 tianon yes, but that might change in 5.0
16:09 sri to sum it up https://github.com/kraih/mojo/compare/de229a5ae6754cbdd7e57ca0be1339d327889fe2...a82a5be32be6775d6c98d946ba7edb9c62905c22
16:12 dod joined #mojo
16:13 athenot joined #mojo
16:13 groundnuty in advance I apologize if its a dum question... : having a class use Mojo::Base -base; with has var => 10 ;
16:13 groundnuty I try to asign value to var in method; $self->var = 11 ;
16:14 groundnuty I get Can't modify non-lvalue subroutine call at
16:14 sri where in the documentation did you see that?
16:15 groundnuty I havent seen an example of asingning object value in method nowhere in doc
16:15 groundnuty so I tried what might work
16:21 groundnuty sri: I'm trying to find any assigment of object variable in Mojo source
16:21 groundnuty apart form when then object is created with new
16:24 tianon there's a great big example of using Mojo::Base with lots of assignments at http://mojolicio.us/perldoc/Mojo/Base
16:24 tianon for example:   say $mew->mice(3)->birds(4)->mice;
16:24 groundnuty tianon: I read that 3 times
16:25 groundnuty tianon: ok, so mice(3) sets variable to 3? :O
16:26 sri you might want to get yourself a copy of the modern perl book
16:27 tianon <3 modern perl
16:27 tianon isn't it still freely available as PDF and ePub?
16:27 sri it is http://onyxneon.com/books/modern_perl/
16:27 groundnuty I tried to write something simpel without spending few days on perl, kinda almost finished :)
16:27 groundnuty tho from time to time I get myslef into such trivialthings
16:28 tianon sri: :o I forgot he got them up as HTML too <3
16:29 rem_lex|pivo joined #mojo
16:34 asarch joined #mojo
16:43 batman anyone who has done long polling in ie? any pointers?
16:44 dod joined #mojo
16:44 batman also, what can long polling be called? i'm asking google for help... "javascript iframe streaming internet explorer" kinf of searches
16:51 stephan48 sounds good, aslong as there is a optout :)
16:54 stephan48 thanks for the link
16:58 crab i haven't done long polling in IE, only streaming iframe
16:58 crab that works fine
16:59 crab is there any reason to not save a ref to an already-defined helper and call it from inside the redefined helper?
17:00 sri haha, text/plain forms are funky http://pentestmonkey.net/blog/csrf-xml-post-request
17:01 crab wow
17:03 batman crab: using jquery plugin or plain js?
17:04 batman streaming iframe is good enough for me. i just don't know where to find the code/examples/what-ever
17:05 crab batman: http://toroid.org/ams/etc/mojolicious-http-streaming
17:06 batman aaaaaaaaaaaaaaaaaaah!!!!!
17:06 batman of course :D
17:06 batman thanks a million. that's just too easy.
17:06 crab you're welcome.
17:06 sri ie10 does websockets btw.
17:07 crab yes, and even ie9 might do eventsource (but not sure)
17:08 crab but this streaming iframe thing works really surprisingly well across a very wide range of browsers, grotty hack though it is
17:08 sri don't think any ie version does eventsource
17:08 sri ms was not very keen on that
17:08 crab oh ok, i must be misremembering
17:09 batman sri: got ie8.
17:10 sri godspeed!
17:10 purl rumour has it godspeed is about darkuncle's favorite though. or about a punk bike messenger speedfreak in SF, at http://www.amazon.com/exec/obidos/tg/detail/-/0312286805/qid=1030569969/sr=8-1/ref=sr_8_1/102-9558966-3182555?v=glance&amp;s=books&amp;n=507846 and by (: lynn breedlove) or a track by BT (the Hybrid remix is exceptional) or short for Godspeed You! Black Emperor
17:10 crab grotty hack it is, then. i know it works with ie8, had to support that in production.
17:11 crab once you write the code and get it working, you can have a shower and purge your memories
17:11 batman hahaha
17:11 batman this sould work in nn 4 :)
17:12 crab if you can confirm that, i'll update my web page ;-)
17:15 bowtie_ joined #mojo
17:15 batman haha
17:22 fhelmbe__ joined #mojo
17:33 webart joined #mojo
17:48 royskatt joined #mojo
17:49 beyondcreed joined #mojo
17:52 royskatt Hello all, i posted today a problem on stackoverflow (http://stackoverflow.com/questions/20372388/beginner-problems-with-mojolicious-routes). It is about an appently simple problem about routing, though, no one could give me an anwer on that until. Could maybe one of you have a look at it?
17:54 jovial_chat royskatt: you don't have a template to render
17:54 jovial_chat so it's not matching
17:54 jovial_chat the error is not very nice, but that is the cause
17:54 moritz royskatt: it seems lik ethere are leading whitspaces in that script
17:54 moritz royskatt: which prevent __DATA__ and the @@ clock.html.ep lines from being properly recognized
17:54 moritz royskatt: you must strip those leading whitspaces
17:55 jovial_chat ^^
17:55 royskatt Ok, thank you very much already...i'll try that out immediatly
18:04 royskatt Yep, you where right! Stupid mistake from me, Perl was caring about whitespaces here a little bit more than I tought. Thank's again!!
18:05 moritz wow, it seems I actually helped somebody for once :-)
18:06 bvinnerd joined #mojo
18:06 royskatt you did indeed! :)
18:08 sri \o/
18:09 bvinnerd Hi. Is this the right place to talk Mango? :)
18:09 royskatt :D
18:09 sri sure
18:10 jovial_chat sri: should there be a different error for 'no endpoint matched' vs 'no data was rendered'? seems like it would also be a bit helpful, i know i've screwed that up a few times
18:10 jovial_chat i assume this discussion has been had before though
18:10 bvinnerd Ok, i got chance to use Mango::GridFS recently. I see Writer has an is_closed() method, but wouldn't mind having an is_open() for Reader
18:11 bvinnerd I could do it and send you the pull req on github.
18:12 sri bvinnerd: what's the use case?
18:12 bvinnerd The method i'm using atm to see if a file has been opened by Reader is: if ($reader->{meta}) { say("File was opened"); }
18:13 bvinnerd What I was trying to do was search if a file existed in GrisFS with: $reader->open({...}), but open() just returns $self
18:13 bvinnerd Maybe there's some other way though :)
18:14 sri yea, that's not a good use case
18:14 bvinnerd I suppose I could just treat fs.files as any other normal collection and do a find_one
18:16 royskatt Hm, it's still not working as thing it should. http://62.113.243.155/time works now, but the other patterns, for example http://62.113.243.155/echo don't work....
18:17 royskatt thing=think
18:17 sri royskatt: adjust your expectations
18:17 sri bvinnerd: i wonder if open failing should result in an error
18:18 bvinnerd Yes that could be a winner.
18:21 bvinnerd That would mean that you couldn't chain, $reader->open->seek, but that could be a good thing
18:22 bvinnerd (when an error occurs)
18:22 royskatt sri: i can imagine this looks incredible lame to you...:/. I'm new to Mojolicious and still fighting with the basics, sometimes things are confusing if you don't yet understand them completely
18:28 sri bvinnerd: hmm, current behavior is already tested... so i'm inclined to leave it that way https://github.com/kraih/mango/blob/master/t/gridfs.t#L270
18:30 jnbek joined #mojo
18:32 dsteinbrunner anyone know of a modern js framework that can be pointed at the data in an existing DOM, pull that in and do its thing from there
18:33 dsteinbrunner related to the hybrid single page app discussion from a few days ago
18:34 dsteinbrunner it appears angular, knockout and ember all need to have control over the whole process
18:42 bvinnerd @sri: maybe have some $reader->file_exists($oid) then? Just trying to think of a way to achieve what I want, rather than relying on checking $self->{meta}
18:42 sri bvinnerd: http://pastie.org/8528872 # this is how i would add it as an error
18:43 sri bvinnerd: $self->{meta} is off limits, you can't touch it
18:43 sri i will break that at some point
18:44 sri error would be in line with the node.js driver
18:45 bvinnerd @sri: looks good. I could call open() in an eval{} to check if file exists - would have prefered a file_exists() or similar though :D
18:47 sri you're kinda supposed to find files by name
18:48 bvinnerd This is true!
18:49 sri http://mojolicio.us/perldoc/Mango/GridFS#find_version
18:51 bvinnerd Thanks - will take a look. I'm only just getting into GridFS over the last couple of days, done Mango for a couple of weeks. Cheers :D
18:52 sri i've made the change though https://github.com/kraih/mango/commit/c3051d8b4f383a24e839d681c735ff13a97a20a8
18:53 bvinnerd Thanks again :D
19:02 abra joined #mojo
19:04 plu joined #mojo
19:25 bluescreen joined #mojo
19:39 mire_ joined #mojo
20:14 mgrimes joined #mojo
20:37 Foxcool joined #mojo
20:41 * sri wonders what to do about this https://groups.google.com/forum/#!topic/mojolicious/T34XZX72LaA
20:48 rem_lex joined #mojo
20:49 lukep joined #mojo
20:56 zackiv31 joined #mojo
20:58 jovial_chat sri: feel sorry for them
21:04 punter joined #mojo
21:05 trone joined #mojo
21:05 punter left #mojo
21:06 sri oh my... IO is in a really shitty state
21:07 sri cpan version not updated since 2009... core 3 versions ahead... but no entries in changelog
21:12 rem_lex|pivo joined #mojo
21:16 sri maybe i'll just banish the test case into user_agent_online.t with the other fragile tests
21:19 sri or morbo.t
21:22 themage joined #mojo
21:23 good_news_everyone joined #mojo
21:23 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/5BTggQ
21:23 good_news_everyone mojo/master 9ca2244 Sebastian Riedel: moved SO_REUSEPORT tests into morbo.t
21:23 good_news_everyone left #mojo
21:33 good_news_everyone joined #mojo
21:33 good_news_everyone [mojo] kraih tagged v4.59 at e79df52: http://git.io/CU8G_g
21:33 good_news_everyone left #mojo
21:33 mattp sri: what is gained by 'abandoning' the cpan'd IO::*? i dont understand
21:34 sri how would i know?
21:35 mattp you talked to them ;) was just a general pondering, i thought p5p was moving in the opposite direction of that
21:35 sri it's just the way it is
21:51 sri wow, fun AIX bug
21:54 basiliscos joined #mojo
22:12 athenot joined #mojo
22:41 gryphon joined #mojo
23:01 dsteinbrunner joined #mojo
23:28 asarch joined #mojo
23:55 marty joined #mojo

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