Fork me on GitHub
#off-topic
<
2022-09-28
>
Stuart12:09:53

Anyone know of any issues with Clojure dev on M1 in general ? I'm considering a new Mac Studio.

Martynas Maciulevičius12:09:07

For me in my 2014 mac I can't use SSHFS to compile files onto a remote machine because it's incredibly slow. I also had problems to install it.

dharrigan12:09:20

A few in our team use a MBP M1 for Clojure development. Now that there are aarch64 builds of the JVM available, it's been pretty seamless and painless.

dharrigan12:09:16

The only thing we had to do, is when using Docker, is to use linux/amd64 for our builds as we deploy to linux VMs.

👍 1
slipset13:09:49

No problems

Rupert (All Street)13:09:58

@U013YN3T4DA what's leading you towards a mac studio? Whilst M1/M2 is great in notebooks, for desktops there is strong competition. With new AMD 7000 series, Intel 13th gen and NVIDIA 4000 series all coming out right now - a linux or Windows desktop would likely have more power than a Mac Studio for less. A couple of weaknesses with all macs for programming (not just M1/M2) - poor text rendering means that high resolution monitor is required + disk access is pretty slow which can affect compiling large clojure projects. I also noticed the same @U028ART884X that SSHFS is pretty slow on macs.

Martynas Maciulevičius13:09:27

(I meant I was trying to do that on my own home private network, there shouldn't be any problems with speed here... (it was wifi, but let's be precise how slow it is))

Rupert (All Street)13:09:16

Yes @U028ART884X - I had the same issue - no matter how I tuned SSHFS it was slow on mac even over gigabit network. It's much better on linux.

Stuart13:09:41

I have a couple of reasons. 1. I don't like Windows. 2. I currently use Ubuntu and Linux, and that's my preferred OS but I can't get Photoshop and Lightroom to work on linux at all, so that nudged me towards a mac. 3. I would prefer a laptop than a Mac Studio 100%, but my setup is 3 monitors at home and I'm reading (although maybe I'm wrong), that a MBP can't support 3 external displays. Whereas the studio can support upto 5 external displays (AIUI). 4. I'd like to future proof a lot if possible. So 64GB RAM is nice. 5. I use EMACS a lot and it runs terribly on windows. Completely unusable, especially org-mode

👍 1
Stuart13:09:42

The downside is the price, a Mac Studio at the spec I want 64GB RAM, 1TB SSD is £2700, which is a lot of money (to me, anyway)

Stuart13:09:17

The reason I don't like windows is, I still dont' think WIndows terminal is anywhere near as nice as stuff like Terminator on Linux. Clojure dev I have to do via WSL2 as I just can't get Clojure to work well on Windows, and I quite like not having to worry about stuff viruses (or at least not worry as much).

Stuart13:09:39

Maybe a better solution would be to get a good spec windows machine (yuck), and dual boot to linux, but then its finding something where I would be 100% certain that there wouldn't be driver issues for the linux side... And then just use Windows for the Adobe stuff

Rupert (All Street)13:09:58

Macbook Pros can have 3 monitors + laptop display at once. https://www.apple.com/uk/macbook-pro-14-and-16/specs/. GeekBench single core performance: MacStudio single core gets a a nice 1753 score, but a new AMD 7950x gets 25% more (2217).

👀 1
Rupert (All Street)13:09:01

Unlike laptops, linux on desktop usually have no driver issues at all. Agree that WSL2 is not as performant as linux - clojure builds can take twice as long. That may be less of an issue on a powerful machine with new SSDs (e.g. PCIE4/NVME).

Rupert (All Street)13:09:12

MacStudio or Macbook laptops have a premium price but are great machines though.

Martynas Maciulevičius13:09:23

If you buy a laptop for linux then look for non-Nvidia or Nvidia-with-mux-switch. Don't buy muxless laptops because you'll lose your battery life completely. You'll get that 5 additioal frames in games but it doesn't matter. IMO it's better to have more than 3 hours of battery than 5 additional frames. Edit: I have made this mistake with tuxedocomputers, they don't offer good laptops with Nvidia cards. If you buy any don't buy with a card. I basically use mine as a stationary. It's fast and pricy, but it's almost a stationary.

👍 1
Stuart13:09:15

I prefer to game on my PS5 🙂 Last thing I want after working all day at my desk is to then hav t o sit at my desk to play a game!

Rupert (All Street)13:09:41

Obviously very dependent on your situation, but if you aren't using photoshop and lightroom already - then do consider if there are any other alternative software compared to picking up a 20 GBP per month Adobe subscription + having to use apple mac or Windows. For 1,300 GBP you could have a powerful self build linux desktop. Then buy a cheap Windows laptop for 500 GBP (or refurbished M1 MBA for 730 GBP) if you need portability sometimes.

v3ga14:09:37

I’d argue everything has a premium price these days. Apple isn’t the most expensive and we need to be honest. And the current macs, moderate/high priced laptops are outperforming $4000 desktops right now for half the price.

enn14:09:49

I’ve been developing on M1 and M1 Pro Macbooks for a little less than a year and it works well. Make sure you are using an ARM JVM, it will be much faster than using an x86 JVM in emulation.

Rupert (All Street)14:09:26

@U06FM9QN9 - apple is good value on the laptop side - great design, powerful specs and good battery life. However there is strong competition to Mac on the desktop side and there is a lot of new hardware coming out of the next few weeks including "AMD 7000 series, Intel 13th gen and NVIDIA 4000 series" which let you get a more powerful machine for less money. I mentioned an example earlier "GeekBench single core performance: MacStudio single core gets a a nice 1753 score, but a new AMD 7950x gets 25% more (2217).".

Annaia Danvers14:09:41

My experience as a Clojure dev on an employer-provided M1 Mac has been: • the battery life is stupidly good. I had the thing out taking notes through all of Strange Loop and then left it in a bag all day Sunday and on Monday morning it was at 49% • There are going to be things that break on ARM, both in Clojure and elsewhere. The minicosm demo wouldn't build without errors because of some broken dependency. Factor just straight up doesn't have an ARM port yet (though it's in the works). Support isn't universal and Rosetta is not that great frankly. A lot of CLI stuff just won't work in Rosetta and the stuff that does is dog slow sometimes. • As someone who otherwise uses Windows and Linux, the input differences drives me INSANE. My modifiers are all in the wrong order, home/end/page don't work, my mouse inexplicably gets less DPI under MacOS, common OS-level shortcuts are just similar enough to confuse me constantly ... it all adds up to constant little irritations and failures of context switching that frequently make me want to hurl this thing into the sea.

👍 1
1
eggsyntax15:09:04

> A couple of weaknesses with all macs for programming (not just M1/M2) - poor text rendering means that high resolution monitor is required + disk access is pretty slow which can affect compiling large clojure projects. This hasn't been my experience FWIW > As someone who otherwise uses Windows and Linux, the input differences drives me INSANE. My modifiers are all in the wrong order I swap them around to be optimal for me using http://karabiner-elements.pqrs.org/ (free & very powerful).

eggsyntax15:09:20

I have a Mac Studio and have been very happy with it. I use that box first and foremost for making music, and the only issue I've had is that some old software (eg old audio plugins) won't run under rosetta. I do my dev on an M1 MBP and it's been painless for Clojure. I do have to do some python and have encountered problems here and there with that; in particular because of some python libs not having M1-native versions, I've had to add a separate version of homebrew that runs under rosetta. That's been a pain in the ass for sure, but has probably cost me ~5 hours overall (which includes writing a bunch of documentation on dealing with M1s for other folks at my org), and much of that is because we rely on the official python lib for a particular commercial DB that's notorious for dragging their heels and being kind of crappy (eg following their full current documentation would require running on python 3.8 and python 3.9 simultaneously :face_with_rolling_eyes:). Not much of an apple fanboy and in some ways would rather be running linux, but existing software investments (for the Studio) and work conventions (for the MBP) have made me go with Macs for now, and in general I've felt good about that. And battery life and speed have both been superb, which is nice.

👍 2
Oliver George06:09:56

I've got at M1. It's lovely but some compatibility issues are super frustrating for me. I didn't expect that Windows in a VM to use VS would be a problem. Also, React Native app dev is problematic to setup due to arm64 issues. Not seeing those are key concerns for you but worth noting that arm64 comes with baggage for devs.

👍 2
eggsyntax15:09:36

Looks like the front-end is ClojureScript?

p-himik15:09:45

And the backend is in Clojure: https://github.com/penpot/penpot

👍 2
Annaia Danvers15:09:18

Win big by being the only alternative 😄

Noah Bogart15:09:44

that's so cool

dharrigan18:09:43

They have another open source tool that I'm going to look at (https://www.taiga.io/) Also in Clojure(script)

Akiz16:09:38

Hi folks, does somebody have an experience with https://github.com/rabbibotton/clog? If so, what in the world of Clojure comes closest to this?

Akiz16:09:53

@UEENNMX0T Clog is web oriented.

Akiz16:09:31

The thing is that CLOG seems to me like a great tool for prototyping (somewhere between nocode and classic web frameworks), but maybe my impression is wrong, and the efficiency with reframe is comparable.

Noah Bogart17:09:09

So it’s like electron? Building a desktop application gui in a browser window?

Akiz17:09:27

It’s more than an electron. Elixir, Phoenix and LiveView are probably better comparisons.

👍 1
phronmophobic18:09:18

That sounds sorta like https://www.hyperfiddle.net/, although I haven't used either.

vonadz16:09:54

Anyone have an easy way of emulating Safari (browser) on Linux (I'm using Arch, but can setup a VM for other distro), that doesn't require setting up a Mac VM or buying something?

p-himik16:09:25

Do you mean a proper Safari or just some WebKit browser?

vonadz16:09:03

Well ideally Safari, because I know the bug I need to fix exists on that browser, but I'm open to testing other WebKit browsers.

p-himik16:09:52

When I have layout issues, https://wiki.gnome.org/Apps/Web is usually enough. But yeah, for more involved stuff I have a VM...

vonadz16:09:37

Yeah I just tested Web after you mentioned it and it doesn't have the same bug.

vonadz16:09:52

Did you have to jump through extra hoops for setting up the Mac VM?

vonadz16:09:10

I did a cursory glance online and it looked more involved than just downloading an image and throwing it into boxes or something.

vonadz16:09:50

Hmm, looks like I found some iso images actually

p-himik17:09:50

Some time ago, I just found a guide on how to set up a VirtualBox VM for MacOS. Don't have the link anymore though. It's quite slow but it works.

👍 1
souenzzo17:09:35

@U03QQS7341W there is online providers of mac remote access, that you pay per hour of use.

vonadz18:09:15

Checking free options first

Igor Garcia08:09:46

@U03QQS7341W if you have the ISO available the best option in my opinion is to use QEMU / KVM (plus virt-manager in case you want a fancy UI to manage that). Please feel free to message me in private if you need help. I haven't tried it with a MacOS iso but it should work just fine.

Igor Garcia08:09:20

(I'm a Debian user BTW)

vonadz00:09:16

Okay I'll try it out and update here how it goes.

mauricio.szabo14:10:02

QuickEmu (with quickgui) works really well to virtualize a mac from scratch

vonadz19:10:56

Oh sweet, thanks! This looks like exactly what I need.

dharrigan18:09:17

All written in Clojure(script)

dharrigan18:09:30

omg! Ha!

😆 1
dharrigan18:09:41

I'll remove my post. That'll teach me to scroll up first! 🙂

didibus20:09:40

Question to Monad experts. If I have a List of Monad, and I need a List of the elements inside the Monad. So like List of Monad<E> needs to become Monad of List<E>. How would that work?

Brennan Holten20:09:07

You do this with Traverse. This is common in the Scala world (e.g. turning a List[Future[T]] into Future[List[T]]. https://www.scala-exercises.org/cats/traverse

didibus20:09:26

Ok, so if there was a function that takes a List<T>, and you have a List<Future<T>>, you'd first call traverse on it?

Brennan Holten21:09:03

yep, that's the gist of it 😄

👍 1
didibus21:09:06

Just what I wanted thanks