Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
mystes
May 31, 2006

Internet Janitor posted:

what i find most annoying on the rare occasions i need to write a python script is that the stdlib, while reasonably comprehensive, is completely scattershot in its approach to everything. it's even odds that a given module will expect an imperative style (bang on these magic functions and mutable values in sequence), a functional style (everything makes new copies of stuff), or a pointlessly object-oriented style (instantiate a parser whatzit, set fields to configure it, call a method and get back some other inscrutable piece of crap instead of just giving me the data)

for a glue language it is remarkably inconvenient and awkward to glue together the parts that come in the box
My experience with glues not actually adhering to the surfaces I want them to half the time suggests that it is actually a very realistic glue language

Adbot
ADBOT LOVES YOU

Share Bear
Apr 27, 2004

yeah there isn't a consistent style on everything (logging really bothers me as a "magic" imperative state thing) , most stuff seems to have static methods or generators to accomodate imperative or functional stuff p easily though

theres prob a more specific example that demonstrates the dysfunction

Cybernetic Vermin
Apr 18, 2005

a matter of age though. not too hard to roll with it, especially considering how rich the overall ecosystem is. and hats off to the dev team learning a lesson from the idiotic 2to3 debacle now not loving old code over much.

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



pathlib is so much better than os.path

but iirc theres still a couple things you need the latter for lol

Share Bear
Apr 27, 2004

Zlodo posted:

I'm working on a small python script (not by choice, its a photoshop script part of a tool we're making and the people who will end.l up maintaining it wanted it to be in python ) and I disagree, it's complete crap

like I have a bunch of helper functions and want to move them to a separate .py file and I ended up having to mess with paths and poo poo because the module system is loving convoluted

if you wanna snack overflow this into the everyday programming thread id be glad to attempt to help

Athas
Aug 6, 2007

fuck that joker

rjmccall posted:

what a weird way of putting this from someone who iirc actually works on compilers. you might as well be asking why apple disabled fortran for aarch64. like there’s a turnkey perfect openmp implementation that we just spitefully set on fire


If I do 'brew install clang' I get a clang with OpenMP that works fine. Is there a ton of subtle bugs I'm not noticing, and which motivates Apple to turn off the upstream support in the clang shipped with macOS?

I'm not talking about supporting all the fancy new accelerator offload features, but just the old-school core features - presumably that's what's supported upstream anyway.

This isn't related to the ARM switchover btw; I recall colleagues with x86 macbooks complaining about this ten years ago. I didn't pay much attention myself until I had to help students get OpenMP working on their macOS machines. One additional wrinkle is also that if they do 'brew install gcc', running 'gcc' is still probably still going to actually run Apple's clang wearing a fake moustache, rather than GCC. I can deal with it, but I really see people who are less used to compiler bullshit struggle.

Athas
Aug 6, 2007

fuck that joker
Actually beyond just cathartic ranting, I was curious about whether it's because Apple has some kind of bizarre beef with whoever stewards OpenMP, like I heard they have with Khronos.

distortion park
Apr 25, 2011


Share Bear posted:

yeah there isn't a consistent style on everything (logging really bothers me as a "magic" imperative state thing) , most stuff seems to have static methods or generators to accomodate imperative or functional stuff p easily though

theres prob a more specific example that demonstrates the dysfunction

matplotlib

from their docs:
code:
import matplotlib.pyplot as plt
import numpy as np

fig, (ax1, ax2) = plt.subplots(2, 1, layout='constrained')

dt = 0.01
t = np.arange(0, 30, dt)

# Fixing random state for reproducibility
np.random.seed(19680801)


nse1 = np.random.randn(len(t))                 # white noise 1
nse2 = np.random.randn(len(t))                 # white noise 2
r = np.exp(-t / 0.05)

cnse1 = np.convolve(nse1, r, mode='same') * dt   # colored noise 1
cnse2 = np.convolve(nse2, r, mode='same') * dt   # colored noise 2

# two signals with a coherent part and a random part
s1 = 0.01 * np.sin(2 * np.pi * 10 * t) + cnse1
s2 = 0.01 * np.sin(2 * np.pi * 10 * t) + cnse2

ax1.plot(t, s1, t, s2)
ax1.set_xlim(0, 5)
ax1.set_xlabel('Time (s)')
ax1.set_ylabel('s1 and s2')
ax1.grid(True)

cxy, f = ax2.csd(s1, s2, 256, 1. / dt)
ax2.set_ylabel('CSD (dB)')

plt.show()

distortion park fucked around with this message at 18:00 on Jan 12, 2024

Cybernetic Vermin
Apr 18, 2005

that particular insanity has leaked out from somewhere entirely different though

Share Bear
Apr 27, 2004

yeah thats not stdlib, i make no excuses for every python scientific library being the ways they are

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
if apple includes a feature in a toolchain we distribute, it becomes a supported apple product. that puts us on the hook to maintain it and presumably make a ton of stuff better. we currently do not want to do that with openmp because it seems like a lot of work. similarly, if someone wrote a fortran compiler, and we started shipping it, it would become our fortran compiler, and we do not currently want to maintain a fortran compiler

if there’s an open source compiler for openmp that meets your goals of “literally just accept the code so that my students stop annoying me, i don’t give a gently caress about quality, performance, or even completeness”, then great, go use that. again, i don’t see the difference between this and fortran. but that is not the standard we would hold ourselves to for an actual product, so we don’t ship it ourselves

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



rjmccall posted:

we currently do not want to do that with openmp because it seems like a lot of work

:agreed:

prisoner of waffles
May 8, 2007

Ah! well a-day! what evil looks
Had I from old and young!
Instead of the cross, the fishmech
About my neck was hung.

Arcteryx Anarchist posted:

julia just isn’t going to happen

:agreed:

julia has a lot of interesting ideas but it seems like “unit tests”, “correctness”, and “stable behavior” are extremely low priority compared to all the fun neat stuff.

there was a “why I’m not going to do julia any more” blogpost that got some reach and even that writer, talking about inconsistency/bugginess/etc, didn’t reach for what seems to me the most obvious form of constructive criticism: many of these are things that test suites would let you catch

Cybernetic Vermin
Apr 18, 2005


tldr "we don't wanna and your can't make us" which is fair enough but that sure is a wordy paint

Arcteryx Anarchist
Sep 15, 2007

Fun Shoe

Athas posted:

If I do 'brew install clang' I get a clang with OpenMP that works fine. Is there a ton of subtle bugs I'm not noticing, and which motivates Apple to turn off the upstream support in the clang shipped with macOS?

I'm not talking about supporting all the fancy new accelerator offload features, but just the old-school core features - presumably that's what's supported upstream anyway.

This isn't related to the ARM switchover btw; I recall colleagues with x86 macbooks complaining about this ten years ago. I didn't pay much attention myself until I had to help students get OpenMP working on their macOS machines. One additional wrinkle is also that if they do 'brew install gcc', running 'gcc' is still probably still going to actually run Apple's clang wearing a fake moustache, rather than GCC. I can deal with it, but I really see people who are less used to compiler bullshit struggle.

now use spack :getin:

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
you can also just install libomp with brew and build with clang -Xclang -fopenmp rather than building your own copy of clang

prisoner of waffles
May 8, 2007

Ah! well a-day! what evil looks
Had I from old and young!
Instead of the cross, the fishmech
About my neck was hung.

quote:

My experience with the language and community over the past ten years strongly suggests that, at least in terms of basic correctness, Julia is not currently reliable or on the path to becoming reliable. For the majority of use cases the Julia team wants to service, the risks are simply not worth the rewards.

Ten years ago, Julia was introduced to the world with an inspiring and ambitious set of goals. I still believe that they can, one day, be achieved—but not without revisiting and revising the patterns that brought the project to the state it is in today.

he also gives literally 10 years of julia community posts going “ah, we’ve solved the problems that people have been complaining about, clear sailing from here on out”, lmao

mystes
May 31, 2006

I'm not convinced that julia has a good reason to exist

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

Cybernetic Vermin posted:

tldr "we don't wanna and your can't make us" which is fair enough but that sure is a wordy paint

well the words you didn't read are explaining why we don't want to which is the point of answering the question but go off

Cybernetic Vermin
Apr 18, 2005

mystes posted:

I'm not convinced that julia has a good reason to exist

tons of good design decisions underlying it, i would challenge most to use it and not find it 90% excellent. issue is that it is not making any progress on the 10% that is garbage and at this rate the ecosystem is rotting and community getting weird as a result. bdid warned me early, i did not listen, and now i have a deeply regrettable julia codebase

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Cybernetic Vermin posted:

tldr "we don't wanna and your can't make us" which is fair enough but that sure is a wordy paint

?? someone asked about the reason, and your distilled quote is hardly “a reason” that someone would be looking for

Cybernetic Vermin
Apr 18, 2005

rjmccall posted:

well the words you didn't read are explaining why we don't want to which is the point of answering the question but go off

i did absolutely read it, but chose not to in detail comment on the overarching implication about the comprehensive support apple offers for their carefully curated dev tools

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang





ooooo :allears:

Athas
Aug 6, 2007

fuck that joker
Apple can ship something and if it is broken or users ask for more features, Apple can just ignore them. That's how it always works, and it is super befuddling that OpenMP is a special case that must be left out, because otherwise Apple is honour bound to maintain it perfectly. I seriously don't get it. macOS had tons of old and unmaintained things (like OpenCL or OpenGL or the entire loving shell after FSF switched to GPL3 until maybe recently) and that's... fine? They still worked better than if they weren't there, and clearly Apple is able to just tell people who complain about the broken CPU OpenCL device to gently caress off (or rather, not say anything at all).

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003
my apple compiler toolchain experience: "we disabled some features and added some new ones, but you'll never know about any of it because you don't work for apple. ignore the built in stuff and install the open source version with homebrew if you want it to work like stackoverflow says it does"

Cybernetic Vermin
Apr 18, 2005

but also: nah, just loving around, i wouldn't want to take on the extra support either. it is *hardly* a reveal as a reason though.

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
alright, well, i guess i'll answer questions here less

Athas
Aug 6, 2007

fuck that joker
Well, thanks for letting me know it's at least a technical decision (which I may not agree with), rather than OpenMP being ideologically haram in some obscure way. I couldn't find any official Apple documentation on this.

Cybernetic Vermin
Apr 18, 2005

obviously this is not that, but, man, remember your own personal encounter with the random "vendor" gcc 2.95? that was a long-running blight, gcc dev had fully stagnated and everyone had their own snowflake random assortment of patches

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

egcs will save us again

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



rjmccall posted:

alright, well, i guess i'll answer questions here less

pls dont make important decisions on a friday imo :justpost:

tef
May 30, 2004

-> some l-system crap ->
feel like i'm reading the steam forums and it's a thread about lazy entitled devs who could just simply ship a product

Arcteryx Anarchist
Sep 15, 2007

Fun Shoe

Carthag Tuek posted:

pls dont make important decisions on a friday imo :justpost:

FlapYoJacks
Feb 12, 2009
Rust if you need a compiled binary.
Python if you want to get work done quickly.

fritz
Jul 26, 2003

Cybernetic Vermin posted:

obviously this is not that, but, man, remember your own personal encounter with the random "vendor" gcc 2.95? that was a long-running blight, gcc dev had fully stagnated and everyone had their own snowflake random assortment of patches

that was a p. dire time

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

there but for the grace of god go I, forums poster dijkstracula, the compiler dev working on a language that mercifully nobody cares about

additionally:

Carthag Tuek posted:

pls dont make important decisions on a friday imo :justpost:

2Fast2Nutricious
Oct 4, 2020

how do you even become a compiler developer? i dont even know what skills you need to have to be one

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

in my particular case I owe it all to having once been able to hyperfocus on the minutiae of x86 SIB offsets, and years later parlaying that into one (1) conversation about instruction selection to a real compiler dev who had headcount

nowadays I'm working far enough up the stack that none of those things have any bearing on what I currently do

Athas
Aug 6, 2007

fuck that joker

2Fast2Nutricious posted:

how do you even become a compiler developer? i dont even know what skills you need to have to be one

You take a standard compiler course (or don't) and then you get hired to work on one, and have to spend a while learning how the local compiler is structured. They're just programs like any other. In many ways they are probably easier to work on than large enterprise programs, because at least they solve pretty well-defined problems, and there's some pretty good foundational theory for how they're supposed to work.

Adbot
ADBOT LOVES YOU

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

it’s just software, you can get entry level positions in the field. there aren’t as many compilers being built as there are fart apps, though, so there’s some scarcity

writing a basic compiler isn’t that hard, and there are good books/courses/guides on it. there’s also a program to help newbies start to work on rustc, specifically

a bit of self-loathing helps too

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply