Fork me on GitHub
#clojure
<
2016-08-13
>
vinnyataide11:08:20

hello, what's the best admin interface like django for simple datomic databases?

vinnyataide11:08:45

the console seems really low level for users

pesterhazy11:08:06

@vinnyataide: I'd be interested in such a thing as well, if it exists

bur11:08:04

got it to work 🙂

bur11:08:19

but now wondering how to gzip from http-kit

bur11:08:25

as my js file is rather large

thebearmayor12:08:49

Anybody have a hint for the 4clojure / exercism “reparent a tree” problem?

triss12:08:04

hi all. I'm trying to mimic the following few lines of Java in Clojure. Is it actually possible to override methods in place like this?

triss12:08:00

dispatcher.addAudioProcessor(new AudioProcessor() {
				@Override
				public void processingFinished() {
				}
				
				@Override
				public boolean process(AudioEvent audioEvent) {
					System.out.println(audioEvent.getTimeStamp() + "," + audioEvent.getRMS());
					return true;
				}
});

Shantanu Kumar12:08:06

@triss: If AudioProcessor is an interface, try reify, else try proxy

triss12:08:17

oh yes. didn't think about reify.... thanks man

seylerius19:08:08

What's the most straightforward way to store a list of strings and/or File objects in a file between runs?

arohner20:08:21

@bronsa: why does tools.analyzer need to eval to do stuff?

bronsa20:08:15

because of macros, mostly

arohner20:08:10

but it would be possible to macroexpand with eval’ing the resulting code, right?

bronsa20:08:07

not really, trivial example:

(defn x [] 1)
(defmacro y [] (x))
(defn z [] (y))

bronsa20:08:30

without evaluating x we wouldn't be able to macroexpand z

arohner20:08:28

ok, I guess the issue I really care about is analyzeing a deftype creates a new class

arohner20:08:57

which then breaks all my specs that use (instance? Foo x) as the predicate

arohner20:08:57

so I understand macro expansion needs to run the code contained in the macro, but once you bottom out at a special form, that doesn’t need to be eval’d?

bronsa20:08:55

it's a bit more subtle than that -- clojure's evaluation model is fundamentally different than cljs's one wherens loading is declarative and macros run on a separate env. the reason why t.a evals is because both macroexpansion and reading might require it. for the second case, the example would be (ns-alias 'some.ns 'foo) ::foo/bar

bronsa20:08:38

ns-alias is a runtime operation -- if we only analyze it & don't eval it then the reader won't have the alias set & will fail at reading

arohner20:08:56

arg. got it

bronsa20:08:15

I know it's a PITA but that's just how clojure works

bronsa20:08:52

you might get around the deftype issue by doing some classloader hacks?

arohner20:08:03

ah, that’s a good idea

bronsa20:08:50

you probably need to make sure the original ns mapping between defytpe sym -> deftype class isn't replaced aswell

arohner20:08:28

I’m starting to understand why core.typed reloads all code on every check

bronsa20:08:55

yeah, it's surprisingly tricky to build analysis/reloading/.. tooling for clojure. Tons of potential edge cases and evaluation scenarios that need to be taken into account

josh_tackett20:08:56

Anyone know the best way to write to an SQL database from clojure? Like how to actually transact the request? I’m using honeySQL

dominicm20:08:42

@josh_tackett: Java.jdbc has a function for creating a transacted version of the connection.

josh_tackett20:08:25

got ya, I understand how to form the INSERT INTO structure, but now how to actually send it to the database @dominicm

dominicm20:08:18

Yeah. Check out clojure.Java.jdbc

josh_tackett20:08:49

oh this is great thank you!

josh_tackett20:08:56

this is much better than honeysql haha

yashaka21:08:28

does anybody know, how can I find user data files for LightTable on Mac Os ? I could not find them under /Library/Application Support and also not in /.config, /.lighttable

akiva21:08:50

Might want to give #C050AN6QW a shot.

yonatanel22:08:37

@vinnyataide, @pesterhazy : I'm interested in building one. If you have any specific usage patterns in mind, let me know. Also, it might be better to ask over at #C03RZMDSH .

amacdougall22:08:50

I'm starting a project which will almost certainly be running in a JS environment, which suggests ClojureScript, but the majority of the code will be platform-independent. For that code, I'd like to get the faster testing loop of doing plain old Clojure in a REPL. I get the impression that I want to write those files with the .cljc extension. Anyone have advice on setting up the project? src/logic/*.cljc, src/ui/*.cljs, and then configure lein test to run only the CLJC files? Am I just making more work for myself if I try to do some things with Clojure tools and some things with CLJS ones? The more I think about it, the more I can see myself running into awkward bits.

vinnyataide22:08:21

@yonatanel: you could make a clj file for each resource in the schema file