off-topic

https://github.com/clojurians/community-development/blob/master/Code-of-Conduct.md Clojurians Slack Community Code of Conduct. Searchable message archives are at https://clojurians-log.clojureverse.org/
Faris 2020-11-12T03:10:00.378700Z

For those of you who came from OO languages (especially Ruby) I’m sure you’ve heard of POODR (Practical Object Oriented Design in Ruby). What would be a Clojure/functional equivalent?

gklijs 2020-11-12T12:04:35.380800Z

Not sure what your looking for exactly, but the component library helps with stateful things, and ordering. https://github.com/stuartsierra/component

Faris 2020-11-12T12:18:42.381100Z

Sorry, I think I wan’t clear, POODR is a book that teaches OO design with Ruby, I was wondering if there was a similar book in Clojure

gklijs 2020-11-12T14:06:32.381500Z

But for OO or functional? Because in general you want to prevent creating objects/keeping state with ‘idiomatic’ Clojure as much as possible?

Faris 2020-11-12T14:24:07.382700Z

For functional programming

dgb23 2020-11-12T14:25:28.382900Z

I don’t know about one such book, but you may want to look at: Programming Clojure (The Pragmatic Programmers), Elements of Clojure and The Joy of Clojure.

dgb23 2020-11-12T14:27:08.383100Z

Generally OO is used very sparingly in Clojure code. The core idioms are: data driven/oriented, functional, macros, REPL driven development.

2020-11-12T17:03:14.391800Z

@hewrin I think "Eelements of Clojure" by Zach Tellman might be what you want, it has general advice for clojure program design (which isn't quite OO)

Faris 2020-11-13T02:03:19.429200Z

Thanks for the suggestions @denis.baudinot and @noisesmith! I’ll check them out

1👍
gklijs 2020-11-12T12:04:35.380800Z

Not sure what your looking for exactly, but the component library helps with stateful things, and ordering. https://github.com/stuartsierra/component

Faris 2020-11-12T12:18:42.381100Z

Sorry, I think I wan’t clear, POODR is a book that teaches OO design with Ruby, I was wondering if there was a similar book in Clojure

gklijs 2020-11-12T14:06:32.381500Z

But for OO or functional? Because in general you want to prevent creating objects/keeping state with ‘idiomatic’ Clojure as much as possible?

2020-11-12T14:21:14.382600Z

I remember seeing a talk given by stu halloway about cognitect.anomalies, anyone happen to know if that video is out there somewhere? Can't seem to find it on google

Faris 2020-11-12T14:24:07.382700Z

For functional programming

dgb23 2020-11-12T14:25:28.382900Z

I don’t know about one such book, but you may want to look at: Programming Clojure (The Pragmatic Programmers), Elements of Clojure and The Joy of Clojure.

dgb23 2020-11-12T14:27:08.383100Z

Generally OO is used very sparingly in Clojure code. The core idioms are: data driven/oriented, functional, macros, REPL driven development.

pithyless 2020-11-12T14:32:06.383700Z

@jjttjj I think this is the one you're looking for: https://youtu.be/oOON--g1PyU?t=1181

2020-11-12T14:33:27.383800Z

that's it, thanks!

2020-11-12T14:54:28.387700Z

I'm consuming a websocket api from clojure that receives hundreds of messages per second. I've tried out a few clojure websocket clients (backed by jetty or java9 websocket client) as well as trying minimal wrappers on these java libraries, and would experience frequent disconnections, every 5-10 minutes. Then I tried out aleph, which is backed by netty, which almost never disconnects. Is there some reason aleph or netty might be inherently more robust here? or might there be some better way to configure the other libraries?

2020-11-12T17:03:14.391800Z

@hewrin I think "Eelements of Clojure" by Zach Tellman might be what you want, it has general advice for clojure program design (which isn't quite OO)

seancorfield 2020-11-12T17:03:48.392600Z

@jakub.zika-extern I would expect a lot of code builds the connection strings dynamically at runtime, so I'm not sure what you'd be able to regex for...?

Jakub Zika 2020-11-12T17:10:06.394200Z

@seancorfield I accidentally deleted the message. For anybody interested: I asked about parsing out connection string from compiled class files… Thank you Sean. I thought that. I am just trying to analyze bunch of running jars and I am not sure where to beggin.

2020-11-12T17:10:34.395Z

If they were literal strings in the Java or Clojure source code, though, they are likely to appear that way in the .class files inside of a JAR file. That would be true even if the Clojure code was AOT compiled into .class files. If it wasn't, then the Clojure source files themselves typically appear directly in the JAR files.

1👍
2020-11-12T17:11:29.395800Z

JAR files are zip files, and you can use a utility like 'unzip' to expand their contents into a whole directory structure of files that are packed up inside them.

2020-11-12T17:11:58.396200Z

Also commands like jar xvf foo.jar if I recall correctly.

alexmiller 2020-11-12T17:28:13.396900Z

for fast hacks, see good old unix strings

1👍
lilactown 2020-11-12T17:33:59.398Z

Curious how Clojure will install and run on the new M1 macs. Any experience reports so far?

2020-11-12T17:34:16.398200Z

ARM jvm is pretty dismal

2020-11-12T17:34:26.398500Z

it works, but it's much worse than x86

dpsutton 2020-11-12T17:34:43.398900Z

Even Amazon’s?

2020-11-12T17:34:46.399100Z

(this is generally, eg. on my pinebook pro)

2020-11-12T17:35:21.399700Z

I haven't tried Amazon's JVM - is it somehow ARM optimized in a way others aren't?

alexmiller 2020-11-12T17:35:50.400400Z

I think the work to support it well is still ongoing isn't it?

alexmiller 2020-11-12T17:36:03.400700Z

https://openjdk.java.net/jeps/391

2020-11-12T17:36:10.401Z

I hope so - it's just not up to par in my experience...

alexmiller 2020-11-12T17:36:29.401700Z

new EA build

2020-11-12T17:36:41.402Z

It would make perfect sense if the number of person-years put into JVM JIT for x86 is an order of magnitude greater than for any other CPU instruction set

2020-11-12T17:37:49.403Z

yeah, I don't think anybody's hyper-optimized JIT is as good on ARM as x86, because everyone that wants power uses x86

alexmiller 2020-11-12T17:37:57.403200Z

interesting how the mac stuff is primarily building on work done by microsoft to support windows

2020-11-12T17:38:38.403800Z

the other big platform where people don't just recompile everything for new architectures :D

2020-11-12T17:39:32.404700Z

Which part of the mac stuff is building on microsoft stuff? I haven't looked into the details yet, other than to see that of course Apple has Rosetta 2 for binary compatibility of applications that haven't been recompiled yet.

2020-11-12T17:39:54.405200Z

I'm a huge ARM fan, I think it's great in the big picture for the x86 monopoly to fall (in every space, not just low power / mobile)

Ben Sless 2020-11-13T15:07:09.445Z

Wrt DSP plenty of ARM SOCs come with proprietary DSP modules which perform well enough as external accelerators. I doubt even low end smartphones do any DSP today in their CPU cores.

2020-11-13T17:16:19.445800Z

@ben.sless I'm thinking of dedicated devices, like the Eventide H9000, which contains 4 separate multi core ARM boards

2020-11-13T17:16:36.446Z

and all it does is DSP

Ben Sless 2020-11-13T17:20:55.446200Z

From looking at its spec, the DSP engines are mentioned separately. My guess is that the ARM CPUs are just ancillary to the DSP cores. (i.e. 4 CPU cores and 4 DSP cores on a single SOC). You still need a CPU to read from memory and stream data to the DSP cores themselves.

2020-11-13T17:24:53.446400Z

I don't see DSP coprocessors (I might be looking at the wrong spec), link?

2020-11-13T17:25:43.446600Z

I also see things like ", as new, more powerful ARM chips become available, the H9000’s DSP modules can be upgraded" which strongly implies the ARM chip is doing the work

2020-11-13T17:26:05.446800Z

there are IO modules but those are just for connection to other devices

Ben Sless 2020-11-13T18:04:30.447Z

They don't write it down anywhere, it's more of a semi-educated guess based on my past experience as an electrical engineer, including working on ARM SOCs with DSP and ML accelerator modules.

alexmiller 2020-11-12T17:40:39.406700Z

if you see that jep above it depends on the windows jep. and that macos release above is a microsoft build

2020-11-12T17:41:14.407500Z

I even started learning Aarch64 assembly, in the hopes I could contribute to some JIT project(s), but that came with a bunch of CS and practical experience I have to backfill before I'm proficient

dpsutton 2020-11-12T17:50:24.409700Z

I had to step out for a second but was asking about Amazon’s as they’ve done work on the graviton2 arm platform and it’s supposed to be great

2020-11-12T17:51:59.409800Z

x86 has had so near 0% market share in smartphone space, and smartphone sales have increased so dramatically in the last decade relative to platforms where x86 is dominant, that its overall percentage of CPU sales has shrunk due to those facts alone.

2020-11-12T17:52:18.410Z

Understood that you are wishing for x86 market share to shrink in server space as well, which of course might still happen.

seancorfield 2020-11-12T18:04:11.412400Z

I'm grey enough to have lived through both the 680x0 -> RISC transition and the RISC -> x86 transition with Apple and they managed both of those surprisingly well, but quite a few software vendors dropped Mac OS as a supported platform during those transitions each time so it'll be interesting to see what happens with x86 -> ARM.

seancorfield 2020-11-12T18:06:17.413800Z

(At this point tho', I'm kinda "done" with Apple -- although my main dev box is a 2012 iMac, my last two laptops have both been Windows and my next main dev box will be as well, and I switched to Android this year after years of iPhones)

2020-11-12T18:16:02.415Z

it will be interesting to see how the native aarch64 jdk performs vs. the x86 jdk using their translation layer

2020-11-12T18:16:49.416300Z

right - ARM software is currently well optimized for power usage (what you'd want on mobile), but less often for raw throughput (what you'd want for a server or a DSP device for example...)

dpsutton 2020-11-12T18:16:58.416900Z

i saw an interesting tweet that stated apple's arm chip could be faster with x86 emulation than native x86 due to being able to manipulate when memory barriers were enforced. gonna try to find it

2020-11-12T18:17:25.417400Z

like, if the aarch64 jit is so terrible, and the x86 one is so good, could translating x86 to aarch64 smoke the native aarch64

2020-11-12T18:18:07.417900Z

I am still waiting for a mill though

chucklehead 2020-11-12T18:27:44.419900Z

my main clojure-related inconvenience after several months of using aarch64 on windows/wsl has been javafx support. Hoping that will change with Apple and MS taking more interest.

alexmiller 2020-11-12T18:57:31.420400Z

so openjavafx doesn't work? or works but is buggy/slow? or something else?

chucklehead 2020-11-12T19:02:04.421100Z

openjfx on aarch64 doesn't include swing components

chucklehead 2020-11-12T19:04:56.421700Z

or web/media

alexmiller 2020-11-12T20:00:05.422300Z

thx, good to know

chucklehead 2020-11-12T21:22:46.423900Z

practical implication being I haven't figured out a way I can use REBL, but x64 emulation is supposed to be coming soon for Win10 so that should give me more options

alexmiller 2020-11-12T21:30:50.424100Z

that's why I was asking :)

2020-11-12T22:29:44.425800Z

What I really wonder about the new macs if they will even support OpenGL

2020-11-12T22:30:10.426400Z

Apple has been pushing Metal, and consider OpenGL deprecated

ghadi 2020-11-12T22:30:44.427400Z

AWS Graviton2 is a huge motivation now ^

ghadi 2020-11-12T22:30:57.427800Z

will push openjdk perf more than apple silicon macs

chucklehead 2020-11-12T22:32:10.428Z

There's some mention of it on the JEP ticket for Windows: https://bugs.openjdk.java.net/browse/JDK-8248238?focusedCommentId=14356900&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14356900 and then I think this is promising news from Gluon: https://gluonhq.com/javafx-on-embedded-an-update/ but the current early access that appears to include the UI components is still only arm32 😕

2020-11-12T22:38:57.428300Z

OpenGL and Vulkan are definitely on the bucket list of tech-I’d-like-to-play-with

2020-11-12T22:39:13.428500Z

But, macs are pretty abysmal for that it seems 😞