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.

amanaftermidnight , in Schrödinger's date format

This is why I don’t get why the 9th of November is such a big deal.

dukk ,

Are you kidding? They opened the Berlin Wall!

Speiser0 ,
dingleberry , in Microsoft Edge could use a win

Gee Bing. You really are pathetic. Respect yourself dude.

somegeek , in What's your most obscure binding?

I map caps lock to esc with setxkbmap. Much more fun ergonomically.

Nefrace ,

I use caps for switching languages instead of alt+shift or super+space.

Very efficient thing when you need to use your native language and some code in one text message or code block.

NateSwift ,

Where do you have that running? I set it in my i3 config and it never takes properly on my laptop. On my desktop I ended up just doing it in hardware because it was easier

somegeek ,

It works great in i3config but in gnome I have problems with it.

TheGiantKorean , in Microsoft Edge could use a win
@TheGiantKorean@lemmy.world avatar

People might have used it if MS didn’t try cramming it down peoples’ throats, and if they didn’t add so much bling.

glibg10b ,

And Bing

SnipingNinja ,

I gave it a try because I kept reading how it’s so good on tech subs on reddit, turns out it’s worse than Chrome… and it only got worse (with the Bing AI stuff, which was supposed to be even better)

I now think those redditors might have been astroturfers.

TheGiantKorean ,
@TheGiantKorean@lemmy.world avatar

I’ve been using SwiftKey, but they had to go and add a Bing button to it… I never use it, but just having it there feels gross.

gearheart , in Microsoft Edge could use a win

Next time edge is going to ask… what are you going to do? Install Google chrome? 😂

Ddhuud , in It's a mass extinction event

Because the only possible thing to do in c# is unity stuff…

.

.

.

fuck_u_spez_in_particular ,

I mean why else would you want to use C# when there’s Rust 🦀 and all the awesome tooling and libraries around it…

duxuev ,
@duxuev@lemmy.world avatar
areyouevenreal ,

Rust really isn’t all that. Plus C# is used for all kinds of corporate stuff where Rust levels of performance aren’t needed. It’s also used in several other game engines

Wooki , (edited )

Security, performance and most importantly, security. .net updates every week to address security vulnerabilities, stability and enhancements. While the language is lower you just can’t overstate poorly c# lasts. C# Deprecation and dated code make for a pretty high maintenance and frustrating ecosystem at the best of time.

areyouevenreal ,

It being updated frequently just shows it’s being regularly maintained and improved.

C# has many of the same security and safety advantages that Rust does given they are languages with memory management and other safety features built-in.

Rust has exactly the same problems with depreciation as many Frameworks rely on experimental features which are subject to change.

Edit: plus if you have ever used Rust it’s a pain to learn and use compared to C#. C# is so similar to Java and so much easier than C++ that it’s really not much of a jump for programmers new to the language.

Wooki , (edited )

.net is not secure, it’s so far from secure it’s a joke. 503 security patches this year alone, that includes one for each windows version but you get the point.

areyouevenreal ,

Do you not think Rust also has security flaws? At least Microsoft patch theirs.

fuck_u_spez_in_particular ,

There are of course security flaws, we’re humans after all. Unless the compiler and the language can be proven mathematically correct at least.

But as described above, in practice the security flaws are easier to isolate in Rust compared to C# IME. The current story of security flaws in Rust is quite good so far.

areyouevenreal ,

The current story of security flaws in Rust is quite good so far.

That means nothing without knowing who said it. I find it hard to believe it’s anymore secure the C# without security research saying so. It’s a very complex language from what I understand with a lot of moving parts. It’s also dependant on external frameworks in a way that C# just isn’t. If you have a problem with .net there is a company behind it who is responsible. Who is responsible for actix web or seaorm?

fuck_u_spez_in_particular ,

Learning curve is steep in the beginning, I agree (I wouldn’t argue painful though, maybe if you have to unlearn bad practices, like interior mutability though etc.).

But I think it pays off after some time. I’m now faster in Rust than in C# with similar experience, and the quality of the code is definitely higher as well (which can be credited to the strict kinda opinionated design of Rust IMO).

It composes really well, better than most (non-functional) popular languages. I think this is probably the Sell for Rust, as it additionally works remarkably well over the entire stack (kernel -> frontend) (in each abstraction level might be better/easier to use languages to be fair though).

areyouevenreal ,

What’s interior mutability and why do you think it’s bad?

I might have another try at rust some time in the future. I think I tried it in a bad situation having to use it for a web microsevices project when I had limited knowledge of the language. If it had been another language I probably would have been able to pick it up in the time frame required. Using it did cost me in terms of grades, and it was a poor decision to use that language at that time.

The main things I struggled with were all the borrow checking and asynchronous stuff, as well as the lifetimes concept. I still don’t understand how you are meant to specify object lifetimes. In C you assign and free things manually, in Java and Python it’s done mostly automatically, in C++ you choose manual or automatic when it’s assigned. In Rust it seems it’s automatic until the compiler can’t figure it out and then it becomes manual, which is frankly bizarre.

fuck_u_spez_in_particular ,

Rust has exactly the same problems with depreciation as many Frameworks rely on experimental features which are subject to change.

Rust has actually quite a good record with depreciation and backwards-compatibilty etc. They are changing the language in non-backwards compatible way over editions, but the changes are mostly very manageable.

But to not end up being another C++ (syntax-wise it’s a disaster IMHO), a few non-backwards-compatible changes every few years are the way to go, when it’s manageable.

areyouevenreal ,

What’s so confusing about C++ syntax exactly? To me it seems to make a lot of sense given the languages history.

fuck_u_spez_in_particular ,

I’m not speaking for Rust level performance. I’m using Rust nowadays, because it’s generally doing a lot right, that other popular languages struggle with IMO.

Think about error handling. I think even Java is better here than C#. I think it’s quite a mistake, not being required to add all possible exception types that a function can throw to the function signature.

Then the next thing, I really hate about almost every popular language is implicit . To be really safe, you have to check every (non-primitive) variable for null before using it, otherwise you have a potential NullPointerException.

Then take pattern matching, this is a baked in feature of Rust from the beginning and it does this really well (exhaustive matching etc.). There’s “basic” pattern matching in C#, but it just doesn’t really feel right in the language, and is not even close in capability compared to Rusts.

All of this (and more) makes Rust the less error-prone language, which I can say with confidence after long experience with both of these languages (both > 5 years).

I’m honestly not sure why exactly C# was chosen for most of the games, but it’s probably because it’s relatively good to embed, is relatively strong-typed, while being somewhat performant (compared to something like python or other scripting languages).

brezelradar ,
@brezelradar@feddit.de avatar

Yea, there are 50 game engines written in rust - or so I heard.

jmcs , in Schrödinger's date format

That’s a trick, it’s actually ISO 8601.

lambalicious ,
1984 , in Microsoft Edge could use a win
@1984@lemmy.today avatar

Microsoft tried to make a browser that had an edge, and they just decided fuck it and gave it the name Edge.

PotjiePig , in Microsoft Edge could use a win

I was getting a bit annoyed at Firefox and after recently formatting my PC, I decided to freshen things up. So after the mandatory new PC Edge Google, I must say I’m really enjoying the new UI of Opera.

Now I use Opera as my main driver, Firefox for the things that Opera struggles with, and Edge is there too.

SomeBoyo ,

Opera is spyware

Feyter , in D or d come on

I don’t get it… “D” is a complete different character than “d” is.

It’s like wondering why “file1” is not opened when I typed in “file2”.

1984 ,
@1984@lemmy.today avatar

People want their computers to magically know what they want these days. :)

This specific problem doesn’t exist in oh-my-zsh config though. It will find the directory even if spelling it like this.

PupBiru ,
@PupBiru@kbin.social avatar

“magically know what they want” aka occasionally set you and your files on fire

i prefer not fire

schnurrito ,

On Windows filenames are case insensitive at least usually, some people are used to that. But that is poor design for so many reasons, Turkish I being one of them.

user224 ,
@user224@lemmy.sdf.org avatar

Now take Android. Files are case-sensitive yet you can’t create 2 files with same name if they only vary in case.

Reil ,

One of the most pointlessly annoying things I’ve had to deal with was trying to move a process made for Linux onto a Windows MINGW/cygwin-type environment where one of the scripts would generate “.filename” AND “.FileName” files. :|

lemmonade ,

You could also say that down should not complete to download since those are completely different strings and you shouldn’t expect one to get you the other.

Feyter ,

Sorry, down is a substring of download I don’t get your point either?

Honytawk ,

Substring is not string.

If they were interchangeable, then “D” & “d” should be too.

Feyter ,

down matches down* because * also includes empty string. Also download matches down*

D matches D* but d is not matching D* because D is a different character than d.

lemmonade , (edited )

but why do we have to match specifically against substr*? it’s not a law of nature, we could also match against the regex (?i)substr(?-i).*

not saying that one option is necessarily better, but I don’t see a good reason for which any one of these options would be terrible

Feyter ,

Because usability. If you have the files down down1 down2 downxyz and download and the user only knows that it was “something with down” it’s best to show the user everything matching “down*” and let the user decide what’s the correct one.

Also I’m not sure but wouldn’t your expression show everything if only one character would be entered?

And again I don’t see this solving anything if the entered string actually contains other characters then what’s in the file (D != d)

Yes one could argue that some form of advanced algorithm or even AI could be used to identify such use case like download and Download but this is programming Humor, not linguisic Humor.

lemmonade ,

would it not be usable to have completion be case insensitive? I seem to be able to use that… if I only remember “something with down”, I could just as easily forget the capitalization of “down”. maybe I have downloads and Down? why not show everything matching case insensitively and let the user decide what’s the correct one?

I didn’t really understand what you thought the regex did incorrectly, but I think the regex works fine, at least for most implementations, anyways what I meant is just a case insensitive version of the regular substring completion, which shouldn’t be too difficult to make.

The only thing it solves is the frustration of having to look for a file/directory twice because you didn’t remember it’s capitalization. again, those are different characters just like a do and downloads are different strings, but it can be easier for users if they can just press tab and let the computer fill the part of the name the don’t remember (or don’t want to type).

you don’t need an advanced algorithm or and AI, there are many easy ways to make completion case insensitive (like that regex for example). Issues involving names are inherently somewhat linguistic, but either way interactive shells are meant to be (at least somewhat) usable to humans, and as seen by the post, some people would prefer completion to be case insensitive.

Swedneck ,
@Swedneck@discuss.tchncs.de avatar

that’s not how language works though, in human language (i know this can be confusing) d and D are the same letter just in different forms.

It’s one thing to have case sensitivity in programs doing data manipulation, that makes sense because you don’t want the program to accidentally use the wrong files without supervision.

But when you have an interactive prompt you know what you’re doing, you can see if you entered the wrong directory, and you’re generally going to be working in directories that you have yourself organized.

4am ,

Doesn’t tab completion solve this if there are no alternatives with matching case? sounds like a PBKAC

bleistift2 , in They Need To Stop Doing This

There are really few problems that are “impossible.” That is, if you count those customers/managers are interested in. All the rest is just “I’ll need 10 years, 230 million Dollars and a research team”

https://feddit.de/pictrs/image/ba87cf8b-7482-452d-9bc1-273a5abb3dbb.png

XKCD 1425 by Randall Munroe. License: CC BY-NC 2.5

Pistcow ,

What is a bird!?

unreachable ,
@unreachable@lemmy.world avatar

insert “bird isn’t real” meme

lugal ,

Bird watching goes both ways

Swedneck ,
@Swedneck@discuss.tchncs.de avatar

a miserable little pile of secrets

ryven ,
@ryven@lemmy.dbzer0.com avatar

Diogenes bursts into Dracula’s throne room while holding a chicken.

AngryCommieKender ,

Plato bursts into Dracula’s throne room holding a lantern and a mirror

Pistcow ,

Throws water bowl

xigoi ,
@xigoi@lemmy.sdf.org avatar

“The other programmers keep accidentally writing code that ends up in an infinite loop. I’d like you to make a program that can reliably detect that.”

elvith ,

You may joke, but if I had a penny for every time someone asked me to solve a problem, that basically boils down to the halting problem, I’d be rich.

randon31415 ,

I have always wondered why the answer to the halting problem isn’t: “If no output has been returned in X time, BREAK, restart program from beginning.”

Shalaska ,

Because that will fail to detect a program that halts in X+1 time. The problem isn’t to detect if a program that halts halts, the problem is to generally create an algorithm that will guarantee that the analyzed program will always halt given an infinite time running on an infinite computer.

randon31415 ,
Brainsploosh ,

But you could also do a mean time analysis on specific tasks and have it cut off at a standard deviation or two (90-98% of task times covered), and have a checkbox or something for when the user expects longer times.

You could probably even make this adaptive, with a cutoff at 2x the standard time, and updating the median estimate after each run.

niartenyaw ,
@niartenyaw@midwest.social avatar

what if it needed just one more second to complete?

WhiskyTangoFoxtrot ,

Damn Vogons.

xigoi ,
@xigoi@lemmy.sdf.org avatar

Yeah, accidentally running into the halting problem is common in automatic code analysis.

PoolloverNathan ,

It’d be nice if we wrote something to detect it running into the halting problem.

drcobaltjedi ,

I was recently tasked with the traveling salesman problem on a project. My first pass was quick but produced sloppy inefficient results. Well boss didn’t like it so he had me go back at it again so it would be far more accurate. Well now it slogs through figuring out an optimal solution of several thousand points.

jeff ,
@jeff@programming.dev avatar

A full solution to the halting problem can’t exist. But you can definitely write a program that will “reliably” detect them to a certain percentage.

And many applications do exactly that. Firefox asked me today if I wanted to stop a tab because it was processing for too long.

bleistift2 ,

That’s not even close to solving the halting problem. FF doesn’t check if the program has been in its current state before. It literally just checks if 10 seconds have passed without JS emptying its event loop.

jeff ,
@jeff@programming.dev avatar

Right. There is no solution to the halting problem, that’s been proven. But you just showed you can very easily create a way of practically solving it. Just waiting for 10 seconds does it. That will catch every infinite loop while also having some false positives. And that will be fine in most applications.

My point is that even if a solution to the halting problem is impossible, there is often a very possible solution that will get you close enough for a real world scenario. And there are definitely more sophisticated methods of catching non-halting programs with fewer false positives.

xigoi ,
@xigoi@lemmy.sdf.org avatar

And that will be fine in most applications.

Have you never written a useful program that took more than 10 seconds to complete?

bleistift2 ,

I fully agree with your sentiment. But just in case: If you’re blocking the main thread of a browser for seconds at a time, you should look into that.

xigoi ,
@xigoi@lemmy.sdf.org avatar

I’m not talking about web applications.

cheery_coffee ,

My loop isn’t infinite, just longer than the heat death of the universe.

xigoi ,
@xigoi@lemmy.sdf.org avatar

For JavaScript apps, stopping them when they consume too much resources is definitely a good idea. But if you work on some project where it’s common to run computionally intensive tasks, it can be harder to detect non-halting.

WhiskyTangoFoxtrot ,

Just check the git blame.

CurlyChopz ,

Easy.

If( loop == inf) {

End;

}

Pay check please?

xigoi ,
@xigoi@lemmy.sdf.org avatar

Here you go:

Zero dollar bill

CurlyChopz ,

Woah! This is worthless!

mindbleach ,

There have been genuine efforts to do that. Obviously (well, for a very niche use of “obviously”) it’s not always possible, but detecting infinite loops isn’t like the uncertainty principle.

It’s called The Terminator.

float ,

Just because it’s not possible on a Turing Machine doesn’t mean it’s impossible on a PC with finite memory. You just have to track all the memory that is available to the algorithm and once you detect a state you’ve seen already, you know it’s not halting ever. The detection algorithm will need an insane amount of memory though.

Edit: think about the amount of memory that would need. It’s crazy but theoretically possible. In real world use cases only if the algorithm you’re watching has access to a tiny amount of memory.

AccidentalLemming ,

Funny thing is, since that comic was originally published bird detection has gotten a lot easier

Ultraviolet ,

About 5 years after, and there was a research team behind it.

Brainsploosh ,

Several teams actually

notabot ,

This. Very few problems are truly impossible to solve, they arem in fact, just wildly impractical to solve. So don’t try to tell the PM/client/coworker-with-a-‘brilliant’-idea it can’t be done, tell them what it’ll take to work out what it’ll take to do it. Either they go away, or you end up in charge of a project with an astronomical budget and no clearly defined deliverables.

randon31415 ,

I mean, now a days, I can upload the image into stable diffusion automatic1111 and click interrogate CLIP and then see if it outputs “bird” as a reverse promopt, but this comic WAS from 4 and a half years ago, so the programmer was right on the time-frame.

float ,

It always depends on which existing tools you have access to. Go back some more years and there is no GPS. Detecting the bird will be the easier problem then.

darcy ,
@darcy@sh.itjust.works avatar

respect for uploading the image, linking the page, and crediting the author :)

krey , in Schrödinger's date format

It looks like it has a calendar button. I hope using it enters the date in a valid format

junezephier , in Microsoft Edge could use a win

Sorry Gil, it’s still chromium ;c

CannotSleep420 , in It’s a game for kids!

I took a test once where one of the questions was to solve the tower of hanoi with 2 pegs and 3 disks.

jackie_jormp_jomp ,

That’s just unfair

CannotSleep420 ,

I was lucky enough to figure out that it was a trick question, but I second guessed every answer I put on tests and homework for that professor ever since.

learningduck ,

How is that possible? is it has a different rule?

CannotSleep420 ,

No, it was a trick question. The test taker was supposed to pick up on that.

Swedneck , in They Need To Stop Doing This
@Swedneck@discuss.tchncs.de avatar

Unionize, people. It’s terrifying how few IT workers are unionized.

bleistift2 ,

It’s because we can just leave for better positions.

Broccoli ,
@Broccoli@lemmy.world avatar

As a junior product, hell no.

Swedneck ,
@Swedneck@discuss.tchncs.de avatar

okay, do that then and stop complaining i guess?

CosmicTurtle , (edited )

There has been chatter on Blind for the devs and engineering at my company unionizing. It’s a long shot. But I’m all for it.

WolfhoundRO ,

It’s because of big pay, highly mobile employees, hiding the real role of the HR and this false sense of security compared to the rest of the workplaces despite all these lay-offs from the big companies. Also, whenever a unionizing attempt happens, the companies go into crackdown mode and have their multitude of ways to either fire you with a bogus reason, remove your post citing “restructuring” or pulling you on a dead career track and demonize you in front of your colleagues with the usual “we care about our employees and everything can already be resolved through HR” speech. And moreover, many of these issues have a direct cause the Work Laws of the respective countries

Double_A ,
@Double_A@discuss.tchncs.de avatar

Unions only make sense when you are easily replaceable as a worker so you don’t have any barganing power on your own. As an individual IT worker you can usually tell your boss to fuck off if things get bad and just look for a new better job…

cikano ,

While I completely agree, the meme would not really be different with a unionised workplace

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