Fork me on GitHub

Morning! time


Morning Everyone


Morning! (just about)


Thinking about laptops again, wondering what's the top of the line for Linux stuff right now, Lenovo X1 Carbon? XPS 13/15? :thinking_face:


Ideally 1080p matte non-touch screen too.


Lenovo X1 Extreme if you like 15" size laptop, or X1 Carbon if you want a 13" laptop (with a 14' screen). I am excited about the Lenovo X1 Extreme 2nd Gen, with Intel Core 9th Gen processor (8 physical cores - 16 virtual cores) - hopefully our currency doesn't devalue more before its available in the UK.


I was tempted to just carry on with the XPS line but I am tempted by the Lenovo... you get a bunch of ports right? The XPS went down the Apple route and said "you only ever need USB-C"


I'm beginning to lean towards the Carbon for the ports etc :thinking_face: I'm really torn though... I care about performance and Linux friendliness too.


All Lenovo ThinkPad run Linux perfectly with excellent hardware support (Lenovo never use weird hardware). The X1 machines are predominantly aimed at the business market, so they have a good set of ports. You can also go for the T-series if you want even more ports


The X1 Extreme has pretty awesome performance. I have a 5 year old X1 Carbon with 8Gb ram that I use to simultaneously broadcast HD video to YpuTube and run several REPLs, dozens of chrome tabs, about 100 buffers in Spacemacs (I usually turn slack off, but would keep it on if I had 16Gb RAM).


Lenovos also have the best keyboards of any laptop availability today


I have an X1 Extreme


I am still VERY happy with this Dell XPS 13" Linux edition that I bottomed and reinstalled with Arch, FWIW @olical


I am 2 years in with it, pretty much now__ and it still feels brand new.


(full disclosure, I paid for 16GB RAM so it was a custom build - these days I think__ that they are all 16GB)


Also, battery is still pretty good FWIW - I can run a Clojure app and code on it and have a browser with a "million" tabs and can do that for 5-6 hours sometimes longer.


I chose the Lenovo x280 over the XPS 13 because it still had USB-A and HDMI (I'm also used to the pointing stick). I'm very happy with it, running Void Linux


some reviews said at the time that the battery life wasn' t great, but I can use it for 8 hours or so, when editing code and running stuff


@maleghast heroku works perfectly fine with aero, you shouldn't need to do anything strange on top


(found the code you're referring to, you can definitely restructure that so as to not have that problem - it would be much less painful too)


Thanks for the input, everyone!


JUXT use the Dell XPS 13 across the whole fleet. They're good as laptops go. Fairly stable, although you'll want to keep the linux-lts kernel installed as backup.


A little under-powered in the GPU dept perhaps 🙂 But most laptops are. Could have more CPU power too, but cpu v battery I guess. My usage is more similar to a desktop, so I'd probably prefer 1h of battery & a killer cpu but /shrug


I used to have the Lenovo X2xx's when I was at IBM and I liked them, ran Linux on them without problems.


tbh, I would love to get myself the thinkpad revival they did 😛 But that's not company policy... I don't think the power would allow me to justify it really. I just want it for the retro feel.


You should get one of those mutant Chinese Thinkpads from Shenzhen


I kind of want one but it would be pointless, really


What do people around here use for logging? I'm looking at timbre atm.


I stick to timbre, the more JVM / Java-ish logging scares the hell out of me.


actually clojure logging seems great


works fantastically

Ben Hammond14:07:04 with


works great, thank you 🙂


I personally try to avoid timbre like the plague


it’s ok, until it’s not

rickmoynihan14:07:08 with slf4j and log4j2 as a backend (which was built to improve on both log4j and logback) is what I’d recommend. Resist any urge to reimagine and improve clojure logging by thinking of it as clojure data or being a non global singleton. If you do these things you’ll be theoretically doing it right; but making your life, or the life of someone in ops even more miserable. Stick with stuff that works, and go with the grain of java logging however messed up it is, it’ll be better than anything you can do.


Thank you 🙂 I'm using now with slf4j (which I like :-))


works like a charm 😉


I'll have a lookg at log4j2


I switched to slf4j donkey's years ago


but perhaps time to look at log4j v2


the backend isn’t that important; use whatever you need to that works… though log4j2 is my default choice.

Ben Hammond15:07:44

isn't log4j2 == logback ?

Wes Hall15:07:46

JVM logging is an hilarious mess.


It is, which is why people need to stop trying to fix the unfixable, and making things worse, and instead just make do with the best solution available… which is essentially the above combination.

Ben Hammond15:07:40

bah I'm always catching myself out with

(into '() (range 10))
=> (9 8 7 6 5 4 3 2 1 0)
if you care about ordering always use a vector
(into [] (range 10))
=> [0 1 2 3 4 5 6 7 8 9]

Ben Hammond15:07:21

(map identity (range 10))
=> (0 1 2 3 4 5 6 7 8 9)

(mapv identity (range 10))
=> [0 1 2 3 4 5 6 7 8 9]


What’s wrong with just (range 10)? Or if you want to remove the laziness you can use (doall (range 10)).


@rickmoynihan - Maybe a silly question, but is there a practical reason why someone might opt to remove laziness?

Ben Hammond17:07:13

lazyness is bad when you have open file resources, for example

Ben Hammond17:07:47

also can leave you with head-retention running-out-of-memory headaches


It can but removing laziness by loading the whole sequence into a realised list in memory is essentially equivalent to head retention, and will also call memory head aches 🙂


This would have been my thinking too. That said, I know how knowledgeable both of you are when it comes to Clojure so 🙂

Ben Hammond08:07:09

the most reliable way I've found to avoid head-retention is to use transduce and (reify IReduceInint (which is just a fancy way to facade loop to make it look more functional)


I can’t argue with that


because you want to force effects, or in a dev context, you want to estimate performance independently of the work done in the seq.

👍 4

or you want the values in a data structure with different performance guarantees, e.g. a vector log/32 lookup instead of linear.

👍 4
Ben Hammond17:07:30

oh there's a bunch of transducers that I didn't bother writing here, so I was surprised when

(into '()
      (map #(decorate-recommended-single-category recommended-ids %))
      (filter (comp seq :ids)))
    (sorted-categories display_categories offers)))
modified the ordering

Ben Hammond17:07:57

I think the lesson here is > when would you choose to (into '() ? > and why? > surely you should choose a [] by default


> when would you choose to (into '() ? Given that clojure.core/reverse already exists, very rarely. You’d normally want: (sequence xf coll) or (seq coll) or something similar.


Lenovo X1 Extreme if you like 15" size laptop, or X1 Carbon if you want a 13" laptop (with a 14' screen). I am excited about the Lenovo X1 Extreme 2nd Gen, with Intel Core 9th Gen processor (8 physical cores - 16 virtual cores) - hopefully our currency doesn't devalue more before its available in the UK.