Company: Exoscale
Company site: https://exoscale.com
Position(s): Software engineer, SRE working on either distributed systems or lower level systems engineering
Location: Remote anywhere in Europe or Onsite in Lausanne Switzerland
Description: Exoscale provides a complete infrastructure as a service experience with a focus on simplicity, scalability, and safe defaults. We are gearing up to improve our block storage offering as well as our VPC capacity which involves compulsing existing academic work, designing and testing distributed systems, as well as requires an aptitude for mechanical sympathy on the systems engineering side.
Tech stack: Clojure at the orchestration layer, Golang for workload local software, a few exceptions here and there where mandated. MySQL, Kafka, and FoundationDB for the bulk of storage needs
Contact: pyr@exoscale.com
For the fun of it, two alternatives to shorten your solutions.
The first uses juxt
and is mostly point-free, but terse:
(->> "aaaabbbcca"
(partition-by identity)
(map (juxt (comp str first) count))))
The second one with for
, a bit chattier but also more legible:
(for [p (partition-by identity "aaaabbbcca" )]
[(-> p first str) (count p)])
Since you were mentioning suggestions in the article, this is one of the
Here’s my point-free take on it using Dyalog APL
(((1∘+ +\) ⊢ ≠ ¯1∘⌽) (((⊃,≢) ⊢) ⌸) ⊢) 'aaaabbbcca'
a 4
b 3
c 2
a 1
Nice! Here’s mine:
f←(⊃,≢)¨⊢⊆⍨1+(+\0,2≠/⊢)
⊢x←f'aaaabbbcca'
a 4 b 3 c 2 a 1
↑x ⍝new formatting, same great taste!
a 4
b 3
c 2
a 1
And for bonus points, the decode:
g←∊(⌿⍨⌿¨)
g x
aaaabbbcca
I really wish dyalog had capped forks—they would obviate the last set of parentheses in the encoder.
I love it! I wonder what differences in memory or performance would be in applying (⊃,≢)
as you do to each partition after grouping them, vs during the grouping as I do with the key operation. I’d forgotten about the “n-wise reduce” variant you used, which is much nicer than my ancient rotation idiom.
It’s interesting how similar the Clojure and APL solutions for a problem like this can be. I mean (juxt first count)
and (⊃,≢)
are remarkably alike. It makes me wonder what Clojure would be like if it had function trains instead of threading macros.
This has to be the most interesting discussion I’ve seen this week. Downside: now I’ll have to relearn APL enough to understand your solutions. :D
memory or performance
IME performance is generally not super intuitive to reason about in APL, because of the interpreters’ ability to do pattern recognition.
It’s interesting how similar the Clojure and APL solutions for a problem like this can be. I mean
(juxt first count)
and(⊃,≢)
are remarkably alike. It makes me wonder what Clojure would be like if it had function trains instead of threading macros.
This is a good read.
Having never seen this language before, it looks like someone has incorrectly rendered a bunch of UTF-8 characters lol
That’s a nice use of juxt
to make it point-free (what do you mean, mostly point-free?). My first intuition was pretty much the same with an anonymous function instead of juxt
.
I believe getting used to threading macros make data manipulation tasks like this one much, much easier to approach. Both when writing and when reading.
I have a hard time believing that most candidates cannot solve the problem. Do they claim to know Clojure?
Unrelated, but I thought I’d comment anyhow since I know you’ll read it:
Your brainfuck interpreter changed the way I thought about everything. Long, long story short, more than ten years ago I began my journey learning Scheme through SICP, and over time I just lost the spark and sorta fell away from writing beautiful programs and wanted to just write clever programs. I was working on a little side project involving a genetic algorithm and brainfuck, and along the way, I thought “oh, what the hell, I may as well read a bf interpreter and then just try and write my own” and I stumbled across yours.
I won’t bore you, but let me just tell you that when I read that code, it became as clear as day to me how long it had been since I read something elegant and beautiful. Since then I’ve been getting deeper and deeper into Clojure, and that old part of my brain that sought after beautiful programs is starting to feel rejuvenated. I’d been reading Ruby classes and Python classes for SO long, it’s been really nice digging my brain out from all of that.
This may be a really weird comment to read, sorry. I just really had a ~*~moment~*~
after reading your code. It’s immaculate.
We use a very similar (but admittedly more primitive) approach at work to monitor our current PR workload : https://github.com/exoscale/pullq
We use this as the place for contributors to look for their next review to do
The social rule of being able to create work without having to also lead the resulting fallout work seems crazy to me, in other packaging communities (or more generally speaking software projects) it is often up to the person introducing the change to present its implementation as well.
In essence here some packagers can act as unchecked “product managers” pushing a new way of building packages, disregarding ensuing labor.
Hi,
Exoscale is present in Switzerland, Germany, and Austria. And provides fast VMs and Object Storage. I am biased but think we are OK
Six IMAP accounts, delivered via mbsync to the local, indexed by mu, and read in mu4e. I do no filtering, just archive everything and trust in mu to find what I need. On the iPad/iPhone, I use the native mail client. I’ve tried a bunch of others, and while I actually like Outlook for iOS the best, it also includes calendaring, which is dumb and unnecessary.
I segregate work stuff to a different set of clients — the gmail web app on the desktop, and the gmail app on iOS.
My personal and our family email, the only really important ones, are hosted at Fastmail.
Similar setup (msmtp, msync, mu, mu4e) this gives me a fast, unified inbox for both home and business emails. Very happy with it
Thanks for this, looks great on mobile!
A bit of a tangential question: when not using any particular desktop environment in Linux, is there a way to make Firefox ask for dark or light mode. I love it that the phones switch automatically depending on time of day and would love this for the desktop but I wasn’t able to find any pointers on how to do that.
If you set
ui.systemUsesDarkTheme
to1
inabout:config
, that should do it. Not sure about automating it though.Thanks! I’ll leave the automation for a rainy day but this is already great, thanks a lot.
I’m pretty sure changing the Firefox theme to a dark one changes the color preference too.