Fork me on GitHub
#off-topic
<
2020-06-08
>
orestis05:06:09

After almost 2 months of full remote (even for digits “newbies”) our CEO is convinced that remote is the future. We hired our first fully remote programmer. I’m still working from home :)

orestis05:06:28

(Small company, 15 people total, providing digital services)

glfinn8307:06:47

I'm going to the office as soon as I can. Mainly because I like going to the city centre, being able to walk to the gym, decide where to eat etc. My office is an empty co-working space though, it could do with more people

glfinn8307:06:50

This is after having worked remotely for almost 4 years

emccue08:06:14

Anyone have a sizable project sitting around using jetty that would be good for perf benchmarking?

emccue08:06:50

or anything else thread-pool-ey i suppose

emccue08:06:55

(do (in-ns 'ring.adapter.jetty)
    (import org.eclipse.jetty.util.thread.ExecutorThreadPool)
    (import java.util.concurrent.ThreadPoolExecutor)
    (import java.util.concurrent.TimeUnit)

    (defn- ^ThreadPool create-threadpool [options]
      (let [min-threads         (options :min-threads 8)
            max-threads         (options :max-threads 50)
            _ (println (str "Threads: " max-threads))
            thread-idle-timeout (options :thread-idle-timeout 60000)
            queue-capacity      (max min-threads 8)
            queue-max-capacity  (options :max-queued-requests Integer/MAX_VALUE)
            blocking-queue      (BlockingArrayQueue. queue-capacity
                                                     queue-capacity
                                                     queue-max-capacity)
            pool                (doto (ExecutorThreadPool.
                                        (ThreadPoolExecutor. ^Integer min-threads
                                                             ^Integer max-threads
                                                             ^Long thread-idle-timeout
                                                             TimeUnit/SECONDS
                                                             blocking-queue
                                                             (-> (Thread/builder)
                                                                 (.virtual)
                                                                 (.factory)))))]
        (when (:daemon? options false)
          (.setDaemon pool true))
        pool))
    (in-ns 'clojure-getting-started.web))

emccue08:06:12

i'm having trouble thinking of a good way to profile virtual threads

dazld08:06:43

@emccue the default executor for futures uses an unbounded threadpool iirc - so you could spin up futures in a tight loop and profile that?

emccue08:06:21

yeah sure, but thats just profiling how fast and how many threads can be made

emccue08:06:42

i'm more thinking "A to B - this is how a regular server's performance characteristics change"

emccue08:06:16

like how many more concurrent requests can be handled by existing code with the couple line change of the executor

dazld08:06:17

that's super tricky - think doing that in code isn't really going to give you much in the way of real insights. how about using wrk or similar instead?

dromar5609:06:44

My company gives me 300 usd for "training" purposes, what would be the best to spend them to improve in clojure?

dromar5609:06:44

My company gives me 300 usd for "training" purposes, what would be the best to spend them to improve in clojure?

nfedyashev10:06:33

I'm a big fan of https://purelyfunctional.tv/ courses. You may give it a try

iagwanderson12:06:21

I also like https://lambdaisland.com/ very good material.

iagwanderson12:06:24

I did "day of datomic" in the last conj 2019, it was very very nice. Marshal and Chelimsky are great tutors. http://2019.clojure-conj.org/tickets/

orestis10:06:11

Is 32GB of RAM (macOS, new Macbook Pro with fast SSD) overkill for development?

orestis10:06:11

Is 32GB of RAM (macOS, new Macbook Pro with fast SSD) overkill for development?

thedanpetrov10:06:55

Not at all 😄 it is standard for all backend developers in my company, these days Slack, IDEA, Docker and the likes eat up quite a bit of memory and you won’t want to suddenly start using up swap

borkdude10:06:53

No. I would even get 64GB if I bought a new one but that's also related to some in memory index we have at work.

p-himik10:06:25

I was miserable at times with 16GB. 32GB would be enough for my workflow, but I decided to get 64GB just in case.

slipset10:06:12

at least 32.

slipset10:06:40

Especially since you cannot upgrade after you've bought it...

jumar11:06:24

Yep, I would get 64GB if it was possible; I bought my laptop a year ago when 32 GB was max. The next time I'm going to buy the max amount of available RAM too

souenzzo12:06:55

I downgrade my notebook from 16Gb to 8Gb and now I'm running out-of-memory a lot of times 16Gb is the minimum today. 32Gb for some years (3~5y) 64Gb for some (more) years (5~8y)

mostlychris14:06:23

Depends on your needs. Normally it's ok, but i'd say 32GB at the least. If you are going to run vms (docker, vmware fusion, vagrant, etc) you are absolutely going to be kicking yourself later if you don't get more ram

vincent.cantin16:06:12

Wow … I am working with 4GB of RAM and did not run into problems. Maybe I am not using the right tools.

vincent.cantin16:06:51

My non-clojure work computer as 16Gb however.

neo255118:06:52

I do my dev work in a VMs with 8GB of ram haha. Trick is to find how to make shadow-CLJS hot reloading working remotely

neo255118:06:11

I also have 64 GB but home made box.

adamtait02:06:18

When I’m working on mobile apps while running XCode & Android Studio builds, then it becomes hard to work on less than 64GB.

vemv13:06:48

I have hit Clojure workloads surpassing 18GB (it'd OOM with any lower setting) So yeah not overkill :)

alwyn03:06:25

Speaking of machines, I may need to do contracting soon after my covid layoff. Is the expectation on contracts for the contractor to use his own equipment?

borkdude13:06:41

does someone has some clojure code to turn html with classes into html with inline styles? I found this: http://www.jonathanpearlin.com/2015/01/06/email_inline_style_jsoup_cssparser.html but maybe there's something else I could also take a look at

jjttjj16:06:52

i remember seeing Alex Miller discuss the namespace naming decisions of spec/spec.alpha/alpha2 online, with maybe some regret over that decision? I believe this was on reddit. It was in part of a larger discussion about how to structure your namespaces to avoid breakage. Anyone happen to have a link to this thread or remember any search terms to help find it that might be useful?

alexmiller16:06:20

what's the question?

alexmiller16:06:20

I'm not sure we have "regret", although maybe in hindsight with better prediction of timelines we would have made other decisions

alexmiller16:06:54

I think we've decided that have foo.alpha foo.bar.alpha foo.baz.alpha is pretty annoying b/c you have 3 alpha.clj

alexmiller16:06:38

in tools.deps, we took a second stab at this with foo.alpha, foo.alpha.bar, foo.alpha.baz

alexmiller16:06:42

in spec 2, we're taking yet a 3rd stab at it with basically alpha.foo, alpha.foo.bar, alpha.foo.baz

alexmiller16:06:27

so alpha in the segment preceding the root (really clojure.alpha.spec in that case, so there's a prefix)

alexmiller16:06:18

so far, we like the last one the most

jjttjj16:06:51

Gotcha, that's pretty much exactly what I wanted to re-read, thanks! Just figuring out my namespaces and remembered that convo might have been useful to go over. Sorry for making you repeat it 🙂

lilactown18:06:42

I’ve been using experimental in my projects like helix.experimental.foo and like it a lot

lilactown18:06:30

when something gets promoted from experimental to “production” it’s usually just removing the prefix for consumers