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

IRC log for #mojo, 2018-01-26

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

All times shown according to UTC.

Time Nick Message
00:17 orev joined #mojo
00:36 good_news_everyon joined #mojo
00:36 good_news_everyon [mojo-pg] kraih pushed 1 new commit to master: https://git.io/vNPXL
00:36 good_news_everyon mojo-pg/master 3de699a Sebastian Riedel: add support for LIMIT and OFFSET
00:36 good_news_everyon left #mojo
00:36 sri ok, now lets add more postgres features :)
00:37 Grinnz taking the SQL::Abstract::Pg namespace in the Mojo-Pg distribution seems ehh
00:38 sri yea, i thought about it, but i kinda feel like being a bit rude in this case
00:42 sri if it causes controversy... good, SQL::Abstract needs attention
00:43 Grinnz for sqlite i would just release it separately, it doesn't need mojo features and it's useful outside of Mojo::SQLite
00:44 sri not saying i won't release it separately at some point
00:44 Grinnz that would be my only quarrel, the name seems fine and appropriate
00:46 sri guess i'll steal more from DBIx::Class, group by is already there
00:50 sri ribasushi: who do i credit for the stuff i steal?
00:53 sri kinda sad to see how DBIx::Class fixed all those things in SQL::Abstract without pushing them upstream
00:54 * sri does appreciate comments like "# !!! THIS IS ALSO HORRIFIC !!! /me ashamed" though :)
01:12 dikim joined #mojo
01:21 aborazmeh joined #mojo
02:11 gordonfush joined #mojo
02:56 ilbot2 joined #mojo
02:56 Topic for #mojo is now 🍩 nom nom | http://mojolicious.org | http://irclog.mojolicious.org | http://code-of-conduct.mojolicious.org
03:40 Seth joined #mojo
05:04 dboehmer joined #mojo
05:06 genio sri: https://metacpan.org/release/CAPOEIRAB/UV-1.000004-TRIAL tests fine with minor edits to Grinnz's Mojo::Reactor::UV now. \o/
05:22 mohawk genio++
06:01 ribasushi sri: dunno regarding credit, perhaps just say "DBIx::Class contributors"
06:01 ribasushi 90% of the code in that area is mine, but it builds on iterations of others, so shrug
06:21 itaipu joined #mojo
07:00 Vandal joined #mojo
07:23 inokenty-w joined #mojo
07:49 AndrewIsh joined #mojo
07:57 McA joined #mojo
07:58 karjala_ joined #mojo
08:00 ribasushi sri: actually there is a problem, I just didn't think of checking earlier
08:01 ribasushi DBIC is strictly under GPL1+Artistic1, whereas you are republishing portions of it under Artistic2
08:01 ribasushi need to either ship it separately, or mix-license Mojo::Pg
08:03 ribasushi at present the portion is small, and likely inconsequential ( I am not a debian packager though ), but if you are planning to take more pieces - it will likely be clear-cut
08:10 dod joined #mojo
08:29 trone joined #mojo
08:39 coolo or go GPL 3 :)
08:42 ribasushi coolo: how could that possibly apply...?
08:45 eseyman GPL3 == GPL1+
08:45 ribasushi sure, but that does not allow for artistic1 to be stripped off
08:47 eseyman ah, I've always read the perl license as GPL OR Artistic, not GPL AND Artistic
08:47 coolo ribasushi: DBIC is GPL1+ _or_ Artistic
08:47 coolo the licensee can choose to use the GPL+ part and mix it with GPL code as much as she wants
08:48 coolo http://search.cpan.org/~ribasushi/DBIx-Class-0.082840/lib/DBIx/Class.pod#COPYRIGHT_AND_LICENSE says 'the same terms as perl5 itself'
08:48 ribasushi coolo: to my reading of the perl5 license ( on which things are modeled ) you can distribute them under the terms of X or Y, does not imply you can strip the X/Y you didn't use
08:48 * ribasushi goes back to his notes to re-check
08:48 coolo ribasushi: but that's how it works
08:49 coolo the 'or GPL' was added as otherwise perl wasn't free software
08:49 coolo only the 'or GPL' makes it free software - and this freedom allows relicensing to GPL3
08:49 coolo not to Artistic2 - you're correct there
08:51 ribasushi coolo: you seem to be correct, thanks for bringing this up
08:51 * ribasushi will pester someone from the legal&policy room at fosdem next week to confirm, and will clarify the text
08:51 ribasushi coolo++
08:52 Edward joined #mojo
08:53 ribasushi ( though I must go "WAT?!" at your claim that code licensed under Artistic is not "free software" )
08:56 coolo ribasushi: https://en.wikipedia.org/wiki/Artistic_License#Artistic_License_1.0 - we do quite some open source licensing in SUSE :)
08:57 Grinnz FSF does not consider Artistic 1.0 to be free software
08:57 Grinnz but they do with 2.0
08:57 eseyman whereas Fedora decided to remove all packages that were licensed under Artistic 1.0
08:57 eseyman but that was before the ruling was repealed
08:58 ribasushi coolo: I actually read that back when I was drafting the DBIC notices, and the "stood up in court" paragraph in what you linked seemed to cement it as "yes, it is a free software license, ambiguity aside"
08:59 Grinnz ambiguity is bad in licensing.
08:59 eseyman huge +1 there
09:00 ribasushi I do not disagree, though my WAT still stands ( in presence of clear case-law involving said license )
09:01 * ribasushi jolts more notes to pester people @ fosdem about ;)
09:02 ribasushi sri: TLDR of all above: directly-derived stuff from within DBIC's codebase should be either artistic 1 or gpl.* ( or both if you want to be nice ;)
09:02 mohawk i fear there is more ideology than decided case-law in the matter of "free" software licensing
09:02 Grinnz the FSF is basically entirely ideology, so yeah
09:05 eseyman and you have to be a special kind of stupid to challenge copyleft in court
09:06 cromedome joined #mojo
09:07 ribasushi eseyman: worked out very well for vmware
09:08 eseyman I was really thinking of American courts
09:09 eseyman I don't know a lot about German law
09:12 eseyman and the VMWare case is about enforcing copyleft more than it is about challenging it
09:17 bianca joined #mojo
10:10 hkclark joined #mojo
10:11 inokenty-w joined #mojo
10:25 sri ribasushi: point taken, i'll make sure not to copypasta as long as the licenses are incompatible
10:27 sri glad i'm not in the us, where oracle will sue you just for reimplementing the same API
10:27 sri :)
10:41 good_news_everyon joined #mojo
10:41 good_news_everyon [mojo-pg] kraih pushed 1 new commit to master: https://git.io/vNXOz
10:41 good_news_everyon mojo-pg/master f70ae20 Sebastian Riedel: document what exactly SQL::Abstract::Pg does
10:41 good_news_everyon left #mojo
10:46 Lee joined #mojo
10:47 sri i won't dare extend join support for now
10:55 sri "Support of functions in C<SELECT> lists" sounds interesting though
10:56 sri that's something you do *a lot* with postgres
10:59 sri seems like something that should be in core SQL::Abstract
11:01 ribasushi sri: I am genuinely stumped: where does the desire for gentrification of an existing module come from? *why* should things be in core SQLA? You *know* the costs to preexisting users ( you are one of them now ). What is the rationale?
11:03 sri so i don't have to reimplement them myself
11:03 jamesaxl joined #mojo
11:04 sri i'm just starting to dig through the code though, so i'm not aware how costly it would be
11:05 ribasushi what I meant is that it would be costly to *others* who "implemented X themselves" and from under whose feet the base module will shift
11:06 ribasushi It's like the insistence that strict should be on by default in perl, so that you don't have to write it yourself. This incesant churn-generation is what I really can not understand - where does the desire for upsetting what's there come from?
11:06 sri we are adding terrible hacks around SQL::Abstract private methods
11:06 sri i mean... this is bound to be a terrible experience for us
11:08 sri and i realize you have very different optinions about backcompat than me :)
11:10 ribasushi all of this is beside the point: what I am pointing out is this: you will have to do work *either* way. Comparable amount of "pain" as well. One of them locks your improvements into an isolated "namespace", so it doesn't affect anyone else. The other road leads to the entire SQLA userbase being at the mercy of a maintainer putting their foot down and saying "no, we are not creating more work for existing users", and I am not sure such a maintainer exi
11:10 ribasushi sts for SQLA right now
11:10 ribasushi Thus my concern that you by default prefer the "create churn and work for everyone involved" option
11:11 sri ribasushi: you might be misunderstanding me too though, i'm driven by the desire to improve things, i very much enjoy small iterative improvements to get code ca tiny bit loser to some definition of perfection
11:11 sri just as i enjoy api design, finding the one that fits the problem space the best
11:13 ribasushi I understand this desire well
11:13 ribasushi There is a tangential question however: how much my drive for perfection costs bystanders who couldn't care less about what pleases my aesthetic?
11:13 ribasushi I may be missing it in the noise, but it *seems* to me you are not asking yourself this too often
11:14 ribasushi ( didn't mean to go off the philosophical deep end btw, I just worry you'll start pressuring SQLA caretakers to publish more surface API, and that'd be something that'll create more work for *me* )
11:15 sri definitely not as often as you do :p
11:15 sri i mean, that's pretty much what i was known for in the early days of mojo, when stuff broke every day
11:17 sri ribasushi: not sure about pressuring, but i will definitely ask what would make sense to have in SQL::Abstract
11:18 ribasushi ... which worries me, that's all ;)
11:18 sri i mean, we are bound to have SQL::Abstract::Pg, SQL::Abstract::SQLite, SQL::Abstract::mysql and DBIx::Class::SQLMaker as subclasses that will be more frequently used now
11:19 sri seems like a very valid question to ask which features all of them might like to share
11:20 ribasushi except there are way more: SQL::Abstract::Limit, SQL::Abstract::More, SQL::Abstract::Complete, and many others I can't recall off the top of my head: what happens to them>
11:21 sri (i'm not sure which feature subclasses on cpan are commonly used)
11:22 sri it's terrible they all have to rely on overloading private methods
11:22 sri https://metacpan.org/requires/module/SQL::Abstract?sort=[[2,1]]&size=50
11:25 ribasushi which link... is kinda my point ;)
11:25 ribasushi anyway I got to run &
11:29 sri it's actually kinda funny, usually people complain that i try to reinvent too much :p
11:29 sri but i guess SQL generation is an especially messy subject
11:31 sri if anyone feels like helping, a proof of concept for functions in select lists and group by support are the two things i want the most for now i think
11:31 * sri imagines Grinnz might have things he'd like to have for sqlite
11:31 gregf_ hi
11:31 purl niihau, gregf_.
11:32 sri o/
11:32 gregf_ hmm, thats chinese iirc :D
11:32 gregf_ hello
11:32 gregf_ needed a help
11:33 gregf_ ive got these around modifiers in the swagger file.. like so: x-mojo-around-action: "PaymentAPI::auth"
11:33 sri ribasushi: do you by any chance remember where you test functions in select lists?
11:33 * sri just can't find it
11:34 gregf_ i needed to call this explicitly from the controller based on a specific header in the request
11:34 * sri is not a swagger user
11:35 gregf_ well, i am .. but not much with Perl tbh :D
11:36 ribasushi sri: I don't explicitly in a standalone test, it is all part of larger integration pipelines
11:37 ribasushi sri: the DBIC semantics of functions in select/group_by/ordered is *realy* shitty, I wouldn't recommend copying it
11:38 ribasushi it "evolved" way before my time from the idea "well, if it is a plain string - it must be a column name. If it is a hashref - it must be a function around a column. And of course there ought to be parens around it... except when there shouldn't be... and nesting is obvious... except when it isn't... buh :/"
11:41 gregf_ sri: i want to call a method from the use Mojo::Base 'Mojolicious';  class
11:41 ribasushi sri: if you want to read anyhow the entry point is here:
11:41 ribasushi https://metacpan.org/source/RIBASUSHI/DBIx-Class-0.082840/lib/DBIx/Class/SQLMaker.pm#L116-121
11:41 ribasushi plus 'sub _recurse_fields' in the same file
11:42 ribasushi ( also I have the feeling there was more to it, but I might be misremembering, it's been a year+ since I touched any of it )
11:48 Edward joined #mojo
12:02 gregf_ my, managed to hack it :(
12:10 tchaves joined #mojo
12:45 itaipu joined #mojo
12:54 dod joined #mojo
12:56 tcohen joined #mojo
13:03 mib_ngsbhs joined #mojo
13:18 sri ribasushi: thanks, any parts you think that are worth taking?
13:19 * sri wonders if group by should just be handled like "->select('some_table', '*', {...}, {group_by => 'foo, bar'})" for starters
13:19 sri it would be consistent with the second select argument
13:20 sri leaves room for doing stuff with {group_by => []} and {group_by => {...}} later on
13:25 sri suppose the same could be done with {for => 'UPDATE'} for starters
13:25 sri {for => 'UPDATE SKIP LOCKED'}
13:26 sri to start with some hooks to get raw sql in certain places
13:26 ribasushi sri:   `group_by => 'foo, bar'`   immediately runs into quoting problems, if anything you can start by only permitting \'foo, bar' ( \'' and \[] being the ecosystem-standard pieces )
13:27 sri yea, scalarref would have been my first choice too
13:27 sri but it looks like at the argument level plain strings are used at the moment for raw sql
13:27 sri ->select(..., 'foo, bar', ...)
13:29 sri ah wait, that's just that one being inconsistent
13:29 sri ->select(\'some_table', ...) is  raw sql
13:29 sri i've only ever used scalarrefs inside other structures there
13:30 ribasushi sri: indeed it is incosistent I haven't even noticed that before, sigh.
13:32 ribasushi sri: under a "clean room" reimplementation I'd see if there is a way to make handling of select/group/where/order uniform by reusing as much of the where-specific primitives as possible
13:32 ribasushi including these: https://metacpan.org/pod/release/ILMARI/SQL-Abstract-1.84/lib/SQL/Abstract.pm#Literal-SQL-and-value-type-operators
13:32 ribasushi but I haven't thought too much about it, just have the gut feeling "there must be a better, more consistent way"
13:33 ribasushi as a DBIC user today you must know that where/having is parsed one way, order_by a tad differently, and select/group_by a third way
13:33 ribasushi it... sucks.
13:33 * sri nods
13:34 ribasushi regarding locking - this is what we do:
13:34 ribasushi https://metacpan.org/source/RIBASUSHI/DBIx-Class-0.082840/lib/DBIx/Class/SQLMaker.pm#L180-181
13:34 ribasushi https://metacpan.org/source/RIBASUSHI/DBIx-Class-0.082840/lib/DBIx/Class/SQLMaker.pm#L191-207
13:35 sri i saw that actually, there's just so many extra things postgres can do there :)
13:36 ribasushi hence the  \$whateveryouwant escape
13:37 ribasushi basically with quoting being more or less mandatory these days, having \$do_not_quote_this consistent everywhere seems the least awful thing on a macro-level
13:38 sri yea
13:39 sri i suppose you'd want \'some raw sql' and \['some ? sql', 'placeholder value'] used everywhere consistently
13:41 ribasushi that's the theory yes, now in practice SQLA is not that far along yet as you saw yourself with the select "hole"
13:41 sri it is the only exception i've seen so far to the rule though
13:43 ribasushi sri: and here is why I did not recall SQLA misbehaving: https://paste.debian.net/plain/1007336
13:43 sri heh
14:16 gizmomathboy joined #mojo
14:31 good_news_everyon joined #mojo
14:31 good_news_everyon [mojo-pg] kraih pushed 1 new commit to master: https://git.io/vNXwk
14:31 good_news_everyon mojo-pg/master 3156c3c Sebastian Riedel: add support for group_by and for options
14:31 good_news_everyon left #mojo
14:31 sri does that seem reasonable?
14:43 exp-innit interestingly Mojo::JSON is complaining that my input is not utf-8 encode
14:43 exp-innit which it very well may be not, as it's from javascript
14:43 exp-innit makes me laugh that this is still the case in 2018
14:49 genio exp-innit: decode_json vs from_json
14:49 jacoby joined #mojo
14:49 genio https://metacpan.org/pod/Mojo::JSON  examples for both exist
14:51 tyldis Seems everyone falls into that trap
14:52 tyldis Which is good, because there is seldom a reason to handle JSON directly in Mojo ;)
14:53 exp-innit genio: oh it may have been that, I also explicitly added the utf8 header on the client side
14:57 tyldis Mojo and OAuth2, with password grant. Mojolicious::Plugin::OAuth2 only does authorization_code grants. Recommended modules? Net::OAuth2::Client?
14:57 sri tyldis: problem is that people don't understand how unicode works in perl
14:58 sri once you do these things are pretty easy
14:58 tyldis Good point
14:58 purl nice and sharp
14:58 CandyAngel Missed you, purl
14:58 purl CandyAngel: what?
15:00 jberger to build on what sri said, there's a fairly simple way to think about it
15:00 jberger there are only two things, bytes and strings
15:00 jberger bytes are not strings, even if the may look like it
15:00 gryphon joined #mojo
15:00 jberger to convert between them, you do utf8 conversion
15:01 jberger that's about it
15:01 sri and there should be a flag on every scalar that tells you if bytes or chars, that's something worth breaking backcompat
15:01 jberger that would be lovely
15:02 jberger (and note that that isn't the uff8 flag, ignore that flag, its isn't ever helpful (for you))
15:02 sri or core exceptions as objects, also worth
15:02 jberger so many things that could be added incrementally to a language with an available major version number
15:02 * jberger shuts it
15:03 sri i don't actually have that much breaking changes i'd like to make in perl
15:03 jberger I'd flip a lot of the defaults
15:03 jberger strict warnings features
15:03 jberger a few of the "no" modules
15:03 tyldis I thought "use utf8" was if the code itself was UTF8, like 'my $æøå'? :)
15:03 jberger indirect being the big one
15:04 jberger tyldis: yes
15:04 tyldis Good
15:04 jberger but that isn't what we are talking about in the case of JSON etc
15:04 jberger (neither is that "the utf8 flag")
15:05 jberger the good thing about flipping those defaults is that they have the backward compatibility built right into them
15:05 jberger but put the onus on the (few) users that have ancient code that they choose to run on recent perls
15:06 jberger (read: they don't do that, they just run old perls too)
15:06 CandyAngel Yay for perlbrew
15:11 good_news_everyon joined #mojo
15:11 good_news_everyon [mojo] jberger force-pushed get-user from 865ce24 to d5bd9db: https://git.io/vNKzy
15:11 good_news_everyon mojo/get-user d5bd9db Joel Berger: add cURL-style -u for username/password entry to the get command
15:11 good_news_everyon left #mojo
15:11 jberger sri: I'm force-pushing to my branch, this is only the non-controversial golf in the JSON output
15:11 jberger that's still net two lines
15:12 jberger yea/nay?
15:13 sri jberger: neutral
15:13 jberger marcus / batman : votes?
15:13 maschine joined #mojo
15:14 jberger the case basically is easier use of basic auth with generated passwords
15:14 sri jberger: -u, --user <userinfo>
15:14 jberger I can change that if you like
15:14 sri it's missing
15:14 jberger oh, I thought that was meant as the description
15:14 jberger I see what you mean
15:15 good_news_everyon joined #mojo
15:15 good_news_everyon [mojo] jberger force-pushed get-user from d5bd9db to 0b03bcc: https://git.io/vNKzy
15:15 good_news_everyon mojo/get-user 0b03bcc Joel Berger: add cURL-style -u for username/password entry to the get command
15:15 good_news_everyon left #mojo
15:17 sri and now i want a comment on if thiese all seem reasonable :p http://mojolicious.org/perldoc/SQL/Abstract/Pg
15:18 tyldis jberger: Try passing : or ? as password in your tests :)
15:18 tyldis Wihout url encoding
15:19 * tyldis has to dash for while
15:20 genio sri: They all seem reasonable to me. But to nitpick, it does seem to break from your tradition of structured POD in =head1 METHODS =head2 select ...
15:20 sri there is no public methods involved at all
15:20 jberger tyldis: I still have no idea why that would affect anything
15:20 jberger but here you go:
15:20 jberger perl -Ilib -Mojo -E 'a("/" => sub { $_->render(text => $_->req->url->to_abs->password . "\n") })->start' get -u 'joel:my:pass?word' /
15:21 jberger works fine for me
15:21 sri genio: i have to hack private methods to make the public methods do stuff... :S
15:21 genio sri: right, but since its functionality is being altered... ? *shrugs* just a nitpick. it reads well and I like the functionality
15:22 genio and it's kind of hard to link back to SQL::Abstract's select() method since their docs throw in the parameters as well in the =head
15:22 sri ye
16:03 exp-innit unicode variables are great, but i hate that i can't do $a₁ and $a₂ :'(
16:03 bianca joined #mojo
16:04 jberger exp-innit: can you not?
16:05 genio I've never felt the need to have a unicode variable name
16:05 exp-innit jberger: not afaik, in 5 or 6
16:06 exp-innit genio: I am English, so I am incredibly lucky in the default ascii set
16:06 jberger but with "use utf8" you could do unicode identifiers
16:07 jberger and is that not an identifier?
16:07 ChmEarl joined #mojo
16:08 exp-innit jberger: i'll have to check, one moment plz
16:09 exp-innit Transliteration pattern not terminated at -e line 1.
16:09 exp-innit heh
16:11 jabberwok sri: should not order_by take an arrayref instead of hashref?  To be compatible with  https://metacpan.org/pod/SQL::Abstract::More#-order_by-=%3E-\@order
16:12 sri jabberwok: it does
16:12 jabberwok aye, ... so it does
16:12 sri it accepts *all* possible $order values
16:22 disputin joined #mojo
16:22 reetp_x5 joined #mojo
16:23 exp-innit jberger: turns out i'm dumb, it's not the above error
16:23 exp-innit it's a different, but still extant one
16:23 exp-innit not really related to mojo however
16:23 jabberwok ... given this, we won't need db specific plugins pieces like Yancy has now, very nice indeed
16:23 jberger you are trying as a one-liner
16:23 jberger ?
16:23 jberger are you using -CSAD
16:24 exp-innit those are just for stdin modes aren't they?
16:24 exp-innit man it's been a while
16:24 exp-innit lemme check
16:24 jberger (that seems to the be magical utf8 incantation)
16:24 jberger overall I'
16:24 jberger sorry, overall I'd say make a little script to try it
16:26 exp-innit $ perl -CSAD test-unicode.pl
16:26 exp-innit Unrecognized character \x{2081}; marked by <-- HERE after my $a<-- HERE near column 6 at test-unicode.pl line 5.
16:26 exp-innit (includes `use utf8`)
16:26 jberger exp-innit: yeah, seems like you'd need -Mutf8, -C is just the io/args stuff like you said
16:26 jberger or right, that if you're using a script
16:27 exp-innit jberger: given this doesn't meet 6's naming requirements for unicode names, I doubt it'd be happy in 5, still everything else is great
16:27 jberger yeah
16:28 sh14 joined #mojo
16:42 trone joined #mojo
16:47 dod1 joined #mojo
17:02 dod joined #mojo
17:24 bianca joined #mojo
17:39 dod joined #mojo
17:45 sri hmm, i suppose SQL::Abstract::insert could be updated with upsert support
17:46 sri ->insert('some_table', {foo => 'bar'}, {on_conflict => {foo => 'baz'}})
17:47 sri ->insert('some_table', {foo => 'bar'}, {on_conflict => undef}) # on conflict do nothing
17:49 sri only problem is that ON CONFLICT is supposed to appear before RETURNING
17:50 Grinnz that would be specific to pg, it works differently in sqlite and mysql
17:50 sri yea, i'd add it in SQL::Abstract::Pg
17:51 Leffe joined #mojo
17:51 sri have to use an ugly hack though, fake a returning option and generate the on conflict from SQL::Abstract::_insert_returning
17:51 bianca joined #mojo
17:52 sri easy upsert would be cool though
17:53 dod joined #mojo
17:53 sri oh no
17:54 sri SQL::Abstract::update does not abstract out the SET clause handling into a separate method :(
17:54 sri there goes that idea
17:54 sri no way i copypasta all of that
17:56 genio Should we just start a new SQL::Builder or something that goes to an intermediate AST first?
17:57 genio more or less keep the good bits of the API of SQL::Abstract but make it easier to extend
17:57 Grinnz built for modular database-specific extensions!
17:58 * genio has a feeling this has already been discussed and he's bringing up old ideas
17:59 sri nobody wants to do it
17:59 sri i mean, if i had a few weeks of spare time i'd give it a shot...
17:59 genio it would surely take a lot o work
17:59 genio +f
18:00 ribasushi that's not exactly... so
18:00 ribasushi cpanm --look https://cpan.metacpan.org/authors/id/R/RI/RIBASUSHI/SQL-Abstract-1.99_01.tar.gz
18:00 ribasushi ^^ this contains both the gutted sqla + original-ish test suite + the support AST stuff in .../TempextLib
18:01 ribasushi as I said earlier: https://irclog.perlgeek.de/mojo/2018-01-23#i_15727412
18:02 Grinnz link for non terminals: https://metacpan.org/release/RIBASUSHI/SQL-Abstract-1.99_01
18:04 genio so, I _am_ bringing up old stuff. sorry
18:05 ribasushi personally I think you ( #mojo ) would get a lot more mileage from a cleaned up API based on DQ or something similar, instead of taking the above dist as-is
18:06 ribasushi there is a lot of garbage in stock SQLA that is no worth ever using: the auto-casing, the switchable logic, etc
18:07 Grinnz so what you're saying is... Mojo::SQLBuilder :P
18:08 ribasushi IFF you want to go the AST route - yes
18:08 sri especially filtering an AST with preprocessor extensions would always be too slow i think
18:08 * genio wonders how terrible this is https://metacpan.org/pod/TSQL::AST (goes to look)
18:09 sri i'll stick with pragmatic solutions for now
18:31 reetp_x5 joined #mojo
18:33 good_news_everyon joined #mojo
18:33 good_news_everyon [mojo-pg] kraih pushed 1 new commit to master: https://git.io/vN1C8
18:33 good_news_everyon mojo-pg/master db0022e Sebastian Riedel: undef does not look as good
18:33 good_news_everyon left #mojo
18:43 Leffe Hi guys
18:43 disputin joined #mojo
18:44 Leffe I need to show a directory to users with files they can download.
18:44 bianca joined #mojo
18:45 Leffe I'm wondering if there is something already done I can use. What I'm looking for is a directory / file view. Apache old style
18:56 pink_mist Mojolicious::Plugin::Directory
19:05 Grinnz https://metacpan.org/pod/App::SimpleHTTPServer
19:06 * sri will try to get this changed in SQL:Abstract so Mojo::Pg can have nice looking upserts https://github.com/dbsrgits/sql-abstract/pull/12
19:06 Grinnz as a standalone server
19:20 ghenry joined #mojo
19:20 Leffe Thanks Grinnz. I need to be part of mojolicious server.
19:21 Grinnz then use the directory plugin it uses directly
19:21 Leffe directory plugin?
19:21 Leffe How could I miss it? i'll check it inmediately
19:22 jberger the stylish one is shinier but the one pink_mist linked looks like apache
19:23 Grinnz well he didn't link it, so: https://metacpan.org/pod/Mojolicious::Plugin::Directory
19:24 Leffe jberger: which one is the stylish?
19:25 jberger ... the one from SimpleHTTPServer
19:25 Grinnz https://metacpan.org/pod/Mojolicious::Plugin::Directory::Stylish
20:35 trone joined #mojo
20:54 good_news_everyon joined #mojo
20:54 good_news_everyon [mojo-pg] kraih pushed 1 new commit to master: https://git.io/vN1KN
20:54 good_news_everyon mojo-pg/master 15bfe0d Sebastian Riedel: handle SQL generation more consistently with SQL::Abstract
20:54 good_news_everyon left #mojo
20:57 good_news_everyon joined #mojo
20:57 good_news_everyon [mojo-pg] kraih tagged v4.05 at d1132db: https://git.io/vN16c
20:57 good_news_everyon left #mojo
20:57 good_news_everyon joined #mojo
20:57 good_news_everyon [mojo-pg] kraih pushed 1 new commit to master: https://git.io/vN16C
20:57 good_news_everyon mojo-pg/master aee0920 Sebastian Riedel: bump version
20:57 good_news_everyon left #mojo
20:57 sri lets see how it goes :)
21:17 marty_ joined #mojo
21:29 jberger btw, if you want to write a blog post, I'm happy to put it on mojolicious.io
21:29 jberger we could still use one on minion web ui and one on non-mojo minion
21:30 jberger ^^ fyi anyone wanting to start blogging a little, also a good way to give back to mojo
21:43 good_news_everyon joined #mojo
21:43 good_news_everyon [minion] kraih pushed 1 new commit to master: https://git.io/vN1MD
21:43 good_news_everyon minion/master 052b98c Sebastian Riedel: use more Bootstrap 4 features
21:43 good_news_everyon left #mojo
21:46 sri i suppose this is what bootstrap 4 buttons are supposed to look like https://i.imgur.com/wBIPD1o.png
22:02 good_news_everyon joined #mojo
22:02 good_news_everyon [minion] kraih pushed 1 new commit to master: https://git.io/vN1yb
22:02 good_news_everyon minion/master 1249862 Sebastian Riedel: use less colors
22:02 good_news_everyon left #mojo
22:03 mohawk * fewer
22:09 good_news_everyon joined #mojo
22:09 good_news_everyon [minion] kraih pushed 1 new commit to master: https://git.io/vN1SX
22:09 good_news_everyon minion/master 99bab00 Sebastian Riedel: outlines look better
22:09 good_news_everyon left #mojo
22:13 maschine sri: upsert would be awesome!  I've been putting off writing my own upsert routine for ages now :(
22:14 good_news_everyon joined #mojo
22:14 good_news_everyon [minion] kraih tagged v8.09 at 49194fb: https://git.io/vN19m
22:14 good_news_everyon left #mojo
22:14 good_news_everyon joined #mojo
22:14 good_news_everyon [minion] kraih pushed 1 new commit to master: https://git.io/vN19Y
22:14 good_news_everyon minion/master 1b58d59 Sebastian Riedel: bump version
22:14 good_news_everyon left #mojo
22:21 sri maschine: postgres has upsert built in
22:30 maschine so it does *feels dumb*
22:30 maschine I think I started with an older version that didn't have it
22:30 genio it is a fairly recent addition. maybe a year or two now
22:30 Grinnz 9.5 or 9.6 i think
22:31 mohawk what would be great is if all the other dbs gained upsert via SQLA
22:31 Grinnz sri: don't you need to update the screenshot ;)
22:32 sri Grinnz: dashboard has not changed much
22:33 jabberwok the difficulty is, with ON CONFLICT you have to say SET field=value, field=value ...duplicating all the field names and values, but with a different syntax than INSERT INTO table (field, field) VALUES (value, value) ... *and* you have to know which fields to omit, which requires knowing exactly how the constraint was created.  Ugh.
22:34 maschine yeah I was just looking at that.. it's still a little painful
22:35 jberger while that is a little painful, it is really powerful
22:36 jberger you can handle different conflicts differently
22:36 jberger exclude values from update (like say a created timestamp)
22:36 jberger and enforce other values change like an updated
22:37 maschine yeah.. I just need to do it.  It's pretty central to the goals of my project. :|
22:39 jberger also note, upsert always burns an id, even if it ends up being an update
22:39 jberger shouldn't matter if you are using bigint for your id type
22:39 jberger but know that it happens
22:39 maschine hmm.  what's the upper limit on ids?  I might end up burning up like 10,000 at a time
22:40 jberger bigint is ... well ... big
22:40 sri Mojo::Pg could make it fairly nice
22:40 sri $pg->db->insert(‘some_table’, {foo => ‘bar’}, {on_conflict => {baz => ‘yada’}});
22:40 sri from my tweet
22:41 sri just need this applied https://github.com/dbsrgits/sql-abstract/pull/12
22:41 sri annoying how my twitter client replaced the quotes
22:48 maschine jberger: ok.. so I could do 922 trillion upserts.  Probably not an issue. :p
22:48 jberger right :-P
22:49 pink_mist "a week later ... so, I'm at 921 trillion upserts and I'm getting slightly worried" :P
22:55 mohawk with Test::Snapshot 0.05, it's almost a pleasure getting a test fail: now it generates a text-diff between the got and expected
22:55 dikim joined #mojo
22:57 mohawk and it only took me two goes to get the "Text::Diff::diff" args the right way round!
22:57 omega joined #mojo
23:06 * jabberwok gives everyone in the channel a fresh baked cookie.  y'all are awesome
23:10 CandyAngel Do nothing. Get cookie. Best channel.
23:10 mohawk jabberwok++
23:11 mohawk CandyAngel, shurely that should have been "the fake news media don't give you cookies. best channel!"? ;-)
23:32 disputin joined #mojo

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