Morning
Sheesh, you're an early bird! π
Normally I wake up 4:25am. But ATM I am on holidays in Greece so we already have 7am π
(my alarm goes off at 8:45 am!)
(my alarm goes off at 8:45 am!)
I guess you go to bed very late.
I am absolutely dead 10:30pm every day
11 pm is an early night for me. Midnight is my preferred bed time.
Even with an 8:45 am alarm, I'm dragging my carcass out of bed and I'm useless until I've had a big, strong mug of freshly-ground dark roast coffee!
Thatβs why you can do so long development sessions. When I wake up 4:25am, usually at 4:26am I am already practicing italian words in Anki. I burn a lot of energy long before I start doing anything creative.
π
I'll be honest: I find writing code relaxing. If I wasn't a software developer by trade, I'd still write code for fun. I think it's why I've been doing OSS development for nearly 30 years now.
Good Morning!
morning
i'm an extreme night owl, i think my natural body clock is to sleep at 1:30-2am
cycles of wakefulness are roughly 90 mins though iirc so i find there's usually a very thin window at about 10-10:30pm where my energy dips and i can sleep if i've not had caffiene in the pm, but it's uncanny... if i don't get to sleep fast, i jolt awake & i'm up til 1:30 haha
Morning
Long after I've been automated out of a job by no code tools and WordPress, I'll be using voice dictation to program unix utilities for fun.
https://www.theregister.com/2020/08/14/mozilla_google_search/ does this mean they will be rehiring?
Happy Friday! π Dang, I canβt deal with being up late at all. I sleep from 22:00 - 5:30. I really prefer the mornings
With a 3 year old kid, I have no choice π Today it was 4:10. Yesterday was 4:30, day before was 4:51. At this rate, he'll be getting up before he goes to bed.
Do they still show 'Me Too' on CBeebies really early in the morning? I remember watching that several times
only starts from 6am
and it's Something Special at that time, followed by the Twirly Woos, then Teletubbies, then Timmy, then Bing, then Hey Duggee, then Go Getters, then Peter Rabbit, then Octanauts...
I know the schedule well
I've not seen Riverseafingal on CBeebies for ages
its all Molly and Mack nowadays
and alot of Katie Morag
and the utterly insipid Topsy and Tim ugh
Topsy and Tim's mother is clearly popping pills to cope with them
Hey Duggee:ok_hand:
Morn'
Tinpo in 10 minutes
tbh, my favourites atm are Sarah and Duck - very trippy and JoJo and Gran Gran π
Hey y'all I am having a Clojure-Fu and Google-Fu failure... I have a BIG lazy seq that is a seq of maps. I want to turn it into a text file representing EDN or JSON (not bothered which). How can I do this without blowing the stack - I am worried that if I turn the whole seek "real" and then into a string in order to spit it, I will have a problem. I am sure that there must be an appropriate way to stream the seq out to a textfile, but I am struggling to get Google to understand me and it keeps showing me examples for smaller data structures where the questioner cares about line breaks and so forth - I don't, I just want to persist the data in such a way as I can read it back in...
Thanks all, I got it working by doing a reduce over the lazy-seq and it's supremely performant, so I am dead chuffed
like this:
(reduce
(fn [out v]
(spit
out
v
:append true)
out)
(io/file
(io/resource "output/output.edn"))
hotels-with-ids)
(Can any of you tell that I have not done any real programming for "a while"?)
reduce the seq onto the output-stream
Output [
, then each element, followed by ,
, then output ]
, you mean?
@mccraigmccraig - that sounds like what I am looking for, thx
EDN is slightly easier than JSON too 'cos no separators required, but then there's JSON-lines too
@mccraigmccraig EDN works for me... If you had to find an example what would you Google for..?
not much of an answer, but i probably wouldn't - i tend to prefer playing in a repl to googling for potted solutions
That's fair - I don't want to simply lift and shift the code, I just find that I grok things more easily if I can see how it's been done π
Playing in the REPL is fine when I know even roughly what I am doing...
....but when I have literally no clue I just find it intimidating and I don't know where to start
this shows the idea
(reduce (fn [out v] (.write out (prn-str v)) out) *out* [1 2 3])
Ok, thanks I will start from there, this makes more sense to me.
π
thank you
We do a similar trick producing a huge JSON doc as a dump of all member-related data in the database (when they do a GDPR request).
yep, we do something similar to dump cassandra tables to CSV ... although we use a manifold stream rather than a lazy-seq
Most of the JSON generators can do this without anything funky. Just point them at a file.
Or a writer, etc