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

IRC log for #mojo, 2017-05-05

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

All times shown according to UTC.

Time Nick Message
00:10 stryx` joined #mojo
00:33 tchaves joined #mojo
00:34 Janos joined #mojo
02:03 tchaves joined #mojo
02:37 PopeF joined #mojo
02:39 noganex_ joined #mojo
03:28 aborazmeh joined #mojo
03:56 Pierre joined #mojo
04:01 Pierre Hi,
04:02 Pierre is there any way to modify namespaces for controller at runtime, per requests?
04:02 Pierre i have a case where for some specific user, i want to change the namespace to use a different controller for one route
04:03 Pierre i tried to play with under to change namespace in stash with no luch for now
04:03 preaction that might be what conditions are for
04:04 Pierre i also tried with over, with no luck, not sure what i am missing
04:04 Pierre in my user auth, i get a namespace for a few user, and for those one, i would like to first try a dedicated namespace, falling back to the globalone
04:09 Pierre Reading the doc of conditions, i see how it would work, if i know in advance when application starts. then i would just use conditions to routes to one or another controller
04:26 maschine joined #mojo
04:36 mcsnolte joined #mojo
05:18 aborazmeh joined #mojo
05:58 dod joined #mojo
06:04 dod joined #mojo
06:14 Pierre joined #mojo
06:20 dod joined #mojo
06:38 Vandal joined #mojo
06:55 Jonis w 7
07:08 inokenty-w joined #mojo
07:12 AndrewIsh joined #mojo
07:19 trone joined #mojo
07:32 karjala_ joined #mojo
07:45 Pierre joined #mojo
08:01 stryx` joined #mojo
08:20 anparker joined #mojo
08:32 karjala_ Is there a helper that can translate a thing to JSON?
08:33 karjala_ like <%== to_json($var) %>
08:34 nic I don't think you really mean that
08:34 nic maybe you're looking for 'dumper'
08:37 nic Pierre: The routing is only dynamic before the first hit, ie during 'startup'
08:37 nic s/dynamic/amenable to change/
08:38 Pierre ok, still i found something strange, following that path
08:38 Pierre but it's topo much to be displayed in the chat
08:38 Pierre i will create a post on the google group
08:38 Pierre with context
08:47 karjala_ nic, no I want a to_json helper. To be able to pass (properly escaped) string variables to JavaScript code which resides in the template
08:47 karjala_ and to pass arrays and hashes to javascript variables in the template
08:48 rshadow joined #mojo
08:49 Sebbe karjala_: Where I work, we use a helper that just does Mojo::ByteStream->new( to_json(@_) ) for that purpose.
08:49 karjala_ Sebbe, what's the benefit of wrapping to_json with Mojo::ByteStream?
08:50 Sebbe karjala_: Then you don't need %==.
08:50 karjala_ nice
08:50 karjala_ thanks
08:50 Sebbe No problem.
08:50 karjala_ how does to_json behave when @_ contains more than one elements?
08:51 Sebbe $ perl -E 'use Mojo::JSON qw(to_json); my @foo=(1,2,3); say to_json(@foo);'
08:52 Sebbe 1
08:52 Sebbe So, ignore the rest, apparently. :)
08:53 karjala_ and what did you name this helper?
08:54 Sebbe jix_tmpl_json is what ours is called. (jix being our standard prefix for all of our helpers where I work.)
09:05 karjala_ is this not valid HTML? why does view source on FF make it appear bold red? (<a href="#" onclick="rename(1, \"Network\")">rename</a>)
09:06 karjala_ ah, it should be HTML-escaped! got it thanks
09:18 PopeF0 joined #mojo
10:20 stryx` joined #mojo
10:21 prg joined #mojo
10:35 Xyem Is it common for Mojolicious applications to be tied to specific database backends?
10:35 pink_mist yes
10:42 Xyem Okay, thank you.
10:43 Xyem Here is where I hope the big "This is experimental" warning in Mojo::mysql doesn't bite me too hard :)
10:53 tchaves joined #mojo
11:08 nic Xyem: Are you asking because you want to connect to multiple different db platforms, or want to connect to one db platform but allow that to be swapped out in the future?
11:25 vagos joined #mojo
11:25 vagos hello
11:25 purl hello, vagos.
11:26 vagos can i ask regarding perl?
11:29 eseyman vagos: you can always ask but you may not get an answer
11:32 vagos anybody knows how i could compile 32-bit perl on solaris 11 64-bit?
11:33 pink_mist that sounds like a question for your OS support team 0_o
11:34 vagos ok
11:59 Xyem nic: Not so much "swap out" but (when/if I release this) that they could use whatever backend they have available.
12:00 Xyem "They" being other people installing it.
12:01 nic I see
12:05 pink_mist Xyem: that's traditionally been very difficult to do; some SQL syntax doesn't translate well between every different DB backend, but with SQL::Abstract being used (which is a recent thing) it might be easier to swap things out these days
12:36 gizmomathboy joined #mojo
12:44 Xyem pink_mist: Sure, that makes sense. It's just a shame that while DBI will let you "just change" the DSN, the separation is still there (e.g. Mojo::Pg vs Mojo::mysql, mysql_enable_utf8 vs pg_enable_utf8).
12:53 Janos joined #mojo
13:08 Pyritic joined #mojo
13:19 Armen good mo rning
13:22 mcsnolte joined #mojo
13:25 Xyem Aftenoon Armen :)
13:25 Xyem Afternoon*
13:26 Armen ah, well, yes, I suppose it is in the old world :)
13:33 jberger good $timezone to you all
13:34 jberger yeah, it is frustrating that SQL syntaxes aren't more uniform
13:34 jberger but even that is only possible for simple queries
13:34 jberger part of the reason I'm really enjoying using postgres directly (ie not via DBIC) is that is has so many awesome features
13:35 jberger and of course none of those would translate to other dbs
13:36 Xyem Good day jberger
13:36 nic Everything would be swappable if we could stick to the functionality of the LCD.  Oracle?
13:37 jberger IIUC, even things as simple as limit/offset don't translate, especially to oracle
13:38 jberger also, why would I want to code to the least functional/most expensive db?
13:45 Xyem There is a little "gotcha" when using Mojo::(Pg/mysql)::Migrations: VERSION can't be 0-indexed.
13:46 Armen jberger: that is what concerns me about our use of postgres - what if we later need to deploy to an environment where postgres is not available? Sounds like moving to mysql could be a nightmare
13:47 jberger it kinda depends on what your target case is
13:47 Xyem Armen: This is why I am using Mojo::mysql, even though Postgres databases are available in particular environment.
13:48 jberger I spent a ton of time on Galileo to make sure it used only what DBIC understood and that it could deploy on anything that the translation layers could handle
13:48 jberger and I'm sure that helped a few people for deployment
13:48 nic my oracle comment was a joke.  IMO there's little point having the various RDBMSs if they were swappable
13:49 nic you choose whichever best matches your business needs (tho that does change over the years)
13:49 jberger if I went the other way, and said "this requires postgres" (as plenty of projects in the mid 00s did for mysql) I'm sure I'd lose a few users
13:49 jberger but some other users who were just going to use X for convenience would just install postgres too
13:49 jberger its a tradeoff sure
13:50 Armen we're already knee-deep in postgres so we're sticking with it, but if we want to deploy it anywhere it can only really be to a vps we have full control over
13:50 jberger by the time someone is installing a CMS engine, I have to assume that they have the ability to deploy stuff
13:50 Armen which is not so bad, really... linode and digital ocean are great
13:50 Xyem Hear hear (regarding Linode).
13:51 jberger yeah, and that's the other thing, vpses are so reasonably priced now
13:51 jberger rather than shared hosting
13:51 jberger nix that last, I meant more like: whereas shared hosting used to be the only viable solution
13:51 Xyem I helped someone migrate their hosting and I would have really liked them to get a VPS, but they aren't interested in learning how to manage one (and I'm not currently looking at becoming their sysadmin either).
13:52 jberger right, and that's why I say, it depends on who you intend to target for your app
13:52 Xyem Hawkhost have been very, very accomodating though. For example, giving me access to compiler on shared hosting so I could use perlbrew..
13:52 jberger one of Galileo's design goals was to be stupid-simple to install
13:52 jberger that meant that one of the effective goals was for it to be useable on a broad array of dbs
13:53 Armen in our case it's an "as a service" kind of situation, so the end-user never has to concern themselves with hosting
13:53 jberger my next CMS (if it ever gets done) is making the choice that I can be a more powerful developer if I require postgres
13:54 jberger Armen right, so in that case, the difficulty is always with you
13:54 Armen I realize I'm the difficult one :P
13:54 marty joined #mojo
13:54 jberger haha, no I just meant, you can easily make the choice because it is only future you that you are going to affect
13:56 Armen It's not just me working on this, but yes. In fact I've barely touched the back-end code at all so far
13:58 Armen but in order for the bits and pieces to be nice to eachother, I need to better understand modern perl, mojolicious, and postgres
14:03 Armen so, as a "learning project", I'm rewriting my paste thing pastebeest.com with mojolicious/postgres
14:21 jberger by "you" I meant you and your team, not downstream consumers
14:21 jberger as you said before
14:32 stryx` joined #mojo
14:39 zivester joined #mojo
14:45 rshadow1 joined #mojo
14:46 Pyritic joined #mojo
14:49 Armen right, sorry for repeating myself
14:56 tyldis We are migrating from Oracle to PG. And for ORMs I have settled for SQL::Abstract. It has just enough to make some stuff very convenient while not getting in the way of the more advanced queries.
14:58 PryMar56 joined #mojo
15:09 disputin joined #mojo
15:11 disputin joined #mojo
15:39 maschine joined #mojo
16:08 Grinnz tried to make a test file for the Inotify backend for morbo, but it's failing, anyone else want to try to debug? https://github.com/marcusramberg/mojo-server-morbo-backend-inotify/pull/3
16:12 Grinnz most of it seems to work but modified_files is just not returning the files
16:16 howitdo joined #mojo
16:31 Janos joined #mojo
16:38 rshadow joined #mojo
16:41 sh14 joined #mojo
16:46 stryx` joined #mojo
16:47 rshadow joined #mojo
16:48 rshadow1 joined #mojo
16:51 dod joined #mojo
16:55 cheako joined #mojo
17:42 itaipu joined #mojo
18:27 punter joined #mojo
19:01 stryx` joined #mojo
19:08 bwf joined #mojo
19:21 umask001 joined #mojo
19:25 itaipu joined #mojo
19:37 sri for anyone who has a problems with ear pain during flights... these actually work! https://cirrushealthcare.com/collections/earplanes
19:38 Grinnz interesting
19:43 sri tried them this week, and i'll always use them from now on
19:55 genio heh. Earplanes for adults, 3pk.   1 pair.     huh?
20:13 marty joined #mojo
21:08 dikim joined #mojo
22:07 marty joined #mojo

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