This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-05-23
Channels
- # announcements (12)
- # beginners (225)
- # calva (7)
- # cider (45)
- # clj-kondo (1)
- # cljdoc (1)
- # cljsrn (3)
- # clojure (112)
- # clojure-dev (45)
- # clojure-europe (6)
- # clojure-finland (2)
- # clojure-india (1)
- # clojure-nl (27)
- # clojure-spec (37)
- # clojure-uk (171)
- # clojurescript (39)
- # core-async (9)
- # cursive (22)
- # datascript (8)
- # datomic (50)
- # emacs (12)
- # figwheel-main (17)
- # fulcro (42)
- # garden (2)
- # hoplon (27)
- # jobs (4)
- # kaocha (8)
- # klipse (2)
- # luminus (2)
- # off-topic (9)
- # perun (33)
- # planck (2)
- # re-frame (9)
- # reagent (48)
- # reitit (5)
- # remote-jobs (1)
- # rum (2)
- # shadow-cljs (23)
- # slack-help (3)
- # spacemacs (18)
- # sql (7)
- # tools-deps (24)
- # unrepl (9)
- # vim (30)
Mornin' @dharrigan!
~/.lein/profiles.clj
is evil. Can I just say that?
Maybe Leiningen is evil too...?
Trying to help beginners and they have a dependency problem not caused by project.clj
but they insist they have no ~/.lein/profiles.clj
file π
That threw me at the start too, I had a bad profiles.clj
and I couldn't work out why nothing was working...
I didn't understand the relationship between profiles.clj
and a project.clj
. Had to figure it out.
rm ~/.lein/profiles.clj
-> happy life!
I don't recall this problem happening with boot
or clj
....
I think Leiningen's plugins are generally "evil"...
I'm still a bit undecided between lein and clj, lein is the incumbent and has great support etc., clj is the upstart with a lighter feel.
At this point I don't know of any reason to use lein
instead of clj
π
(but then we switched from lein
to boot
completely in 2015 and from boot
to clj
completely in 2018)
clj -A:new app foo
I came across this when googling for something - thank you so much for putting this together, it's a great idiot-proof way around deps.edn
Seriously, I haven't touched lein
for years...
I think it's really important to get back to "simple" and that's what clj
/`deps.edn` is all about.
lein
/`boot` have so much "magic" that I just can't get behind them any more.
Hey Jase!
(this Brit's about to go to bed, once I've finished this beer)
(Figueroa Mountain Imperial IPA)
Hi @seancorfield all well with you sir?
Very well! π
Is there anything happening in the UK around the middle of August?
My wife has been invited to judge a cat show in Stoke-on-Trent so we'll both be coming over for about a week...
Thpprpppprttt!
@seancorfield Iβd just vanish in to the Emma Bridgewater shop in Stoke and stock up on tableware.
Well, we'll arrive probably August 15th in Heathrow and leave August 20th.
Yeah, that's probably the most exciting aspect about visiting Britain...
Itβs no secret I love airports @seancorfield
My fam is from that area π @dharrigan
I was born'n'raised in N.Ireland. But my fam's from Walsall/Wolverhamton.
How am yer? Alright?
It's not what it used to be @jasonbell
Seen any dragons lately @jasonbell?
Iβm sure not @seancorfield Iβve lived here 15 years now.
@dharrigan no but the number of tourists is spiked, theyβre annoying now on the coast.
It's been well over 20 years since I was last there...
I was born in Belfast General in '62
I still love N.I. but tainted by bombs going off π
We lived in Coleraine for a while.
My dad was told to leave by N.I. police as he was on the IRA list... π
He moved us to Guildford (really dad? Guildford Four?)
And I ended up in Aldershot. Blew up the line behind my house. Sigh.
Still, I have a lot of sympathy for the IRA to be honest.
Iβve heard tons of horrific and worrying stories so non of it is a surprise anymore. We all thought it might get better then my friend got murdered in Aprilβ¦β¦
It's a whole bunch of shit, to be honest, no matter what "side" you're on.
@seancorfield Oh for sure. I did a lot of freelance press photography in 2006-2008 so I heard all sorts of nonsense.
I was born in 62 in N.I. We moved back to the mainland in '69. It was all shit back then.
but getting the most hardened of IRA supporters to sing into a hairbrush was a high point. βWhatβs in it for me Jase?β, βThe difference between page 1 and page 3, youβre call.β, βGive me that hairbrushβ¦β
LOL :rolling_on_the_floor_laughing:
Weird times.
Americans are totally freaked out by all of this BTW.
Remember to vote today
I may vote Lib Dems, but I can never in my heart forgive them for their betrayal of students
It's funny that people forget that Labour introduced student tuition fees. Then the LibDems managed to minimise the rise of tuition fees as a minor partner in a coalition government. The the Conservatives all voted to hike the fees up to 9k a year.
Had more people voted for LibDems then they could have been in charge of government and scrapped tuition fees.
And your initial statement does neglected all the other things the LibDems did to minimise the impact of austerity (kept it lower impact than Labours pledge). I could go on, but don't want to rant (too much)
at some point, emoticon will have to become recognised as an official written language
but noone will be able to agree on what all the glyphs mean
everything old is new again π΅ but now that we have computers to remember and write things for us, writing in glyphs is a saner proposition
@seancorfield re what to do in August, idk what you find entertaining but there's usually historical recreation battles running in the countryside π
Interesting website in case you are making any voting decisions today https://www.helpsavedemocracy.com/brexit
I voted LibDems and happy to see them in the top two in the polling. I hope there is a high voter turn out so that parties without policies get fewer seats.
If you don't vote today, it does means more publicity for Nigel Farage...
If you need extra incentive to vote LibDems today... https://twitter.com/jr0cket/status/1131517703951388673
on the Guardian are reports of EU nationals in the UK who are not allowed to vote :face_with_symbols_on_mouth:
Stopping people voting is a very Brexit type of democracy π
I know completely off topic, but man, really enjoying REPL driven development - being able to hit a REST API, examine the results, tweak the function, re-eval, and retry is really a nice experience.
When i first started using clojure i would always make the lazy mistake and use map in repl then wonder why i would get some [email protected]
or something like that in my code π
So just remembering repl evaluates your map so its not lazy is something even now i remember π
@guy sorry, not following you. Do you have an example to try?
I rarely use the REPL buffer (window) directly, wondering if I am missing something
mmm im trying to come up with an example and its not working π. I think it was more to do with my work flow i guess when i first started.
(->> [1 2 3 -3]
(map identity)
(filter pos?))
=> (1 2 3)
I do something like this in my repl and as a newbie i was like oh cool it does what i want(defn guy-fn [coll]
(let [result (->> coll
(map identity)
(filter pos?))]
(println result)
(str result)))
=> #'user/guy-fn
(guy-fn [1 2 3 -4])
(1 2 3)
=> "[email protected]"
So i just take the code i had used in my repl without thinking and am surprised that it was a lazyseq if that makes sense?
It used to get me all the time starting out with clojure because of the understanding of what functions are lazy and eager, but in the repl it sort of doesnβt matter ( i know it does but yeah)
Either way it might just be something that only happened to me, but i remember it catching me off guard quite a few times π
In the past I have just used println
for that... but that isn't ideal as it generates lots of stuff potentially.
I have created code that results that are just a reference to something that will lazy evaluate. I typically put that in a function definition to fix most things (although not all)
Most of Clojure is eagerly evaluated, I think its mainly around sequences where its specifically lazy, especially of course lazy-seq
. The do
family of funcitons might help eagerly evaluate things, but I need to go and read some more about that...
@guy I see what you mean now, thanks
If you call your example as an in-line function, then it returns the answer
((fn [coll]
(let [result (filter pos? (map identity coll))]
result)) [1 2 3 -3])
unless you wrap the answer in a str
call
((fn [coll]
(let [result (filter pos? (map identity coll))]
(str result))) [1 2 3 -3])
@thomas "Lazy sequences can be forcefully realized with clojure.core/dorun and clojure.core/doall. The difference between the two is that dorun throws away all results and is supposed to be used for side effects, while doall returns computed values:" There is a nice write up here: http://clojure-doc.org/articles/language/laziness.html
@dharrigan would you be posting the slides anywhere public when you are done π ? I misread as you already had a presentation ready
@thomas There are a bunch of functions/tricks in those cases⦠doall
/`dorun` that @jr0cket mentioned. Also run!
is like an eager map
of a procedure over a collection. i.e. where you want a side effect for each value, rather than a return value. Other tricks to eliminate laziness in a sequence are to wrap a vec
over it, or use into
etc which can help isolate/eliminate computations in the lazy seqs from being measured.
I have a nice (I hope!) demo of a port of a kotlin program to clojure that works. I'm going to have a branch with some of the features removed and show how I can "add" them back in again by using the repl
before that, I'll start with some basic "LISP 101" stuff and why Clojure is all warm and cuddly
@dharrigan I wish you luck !
@dharrigan good luck with your presentation tomorrow. You remindedm me that mine are a little out of date now, I should update / delete them http://jr0cket.co.uk/slides/
what is sent @dharrigan?
@mccraigmccraig And this