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

IRC log for #mojo, 2016-09-16

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

All times shown according to UTC.

Time Nick Message
00:34 Pierre joined #mojo
00:39 Grinnz https://i.imgur.com/zKeqQRV.gifv
01:09 itaipu joined #mojo
01:11 ikra joined #mojo
01:11 ikra hello
01:11 purl hi, ikra.
01:12 ikra i head that the mojo chanel is a friendly place
01:12 ikra espacialy for persone who write baby perl
01:12 ikra :)
01:13 ikra ji purl
01:14 ikra i have some questions about mojolicious
01:15 ikra espacialy about templates and layout
01:18 ikra when we call a get on a route, can we do it without calling the render methode?
02:21 noganex_ joined #mojo
03:00 laidback_01 joined #mojo
03:18 jberger Yes. If you give the route some stash defaults it can just render from those
03:18 jberger Like
03:19 jberger get '/me' => { text => 'my name is Joel' };
03:20 jberger Oh nm
03:20 jberger They left
03:32 Caduceus joined #mojo
03:32 Caduceus left #mojo
03:33 Pierre joined #mojo
03:51 Adurah joined #mojo
04:03 zivester joined #mojo
04:11 Pierre joined #mojo
05:52 dod joined #mojo
05:57 dod joined #mojo
06:01 mbudde joined #mojo
06:14 jamesaxl joined #mojo
06:17 itaipu joined #mojo
06:34 inokenty-w joined #mojo
07:00 AndrewIsh joined #mojo
07:26 Vandal joined #mojo
07:37 cpan_mojo Mojo-IRC-0.39 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/Mojo-IRC-0.39
07:51 arthas joined #mojo
07:52 trone joined #mojo
07:57 osfabibisi joined #mojo
08:00 che-quest joined #mojo
08:11 rubin joined #mojo
08:15 Pierre joined #mojo
08:19 nic oh how drole
08:20 nic my irc client was alerting me... felt the phrase "revisiting the killer nic" was somehow relevant
08:23 rubin joined #mojo
08:27 png joined #mojo
08:28 bd that is at the samte time obvious and disturbing ;)
08:28 bd s/samte/same/
08:30 png hi sri, I'm back as I said yesterday
08:31 png I think the reason behind my problem is I'm doing something I shouldn't do inside an event loop :-/
08:32 png which is running a command through ssh which sometimes takes too long. I guess that's when the connection drops.
08:34 png (I have tried several older Mojolicious versions, starting with 7.03 as we discussed, and it keeps happening, so I guess the problem is I take too long to return control to the ioloop)
08:34 png so now my problem is how to run ssh commands from inside an ioloop without breaking it, I guess
08:37 batman png: you should check out https://metacpan.org/pod/Mojo::IOLoop::ForkCall or https://metacpan.org/pod/Mojo::IOLoop::ReadWriteFork
08:38 png will do, thanks
08:39 batman the main difference between those is that RWF can communicate with the process, while ForkCall is an easy way to run some task in a fork and return the result to the parent process
08:40 png I will probably use ForkCall; I don't need interaction with the subprocess other than receiving its output and/or exit status.
08:52 firnsy http://mojolicious.org/perldoc/Mojo/IOLoop/Subprocess
08:53 firnsy png: ForkCall has been adapted into the core as Subprocess
08:53 batman firnsy++ # i totally forgot about it :(
08:53 firnsy Note that this module is EXPERIMENTAL and might change without warning!
08:54 png even better, thanks
08:56 bd sweet, now i can parse that 512mb excel sheet in the background and not block webrequests
09:03 mbudde joined #mojo
09:05 irqq joined #mojo
09:10 Pierre joined #mojo
09:28 Pierre joined #mojo
09:29 cpan_mojo Mojolicious-Plugin-OAuth2-Server-0.30 by LEEJO https://metacpan.org/release/LEEJO/Mojolicious-Plugin-OAuth2-Server-0.30
09:30 Lee now fully implements RFC 6749 \o/
09:31 Lee (note: "fully")
09:38 Pierre joined #mojo
09:56 Pierre joined #mojo
10:01 osfabibisi joined #mojo
10:02 sri Lee++
10:03 sri png/jberger: so using an older version of Mojolicious makes no difference?
10:03 sri jberger: you need a new theory
10:14 Pierre joined #mojo
10:15 osfabibisi joined #mojo
10:23 kaare_ joined #mojo
10:28 png sri: not in my case at least, I have gone back up to 6.66 and I keep losing the connection.
10:28 sri png: if you want us to fix it, please try making a minimal test case
10:29 png I guess the problem is on my side of things actually
10:30 che-quest hi! has [qw(A B)] => sub {X->new}; Does A and B is diffrent X?
10:30 png I think since I'm blocking for too long, the slack client is not getting its chance to respond to server pings and thus gets disconnected
10:30 png therefore I will try to do the blocking stuff in a subprocess
10:35 batman che-quest: can you rephrase. i don't understand the question.
10:36 vicash hi batman: when using Mojo::Plugin::AssetPack does the %= asset app.js need to be in the <head> section or can it be placed in the <body> at the bottom of the layout as well ?
10:40 batman vicash: you can place it where ever you want. it just inserts a normal html tag
10:40 batman i'm usually placing css assets in head and script assets right before </html>
10:41 nic che-quest: yes, each gets its own object (as a default if no other assignment is made)
10:41 vicash thanks batman
10:42 batman you're welcome
10:42 batman are you using the 1.x series of assetpack vicash?
10:42 che-quest thanks nic
10:42 vicash batman: 1.24
10:43 batman sweet! got any feedback, relative to the old version?
10:44 vicash batman: first time user. so no relative feedback... only absolute feedback which is that it makes it easy to manage various JS/CSS files on different layouts
10:44 batman thanks :)
10:44 batman even better
10:44 vicash is there a recommended javascript library to use for editable tables ?
10:45 vicash Datatables's Editor is not free..
10:45 vicash jeditable ?
10:45 batman vicash: i would probably look at one of these: https://github.com/search?l=JavaScript&amp;q=edit+table&amp;type=Repositories&amp;utf8=%E2%9C%93
10:46 vicash batman: thanx
10:47 itaipu joined #mojo
10:57 osfabibisi joined #mojo
11:05 sri think the minion kill jobs feature wouldn't actually be too hard to implement https://github.com/kraih/minion/issues/37#issuecomment-247574565
11:06 sri and could be used for many purposes, like a global pause
11:10 sri imagine it shouldn't be too hard to add to Minion::Backend::SQLite either
11:11 sri the change to resgister_worker would be breaking though
11:21 sri hmm, on the other hand, heartbeats have a pretty low frequency
11:21 sri 60 second interval might be too high for broadcast messages
11:26 sri jberger: you've worked a lot with jsonb recently, do you happen to know how to push a value on a jsonb column that's always an array?
11:30 CHYC update jsonb_table  set jsonb_column = jsonb_column || '["foo"]'::jsonb ?
11:30 CHYC New in 9.5
11:32 sri really, is it that easy? :o
11:32 sri i can use 9.5 features
11:39 sri ok, think i know how i want the api to work
11:41 sri $minion->backend->send_command($worker_id, ['max_jobs', 4])
11:41 sri $worker->add_command(max_jobs => sub {...});
11:41 sri $worker->receive_commands;
11:44 sri on the command line it's a little tricky
11:44 sri $ minion job -c 1234 -a '["max_jobs", 4]'
11:44 sri perhaps like that
11:45 sri $ minion job -c 1234 -a '["max_jobs", 0]'
11:45 sri that would essentially pause the worker remotely
11:45 sri -c being short for --command, which is used to set the worker id
11:46 osfabibisi joined #mojo
11:49 sri oh wait, actually on the command line it can be nicer
11:49 sri $ minion job 1234 -c max_jobs -a 4
11:49 sri the worker id can just be an argument like that
11:50 sri that's nice
11:51 CHYC sri: Would the arguments necessarily be integers? Your previous commandline accounts for different representations of numbers.
11:51 sri nope
11:51 sri arbitrary json values
11:51 sri actually it will prolly be required to be an array
11:52 sri -a '[4]'
11:52 sri to make it consistent with job arguments
11:52 CHYC Yeah, that's much nicer.
11:55 osfabibi_ joined #mojo
11:56 sri hmm, now i wonder if postgresql has a way to set an array of array constraint on a jsonb field
11:57 sri well, i bet it does
12:13 blonewolfs joined #mojo
12:15 jberger Looks like you got your answer
12:15 jberger I was going to say that i hadn't done it for jsonb but i have for array types
12:15 jberger And that basically is how it worked
12:17 jberger Plays well with on conflict update too
12:41 bwf joined #mojo
12:46 sri btw. i welcome opinions on a worker remote control system
12:47 cuechan joined #mojo
12:55 ramortegui joined #mojo
12:58 jberger as a generic system that sounds fine
12:59 jberger I agree that if you wait for the heartbeat it might be a little clunky
13:00 sri yea, i'll definitely give it a separate interval
13:00 sri configurable
13:00 sri and it will replace the TTIN/TTOU signals
13:00 jberger but without adding too much more complexity, it seems quite reasonable
13:01 sri so it should end up with the same lines of code in Minion::Command::worker
13:01 sri minion will be bumped to 6.0 to cover the little backcompat breakages
13:02 sri which are actually not too bad
13:03 sri if Grinnz doesn't want to support it in Minion::Backend::SQLite he could just add empty send_command/receive_commands methods and commands would be ignored
13:03 jberger oh, because sqlite's json can't manipulate in place?
13:04 jberger (I don't know if that's true)
13:04 sri i don't know either
13:04 jberger even if it couldn't, its a read and a write
13:04 sri but i imagine if he wants Grinnz will find a way to make it work
13:04 jberger sqlite was never meant to be performant
13:04 jberger yeah
13:04 sri yea
13:05 sri and it's not like you'll be running throusands of commands per second ;p
13:05 sri just increase/decrease the number of concurrent jobs remotely every now and then i imagine
13:05 jberger yeah, this isn't high volume traffic
13:05 sri that's the one command i will start with
13:07 jberger as I implement mine, I keep being surprised that the worker command doesn't use the ioloop directly
13:08 jberger a recurring timer for the heartbeat and one for repair
13:08 jberger etc
13:08 vicash batman: i am using AssetPack with Bootstrap.. how do I get the fonts in there ?
13:09 batman vicash: that doesn't work right now: https://github.com/jhthorsen/mojolicious-plugin-assetpack/issues/92
13:10 vicash oh!
13:11 batman vicash: uhm.. are you using SASS, LESS or plain CSS?
13:11 vicash batman: i am using the plain css from the bootstrap CDN.
13:12 vicash batman: as of now i am not modifying anything from there.. using the default stuff
13:12 batman oh. then it's an different issue... so what you're saying is that you want to serve the fonts locally as well as the css?
13:12 vicash batman: yes.. i am trying to use the glyphicon feature from bootstrap
13:12 vicash but the icons show up as square boxes
13:13 batman right. any special reason why you can't use the fonts from cdn?
13:13 sri jberger: there would be no real gain from doing that imo
13:13 vicash batman: do I need to provide that URL in the assetpack.def ?
13:14 batman vicash: maybe you want https://metacpan.org/pod/Mojolicious::Plugin::AssetPack::Pipe::Fetch
13:14 batman pipes => [qw(Fetch Css)]
13:15 batman or maybe the other way around :P https://metacpan.org/source/JHTHORSEN/Mojolicious-Plugin-AssetPack-1.24/t/fetch-all.t
13:15 vicash ok i will try that
13:16 zivester joined #mojo
13:18 vicash batman: that seems to have pulled it into the cache but icon not displaying.. probably some error on my side now.
13:18 batman vicash: i'm not sure... i don't use any of those features myself :/
13:19 vicash batman: i get the error download failed /asset/fonts/glyphicons.ttf  because the css still refers to relative paths
13:20 batman have you tried changing the order of the pipes?
13:20 batman like i showed you in the unit test?
13:20 vicash batman: yes I use [Css JavaScript Fetch Combine]
13:21 Pierre joined #mojo
13:21 batman are you sure the assets have been downloaded?
13:21 vicash yes i see them in the cache folder
13:21 batman weird.
13:22 batman then i suggest you clone the test i showed you and try and see what happens
13:22 batman i'm sorry to say i don't have time to look at it until... maybe next week
13:22 vicash ok i will try that out... i will also try out the Less version to see if that works
13:22 batman i would suggest Sass.
13:23 vicash ok i will do that instead
13:23 itaipu joined #mojo
13:23 batman i mean... unless you know Less from before :-)
13:24 jberger regarding https://github.com/kraih/minion/issues/41
13:24 jberger if anyone relies on Minion::Backend::mysql I would recommend considering adopting it
13:24 jberger I think the author would likely hand it over
13:24 vicash batman: i dont. i see the cached bootstrap css and the url() links are still relative to that.. that's why it isn't working.. since the css is used without any modifications. i understand the error. iw ill try Sass to see if that fixes it
13:25 batman yeah... so with sass, you need to configure the location of the fonts and download the font files manually.
13:25 batman other than that, it should work
13:26 vicash ok cool .. will do
13:27 juikuen joined #mojo
13:28 vicash batman: using the Sass version of bootstrap fixed it.. didn't have to download anything..
13:28 batman wow! cool :)
13:28 batman but... is the fonts cached locally?
13:29 vicash batman: yes the boostrap's sass code has downloaded the fonts appropriately and cached them
13:29 batman can you tell me the order of the pipes?
13:29 vicash Sass Css JavaScript Fetch Combine
13:30 batman cool :)
13:30 vicash i also have the CSS::Sass module installed as recommended in the Cookbook
13:30 vicash excellent stuff batman
13:31 batman vicash: can you comment on https://github.com/jhthorsen/mojolicious-plugin-assetpack/issues/92 with your solution?
13:31 vicash sure
13:31 Akron joined #mojo
13:31 batman vicash: faaaaantastic! <3
13:34 gizmomathboy joined #mojo
13:37 osfabibisi joined #mojo
13:39 Akron lee++ (OAuth2 support)
13:45 Lee i need to update the examples for the other grant types, will maybe do that this weekend
13:48 Lee joined #mojo
13:52 Lee joined #mojo
13:53 Lee joined #mojo
13:57 sri so, any  ideas for a postgresql constraint that covers arrays of arrays?
13:58 jberger sri: can't you just use CHECKs?
13:59 sri can i?
14:00 jberger I would think so
14:00 jberger CHECK jsonb_typeof ...
14:00 jberger what was the structure you were thinking of again? I'll try to build it
14:02 CHYC jberger: You may come unstuck because aggregate functions are not allowed in check constraints (which you probably will need to check for arrays of arrays).
14:02 sri array of array
14:03 sri i do have check(jsonb_typeof(inbox) = 'array')
14:03 sri but i don't know how to do array of array
14:03 * jberger tinkers
14:03 CHYC I'm happy to be proved wrong, but I'm fairly sure it's only possible using a constraint trigger.
14:04 sri btw. th epatch so far https://gist.github.com/anonymous/0aaa8480030530aaf854dba405a0dbc3
14:21 khfeng joined #mojo
14:23 jberger CHYC is right, it can't be a simple CHECK
14:30 jberger however the check can be a function
14:30 anton joined #mojo
14:33 jberger https://gist.github.com/jberger/173ba1c2ba9300aec2a9d2c07170572b
14:36 irqq joined #mojo
14:38 osfabibisi joined #mojo
14:40 mcsnolte joined #mojo
14:43 CHYC jberger: I hadn't thought of a function in a check!
14:44 jberger I've been using a lot of functions lately :-P
14:45 CHYC Given that we all like perl and TIMTOWTDI etc, here's my take on it https://gist.github.com/chy-causer/a55b514c03ca6f7a8ac07b0d46782a5c
14:46 * CHYC assumes we all like perl
14:47 jberger I like your all better than mine
14:47 jberger why this though: _input = '[]'
14:48 CHYC When _input is '[]', the function returns NULL. This changes it to true.
14:49 jberger hunh
14:49 jberger does a check returning null successful?
14:49 jberger s/does/is/
14:50 jberger (sidenote, sqlfiddle needs to update their postgres)
14:51 CHYC It does validate successfully on NULL, but that feels icky to me.
14:51 jberger actually, I almost think is_AoA on [] returning null is probably the correct behavior
14:51 jberger from a semantic standpoint
14:52 jberger maybe not, I'd have to think about it
14:52 jberger but for the validitity check we care about, yes, [] should be true
14:57 sri that escalated quickly :o
15:02 sri anyway, i've committed what i have for now https://github.com/kraih/minion/commit/4054eac5823fd8bdf6b6c0bf4735af3d1d28ee85
15:02 sri time to decide if it is worth the cost
15:04 orev joined #mojo
15:08 sri possible future additions would be the ability to kill specific jobs remotely or to change the queues a worker is watching
15:09 sri both pretty easy, like one-liners
15:10 sri both might even be possible as 3rd party additions
15:11 sri no wait, you don't have access to the command instance
15:11 sri ;p
15:11 sri but it's close
15:14 jberger is there any reason not to just heartbeat when checking for commands?
15:14 sri it's a write operation all the time
15:14 sri commands will mostly be reads
15:15 jberger good point
15:17 jberger I gave up on raw throughput a long time ago for mine :-P
15:17 sri lol
15:18 sri it's not just about throughput though, i try to avoid frequent write operations with postgres in general
15:19 sri the whole mvcc thing and vacuuming
15:19 jberger hmmm, I don't know about that
15:19 sri every update needs to create a whole new record
15:19 sri you can't update data in-place
15:20 jberger oh
15:20 jberger can it at least reuse the space or do both records get kept indefinitely
15:21 sri both get kept until the next vacuum i believe
15:25 sri autovacuum might reclaim it in the background though https://www.postgresql.org/docs/9.5/static/routine-vacuuming.html
15:27 disputin joined #mojo
15:30 sri https://lob.com/blog/content/images/2015/04/vacuum-postgres-1.jpg
15:31 jberger hahaha
15:31 sri that's pretty much how i imagined it
15:31 jberger hmmm, this seems like something I should have known about earlier
15:44 disputin1 joined #mojo
15:46 lluad joined #mojo
15:48 sri Grinnz: i'd like to hear your opinion on worker remote control commands
15:49 Grinnz seems useful, and sqlite's json extension has a lot of json manipulation functions so there should be a way
15:49 Grinnz i'll have to look into it closer
15:54 dod joined #mojo
15:54 Grinnz hmm, looks like i can only add to a json array by specifying the index
15:55 Grinnz but i can probably just use the size of the array to get that
15:55 PryMar56 joined #mojo
15:59 Grinnz a check constraint to make sure it's a json array is easy, though
16:00 trone joined #mojo
16:00 Grinnz a nice change from mysql which doesn't even have check constraints /o\
16:02 Grinnz hmmm the receive-and-clear operation might be tricky, though
16:02 Grinnz sqlite has no "returning" functionality
16:09 sri worst case it's a transaction?
16:10 Grinnz possibly
16:13 sri i'm actually not a big fan of the receive and clear in postgres, you'd think they have an easier way to access the old value
16:14 Grinnz well i came across an interesting solution googling about it, making a trigger which saves the old value to a temporary table
16:14 Grinnz pretty overcomplicated though
16:14 jberger ewwwwww
16:14 sri lol
16:15 Grinnz is it even worth worrying about a race condition here? you'll only ever have one worker with that id
16:16 Grinnz the transaction won't help against a race condition itself, unfortunately
16:17 Grinnz an exclusive lock would, but meh
16:19 jberger to clear in the second request, can you set it to [] where the value is currently what you just got?
16:19 Grinnz ooh, i like that
16:19 Grinnz but still technically racey :P
16:19 jberger then you have to check that it did update and if not fetch again and ... merge the results?
16:20 jberger actually no, you just the get new value again
16:20 jberger more has been pushed onto it, but nothing else cleared it
16:21 Grinnz the redis way would be to have some unique key that you set first, then select, then check that key on the update
16:21 jberger can sqlite do an equality check  on json types?
16:21 Grinnz but again, this is all probably unnecessary for this case
16:22 Grinnz umm, since it's just an array of numbers, comparing the string would work i guess :P
16:23 Grinnz or array of arrays
16:24 sri wonder if this is a case where array of jsonb would be appropriate
16:24 sri might make check() easier
16:48 dod joined #mojo
17:01 disputin joined #mojo
17:10 laidback_01 joined #mojo
17:22 sri nope, doesn't
17:23 irqq joined #mojo
17:40 ranguard joined #mojo
18:27 sri bet if remote control commands stay, at some point someone is going to ask for a method to send commands to all workers at once
18:28 sri but list_workers with send_command should be good enough for most use cases
18:29 sri perhaps once you have more than a hundred workers and want to pause them quickly
18:41 sri perhaps the name should be changed from "command" to something else
18:41 sri so there is no confusion with the command system
18:41 sri need a good name though
18:41 sri instruction would work i guess
18:51 jamesaxl joined #mojo
18:51 itaipu joined #mojo
18:58 jamesaxl joined #mojo
19:02 sri hmm
19:03 sri suppose it woult be very trivial to make ->send_command(undef, 'some_command') broadcast to all workers
19:05 sri just thought how annoying it would be if you wanted to stop a super long running job with a command
19:06 sri instead of just ./myapp.pl minion job -c kill_job -a '[10523]'
19:06 sri you actually have to look for the specific worker
19:07 sri and use ./myapp.pl minion job -c kill_job -a '[10523]' 12
19:08 sri ./myapp.pl minion job -c jobs -a '[0]'
19:08 sri that could pause the whole cluster
19:09 jberger then again, someone is going to stop their whole cluster sometime because they don't realize that should pass an id to limit it to one worker
19:09 sri haha
19:09 jberger --all ?
19:10 jberger positive confirmation is a good thing when there is a big hammer laying around
19:10 sri or the premise could change
19:10 sri and we just call it broadcast_command
19:10 sri with an optional list of workers to broadcast to
19:11 sri that's how celery does it
19:11 jberger I don't have a strong opinion either way
19:54 sri and done
19:54 sri https://github.com/kraih/minion/compare/63fefa1b66bdb7b361229fb1058e1ccef62f66ed...master
20:05 jberger looks pretty nice
20:19 laidback_01 joined #mojo
20:22 sivoais joined #mojo
20:28 cel1204 joined #mojo
20:35 jabberwok joined #mojo
21:07 y1mmm joined #mojo
21:08 laidback_01 joined #mojo
21:27 jnbek joined #mojo
21:31 sivoais joined #mojo
22:15 jnbek joined #mojo
22:18 jnbek joined #mojo
22:25 cuechan joined #mojo
22:27 cuechan_ joined #mojo
22:45 sri looking through the minion code, i wonder if Mojo::Pg needs an alternative to ->query
22:46 sri sometimes it would look better to split up the sql query and bind params
22:46 jberger what are you thinking the api would be like?
22:47 sri something simple
22:47 jberger usually do a $sql = <<'SQL'; ... SQL for the sql and an array for the params anyway
22:47 jberger so my actual query is almost always $db->query($sql, @params);
22:48 sri $db->qu('select * from foo where bar = ?')->ex('trolololo')
22:48 sri with better names of course
22:48 jberger would there be an intermediary class for the query?
22:48 jberger or do those just get cached in the db object?
22:49 jberger having a query object might actually have some advantages
22:49 sri just cached
22:49 sri there is already another method that caches
22:49 jberger hmm, wish I could discuss more but I'm out on the town tonight
22:49 jberger o/
22:49 jberger happy weekend all
22:49 sri http://mojolicious.org/perldoc/Mojo/Pg/Database#dollar_only
22:49 sri o/
22:50 sri anyway, if anyone else feels like api designing, this is one of the cases https://gist.github.com/anonymous/fc6fcb9eb97359339e0b56141a43107d
22:51 sri it's not terrible, but i feel like we could do better
22:53 cuechan joined #mojo
23:06 jnbek joined #mojo
23:13 Grinnz sri: not sure i see any benefit of splitting those up there
23:15 Pierre joined #mojo
23:22 Pierre joined #mojo
23:27 Pierre joined #mojo
23:29 sri making it more pretty of course
23:30 sri differentiating the query from the parameters more should make it easier on the eyes
23:30 sri the ->qu(...)->ex(...) thing doesn't work there though... since perltidy makes a mess
23:32 sri jberger: btw. re heredocs, i wish perl had indented heredocs
23:33 pink_mist it will
23:33 pink_mist in upcoming versions
23:33 sri please elaborate
23:34 pink_mist http://www.nntp.perl.org/group/perl.perl5.porters/2016/06/msg237477.html
23:34 pink_mist there was an implementation too
23:34 sri omg, yes please!
23:41 jabberwok that would be a huge readability plus
23:43 jberger I actually indent my heredocs
23:43 jberger It isn't great but it works
23:44 jberger <<'  SQL'
23:44 jberger You do end up with leading whitespace, but for sql who cares?
23:45 sri poor database, has to work extra hours cleaning up your whitespace mess
23:45 Grinnz :P
23:45 Grinnz you know what's really great, pasting a SQL query with a literal tab into the mysql shell, where it tab-completes random things into your query
23:46 jberger Hahaha
23:46 sri rofl
23:46 jberger Yet another reason why tabs are evil
23:47 Grinnz more like, another reason not to let anything be interactive :P
23:47 jberger Well that too
23:47 jberger I like the psql shell will enough
23:47 jberger well enough
23:48 sri psql shell seems to be hated in the postgres community
23:48 jberger Oh m
23:48 jberger Why?
23:48 sri apparently the code is a total unmaintainable mess
23:48 jberger Ah
23:49 Grinnz sounds like it's time for a rewrite!
23:49 jberger It does what i need it to
23:50 jberger Grinnz: yeah, rewrite it in perl!
23:50 Grinnz hah
23:50 Grinnz $ mojo psql
23:52 sri hold my beer
23:52 jabberwok Tab is evil. My granddad used to drink it.
23:53 Grinnz tab is the old name of diet coke, but they still sell tab too for some reason
23:53 Grinnz well, and coke zero
23:53 Grinnz so i guess not that surprising
23:53 Grinnz how long until they start selling a 4th name of the same thing
23:54 vicash psql is still better than oracle's sqlplus..
23:54 vicash if the help package isn't installed on the system, sqlplus's help command doesnt work
23:55 Grinnz i mostly like psql because it means i'm not using mysql.
23:55 * vicash hasnt used mysql in over 4 years
23:55 Grinnz bravo

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