This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-12-28
Channels
- # admin-announcements (72)
- # aws (23)
- # beginners (43)
- # boot (140)
- # cider (11)
- # cljs-dev (4)
- # cljsrn (82)
- # clojars (2)
- # clojure (215)
- # clojure-nl (2)
- # clojure-russia (149)
- # clojurecup (4)
- # clojurescript (159)
- # cursive (19)
- # datomic (47)
- # editors (1)
- # emacs (27)
- # hoplon (32)
- # jobs (11)
- # ldnclj (3)
- # mount (33)
- # off-topic (1)
- # om (380)
- # onyx (1)
- # re-frame (2)
- # reagent (54)
- # yada (63)
@kopasetik: just saw your message about kebab-case. You might find this useful - https://github.com/bbatsov/clojure-style-guide
Does anyone know why I’m getting the FileNotFoundException?
@agile_geek: Thanks!
I switched back to the command line repl instead of the sublime text 3 repl for now
frankk38506: is the sublime text 3 repl using your project.clj for its settings? you could check the output of ps ax
to see what classpath it is setting for example
(if you are on a *nix system of some sort)
frankk38506: also, you could check whether sublime can connect to a running repl, because it can be nice to have your repl in a real terminal even if you connect with your editor too
it prints the port your editor can connect to on startup 64838 in your last paste
probably a pibkac issue using ST3’s REPL, i’m more comfortable on the command line
Thanks for your help @noisesmith
also, you could check (System/getenv "PWD")
in the sublime repl, to see what the working directory was that it started in
if that isn't your project directory, that would be the problem right there
np - I don't actually connect my repl inside my editor either - I have three different repls running for this project, and juggling them properly was just clumsy
When I use lein’s repl, do I need to require/use my dependencies any differently than in other code?
Also, can I make http requests by using ring? Not sure from looking at the source code
clj-http
is the most popular library for making HTTP requests.
Not quite sure what you mean by your other question: https://clojurians.slack.com/archives/beginners/p1451333384005219
Except perhaps in terms of syntax? In the ns
declaration you say :require
but in the REPL you would use the require
function instead...
So (ns myname.space (:require [clojure.string :as str]))
but in the REPL: (require '[clojure.string :as str])
— note in particular the '
in the function call form, to prevent evaluation of symbols.
@seancorfield: Thanks! The require
vs :require
answer was especially helpful
clj-http
is a library for making HTTP requests. Not sure I see the connection with compojure
?
Compojure is a routing library for use inside a web application, along with Ring.
Ring / Compojure are server libraries. clj-http
is a client library.
(i.e., it acts as a client for consuming web sites / APIs)
Well, I write servers that have to make http requests for API calls. That’s common, right?
REPL question: Is there any way that I jump to the front of the command line (and then back to the end of it)?
@kopasetik: what platform are you on? fn-left arrow / fn-right arrow works for me on mac
Control A / Control E as well
@christopherbui: That works! Thanks!
of course I could do (map-indexed #(%1) (repeat 1))
and take
what i need, but is there a simpler way?
user> (take 10 (iterate (partial + 1) 1)) (1 2 3 4 5 6 7 8 9 10)
Right you are