Fork me on GitHub
#clojure
<
2015-12-18
>
zereraz05:12:22

hi I am new to clojure, can I ask doubts here?

zereraz05:12:50

I did, lein new test, then cd test, then lein run but it gave me error No :main namespace specified in project.clj.

zereraz05:12:01

no need, fixed

seancorfield07:12:54

@zereraz: you probably already figured it out but lein new test creates a test "library" project, whereas lein new app test creates an "application" project which you can lein run out of the box.

asolovyov11:12:47

hey all! I wonder if it's possible to access my .clj source file when all I have is a StackTraceElement? Basically I want to post some part of my source code to Sentry and I can't figure out how to proceed... I can get class name, for example, but it looks like clojure.core$apply or io.pedestal.impl.interceptor$try_f - what's the best way to get to actual file?

martinklepsch11:12:44

@asolovyov: demunge + source maybe?

martinklepsch11:12:07

maybe put a resolve inbetween

asolovyov11:12:27

oh! demunge!

asolovyov11:12:44

@martinklepsch: thanks! I actually did stuff, but in very weird way simple_smile

martinklepsch11:12:52

it's in clojure.main though

asolovyov11:12:57

I also wonder if it's possible to get local variables somehow

asolovyov11:12:05

from StackTraceElement

magnars11:12:28

@asolovyov: you could inspect the code in https://github.com/magnars/prone/ to see how it does those things.

asolovyov11:12:06

I wonder if I could just depend on that simple_smile

asolovyov11:12:55

@magnars: oh, so much great stuff, I'll surely just depend on that simple_smile damn, I just reinvented 20% of your library :-)))

magnars11:12:12

Glad you find it useful. simple_smile

codemartin12:12:00

What is a good GUI front-end for a text editor? On the JVM you can use swing, but I'd like to have something that doesn't feel so... Java-y to use. Is JavaFx any good? Is it possible to use GTK or something instead? No big requirements, just has to display text in different fonts/colors (and same for the background) as well as take keyboard and maybe mouse input.

pvinis12:12:51

i guess react and electron is a choice..

emil0r13:12:19

does anyone know how to fix the following security error when deploying an uberjar with buddy? java.lang.SecurityException: JCE cannot authenticate the provider BC

emil0r13:12:36

googling show some answers as to the cause of it

emil0r13:12:48

but i have no clue how to solve it with leiningen

roberto13:12:56

can you run your uberjar locally?

emil0r13:12:07

nah. same problem

roberto13:12:11

or does it only show up on the deployment target?

roberto13:12:19

are you on Linux or OSX?

emil0r13:12:36

osx locally, debian on deployment

roberto13:12:59

I was thinking that maybe you might be missing the security certs

roberto13:12:16

it could be related to the encryption provider you are using...

roberto13:12:22

you can maybe try changing it

emil0r13:12:29

that's the explanation i found

emil0r13:12:36

as to the why of it

emil0r13:12:42

so the uberjar breaks the signing of the BC jar

roberto13:12:04

yeah, either use something else other than BouncyCastle, or go through all the acrobatics to add a signature

emil0r13:12:14

right. thanks, i guess 😉

emil0r13:12:18

down the rabbit hole

hkjels14:12:21

Anyone tried serving video with ring? file-response apparently does not work

asolovyov14:12:15

@magnars: I'm trying to port prone middleware to pedestal and I have one problem: pedestal gives you different functions for :enter, :leave and :error, and I'm not quite sure how to best bind debug/*debug-data* in that case. What I did right now is: http://paste.in.ua/1103/ - but this is not working for me, since :error is called much later after prone returns...

trancehime14:12:05

When a form is passed through Compojure "params" and a field is empty, is it "nil" or ""

larhat14:12:51

@hkjels: do you want to stream video file or just let people download it? if you want to stream it, you have to work with Accept-Ranges/Content-Ranges headers (set it, read it, read the file to specific offset, etc). the best way would probably to serve it via nginx or some other web-server, that can handle all that for you. file-response will just stream entire file and browser will unappy with it (vlc and ffplay will play it, but you will not be able to seek)

hkjels15:12:06

OK. I'll give that a go, thank you!

robin16:12:58

Hello clojure people

robin16:12:48

I have a boot cljs question

keeds16:12:50

hey @robin you might be better off at #C053K90BR

robin16:12:06

Alrighty thank you.

martinklepsch16:12:52

@codemartin: @jackrusher made a thing using JavaFx's webview thing in combination with codemirror, maybe he can provide you a little snippet simple_smile

codemartin16:12:32

@martinklepsch: That could definitely be something worth checking out!

samflores18:12:48

I'll present a few friends to Clojure tomorrow and I'd like to solve some problems in a Dojo. Does anyone know of a good repository of not so introductory problems tailored to highlight the functional aspects of the language?

samflores18:12:18

They're very experienced Java developers simple_smile

shaun-mahood18:12:35

@samflores: I saw this earlier today, not really what you're asking for but might be interesting to them. http://mishadoff.com/blog/clojure-design-patterns/

shaun-mahood18:12:11

If you haven't seen this talk, I found it really good. Basically the steps he followed to teach Clojure to a bunch of C# developers. https://www.youtube.com/watch?v=BsLiPt90HDo

samflores18:12:59

I remember implementing that inc for the clojurebot :thinking_face:

shaun-mahood18:12:34

Might not apply at all, was helpful for me to translate SQL thinking though https://github.com/mythz/clojure-linq-examples

samflores18:12:25

they're all good resources and they'll be very useful some day, thanks 😄

shaun-mahood18:12:12

No problem - I'm still trying to convert to a functional mindset so they're pretty close at hand

erik_price19:12:28

Does anyone know how to leverage the PostgreSQL string concatenation operator (i.e., ||) in HoneySQL?

noprompt19:12:08

i should probably know this but is there something that's equivalent to (and (coll? x) (not (map? x))

donaldball19:12:21

@erik_price There’s an fn-handler multimethod you can hook into, iirc

Alex Miller (Clojure team)19:12:23

@noprompt: is sequential? useful to you?

noprompt19:12:19

@alexmiller: unfortunately no, because (sequential? #{...}) => false.

noprompt19:12:04

we started with that though.

the_pk19:12:24

hey total noob here, is being proficient with Java prerequisite for clojure?

jaredly20:12:21

@the_pk but there’s definitely a steeper learning curve if you’re unfamiliar w/ java. not too bad though

dominicm20:12:47

@the_pk I don't know java. I'm employed writing clojure right now.

the_pk20:12:36

good to know

erik_price20:12:10

donaldball: thanks! I ended up escaping out to sql/raw

iamjarvo21:12:48

is there a small project that showcases the reloaded workflow?

zcaudate21:12:10

hey guys: would love to get some eyes on a new library for control of concurrent execution