Fork me on GitHub
#off-topic
<
2021-05-14
>
borkdude09:05:47

am I right that you can't package the mysql driver with a redistributable app, due to the GPL license? just checking, I think this is the case

3
Stuart11:05:47

Compiling to native? I know with CLojure you can have Graalvm with certain restrictions, but the exes aren't exactly small.

šŸ‘Œ 3
borkdude11:05:55

The smallest image you can get with some Clojure in it is about 7-10 mbs. Including sci (Clojure interpreter) around 11. Clj-kondo is 34 megabytes, babashka around 80 (it includes lots of libs), clojure-lsp around 100, but lots of things can be done to keep the size of the binaries in check. These are imo reasonable sizes in this day and age (smaller than most node_modules directories I would bet)

clj 3
šŸ‘ 3
raspasov11:05:23

The node_modules for my React Native project is 450MB (which is stunning)

raspasov11:05:54

(But I guess not a fair comparison, the final artifact when said and done in the App Store is ~20MB)

borkdude11:05:34

Yeah, I mean, it's not like your'e running out of disk space with this kind of size in this day and age

šŸ‘ 3
raspasov11:05:45

Absolutely.

borkdude11:05:41

Is the final artifact in the app store also compressed in some sort of way?

borkdude11:05:55

Usually when you compress native images they become much smaller. e.g. bb is around 20mb zipped

raspasov11:05:22

Mmm, I assume, yes. Whatever automagic Apple does. I havenā€™t explored exactly.

raspasov11:05:55

The final output under :advanced for the index.js (contains all JS code for the app) is 1.3MB for my medium sized app.

raspasov11:05:29

I think the highest I ever saw that under CLJS :advanced is 3-5MB for quite a big app (many screens, e-commerce, etc)

raspasov11:05:42

But thereā€™s other supporting native code that the JS code calls into, etc (the React Native lib code + some libs frameworks). Unless you pack your app with all sorts native bloated libs/frameworks, itā€™s hards to exceed 30-40MB.

borkdude11:05:28

For mobile the size might matter more since it's often downloaded over a data plan

raspasov11:05:29

When you see an app in the app store thatā€™s not a game and is like 200MB, thatā€™s gotta be all sorts of tracking/framework bloat I assume in most cases.

raspasov11:05:42

Nowadays, it matters less and less. Mobile internet is generally fast. And the over-cellular limit that Apple has is 200MB.

raspasov11:05:06

I remember ~2012 or so. It used to be 20MB. You tried hard to stay under that šŸ™‚ .

borkdude11:05:38

Last time I tried to make an sbcl image it was around 35mbs for a trivial hello world

gklijs11:05:51

About graalvm, in https://www.kafka-summit.org/sessions/cost-effective-graphql-queries-against-kafka-topics-at-scale they discovered for their Micronaut app, a JVM build had 4 times the throughput of the GraalVM build. I knew it was expected to be less, but I didnā€™t expect it to be this much. I wonder if anyone has done a similar experiment with Clojure?

Aron11:05:44

4 times doesn't seem like much tbh

borkdude12:05:04

GraalVM is also a JVM and it comes with a tool called native-image. When building a native-image the compiler makes certain decisions that might not be optimal in certain scenario's. The enterprise version comes with a feature called profile-guided optimizations, so you can run the app and it will generate info which will be used during compilation for optimization.

borkdude12:05:55

If you are optimizing for high throughput you are probably not optimizing for startup time anyway, in that case it makes sense to just go with the JVM probably.

gklijs12:05:51

You miss the JIT optimisation. For their use case I can imagine there is a lot to win, since the Request/Response will be very similar for each call, which canā€™t be known at compile time. I want to run a similar test myself, but havenā€™t gotten around to it.

Aron12:05:22

well, graphql. i have not used it since 2015, i suspect it changed a lot, but i am not eager to try it out again.

borkdude12:05:25

> You miss the JIT optimisation So for tuning you can use the profile guided optimizations. https://www.graalvm.org/reference-manual/native-image/PGO/

šŸ‘ 3
gklijs12:05:43

Too bad you canā€™t try it for free.

borkdude12:05:02

If your company has a Java SE subscription you will get it for free

Stuart12:05:43

Anyone into watches?

Stuart12:05:01

I have a watch conundrum.

Aron12:05:43

I know a guy.

Stuart12:05:46

I really like the new white face stainless steel daytona, but getting one new from Rolex isbasically impossible as the waiting list is insane. like 5 years, unless you are the sort to spend six figures on watches with them.

Aron12:05:51

or two. or three

Stuart12:05:47

BUt I've found another good watch, that is an actual good watch internally from Tudor, and it looks almost exactly like a daytona. BUt I can't make up my mind if I bought that instead if I would end up hating it, because I would look at and just see that's nota Daytona, and I should get something completely different instead

Aron12:05:51

imagine if you are left alone on the Earth, everyone else dies or leaves

Aron12:05:59

which one you think you would wear more?

Stuart12:05:17

The Tudor. I love the white face, panda dial

Stuart12:05:50

the one that is impossible to buy v the one I could buy and have reasonably quickly

Lennart Buit13:05:51

The daytona is so lovely ā¤ļø

Stuart13:05:52

I know, I want one badly. BUt as a regular person I feel they are impossible to get. Second had are going for between 2.5 > 3x list price. I saw one second hand for ā‚¬30k

Lennart Buit13:05:55

You can also look at zenith, they have great chronos too

Stuart13:05:17

I got a new Zenith El Primero chronograph in December last year šŸ˜„ I love it!

āœØ 5
mpenet13:05:26

Sinn are quite nice alernative too

mpenet13:05:46

and I say that as a swiss citizen!

mpenet13:05:18

almost all rolex models are on waiting lists now it seems, you're better off with after-market maybe

Lennart Buit13:05:04

not chronographs, but I like what grand seiko is doing too

Lennart Buit13:05:14

also not swiss, if that matters šŸ˜›

Stuart13:05:45

also considering this, just as something completely different. Since I hear the new IWCs are all in house calibres again.

Lennart Buit13:05:38

oh, thats pretty too

Stuart13:05:58

yeah, case is bronze! So it might age quite nicely too as the bronze changes colour

borkdude12:05:48

I am considering an Apple watch to replace my ipod nano for listening to podcasts :P

Stuart12:05:20

do apple watches have enough storage to store mp3s?

Stuart12:05:30

or can you install something like spotify on them ?

Stuart12:05:18

i have gbs of mp3s on my phone but my phones headphone jack is broken

Stuart12:05:25

I still like getting music by buying mp3s

borkdude12:05:11

The SE has 32gb I read now

gklijs12:05:28

As long as the podcasts are one Spotify it should also be possible with some Garmin watches. But I wouldnā€™t advise it. I only use it for running/music and often have sync issues.

Stuart12:05:37

we really are living in the future, when a watch has 32gb memory. My first computer was like 150MB or something

gklijs12:05:12

My first mp3 player had 32mb šŸ˜†.

raspasov13:05:38

I remember a laptop from the 90s with 4MB hard drive.

raspasov13:05:56

Windows 3.11

Aron13:05:07

late 90s math teacher in school had to take apart one machine to use 8MB for installing the OS, but then it ran on 4MB

borkdude13:05:56

I also remember inserting multiple disks while installing an OS or "big program" one after another

Stuart13:05:41

I think my first install of maybe windows 3.1 was installed off multiple floppy disks

Alex Miller (Clojure team)13:05:45

for sure! Turbo Pascal was on like 10-12 floppies

caumond13:05:52

And even installation was not a given. I started on cpc, the loading of the program was required at each startup as the only persistance was the rom. No floppy only a tape !

Alex Miller (Clojure team)13:05:17

yeah, my first PC only had 360k floppies. I remember how chuffed I was when we finally bought a 20mb hard drive

borkdude13:05:05

If you would drill a hole in those, you could get 720k

borkdude13:05:19

if you had the right disk station (high density)

caumond14:05:21

I forgot that !! With manual writing in the file allocation table, and sequential files... a whole lost world

Christoffer Ekeroth05:05:09

My dad secured me a cracked copy of Warcraft 2 that came on 23 floppy disks (3.5") šŸ˜‰

Christoffer Ekeroth05:05:58

The enterprising hacker had used WinRAR to split up the game IIRC

Mno13:05:24

Feeling nostalgic? You can supposedly install windows 10 with floppies

Mno13:05:51

Oh wow that was compressed to the point of useless

raspasov14:05:36

Wow, are you sure thatā€™s not a meme? šŸ˜†

Mno21:05:57

I think I saw a Japanese version as well, but it may be I didn't do any research šŸ˜…

Lennart Buit13:05:27

I once compared windows 98 notepad with windows 8 notepad. The binary is about 4x the size, but, no extra features. I think its the logo in the about menu.

šŸ˜‚ 3
Lennart Buit13:05:28

Itā€™s size, unlike ā€˜modernā€™ apps, is measured in kilobytes

Aron13:05:12

to be fair, modern editors fulfill expectations way beyond what notepad was good for. At some point the problem with Windows was actually just that it included software other people wanted to ask money for...

Mno13:05:28

Higher res in the replies

Stuart14:05:20

I managed to get windows xp down to a pretty tiny size. I got pretty obssessive with it at one point, where I had a spreadsheet of every file on the machine and how much I had changed on each one. Down to the byte, like I was going into dlls and editing the strings and icons and stuff they had in them to remove absolutely everything my workflow didn't need. Obviously if you deviated from what I used it for it crashed horribly. But it was so small, fast and started up so quickly! I';m sure I had to hack around something that tried to stop you from messing with files in the windows/system/system32 folder. But it was literally trial and error, hack some stuff out of a dll or exe and try to reboot and hope it came back.

ā¤ļø 3
Stuart14:05:57

Oh, I still have some version of the spreadsheet on a really old hd! Ah, the days of winzip and an A-Z of tabs for files on the system and if it could be safely deleted or not

šŸ¤Æ 5
sova-soars-the-sora16:05:04

Looks like it is OK to put the GPL version with your project even a commercial project, provided you also add in the sourcecode to mysql.. according to this guy https://opensource.stackexchange.com/questions/8320/including-mysql-installation-with-commercial-application

borkdude16:05:51

it's not a commercial application

sova-soars-the-sora16:05:34

I think if commercial is OK, OSS would be ok de facto, non?

borkdude16:05:21

even if OSS is not GPL itself?

dpsutton16:05:23

my understanding is that commercial and non-commercial are immaterial. only license is relevant

sova-soars-the-sora16:05:42

You can e-mail oracle and ask them but i think according to this page you're all good 2 go https://www.mysql.com/about/legal/licensing/oem/

jkrasnay21:05:02

Some licenses have a specific ā€œclasspath exceptionā€ clause: https://en.wikipedia.org/wiki/GPL_linking_exception

jkrasnay21:05:19

Then thereā€™s the question of whether running a pod from Babashka constitutes ā€œlinkingā€. I would guess not, e.g. you can certainly run bash from Babashka via shell without thinking about bashā€™s license.

borkdude21:05:54

The linking is probably the pod code with the mysql driver

borkdude21:05:33

that it's a pod is kind of irrelevant, let's pretend I would add the driver to bb itself

jkrasnay21:05:36

Iā€™m also not sure whether a classpath exception, if it exists for the MySQL driver, works under GraalVM native compilation.

jkrasnay21:05:50

(this stuff is so complicated!)

jkrasnay21:05:51

Hrm, according to this page the GPL is incompatible with the Eclipse Public License 1.0: http://www.gnu.org/licenses/license-list.html

borkdude21:05:30

and the mysql connector falls under this exception. it's only not so clear to me what this means

jkrasnay21:05:51

That certainly did nothing to help my understanding of the situation!

borkdude15:05:34

does someone has an answer on this? ^

sova-soars-the-sora16:05:00

@qmstuart 5 years waiting list for a watch? If you've got the time... From traveling and flying a lot, I'd like to get a 24-hour watch like Svalbard https://svalbard.watch/pages/Svalbard_24-hour_watches.html I like the classy look of the singular hand

Alex Miller (Clojure team)16:05:23

how would you know how long it had been if you didn't have a watch?

sova-soars-the-sora16:05:14

rudimentary sun dial and notches in the totem pole?

Stuart16:05:26

Maybe that's what they rely on! "Where's my watch, I've been waiting years" "Sir, its' been 10 minutes, calm down..."

sova-soars-the-sora16:05:04

My good friend got a watch that buzzes/vibrates to remind him of stuff. You can program reminders and it's a little tactile sensation

sova-soars-the-sora16:05:44

Not as disruptive as <ring tone> or whatever. I also read months ago that amazone has buzz watches for their warehouse sprinters to alert them when to turn left/turn right šŸ˜®

Stuart16:05:54

I'd more expect Amazon to have collars that give their warehouse workers shocks šŸ˜„

sova-soars-the-sora16:05:18

kills brain cells, not good for long-term comprehension of commands

sova-soars-the-sora16:05:04

Looks like it is OK to put the GPL version with your project even a commercial project, provided you also add in the sourcecode to mysql.. according to this guy https://opensource.stackexchange.com/questions/8320/including-mysql-installation-with-commercial-application

sova-soars-the-sora20:05:26

Seeing a tweet about how the NHS covid-19 app helped stop the spread of cvid19... I'm thinking to myself... yeah people will use information provided them, but in our case only a handful of the population create apps and stuff. So in a way coders are the tiny enclave "stealing fire from the gods" and creating information paths for the rest of the world

sova-soars-the-sora20:05:50

There's self-organizing systems... and then there's the aqueduct and the need for water, for example.