Camelia, the Perl 6 bug

IRC log for #mojo, 2013-03-14

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

All times shown according to UTC.

Time Nick Message
00:05 ka2u joined #mojo
00:10 Averna joined #mojo
00:22 MeierM joined #mojo
00:37 shmuel joined #mojo
00:48 egopro joined #mojo
01:01 hlin joined #mojo
01:08 human39 joined #mojo
01:11 ka2u joined #mojo
01:55 d4rkie joined #mojo
02:12 good_news_everyone joined #mojo
02:12 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/fpmvIg
02:12 good_news_everyone mojo/master 5b1a2d8 Sebastian Riedel: no need to mention monotonic clocks
02:12 good_news_everyone left #mojo
02:32 D4RK-PH0ENiX joined #mojo
02:35 anaio joined #mojo
02:43 jberger sri: I think this is scarier than shutting down reader:
02:43 jberger "We’re deprecating our Search API for Shopping, which has enabled developers to create shopping apps based on Google’s Product Search data. While we believe in the value this offering provided, we’re shifting our focus to concentrate on creating a better shopping experience for users through Google Shopping. We’ll shut the API down completely on September 16, 2013."
02:44 jberger good luck to people that built a business/product around this api, Google has decided to kill your livelihood
02:44 jberger but it means I'm not building a business around their apis ever
02:45 jberger (not that I was going to, but you know, I might have)
02:46 sri jberger: don't build your business around a free API
02:46 jberger but they INTENDED this for shopping apps, this wasn't some end-user service! thats the scary thing
02:46 jberger of course, but this just showed a real example of why
02:46 jberger I wasn't going to
02:46 sri it's the same with twitter
02:47 jberger obviously you get what you pay for
02:47 sri free APIs are not a business model, they can be shut down at any moment
02:47 jberger but it seems pretty heartless
02:47 sri yea, the bigger problem imo is that the open web is going away slowly
02:47 jberger yeah, well maybe this convinces people to bring it back
02:48 jberger the web is good at that, perhaps we have gotten lazy about it, but it only takes a few ideas and servers
02:48 jberger wikipedia is still open
02:48 sri the big players have grown too big now, they can't monetize APIs, so they turn into walled gardens
02:48 jberger yeah
02:48 sri wikipedia is not for profit
02:49 jberger right, and maybe more should be too
02:49 jberger for openness
02:49 sri how do you monetize APIs?
02:50 jberger no idea really
02:50 sri commercial google maps api doesn't seem to work out
02:51 jberger anyway, I'm exhausted from a long day
02:51 jberger time to get some shuteye
02:51 jberger (isn't it like seriously late in Germany?)
02:51 jberger :-)
02:51 jberger good work on Headers btw
02:52 sri yea, but i still have work to finish :/
02:52 jberger sri++
02:52 * jberger hands sri the NoDoze
02:53 jberger goodnight, hope you find some time to rest
02:53 sri nn
02:56 d4rkie joined #mojo
03:16 mattastrophe joined #mojo
03:18 GabrielVieira joined #mojo
04:46 preflex_ joined #mojo
05:00 freman Our app is dying and restarting (thanks hypnotoad) but we can't nail down exactly why it's dying, debug log shows nothing except it restarting, we have a vague idea of where but no idea why
05:04 good_news_everyone joined #mojo
05:04 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/V3MIDA
05:04 good_news_everyone mojo/master 7ed034e Sebastian Riedel: a few more response tests
05:04 good_news_everyone left #mojo
05:15 crab thank hypnotoad?
05:16 crab oh i see what you mean.
05:18 dummy_jb joined #mojo
05:19 ka2u joined #mojo
05:29 ka2u joined #mojo
05:43 freman yes, thankfully hypnotoad is restarting it
05:44 freman but we're not getting any useable errors :(
05:44 freman hoping maybe it's got some way of catching stderr in case it's a perl fart?
05:47 basiliscos joined #mojo
05:50 Meiermann joined #mojo
05:53 ACE joined #mojo
05:54 ACE_ joined #mojo
06:07 duncanthrax joined #mojo
06:11 KindTwo joined #mojo
06:30 * tempire is for profit
06:39 rihegher joined #mojo
06:41 tempire oh!
06:41 tempire what is the alternative to google reader?
06:53 mattastrophe joined #mojo
06:58 Vandal joined #mojo
07:18 wk joined #mojo
07:29 Fremean joined #mojo
08:02 dod joined #mojo
08:17 yakudza joined #mojo
08:27 suy joined #mojo
08:28 dod joined #mojo
08:46 mattastrophe joined #mojo
09:11 hrupp joined #mojo
09:53 nelio joined #mojo
09:56 mattastrophe joined #mojo
09:58 jpn joined #mojo
10:00 xaka joined #mojo
10:02 mire joined #mojo
10:13 Caelum sri++ # multi-upload fix just came in handy
10:18 mugenken joined #mojo
10:21 egopro joined #mojo
10:33 dod joined #mojo
10:35 mattastrophe joined #mojo
10:41 ver joined #mojo
11:00 rem_lex|pivo joined #mojo
11:08 ver Hello! I have Application used Morbo and executed by "while true; do ./launcher; done". I have post-checkout hook in git and I need to restart my application after git checkout. How I can do it?
11:09 ver I just need to use new/updated files
11:10 ver hmm...I can use $morbo->watch I think
11:30 Akron joined #mojo
11:35 bowtie joined #mojo
11:54 hrupp ver: morbo restarts itself on detecting a file change
11:54 hrupp you do not need a launcher
11:54 hrupp but for prod envoirements you should use hypnotoad
11:55 hrupp and send a signal after deployment
11:55 ver I have some troubles with unicode on hypnotoad
11:56 ver When I tried to use Morbo it seems to be OK and no troubles
11:56 hrupp which kind of ?
11:57 ver When I send unicode string from JavaScript to controller I have broken characters after some symbols (like comma)
11:58 ver Witch Morbo it is OK. I don't know why.
12:05 hrupp ver: have a look at jbergers galileo cms
12:05 hrupp he also had some trouble with unicode
12:05 hrupp or ask him when he is around
12:06 ver thank you, I as him about it
12:11 moltar joined #mojo
12:27 mire joined #mojo
12:32 snuffles joined #mojo
12:45 snuffles joined #mojo
12:48 ki0_ joined #mojo
12:53 GabrielVieira joined #mojo
13:05 jberger ver, when you say "send unicode string from Javascript to controller", what do you mean by "send"? Websocket?
13:05 crab envelope and postage stamps
13:06 jberger carrier pigeon!
13:06 crab otherwise the unicode characters get messed up
13:06 jberger also you shouldn't see any difference in character handling between morbo and hypnotoad
13:06 fhelmber_ joined #mojo
13:06 ver jberger, no, just AJAX
13:06 bluescreen joined #mojo
13:07 ver or HTTP POST (AFAIR) - same result
13:07 jberger but only on hypnotoad and not morbo?
13:08 jberger is there a database involved?
13:09 ver only with hypnotoad
13:10 ver database is OK
13:10 ver http://imageshack.us/f/43/shot20130314171058.png/
13:10 ver Yo can see an example under "100/1000BASE-TX/LX COMBO"
13:11 ver First is normal string, second - with comma
13:12 jberger does it work under the prefork server?
13:12 ver Now I just ran ./script daemon
13:14 ver Half-year ago I tried to fix it. I have found what comma is 1 byte, russian character is 2 byte and unicode bytes shifting afer 1-byte comma
13:14 jberger so now it fails under all the servers?
13:14 ver sorry for my bad english :)
13:14 ver jberger, it work only with Morbo
13:15 jberger but it doesn't work with daemon?
13:15 ver yes
13:15 jberger that makes no sense at all
13:15 ver I know but it happens
13:15 jberger morbo == daemon with automatic reloading
13:17 jberger my guess is that somehow you have two versions of Mojolicious installed (possibly two different Perl interpreters) and morbo points to one and the others point to the other
13:19 jberger as for the unicode problem, if the comma is what is breaking it, that means you are certainly missing an encode/decode somewhere in the transmission
13:19 jberger can you make a minimal example?
13:20 ver No because I have no time (@work)
13:20 ver I'm using "use v5.10" in my application. Maybe it have sense?
13:20 jberger the other thought might be since morbo defaults to development mode and the others default to production, maybe there is a difference in your configuration somewhere
13:21 jberger do you use utf8?
13:21 jberger what version of Mojolicious do you have installed
13:21 jberger ?
13:22 ver yes  Perl        (v5.12.4, linux)
13:22 ver Mojolicious (3.71, Rainbow)
13:23 jberger well, when you can, make a minimal example, until then there isn't much I can do for you
13:23 jberger I still think that if you can figure out why morbo is different you might find your problem
13:23 jberger it really shouldn't be any different than daemon at least
13:25 ver jberger, thank you for your attention
13:25 ver When I have some time I will write full description with code samples but now I must to do another things
13:32 ryozi joined #mojo
13:36 d4rkie joined #mojo
13:42 jberger :-)
13:46 btyler joined #mojo
13:59 gryphon joined #mojo
14:01 SmokeMachine joined #mojo
14:01 jpn joined #mojo
14:01 ki0 joined #mojo
14:01 jpn left #mojo
14:06 snuffles joined #mojo
14:08 jpn joined #mojo
14:17 SmokeMachine joined #mojo
14:18 bowtie joined #mojo
14:19 sri \o\
14:19 sri /o/
14:20 crab hi sri.
14:20 sri o/
14:32 memowe o//
14:37 ki0 joined #mojo
14:39 mugenken_ joined #mojo
14:43 marty \o/
14:44 Vandal how can I call Reusable template block recursively?
14:50 crab i wish i stopped being a dummy when i went to work
14:50 newbie joined #mojo
14:52 jberger_atwork Bender: Vandal, in 5.16+ you can use the __SUB__ token
14:52 jberger_atwork not Bender
14:53 Vandal nope, 5.14
14:53 jberger_atwork then you can try the old recusive subref tricks
14:53 Vandal m?
14:53 Vandal I don't know any
14:54 jberger_atwork Vandal: read this:
14:54 jberger_atwork http://www.effectiveperlprogramming.com/blog/1503
14:54 Vandal I think I've googled it
14:55 jberger_atwork and remember that begin ... end is just sub { ... {
14:55 jberger_atwork }
14:55 Vandal ok
14:55 Vandal thank you
14:55 jberger_atwork np
14:56 jberger_atwork this is exactly why they made the __SUB__ token though
14:56 jberger_atwork perl #ftw!
14:57 jberger_atwork in that article there may be some other ideas, Sub::Current for example
14:58 Vandal hm
14:59 Vandal if begin ... end is just sub { ... }, than why it doesn't work like in first example?
14:59 Vandal where $sub->();
15:00 jberger_atwork it should
15:02 Vandal here is my code http://paste.scsys.co.uk/235109
15:02 Vandal and I get: Global symbol "$menu" requires explicit package name at template partials/categories.html.ep line 9.
15:02 maxhq joined #mojo
15:03 Vandal it exactly like with $sub
15:07 jberger_atwork http://pastie.org/6492706
15:07 jberger_atwork like in the example from brian, you need to `my` the variable first
15:08 Vandal magic!!!
15:08 Vandal jberger_atwork, thank you
15:08 jberger_atwork np
15:08 jberger_atwork btw, thats part of why __SUB__ is cool
15:09 jberger_atwork OH and remember, part of the problem is that this form leaks
15:09 sri it's mostly about the leaks though
15:09 sri :)
15:09 Vandal jberger_atwork, how?
15:09 jberger_atwork sri almost ninja-ed me!
15:09 jberger_atwork because you close over a reference to the same sub
15:09 jberger_atwork so it never gets destroyed
15:10 jberger_atwork read that article from brian again
15:10 jberger_atwork its easy to miss the first time
15:10 jberger_atwork hmmm, I guess he doesn't really explain, I thought he did
15:11 anaio I did something gross last night trying to solve what I thought was a simple need with no clear way to accomplish it
15:11 fhelmber_ joined #mojo
15:12 anewkirk I tried to auto-load module files which have route handlers defined in them
15:13 anewkirk I ended up doing this ... http://paste.scsys.co.uk/235113
15:14 anewkirk which works but I can't say I like the design
15:14 jberger_atwork anewkirk: that is essentially how plugins work
15:16 anewkirk jberger_atwork, what do you mean exactly?
15:22 jberger_atwork dynamically loading a module, calling a named method, all you are doing is requiring all the modules
15:25 labrown joined #mojo
15:27 anewkirk jberger_atwork, no, that's not all
15:28 jberger_atwork Vandal: you could make that a helper and then though its recursive its not a closure
15:29 anewkirk I'm automatically configuring the routes in the pm files but omitting the controller/namespace specification because that seems redundant, but after the pm file self-configures the routes I am modifying the newly created routes and adding the namespace info
15:30 sri http://blog.kraih.com/post/43198653667​/mojolicious-hack-of-the-day-mojolyst # i made an example for that a year ago
15:30 sri same principle
15:33 Vandal jberger_atwork, I don't want to smear view cod by whole app, but I'll think about it, thanks
15:33 Vandal *code
15:33 anewkirk sri, *sigh*
15:33 anewkirk ... that is awesome, thanx
15:34 anewkirk that's exactly what I was trying to accomplish
15:34 anewkirk your awesomeness is annoying
15:36 mattastrophe joined #mojo
15:47 jberger_atwork sri++
15:47 jberger_atwork I remember you showing me that once, I don't think I really understood that time
15:47 jberger_atwork this time it makes more sense :-)
15:52 jberger_atwork sri: typo? https://metacpan.org/module/Mojo​licious::Routes::Route#add_child
15:53 jberger_atwork Mojolicious::Route->new
15:53 jberger_atwork should that be ::Routes
15:53 jberger_atwork ?
15:53 ki0 joined #mojo
15:57 mire joined #mojo
15:57 Vandal btw is there a some thing like Catalyst's $c->visit etc?
16:00 crab what's $c->visit?
16:02 Vandal https://metacpan.org/module/Cat​alyst#c-visit-action-arguments
16:06 maxhq joined #mojo
16:08 crab i find i can't be bothered to find out
16:09 sri jberger_atwork: of course you're right
16:09 jberger_atwork I can push a fix
16:09 good_news_everyone joined #mojo
16:09 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/7V6Qyw
16:09 good_news_everyone mojo/master 082d331 Sebastian Riedel: fixed typo
16:09 good_news_everyone left #mojo
16:09 sri well, almost :)
16:10 jberger_atwork this time you did ninja me!
16:10 sri \o/
16:12 jberger_atwork the _atwork title is supposed to remind me that I'm not supposed to be paying attention to IRC
16:12 jberger_atwork how is that going for me? ;-0
16:21 rihegher joined #mojo
16:24 btyler joined #mojo
16:41 basiliscos joined #mojo
16:44 dod joined #mojo
16:47 xaka joined #mojo
16:52 mattastrophe joined #mojo
17:25 wk joined #mojo
17:37 moltar joined #mojo
17:58 newbie joined #mojo
18:11 suy joined #mojo
18:30 good_news_everyone joined #mojo
18:30 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/r7dmag
18:30 good_news_everyone mojo/master 88e998a Sebastian Riedel: documentation tweak
18:30 good_news_everyone left #mojo
18:32 btyler joined #mojo
18:34 good_news_everyone joined #mojo
18:34 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/ytzD7g
18:34 good_news_everyone mojo/master dfbd788 Sebastian Riedel: handle headers more defensively
18:34 good_news_everyone left #mojo
18:36 nelio joined #mojo
18:48 sri domains in node.js are an intersting concept
18:49 sri http://nodejs.org/api/domain.html
18:53 asarch joined #mojo
19:09 vel joined #mojo
19:09 davido joined #mojo
19:14 davido joined #mojo
19:14 davido_ joined #mojo
19:15 good_news_everyone joined #mojo
19:15 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/NyJPIg
19:15 good_news_everyone mojo/master 6786e78 Sebastian Riedel: documentation tweaks
19:15 good_news_everyone left #mojo
19:46 Akron joined #mojo
20:01 beyondcreed joined #mojo
20:06 good_news_everyone joined #mojo
20:06 good_news_everyone [mojo] kraih tagged v3.90 at 493db94: http://git.io/TpHZLg
20:06 good_news_everyone left #mojo
20:19 janus hm, can't the server just do unix sockets too? with path instead of port as argument for example?
20:21 janus oh, i mean Mojo::IOLoop::Server
20:22 sri nope
20:23 janus care to elaborate?
20:23 sri it's not implemented
20:24 janus ah, that's different from ``nope, because it's just not possible'' :)
20:24 sri we supported it once, but it sucked to maintain, so got removed again
20:24 suy joined #mojo
20:25 sri if anyone decides to make a patch, it better be rock solid with flawless unit tests
20:25 janus indeed
20:29 janus an fd argument would also so do the trick - but lead to the same complains i had years back about stdin/stdout not working with it ;)
20:38 lukep joined #mojo
20:51 jpn joined #mojo
21:02 mattastrophe joined #mojo
21:08 basiliscos1 joined #mojo
22:18 mire joined #mojo
22:52 gryphon joined #mojo
22:57 Meiermann joined #mojo
23:14 riche joined #mojo
23:16 ka2u joined #mojo
23:18 rem_lex| joined #mojo
23:19 riche can i talk to you for a sec?
23:22 sri don't ask to ask, just ask
23:25 riche I'm the guy who posted a few hrs back on google groups about the entities.txt ... still looking at Marty's link I don't see anything resembling the same context
23:25 riche this is going to cause support issues for us ... I need to know if this is something we have to patch private and keep maintaining forever
23:30 sri perhaps you should elaborate a little on why that change is necessary
23:30 riche no problem
23:30 sri so far there is no context
23:31 riche deal is we _have_ to use ActiveState's PerlSvc to run this on windows.
23:31 riche and the way it wraps, it doesn't take into account the txt file
23:31 riche and wond
23:31 riche won't
23:31 sri ah, i think some activestate hack was the reason it came up the last time as well
23:31 * sri only vaguely remembers though
23:32 riche yah it's a bad thing, cuz honestly our unit tests havent hit an issue where not being able to load it causes problems
23:32 riche but every time mojo runs .. it emits this error ... and i am not one for obscuring errors, so I'd rather fix it
23:32 riche one way or another
23:33 asarch joined #mojo
23:33 sri patching it may seem simple, but there are more bundled files, such as the default TLS certs
23:33 sri when you look at the big picture, that really adds up and maintaining them as inlined files starts to suck a lot for us
23:33 GabrielVieira joined #mojo
23:34 riche yah ... agreed .. I figured that something like that would be the cause
23:34 riche it makes the file needlessly big ... more that 1k loc per file sucks
23:34 sri just look into lib/Mojolicious/public and lib/Mojolicious/templates
23:34 riche and modding data not code muddies things
23:34 riche for upversions
23:35 sri we bundle jquery.js and prettify.js too, which want to be updated
23:36 sri bottom line... yes, you will prolly have to maintain a patch yourself, or get activestate to fix it on their end
23:36 riche i get you, this is just the first time in 20y of perl I had seen non pl/pm in lib
23:36 sri it's more common than you might think
23:36 riche isn't there a place outside site/lib to put this, maybe then deal with it with env vars or something?
23:37 sri afraid not
23:37 riche i know these are not overnight changes
23:40 riche too bad.  we have been working with mojo for over a year now, and will probably have to ditch it.
23:44 sri too bad, but what did activestate support say?
23:47 riche this is considered an "external" file, which can only be auto-extracted to the base directory
23:47 riche since it's not code
23:48 riche the code is hardcoded to seeking non code to same directory, so it's a no-go
23:49 riche so it is _could_ be driven by env var, then I could ref it
23:49 sri sounds like maintaining a patch that changes the paths would be easy to maintain then
23:49 sri s/to maintain then//
23:50 riche hm yah ... in activestate-speak, it's called "bound file"
23:50 labrown joined #mojo
23:51 riche it might benefit us both if we could agree on the env var for external data references
23:52 riche if found in __FILE__, use that, else... , ... then fail
23:53 sri workarounds in core for this are pretty much out of the question, we don't do unmaintainable hacks
23:55 riche I hear you, but how is using environment variable unmaintainable?  this has been defacto std in modifying behaviors since epoch
23:55 sri all those bundled files are used very differently, there are serious security implications
23:55 sri you may only care about entities.txt, but it's much bigger than that
23:56 riche understood
23:57 riche are there ways to change the environment once mojo starts?  I would think only the process owner would be able to do that?
23:57 riche hmmm
23:59 jberger riche, is there some documentation about this activestate tool and the things it does
23:59 riche yeps
23:59 rem_lex|pivo joined #mojo
23:59 jberger I'm curious
23:59 sri perhaps catalyst is a better choice in this case

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