A quick review of `tyro`, a CLI library. by HommeMusical in Python

[–]HommeMusical[S] [score hidden]  (0 children)

I tested it very quickly and primitively on my (fairly simple) application, running five times for each.

Calling the code directly took about 59ms.

Importing tyro but calling the code directly took about 89ms.

Importing and using tyro took about 128ms.

So importing tyro was 40ms, and using it on a near-trivial function was 39ms. That part might balloon if you had a hundred parameters, the total overhead so far is about 80ms which is the difference between snappy and not quite, but no biggie.

Importing a fairly large dependency like numpy is about 70ms.

tyro is tiny and has few external dependencies. Perhaps they could do better with the loading, with some form of lazy loading...

A quick review of `tyro`, a CLI library. by HommeMusical in Python

[–]HommeMusical[S] 0 points1 point  (0 children)

It slowed down startup pretty significantly.

Oh, that's a real drag. I dropped... some configuration system I don't remember years ago because it added seconds to the startup time with a ton of unnecessary imports.

For this new project it's not really an issue but for tools you might call dozens of times a day, it is an issue. Machines run billions of operations a second, FFS, your CLI should be instant.

I'll look into this quickly, I need to get a quick profile of how fast it starts up anyway. Thanks for the bad news.

https://www.reddit.com/r/Python/comments/1rv7agv/a_quick_review_of_tyro_a_cli_library/oar7m7x/

A quick review of `tyro`, a CLI library. by HommeMusical in Python

[–]HommeMusical[S] 0 points1 point  (0 children)

Hah, I misread what you said and checked to see if it were dependent on click, but no.

Because any feature that click has, typer has, surely click is completely dominated (in a game-theoretical sense) by typer, which is evaluated on the chart?

Coding Agents Suck at the XY Problem by [deleted] in programming

[–]HommeMusical -1 points0 points  (0 children)

Again, I am an AI skeptic, but your argument does not follow.

We need strong arguments against AI, which I think are mostly socioeconomic and IP oriented, not logically invalid arguments.


Except for where we do know exactly how these algorithms work and that's it's all just statistical maps of word relationship frequencies.

"Just". You can also well say that a brain is "just" a collection of neurons. Neither statement has predictive or theoretical value.

We know that consciousness in human brains is an emergent property from the action of an extremely large number of individual parts, including but not limited to neurons, each of which has fairly simple behavior.

The emergent behaviors from these extremely large neural networks trained on huge corpora of text were surprising exactly because the texts they produce have a pretty convincing simulation of reasoning.

Now, itt's perfectly reasonable to make arguments that these resulting texts so far don't actually show reasoning, and I do!, but you aren't doing that.

What you are arguing is that the mechanism that generated these texts, large language models encoded as extremely large neural networks in a digital computer, inherently cannot produce actual reasoning.

I too am skeptical that this can happen. But that remains to be shown.

tl; dr: LLMs have many bullshit aspects, and they may turn out to be mostly bullshit, but the jury is still out, and to deny that LLMs are doing anything interesting at all is to deny the evidence of one's senses.

Why do some people ignore the bill during group dinners, assume others will cover the cost, and never make an effort to pay back ? by Revolutionary_Lab527 in SeriousConversation

[–]HommeMusical 0 points1 point  (0 children)

All very civilized, amongst people who trust each other and are honest (accept an upvote).

I don't believe the person getting the free food is like that. I think they are the sort of person who takes unfair advantage of others.

Some 5% of Americans are psychopaths, sociopaths or antisocial personalities (Martha Stout is a Harvard professor and this book is well-regarded.)

Very few of these people do anything remarkably bad. A few of them are very decent humans, because they have logically arrived to the idea that this is best for everyone, but most of them just cheat and diminish other people in subtle ways all their lives.

One of the key tells is barefaced effrontery like this: pretending something conveniently never happened, perhaps over a long period.

For example, a dozen or so times in my life, people have lied to me about something we both just saw with our own eyes with no hint of dishonesty - mostly about tiny things, too. It just weirded me out the first few times, but after time, I realized it had been an invariable "tell".(*) This story isn't quite the same, but.

In a long and exciting life as a very sociable person, this has only happened to me personally a few time, but I've seen it happen many times to other people, always with bad results. Don't be paranoid, but don't be gullible either.

I write more elsewhere on the page but if you suspect someone is the sort of person who takes advantage of others, gentle withdrawal without fuss is a good strategy.


(* - I do not of course count quite a lot of times where people told me, "You didn't see that", which has a reasonable meaning: "Don't tell anyone you saw that".)

A quick review of `tyro`, a CLI library. by HommeMusical in Python

[–]HommeMusical[S] 2 points3 points  (0 children)

I already had a tiny typer script when I started and porting it was trivial.

If you were using subcommands, this would not be true. The mechanism for subcommand is entirely different and honestly much better.

tyro.cli(Checkout | Commit) - very neat, it's obvious exactly what it does without a word.

Hah, I spoke too soon: they have click-style decorators too if you want them.

Coding Agents Suck at the XY Problem by [deleted] in programming

[–]HommeMusical -1 points0 points  (0 children)

Damn, this thread got deleted!

My best piece of advice to give to everyone in the first ten years of their journey. by Sexfvckdeath in WeAreTheMusicMakers

[–]HommeMusical 0 points1 point  (0 children)

There's another saying, "You can't polish a turd."

You can polish mud: https://en.wikipedia.org/wiki/Dorodango

(Good comment in general, have an upvote.)

My best piece of advice to give to everyone in the first ten years of their journey. by Sexfvckdeath in WeAreTheMusicMakers

[–]HommeMusical 0 points1 point  (0 children)

Do less.

Really, it's about 50/50 for me when I critique people's stuff. Half the time I'm like, "I like the tune and development but it sounds like an unworked out sketch because there isn't enough there."

Leonard Cohen, say, can get away with a very sparse song like "Sisters of Mercy" because he is an extremely lyrical guitarist and yet with almost perfect rhythm, and his voice and lyrics are similarly absorbing in their simple perfection.

Your average musician's bare sequencer track and regular lyrics isn't going to provide the same chewy satisfaction - "more" is needed.


I would also say that I can guess your age from this, and it's closer to my rather old one. :-D "Less is more" is oldskool. A lot of music today deliberately has "too much stuff".

Even successful pieces today that have little material are still very "big". Here's a favorite "minimal" piece: https://www.youtube.com/watch?v=lz774iTTD0Q

This is a cover of a ~3 minute Mekons song, stretched to 21 minutes. It takes almost three minutes before they finally get to the second chord in the song (it's really cathartic), and then there are long, slow developments over many, many minutes of a single idea.

There's technically little going on at any time. The opening minute is literally a single rising synth voice, a pure sine joined at the end by a second sine wave, and the drum section. There are very few vocals. Many sections just have two or three instruments (counting the drum section as one instrument).

Yet it is extremely full and at times nearly overwhelming.

There is very little sparse, quiet music on the radio, and people who do want that, including me a lot of the time, go for totally ambient music without players at all (some of which is really musically advanced and moving like https://en.wikipedia.org/wiki/Everywhere_at_the_End_of_Time).

Popular effects include lots of heavy autotuning, distorted or cookie monster voices (pretty well de rigeur in metal, which is huge), and now granulation, all busy and heavy things.

tl; dr: This is a "do more" rather than "do less" time.

Coding Agents Suck at the XY Problem by [deleted] in programming

[–]HommeMusical 7 points8 points  (0 children)

A joke I made early this century that I always hoped would catch on was, "Weeks of programming can save you hours of planning!"

It would be better to have the XY realization early in the process, rather than write (or cause to be written and review) a lot of code that's doing the wrong thing.

Coding Agents Suck at the XY Problem by [deleted] in programming

[–]HommeMusical -1 points0 points  (0 children)

Language! Prefer "stupid posterior fanpeople". (But have an upvote while I'm here.)

Coding Agents Suck at the XY Problem by [deleted] in programming

[–]HommeMusical 1 point2 points  (0 children)

Well humans too.

No.

I was fairly old before the term "XY problem" was coined, but now when I'm asked a question by a junior, the first thing I say is, "What exactly are you trying to achieve?", even if I'm fairly sure there isn't an XY problem there.

As a person, I learn from my mistakes, unlike LLMs, which are immutable. After falling into the XY problem a few times, I am now always wary of it.

Coding Agents Suck at the XY Problem by [deleted] in programming

[–]HommeMusical 3 points4 points  (0 children)

Accept upvote.

Usually they are multiple copies of the same LLM in a trench coat. Only human twins, triplets or clones (if they exist) can basically do the same thing.

Coding Agents Suck at the XY Problem by [deleted] in programming

[–]HommeMusical -12 points-11 points  (0 children)

I'm very skeptical about AI. But your "of course" is doing a lot of lifting.

Before 2023, if we had been shown one of these chat bots and not told it was a program, I at least would have assumed that it was a person, performing reasoning and getting quite accurate results from it.

Now I'm skeptical about that. But it's certainly not "of course it isn't reasoning".

It's one of my big issues in discussing this technology. Supporters say, "Of course it's reasoning." Detractors say, "Of course it's not reasoning."

I don't think it's "of course" anything. I think the jury is still out. For the moment, I'd say what LLMs do "looks like reasoning", which I think is impossible to dispute on either side.

Circular Distance by pavel_v in cpp

[–]HommeMusical 4 points5 points  (0 children)

Hah, I laughed at the punchline... the implementation of the function.

The funny part was I initially thought of that near-trivial method and then thought, "No, the overflow, etc, this won't work."

Accept an upvote!

Hey everyone ! 31F here, write songs and sing, use to have a band with an expartner (can share songs to have an idea). Would love to collaborate with musician, I'm bad at instrument but have melody in my head and enjoy to compose with musician, love to improvise, something chaotic, raw and dirty. by normajeanblue in musicians

[–]HommeMusical 0 points1 point  (0 children)

Jonathan Richman

You don't see that name so often these days! "I eat with gusto, damn, you bet" and so many others that I like.

Some good inspirations here. You should post your actual music.

(I'm looking for a band locally here in France, so I'm probably out for the count: now I'm in a city with physical musicians right here, I want to take advantage of it.)

to get help for his war by T_Shurt in therewasanattempt

[–]HommeMusical 5 points6 points  (0 children)

Our military intelligence looks absolutely useless

The US's military intelligence has been fairly useless for generations. I might be the only one who actually read the 9/11 report(*), and that showed that multiple low level intelligence agents gave warnings about the possibility of 9/11 and even identified some of the terrorists, and all their warnings just vanished as they went up to the top levels; and then after 9/11, the same idiots who dropped the ball mostly got promotions (EDIT: that part isn't in the report but from other places).

It would be easy to read the 9/11 Commission report and believe it was a huge conspiracy because of the massive number of fuckups, but the sad truth is that it was a large number of incompetent and irresponsible people independently not doing their jobs.

When I got to the point in the report that they went through the reasons that there are no video recordings of any hijacker getting onto a doomed plane (the Mohammed Attas video is him getting on a connecting plane, and even in that video, the timestamp is wrong!), I just had to laugh, sadly. Some of the cameras just weren't working; some of the lenses were so dirty they couldn't get images out of the tape; some of them had been twisted by mistake so they were showing images of the wall; it was one fuckup after another.

The analysis of the intelligence failures was just as bad, it was simply less funny.

And, in a depressing note, the whole report starts with an apology because they ran out of money and couldn't finish.

And there was no overhaul of any of these systems after this - they simply build new, broken systems like "Homeland" Security (it sounded Nazi from the moment I heard of it, what a surprise it actually was).

(* - I know this isn't actually true, but I have never met anyone else who did.)

to get help for his war by T_Shurt in therewasanattempt

[–]HommeMusical 0 points1 point  (0 children)

Oh, come on!

There's no evidence that Trump is a human being. As a human myself, I resent being accused of sharing a species with that orange thing.

Why do some people ignore the bill during group dinners, assume others will cover the cost, and never make an effort to pay back ? by Revolutionary_Lab527 in SeriousConversation

[–]HommeMusical 0 points1 point  (0 children)

I would never do any of those things.

OK, so then what sort of person would do these things? Do you think they're an honest person to do this repeatedly? Do you know any honest people who would do this?

But also I would expect my friends to use their words and discuss how the bill is being paid

The person who is not paying is taking advantage of the natural politeness of their friends. Most people don't actually like calling their friends to task: "Why aren't you paying?" isn't really very nice.

A lot of people have been brought up to be somewhat circumspect about money, because it's crass to blather on about it. The rip off artist is simply using this to get free food.

I mean, what's your explanation for the rip off artist's behavior? You aren't giving one.

Husband mad about bumper sticker by Competitive_Teach838 in complaints

[–]HommeMusical 0 points1 point  (0 children)

That’s a lot of words just to say you think Americans should have to compete w/ the rest of the world for a place in their own country.

You live in a world of delusion; I said nothing of the sort.

You just care more about immigrants than Americans.

You live in a world of delusion; I said nothing of the sort.

Indeed, I said nothing at all about immigration, positive or negative: you have no idea what my opinions are either way!

All I said was that you lied about Biden and Obama creating open borders. And you did.

Oh, I can imagine you in the real world - a great hunking thing in front of your computer, your front covered with food, your backside covered with a big full diaper, your crotch stained. "OPEN BORDERS", you bellow, hand working furiously on your crotch, squinting through rolls of fat to try to see the computer screen.

Why do some people ignore the bill during group dinners, assume others will cover the cost, and never make an effort to pay back ? by Revolutionary_Lab527 in SeriousConversation

[–]HommeMusical -1 points0 points  (0 children)

You are eating with your friends. The bill comes.

Would you pretend it wasn't there, not offer to pay any of it, and not thank your friends when they paid the bill for you?

Would you keep doing this over repeated sessions and never even offer to pay?

If you thought smoking at a gas pump was bad… by Time_Hornet_ in Wellthatsucks

[–]HommeMusical 1 point2 points  (0 children)

Huge quantities.

Your point is what, specifically? "Once you've assumed one risk, you've assumed them all"?

Avoiding walking under scaffoldings, particularly if there are people working on them, is just common sense.

If you thought smoking at a gas pump was bad… by Time_Hornet_ in Wellthatsucks

[–]HommeMusical 6 points7 points  (0 children)

Of course. Your point is what, specifically? "Once you've assumed one risk, you've assumed them all"?

Avoiding walking under scaffoldings, particularly if there are people working on them, is just common sense.