Fork me on GitHub
#clojure
<
2015-08-29
>
tel00:08:01

well, Hikari is installed

tel00:08:07

but same issues as before

tel00:08:23

seems like it’s just a migratus thing

tel00:08:33

I can access the db just fine with, say, yesql

bbloom04:08:50

i don’t understand why lein takes so long to start — seemingly non-determinstically

bbloom04:08:09

and sometimes crashes, but re-running works fine, even in pretty small, uninteresting projects

bbloom04:08:48

lein repl may fail after 40 seconds, or it may launch in 2, or it may just take 30 to start and not fail…. why? i’m fine with even 10 seconds, as long as it’s more consistent and reliable

seancorfield05:08:55

@bbloom: never seen that happen... I grumble that Leiningen is slow to start up some projects sometimes but it's very consistent for me. If a project works, it always works, and always takes about the same time to start up.

seancorfield05:08:50

Is that on a specific platform? Any pattern to projects that are problematic?

lvh05:08:51

bbloom: Do you have any SNAPSHOT versions in ~/.lein?

lvh05:08:05

bbloom: It might be doing a bunch of IO, talking to Clojars simple_smile

bronsa05:08:08

@bbloom: sounds like network issues

bbloom06:08:13

@lvh no snapshots anywhere

bbloom06:08:36

can i just blanket disable network IO outside of lein deps calls?

robert-stuttaford13:08:24

anyone have a snippet for testing for the existence of a resource file in a jar?

robert-stuttaford13:08:09

everything’s wonderful when working with files on disk, and then the physics of the universe change when you compile to .jar 😐

borkdude15:08:04

@cfleming: can cursive also display missing namespaces, for example, when I delete a whole file, I get warnings from places where it was used?

cfleming15:08:42

@borkdude: Yeah, you’ll get unresolved symbol warnings for the symbols that were in that namespace

borkdude15:08:06

@cfleming: Can I view those for the whole project, without first opening the files?

cfleming15:08:51

@borkdude: Ummm…. no, I don’t think so. That would be very nice, though. Issue welcome!

cfleming15:08:55

@borkdude: In general, it seems like you’d want to be able to see all usages of elements from a namespace before you deleted it, i.e. you actually want a safe delete of a namespace.

cfleming15:08:10

With a preview of the existing usages, if any.

borkdude15:08:24

in my case, I'm stripping an old project because I want to use it as a template for a new project

borkdude15:08:40

and I have to re-run lein repl all the time to discover new errors

cfleming15:08:28

I see. Is it correct that what you probably need is a safe delete of a whole ns?

cfleming15:08:44

i.e. you’d want to be able to try to delete a namespace and see where the problems with that are?

borkdude15:08:00

or after the fact, both is good

borkdude15:08:40

a red curl under the filename to indicate there are warnings inside that file, like Eclipse has and also on the parent directories, would be good

borkdude15:08:37

something like that

borkdude15:08:09

this is one of the things where Clojure is harder to manage than Java

borkdude15:08:26

at least in most IDEs simple_smile

cfleming16:08:07

@borkdude: Yeah, the error marker in the file would be good, I’ll have to investigate how to do that.

amacdougall17:08:19

So I'm planning to make a site which is mainly a SPA, but probably with the usual forest of admin pages done in a traditional HTML forms style. My first thought was to use Rails, just because gems like Devise and Upmin autogenerate all the tricky auth and admin pages. I'm not quite ready to rule out Clojure, though. What do I gain/lose by using, say, Luminus? (Is Luminus still the state of the art?) Rails or not, I'm using ClojureScript for the SPA part.

borkdude17:08:26

@amacdougall: I've made a similar site, but I found it easier to implement everything, including admin pages, etc, in Reagent (ClojureScript wrapper for React). Sooner or later you'll want to do some javascript on such a page anyway.

amacdougall17:08:41

A while ago, I experimented with using Liberator to do a pure REST API, but setting up authentication via Friend using only API requests seemed possible, but not documented or supported. If nothing else, I'd want to use a framework that takes some of those concerns out of my hands. I know enough about website security to know that it's better to use a well-respected library!

amacdougall17:08:06

So if nothing else, I'd really like a turnkey solution for authentication/security, so I'm not stressing about CSRF and whatnot.

underplank18:08:38

Hi all, I want a middleware to do request logging (ala what nginx would provide) I found this? _ (pprint long)

underplank18:08:14

any others that I should look at?

michaelr18:08:18

@stuartsierra: yes.. something with AOT probably.. the thing is that I managed to resolve this (by including the sources in the uberjar, and AOT compiling only the entry point ns IIRC) in very similarly built projects in both 1.6 and 1.7.. not sure why it doesn't help this time. also using lein not boot.

borkdude18:08:27

@amacdougall: take a look at ring-defaults

amacdougall18:08:05

Oh, thanks! That looks really informative.

amacdougall18:08:42

Yeah, I'm going through the Luminus tutorial right now. It looks like pretty much what I was looking for: a set of "sensible defaults" to show a beginner how to get off the ground with Clojure's various webapp-related libraries.

donmullen18:08:51

@amacdougall: I haven’t used it and likely overkill - but I just ran across https://usergrid.apache.org/

amacdougall18:08:00

Whoa. Definitely overkill for my case, but really interesting.

donmullen18:08:31

Mentioned along with Parse and Firebase here : https://github.com/martinklepsch/tenzing

amacdougall19:08:23

Yeah, it looked like it fit into the same category as Parse. Since I'm making a small side project for my own education, though, it makes more sense for me to use Luminus and really see how everything is laid out.

underplank19:08:30

Hi all, Im using buddy to do authentication and authorization. I have a split SPA and server side app. And so have two types of endpoints, one set are returning html to render and the others are doing REST/json.

underplank19:08:16

Because of this, if there is a 401 in the API I want to return a 401 and the javascript will handle the redirect. When Its a html page I need to have it redirect on its own.

underplank19:08:37

Is there a way to get buddy to have two unauthorized-handlers?

amacdougall20:08:20

@donmullen: Last time I tried this (like a year ago), I tried Liberator, and I couldn't quite figure out how to authenticate, store login status in the session/cookie, etc. On the other hand, I really liked its programming model.

redbeardymcgee21:08:12

I want to make a very short/quick and simple proof of concept to connect to a mysql db. It will need to insert new users who register thru a website, and verify their logins. What could I use? Should I go with strictly cljs instead of normal clj? I intend to do more with it later, but I just need something thrown together by tomorrow afternoon to show what it will basically look like.

afhammad21:08:16

Where's everyone hosting their clojure systems?

arrdem21:08:01

DigitalOcean

arrdem21:08:49

I think people are shying away from Heroku due to price and limitations of free tier, and Google AppEngine has issues with startup time IIRC

nicholasf21:08:54

Im hoping to use google app engine

amacdougall21:08:21

@redbeardymcgee: Making a website which authenticates users against a mysql database is not terribly hard, but if you aren't already familiar with the Clojure web dev ecosystem, you might not get your proof of concept in a day. Do you know how to do this in another language, or is this your first experience?

amacdougall22:08:51

If the choice of language doesn't matter, and you're a beginner, and you absolutely have to be up and running in a day, I suggest using a more popular language, where you can find dozens of bulletproof walkthroughs.

amacdougall22:08:44

If it's got to be Clojure, I guess you could do what I'm doing right now and use Luminus! Just be ready to figure out on your own how to hook up mysql, etc. For the specific things you mentioned, I don't expect you to need ClojureScript.

redbeardymcgee22:08:14

amacdougall: yes i'm not intimately familiar with anything beyond bash/sh but i grok fundamentals and i'm very attracted to lisp/fp.

amacdougall22:08:19

@redbeardymcgee: Well, give Luminus a shot! I'm doing the tutorial and sample app right now, and it seems pretty reasonable. Luminus isn't a framework, exactly; more like a generator for a pre-built template that represents a known-good configuration of libraries. If you're new to the whole game, though, just be warned that web dev requires at least passing knowledge of a lot of stuff, so it might take a while to gear up mentally.