- Speiser0 ( @Speiser0@feddit.de ) 70•11 months ago
Processors might no longer get twice as fast every few years, but now we can use the power of servers to write software that runs even slower.
- coloredgrayscale ( @coloredgrayscale@programming.dev ) 14•11 months ago
We can add caching so numbers that have been checked once can be quickly looked up from an inMemory database.
- noctisatrae ( @noctisatrae@beehaw.org ) 50•11 months ago
Why are you leaking your API key?
- nick ( @nick@midwest.social ) 100•11 months ago
*OUR api key
- noctisatrae ( @noctisatrae@beehaw.org ) 15•11 months ago
“Thanks mate, now I can just use it too”
Keys disabled
- Kata1yst ( @Kata1yst@kbin.social ) 48•11 months ago
Rofl. I just imagine OP furiously updating LinkedIn with “AI Programmer”.
- Endorkend ( @Endorkend@kbin.social ) 17•11 months ago
Have to say, this is not the most convoluted way of testing a simple thing I’ve seen in my years, not by a long shot.
- Corbin ( @Corbin@programming.dev ) English11•11 months ago
Don’t use OpenAI’s outdated tools. Also, don’t rely on prompt engineering to force the output to conform. Instead, use a local LLM and something like jsonformer or parserllm which can provably output well-formed/parseable text.
- Mastershelf ( @Mastershelf@lemmy.one ) 9•11 months ago
TIL Python dictionaries allow trailing commas.
- GBU_28 ( @GBU_28@lemm.ee ) English4•11 months ago
List
- dalegribble ( @dalegribble@beehaw.org ) 5•11 months ago
While there are not actually any trailing commas in the dictionaries present and you are correct to say the ones present are part of a list, you can also have trailing commas in Python dictionaries. OP might have researched “Python trailing commas” and learned that part.
Trailing commas are fantastic to reduce changed lines in
git
diffs. Makes life much better. Same thing with leading commas in SQL queries.- GBU_28 ( @GBU_28@lemm.ee ) English2•11 months ago
Yeh
- Ephera ( @Ephera@lemmy.ml ) 3•11 months ago
Yeah, I think, that’s only really JSON which is so pedantic about it…
- rimjob_rainer ( @rimjob_rainer@discuss.tchncs.de ) 7•11 months ago
yes of no
Not even valid json but compiler doesn’t complain
- GBU_28 ( @GBU_28@lemm.ee ) English3•11 months ago
What json
- luciole (he/him) ( @luciole@beehaw.org ) 3•11 months ago
I can’t even
- nickwitha_k (he/him) ( @nickwitha_k@lemmy.sdf.org ) 2•11 months ago
Quick! Make this a library, then encourage its widespread use. Nothing could go wrong. Who’s that behind me? No, one. No. It’s absolutely not node.js.
- EmperorHenry ( @EmperorHenry@discuss.tchncs.de ) 1•11 months ago
I don’t get this one.
Also, don’t use AI to write code. It’s a trap! It’s just going to steal your idea for the people who own the AI.