Fork me on GitHub
#beginners
<
2016-05-03
>
adamkowalski00:05:53

whats the best way to programmatically find the latest versions of various packages? does clojars have an api that you can tap into

jumar07:05:30

@agi_underground: another good book that I can recommend to start with Clojure is Living Clojure by Caring Meier

jumar07:05:23

It’s quite short and covers all important topics

jumar07:05:28

As the next step I’m going to read Clojure Applied which looks really useful and practical once you have some Clojure knowledge under your belt.

plexus08:05:58

+1 for Living Clojure, if you're completely new to the language it's a great gentle introduction. The Joy of Clojure is great for digging a bit deeper.

agi_underground09:05:35

thanks for all for your recommendations, i think i will start to read "Living Clojure", that has really nice and clear explanation of language details. And looks really structured.

zzamboni13:05:43

@agi_underground: I can also vouch for #C0M8PCF7U, very nice book and very nice to have it both in print and online

mikepjb14:05:27

+1 for #C0M8PCF7U

mikepjb14:05:03

does anyone know how to start a headless repl in a shell, background it

mikepjb14:05:17

and then connect back to it via lein repl :connect

mikepjb14:05:20

from the same shell?

kimsnj14:05:44

lein have a headless option for its repl. You can start it with nohup lein repl :headless :port 5000 &

kimsnj14:05:01

and then lein repl :connect 50000

kimsnj14:05:31

with nohup, the repl won't be suspended on the background… and won't be killed when you close the shell.

mikepjb14:05:29

thanks @kimsnj it does run in the background

mikepjb14:05:49

the message to connect shows but then I get a ConnectException Connection refused

mikepjb14:05:12

nohup.txt contains the output Subprocess failed

mikepjb14:05:21

the repl will work if I foreground it and then lein repl :connect 5000 from a different shell

mikepjb14:05:14

also starting the headless repl with nohup lein repl :headless :port 5000 but no & to background it

mikepjb14:05:18

the repl doesn't appear to respond at this point

mikepjb15:05:09

the above was tried on OSX

mikepjb15:05:28

I went and repeated the same commands on an Arch virtualbox

mikepjb15:05:06

almost the same behaviour happens, except the nohup command returns the message

mikepjb15:05:24

nohup: ignoring input and appending output to 'nohup.out'

kimsnj16:05:39

Here's my output including the versions of lein and clojure:

kimsnj16:05:18

The example is running on ubuntu

kimsnj16:05:45

What is the content of the nohup.out file ?

mikepjb16:05:03

@kimsnj: nohup.out stays blank for a while and eventually reads [1]+ Stopped nohup lein repl :headless :port 50000

kimsnj16:05:50

I must admit I don't have any idea why this might happen (and I must disconnect). Maybe you'll have more luck in the #C0AB48493 channel.

mikepjb16:05:58

thanks for your help @kimsnj

mikepjb16:05:07

very tricky issue 😕

mikepjb17:05:36

I fixed the above with the help of @vipaca in #C0AB48493 by using $(nohup lein repl :headless :port 9999)

mikepjb17:05:12

that starts a repl in the background that you can then access with lein repl :connect 9999 or :Connect in vim with fireplace.vim

lucaska18:05:03

Do any of you guys have experience in both Emacs and Atom with Proto-REPL? The latter works pretty well, but I wonder if it might be worthwhile to get some Emacs under my belt?

abhishekamralkar18:05:26

You mean Emacs for beginner ?

abhishekamralkar18:05:43

You can try this out

lucaska18:05:25

I’ve messed around with Emacs before, but I mean for Clojure/Lisp, is the Cider REPL that much better than the ProtoREPL in Atom?

lucaska18:05:57

I remember on Emacs in the past, the Meta key is kind of PITA on OSX

roberto19:05:37

I’d say stick to what you are most productive with. Learning a new tool takes time. I’m comfortable with Emacs for clojure, but use IntelliJ for java. Of course, if you are curious about learning a new tool, then that is another matter.

lucaska19:05:29

I’m definitely interested in new tools (hence Clojure), but it seems like the big sell is the REPL in Emacs, and I can get a Lein REPL in Atom, and auto eval of expressions.

roberto19:05:18

Cider does have some more features. Maybe the standout feature being the debugger

roberto19:05:58

and I personally like using the clj-refactor emacs plugin, which has a dependency on cider

roberto19:05:38

since I’ve learned to use the debugger, I don’t do much printlns anymore

jwm19:05:45

plus you can't forget spacemacs simple_smile

jeffh-fp19:05:18

@lucaska: IntelliJ (community edition - free) plus Cursive plugin (also free for non-commercial use) is a compelling alternative to Emacs+Cider

jeffh-fp19:05:25

also pretty beginner-friendly

jeffh-fp19:05:40

just uncheck all of the extra crap IntelliJ wants to bring along simple_smile

jwm19:05:59

unless you are an OSS supporter then its off the table simple_smile

lucaska19:05:37

Which I am. 😄

jwm20:05:57

me too hehe

lucaska20:05:10

I’ll start messing around with Emacs, but I figure maybe I should right a couple thousand lines of Clojure before worrying too much about productivity.

jwm20:05:34

definitely, I started out in lighttable

lucaska20:05:39

I have LightTable, but would have to do some RTFMing, as it wasn’t apparent what was going on. Cool ideas in there though.

jwm20:05:23

you really dont need to

jwm20:05:28

that was the point of lighttable somewhat

jwm20:05:44

if you're use to sublime you can use lighttable with almost zero introduction

jwm20:05:30

I prefer the default keybindings of sublime/lighttable

jwm20:05:42

emacs you will never learn 100% -- there are infinite varieties hehe

jwm20:05:08

but at the same time emacs has tremendous support versus sublime/lighttable not

lucaska20:05:32

I get the editor stuff, but I wasn’t able to get a repl/docs working very fast. Or I had to keep reconnecting to the docs or something.

lucaska20:05:44

It’s been a few months 😄

jwm20:05:30

yeah that can be discouraging

roberto20:05:52

I couldn't get the repl working in light table either

jwm20:05:28

I had to hunt down instructions for the proper middleware handler

jwm20:05:40

and it didnt look like it was updated too often

jwm21:05:14

I think when chris granger got tired of the project it kind of stopped

lucaska23:05:13

Ahh yeah, well I think I’ll use ProtoREPL in Atom, and get familiar within Emacs over time.