Programming

This magazine is not receiving updates (last activity 6 day(s) ago). Subscribe to start receiving updates.

Vincent , in Is TypeScript a fad or is my manager delusional?

If TypeScript still is a fad at this point, his definition of fad is far lengthier than mine is.

I'm fairly sure TypeScript will remain in popular use longer than whatever project you're working on 😅

breadsmasher , in Is TypeScript a fad or is my manager delusional?
@breadsmasher@lemmy.world avatar

Based solely on gut feel, I think Typescript will become less popular as Wasm grows

tias ,

When will Wasm grow, according to your gut? I feel like I've been waiting for a decade now.

friend_of_satan ,

WASM made huge strides last year. You can run entire operating systems inside a WASM hypervisor now, and lots of packaging and transpiling projects came of age last year.

Example: https://copy.sh/v86/?profile=windows98

shnizmuffin , in Is TypeScript a fad or is my manager delusional?
@shnizmuffin@lemmy.inbutts.lol avatar

A fad? No, definitely not. TypeScript brings features (and structure) that will /should probably make their way into JS.

It's sort of like asking, "does SASS replace CSS" or "is liquid the next HTML?" They're just implementations of features FE developers want in the core spec of JS, CSS, and HTML.

Vincent ,

that will /should probably make their way into JS.

Not really, IMHO. The main advantage of TS is that it will help you catch errors without having to run a particular piece of code - i.e. you won't have to move to the third page of some multi-page form to discover a particular bug. In other words, it helps you catch bugs before your code even reaches your browser, so it doesn't bring you much to have them in the browser.

(There is a proposal to allow running TS in the browser, which would be nice, but you'd still run a type checker separately to actually catch the bugs.)

Olap , in Why is knowledge of programming alone not enough?

The boring answer: the boring shit pays the bills. If you want to apply your programming chops to science then academia is your home

UBI often touted as an answer to this kind of thing though, breaking capitalism through removing cheap labour will have untold societal shifts, including an uptick in creative thought and independent research. Beware though: most research today costs way more than you think to generate meaningful breakthroughs

Diplomjodler , in Any tips to help a scientist become a better programmer?

Forget everything you hear about OOP and just view it as a way to improve code readability. Just rewrite something convoluted with a class and you'll se what they're good for. Once you've got over the mental blockade, it'll all make more sense.

WolfLink ,

To add to this, there are kinda two main use cases for OOP. One is simply organizing your code by having a bunch of operations that could be performed on the same data be expressed as an object with different functions you could apply.

The other use case is when you have two different data types where it makes sense to perform the same operation but with slight differences in behavior.

For example, if you have a “real number” data type and a “complex number” data type, you could write classes for these data types that support basic arithmetic operations defined by a “numeric” superclass, and then write a matrix class that works for either data type automatically.

TheOctonaut , in File over App Philosophy

"Philosophy" seems a bit grand for something that could be better described as a "tip".

abhibeckert ,

No it really is a philosophy.

There's a vast difference in approach between software that uses documents and software that uses a database. A document based approach tends to result in work that lasts a long time. A database approach tends to have more features.

It's tempting to chase those features, but in my opinion it's a mistake.

henfredemars , in In Rust we trust? White House Office urges memory safety - Stack Overflow

Memory safe languages tend to be easier to use and to learn especially at lower skill levels with languages like Python and JavaScript. It's a nice thought, but the White House encouraging memory safety seems like a relatively insignificant push. It's the weight of legacy code and established solutions that will hold us back for a long time.

agressivelyPassive , in Advanced git commands every senior software developer needs to know

If you need anything more complex than cherrypick, you already screwed up big time.

CubitOom , in GitHub besieged by millions of malicious repositories in ongoing attack

Too bad the phrase fork bomb is already taken

NegativeLookBehind , in Good GitHub alternatives?
@NegativeLookBehind@lemmy.world avatar

Codeberg is pretty good, or if you want to self host, Gitea

mesamunefire OP ,

Ive seen a couple people recommend Gitea. I might give it a shot.

First time ive heard of Codeberg. Thanks!

mac ,
@mac@programming.dev avatar

For self hosting there's also Forgejo which is a fork of Gitea

Thats what Codeberg uses

Rikj000 ,
@Rikj000@discuss.tchncs.de avatar

Gitea is not really recommended anymore these days, due to being taken over by a for-profit comany + introducing a paid tier.

Nowadays Forgejo is the project to look at.

Faresh , in White House: Future Software Should Be Memory Safe

What memory-safe systems programming languages are out there, besides Rust?

Traister101 ,

Languages with GC

fubo , in White House: Future Software Should Be Memory Safe

Rust does memory-safety in the most manual way possible, by requiring the programmer prove to the compiler that the code is memory-safe. This allows memory-safety with no runtime overhead, but makes the language comparatively difficult to learn and use.

Garbage-collected compiled languages — including Java, Go, Kotlin, Haskell, or Common Lisp — can provide memory-safety while putting the extra work on the runtime rather than on the programmer. This can impose a small performance penalty but typically makes for a language that's much easier on the programmer.

And, of course, in many cases the raw performance of a native-code compiled language is not necessary, and a bytecode interpreter like Python is just fine.

SorteKanin ,
@SorteKanin@feddit.dk avatar

Rust does memory-safety in the most manual way possible

The most manual way is what C does, which is requiring the programmer to check memory safety by themselves.😛

Also will say that outside of some corner cases, Rust is really not that harder than Java or Python. Even in the relatively rare cases that you run into lifetimes, you can usually clone your data (not ideal for performance usually but hey its what the GC language would often do anyway). And reliability is far better in Rust as well so you save a lot of time debugging. Compiles = it works most of the time.

kogasa ,
@kogasa@programming.dev avatar

C# dev with reasonable experience with java, python, and rust:

Rust is harder

onlinepersona , in White House: Future Software Should Be Memory Safe

Leaders in Industry Support White House Call to Address Root Cause of Many of the Worst Cyber Attacks

And it's called C/C++. It's gotten so bad that even the friggin' white house has to make a press release about it. Think about it, the place where that majority barely even understand the difference between a file browser and a web browser is telling you to stop using C/C++. Hell, even the creator and maintainers of the language don't know how to make it memory safe. If that isn't a wake up call, then nothing ever will be.

And this isn't the first call! The IEEE also says more clearly: GTFO C/C++.

If you want memory-safe, don't write C/C++. Trying to get that shit memory-safe is a hassle and a half. You're better off learning a language that isn't full of foot-guns, gotchas, and undefined behavior.

CC BY-NC-SA 4.0

tiredofsametab , in Should I use Rust and Go together or just Go?

First write it in Go, which will likely be faster unless you are quite familiar with Rust. After that, you can port some/all of it to Rust if you wish.

solrize , in Should I use Rust and Go together or just Go?

Go is plenty fast for most things, and it is fairly simple. Rust is more interesting from a language geek perspective. I'd decide based on which of those appeals to you. I don't see good reason to combine them, though.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • programming@programming.dev
  • test
  • worldmews
  • mews
  • All magazines