ldnclj

Find us on #clojure-uk
agile_geek 2015-06-10T05:55:48.000674Z

Morn'

2015-06-10T06:57:50.000675Z

Eyup

gjnoonan 2015-06-10T06:57:53.000676Z

Morning

agile_geek 2015-06-10T08:00:29.000677Z

@otfrom: pleased to see u acknowledging your Yorkshire roots!

thomas 2015-06-10T08:09:57.000678Z

morning

korny 2015-06-10T08:12:47.000679Z

mrnin

korny 2015-06-10T08:15:14.000680Z

@agile_geek: on personal projects I do repl-driven, then move the repl commands into unit tests

korny 2015-06-10T08:15:33.000681Z

on work projects I did a mix of TDD and the above.

agile_geek 2015-06-10T08:16:44.000682Z

@korny I’ve only done personal projects but I’m trying to develop a way of working and tooling that would support commercial work.

korny 2015-06-10T08:17:51.000683Z

regarding core.typed - Ambrose’s stuff is genius, but I’d prefer something less intrusive - I prefer using Prismatic Schema to do type checking (and maybe coercion) at the program boundaries. Did have one project where this became a bit of a “golden hammer” - and ended up as a performance issue, when code would naively type-check a huge number of deeply nested objects in some circumstances.

agile_geek 2015-06-10T08:19:14.000684Z

@korny

agile_geek 2015-06-10T08:19:23.000685Z

I’ve been thinking the same.

quentin 2015-06-10T08:19:57.000686Z

Morning

korny 2015-06-10T08:20:20.000687Z

I usually do repl driven development by putting stuff like (comment (def foo [1 2 3]) (def bar [4 5 6]) (my-fn foo bar) ) in my code, using cursive key-bindings to execute the stuff in the comment block as I play. Hopefully that stuff evolves into unit tests over time.

agile_geek 2015-06-10T08:23:44.000688Z

@korny I remember you and @otfrom mentioning this and it’s something I’ve tried since although I don’t like the idea of cluttering production code with commented code as I seen so much ‘noise’ introduced into OOP code bases over the years by Developer’s who don’t know what SCM is.

korny 2015-06-10T08:33:16.000689Z

I intend for these comments to be deleted once the code is relatively stable. And I have quite different behaviour for “temporary” spike code, too - for example our current project has a clojure data seeder that generates performance test data, I don’t apply the same standards to that sort of code :simple_smile:

martintrojer 2015-06-10T08:43:20.000690Z

@korny: agree on schema/coercers. But there is still a need for some kind of type checking ‘inside’ your business logic (I think). Readability is on the list I’ll tackle on my post. Also benefits to refactoring when using core.typed.

martintrojer 2015-06-10T08:43:45.000691Z

^^^ Especially if your business logic is non-trivial and a team is working on it.

thomas 2015-06-10T10:32:18.000693Z

welcome @cdpjenkins !!!

2015-06-10T10:32:22.000694Z

Hi!

2015-06-10T10:32:43.000695Z

I only just noticed that this channel exists (just logged on to gitter and noticed that you lot aren't on it any more!)

2015-06-10T10:33:12.000696Z

Did I mention that I will be moving to London in August? So I will finally be a real London Clojurian :simple_smile:

quentin 2015-06-10T10:34:03.000697Z

welcome @cdpjenkins :simple_smile:

2015-06-10T10:35:02.000699Z

thanks quentin :simple_smile:

agile_geek 2015-06-10T11:02:29.000700Z

@cdpjenkins: as I’ve just taken a 6 month lease on an apartment in London for convenience/cost compared with Hotels, I too am a real London Clojurian…during the weekdays anyway, and the entire North East England Clojurians group at the weekends!

gjnoonan 2015-06-10T11:05:05.000701Z

@agile_geek: not the entire north east

gjnoonan 2015-06-10T11:05:37.000702Z

If you ask many people in the south, East Yorkshire may as well be the north east 😛

agile_geek 2015-06-10T11:06:26.000703Z

@gjnoonan: I’m not counting Yorkshire. You’re a country in it’s own right…and if you study dialects..more than one country!

gjnoonan 2015-06-10T11:06:42.000704Z

haha

gjnoonan 2015-06-10T11:07:12.000705Z

Aye lad, thee aint wrong

agile_geek 2015-06-10T11:08:13.000706Z

@gjnoonan: so NE meaning from Berwick (Scotland? Contentious!) to Richmond (North Yorks not London)

agile_geek 2015-06-10T11:09:38.000707Z

That’s a chunk of the country about 120 miles long and 50-70 miles wide so I’ll lay claim to that!

gjnoonan 2015-06-10T11:10:55.000708Z

About 200 miles long. Well depending if you’re going as the bird flys or by road

gjnoonan 2015-06-10T11:11:20.000709Z

That is a mighty big bit of land to lay claim to sir

agile_geek 2015-06-10T12:44:24.000712Z

@gjnoonan: aye, but it’s all sheep and one Clojurian!

agile_geek 2015-06-10T12:44:44.000713Z

and by sheep I do mean Java/C# dev’s 😉

2015-06-10T12:47:01.000714Z

anyone want to organise the July or August talks?

benedek 2015-06-10T12:49:10.000716Z

oi everyone, my clj-refactor team mate just rewrote the clj-refactor wiki with heaps of anim gif demos: https://github.com/clojure-emacs/clj-refactor.el/wiki any feedback appreciated!

2015-06-10T12:49:23.000718Z

@agile_geek: that's a bit unfair on the lovely people suffering under legacy languages. 😉

2015-06-10T12:49:30.000719Z

@benedek: cool

agile_geek 2015-06-10T12:49:52.000720Z

@otfrom: as I am one of them…baaaa!

agile_geek 2015-06-10T12:50:20.000721Z

@otfrom: and legacy is COBOL, Fortran, PL1, etc.

gjnoonan 2015-06-10T12:52:02.000722Z

@agile_geek: All the more people to convert

agile_geek 2015-06-10T12:52:59.000723Z

@gjnoonan: Working on that at current employer. Not sure I can get them to worship at the altar of Emacs tho! 😉

gjnoonan 2015-06-10T12:55:10.000724Z

Apply force :simple_smile:

practicalli-john 2015-06-10T14:27:03.000725Z

I didnt realise there was a declare function for making forward declarations , do people use the declare function much ? Could be handy in the REPL I suppose... https://clojuredocs.org/clojure.core/declare

thomas 2015-06-10T14:28:53.000726Z

@jr0cket: I have used it a few times... but not really needed I guess

agile_geek 2015-06-10T15:03:21.000727Z

@jr0cket: I’ve tried to refactor my code so I don’t need it. I’ve only had to keep it in one toy project so far and I’m sure if I thought about it harder I could remove it (BTW it was that cheque parser kata)

practicalli-john 2015-06-10T16:24:37.000728Z

Thanks @thomas @agile_geek. Seems the declare function could be briefly useful to keep your train of thought going. For example, you are working on a function and realise you want some of the work to be done by a yet unwritten function, so you declare the unwritten function name and keep going. I guess its more likely you would just add all the work in the current function and then refactor it out into its own. I only thought about declare because its the first refactor in the list of clj-refactor https://github.com/clojure-emacs/clj-refactor.el/wiki

agile_geek 2015-06-10T16:32:06.000730Z

@jr0cket: John, there will be cases where you have a function that is cyclically dependent on another function further down the code and you have to use declare because (unlike Java) Clojure doesn’t have two passes through the compiler to resolve references. However, I try and write my code to avoid this.

benedek 2015-06-10T17:46:03.000731Z

@jr0cket nice! you can also use create function from example usage: https://github.com/clojure-emacs/clj-refactor.el/blob/master/examples/create-fn-from-example.gif from clj refactor

agile_geek 2015-06-10T19:58:46.000733Z

@benedek @jr0cket; I tend to end up using extract function more as I often only think of the function I want to extract as I realise my code is getting a bit large and cumbersome.

gjnoonan 2015-06-10T20:10:04.000734Z

I’ve used this a few times today, It’s quite nice :simple_smile: https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-add-project-dependency

gjnoonan 2015-06-10T20:10:19.000736Z

Trying to work through and get them all into my workflow, and muscle memory

gjnoonan 2015-06-10T20:12:10.000737Z

I can see this being useful for me, but wasn’t able to get it to work earlier when I tried https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-add-stubs

agile_geek 2015-06-10T20:28:25.000738Z

@gjnoonan: haven’t used add stubs because most of my toy projects don’t have much in the way of protocols but I did a talk at Skills Matter last week on my favourite refactors from clj-refactor. I’ve got a few of the ones I used most often in muscle memory now.

gjnoonan 2015-06-10T20:29:06.000739Z

Which do you use most offen?

gjnoonan 2015-06-10T20:30:42.000741Z

"Skillscast coming soon.” booo

benedek 2015-06-10T20:37:54.000742Z

@agile_geek: yeah i guess extract fn and create fn from example is the two sides of the coin in a way

benedek 2015-06-10T20:38:36.000743Z

@gjnoonan: what kind of problem did you see?

gjnoonan 2015-06-10T20:48:33.000744Z

@benedek: Given the contrived example of

(defprotocol UserStore
  "Just a test user store"
  (create-user [user])
  (delete-user [user]))

(defrecord User [username]
  UserStore)
I get cljr--maybe-rethrow-error: Can't find interface rep.backend.db/UserStore .. Saved and loaded into the repl fine

agile_geek 2015-06-10T20:53:04.000746Z

@gjnoonan: it’s said that since Tuesday last week so I’m guessing they’ve lost the footage..S’OK I hate watching myself! 😉

benedek 2015-06-10T20:54:56.000747Z

@agile_geek: would be a shame tho

gjnoonan 2015-06-10T21:08:49.000748Z

@benedek: any ideas?

benedek 2015-06-10T21:14:57.000749Z

@gjnoonan: just guessing that since you created the protocol just before the defrecord the generated interface is not yet available on the classpath

benedek 2015-06-10T21:15:14.000750Z

created an issue for it on github. will look into it more throughly

gjnoonan 2015-06-10T21:15:31.000753Z

hmm, makes sense

gjnoonan 2015-06-10T21:15:35.000754Z

Thanks! :simple_smile:

benedek 2015-06-10T21:15:56.000755Z

np