There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

programmer_humor

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

abbadon420 , in Old timers know

Did it for the first time two years ago. It was for my parent’s business website. I see nothing wrong with this method.

Seasm0ke , in Old timers know

Cries in REST API

yeather , in Someone escaped the Matrix

Don’t be fooled he’s going out there to hsck tractors now.

Kowowow ,

Spend years automating small farm tasks that take minutes

uis ,
uis , (edited )
starman , in COMEFROM
@starman@programming.dev avatar

Looks like C# 12 interceptors:


<span style="color:#323232;">[InterceptsLocation(@"C:testappProgram.cs", line: 4, column: 5)]
</span>

I know it looks awful, but it’s not intended for direct use, but rather for source generators for native ahead of time compilation.

andrewlock.net/exploring-the-dotnet-8-preview-cha…

match , in Someone escaped the Matrix
@match@pawb.social avatar

ooh, has anyone made something that transfers ownership of unmaintained codebases via bug bounty? like a sword-in-the-stone for critical fixes?

Daxtron2 ,

Just fork it

fibojoly , in Someone escaped the Matrix

One of my colleague is leader of the team managing our internal software systems, but also a potato farmer. Somehow.

abbadon420 ,

I have some chickens and some cows. It’s easy to combine small scale with wfh. Just need to move soemwhere with land and wifi.

uis ,
state_electrician , in Someone escaped the Matrix

Farming is god-awful if your livelihood depends on it. I’d rather be a carpenter or a metalworker once I’m fed up with that computer stuff.

uis ,

Wielders are paid close to programmers in my country

onlinepersona , in COMEFROM

I honestly thought C++ (aka dumping ground of programming concepts) would implement this for “completeness”.

Anti Commercial-AI license

NeatNit ,

They should add it in C++26

uis ,

C++60

schnurrito , in COMEFROM

TBH I fail to see the significant difference between this and a function declaration.

sxan ,
@sxan@midwest.social avatar

Doesn’t it steal control flow? More like a break point, except you define where execution continues.

I wonder if it’s a compile error to have multiple conflicting COMEFROM statements, or if it’s random, kind of like Go’s select statement.

How awesome would it be to be able to steal the execution stack from arbitrary code; how much more awesome if it was indeterminate which of multiple conflicting COMEFROM frames received control! And if it included a state closure from the stolen frame?

Now I want this.

davidgro ,

I wonder if it’s a compile error to have multiple conflicting COMEFROM statements

I think there’s at least one INTERCAL implementation where that’s how you start multi-threading

palordrolap ,

I'd say it's more like setting up a handler for a callback, signal, interrupt or something along those lines.

Function declarations by themselves don't usually do that. Something else has to tell the system to run that function whenever the correct state occurs.

That doesn't account for unconditional come-froms.¸but I expect there'd have to be a label at the end of some code somewhere that would give a hint about shenanigans yet to occur. Frankly that'd be worse than a goto, but then, we knew that already.

polonius-rex ,

it's semantic

at the end of the day everything boils down to sequence and branchifs

magic_lobster_party ,
print(A)
print(B)
hello: print(C)
print(D)
print(E)
comefrom hello
print(F)

This will print A, B, C and then F. D and E will be skipped because of the comefrom.

sudo ,

Its like if subroutine bar could say its going to execute at line N of routine foo. But if you were just reading foo then you’d have no clue that it would happen.

You can simulate this effect with bad inheritance patterns.

Cethin ,

A function will be called by code and go to that point in code. To implement functions, you store necessary things to memory and goto the function definition. To implement that with comefrom you’d have to have a list of all the places that need to call the function as comefroms before the function definition. It’d be a mess to read. We almost never care where we are coming from. We care where we’re going to. We want to say “call function foo” not “foo takes control at line x.”

umbrella , in COMEFROM
@umbrella@lemmy.ml avatar

am i the only dumb fuck here who unironically likes this?

would make goto type situations much more usable

MindTraveller ,

It’s basically a simpler version of a callback

Cethin ,

I don’t see any case where this is better than a goto. A goto you can read progressively though. A comefrom you’d see written then have to track to that piece of code and remember there’s a potential hidden branch there.

Thcdenton , in COMEFROM
RustyNova , in University Students

It’s not that bad. It definitely helps in long functions.

I’m an advocate for code commenting itself, but sometimes it’s just better to comment on what you’re doing, and in those cases it helps to over commentate.

Instead of letting the reader interweave code reading and comment reading, I think it’s better to do either. Either you go full self describing code, letting the reader parse it as code,m, or you abstract everything, making it more of an explanation of your reasoning, and abstract lines that may look too complicated.

Not every comment needs to be useful, but I still write them to not have this switch between reasoning and thinking in code. It can also double as rubber duck debugging too!

match ,
@match@pawb.social avatar

sometimes it’s just nice to remember a human wrote a thing

lowleveldata , in break fast 🥣 move things 🛒

but what about the auto tests

hydroptic ,

Management said that writing tests takes too much time and eats into the time that could be used to write features for the app, so they decided that we’re not writing tests. They were always green anyhow

themusicman ,

“They were always green”. I wish

match ,
@match@pawb.social avatar

“also, there was only ever one and it just asserts true”

Anticorp ,

Tests are for nerds.

hydroptic ,

Programming is also for nerds.

Therefore, tests are for programmers.

Brkdncr , in Nobel Prize to Be Awarded to Forum User From 9 Years Ago With Same Niche Problem

What I really hate is when I search for a problem I’ve seen off and on for a few years and the search results is exactly the issue im experiencing.

Great!

Only to find out after chasing that link that it was me who posted that question, 4 years ago, and it’s still unanswered.

SuckMyWang ,

Do you remember if you got an answer?

AlecSadler ,

What would be even more wild is if you edited/replied to yourself and said, “nvm figured it out”…only to later discover it and not remember what you did

Brkdncr ,

That guy sucks.

feannag ,
bitchkat ,

I had an issue years ago with a tv and a dvd player. For whatever reason, whenever the dvd player was connected, the tv would blank out every few seconds. At some point I posted on the tv manufacturer forums. I did eventually figured out that I leave a thumb drive connected to the tv, the problem disappeared. I wanted to let people know about my work around. I got 1 result – the forum post I had made quite a while back.

I’m pretty sure it was an HDCP issue.

downpunxx , in Nobel Prize to Be Awarded to Forum User From 9 Years Ago With Same Niche Problem

jellygiggler69 rules, i'm so happy for her

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines