| Time |
S |
Nick |
Message |
| 00:04 |
|
vervain |
Actually I'm interested in the answer... I know morbo does but what about an app in daemon mode? |
| 00:15 |
|
crab |
no |
| 00:15 |
|
crab |
restarting is fairly horrid. mojo::daemon is not going to touch it. |
| 00:23 |
|
|
d4rkie joined #mojo |
| 00:24 |
|
tempire |
vervain: by daemon, do you mean "myapp daemon", or do you mean hypnotoad? |
| 00:25 |
|
vervain |
myapp daemon... I've not hip to no toads yet. |
| 00:25 |
|
vervain |
s/ve/m/ |
| 00:25 |
|
tempire |
morbo is a wrapper around mojo::server::daemon |
| 00:25 |
|
tempire |
morbo being where the source change detection happens |
| 00:26 |
|
tempire |
really, you don't want to use myapp daemon |
| 00:26 |
|
tempire |
it's really just there for legacy purposes |
| 00:26 |
|
vervain |
fair. |
| 00:26 |
|
vervain |
I've used morbo so far... except for when 'playing' with the app options. |
| 00:27 |
|
sri |
tempire: not just legacy, also small time deployment |
| 00:27 |
|
sri |
windows for example |
| 00:27 |
|
tempire |
ah. you answered my next question. |
| 00:27 |
|
tempire |
windows is the only reason I can see for even bothering |
| 00:27 |
|
tempire |
considering how easy hypnotoad is |
| 00:29 |
|
|
mire joined #mojo |
| 00:29 |
|
tempire |
I thereby propose changing the daemon command to masochistic |
| 00:29 |
|
tempire |
myapp masochistic |
| 00:29 |
|
* sri |
disagrees |
| 00:30 |
|
sri |
there are more valid uses, like testing and memory constraints |
| 00:30 |
|
|
TrOx joined #mojo |
| 00:30 |
|
* tempire |
sics oogie boogie on the pumping |
| 00:30 |
|
tempire |
pumpking, even |
| 00:30 |
|
* sri |
wonders what language tempire is speaking |
| 00:31 |
|
tempire |
nightmare before christmas reference |
| 00:31 |
|
tempire |
I think of jack whenever the word pumpking is used |
| 00:31 |
|
sri |
oooh |
| 00:32 |
|
|
TrOx joined #mojo |
| 00:35 |
|
tempire |
I need a tv series that's full of happiness and hope |
| 00:35 |
|
tempire |
something that counteracts cynicism |
| 00:36 |
|
vervain |
Breaking Bad :-) |
| 00:36 |
|
sri |
:D |
| 00:39 |
|
|
D4RK-PH0ENiX joined #mojo |
| 00:39 |
|
vervain |
Is there a good idiom that doesn't explicitly use $_ in this '$total += $_ foreach ( @cost );' |
| 00:42 |
|
sri |
vervain: $total = reduce { $a + $b } @cost; |
| 00:43 |
|
vervain |
Fair... I kinda meant by still using the same method... but sure. |
| 00:44 |
|
vervain |
Remember in algebra when you had to take a large set of expressions and factor them out... I want an exercise book that does the same thing with perl ;-) |
| 00:44 |
|
sri |
tempire: did you watch community yet? |
| 00:44 |
|
tempire |
community? |
| 00:44 |
|
purl |
community is probably being killed by developers ;) |
| 00:44 |
|
tempire |
never heard of it |
| 00:44 |
|
sri |
:O |
| 00:44 |
|
sri |
the best written comedy show of all time |
| 00:46 |
|
sri |
for me it's like big bang theory, just can't stop watching |
| 00:46 |
|
tempire |
that's a tall claim |
| 00:46 |
|
tempire |
better than arrested development? |
| 00:46 |
|
sri |
just watch it |
| 00:47 |
|
tempire |
I'll check it out |
| 00:47 |
|
sri |
starts a bit slow, but character chemistry goes through the roof later on |
| 00:48 |
|
sri |
http://www.reddit.com/r/community/ # reddit has a thing for community |
| 00:49 |
|
sri |
not a single bad actor, you'll love them all |
| 00:50 |
|
sri |
JUST WATCH IT ALREADY! |
| 00:51 |
|
ccushing |
does use Mojo::Base imply any pragma's like strict or warnings? |
| 00:51 |
|
crab |
both. |
| 00:51 |
|
tempire |
https://github.com/kraih/mojo/[…]/Mojo/Base.pm#L45 |
| 00:52 |
|
sri |
better just look at the perldoc |
| 00:52 |
|
sri |
http://mojolicio.us/perldoc/Mojo/Base#DESCRIPTION |
| 00:53 |
|
ccushing |
there are like tons of freakin pods to read so working my way through them |
| 00:53 |
|
|
TrOx joined #mojo |
| 00:53 |
|
TrOx |
hiiiiiiii |
| 00:53 |
|
TrOx |
,00:D |
| 00:53 |
|
TrOx |
Mojolicious::Lite is the best |
| 00:53 |
|
TrOx |
\o/ |
| 00:54 |
|
vervain |
ccushing: have you seen the new diagram? https://github.com/kraih/mojo/wiki |
| 00:54 |
|
TrOx |
How do website for manage services linux using mojolicious ? |
| 00:55 |
|
TrOx |
exist some plugin ? |
| 00:57 |
|
ccushing |
vervain yeah I saw that briefly, but it'll be easier to read docs once I learn my way around, I'm rewriting a small api using mojo to see if it's a viable alternative to catalyst |
| 00:59 |
|
|
MojoGuest673 joined #mojo |
| 00:59 |
|
MojoGuest673 |
From: http://www.google.pl/url?sa=t&[…]RSGzdaTlaN6d3437w (1 hits) |
| 00:59 |
|
MojoGuest673 |
dsfds |
| 01:00 |
|
memowe |
sri: what do you think about the new bootylite default footer? https://skitch.com/memowe/gtq2n/bootylite-footer |
| 01:01 |
|
|
MojoGuest91 joined #mojo |
| 01:01 |
|
MojoGuest91 |
From: http://extjstutorial.org/extjs[…]extjs-irc-client/ (11 hits) |
| 01:01 |
|
memowe |
Its mojolicious-black.png and an inlined png. |
| 01:03 |
|
sri |
memowe: lol, no |
| 01:03 |
|
memowe |
you don't like it? :) |
| 01:04 |
|
|
MojoGuest302 joined #mojo |
| 01:04 |
|
MojoGuest302 |
From: http://extjstutorial.org/extjs[…]extjs-irc-client/ (12 hits) |
| 01:04 |
|
sri |
i appreciate the humor, but don't think it's the right choice to attract users :) |
| 01:06 |
|
memowe |
I'll enjoy the look for one day. And throw it away after that. ;) |
| 01:10 |
|
|
MojoGuest617 joined #mojo |
| 01:10 |
|
MojoGuest617 |
From: http://extjstutorial.org/extjs[…]extjs-irc-client/ (13 hits) |
| 01:31 |
|
|
noganex_ joined #mojo |
| 01:42 |
|
* sri |
suspects tempire has started watching community and will be afk for a few days |
| 01:43 |
|
tempire |
I'm stuffing 3 semesters of calculus into ~1 month, and I'm still jib jabbin in this derned channel. |
| 01:44 |
|
* tempire |
ain't goin nowheres |
| 01:44 |
|
sri |
\o/ |
| 01:47 |
|
sri |
tempire: http://www.youtube.com/watch?v=ayaRznft9H4 # here's an example for how well written that show is, this beetlejuice joke took 3 seasons! |
| 01:48 |
|
sri |
(evil clown behind window) |
| 01:58 |
|
|
jnap joined #mojo |
| 01:58 |
|
|
MojoGuest224 joined #mojo |
| 01:58 |
|
MojoGuest224 |
From: http://www.google.com.hk/url?s[…]D0vcKNULg&cad=rjt (1 hits) |
| 01:58 |
|
MojoGuest224 |
dasda |
| 02:03 |
|
|
MojoGuest380 joined #mojo |
| 02:03 |
|
MojoGuest380 |
From: http://www.google.com.hk/url?s[…]D0vcKNULg&cad=rjt (2 hits) |
| 02:04 |
|
tempire |
we should really get some solid presentation and linking back to mojolicious on that page. |
| 02:05 |
|
sri |
so, 7 hours till the internet ends |
| 02:05 |
|
memowe |
Good night! :) |
| 02:05 |
|
TrOx |
exist some book about mojolicious::Lite? |
| 02:06 |
|
sri |
nn |
| 02:06 |
|
TrOx |
,00:/// |
| 02:06 |
|
TrOx |
i'm sad, |
| 02:06 |
|
sri |
but seriously, if they approve SOPA we'll just build an awesome global darknet |
| 02:07 |
|
TrOx |
sri I want make the painel web for system administration |
| 02:07 |
|
tempire |
I've sent old school letters to all my representatives |
| 02:07 |
|
tempire |
so I choose to believe it won't pass until it does. |
| 02:07 |
|
tempire |
TrOx: No books, only free information. |
| 02:07 |
|
tempire |
http://mojolicio.us/perldoc |
| 02:07 |
|
purl |
http://mojolicio.us/perldoc is lovely |
| 02:08 |
|
tempire |
and http://mojocasts.com/ for easier consumption |
| 02:08 |
|
TrOx |
purl thanksss my friend |
| 02:08 |
|
purl |
my pleasure TrOx |
| 02:08 |
|
TrOx |
ok |
| 02:08 |
|
tempire |
if you're just starting with mojolicious, begin with http://mojocasts.com/e1 |
| 02:08 |
|
TrOx |
tempire thanks, i'll see now |
| 02:08 |
|
tempire |
the 4 existing mojocasts will get you up and running quickly |
| 02:08 |
|
TrOx |
ok |
| 02:10 |
|
ccushing |
what's the difference between a has and attr? and where can I find docs? |
| 02:11 |
|
tempire |
has is a pretty/moose-like wrapper around attr |
| 02:11 |
|
sri |
it's actually mentioned in the docs i linked to earlier |
| 02:13 |
|
tempire |
wow |
| 02:13 |
|
tempire |
I just can't get over how amazing bootstrap it |
| 02:13 |
|
tempire |
*is |
| 02:14 |
|
|
d4rkie joined #mojo |
| 02:18 |
|
|
mike_ joined #mojo |
| 02:46 |
|
|
mattastrophe joined #mojo |
| 02:50 |
|
|
xaka joined #mojo |
| 02:53 |
|
|
MojoGuest281 joined #mojo |
| 02:53 |
|
MojoGuest281 |
wt |
| 02:53 |
|
un44 |
/whois un44 |
| 02:53 |
|
un44 |
/fuck |
| 03:16 |
|
|
jnap joined #mojo |
| 03:22 |
|
|
metaperl joined #mojo |
| 03:35 |
|
|
Psyche^ joined #mojo |
| 05:20 |
|
|
AmeliePoulain joined #mojo |
| 05:23 |
|
|
yaxar joined #mojo |
| 06:18 |
|
|
Vandal joined #mojo |
| 06:48 |
|
|
spleenjack joined #mojo |
| 06:56 |
|
|
d4rkie joined #mojo |
| 07:07 |
|
|
koban joined #mojo |
| 07:15 |
|
|
sugar joined #mojo |
| 07:19 |
|
marcus |
bootystrap |
| 07:21 |
|
|
ispeak joined #mojo |
| 07:29 |
|
|
sugar joined #mojo |
| 07:29 |
|
|
batman joined #mojo |
| 07:29 |
|
|
plu joined #mojo |
| 07:41 |
|
sri |
marcus: just tried tm2 again, does it always change permissions when you save too? |
| 07:45 |
|
sri |
think i've updated the mojolicious bundle for tm2 btw |
| 07:48 |
|
sri |
or i actually broke it :S |
| 07:48 |
|
|
espent joined #mojo |
| 07:53 |
|
sri |
hmm, apparently it only wants to update tests |
| 08:04 |
|
plu |
sri: it does something like chmod 0755 if it can see a shebang, I think |
| 08:04 |
|
sri |
plu: yea, very annoying |
| 08:05 |
|
sri |
makes it pretty much unusable for me |
| 08:20 |
|
|
batman left #mojo |
| 08:22 |
|
|
batman joined #mojo |
| 08:23 |
|
plu |
at least I hope it will be configurable at some point |
| 08:25 |
|
|
cosmincx joined #mojo |
| 08:42 |
|
marcus |
what's wrong with executable for files with shebangs? |
| 08:48 |
|
|
alanhaggai joined #mojo |
| 08:49 |
|
alanhaggai |
How can a flash variable be accessed from embedded Perl? |
| 08:50 |
|
marcus |
alanhaggai: <%= flash 'foo' %> |
| 08:52 |
|
alanhaggai |
marcus: Thank you. I was expecting it to be found in Mojolicious::Guides::Rendering documentation. :-) |
| 08:54 |
|
marcus |
alanhaggai: there is a link to http://mojolicio.us/perldoc/Mo[…]in/DefaultHelpers in the Rendering guide. |
| 08:55 |
|
alanhaggai |
marcus: Oh I see. Thanks again. |
| 08:55 |
|
marcus |
you're welcome =) |
| 08:56 |
|
alanhaggai |
marcus: By the way, wish you a belated happy birthday! I hope you had a great one! :-) |
| 08:57 |
|
marcus |
alanhaggai: mostly celebrated on facebook :) But had a very nice quiet family dinner. |
| 08:57 |
|
alanhaggai |
:-) |
| 08:57 |
|
|
berov joined #mojo |
| 09:04 |
|
|
berov joined #mojo |
| 09:06 |
|
|
MojoGuest475 joined #mojo |
| 09:06 |
|
MojoGuest475 |
From: http://www.google.pl/url?sa=t&[…]RSGzdaTlaN6d3437w (2 hits) |
| 09:08 |
|
|
MojoGuest138 joined #mojo |
| 09:08 |
|
MojoGuest138 |
From: http://www.google.pl/url?sa=t&[…]RSGzdaTlaN6d3437w (3 hits) |
| 09:25 |
|
sri |
marcus: my tests have a shebang |
| 09:26 |
|
sri |
same for example scripts |
| 09:40 |
|
marcus |
sri: why do the tests have it, if they aren't meant to be executed? And why shouldn't the example scripts be executable? |
| 09:40 |
|
marcus |
I thought the whole idea of having a shebang is so you can execute it. |
| 09:46 |
|
|
sugar_ joined #mojo |
| 10:09 |
|
|
judofyr joined #mojo |
| 10:09 |
|
judofyr |
sri: is there a simple way to create a Mojo::Message::Response with some body and status code? I need it to test a library… |
| 10:12 |
|
|
alnewkirk joined #mojo |
| 10:12 |
|
sri |
marcus: they are perl scripts after all, you add a shebang to Makefile.PL too |
| 10:13 |
|
sri |
judofyr: Mojo::Message::Response->new |
| 10:13 |
|
marcus |
sri: and I expect Makefile.PL to be executable. |
| 10:13 |
|
sri |
really? |
| 10:13 |
|
sri |
i thought common convention was to not have it executable |
| 10:14 |
|
crab |
i don't think i've ever run Makefile.PL by itself, only as perl Makefile.PL |
| 10:14 |
|
crab |
and i don't think i've ever made them executab;e in my modules either. |
| 10:15 |
|
judofyr |
sri: yeah, but Mojo::Message::Response->new(body => "foo", code => 200) didn't work as expected :/ |
| 10:16 |
|
sri |
body is not an attribute |
| 10:16 |
|
judofyr |
yes, I know. so how do I pass in the body? |
| 10:16 |
|
sri |
using the method |
| 10:17 |
|
judofyr |
doh, I guess that what I get for looking for docs in the wrong place… |
| 10:20 |
|
sri |
it's true that those shebang lines do look like wasted bytes |
| 10:23 |
|
judofyr |
is there a built-in function for splitting an array? my ($foo, $bar) = split { $_ > 5 } (1 .. 10) |
| 10:32 |
|
crab |
judofyr: no, but look in List::Util |
| 10:34 |
|
|
GitHub77 joined #mojo |
| 10:34 |
|
GitHub77 |
[mojo] kraih pushed 1 new commit to master: http://git.io/yKQZgA |
| 10:34 |
|
GitHub77 |
[mojo/master] removed useless shebang lines - Sebastian Riedel |
| 10:34 |
|
|
GitHub77 left #mojo |
| 10:35 |
|
sri |
i still don't want my editor to chmod my files, but i agree that the shebangs are wasted bytes |
| 10:36 |
|
|
metaperl joined #mojo |
| 10:36 |
|
|
Andrei666 joined #mojo |
| 10:39 |
|
crab |
editors use them to detect the filetype |
| 10:39 |
|
sri |
.t ending should work |
| 10:39 |
|
crab |
.t == troff |
| 10:39 |
|
crab |
:-) |
| 10:40 |
|
sri |
well, vim and textmate detect them fine |
| 10:43 |
|
|
GitHub137 joined #mojo |
| 10:43 |
|
GitHub137 |
[mojo] kraih pushed 1 new commit to master: http://git.io/L_8R9g |
| 10:43 |
|
GitHub137 |
[mojo/master] readded two shebang lines for more realistic tests - Sebastian Riedel |
| 10:43 |
|
|
GitHub137 left #mojo |
| 10:44 |
|
|
jpmcallister joined #mojo |
| 11:05 |
|
marcus |
hmm, I guess I don't understand how forks and COW works |
| 11:05 |
|
crab |
you stick the fork in the cow, and raise it to your mouth, and go chomp |
| 11:05 |
|
marcus |
we have a class that reads from DATA, and it works fine on morbo, but in hypnotoad only one of the children got data. |
| 11:05 |
|
crab |
(some preparation required) |
| 11:06 |
|
marcus |
fixed it now by adding a seek to go back, but I don't understand why the DATA fh would be shared, while the env is in each child |
| 11:06 |
|
marcus |
crab: I don't trust indians when it comes to BBQing cows. |
| 11:07 |
|
sri |
marcus: DATA sucks, it works different from platform to platform |
| 11:08 |
|
rafl |
marcus: the DATA filehandle is probably opened before the fork and therefore shared with all children. you might want to look at modules such as Data::Section that give you a little protection there |
| 11:08 |
|
rafl |
but mostly what sri said |
| 11:08 |
|
marcus |
makes some sense |
| 11:09 |
|
sri |
Mojo::Command has DATA tools too |
| 11:11 |
|
crab |
hmm. i've forgotten how DATA works. if you seek to SEEK_SET 0 and read, do you get your source code? (if not, why not?) |
| 11:11 |
|
sri |
crab: both actually |
| 11:11 |
|
sri |
deprending on platform :) |
| 11:12 |
|
crab |
heh. great. |
| 11:12 |
|
rafl |
the accepted approach seems to be to read DATA eagerly and share the resulting data with forked children instead of having them re-read it |
| 11:12 |
|
crab |
it would be better to read... yeah, what e said. |
| 11:13 |
|
sri |
https://github.com/kraih/mojo/[…]o/Command.pm#L100 |
| 11:13 |
|
sri |
that little hack has served us well over the years |
| 11:16 |
|
crab |
refer to jquery on google cdn, and serve bits of jquery-ui plus custom code from my server? or refer to jquery and (full) jquery-ui on cdn and serve only my code? decisions, decisions. |
| 11:17 |
|
crab |
weighing transfer amount vs. http requests is really hard. |
| 11:25 |
|
vervain |
I know you folks tend to use twitter clients... is there a single one that covers windows, linux and android? |
| 11:52 |
|
Andrei666 |
hello, I have a question |
| 11:52 |
|
Andrei666 |
in a controller I return $self->render( template => 'test/tab/index' ); |
| 11:53 |
|
Andrei666 |
and unfortunately morbo doesn't find the file.. |
| 11:53 |
|
Andrei666 |
even if it's there.. |
| 11:53 |
|
Andrei666 |
from morbo I get [debug] Template "test/tab/index.html.ep" not found. |
| 11:53 |
|
Andrei666 |
but it is there... |
| 12:03 |
|
|
ispeak joined #mojo |
| 12:04 |
|
memowe |
where? |
| 12:05 |
|
Andrei666 |
in template/test/tab/index.html.ep |
| 12:05 |
|
alanhaggai |
Andrei666: Did you register the route in the startup subroutine? |
| 12:05 |
|
memowe |
Maybe you should rename your template directory to 'templates' |
| 12:06 |
|
Andrei666 |
i mean templates/... |
| 12:06 |
|
memowe |
ok. ;) |
| 12:06 |
|
Andrei666 |
where should I register the route...? |
| 12:06 |
|
Andrei666 |
i guess it is registered..because my other colleagues do use it, and it works for themm |
| 12:07 |
|
alanhaggai |
Oh I see. |
| 12:14 |
|
DaTa |
https://secure.flickr.com/phot[…]/with/6509400929/ HTTP Status Cats ;) |
| 12:19 |
|
Andrei666 |
anyone? |
| 12:19 |
|
purl |
Somewhere, someplace, in some universe, somebody uses whatever you just asked about. |
| 12:20 |
|
Andrei666 |
purl: i guess your right...thanks :D |
| 12:20 |
|
purl |
sure thing Andrei666 |
| 12:23 |
|
Andrei666 |
so..does anyone know why morbo doesn't find my template even if I specify the address? |
| 12:23 |
|
vervain |
I just did a test... I get that error message if my permissions are wrong. Have you checked filesystem permissions? |
| 12:28 |
|
Andrei666 |
yes, it has -rw-r--r--. 1 root root 67 Dec 14 18:08 index.html.ep |
| 12:28 |
|
Andrei666 |
does it need more that that? |
| 12:28 |
|
Andrei666 |
like w and x? |
| 12:28 |
|
vervain |
How about the directories leading up to it? |
| 12:29 |
|
Andrei666 |
drwxr-xr-x. 2 root root 4096 Dec 15 10:27 tab |
| 12:29 |
|
Andrei666 |
drwxr-xr-x. 7 root root 4096 Dec 15 10:24 test |
| 12:30 |
|
vervain |
<shrug>Honestly I don't know enough about your environment... I know if it were mine that path wouldn't be owned by root. |
| 12:30 |
|
Andrei666 |
ok.. |
| 12:30 |
|
Andrei666 |
it's a red hat linux 6 |
| 12:30 |
|
vervain |
What do you get when you 'cat ./templates/test/tab/index.html.ep' from the same dir that you are running your app from and as the same user. |
| 12:30 |
|
vervain |
I don't mean you OS... I mean your development environment/style. |
| 12:30 |
|
Andrei666 |
-bash: cat ./templates/test/tab/index.html.ep: No such file or directory |
| 12:30 |
|
Andrei666 |
very weird |
| 12:31 |
|
Andrei666 |
but I see it there.. |
| 12:31 |
|
Andrei666 |
and I can open it.. |
| 12:31 |
|
vervain |
Uh... no... cat tried to 'open it' |
| 12:31 |
|
Andrei666 |
k |
| 12:31 |
|
Andrei666 |
so? |
| 12:31 |
|
purl |
or stack overflow (dot com, it's .NET!) |
| 12:31 |
|
vervain |
how about ls -l ./templates/test/tab/index.html.ep from the same spot? |
| 12:32 |
|
Andrei666 |
ls: cannot access /templates/test/tab/index.html.ep: No such file or directory |
| 12:32 |
|
Andrei666 |
hmm |
| 12:32 |
|
Andrei666 |
this is weird |
| 12:32 |
|
Andrei666 |
should I do a chmod on the files? |
| 12:33 |
|
crab |
data: i liek 405 best |
| 12:33 |
|
vervain |
The path from the ls command didn't have the leading ./ on it. |
| 12:35 |
|
Andrei666 |
so with a dot in front of it |
| 12:35 |
|
Andrei666 |
-rw-r--r--. 1 root root 67 Dec 14 18:08 ./templates/test/tab/index.html.e |
| 12:36 |
|
Andrei666 |
and did cat on it again |
| 12:36 |
|
marty |
moo |
| 12:36 |
|
vervain |
Should that have a trailing p? |
| 12:36 |
|
Andrei666 |
and it shows me it's content |
| 12:36 |
|
Andrei666 |
vervain: a trailing p? |
| 12:36 |
|
vervain |
In which case I'm plumb out of ideas... sorry. |
| 12:36 |
|
Andrei666 |
ok |
| 12:36 |
|
Andrei666 |
thanks :) |
| 12:37 |
|
crab |
andrei: are you actually cut and pasting output from ls? |
| 12:37 |
|
vervain |
In the path you pasted with the last ls command it ended in ...html.e |
| 12:37 |
|
crab |
or are you typing it in? |
| 12:37 |
|
Andrei666 |
i'm cutting and pasting |
| 12:38 |
|
Andrei666 |
and I've missed that 'p' |
| 12:38 |
|
Andrei666 |
the name is ok |
| 12:38 |
|
Andrei666 |
-rw-r--r--. 1 root root 67 Dec 14 18:08 templates/test/tab/index.html.ep |
| 12:38 |
|
Andrei666 |
Template "test/tab/index.html.ep" not found. |
| 12:38 |
|
Andrei666 |
:( |
| 12:38 |
|
crab |
weird. |
| 12:38 |
|
Andrei666 |
yes...:( |
| 12:38 |
|
Andrei666 |
sadly |
| 12:39 |
|
crab |
so why did cat say no such file or directory earlier? |
| 12:39 |
|
crab |
if you cut and paste the file from ls and run cat, it works? but if you type the filename, it doesn't work? |
| 12:39 |
|
Andrei666 |
it does work with cat also |
| 12:39 |
|
crab |
that sounds like weird characters in the path or something. |
| 12:40 |
|
Andrei666 |
before I rushed and left '' before cat and after the filename |
| 12:40 |
|
Andrei666 |
but cat can also see it.. |
| 12:40 |
|
Andrei666 |
ls the same.. |
| 12:40 |
|
Andrei666 |
only morbo isn't |
| 12:40 |
|
crab |
oh. |
| 12:41 |
|
crab |
does morbo find other templates? |
| 12:41 |
|
Andrei666 |
yes it does |
| 12:41 |
|
vervain |
Andrei666: Create a myapp.pl with just this: https://gist.github.com/1480965 |
| 12:41 |
|
Andrei666 |
Rendering template "test/generic.html.ep". |
| 12:41 |
|
vervain |
Put it in the same root as ./templates |
| 12:41 |
|
vervain |
run it with 'morbo myapp.pl' |
| 12:42 |
|
Andrei666 |
ok |
| 12:45 |
|
Andrei666 |
[Thu Dec 15 11:34:23 2011] [debug] Template "test/tab/index.html.ep" not found. [Thu Dec 15 11:34:23 2011] [debug] Nothing has been rendered, assuming delayed response. |
| 12:45 |
|
Andrei666 |
:( |
| 12:46 |
|
marcus |
do you have a templates/test/tab/index.html.ep ? |
| 12:46 |
|
Andrei666 |
yes i do |
| 12:46 |
|
marcus |
vervain: those are all the platforms I don't use ;) |
| 12:46 |
|
vervain |
marcus: it's also been confirmed by running ls, and cat |
| 12:47 |
|
|
sugar_ joined #mojo |
| 12:47 |
|
marcus |
Andrei666: do ls templates/test/tab |
| 12:48 |
|
marcus |
vervain: actually, ls doesn't show the full path like he pasted for a file in a dir |
| 12:48 |
|
marcus |
vervain: looks more like he made a filename with slashes in it |
| 12:48 |
|
vervain |
marcus: Fair... the answer was staring me in the face the whole time anyway... libpurple once again. |
| 12:48 |
|
marcus |
somehow |
| 12:48 |
|
Andrei666 |
ls templates/test/tab/ index.html.ep |
| 12:48 |
|
marcus |
hmmmmm |
| 12:49 |
|
marcus |
no idea then |
| 12:49 |
|
Andrei666 |
marcus: i know...i've been struggling with this for the last 2-3 days |
| 12:50 |
|
marcus |
Andrei666: which platform are you on? |
| 12:50 |
|
marcus |
linux? |
| 12:50 |
|
purl |
well, linux is linux is linux by another name. or 80% of the world's top 500 super computers right now and the number one embedded system http://broadcast.oreilly.com/2[…]-more-device.html or not a company |
| 12:50 |
|
vervain |
Andrei666: just to make sure we are on the same page |
| 12:50 |
|
Andrei666 |
red hat 6 |
| 12:50 |
|
vervain |
mv templates templates.bak |
| 12:51 |
|
vervain |
mkdir -p templates/test/tab |
| 12:51 |
|
vervain |
echo "Hello World" > templates/test/tab/index.html.ep |
| 12:51 |
|
Andrei666 |
ok |
| 12:51 |
|
vervain |
run your app. |
| 12:53 |
|
Andrei666 |
Template "test/tab/index.html.ep" not found. |
| 12:53 |
|
Andrei666 |
Nothing has been rendered, assuming delayed response. |
| 12:53 |
|
vervain |
run 'pwd' |
| 12:53 |
|
marcus |
\o/ |
| 12:53 |
|
Andrei666 |
the weirdest thing..is ..if I write the path in the address bar in firefox |
| 12:54 |
|
Andrei666 |
it does...show me Hello World |
| 12:54 |
|
Andrei666 |
pwd: /var/www/html/Web_Core/nmsweb |
| 12:54 |
|
vervain |
There is nothing weird about firefox doing what cat does. ;-) |
| 12:54 |
|
marcus |
so what doesn't actually work? |
| 12:54 |
|
vervain |
:-) |
| 12:54 |
|
marcus |
just the warnings in the log? |
| 12:55 |
|
Andrei666 |
not just that....morbo doesn't find the template...to be renderd |
| 12:55 |
|
marcus |
Andrei666: but you just said it rendered it |
| 12:55 |
|
marcus |
in firefox |
| 12:55 |
|
Andrei666 |
true.. |
| 12:55 |
|
Andrei666 |
if I write the path directly |
| 12:55 |
|
marcus |
or do you mean path as in file:// ? |
| 12:55 |
|
Andrei666 |
i mean |
| 12:55 |
|
|
marty joined #mojo |
| 12:55 |
|
Andrei666 |
http://10.1.9.217/test/tab/index |
| 12:56 |
|
vervain |
It looks to me like you are playing in a directory that might also be served up by an other server |
| 12:56 |
|
vervain |
Probably not a great idea. |
| 12:56 |
|
marcus |
Andrei666: maybe your app has changed app->renderer->root |
| 12:56 |
|
vervain |
marcus: I got him to try a stripped down lite app. |
| 12:56 |
|
Andrei666 |
vervain: what do you mean by: served up by an other server |
| 12:57 |
|
vervain |
An other web server (running on port 80) is serving pages from that directory and it's sub directories. |
| 12:58 |
|
Andrei666 |
morbo is the only one running on 80 |
| 12:58 |
|
Andrei666 |
i'm alone on this machine |
| 12:59 |
|
marty |
moin |
| 12:59 |
|
vervain |
Then my first question is why port 80... why root? |
| 13:00 |
|
|
arpadszasz joined #mojo |
| 13:01 |
|
Andrei666 |
port 80 is just because I don't want to specify port :3000 everytime |
| 13:01 |
|
Andrei666 |
and the user root? |
| 13:01 |
|
crab |
i suspect that andrei's boss has done something horrendous to the routing in the app, and that's why it breaks. |
| 13:01 |
|
Andrei666 |
crab: thanks you |
| 13:01 |
|
Andrei666 |
:D |
| 13:01 |
|
vervain |
Not his boss... his 'project manager' :-) |
| 13:02 |
|
Andrei666 |
my project leader set this VM up for me |
| 13:02 |
|
Andrei666 |
vervain: (bow) |
| 13:02 |
|
sri |
what does "perl script/myapp eval -v 'app->renderer->root'" say? |
| 13:02 |
|
sri |
myapp being your app script |
| 13:02 |
|
vervain |
andrea: dice, monster, indeed ;-) |
| 13:03 |
|
vervain |
s/ea/ei/ ;-) |
| 13:03 |
|
crab |
hmm. 'Template "$t" not found' is actually a message from Plugin::EPLRenderer |
| 13:03 |
|
Andrei666 |
sri: should I copy apste here? |
| 13:03 |
|
sri |
wherever you tested what the others told you |
| 13:04 |
|
Andrei666 |
sri: /var/www/html/Web_Core/nmsweb/templates |
| 13:04 |
|
sri |
is that the correct directory? |
| 13:04 |
|
Andrei666 |
for the templates, yes |
| 13:04 |
|
Andrei666 |
the whole app is in /nmsweb/ |
| 13:04 |
|
purl |
Hmm. No matches for that, Andrei666. |
| 13:04 |
|
sri |
then that's ok |
| 13:05 |
|
marcus |
so cat /var/www/html/Web_Core/nmsweb/templatestest/tab/index.html is fine? |
| 13:05 |
|
marcus |
shows hello world? |
| 13:05 |
|
sri |
.ep |
| 13:05 |
|
marcus |
and templates/test |
| 13:05 |
|
Andrei666 |
yes |
| 13:05 |
|
marcus |
cat /var/www/html/Web_Core/nmsweb/templates/test/tab/index.html.ep ... |
| 13:05 |
|
marcus |
hmm |
| 13:05 |
|
Andrei666 |
it show content for index.html |
| 13:06 |
|
* vervain |
thinks andrei's environment is seriously borken |
| 13:07 |
|
vervain |
What I mean earlier by 'root' is that you must be running as root to run on port 80. |
| 13:07 |
|
vervain |
And various things you've said lead me to think that you might be doing everything as root... |
| 13:08 |
|
vervain |
which means when it breaks you get to keep both pieces. ;-) |
| 13:08 |
|
Andrei666 |
yes, I'm running as root, again my project leader, set the machine up for me... |
| 13:09 |
|
crab |
andrei: perl -Mojo -e 'a("/" => sub {shift->render(template => "test/tab/index")})->start' get / |
| 13:09 |
|
crab |
andrei: that fails, right? |
| 13:10 |
|
marcus |
while standing in nmsweb |
| 13:10 |
|
Andrei666 |
i get no message ... |
| 13:10 |
|
crab |
andrei: sorry, add MOJO_LOG_LEVEL=debug at the beginning (before perl) |
| 13:10 |
|
Andrei666 |
k |
| 13:10 |
|
crab |
but get no message means it's "assuming delayed response" etc. |
| 13:11 |
|
Andrei666 |
Rendering template "test/tab/index.html.ep". |
| 13:11 |
|
crab |
so it works? |
| 13:11 |
|
Andrei666 |
Global symbol "$_test1_var" requires explicit package name at template "test/tab/index.html.ep" line 1, near "<br />". |
| 13:11 |
|
crab |
ok. it works. |
| 13:11 |
|
vervain |
Since mojo has an event loop is it possible to use it as a 'cron'? |
| 13:11 |
|
judofyr |
what's the best solution if I want a timeout on one Mojo::UserAgent-call? |
| 13:11 |
|
Andrei666 |
$_test1_var is a scalar from the controller/actiomn |
| 13:12 |
|
crab |
vervain: you can set timers and callbacks, sure |
| 13:12 |
|
vervain |
v.interesting!!! |
| 13:12 |
|
crab |
Andrei: ok, so it finds the template. so there's something in your app setup that breaks it. |
| 13:12 |
|
Andrei666 |
hmm |
| 13:12 |
|
Andrei666 |
i guess you're right.. |
| 13:12 |
|
* vervain |
ponders the validity of making simple emailing lists running from same daemon as web app. |
| 13:13 |
|
judofyr |
vervain: https://metacpan.org/module/Mojo::IOLoop see timer and recurring |
| 13:13 |
|
crab |
i was hoping that the problem was more interesting, i was going to ask you to do MOJO_LOG_LEVEL=debug strace -etrace=file perl -Mojo -e 'a("/" => sub {shift->render(template => "test/tab/index")})->start' get / 2>&1 | grep index :-) |
| 13:13 |
|
sri |
judofyr: have a timer set an error on the transaction, that will trigger an early stop |
| 13:13 |
|
sri |
it's untested though |
| 13:14 |
|
crab |
vervain: what, like that zed shaw's lampoon or whatever library? |
| 13:14 |
|
judofyr |
sri: hm? how "set an error"? |
| 13:14 |
|
Andrei666 |
crab: i did that...and I get a bunch of lstat, open...and some other stuff |
| 13:14 |
|
crab |
andrei: but it doesn't help you, since it finds the template after all |
| 13:14 |
|
sri |
judofyr: i suppose i shouldn't explain it, since it's untested and may not work reliably |
| 13:15 |
|
Andrei666 |
crab: right... |
| 13:15 |
|
crab |
you can try to do it with your real app, but the output is probably going to be a lot, duno if it will help |
| 13:15 |
|
Andrei666 |
crab: so I should look in my controllers...?? |
| 13:15 |
|
judofyr |
sri: so what's the best solution? put a timer on the same callback and make sure it only runs the code once? |
| 13:16 |
|
sri |
judofyr: there is no tested solution |
| 13:16 |
|
sri |
many that may work, but no best one |
| 13:16 |
|
crab |
Andrei: you should look in your startup sub and see what sort of routes are leading to your controller |
| 13:17 |
|
sri |
you can set a transaction error, set the connection timeout extremely low, force a connection close, force a connection error… and so on |
| 13:17 |
|
crab |
Andrei: but i'm scared, because i'm not sure i want to know the answer |
| 13:17 |
|
Andrei666 |
crab: ok...me too :P |
| 13:18 |
|
sri |
and since tests for aborting something timing sensitive are rather tricky i'm actually not very keen on formalzing a best way |
| 13:19 |
|
Andrei666 |
crab: return 'NMSWeb::Module::'.$module.'::Controller::'.$controller; |
| 13:19 |
|
Andrei666 |
crab: does it make sense? |
| 13:19 |
|
crab |
where is that? |
| 13:20 |
|
Andrei666 |
crab: so in my app, the only thing related to routes that I've found was this |
| 13:20 |
|
Andrei666 |
crab; has routes => sub { NMSWeb::Routes->new }; |
| 13:20 |
|
Andrei666 |
and I went there... and that's the only thing..that...makes sense.. |
| 13:20 |
|
judofyr |
Faye in Mojolicious would be nice: http://web.archive.org/web/201[…]faye.jcoglan.com/ |
| 13:20 |
|
sri |
http://mapofcpan.org # this is cute, there's a tiny mojolicious in the middle |
| 13:22 |
|
crab |
wait, your fearless leader wrote his own router? |
| 13:22 |
|
sri |
(you have to zoom in once, it's on the right side of Net) |
| 13:22 |
|
Andrei666 |
crab: yes |
| 13:23 |
|
sri |
Andrei666: that is information you mention when you ask the first question |
| 13:23 |
|
* crab |
runs away screaming |
| 13:23 |
|
crab |
sri: he didn't know until just now |
| 13:23 |
|
* sri |
runs screaming after crab |
| 13:24 |
|
crab |
or well, maybe he did. i dunno. |
| 13:24 |
|
Andrei666 |
crab: the app is kind of huge, and I do just a small part of it... |
| 13:25 |
|
Andrei666 |
crab: yes..my team leader... writes the main part of it |
| 13:25 |
|
sri |
well, with a custom router there is prolly nobody besides your team leader that can help |
| 13:25 |
|
Andrei666 |
sri: ok, thanks :) |
| 13:26 |
|
Andrei666 |
sri: it clarifies a lot for me :) |
| 13:26 |
|
marcus |
I liked that perl6 to p5 / js compiler |
| 13:27 |
|
marcus |
want to try to write a mojolicious app using it |
| 13:27 |
|
* sri |
too |
| 13:27 |
|
sri |
heh |
| 13:27 |
|
marcus |
perl6 can be coffescript for perl :) |
| 13:27 |
|
crab |
andrei: what does the app do |
| 13:27 |
|
crab |
? |
| 13:27 |
|
vervain |
break |
| 13:27 |
|
sri |
i've actually used the perl5 bridge to access mojolicious from perl6 before |
| 13:28 |
|
crab |
vervain: heh |
| 13:29 |
|
Andrei666 |
crab: in the end it will be a app the monitors satellite parameters |
| 13:29 |
|
Andrei666 |
crab: they are trying to write ver2 with mojo.. |
| 13:30 |
|
Andrei666 |
crab: atm we're just writing big building blocks |
| 13:30 |
|
crab |
andrei: is your job to write the alerts when the satellite is going out of control? :-) |
| 13:30 |
|
Andrei666 |
crab: I wish..:D..... |
| 13:30 |
|
Andrei666 |
crab: I'm trying to build an regular app right now, they'll deal with content later.. |
| 13:31 |
|
|
rem_lex| joined #mojo |
| 13:34 |
|
crab |
i'm curious about why you need a custom router. |
| 13:40 |
|
Andrei666 |
crab: i don't know mate.. really... |
| 13:41 |
|
crab |
sri: area is proportional to dependent modules? |
| 13:41 |
|
sri |
crab: i think it's just distributions in namespace |
| 13:41 |
|
crab |
no, that doesn't seem likely. number of modules in top-level namespace? |
| 13:41 |
|
crab |
yeah |
| 13:42 |
|
crab |
it's weird, i keep wanting the blue spaces to be something |
| 13:42 |
|
sri |
the ocean of lonely modules |
| 13:42 |
|
Andrei666 |
crab: it's weird because if a have a folder /templates/Tabs/index.html.ep |
| 13:42 |
|
Andrei666 |
it renders it... |
| 13:43 |
|
Andrei666 |
but if a but it in /templates/test/tab/index.html.ep it doesn't |
| 13:44 |
|
|
inokenty joined #mojo |
| 13:47 |
|
crab |
something about how many directories deep it is |
| 13:53 |
|
|
abra joined #mojo |
| 13:56 |
|
memowe |
BUILDING MOJOLICIOUS 2.37 ON MY NEW INSTALLED 5.14.2! HELL YEAH! #AWESOMNESS |
| 13:57 |
|
sri |
YOU CAN DO IT! |
| 13:58 |
|
memowe |
> du -hs perl5 |
| 13:58 |
|
memowe |
274M perl5 |
| 13:58 |
|
memowe |
Wow... |
| 14:04 |
|
|
amoore joined #mojo |
| 14:08 |
|
|
alanhaggai joined #mojo |
| 14:13 |
|
|
jnap joined #mojo |
| 14:16 |
|
|
vervain joined #mojo |
| 14:30 |
|
|
simengangstad joined #mojo |
| 14:31 |
|
|
simengangstad joined #mojo |
| 14:33 |
|
|
rem_lex| joined #mojo |
| 14:34 |
|
|
koban left #mojo |
| 14:36 |
|
|
baton8_ joined #mojo |
| 14:37 |
|
simengangstad |
how do we implement bootstrap in mojolicious? |
| 14:45 |
|
|
trone joined #mojo |
| 14:49 |
|
memowe |
simengangstad: implement? |
| 14:50 |
|
simengangstad |
yes how do ido it? |
| 14:50 |
|
memowe |
You just use it. |
| 14:50 |
|
memowe |
Like in Mojoforum. |
| 14:50 |
|
memowe |
Or, since last night, in bootylite. |
| 14:56 |
|
memowe |
simengangstad: https://gist.github.com/1481374 |
| 14:56 |
|
simengangstad |
so you just write it in? You dont have to downlaod anything? |
| 14:56 |
|
stephan48 |
memowe: bootylite bootstrap? |
| 14:57 |
|
memowe |
stephan48: bootybootybooty! :) |
| 14:57 |
|
stephan48 |
bootystraplite? |
| 14:57 |
|
simengangstad |
yes i think so |
| 14:58 |
|
memowe |
stephan48: http://skitch.com/memowe/gtq2n/bootylite-footer |
| 14:58 |
|
memowe |
simengangstad: line 22 in my gist loads the bootstrap css file. |
| 14:59 |
|
memowe |
simengangstad: in line 15, I use a bootstrap class. |
| 14:59 |
|
memowe |
simengangstad: bootstrap is just css (and sometimes js). |
| 15:00 |
|
sri |
so, the SOPA vote is now? |
| 15:00 |
|
simengangstad |
class="btn" ehere |
| 15:00 |
|
simengangstad |
where you implement? |
| 15:00 |
|
memowe |
simengangstad: the css class btn is defined in the bootstrap css file. You can load it directly in your browser and find out, how it's defined. |
| 15:03 |
|
stephan48 |
memowe: looks cool! |
| 15:04 |
|
memowe |
Not really. ;) |
| 15:05 |
|
simengangstad |
so there: <link rel="stylesheet" type="text/css" href="http://twitter.github.com/boot[…]bootstrap.min.css"> |
| 15:05 |
|
simengangstad |
? |
| 15:06 |
|
Quai |
the hotlink url are often slow and non-responsive.. I would have downloaded the file and placed it somewhere in the public/ folder |
| 15:06 |
|
memowe |
simengangstad: that should work. |
| 15:06 |
|
memowe |
Quai: for prototyping I think it works fine. |
| 15:07 |
|
memowe |
For anything else we would create our own css files for sure. |
| 15:07 |
|
|
ispeak joined #mojo |
| 15:08 |
|
Quai |
I did that yesterday, but gave up. I had to reload the page multiple times to get it to show. |
| 15:08 |
|
stephan48 |
memowe: you dont think that it looks cool? |
| 15:08 |
|
memowe |
stephan48: it doesn't look cool enough to ship bootylite with it. |
| 15:10 |
|
stephan48 |
:( |
| 15:11 |
|
memowe |
stephan48: das letzte Wort ist noch nicht gesprochen. Wenn ich das in richtig schön hinbekomme, kommt es vielleicht doch noch rein. ;) |
| 15:11 |
|
stephan48 |
:) |
| 15:12 |
|
crab |
is that supposed to be a very small pair of buttocks? |
| 15:13 |
|
memowe |
crab: it's all in your head! |
| 15:15 |
|
memowe |
Quai: sorry. Here it "just worked". #bootstrap |
| 15:20 |
|
|
abra_ joined #mojo |
| 15:21 |
|
|
gshank joined #mojo |
| 15:24 |
|
memowe |
later. :) |
| 15:26 |
|
|
metaperl joined #mojo |
| 15:29 |
|
sri |
marcus: http://1p1e1.tumblr.com/post/1[…]ext-2-code-like-a # tempting |
| 15:29 |
|
sri |
smart code completion seems pretty cool |
| 15:31 |
|
marcus |
sri: good luck. I didn't get along with sublime |
| 15:32 |
|
sri |
me neither, maybe it got better in the meantime though |
| 15:32 |
|
sri |
it gets daily updates after all |
| 15:41 |
|
|
kaare joined #mojo |
| 16:13 |
|
|
rem_lex|pivo joined #mojo |
| 16:16 |
|
|
mire joined #mojo |
| 16:18 |
|
marcus |
sri: Y U MAKE etag bugs? |
| 16:18 |
|
marcus |
:) |
| 16:19 |
|
crab |
what IS the status header anyway? is it just that cgi hack to set the response status code? |
| 16:22 |
|
|
tabbi joined #mojo |
| 16:22 |
|
|
tabbi left #mojo |
| 16:23 |
|
|
MojoGuest444 joined #mojo |
| 16:23 |
|
MojoGuest444 |
From: http://blog.kraih.com/perl-is-ready-for-html5 (75 hits) |
| 16:23 |
|
crab |
should i just add it back? |
| 16:24 |
|
MojoGuest444 |
:o |
| 16:24 |
|
crab |
yes. doing now. |
| 16:25 |
|
|
MojoGuest641 joined #mojo |
| 16:25 |
|
MojoGuest641 |
From: http://dev.xantus.org/ (5 hits) |
| 16:26 |
|
jacc |
/query garu |
| 16:27 |
|
jacc |
client with bugs :D |
| 16:27 |
|
jacc |
bye |
| 16:28 |
|
|
GitHub169 joined #mojo |
| 16:28 |
|
GitHub169 |
[mojo] amenonsen pushed 1 new commit to master: http://git.io/zpE52A |
| 16:28 |
|
GitHub169 |
[mojo/master] Add the status() method that was removed in commit 6533277 (closes #245) - Abhijit Menon-Sen |
| 16:28 |
|
|
GitHub169 left #mojo |
| 16:29 |
|
|
random joined #mojo |
| 16:33 |
|
garu |
but... but... he hasn't actually /queried me =O |
| 16:46 |
|
|
MojoGuest293 joined #mojo |
| 16:46 |
|
MojoGuest293 |
From: http://www.google.co.jp/url?sa[…]VHzdkUmBzfeMUdemA (1 hits) |
| 16:50 |
|
|
alanhaggai_ joined #mojo |
| 16:50 |
|
garu |
MojoGuest293: hello, welcome to #mojo :) |
| 16:51 |
|
|
mattastrophe joined #mojo |
| 16:54 |
|
tempire |
I've never watched a congress session before |
| 16:54 |
|
tempire |
This is really depressing |
| 16:54 |
|
tempire |
These people have no idea what they're talking about |
| 16:55 |
|
tempire |
even the ones that are fighting against sopa |
| 16:55 |
|
|
xaka joined #mojo |
| 17:40 |
|
crab |
http://www.geek.com/articles/g[…]veryone-20111215/ |
| 17:43 |
|
memowe |
For everyone!? Noo, I don't want an IE! |
| 17:53 |
|
|
grim_fandango joined #mojo |
| 18:00 |
|
vervain |
tempire: do you have a good link to a live stream? |
| 18:02 |
|
tempire |
vervain: http://judiciary.house.gov/hea[…]ark_12152011.html |
| 18:17 |
|
|
inokenty left #mojo |
| 18:24 |
|
|
mattastrophe joined #mojo |
| 18:26 |
|
|
random joined #mojo |
| 18:30 |
|
|
batman joined #mojo |
| 18:30 |
|
|
mire joined #mojo |
| 18:45 |
|
|
simengangstad joined #mojo |
| 18:56 |
|
|
random joined #mojo |
| 19:10 |
|
|
abra joined #mojo |
| 19:45 |
|
|
kaare joined #mojo |
| 19:51 |
|
elb0w_ |
If I have a file.xlsx and I want to pop up a download for it on a route what do i do? |
| 19:51 |
|
elb0w_ |
set the type to something? |
| 19:51 |
|
elb0w_ |
application/xlsx or something like that? |
| 19:52 |
|
|
tabbi joined #mojo |
| 19:53 |
|
|
simengangstad joined #mojo |
| 19:53 |
|
xaka |
elb0w_: you should add Content-Disposition header |
| 19:53 |
|
|
tabbi left #mojo |
| 19:53 |
|
elb0w_ |
self->types->type(txt => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); |
| 19:53 |
|
elb0w_ |
I did this |
| 19:53 |
|
elb0w_ |
is that wrong? |
| 19:54 |
|
xaka |
content-type has with about downloading |
| 19:54 |
|
xaka |
Content-Disposition: attachment; filename=fname.ext |
| 19:54 |
|
elb0w_ |
oh |
| 19:54 |
|
elb0w_ |
ok |
| 19:54 |
|
elb0w_ |
ty |
| 19:55 |
|
xaka |
fck my grammar, but i think you understood me :) |
| 20:06 |
|
simengangstad |
I cant seem to make a template in the terminal I type: mkdir templates/login |
| 20:06 |
|
simengangstad |
what are I doing wrong= |
| 20:06 |
|
simengangstad |
? |
| 20:07 |
|
simengangstad |
got it :) |
| 20:09 |
|
|
perlite_ joined #mojo |
| 20:17 |
|
simengangstad |
whats wrong with this cmd: mv templates/index.html.ep templates/login/index.html.ep? |
| 20:20 |
|
Quai |
if you havent, you have to create the templates/login folder first |
| 20:20 |
|
|
tabbi joined #mojo |
| 20:20 |
|
Quai |
checkout "man mkdir" |
| 20:20 |
|
elb0w_ |
xaka, so do this then? $self->res->headers->content_disposition('attachment; filename="test.xlsx"'); |
| 20:21 |
|
elb0w_ |
then what render data? |
| 20:23 |
|
tabbi |
hi, i've got a problem with the TagHelpers plugin. I want to have a select_field with the possibility to select more than one entry. this workes well. but now i want to preselect more than one entry. |
| 20:23 |
|
tabbi |
i did it via param fieldname => @preselectedvalues |
| 20:23 |
|
xaka |
elb0w_: i'm not sure, but looks like you need to read your file and send it as render(data => ...). probably there is better solution |
| 20:23 |
|
tabbi |
but param("fieldname") then only has the first element of @preselectedvalues |
| 20:23 |
|
tabbi |
what can i do here? |
| 20:25 |
|
|
MojoGuest307 joined #mojo |
| 20:25 |
|
MojoGuest307 |
From: http://www.reddit.com/r/html5/[…]bt76k/irc_client/ (22 hits) |
| 20:27 |
|
simengangstad |
mv templates/index.html.ep templates/login/index.html.ep this cmd still dont work... |
| 20:28 |
|
simengangstad |
and yes I have created the dir templates/login |
| 20:28 |
|
xaka |
simengangstad: what the error do you see? |
| 20:29 |
|
simengangstad |
its not an error but: usage: mv [-f | -i | -n] [-v] source target |
| 20:29 |
|
simengangstad |
mv [-f | -i | -n] [-v] source ... directory |
| 20:29 |
|
xaka |
simengangstad: what the OS? |
| 20:30 |
|
simengangstad |
os x |
| 20:31 |
|
xaka |
mv templates/index.html.ep templates/login |
| 20:32 |
|
* xaka |
doesn't like how os x mv works... |
| 20:32 |
|
simengangstad |
mv: rename templates/index.html.ep to templates/login: No such file or directory |
| 20:32 |
|
xaka |
simengangstad: in case of os x if you move file, your last argument must be directory, not a file |
| 20:32 |
|
memowe |
Hey guys, do you know a good tool to draw pretty and flexible entity relationship diagrams? |
| 20:32 |
|
simengangstad |
i have maked the dir |
| 20:35 |
|
simengangstad |
marcus: whats wrong? mkdir templates/login I have maked the dir, but when i do: mv templates/index.html.ep templates/login/index.html.ep it dosent work |
| 20:41 |
|
memowe |
should work. |
| 20:41 |
|
memowe |
book:/tmp memowe$ mkdir -p foo/bar |
| 20:41 |
|
memowe |
book:/tmp memowe$ echo 'success!' > baz |
| 20:41 |
|
memowe |
book:/tmp memowe$ mv baz foo/bar/quux |
| 20:41 |
|
memowe |
book:/tmp memowe$ cat foo/bar/quux |
| 20:41 |
|
memowe |
success! |
| 20:41 |
|
purl |
rumour has it success is finding king size papers |
| 20:42 |
|
memowe |
<- OS X |
| 20:42 |
|
tabbi |
has anyone an idea how to solve this param problem? |
| 20:44 |
|
memowe |
tabbi: you want to create more than one selected option entries in a select field? |
| 20:45 |
|
|
rem_lex| joined #mojo |
| 20:46 |
|
memowe |
Or is your problem to pass an array to your templates? |
| 20:52 |
|
|
MojoGuest178 joined #mojo |
| 20:52 |
|
MojoGuest178 |
From: http://networkedblogs.com/33Knp (16 hits) |
| 20:54 |
|
|
MojoGuest855 joined #mojo |
| 20:54 |
|
MojoGuest855 |
From: http://networkedblogs.com/33Knp (17 hits) |
| 20:59 |
|
|
matata joined #mojo |
| 20:59 |
|
|
mire joined #mojo |
| 21:19 |
|
tabbi |
memowe, sorry for the late answer |
| 21:19 |
|
tabbi |
yes, i want to create more than one selected option |
| 21:22 |
|
tabbi |
the above code snippet is from within a template |
| 21:47 |
|
tabbi |
memowe: any ideas? |
| 21:49 |
|
|
GabrielVieira joined #mojo |
| 21:50 |
|
GabrielVieira |
hi there.. how can I print a HTML content passed though stash? |
| 21:51 |
|
tabbi |
Gabrial: within a template or within a controller code? |
| 21:51 |
|
GabrielVieira |
both |
| 21:51 |
|
GabrielVieira |
I'm trying within a template |
| 21:51 |
|
tabbi |
within a template: <%= stash "key" %> |
| 21:51 |
|
GabrielVieira |
%= $self->render_text( $header) |
| 21:52 |
|
GabrielVieira |
but it prints <tag_name> instead of <tag_name> |
| 21:52 |
|
tabbi |
try <%= b(stash "key") %>, i'm not sure, please try it |
| 21:53 |
|
GabrielVieira |
ok |
| 21:54 |
|
GabrielVieira |
tabbi: perfect! |
| 21:54 |
|
purl |
perfect is, like, the enemy of good enough |
| 21:54 |
|
GabrielVieira |
:) |
| 21:54 |
|
GabrielVieira |
tabbi++ |
| 21:54 |
|
GabrielVieira |
where can I find more about 'b'? |
| 21:54 |
|
tabbi |
:-) |
| 21:54 |
|
tabbi |
look for Mojo::ByteStream |
| 21:55 |
|
tabbi |
http://search.cpan.org/~tempir[…]ojo/ByteStream.pm |
| 21:57 |
|
GabrielVieira |
thanks! |
| 21:57 |
|
marty |
GabrielVieira: Also checkout the difference between <%= %> and <%== %> |
| 21:58 |
|
marty |
http://mojolicio.us/perldoc/Mo[…]ing#Embedded_Perl |
| 21:59 |
|
GabrielVieira |
checking |
| 21:59 |
|
GabrielVieira |
humm |
| 21:59 |
|
GabrielVieira |
so it's "more" correct this way |
| 22:01 |
|
GabrielVieira |
thanks marty! |
| 22:02 |
|
marty |
Either way may work for you. I'm not sure if either way is "more" correct than the other. |
| 22:04 |
|
tabbi |
marty: maybe you can help me with my problem: how can i create more than one selected option entries in a select field? |
| 22:04 |
|
tabbi |
with the taghelpers |
| 22:05 |
|
tabbi |
i did it via param fieldname => @preselectedvalues, but param("fieldname") then only has the first element of @preselectedvalues |
| 22:05 |
|
tabbi |
(everything within the template) |
| 22:07 |
|
marty |
just a guess .. did you try fieldname => \@preselectedvalues |
| 22:07 |
|
tabbi |
i think, i did |
| 22:07 |
|
tabbi |
i try it again for sure |
| 22:08 |
|
marty |
are you're using the select_field tag helper? |
| 22:09 |
|
tabbi |
i tried, it doesnt help |
| 22:09 |
|
tabbi |
yes, i use the select_field tag helper |
| 22:10 |
|
tabbi |
sure, i could do the html tagging myself |
| 22:10 |
|
tabbi |
but the helpers look nicer |
| 22:10 |
|
tabbi |
the problem isnt within taghelpers |
| 22:10 |
|
tabbi |
but within param |
| 22:10 |
|
tabbi |
look at this code: |
| 22:11 |
|
|
arpadszasz joined #mojo |
| 22:11 |
|
tabbi |
% my @val = qw/b strong/; |
| 22:11 |
|
tabbi |
% param fieldname => @val; |
| 22:11 |
|
tabbi |
<%= param 'fieldname' %> |
| 22:11 |
|
tabbi |
gives you only *b* |
| 22:12 |
|
tabbi |
maybe it would be quicker to tag the html myself |
| 22:12 |
|
marty |
tabbi: please don't paste into the chanel. Use a paste service like pastebin or gist |
| 22:12 |
|
tabbi |
okay, sorry |
| 22:12 |
|
marty |
https://gist.github.com/ |
| 22:13 |
|
marty |
no problem |
| 22:13 |
|
marty |
:) |
| 22:14 |
|
marty |
I have not used that helper myself. But from looking at the code it just generates a standard html select box. So no multiple option with that tag helper (that I can see) |
| 22:17 |
|
tabbi |
i do it like this: %= select_field fieldname => $data, multiple => "multiple", size => 6 |
| 22:19 |
|
|
vel joined #mojo |
| 22:21 |
|
tabbi |
okay, i will write the code myself. |
| 22:22 |
|
marty |
ahhh, interesting, I'll take a look... |
| 22:25 |
|
|
jpmcallister joined #mojo |
| 22:33 |
|
marty |
tabbi: Mojolicous is amazing! This should work... %= select_field test => ['a', [b => 'b', selected => 1], 'c', [d => 'd', selected => 1], 'e'], multiple => "multiple" |
| 22:33 |
|
* marty |
learns something new every day. :P |
| 22:34 |
|
tabbi |
this sounds nice! |
| 22:34 |
|
tabbi |
i will try it |
| 22:36 |
|
|
tabbi left #mojo |
| 22:42 |
|
|
cfedde joined #mojo |
| 22:48 |
|
cfedde |
can I teach mojo to use non breaking spaces? |
| 22:50 |
|
tempire |
cfedde: http://mojolicio.us/perldoc/Mo[…]ng#Adding_helpers might help you |
| 22:50 |
|
tempire |
elb0w_: did you get download working? |
| 22:55 |
|
cfedde |
me follows link |
| 23:00 |
|
cfedde |
maybe I need to explain further. I have a hash passed to a template I'm trying: % $i->{recent} =~ s/\s+/\ /g; |
| 23:01 |
|
cfedde |
I'm not sure I'm looking in the right place. |
| 23:07 |
|
marty |
cfedde: Does your solution work? |
| 23:15 |
|
cfedde |
marty: nope. |
| 23:15 |
|
cfedde |
marty: I get the nbsp string in the output. |
| 23:15 |
|
cfedde |
I'm not sure what I need to do. |
| 23:23 |
|
marty |
How are you displaying the output? |
| 23:26 |
|
|
D4RK-PH0ENiX joined #mojo |
| 23:27 |
|
memowe |
cfedde: wait! :) |
| 23:27 |
|
memowe |
s/\s+/ /g - you know that + is greedy? |
| 23:28 |
|
memowe |
That means, \s+ will slurp as many whitespaces as possible and substitute with one (!) non breaking space |
| 23:28 |
|
memowe |
try s/\s/ /g |
| 23:29 |
|
memowe |
Anyway, you need to use %== instead of %= to prevent the ampersand from being html quoted. |
| 23:29 |
|
* marty |
nods |
| 23:29 |
|
memowe |
Consider using a pre element instead. |
| 23:30 |
|
memowe |
<pre> non collapsing spaces</pre> |
| 23:31 |
|
memowe |
Also consider using the css: white-space: pre |
| 23:37 |
|
cfedde |
memowe: %== looks like the right solution for my case |
| 23:38 |
|
cfedde |
thanks. |
| 23:38 |
|
memowe |
cfedde: did your s/// work? |
| 23:38 |
|
cfedde |
unfortunately I have not had a chance to test yet. |
| 23:38 |
|
memowe |
Ah, OK. |
| 23:39 |
|
cfedde |
work keeps getting in the way of my programmign. |
| 23:39 |
|
memowe |
I think s/// and %== is not the best solution. We don't know if there's HTML in your string. |
| 23:39 |
|
memowe |
cfedde: what are you going to show the world with those spaces? |
| 23:40 |
|
cfedde |
memowe: I think I sent you down a bunny trail. |
| 23:41 |
|
cfedde |
consolidating contiguous spaces in this case is fine. the particular table element I'mworking with is comming out of a database and I know it contains no other HTML. |
| 23:42 |
|
cfedde |
I'm attempting to format an element so that the browser knows how best to format it. |
| 23:43 |
|
cfedde |
and I have not yet gotten my head all the way around mojo's ep templating system. |
| 23:47 |
|
memowe |
database output? sounds like ascii art tables. I would suggest using pre for that |
| 23:48 |
|
cfedde |
heh. |
| 23:50 |
|
cfedde |
the issue is that a particular formatted date has one or more white spaces in the middle that case a table cell to wrap. If the space is an then the cell does not wrap. nothing more complex or exciting than that. |
| 23:50 |
|
cfedde |
not even an ascii icon of someone waving their hands \o/ |
| 23:55 |
|
memowe |
;) \\o |
| 23:55 |
|
memowe |
good night, mojo people! :) |