Fork me on GitHub
#off-topic
<
2019-02-27
>
vemv12:02:28

is there a known time scale (or terminology) that makes a single millisecond sound expensive? e.g. 1ms = 1000 blubs My function takes 20000 blubs to run -> sounds nasty, will fix Conversely, 0.089405 msecs is not very expressive, it makes me perform a mental multiplication in order to figure out if the fn was expensive (in "computer" timescale, not in human timescale) or not

hmaurer12:02:15

@vemv clock cycles?

vemv12:02:57

(defmacro clock-cycles-of [& forms] ...) easy right ๐Ÿ˜œ

hmaurer12:02:19

easy peasy

hmaurer12:02:07

you could also translate the running time into something physical

hmaurer12:02:20

e.g. โ€œyour function took as long to run asโ€ฆ.โ€

โž• 5
vemv12:02:19

* going to the toilet * going to the convenience store * a hike trail * crossing the Sahara * an interplanetary expedition yeah, could be a nice touch. ๐Ÿ˜œ

benoit13:02:45

@vemv What's wrong with microseconds (ยตs) or even nanoseconds (ns) ๐Ÿ™‚ ?

vemv13:02:28

@me1740 microseconds sound great! had forgotten about them, I see them only occasionally in programming nanoseconds would be still confusing... e.g. (time 2) -> 150000 nanoseconds, too big of a number to constitute a baseline

benoit13:02:03

The same metric prefixes apply to all standard units so it's worth knowing: https://en.wikipedia.org/wiki/Metric_prefix

๐Ÿ‘ 5
โž• 5
polymeris15:02:37

TIL there is a 2-letter prefix, da. I always thought deca was D

vemv15:02:06

I played a bit with Criterium. Yes one can quite easily get used to deal with nanos and micros (which Criterium uses interchangeably) Wasn't that satisfied though... so I "came up" with this (apostrophes because it might be common practice)

(defn throughput [microseconds]
  (-> 1.0 (/ microseconds) (* 1000000)))
e.g. a get-user function that takes 350 microseconds to complete, has a throughput of 2857 users/second. A human would hardly see that without help!

henrik19:02:50

Is it reasonable to assume that you'll never find EDN where a key in a map is another map?

hiredman19:02:02

no

๐Ÿ‘ 5
henrik19:02:22

What's a use case for this?

borkdude19:02:24

you can have arbitrary data as keys in EDN, so it would be very brittle to assume this would never happen

hiredman19:02:26

clojure.set/index produces indices with maps as keys, which I may want to serialize for whatever reason

borkdude19:02:18

unless you specify a schema that you enforce yourself between (de)serialization, but in general you should not make any assumptions

hiredman19:02:19

(edn being a serialization format for clojure's datastructures, which everyone wants to use as the name for clojure datastructures for some reason)

henrik19:02:48

In this case, I mean EDN-EDN, as in https://github.com/edn-format/edn

henrik19:02:58

As it turns out, it's not always easy to model EDN in other languages.

emccue20:02:03

Does anyone have any experience running gorillalabs/sparkling on an EMR?

emccue20:02:20

I am fairly new to spark, so I am not sure what the best way to put a repl on the EMR is

emccue20:02:43

(the best -> any)

richiardiandrea21:02:21

Has anybody ever used https://fission.io for functions in docker containers/kubernetes?

Daniel Hines21:02:36

What is that talk where Rich Hickey says something along the lines of "the person with the simpler system will drastically outperform the person with a more complex system"?

jaihindhreddy-duplicate03:02:20

"Simplicity is not about you, and simplicity is hard work. It is actually work, to do the job of simplifying things. But, there's a huge payoff. The person who has a genuinely simpler system, a system made out of genuinely simple parts is gonna be able to affect the greatest change with the least work, he's gonna kick your ass. He's never gonna gem install hairball. He's gonna spend more time simplifying things up front, and in the long haul he's gonna wipe the plate with you, he or she, because they'll have that ability to change things when you're struggling to push elephants around"

๐Ÿ‘ 15
jaihindhreddy-duplicate03:02:15

Maybe I should send a PR to the talk transcripts. It doesn't have this talk ๐Ÿ™‚

Daniel Hines21:02:20

(I mean, that's the whole theme of "Simple Made Easy", and most of his talks, but there was a particular quote about "outperforming" that I'm looking for)

eggsyntax21:02:17

Is that maybe the bit where he talks about the juggling analogy? "Better jugglers can juggle 7 or 8 balls, but nobody can juggle 100," something like that?

Daniel Hines21:02:23

No, although that's one of my favorites and most repeated.

๐Ÿ‘ 5
Daniel Hines21:02:30

Thanks, I'll try that.

theeternalpulse23:02:07

I love lodash but...this is their cond api? https://lodash.com/docs/4.17.11#cond

theeternalpulse23:02:47

I guess clojure's cond is a macro, so you have to have such a funny api to do something similar in js

dpsutton23:02:55

conforms is kinda awesome

dpsutton23:02:12

it's got pattern matching built in. i kinda like that