Fork me on GitHub
#clojure-europe
<
2023-02-16
>
Benjamin06:02:53

Sun rising

❤️ 10
😍 2
Mario Trost07:02:32

Good morning!

simongray08:02:23

Just noticed on my way to work that I bought a helmet in a similar colour scheme to the one my son has 😂

😍 10
Daniel Craig08:02:19

Morning in Europe comes early in Texas 😴

slipset08:02:52

So, we have select-keys, but we don’t have but-keys

slipset08:02:51

How could I!?!?! Of course facepalm

pavlosmelissinos08:02:18

Well, to be fair they have different signatures! dissoc is variadic, so I suppose you could make a but-keys that apply dissocs the keys from the map

simongray09:02:11

(defn but-keys [m ks] (apply dissoc m keys))

👍 2
slipset09:02:42

Yah, but dissoc is more than enough 🙂

simongray09:02:33

I love these “but of course!” revelations you get in Clojure-style functional programming

4
slipset09:02:40

I was just confused by some code that didn’t use dissoc and had a liberal use of select-keys so my brain just thought but-keys

awesome 2
slipset09:02:28

(also, would be symmetric with last and butlast

slipset09:02:55

I believe there is room for a penultimate fn though

slipset09:02:41

(def penultimate (comp last butlast)

simongray09:02:25

what about nth-last ???? I NEED IT.

simongray09:02:18

and I have a use case for rest-but-nth-last

simongray09:02:02

it must be hard to decide which functions to include. Took them 15 years to add update-vals and update-keys

simongray09:02:28

even though every single Clojure programmer probably implemented similar fns themselves

2
reefersleep09:02:34

Even though the names can be a bit confusing in their irregularity at times, I really respect Rich for assembling a coherent and succinct core. And, after I passed the newbie stage, I certainly see the value in keeping the core small, instead of trying to include everything and the kitchen sink.

💯 2
simongray10:02:11

and the core isn’t even that small…

simongray10:02:46

isn’t it more that the inclusion criteria are so strict that hardly any fluff ever gets added

simongray10:02:59

any function needs to wax on/off Rich Hickey’s car for 10+ years before it even gets considered

simongray10:02:18

can’t believe that emoji exists

slipset08:02:01

And good morning!

☀️ 6
ray09:02:05

Good morning

😍 10
🌅 4
simongray09:02:17

I’m guessing you can take all of these beautiful morning shots because you’re out walking your dog every day?

ray09:02:56

just myself these days, long story

schmalz09:02:10

Morning all.

thomas09:02:44

Progress: transferring 27G from one machine to another one, it was faster to do just scp ... then zipping it first and then transferring.

vijaykiran10:02:11

I usually use rsync for this - more resilient .. probably

thomas10:02:43

if it had failed yes... but this worked remarkably well.

vijaykiran10:02:36

cool! the servers I’m dealing with are too flaky for loooong scp transfers, even normal ssh keeps breaking so I use mosh

thomas10:02:26

I think the two server are in the same data centre, maybe even in the same rack.

thomas10:02:46

hence the high transfer speed

otfrom09:02:12

scp will compress won't it?

thomas09:02:12

might well do

borkdude09:02:41

At the Dutch national tax service they had (have?) services for transferring tapes / disks of data by car

thomas09:02:53

that was quite common in the olden days,

otfrom09:02:07

never underestimate the bandwidth of a station wagon filled with tapes

borkdude09:02:00

They must have read his book then, he taught at a Dutch university

javahippie10:02:58

There is an AWS Service for that, Snowmobile https://www.cloudmanagementinsider.com/what-is-aws-snowmobile/amp/

😂 2
😲 2
otfrom10:02:30

given the outbound data charges on AWS, surely that should be Hotel California?

😂 12
flowthing14:02:00

So I’m wondering whether this is a great idea or a horrible idea. Basically, a μ/log Datalevin publisher.

flowthing14:02:25

If I were working on a cloud project, I would just publish the logs to Cloudwatch or whatever. But since I’m not, and I’m hesitant to introduce something like Logstash etc. because of the operational overhead. I wonder whether this would make for a lightweight solution for queryable logs.

❤️ 1
flowthing14:02:41

Could just expose a socket server (via SSH only) to allow developers to run whatever log queries they want via the REPL. And prepare a few helper functions for common queries.

flowthing14:02:49

I mean I think it would be an improvement over desperately grepping strings, but… 🤷

flowthing14:02:43

Thanks! I’ll take a look at that.

simongray14:02:12

there are datascript and a datomic bindings, but so far nothing for datalevin

simongray14:02:54

@UB3R8UYA1 is usually pretty open to suggestions and/or PRs though 🙂

simongray14:02:45

Personally, I have no idea whether logging to a triplestore is a good idea, but I’m certainly intrigued by the concept 🙂

borkdude14:02:30

This is what some other people use logstash for right? Dumping JSON into ES and then querying that

flowthing14:02:50

Yes, I mentioned Logstash above.

borkdude14:02:05

oh yes, oversaw that

otfrom16:02:08

I really like tick (and java.time underneath) but definitely struggle to know where to find the function I need

💯 7
mdiin16:02:18

One thing I found at some point was that a lot of things not exposed directly as functions from java.time are exposed as a map by calling t/fields on a date. That’s how I found that getting the week number is not all that difficult.

😮 2
otfrom16:02:46

thx for the tip on t/fields

otfrom16:02:26

there is a lot of magic in interval stuff as well, which I need to use a lot. I've done at least one complicated function that I think I can replace with concur