Fork me on GitHub
#clojure
<
2018-10-22
>
asdf01:10:52

does anyone know a someone with a good emacs setup for clojure? ideally, one which has it all organized in a org file... thanks!

dpsutton01:10:08

Not an org file but the author and maintainer of cider has prelude which is a great init

👍 4
asdf02:10:01

oh wow that is really cool too! thanks

dpsutton02:10:31

Good layout and helpful stuff in it

asdf02:10:39

is it a bit outdated? I am running into issues with emacs --daemon , i get prompted an error

emacsclient: unrecognized option '--daemon'
Try 'emacsclient --help' for more information

asdf02:10:03

nvm i had alias options messed up

dpsutton02:10:57

I don't think init could ever interrupt a command line option to the binary itself

asdf02:10:16

how do I kill the emacs server from terminal 😳 ?

andy.fingerhut02:10:28

What OS? If Linux, killall -9 emacs. Might work for Mac, too.

andy.fingerhut02:10:53

Sorry, I forgot a part of the command: killall -s 9 emacs

andy.fingerhut02:10:07

Beware that although that command works, if you have multiple processes with the same name, it will kill them all. Hence the 'all' in the name.

asdf02:10:15

yes MacOS, does not work tho 😕 says that no matching process exists... but when I try to run emacs --daemon again to see if it restarts again, I get an error saying that there is already a running emacs server..

dpsutton02:10:53

Does 'm-x kill-emacs' work?

asdf02:10:47

yes that works thank you very much

asdf02:10:57

should I export the EDITOR and set to emacs if I'm running server? I guess I can do it and insert --daemon when I call it

asdf02:10:26

ok fix, does not really mater that much either way, thank you for the help!!

emccue03:10:18

has anyone had experience adding a frontend language to a backend project

emccue03:10:48

kinda broad question but I have a "mess around" project in clojure that I want to add some Elm to

emccue03:10:20

where there isn't exactly the tooling synergy like with cljs

lsund08:10:06

Does anyone know the difference between :refer and :only when using it in a namespace declaration, for example

(ns foo
 (:require [clojure.set :refer [rename-keys]
               [clojure.pprint :only [write]))

schmee08:10:28

IIRC :only is legacy and is only there for backwards compatibility

lsund08:10:52

Ok, thank you

artur09:10:27

Hello all! Back with Clojure after a while... So what is up with Leiningen and Java 11? Seems like the only version of Java I can run is 8?

bbss09:10:59

@artur put this in you project.clj :jvm-opts ["--add-modules" "java.xml.bind"]

artur10:10:14

Already tried: Figwheel: Cutting some fruit, just a sec ... Error occurred during initialization of boot layer java.lang.module.FindException: Module java.xml.bind not found Subprocess failed

bbss10:10:17

Hmm, I haven't tried with java 11. It works with 9 and 10 for me.

artur10:10:46

Oh well, will try to figure it out later. Will use 8 for now.

pradyumna10:10:11

java.xml.bind removed from java 11, you may use 3rd party replacement such as [javax.xml.bind/jaxb-api "2.3.0"]

deliciousowl20:10:19

I had to struggle with this as well. Was not able to find the solution on google and ended up asking here

artur10:10:36

Works like a charm. Thank you @pradyumna

borkdude11:10:54

How are people consuming valuehash in their projects? https://github.com/arachne-framework/valuehash I tried to add it in boot, but I get java.lang.Exception: Tried to use insecure HTTP repository.

mpenet11:10:32

yeah its repo is not in https

mpenet11:10:57

I know of replikativ/hasch that seems quite similar and used by a few

deliciousowl20:10:41

Is this the Clojurians discord or a new one?

Dormo20:10:54

it is a new one

gleisonsilva21:10:08

Hello everyone! I'm struggling to get the ResultsetMetadata for a given query using clojure.java.jdbc... there is a way to do that?

seancorfield21:10:06

@gleisonsilva Happy to try to help (you may want to continue this conversation in #sql) if you can explain a bit more about what you've tried and what doesn't work?

Joshua Suskalo23:10:52

One question I have for anyone who has a bit more experience with the internals of Clojure, I've been working a lot with transducers lately, and they've proven incredibly useful. One question that I do have however is with the sequence transducible context. I've used it on several occasions where I want to compute as little data as possible in an expensive process, and one thing that I've noticed is that when you use any given value in it, it will realize at least one additional value past what I was looking for. Now I understand that the reason for this is that it uses chunking under the hood, however I've run into several situations so far where I get the first item from a heavily filtered sequence and have to sit and wait for it to spin through a large quantity of additional data before I can get my result, or in some cases it has simply hung because it attempted to fully realize an infinite sequence because it could not find an additional item which met the filter. I've solved this problem in my own work by writing a sequence* function which is a pure-clojure reimplementation of what sequence is supposed to do, but without chunking. Is there any other, better, or more idiomatic solution to this problem?

Alex Miller (Clojure team)23:10:19

as a general statement, I’d say that if you care (much) about pre-realization, you probably shouldn’t use seqs

Alex Miller (Clojure team)23:10:12

but it sounds like you want delayed, partial evaluation?

Alex Miller (Clojure team)23:10:20

if this is a single-pass kind of operation, using an eduction and consuming it in a loop is one option

Joshua Suskalo23:10:04

That would be an accurate assessment. The main use cases are single-pass, so perhaps an eduction could be a good fit. I'll take a look to see what it's like from a code standpoint. Thanks for pointing me in that direction!