This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-08-07
Channels
- # beginners (95)
- # cider (131)
- # cljdoc (12)
- # cljsjs (2)
- # clojure (209)
- # clojure-dev (1)
- # clojure-italy (3)
- # clojure-nl (10)
- # clojure-russia (37)
- # clojure-spec (19)
- # clojure-uk (182)
- # clojurescript (136)
- # cursive (28)
- # datomic (28)
- # editors (55)
- # figwheel-main (1)
- # fulcro (36)
- # hyperfiddle (12)
- # jobs (1)
- # jobs-discuss (55)
- # luminus (1)
- # mount (1)
- # off-topic (28)
- # onyx (18)
- # reagent (17)
- # ring-swagger (4)
- # rum (14)
- # shadow-cljs (22)
- # spacemacs (15)
- # tools-deps (16)
- # vim (26)
Morning.
halloo there
Bore da pawb
pawb?
Everyone? I think - could well be wrong!
mรฅning
Yep! Good morning everyone
\o (greet "everyone")
yeah! just saw it thanks @lady3janepl
I would consider that a horror in and of itself. The call signature you're in seems whacky though.
eyyyyyyy @conor.p.farrell welcome dude!
finally more manchester clojure representation
imagine being in a programming community where you didn't know everyone by their first name? ๐ฎ
makes me think we should have more cryptic user names more than anything else ๐
this is a really friendly and helpful little corner of the internet imo
@dominicm Imagine a programming community that NEVER calls me by my first name ๐
Canโt imagine Jadeโฆwhat would that feel like?
careful don't say his name 3 times or the spell will be broken
What up @alex.lynham
welcome to the party
if someone offers you illegal parentheses please don't take them and report them to the correct authorities
Clojure noob question 2.).
(defn reductions
"Returns a lazy seq of the intermediate values of the reduction (as
per reduce) of coll by f, starting with init."
{:added "1.2"}
([f coll]
(lazy-seq
(if-let [s (seq coll)]
(reductions f (first s) (rest s))
(list (f)))))
([f init coll]
(if (reduced? init)
(list @init)
(cons init
(lazy-seq
(when-let [s (seq coll)]
(reductions f (f init (first s)) (rest s))))))))
What does (list @init)
mean?a bit like an orange
no thats all
to get value out of an orange
you deref
it
reduced
is a way of returning early with a value
(if (reduced? init)
So this is more to do with the function passed into reductions
rather then the function itself?
1- reductions
needs to support early termination of f
, by testing for reduced?
on the accumulator
2- f
can tell reductions
to terminate the reduction early by returning a reduced
value
user=> (reduce (fn [acc el] (println el) (if (> el 3) (reduced acc) (+ acc el))) (range 10))
1 2 3 4
6
it tells reduce
"ok, stop consuming the collection and performing the reduce operation, just return acc
it's a useful concept with transducers too - this blog post has some more about it https://dev.to/greencoder/build-your-own-transducer-and-impress-your-cat---part-4-2bp8
well that one is relevant in terms of what reduced
is
just as an aside
@guy that implementation of reductions
is quite easy and compact, focus on the [f init coll]
arity, drop the lazy-seq
, play around with returning a reduced
from f
and then remove that reduced?
check and see how it behaves
well we've not seen the blog post yet ๐
or the whimsical talk at the conj
i'm sure @danieleneal was talking about this
Well we always knew that that healthy != tasty, and chocolate == tasty. Once we discovered that fruit == healthy, it was only a matter of time since someone invented a substitute.
@lady3janepl strawberries dipped in cream maybe, but I guess that's a difficult to carry pair?
https://www.artisanduchocolat.com/chocolates/artisan-chocolates/couture-collection.html
these are the bomb
@dominicm Oh yeah, tons of stuff. Choc Orange, Toblerone, Dairy Milk. My point was more that actually nice chocolate often doesn't (because it's dark, or whatever)
My wife gets a monthly Hotel Chocolat box (delivered to my work these days, since the dog ate one that came to the house). I get most of the fruity/white/fondant ones, she gets all the darks/nutty ones
Oh right ๐ Well, yes, but they can be more work. And I like creamy, sugary milk chocolate
But I do sometimes just mix up icing sugar and melted butter and a little bit of peppermint essence in a mug, and eat it with a spoon. Basically peppermint cream mix
And when I was in college I worked weekends in a bakery and used to have a pasty and a 1kg block of Regalice ready-to-roll icing for lunch. Somehow I am neither diabetic nor the size of a house, but that's more luck than judgement
And I tried it again back when I was about 22/23 and got a massive sugar crash headache. Not done it since
a 1kg block of icing
and the jelly cubes before they are made into jelly
1kg????!!!??
Oh yeah. First dessert I learned to make was syrup sponge in the microwave. I used to make a double batch, eat half raw, cook the rest. That was when I was about 8
Also yes, jelly cubes are amazing. Though we don't normally have them in the house these days as we rarely eat jelly
@dominicm If it's anything like the chunks in Ben & Jerry's Cookie Dough Ice Cream, then yes. Best flavour
Also it being the UK, I would imagine we don't even have to drop the egg. Raw egg is fine over here. Not so much in the US. Don't know about the rest of the EU
@carr0t I always eat it, but I wasn't sure about the rules. Interesting that it's a US problem.
@carr0t seriously, 1g brown sugar, 2g soft butter and 3g flour (you can probably drop/reduce this, you're not making cookies). Mix in a bowl and scale this to your hearts desire and enjoy.
All eggs sold in the UK have to come from vaccinated chickens, cannot be washed (which to a certain extent requires the farmers to keep them in cleaner conditions, as noone want an egg covered in crap), and we keep them (in the supermarket) outside the fridge.
The US washes their eggs (which means they can be kept in dirtier conditions without people 'knowing', and also washes off the protective coating [egg bloom] and leaves them porous, which means they absorb contaminants more easily). They also don't mandate vaccination of their chickens. Those two combined means they have to keep their eggs in the fridge, even in the supermarket
> The Food Standards Agency says "Lion Mark" eggs, which include almost all of the eggs produced in the UK, are virtually free of salmonella. From https://www.bbc.co.uk/news/health-41568998
https://www.theguardian.com/notesandqueries/query/0,5753,-26086,00.html now I'm wondering about the fridge
general impression seems to be that eggs prefer constant temperature. So shelf in supermarket, fridge (not in door) at home.
we have eggs in a bowl in the shade
never had a problem
does anybody else think that:
๐ช:face_with_raised_eyebrow:๐
looks like the canonical emoji for serious party
hahaha
@carr0t 1kg sugar = 4kcal... ~2 days of calories for lunch! how did you avoid becoming a diabetic house?
@mccraigmccraig I honestly donโt know. Iโm 6โ2โ (about 188cm), have been since I was 15/16. Until I was 18 I ate whatever I wanted and stayed about 10.5 stone (66-67kg). I was unhealthily thin. At Uni that went up a bit, but only to a more healthy weight. Then I got to 28 and suddenly it all appeared and I had to start watching what I eat (though the cycling helps)