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

IRC log for #mojo, 2017-02-12

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

All times shown according to UTC.

Time Nick Message
00:02 twm109 well... i've always like that fact that mj has no external depedencies - makes it very easy to use in environments where you can't or won't simply "CPAN install" everything.
00:03 pink_mist Mojolicious still doesn't
00:03 pink_mist Mojo::Pg always had a few
00:03 pink_mist now it has a few more
00:04 Grinnz Mojo::Pg depends on DBD::Pg and DBI
00:04 twm109 i've used "Dancer" before and dancer + plack adds up to something like 100 modules which can be painful when you have to deal with deps.
00:04 Grinnz which are not simple as dependencies go
00:05 Grinnz this adds 11 total runtime dependencies
00:05 jberger twm109: it sounds to me like the answer is "not unless there is a compelling reason"
00:05 genio Moo and SQL::Abstract are pretty tiny as far as dependencies go and they're both pretty damn stable.  I don't think you should worry about this one
00:06 sri what jberger said
00:06 jberger by point of comparison
00:06 jberger https://widgets.stratopan.com/wheel?q=Mojo-Pg-3.0&fs=1
00:06 jberger https://widgets.stratopan.com/wheel?q=Dancer2-0.204004&fs=1
00:07 jberger I don't really see that as a fair comparison
00:07 twm109 i guess "personal preference" doesnt really count as "compelling reason" :)
00:07 sri not like Mojo::Pg is a web framework
00:07 genio wow.  that's a nice little tool
00:07 jberger genio, its on metacpan
00:08 jberger under reverse dependecies
00:08 jberger dependency graph
00:08 Grinnz i prefer the 'runtime' tab usually as that's what you need to deploy
00:08 jberger sure
00:08 genio ahh, dependency graph.
00:08 genio jberger++
00:08 sri more fair comparison https://widgets.stratopan.com/wheel?q=DBIx-Class-0.082840&fs=1
00:09 sri i'm not opposed to optional dependencies at all, but in this case i think it makes the usage experience worse
00:10 sri which requires a more compelling reason than "because i like it that way"
00:10 sri (usage experience for the majority of our users)
00:10 jberger the problem with making methods depend on optional dependencies is that you can't error out until runtime
00:11 jberger and probably late runtime
00:11 jberger which, though of course your testing should catch that, it is a bad usage experience as sri say
00:11 jberger s
00:13 sri i also expect that almost all of our users will take advantage of the feature
00:23 jberger I need to learn the syntax, but yeah, I'm looking forward to trying it
00:23 jberger especially for the simple models
00:23 jberger (my $work models are rarely simple tho)
00:24 Grinnz it can't do complicated joins or limits, but for simple stuff yeah
00:25 jberger I <3 postgres' json_object_agg in conjuction with joins
00:26 sri what's usually most annoying is writing out inserts
00:27 sri that's the one i'll be using most i guess
00:27 Grinnz yeah, the insert and update syntax is way better
00:33 sri delete is pretty useful too
00:33 sri select is more of a prototyping tool i guess
00:33 sri but that's fine
00:39 jberger Why is limit so hard?
00:39 jberger I've seen this other place with sql generators
00:39 jberger *places
00:39 Grinnz because databases do limit syntax wildly differently
00:40 Grinnz https://metacpan.org/pod/SQL::Abstract::Limit#Limit-emulation
00:41 Grinnz dont look at the SQL Server or Oracle ones, fair warning :P
01:11 aborazmeh joined #mojo
01:37 sri hmm
01:38 sri guess i might use $db->pg->abstract->where(...) too when i need dynamic where clauses for bigger selects
01:39 sri since i never ever want to concatenate strings for that
01:43 sri oh, just 4 more reverse dependencies for mojolicious and we will reach 666 :)
01:43 ningu joined #mojo
01:44 sri would be too funny if we reached 666 reverse dependencies with 333 +1's
01:44 ningu I see Mojo::Pg was released a few hours ago. are there any breaking changes to the api?
01:44 ningu it doesn't say in the changelog. just confirming.
01:44 Grinnz no
01:45 ningu ok
01:45 ningu cool
02:07 stryx` joined #mojo
02:31 sugar joined #mojo
03:39 noganex joined #mojo
04:09 kiwiroy joined #mojo
04:28 lluad joined #mojo
04:39 jberger can confirm: 80% of Chicagoans have been murdered and are dead.
04:39 jberger it was me at least twice
04:39 ningu if you don't go to other men's funerals, they won't go to yours
04:39 jberger and only once was it batman's fault!
04:41 kiwiroy joined #mojo
05:02 preaction can confirm. all the people around me are dead
05:04 dboehmer joined #mojo
05:22 aborazmeh joined #mojo
05:25 kiwiroy joined #mojo
05:50 kiwiroy joined #mojo
06:41 sugar joined #mojo
06:45 Vandal joined #mojo
06:46 disputin joined #mojo
07:03 disputin joined #mojo
07:22 sugar joined #mojo
08:13 vicash joined #mojo
08:42 sugar joined #mojo
08:51 salv0 joined #mojo
09:39 * coolo needs help with mojo::pg once more. I want a select where id in $id_array_ref
09:39 coolo but if I tried to query just so, I get a 'DBD::Pg::st execute failed: ERROR:  invalid input syntax for integer' thrown at me
09:48 * coolo creates the complete SQL string now as workaround :(
10:30 coolo (and once again I realized I shouldn't even need it :)
11:09 kiwiroy joined #mojo
11:56 sri coolo: ->query('select * from foo where id = any(?)', [1, 2, 3, 4, 5, 6])
11:58 coolo now I removed the need of it, so I can't test :)
11:58 sri trust me it works :)
11:58 sri it's one of the first things that made me like postgres
11:58 sri native arrays for all the things
12:08 kiwiroy joined #mojo
12:22 sugar joined #mojo
13:09 kiwiroy joined #mojo
13:55 gizmomathboy joined #mojo
14:01 lluad joined #mojo
14:04 twm109 sometimes an explicit cast is needed when working with arrays, e.g. query('select * from foo where id = any(? :: integer[])', [1, 2, 3, 4, 5, 6])
14:35 cpan_mojo Mojo-IRC-Server-Chinese-1.8.1 by SJDY https://metacpan.org/release/SJDY/Mojo-IRC-Server-Chinese-1.8.1
14:39 stryx` joined #mojo
14:49 sugar joined #mojo
15:04 * sri added a few SQL examples for the new methods http://mojolicious.org/perldoc/Mojo/Pg/Database#select
15:05 sri ideas for more useful examples welcome
15:14 jberger even just having a few examples there in the doc is nice, that way I get a feel without having to go read the SQLA docs
15:14 jberger I mean, I will, but just to get a sense
15:14 * sri nods
15:41 sh14 joined #mojo
16:05 cpan_mojo Mojo-Pg-3.01 by SRI https://metacpan.org/release/SRI/Mojo-Pg-3.01
16:07 batman jberger: why not make a gh-pages branch where you run MojoConf?
16:07 jberger it isn't a static file
16:07 batman ribasushi: the camera was only 480p unfortunately. i didn't think about it at the time :(
16:08 jberger that was one of the many reasons I stopped trying to write my own presentation software
16:11 kiwiroy joined #mojo
16:12 batman that's what i like about https://metacpan.org/release/App-remarkpl
16:13 batman it's just a webserver running the javascript, so i can also upload the javascript and presentation anywhere i like
16:18 dod joined #mojo
16:23 dod joined #mojo
16:43 batman sri: just trying to get Mojo::mysql up to date, and i see that i'm behind quite a bit...
16:44 batman can you tell me why "results_class" is an attribute on Mojo::Pg::Database and not on Mojo::Pg ?
16:44 sri no
16:45 batman oh. nevermind... i was thinking it was a lot of work, if you wanted to change it for every database instance, but that is solved easily by changing the default in a custom database class.
16:45 sri you should aim for keeping up with Mojo::SQLite though
16:45 sri get rid of that horrible pubsub mess
16:46 sri just do what mysql can do reasonably well
16:48 batman not sure if i want to do that.
16:48 batman looking at the changes in both Mojo::SQLite and Mojo::Pg though
16:49 sri well, until you do Mojo::mysql is a "do not use" recommendation from me
16:50 sri (which it already was because of the lack of maintenance though)
17:04 sri it was the same with Mojo::SQLite, the problem is that every time i recommend the module i have to specifically mention not to use certain features because they are terrible
17:04 sri which sucks
17:04 sri if a feature is terrible just don't put it in the module
17:05 sri now Mojo::SQLite is a very easy strong recommendation
17:16 sugar joined #mojo
17:32 cpan_mojo Mojo-mysql-1.00 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/Mojo-mysql-1.00
17:33 coolo brave move! :)
17:54 PryMar56 joined #mojo
18:43 q_gone joined #mojo
19:20 dboehmer joined #mojo
19:35 sugar joined #mojo
19:56 zach joined #mojo
19:56 zach question
19:56 purl question is still how I'd parse that
19:57 zach say I have a request that the backend will take several minutes to handle, but I don't want it to just look like it's doing nothing and time out, what would be the best way to approach that?
19:57 zach think, cloning a VM
19:57 zach I want to report good/bad for start, but not delay in showing a response and then periodically update or have an update available
19:57 zach would that be a case for Mojo::IOLoop::Delay?
20:10 kiwiroy joined #mojo
20:23 simcop2387 joined #mojo
20:25 ningu joined #mojo
20:28 genio zach: That's something I'd normally start as a job and immediately return the user to a web page saying it had started. websockets or other forms of polling can inform them of when things have finished
20:50 kiwiroy joined #mojo
21:22 kiwiroy joined #mojo
21:23 rshadow joined #mojo
21:28 pink_mist just watched Legion, and that was very very interesting
21:28 pink_mist hope it can continue like that =)
21:31 rshadow joined #mojo
21:33 bpmedley joined #mojo
21:34 mishanti1 pink_mist: All good thing must come to an end.
21:34 mishanti1 s/good things//
21:44 genio I'm about to check out the first episode of Legion now
21:55 sri too early to say
21:56 bpmedley zach : What genio, said, although I'm specifically mentioning minion and maybe (http://mojolicious.org/perldoc/Mojo/IOLoop/Subprocess and http://mojolicious.org/perldoc/Minion)
21:57 sri i guess for me it will depend on how much of legion will be about his delusions
21:58 sri didn't like those mr robot episodes either
21:58 sri if they find the right balance it could be pretty good
22:03 pink_mist true
22:22 kiwiroy joined #mojo
22:24 disputin joined #mojo
22:37 rshadow joined #mojo
22:57 bletch joined #mojo
23:02 sri when looking for inspiration for database apis i always keep coming back to sequel https://github.com/jeremyevans/sequel
23:03 sri little sad how little there is in between raw sql and orms
23:04 ningu sri: query generators?
23:04 sri yes
23:04 ningu there are a few decent ones
23:05 sri are there?
23:05 ningu I dunno. last I looked at knex it was ok
23:05 ningu haven't used it for anything substantial
23:05 ningu I like gesundheit for node but it isn't maintained anymore
23:05 sri yea, knex is one that pops up a lot for me too
23:08 sri what are the other ones?
23:08 purl the other ones are just icing on the cake.
23:09 pink_mist purl isn't wrong :P
23:10 ningu sri: not sure off the top of my head. you know SQL::Abstract already obviously
23:10 ningu I thought there was something for python but can't remember what people use
23:10 sri seems to be all alchemy
23:11 ningu yeah
23:11 sri which i can't really get into
23:11 ningu why not?
23:11 ningu I've never used it
23:12 ningu mst mentioned once he could/should extract the sql-generation bits out of DBIx::Class
23:14 sri it's all very clunky
23:15 ningu I want something that gives me a bunch of primitives that I can compose and then gets out of the way
23:16 ningu also, ideally, with some introspection support
23:26 stephan48 for node there is also sequelize  which i like quite a bit. it is simple in itself but allows for quite some flexiblity without big sacrefices.
23:26 stephan48 but well, yea its a ORM not a query generator
23:39 genio Legion was a bit... yea, I hope they don't focus on the delusions.  that will get old rather quickly
23:49 sugar joined #mojo

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