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

IRC log for #mojo, 2014-06-27

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

All times shown according to UTC.

Time Nick Message
00:05 jzawodn marcus: just watched your Mojoconf convos talk.  now I wanna try it out. :-)
00:10 d4rkie joined #mojo
00:28 neyasov_ joined #mojo
00:29 neyasov__ joined #mojo
00:30 d4rkie joined #mojo
00:32 shmuel joined #mojo
00:39 sri tempire: you were twirling your mustache while saying that, weren't you?
00:40 tempire http://i268.photobucket.com/albums/jj2/The_Faust74/DRMindbender_zpsaa3adc7f.jpg
00:53 nishttal2 joined #mojo
00:54 nishttal2 hi.. is there a way to share global data that is accessible by all requests?
00:54 nishttal2 kind of link environment variables
01:01 Averna joined #mojo
01:04 jnbek^dt joined #mojo
01:06 jnbek joined #mojo
01:07 klapperl joined #mojo
01:08 d4rkie joined #mojo
01:18 laouji joined #mojo
01:31 Ptolemarch joined #mojo
01:33 * tempire is tired of his vim font
01:33 tempire what font is everyone using?
01:38 neyasov__ joined #mojo
01:46 * tempire is trying source code pro light for a while
02:00 D4RK-PH0ENiX joined #mojo
02:22 neyasov__ joined #mojo
02:22 * sri never gets tired of Consolas
02:23 neyasov___ joined #mojo
02:29 dabudabu Hey, is it just me or did you rename the secret method to secrets? :o
02:37 tianon dabudabu: not exactly a "new" change ;)
02:37 tianon 4.63  2013-12-19 - Deprecated Mojolicious::secret in favor of Mojolicious::secrets.
02:37 tianon https://github.com/kraih/mojo/blob/master/Changes#L312-L315
02:38 sri who's counting the years
02:39 Ptolemarch joined #mojo
02:40 dabudabu Oh... I haven't been reading the newspapers recently
03:05 disputin joined #mojo
03:10 neyasov___ joined #mojo
03:11 jberger I haven't written off my book yet
03:12 jberger And i got my new more portable laptop too
03:13 neyasov___ joined #mojo
03:15 d4rkie joined #mojo
03:21 mire joined #mojo
03:25 jberger I also was thinking of making something like pythonchallenge.com
03:25 jberger cause ... I need more things that I can start and not finish :-
03:26 jberger (^^ meta-joke was a happy accident :-) )
03:34 mire joined #mojo
03:35 sri lol
03:35 meshl joined #mojo
03:35 sri "happy accident" i see what you did there!
03:36 sri so meta
03:42 Ptolemarch joined #mojo
03:58 * jberger made the mistake of installing Ubuntu's TeXlive
03:59 Adurah joined #mojo
04:00 jberger if you thought that installing Dist::Zilla brought in half of CPAN, installing texlive-latex-extra install ALL of texlive, just so I can get import.sty :o
04:03 neyasov___ joined #mojo
04:05 crab is there a pig.sty?
04:38 KCL joined #mojo
04:48 Ptolemarch joined #mojo
05:04 neyasov___ joined #mojo
05:07 Ptolemarch joined #mojo
05:37 laouji joined #mojo
05:54 Ptolemarch joined #mojo
05:55 ver joined #mojo
06:04 neyasov___ joined #mojo
06:06 neyasov____ joined #mojo
06:06 sujithm joined #mojo
06:07 fhelmber_ joined #mojo
06:16 Eke- joined #mojo
06:21 Eke|| joined #mojo
06:23 neyasov____ joined #mojo
06:24 neyasov____ joined #mojo
06:25 neyasov_____ joined #mojo
06:27 batman jzawodn: have you tried http://demo.convos.by ?
06:44 dod joined #mojo
06:53 basiliscos joined #mojo
06:57 dpetrov_ joined #mojo
06:58 rawler joined #mojo
07:06 igorsutton joined #mojo
07:27 neyasov_____ joined #mojo
07:36 trone joined #mojo
07:41 tempire vim-gitgutter is awesome
07:41 tempire so is vimawesome.com
07:44 preaction "Plugin usage data is extracted from dotfiles repos on GitHub" <- genius
07:44 Jonis tempire: oh, vimawesome, not seen that before
07:44 tempire Vundle is the way to go
07:45 Jonis yeah, vundle is really nice
07:46 kyshtynbai joined #mojo
07:49 dabudabu Is there a nice way of executing code when a template isn't found?
07:51 Jonis what kind of code?
07:52 Jonis ie. what do you want to do when a tempalte isn't found_
07:54 dabudabu Call an error handling function (which does some logging and email sending) and render the exception template instead
07:55 dabudabu Executing a die statement would okay too
07:55 dabudabu +be
07:57 batman dabudabu: https://metacpan.org/pod/distribution/Mojolicious/lib/Mojolicious/Guides/Rendering.pod#Rendering-exception-and-not_found-pages
07:58 batman look for `The hook "before_render"` a bit further down
07:59 dabudabu Neat, thanks!
08:00 KCL joined #mojo
08:00 Vandal joined #mojo
08:16 kyshtynbai Guys, in what state of hook should I send "no-cache" header?
08:19 fhelmber_ joined #mojo
08:26 Negor joined #mojo
08:28 neyasov_____ joined #mojo
08:29 neyasov______ joined #mojo
08:30 kyshtynbai $self->res->headers->header('Cache-Control: no-cache'); I do this for route / but I dont see this header when I send get request vi netcat...
08:38 moritz kyshtynbai: to set a header, you need to use the two-argument form
08:39 moritz kyshtynbai: ->header('Cache-Control', 'no-cache')
08:39 moritz kyshtynbai: with one argument you just read a header (with a weird name)
08:39 dexteruk joined #mojo
08:58 crab weird and invalid
08:58 crab though mojo won't care from this angle
09:06 dabudabu Hmm... Changing my question a little bit: I would like a 500 if there is a route but nothing gets rendered (e.g. because a template is missing), and a 404 if there is no route
09:08 dabudabu Guess I'll look into the other hooks
09:12 dabudabu Hmm. Maybe it would be more fruitful to check if an action is defined.
09:16 trone joined #mojo
09:16 dabudabu It's super effective!
09:16 dabudabu But feel free to comment if you think I'm doing something weirdly.
09:17 batman dabudabu: sure you don't want this: https://metacpan.org/pod/Mojolicious::Plugin::RenderSteps ?
09:17 * batman is guesing
09:17 batman +s
09:23 trone joined #mojo
09:25 dabudabu Hmm, I just want to get a 500 server error when there is a matching route and an action but the template is missing, and a 404 if there is no route in the first place
09:29 meshl joined #mojo
09:29 neyasov______ joined #mojo
09:30 dabudabu And I got it to work in less than 10 lines of code, so I'm reasonably happy
09:30 nicomen render_maybe returns wether it was able to find a template and render it or not AFAIK
09:36 sujithm joined #mojo
09:46 kyshtynbai moritz: Thanks!
09:52 denis_boyun joined #mojo
10:26 c--__ why does render(text => 'foo') send content type text/html (unlike json => {} for instance), but render(text => 'foo', format => 'txt') sends text/plain? shouldn't the first one always be text/plain or am i misunderstanding the purpose of the text => key?
10:26 * jberger seconds render_maybe
10:30 neyasov______ joined #mojo
10:40 nicomen is there any way to get this shorter? perl -Mojo -E 'a->static->paths(["."]);a->start'
10:40 nicomen (serve files from current dir)
10:44 moritz nicomen: sure, with a shell alias
10:45 sujithm joined #mojo
10:48 sujithm_ joined #mojo
10:49 nicomen moritz: haha
10:50 mishantil joined #mojo
10:54 stephanj nicomen: cool idea
11:02 someanon nicomen, u can use ctrl+r to fast search
11:07 neyasov______ joined #mojo
11:09 neilhwatson joined #mojo
11:16 powerman joined #mojo
11:18 powerman sri: Is Mojo::Headers or Mojo::Util::split_header support (or plan to support in the future) RFC6266 (mentioned in RFC7231)?
11:19 powerman I'm mostly interested in support for non-ascii filenames http://tools.ietf.org/html/rfc6266#section-4.3
11:30 nicomen I know aliases and backwards history search, that wasnt my question
11:34 crab name your directory public, go to its parent, and just do a->start
11:38 nicomen crab: true
11:47 sujithm joined #mojo
11:52 meshl joined #mojo
12:06 d4rkie joined #mojo
12:09 Jonneh joined #mojo
12:13 meshl joined #mojo
12:15 batman nicomen: you can drop the space between "-E" and "'"
12:28 d4rkie joined #mojo
12:46 ryozi joined #mojo
12:48 Jonneh joined #mojo
12:52 sugar joined #mojo
12:54 crab is there an easy way for a running app to create a single daemon listening on another port that will service a single request and then exit?
12:54 moritz fork(), and opan a socket yourself?
12:54 moritz *open
12:55 moritz sounds like a typical XY problem :-)
12:55 sri the Mojo::Server::Daemon api has everything you need
12:56 sri fork() would only make it harder
12:59 crab hmm, thanks. you're right, it is pretty easy.
13:00 crab moritz: why do you say it sounds like a typical XY problem?
13:01 moritz crab: because it's a very unusual requirement, that sounds like it might be the solution to a problem that might have a better solution
13:02 crab it's certainly an unusual situation.
13:03 moritz like implementing a test FTP server that crashes the upstream channel, or so :-)
13:04 crab i have an app running behind nginx. it accepts a gpg-signed tarball that it verifies and untars and then runs the payload via sudo (simplifying somewhat). the script writes its output to a logfile, and the app displays a "tail -f" style view of that logfile while the script runs. now, in this case, the payload is a thingy to upgrade a heartbleed-vulnerable version of openssl on the server to a newer version. which means restarting nginx. which means the tail -f c
13:04 crab hypnotoad hot deployments work nicely with this, but not nginx restarts.
13:04 moritz truncated after 'which means the tail -f c'
13:05 * sri was about to recommend Mojo::IOLoop::ForkCall in case you really want to fork... but notices that it doesn't support Mojo::IOLoop->reset yet
13:05 crab "tail -f c"... onnection will break
13:05 * sri pokes jberger
13:05 moritz crab: agreed, it's unusual :-)
13:06 crab moritz: can you think of a better solution?
13:07 moritz crab: no (except not running behind nginx, which is probably not an option for you)
13:08 crab indeed. in this case, the solution i thought of (i.e. starting a new server on a random port and redirecting the browser to talk to it directly) won't actually work because the environment is SO locked down that only port 443 is exposed.
13:08 crab but this was just a bit of mental exercise. the actual update has already been deployed, and i told them "this time, you won't see the 'all is well' message at the end of the upgrade"
13:09 crab i think i'll write the new-server thing, though. it may come in handy some other time.
13:16 nicomen crab: tail -F ?
13:16 purl tail -F is to follow a growing file.
13:49 nishttal2 joined #mojo
13:49 btyler joined #mojo
13:49 nishttal2 lucaspc.. you there?
14:06 gryphon joined #mojo
14:06 Jonneh joined #mojo
14:08 Jonneh_ joined #mojo
14:09 sh4 joined #mojo
14:10 nishttal2 hello.. is everyone here really quite or some problem with my connection?
14:14 good_news_everyon joined #mojo
14:14 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/34qoWg
14:14 good_news_everyon mojo/master 205a5e7 Sebastian Riedel: fixed small bug where Mojo::Server::Daemon was too eager to reconfigure Mojo::IOLoop
14:14 good_news_everyon left #mojo
14:14 nicomen nishttal2: quiet
14:14 nicomen friday == everyone getting wasted
14:15 batman nishttal2: sometimes we're quiet, sometimes we can't stop talking :)
14:16 batman nothing wrong with your connection
14:22 good_news_everyon joined #mojo
14:22 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/rekqPQ
14:22 good_news_everyon mojo/master 8c3985d Sebastian Riedel: a few more links
14:22 good_news_everyon left #mojo
14:24 Jonneh joined #mojo
14:30 crab nicomen: what?
14:32 nicomen tail <capital-F>
14:32 nicomen to re-open logs if closed by a web server for instance
14:45 bluescreen joined #mojo
14:47 KCL joined #mojo
14:54 nishttal2 great.. happy to see some action.. my 2nd week with Mojolicious and so far only read documents/wiki.. now is the time to jump in.. wanted to see if there were life-guards around :-)
14:56 Jonneh joined #mojo
14:57 sri mostly just sharks
14:57 batman nishttal2: there's usually a person or to to catch you before it's too late :)
15:02 nishttal2 sri hahah.. i've heard about you :)
15:03 sri http://weknowmemes.com/wp-content/uploads/2013/08/misunderstood-shark-2.jpg
15:03 nishttal2 sri but reading thru the documents.. i couldnt help but admire the way you think about technology and what you have created!!
15:04 nishttal2 batman that works :)
15:04 batman s!to!two!
15:12 sri glad you like it
15:17 sujithm joined #mojo
15:24 * tempire chomps
15:25 tempire *gently*
15:25 batman chomps?
15:25 * batman gets the dictionary...
15:26 batman i think i get the word. but i still don't get _it_
15:27 crab nicomen: you're missing the point, that's not at all the problem.
15:28 crab the tail(1) binary is not involved in any way
15:28 crab batman: shark <-> chomp
15:28 stephanj crab: can you edit iptables?
15:28 crab stephanj: yep.
15:29 batman crab: of course! thanks :)
15:29 crab i haven't actually needed to, but i can do anything that a script running as root can.
15:29 stephanj a dirty way would be to spawn a webserver, make a DNAT from 443 -> to the webserver port, do your magic & transmit the success and then remove it again
15:30 crab wow. when you say dirty, you really mean it.
15:30 stephanj ;)
15:30 btyler_ joined #mojo
15:30 stephanj hey you asked for a solution
15:30 crab i guess that would work. it's vanishingly unlikely that multiple people will be trying to access the site during an upgrade anyway.
15:30 stephanj not for a clean one
15:31 batman sri: do you think i should add Mojo::IOLoop->reset to Mojo::IOLoop::ReadWriteFork as well? i mean, it's supposed to do exec(@program) but someone might run code and forget to do ->reset...
15:31 stephanj you could also add firewall rules for protecting the port
16:00 rem_lex joined #mojo
16:02 meshl joined #mojo
16:09 Jonneh joined #mojo
16:12 btyler joined #mojo
16:19 dotandimet joined #mojo
16:19 * sri would like to make graceful shutdowns in Mojo::IOLoop a little better, but is not sure how
16:19 disputin joined #mojo
16:20 sri currently graceful shutdown means that no more connections are getting accepted, and the ioloop gets stopped once the connection count reaches 0
16:20 sri *but* all connections count, those accepted by servers and those created by clients inside apps
16:21 sri i could flag connections accepted by servers differently, and only make those count for graceful shutdowns... but that might interrupt any non-blocking operations you're performing in the background... maybe after every response has been served...
16:31 powerman sri: it's easy. alternative is immediately kill old server, which surely will also break all user's connections
16:32 powerman so, restart is as graceful as possible, but not completely graceful :)
16:34 powerman sri: only way to make sure all user's connection is also graceful - let user control this, which will result in a lot of added complexity, because user may have own persistent connections which may never finish on it's own, so you'll need to notify user's code about request of graceful restart, to let him kill persistent connections and wait until other finish in normal way
16:43 mr-foobar sri: in Mojo is there a messaging bus addon ?
16:43 sri mr-foobar: no
16:53 mr-foobar joined #mojo
17:06 mr-foobar joined #mojo
17:23 voegelas joined #mojo
17:35 dod joined #mojo
17:46 mire joined #mojo
17:47 gnephiak joined #mojo
17:53 KCL_ joined #mojo
18:00 dod joined #mojo
18:03 disputin joined #mojo
18:06 Jonneh joined #mojo
18:32 genio Grrr.  _YOU'RE_ a "Premature connection close"
18:38 mattastrophe joined #mojo
18:43 marty joined #mojo
19:01 marty joined #mojo
19:07 kyshtynbai joined #mojo
19:08 Mikey is load balancing to minion workers round robin?
19:08 Mikey or do they all just read from the same queue and whoever's fastest wins
19:09 Mikey i'm going to read the code
19:13 alnewkirk joined #mojo
19:14 neyasov______ joined #mojo
19:15 marty joined #mojo
19:26 mr-foobar joined #mojo
19:30 Ptolemarch joined #mojo
19:32 marty joined #mojo
19:37 Mikey ahh the worker fork()s itself doing jobs until there's no work and then sleeps 5 seconds
19:38 Mikey nice design, but 5 seconds is way too long for me
19:47 sri interesting job queue problem http://eng.joingrouper.com/blog/2014/06/27/too-many-signals-resque-on-heroku/
19:48 sri think i'll support the TERM pattern in minion
19:50 mad_hatter joined #mojo
19:51 mad_hatter http://scsys.co.uk:8002/paste
19:52 mad_hatter ^^ is there a way I can keep the connection to outlook persistent? As it is right now it creates a new connection with every refresh of the page
19:52 genio wrong paste URL?
19:53 mad_hatter http://scsys.co.uk:8002/402401
19:53 mad_hatter my bad
19:53 sri TLDR
19:55 marty joined #mojo
20:05 Eke- joined #mojo
20:12 marty joined #mojo
20:15 sri i would very much appreciate it if someone could test this on windows https://github.com/kraih/minion/commit/8bc0a7802abcf8ed73375f18854f1a2fcb9b3b94
20:16 sri mad_hatter: you're cross posting again... very much not appreciated
20:16 sri consider yourself warned
20:17 mad_hatter sri: heh?
20:17 purl Hyuk. Heehee. Harharhaharharhar. HahaHAHAHaHahaHAHahAHAHAHAha. That's great, mad_hatter!
20:17 sri mad_hatter: you don't know what cross posting is?
20:18 mad_hatter negative ghost rider
20:18 purl The pattern is full.
20:19 tempire ARRRRRGGGG
20:19 * tempire is traveling without his macbook power adapter
20:19 sri mad_hatter: it is considered very rude to ask the same question in multiple channels
20:19 * tempire dies
20:19 mad_hatter i didn't?
20:20 sri i am on #perl too
20:20 marty joined #mojo
20:21 mad_hatter oh yeah...su-shee is a beast with web dev stuff..i didn't ask anything about mojolicious though...just about persistence as a general question
20:21 mad_hatter i didn't realize that was bad
20:21 mad_hatter my apologies
20:22 Eke- joined #mojo
20:22 marty joined #mojo
20:22 Mikey it's only bad if you get caught
20:22 sri the least you can do is mention here that you're already getting help
20:22 Mikey like anything else bad.
20:23 Mikey unless you're a moral objectivist, in which case, i'm sorry for offending you
20:23 sri and if i catch you it's game over!
20:23 * Mikey hides
20:23 * sri nods
20:23 * tempire respawns
20:23 mad_hatter Mikey, I'm a moral nihilist so...there is no such thing as anything
20:24 Mikey and you crosspost like a nihilist.
20:24 * Mikey narrows his eyes suspiciously.
20:24 sri i still want to know how well this works on windows though ;p https://github.com/kraih/minion/commit/8bc0a7802abcf8ed73375f18854f1a2fcb9b3b94
20:25 Mikey im still erecting crazy pipeworks with zmq to get my async tasks tied to websockets
20:25 Mikey and i don't have any windows boxen or i'd test
20:26 Mikey so, if you don't mind, i have a general, off topic question about weaken and closures
20:26 sri human sacrifice
20:27 Mikey (btw, mad_hatter, i should ask such a question in #perl, not here.. but i'm an asshole like you)
20:27 mad_hatter lmao
20:27 sri always the right answer when it comes to perl garbage collection
20:27 disputin joined #mojo
20:28 Mikey well i am having a weird situation where if my zmq filehandle which is NEVER TO BE CLOSED (and iirc perl close()'s any open FH's when something is gc'd?)
20:28 Mikey i'm having this situation where if the object that holds that FH is DESTROY'ed in some case i haven't figured out, the entire zmq thread hierarchy goes to shit
20:29 Mikey you know what i think i know what area it's in.. nevermind.
20:29 Mikey perl closing that fh makes everything pretty much seize up.
20:30 preaction Mikey: i've been doing some work with zmq and mojolicious. are you using ZMQ::FFI ?
20:31 Mikey ZMQ::LibZMQ3
20:31 Mikey i'm using the C wrappers
20:31 Mikey doing an open($subfh, "<&=", zmq_getsockopt($subscriber, ZMQ_FD)) and putting it in the Mojo::IOLoop::singleton->reactor
20:32 Mikey but when that filehandle gets close()d, it's always a bad time
20:32 preaction i could swear there's a zmq_socket() and zmq_bind() that does the right thing
20:32 Mikey and it happens more now that i've moved my code from a handler right in the Mojolicious::Controller into my own object
20:33 Mikey well it only happens now.. it never happened before
20:33 Mikey and i have a feeling its because sri knows how to use weaken better than i do
20:33 neilhwatson joined #mojo
20:33 sri if you weaken too much stuff disappears
20:34 * mad_hatter thinks we need a little 'strengthen'
20:34 Mikey unweaken
20:34 Mikey it's really only affecting my dev environment, as the hypnotoad processes lock up and get reaped.. though that's not good for my end users
20:35 Mikey i kinda have to fix this
20:36 preaction Mikey: have you tried just giving the fd to the reactor instead of using that open incantation i've never seen before?
20:36 Mikey preaction: yeah $subscriber is a zmq_socket(zmq_init(), ZMQ_SUB))
20:36 Mikey thats how you get the filehandle, or can i just pass the raw fd to the reactor?
20:36 preaction my $fh = zmq_getsockopt( $subscriber, ZMQ_GETFD ); <- you don't need to perform open
20:36 Mikey without opening it?
20:37 Mikey i bet they do the same thing, but i'm gonna try!
20:37 preaction but then, i was doing this and i still had problems. switching to ZMQ::FFI solved just about all my problems
20:37 Mikey oh did i mention that it's intermittent and i can't "cause" it?  it's timing, it happens randomly during morbo restarts
20:38 Mikey i'll look into ZMQ::FFI
20:39 preaction it requires libffi, which i don't think FFI::Raw installs for you unfortunately
20:39 * preaction really wants libffi in Perl core, like Python gets
20:39 Mikey yeah doing it that way its not even getting any messages.. the reactor
20:41 Mikey zmq by itself is really finnicky, but i like that i've learned it as i went along.  i read through the source code occasionally
20:42 preaction yeah, the getting started guide is awesome, but any actual documentation is pretty much nonexistent. especially "if you get this error, this is what it means"
20:42 Mikey right, like i know i can cause the error by closing that filehandle, but their docs say straight up never close that filehandle.
20:42 Mikey maybe what i need to do is unweaken it so that it lives until the interp dies?
20:43 Mikey what gets me is sometimes everything is clean.  no problems.  which makes me think maybe i'm getting a lucky file descriptor number or something
20:45 KCL joined #mojo
20:46 marty joined #mojo
20:47 preaction i suspect race condition during destruction
20:47 preaction that's what it sounds like at least
20:48 Mikey *nod*
20:48 Mikey like all bugs this one will die.  it's just one of those that i feel like might be with me too long
20:49 preaction how are you setting up the reactor poll? that's one thing i never got working using Mojo::IOLoop and i had to resort to AE::io
20:50 Mikey https://ezcrypt.it/2S8n#jOXjhtYgc7gpgy8RXRaalt2p
20:50 sri preaction: this didn't work? http://mojolicio.us/perldoc/Mojo/IOLoop#reactor
20:50 Mikey yeah thats the doc i used
20:50 preaction sri: probably didn't try that, but i will right now because i'd love to get rid of AE...
20:51 sri :)
20:51 Mikey oh you can't read() from the zmq file handle either
20:51 Mikey or it will puke
20:52 Mikey you have to do that read like i do on line 4 of that paste
20:52 Mikey that filehandle is only to be used to tell if it can_read()
20:52 Mikey or write or whatever you're looking for
20:56 preaction holy damn. now that i'm reading this paste, ZMQ::FFI... seriously...
20:57 * preaction steals some code from $dayjob to show
20:58 Mikey yeah pretty object oriented goodness is appealing
20:58 preaction https://gist.github.com/preaction/e8ba9fb40c54ce5d308b
20:59 Mikey haha yeah this is very nice
20:59 preaction it uses anyevent unfortunately, but that is for now because i haven't had the wherewithal to switch to IO::Async and/or Mojo::IOLoop
21:00 Mikey up until now, my subscriber integration with zmq has been this 50 lines of code (some if it just debugging output, obv), but it's about to get a bit more complicated
21:00 Mikey might be time to refactor this rats nest
21:03 Mikey but i let the C API docs pretty much guide all my zmq work thus far
21:03 preaction but the major thing is that ZMQ::FFI seems to clean up correctly, provided there are no memory cycles leaving things open
21:03 preaction ... i wonder if weaksub would be possible: a subref that closed over vars but did not increment their refcnt
21:03 preaction it's a hack, to be sure, but it'd make the experience more automatic and less manual
21:03 Ptolemar_ joined #mojo
21:04 Ptolemar_ joined #mojo
21:07 Mikey hey thanks a bunch for your help, preaction
21:07 preaction np, my agenda to get more people using FFI-based Perl modules has to begin somewhere ;)
21:09 neyasov joined #mojo
21:11 bluescreen_ joined #mojo
21:12 Ptolemarch joined #mojo
21:18 Mikey well i fixed my bug.
21:19 Mikey had to zmq_term() the context
21:19 Mikey apparently in order to use zmq correctly you have to read this: http://zeromq.org/whitepapers:0mq-termination
21:23 preaction ah, looks like ZMQ::FFI does that automatically. which then explains everything (except why ZMQ::LibZMQ3 doesn't, but whatevz)
21:30 KCL_ joined #mojo
21:36 Mikey ZMQ::LibZMQ3 is just the C wrappers
21:36 Mikey i remember why i did this and it was largely that translating docs from one api to another was hard, and the C api docs were the best of any so i just figured if i needed to i'd oo-ify it later
21:38 powerman left #mojo
21:40 Mikey unfortunately i missed that whitepaper
21:41 preaction it should probably be in every single example :p
21:41 preaction _and_ i'd put it in the ZMQ::LibZMQ3 documentation, but i'm weird like that
21:42 disputin joined #mojo
21:44 henq joined #mojo
21:52 D4RK-PH0ENiX joined #mojo
21:53 mire joined #mojo
22:09 Ptolemarch joined #mojo
22:13 marty joined #mojo
22:27 D4RK-PH0ENiX joined #mojo
22:45 D4RK-PH0ENiX joined #mojo
23:27 mr-foobar joined #mojo
23:27 neyasov joined #mojo
23:32 D4RK-PH0ENiX joined #mojo
23:36 nishttal2 joined #mojo
23:38 nmittal_ joined #mojo
23:38 nmittal_ hello.. is there a way to store global data that can be used/updated by concurrent requests?
23:43 D4RK-PH0ENiX joined #mojo
23:59 preaction nmittal_: do you want the user's session data? or do you want it to be just an application global? the answer to both is yes
23:59 gryphon joined #mojo

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