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

IRC log for #mojo, 2015-08-25

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

All times shown according to UTC.

Time Nick Message
00:31 Quai
00:39 bpmedley Quai: We may need more context.. :)
00:50 mattastrophe joined #mojo
00:52 mattastrophe1 joined #mojo
00:55 Zoffix :)
00:59 good_news_everyon joined #mojo
00:59 good_news_everyon [mojo] Grinnz created meta-spec-2 (+1 new commit): http://git.io/vsyEG
00:59 good_news_everyon mojo/meta-spec-2 b799833 Dan Book: update Makefile.PL to meta-spec v2 and set dynamic_config to 0
00:59 good_news_everyon left #mojo
01:04 damaya joined #mojo
01:07 SmokeMachine batman: so, are you writing M::P::JSON::Validator?
01:08 Grinnz sri, jberger, batman, does that look ok to you?
01:14 jberger Grinnz: looks ok to me
01:14 jberger What ever came of that x static build flag?
01:15 jberger (I don't remember what it was called exactly)
01:15 Grinnz x_static_install, it's still floating around, nothing official yet
01:15 Grinnz i believe cpanm still has an undocumented experimental swithc to use it :P
01:16 Grinnz mm, only in the static-install branch in git
01:16 jberger We would be a candidate I believe
01:16 jberger But ok way to early to include it then
01:16 Grinnz hmm, well the main difference between dynamic_config and x_static_install is that dynamic_config means you don't need to run Makefile.PL to determine prerequisites, and x_static_install means you don't need to run Makefile.PL at all
01:17 Grinnz so... maybe?
01:17 Grinnz the Makefile.PL does nothing special after all
01:18 jberger Our carton install time would effectively go to zero
01:19 Grinnz indeed
01:19 Grinnz but yeah, definitely want to wait on that for now
01:51 jnbek joined #mojo
01:53 damaya joined #mojo
02:02 PryMar56 joined #mojo
02:13 bwf joined #mojo
02:20 noganex_ joined #mojo
02:28 damaya joined #mojo
02:41 SmokeMachine batman, does it make any sense in your opinion? https://www.irccloud.com/pastebin/vvaVRqKo/
02:45 SmokeMachine sri: is that a good use case for around_action hook?
02:59 damaya joined #mojo
03:02 kaare joined #mojo
03:19 inokenty-w joined #mojo
03:19 SmokeMachine https://github.com/FCO/Mojolicious-Plugin-JSON-Validator
03:24 damaya joined #mojo
03:48 damaya joined #mojo
03:54 Snelius SmokeMachine: it's your ?
03:58 damaya joined #mojo
04:24 damaya joined #mojo
04:39 damaya joined #mojo
04:44 mrallen1 joined #mojo
04:50 damaya joined #mojo
05:09 batman SmokeMachine: I don't think I would slow down every action with this.
05:10 batman I would much rather register a validate_json() helper that does this
05:10 batman That way, you're also more flexible when it comes to choosing what to validate.
05:45 damaya joined #mojo
06:16 jontaylor joined #mojo
06:22 sri Grinnz: you've ordered everything alphabetically except for license?
06:29 salva joined #mojo
06:53 damaya joined #mojo
06:57 dod joined #mojo
07:02 dod joined #mojo
07:03 eseyman joined #mojo
07:19 arpadszasz joined #mojo
07:23 Vandal joined #mojo
07:31 kivilahtio joined #mojo
08:09 pete joined #mojo
08:10 nigel joined #mojo
08:10 pete I'm using Test::Mojo, and instantiating $t with Test::Mojo->new('MyApp');
08:10 pete But I'm getting: Can't connect: nodename nor servname provided, or not known
08:10 pete At the very first get_ok
08:10 pete Do I have to do more to set it up?
08:16 pink_mist how are you running the test?
08:17 pete use Test::More; use Test::Mojo; my $t = Test::Mojo->new('Galileo'); $t->get_ok etc
08:17 pink_mist no that's the test file that you're running
08:17 pink_mist how are you running the file?
08:18 pete let's pretend I'm running it with 'perl test.pl'
08:18 pink_mist let's not. because that's wrong
08:18 pink_mist ./myapp.pl test t/test.t
08:18 pete ah. I don't want to run it like that, though
08:18 pete hrm
08:19 pete Explains why it's not working, anyway
08:21 pink_mist there might plausibly be some prove(1) incantation you could use, but I don't know what it is
08:21 pink_mist but you shouldn't really run tests with straight perl
08:22 pete I'm running them using pherkin
08:22 pete Anyway, I have enough to be going on with I think
08:29 KCL_ joined #mojo
08:36 bc547_ joined #mojo
08:54 romel joined #mojo
08:56 sri pink_mist: prove -l is fine
08:57 sri http://mojolicio.us/perldoc/Test/Mojo#DESCRIPTION
08:57 pink_mist ah, cool =)
08:58 pete sri: Is prove doing anything magic that perl by itself isn't?
08:58 pete sri: I feel like what I was doing should have worked
09:00 batman pete: sounds like your network is not working. can you rather try one of the test files from Galileo and see if they work?
09:00 pete Yeah, sure, let me clone it
09:00 batman also make sure you load the correct libraries. perl test.pl might need perl -Ilib test.pl
09:00 batman prove -l # -l == use libraries from ./lib
09:01 pete I'm not really using `perl` directly, but the reality is probably a distraction here
09:01 batman pete: no. everything else than the reality is setting us off!
09:01 pete :D
09:01 batman s/:D/:(/
09:02 batman unless you provide us with the exact or at least letting us know up front that it's not the exact thing you're doing you're really just wasting everyones time.
09:02 batman might sounds harsh. but it's true.
09:02 pete OK. Sure. I'm using Test::BDD::Cucumber, and running tests via `pherkin`
09:03 batman right. so there's a number of things that might go wrong, and it could have nothing to do with perl at all.....?
09:03 batman s/perl/mojo/
09:03 pete Why might it not have anything to do with Perl?
09:04 batman sorry, i meant "mojo"
09:04 * batman out. (don't know anything about pherkin)
09:04 pete With a new instantiation of Test::Mojo, what exactly does it use the app name it's passed in for?
09:04 pete batman: Luckily I know all about it
09:04 pete Does it instantiate its own version?
09:05 pete Is it trying to find an instantiated version by name?
09:05 pete Purely for logging and debugging output?
09:05 pete Ah, it's in the src
09:05 pete So it should be happy to instantiate its own version of the app
09:06 pete And for some reason, the server that comes back doesn't seem to have a domain or host set
09:13 damaya joined #mojo
09:16 pete Oh, that's exciting. If you don't prefix the URL with '/' you get a "Can't connect: nodename nor servname provided, or not known" error.
09:17 pete and that was the problem
09:17 * pete considers a patch
09:24 meshl joined #mojo
09:30 mattastrophe joined #mojo
09:31 pete https://github.com/kraih/mojo/pull/836
09:31 pete left #mojo
10:11 sri i would vote -1 on #836 if github wasn't borked currently
10:13 batman sri: i got email that you commented...
10:14 sri the whole thing makes no sense
10:14 sri perl -E 'use Test::Mojo; my $t = Test::Mojo->new("Foo");'
10:14 sri that's the real error
10:15 sri don't try to fix stuff in mojolicious until you understand the problem!
10:16 bpmedley So, pete didn't even have an application they were loading?  Just putting random stuff into "new" of Test::Mojo?
10:16 sri no
10:17 sri nobody has a clue what he did wrong
10:17 sri he made assumptions about what caused his weitd error, and never tested them
10:17 sri s/t/r/
10:21 sri ah, he mentioned it here earlier
10:21 sri he did not prefix a path with a slash -.-
10:23 sri an explanation in the github issue would have been nice
10:24 sri oh well
10:26 sri Grinnz: what's the point of #835 anyway?
10:26 sri "dynamic_config should really be disabled so that CPAN tools know that Mojolicious has static prerequisities"
10:26 sri why?
10:26 sri it mentions statoc analysis, what tools are those?
10:26 sri s/o/i/
10:27 sri https://github.com/kraih/mojo/pull/835
10:34 sri maybe i'm the only one, but i like my Makefile.PL as short as possible
10:37 sri Zoffix: i think it's about Makefile.PL generating a list of prereqs dynamically, not dynamic deps at runtime
10:37 Zoffix Ah
10:37 sri but your confusion is very reasonable
10:37 sri the option makes little sense to me
10:39 sri what kind of static analysis is there where that kind of flag would be of value?
10:41 pink_mist analysing the metadata for prereqs is what it's talking about; if the dynamic config flag is set that can't be done
10:41 SmokeMachine Snelius: sorry, i didnt get
10:42 pink_mist it needs to run the makefile to see what prereqs are needed; it can't just get them from the static metadata
10:42 odc sri, https://github.com/CPAN-API/metacpan-web/issues/655
10:43 sri lol
10:44 sri isn't that exactly what we would want to be displayed?
10:44 sri "There might be additional deps."
10:45 odc heh, good point
10:45 sri so, metacpan might be using the field wrong, and that's what we want
10:45 * sri pokes Grinnz
10:46 sri ah, it's actually live
10:46 sri https://metacpan.org/release/Mojolicious
10:46 sri "and possibly others"
10:55 good_news_everyon joined #mojo
10:55 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vs98N
10:55 good_news_everyon mojo/master cf0861d Sebastian Riedel: mention absolute URLs too
10:55 good_news_everyon left #mojo
10:55 sri guess github is under attack again... soooooo slow
10:59 bd GitHub Status ‏@githubstatus 20 Min.vor 20 Minuten
11:00 bd The connectivity problems have been identified as a DDoS attack. We're working to mitigate now.
11:04 sri :S
11:28 melo joined #mojo
11:30 mattastrophe joined #mojo
11:42 Onigiri joined #mojo
11:59 neilhwatson joined #mojo
12:10 damaya joined #mojo
12:23 kwa joined #mojo
12:26 jberger Why would we want it to say that there might be additional deps?
12:27 sri because there are
12:27 kwa batman: are the vendor packages for convos up-to-date? I tried carton install but it didn't work, so tried installing from the bundled packages using ./vendor/bin/carton install --deployment --cached, but not sure if they're up-to-date?
12:28 sri oh, looks like china is attacking github again...
12:29 jberger There are optional modules, but those aren't dependencies
12:29 sri optional dependencies
12:29 jberger The additional dependencies are things like extra modules on Windows for example
12:29 sri i don't agree with that
12:30 jberger That's what the statement on metacpan means
12:30 sri and that's explained where?
12:30 jberger For example Alien::Base adds all kinda of stuff
12:31 sri the statement is so vague, it can mean anything
12:31 kwa joined #mojo
12:31 sri and in our case, i like to think it referrs to our optional dependencies
12:32 DadaIsCrazy joined #mojo
12:32 jberger When running the configure phase, nothing additional will be added to the dependencies
12:33 jberger If you want to think of it as something else I guess I can't stop you
12:33 sri i know what it is supposed to mean, i just don't agree with it
12:33 sri just to be clear
12:33 sri the real question here is if there's actul value in a more verbose Makefile.PL
12:35 coolo joined #mojo
12:36 jberger Since this flag is mostly for static analysis it doesn't actually matter that much
12:37 jberger If (x_)static_install becomes a reality  that's a bigger deal
12:40 mattastrophe joined #mojo
12:41 jberger Eventually the newer meta specs are going to be useful, but atm I don't especially care
12:42 sri i would hope Makefile.PL files would get smaller, not bigger
12:43 * sri wants to remove code!
12:44 kwakwaversal joined #mojo
12:47 jberger sri: sadly that's not likely here
12:48 jberger Might be able to shave off a little bit using mbt and ambt, but I'm not sure it's worth the hassle yet
12:49 jberger leont claims to have a more robust mb replacement in the works
12:50 jberger (a)mbt really are the minimal that could possibly work
12:54 kwakwaversal joined #mojo
12:55 kwakwaversal joined #mojo
12:57 kwakwaversal joined #mojo
12:59 batman kwakwaversal: no, and they can't be up2date iirc
13:00 * batman need to fix convo :( :( :(
13:00 batman time is running out
13:00 ajr_ joined #mojo
13:00 hernanGOA joined #mojo
13:01 batman too bad i spend so much time on frontend... the backend is *almost* there
13:02 jontaylor batman: what are you working on?
13:02 batman *convos
13:03 batman jontaylor: http://convos.by/
13:03 batman Lee: you around?
13:03 kwakwaversal batman: ahh, that's a shame. I had issues installing it, so was wondering if you just needed to update to the working packages you're using.
13:04 batman kwakwaversal: installing from cpan...?
13:04 batman marcus: we need to remove convos from cpan. pretty sure it doesn't work with the latest version of the packages on cpan
13:04 kwakwaversal Installing from github.
13:05 batman ok. please join #convos on freenode if you need further assistance
13:06 * marcus is confuzzled
13:06 jontaylor batman: that looks pretty good, I could imagine myself using it with http://fluidapp.com/ to replace my desktop client
13:06 batman :)
13:10 kwakwaversal joined #mojo
13:12 eitz joined #mojo
13:25 human39 joined #mojo
13:27 Grinnz sri, the dynamic_config is not for optional deps, it's for deps that Makefile.PL might add
13:27 Grinnz our Makefile.PL does not add any
13:28 Grinnz so dynamic_config should be disabled so that CPAN installation tools understand the dependencies from META.json alone
13:30 mattastrophe joined #mojo
13:41 melo joined #mojo
13:42 Grinnz sri, oops, i'll fix the alphabetization hehe
13:43 good_news_everyon joined #mojo
13:43 good_news_everyon [mojo] Grinnz pushed 1 new commit to meta-spec-2: http://git.io/vsH2a
13:43 good_news_everyon mojo/meta-spec-2 4cddc83 Dan Book: fix alphabetization
13:43 good_news_everyon left #mojo
13:46 SmokeMachine batman, I am making some changes on that module about your comments...
13:46 sri Grinnz: i do understand what it is supposed to do, but is there an actual gain right now?
13:47 SmokeMachine is there any way to set a ->to() (different from cb) to a lite app endpoint?
13:47 batman SmokeMachine: get "/foo", {default_foo=>123} => sub {};
13:47 jberger joined #mojo
13:48 SmokeMachine thank you batman !
13:48 batman SmokeMachine: if you make that module, make sure you think about other cases than just your own.
13:49 batman you might want that around-hook, but make it configurable, so you don't enforce slowdown for everyone else
13:49 SmokeMachine I am trying to...
13:49 batman (if you change it later on, in any direction)
13:49 SmokeMachine I am doing that!
13:49 batman good :)
13:49 SmokeMachine the default now is do nothing...
13:50 jberger SmokeMachine: which module?
13:50 SmokeMachine it only do anything if you set a json_validator.schema
13:50 SmokeMachine jberger: https://github.com/FCO/Mojolicious-Plugin-JSON-Validator (but my changes aren't committed yet...)
13:51 batman yeah... that still doesn't cut it, since you're probably calling the around hook anyway
13:51 SmokeMachine batman: and if is there a validation error, it will call your action passing the errors as parameters...
13:52 SmokeMachine unless you set son_validator.auto_reply_on_error
13:52 batman i don't see the gain, but i will wait an comment when you have completed.
13:52 batman *and
13:52 SmokeMachine *json
13:52 jberger SmokeMachine: just generally, using a hook in a plugin should be seen as a last resort
13:53 jberger Because there's a much higher chance that they don't compose well
13:54 SmokeMachine jberger: but in this case I can't see how could I do to auto-replay (no even call the action) on validation error case...
13:56 jberger I don't really know what you guys are working on, but I'm just saying that I wouldn't accept a patch to a plugin of mine that adds a usage of hook without a GREAT reason
14:00 Grinnz sri, the main benefit is more accurate metadata, so dependency analysis tools know that the prereqs from META.json do not need to be supplemented by running Makefile.PL to generate MYMETA.json, there is no difference in installation speed if that's what you mean
14:04 batman SmokeMachine: https://ssl.thorsen.pm/paste/e872bd457adc <-- something like that is what i would od
14:04 batman *do
14:04 SmokeMachine jberger: but what do you mean with "they don't compose well"
14:06 SmokeMachine batman: i think your version is better...
14:07 mrallen1 joined #mojo
14:07 SmokeMachine I was just trying to do it auto-reply... but ok...
14:07 batman SmokeMachine: here's another one: https://ssl.thorsen.pm/paste/566e2fa4e66a
14:08 batman it's pretty simple: $c->render(json => \@errors, status => 400) if @errors; # not much code really for the default...
14:09 SmokeMachine yes, it's simple... but not automatic... but I can live with that...
14:10 batman make another helper that render automatic then... something like validate_json_and_render_on_error()
14:10 ZadYree joined #mojo
14:10 batman ugly, but at least explicit :)
14:11 batman or you can do your around hook if you like, but only if ($config->{auto_validate}) inside register()
14:11 batman but that's extra. not core functionality.
14:12 batman SmokeMachine: if you copy/paste, then make sure you use the laste paste, and not the first (566e2fa4e66a)
14:13 SmokeMachine aren't you committing that?
14:13 batman committing where?
14:14 SmokeMachine I mean: you did all the work... isn't fair if I just get your code...
14:15 batman i'm not maintaining code i'm not going to use
14:15 batman take it and just give me some credit or whatever...
14:16 batman "The original draft for this code was done by Jan Henning Thorsen."
14:16 batman nothing at all is also fine.
14:16 batman you can consider the pastebin code BSD :)
14:17 SmokeMachine I'm getting your code, but do you mean if I continue to try to make it automatic? without using hooks...
14:17 batman don't change the original helper! make another one.
14:18 batman you never know, but i would be surprised if everybody using that module would like auto render
14:18 SmokeMachine I will not change it...
14:19 jberger SmokeMachine: by "don't compose well" I mean that multiple uses of the same hook can have unexpected results
14:19 jberger I think of hooks as belonging mostly to the application developer and not module/plugin authors
14:19 jberger of course that's up to interpretation, but generally
14:19 SmokeMachine hum... I understand...
14:19 batman SmokeMachine: anyway... if you release the module, then you're of course free to do whatever changes you like.
14:20 batman and if you like input on those changes, then just let us know when you have pushed.
14:21 jberger SmokeMachine: https://metacpan.org/source/JBERGER/Mojolicious-Plugin-Humane-0.07/lib/Mojolicious/Plugin/Humane.pm#L100
14:21 jberger there's an example for you
14:22 damaya joined #mojo
14:23 SmokeMachine jberger: do you mean: youse the hook, but only if needed?
14:23 batman "TODO use render_to_string once Mojo 5.00 is required" :)
14:23 batman SmokeMachine: "only if the user _wants_ to"
14:23 batman s/to/it/
14:24 SmokeMachine yes, thats what I mean
14:24 sri Grinnz: what dependency analysis tools?
14:25 batman jberger: does that plugin play well with assetpack?
14:27 jberger batman: this well predates assetpack
14:28 sri Grinnz: i guess what i want to know is if this is just idealistic bloat that will never get used anyway, or something actual existing tools can use
14:29 jberger sri: I don't believe any tooling uses that mechanism, its just for inspection
14:29 jberger that's what the x_static_install is proposed to change ("really really, you can just copy the lib/ directory")
14:30 jberger batman: I need to hack with you some night about how to do asset bundling with assetpack
14:39 trone joined #mojo
14:41 batman jberger: Sure :) let me know.
14:43 jabberwok joined #mojo
14:47 oetiker rewrote a simple old cgi in mojolicious::lite and used apache ab to run some (concurrent) tests CGI: 16 requests/second  (median request time 600ms). Mojo: 2674 requests/second (median request time 4ms).
14:48 batman jberger: If you give me more details I will blog about it, and you can read that post :)
14:49 jberger oetiker++
14:49 njlg joined #mojo
14:49 jberger batman: lets say I want to make a plugin that provides foo.js (if that exists, I don't mean it to be anything specific)
14:50 jberger how would I simply write a module that does that?
14:50 jberger I'm thinking essentially Alien::Base but for Mojo and js/css
14:57 batman with or without assetpack?
14:59 * cfedde has weak google fu
14:59 cfedde ah.  ddg fu better
15:00 jabberwok assetpack is one of the best "oh and by the way you also get - minification! sprites! but wait, there's more!" parts of the whole M. approach
15:01 batman jabberwok: thank you :)
15:04 batman i will be a bit sad when http2 says "we don't want no assetpack"
15:04 batman hehe
15:05 Grinnz_ sri: i don't know of tools that use it, most of the dependency analysis modules i know either ignore Makefile.PL (thus get incorrect results) or runs Makefile.PL without condition, because they're too old to know of dynamic_config
15:05 Grinnz_ sorry, had to go to work
15:05 Grinnz_ sri: i don't see it as bloat since it is already in META.json whether it's set in Makefile.PL or not, it is just inaccurate
15:05 Grinnz_ but i understand if you disagree
15:34 jb360 joined #mojo
15:35 meshl joined #mojo
15:43 jontaylor joined #mojo
15:55 disputin joined #mojo
15:58 jberger batman: I mean with assetpack
15:58 jberger Mojolicious::Plugin::Humane is how you would do it without assetpack
16:09 batman $app->asset("humane.js" => "https://cdnjs.cloudflare.com/ajax/libs/humane-js/3.2.2/humane.min.js");
16:10 batman but the thing is that you don't really want to specify the "humane.js" asset if someone is using assetpack.
16:10 jberger I don't know what you mean?
16:11 jberger specifically, I was thinking about bundlng, not just fetching from a cdn
16:11 jberger it was useful for me back when I did a lot of my mojo work on the train to/from non-mojo jobs
16:11 jberger so maybe that's not as important to me anymore
16:12 batman but you only download it from the cdn once and it will be cached locally
16:12 batman just don't drop the cache and you can work offline
16:12 jberger yeah, that's probably good enough
16:12 batman that file is stored in public/packed/https___cdnjs_cloudflare....min.js
16:13 jberger so what do you mean about "but the thing is that you don't really want to specify the "humane.js" asset if someone is using assetpack"
16:13 jberger ?
16:13 batman but... if you want to go to assetpack, then you don't want to include that file automatically. you want to tell the user that the asset need to be available
16:13 batman so you rather want to say "if you like, you can assetpack the javascript, if not i will do it for you"
16:14 batman i don't want to do <%= asset "humane.js" %> in my template. i wan to do <%= asset "app.js" %> which again includes humane.js
16:14 jberger right
16:14 batman i only want one roundtrip to the server for including the javascript.
16:14 jberger ok I guess I understand
16:15 jberger I thought that your bootstrap3 plugin did assetpack bundling
16:15 batman unless you use react.js... since it easy can turn into megabytes of js code :(
16:15 jberger perhaps I'm misremembering
16:15 batman bs3 is different, since it allow you to customize the source files, but humane is so much simpler
16:15 batman since it's just one precompiled source file
16:16 batman my bs3 plugin ships with the SASS files, not just the CSS files.
16:16 jberger oh right
16:16 jberger that makes sense
16:16 batman same goes for M::P::JQuery (or what it's called). there's really no use for it anymore
16:17 batman tough it was useful, before i added support for remote assets
16:17 batman *though
16:17 jberger yeah, I think that was where my understanding got behind the time
16:18 batman so humane.pm would rather document how to use it -with- assetpack, instead of doing drastic changes to the way it works now.
16:18 batman imo
16:18 jberger yea
16:29 sh4 joined #mojo
16:31 buu joined #mojo
16:34 damaya joined #mojo
16:34 Ptolemarch joined #mojo
16:38 PryMar56 joined #mojo
16:38 Dada2 joined #mojo
16:48 lsm joined #mojo
17:15 Repaster joined #mojo
17:17 melo joined #mojo
17:18 SmokeMachine hi again batman! Not tested yet, but does this make sense? Im sorry if I am annoying you... https://www.irccloud.com/pastebin/xWsBC1bY/
17:19 batman SmokeMachine: i'm not sure if this is a good default: $schema .= ".spec.$format";
17:19 batman i just took that from the top of my head... (might need to reconsider)
17:20 batman also, could "json.validator.schema" be shorten to "validator_schema" ? not sure if you would ever have conflicting schemas... "json.validator.schema" is more "secure" though
17:21 batman you also have typos, such as $stash, but i guess you will figure out that sooner than later.
17:21 SmokeMachine maybe jvalidator? no... that looks java...
17:21 batman do you need my $route_to = $c->match->endpoint->to; ? i think you can just look directly into $c->stash()
17:22 SmokeMachine yes... maybe...
17:23 amon joined #mojo
17:24 batman and i think i would just do $config->{auto_validate}. you don't really add much value if you don't auto_render
17:24 batman oops! i meant $app->hook(around_action => sub {...}) if $config->{auto_render}
17:25 batman next time: run the code before you ask for feedback. the code you just pasted does not compile, nor does it work after you fix the compilation errors
17:27 mst "it doesn't compile! ship it!" is not generally a wise plan
17:28 batman mst: depends on who pays you ;)
17:34 sri yea, like government contracts
17:35 sri then your entire business depends on followup contracts to fix the stuff you broke the last time
17:36 mst if you can't be part of the solution, there's plenty of money to make from prolonging the problem
17:38 berov1 joined #mojo
17:44 genio gah.  GIMP on mac won't export my image.
17:44 melo joined #mojo
17:45 mst beat it harder
17:45 genio \o/
17:47 genio the GIMP needed its updates.  it's behaving now.
18:06 damaya joined #mojo
18:24 ajr_ joined #mojo
18:39 SmokeMachine Now it compiles, and do what I want...
18:53 asymp joined #mojo
19:13 damaya joined #mojo
19:24 Ptolemarch joined #mojo
19:31 asymp left #mojo
19:34 gryphon joined #mojo
19:44 meshl joined #mojo
20:29 KCL joined #mojo
20:38 ZoffixWork joined #mojo
20:41 ZoffixWork Weird, I've got this piece of code: http://fpaste.scsys.co.uk/497569  and if I Dumper the args I'm giving to ->query() I get ?, ?, ?, but when I try to run the code, I get an error saying my query is invalid and the query it's showing doesn't have any commas among the values
20:41 ZoffixWork Am I doing my IN() wrong?
20:43 ZoffixWork s/Dumper the args/Dumper the query/
20:45 Grinnz_ no it looks correct... you're lucky though, using postgres you could do that with an arrayref probably
20:47 ZoffixWork arrayref? Is that a postgres term?
20:47 Grinnz_ SET blah WHERE number = ANY (?), then pass an arrayref as that param
20:47 Grinnz_ no, perl arrayref -> postgres array
20:53 ZoffixWork Grinnz_++ # thanks that not only fixed the error but made my code a lot cleaner :)
20:56 jberger squeee
20:56 Grinnz_ postgres arrays are _amazing_
20:56 jberger oh how I wish we could use that
20:56 Grinnz_ ^^^
21:01 Grinnz_ (I wonder why the query got messed up in the other format though)
21:02 jberger I wonder if DBI has a max number of placeholders :o
21:02 disputin joined #mojo
21:02 Grinnz_ i dont think that would end up in the commas disappearing
21:03 Grinnz_ and for DBD::mysql at least, i highly doubt it
21:03 damaya joined #mojo
21:03 Grinnz_ i've run queries with thousands of placeholders ><
21:03 jberger precendece of and vs &&?
21:04 Grinnz_ that part's in parentheses already
21:04 Grinnz_ oh wait, no it isnt
21:06 meshl joined #mojo
21:07 Grinnz_ i dont see how that could cause the problem either though
21:07 jberger same
21:11 saki joined #mojo
21:25 damaya joined #mojo
21:33 cpan_mojo Mojolicious-Command-swat-0.0.4 by MELEZHIK https://metacpan.org/release/MELEZHIK/Mojolicious-Command-swat-0.0.4
21:59 Ptolemarch joined #mojo
22:20 meshl joined #mojo
22:53 Ptolemarch joined #mojo
23:14 meshl joined #mojo
23:37 damaya joined #mojo
23:45 disputin joined #mojo
23:47 Ptolemarch joined #mojo
23:51 mattastrophe joined #mojo
23:58 jberger_ joined #mojo

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