Fork me on GitHub
#clojure
<
2017-01-14
>
leo.ribeiro02:01:37

hello guys! what editor do you recommend to use nowadays?

seylerius02:01:55

If you ask me, I'd suggest Emacs with CIDER.

leo.ribeiro02:01:21

yeah just to make sure it is still the best default setup

leo.ribeiro02:01:25

I was going to stick with it

leo.ribeiro02:01:07

@seylerius and do you suggest a guide to start with this kind of editor? (I’m coming from intellij/eclipse… also sublime guy)

seylerius02:01:28

The Clojure for the Brave and True tutorial includes a setup guide for Emacs & CIDER: http://www.braveclojure.com/clojure-for-the-brave-and-true/

leo.ribeiro02:01:17

nice! thank you bro! 🙂

leo.ribeiro04:01:51

@seylerius phew! finish all the lessons! what a challenge hahaa.. but I’m enjoying it 🙂

tbaldridge04:01:33

@leo.ribeiro I switched from Emacs to Intelij+Cursive, and pretty much never looked back. There's a lot of cruft that comes with an ancient editor like emacs, and switching to something more modern was a huge win for me. YMMV of course.

richiardiandrea05:01:59

@leo.ribeiro that's a very subjective question I guess. Cursive and cider are the most stable and feature rich. Some people even use both 😄 I would also have a look at licenses and pricing if applicable.

richiardiandrea05:01:32

Protorepl is a valid alternative if you are ready for a little bit of adaptation, young and promising tool 😀

leo.ribeiro05:01:47

@tbaldridge @richiardiandrea thanks for the feedback guys… As I’m a Intellij user, I think it would be no learning curve for the tool. But I really want to explore something outside intellij and incline to something lightweight and see if it is worth it over a powerful IDE.

seylerius05:01:03

I really enjoy Emacs because I edit such a wide variety of things, and appreciate being able to keyboard the fsck out of everything. I really get a fun "One App to Rule Them All" thing using Emacs.

seylerius05:01:00

Org, LaTeX, mu4e, CIDER, ERC, Dired, etc.

seylerius05:01:12

Eventually I'll probably debug the slack client for Emacs.

seylerius05:01:08

Ach. Decisions, decisions. I'm trying to decide how to organize a map that needs to hold the following things, and define this in a spec: a shift (integer, -2 to N), a count of that shift (could be optional, would default to 1), a following shift or set of shifts (could be a single shift, a seq of possible shifts, or a shorthand referencing a concept like "off" or "anywhere but here", definitely optional), and a count of that follower (just as maybe-optional as the shift count, and would again default to 1). Any tips?

lorenzoi13:01:27

Hey, does anyone have any good video tutorials for clojure? Thanks! 🙂

lxsameer13:01:09

guys, my application have a web server ( immutant ), I want to run a long running task on side by side by this web server, I'm using Components schema, what is the best solution to run the task ?

borkdude14:01:58

@lxsameer Does it have to be a scheduled task or just a long running process that you can kick off when the server starts?

lxsameer14:01:15

can be both

borkdude14:01:24

For scheduled tasks we use this: http://clojurequartz.info/

lxsameer14:01:30

but right now it should be scheduled

lxsameer14:01:22

yeah it uses quartz internally

sveri14:01:01

@lxsameer Then I dont understand the question 🙂

lxsameer14:01:39

@sveri I wanted to make sure that what i want to do is the right thing to do

lxsameer14:01:47

and thanks to you guys, i did

sveri14:01:45

ok, have fun coding 🙂

lxsameer16:01:31

guys what's wrong with this code ? http://dpaste.com/33ZVAKM

lxsameer16:01:39

i get this exception: "clojure.lang.ExceptionInfo: Unable to resolve symbol: t in this context"

lxsameer16:01:35

it seems that timbre's namespace can't be resolved, but I have timbre in my dependencies

dominicm17:01:49

@lxsameer you're trying to use t as a symbol, not as a namespace I'd guess.

bcbradley17:01:00

would it be considered bad practice to programatically define functions at the top level?

bcbradley17:01:46

for instance, if i'm trying to make a library to wrap an api, say over http from some external service

bcbradley17:01:23

i might want to make an array of maps that contain metadata about what the functions do, what their arguments are like, and other semantics

bcbradley17:01:16

since every function does the same thing but slightly differently (all just http requests, some post, some get, with various args), it stands to reason that the functions could just be generated from such an array of maps

bcbradley17:01:46

what i'd like to know is whether or not there are any pitfalls when going that route, and whether you think doing something like that should be considered lazy or poor code

bcbradley17:01:55

(btw i'm talking about evaluating something at the top level that invokes the "defn" symbol a bunch of times)

mavbozo17:01:27

@bcbradley it's not a bad practice. many solid libraries such as enlive used in that way

bcbradley17:01:07

are there any pitfalls i should be aware of? Is it as simple as calling defn?

bcbradley17:01:14

will it be bound inside the current ns as normal?

mavbozo17:01:31

yes, those are bound as regular vars inside your ns

mavbozo17:01:37

@bcbradley I assume you want to create many functions with different names for each api features. I'm not so sure you can do that without resorting to macros though

qqq22:01:03

I was happy with clojure reloading. Then I started using defrecord. Now, when I reload a certain namespace, I want to also "reload all namespaces that depend on this one." How can I do this?

qqq22:01:07

@schemee: okay so I load that library, I save files in emacs, then I just hit (refresh) ?

qqq22:01:09

this is insane

schmee22:01:31

THIS. IS. CLOJURE!

schmee22:01:19

the more you learn, the more you love it

sova-soars-the-sora22:01:29

yes it's really a delight