Programming

fell,
@fell@ma.fellr.net avatar

Without going into too much detail, my thesis was criticised for developing a web service with C++. I It was questioned why I didn't use or for the web service. "It's not performance critical" said the professor.

Dude, have you used the internet lately?

EVERYTHING is performance critical!

This sort of teaching explains why most aps/websites run like absolute dogshit.

Why is never an academic criteria?

I wish @cmuratori could see this...

DanielaKEngert,
@DanielaKEngert@hachyderm.io avatar

@setebos @fell @folkerschamel If your job is to call a bunch of API functions from external libraries (usually implemented in one of the system languages) that do the heavy lifting, then any language will do (COBOL anyone?). It's only familiarity (and hence velocity) that matters then. And cost of operations.

_alen,

@folkerschamel @fell I agree with this. In my experience, people asume that something is slow just because it’s written in and usually it turns out that it’s because of developer oversight. In cases where Python is indeed a problem, I managed to solve most of my performance issues with caching, or simple code tweeks.

mjgardner, (edited )
@mjgardner@social.sdf.org avatar

This is hilarious. A engineer invented to make command line scripting easier with , because at a certain point scripts get too complicated and you need a Real Language.

https://github.com/google/zx/

This is exactly ’s use case from thirty-six years ago. But the kids want everywhere and would rather it take more work to convert their ascended scripts to a vastly different syntax.

https://github.com/google/zx/issues/581#issuecomment-1516573139

BoredomFestival,
@BoredomFestival@sfba.social avatar
sullybiker,
@sullybiker@sully.site avatar

@mjgardner In my Unix sysadmin handbook from about 15yrs ago, they make a big point about shell scripts beyond 50 lines really need to become Perl or Python. I am by no means a programmer but I tend to use that as a yardstick. I've seen a tonne of horrendous shell scripts that could use the lesson though.

Adorable_Sergal, (edited )
@Adorable_Sergal@hachyderm.io avatar

We used to have programming books.

(patch notes: added a more detailed description of the man to the alt text)

glightly,
@glightly@mastodon.social avatar
eribosot,
@eribosot@mastodon.social avatar

@Adorable_Sergal Apparently, FORTH is a language for real, well-endowed, manly men, not wimpy cucks with micropenises. Only those who can hold up a giant block of granite while kneeling on a keyboard key are worthy.

vwbusguy,
@vwbusguy@mastodon.online avatar

Here's some hard truth about C - It's not going away. It's not that it's perfect, but it is immensely portable and useful. More importantly, no other language has come close to its ubiquity. I'm not saying other languages don't do some things better (they definitely do!), but we're going to be stuck with C for a while yet.

RL_Dane,
@RL_Dane@fosstodon.org avatar

@vwbusguy

Find me another language that can be implemented in a little RAM and storage as C. I doubt you'd find too many.

For a lot of people, the problem with modern programming languages isn't syntax or features, its B L O A T

vwbusguy,
@vwbusguy@mastodon.online avatar

Not to even mention how many other more "modern" languages still depend on C in some very big ways because of the operating system APIs, native database drivers, or the language itself is written in it (PHP, CPython).

davidbisset,
@davidbisset@phpc.social avatar

"What are your top 12 books?"

Me: 🤔

laskov,
@laskov@mastodon.social avatar

@davidbisset "Googling the Error Message" is a must-have classic

tubetime,
@tubetime@mastodon.social avatar

@davidbisset my personal favorite.

techconsulnerd,

@asklemmy How do you listen to music / podcasts? At what places?

For me, I mostly listen on podcasts during my drive or commuting on the train, via bluebooth earphones even in my car.

When doing deep work such as on the computer, I listened to music out loud (bluetooth speaker) in my home office.

Share your favourite apps, channels or even gadgets in your audio experience.

Rocky60,

I know. It’s about 8000 songs. I work off of a 900 song playlist in my car.

BigBananaDealer,
@BigBananaDealer@lemm.ee avatar

i listen to music on my drives to anywhere, and most of the day at work. i sometimes listen to podcasts near the end of my work day

ELLIOTTCABLE,

So, I’m low-key thinking of writing my first-ever graphics-heavy software. (Specifically, to do with VR / UIs, but not gaming.)

Thing is, my experience is with PLT & compilers, distsys, FOSS … but extremely not graphics, GPUs, or single-host performance of pretty much any kind.

I need advice. If I want to learn some relatively-low-level graphics stuff, but I have zero relevant background; where do I start?

Any resources for me (tutorials, books, well-known starter projects?)

(Also, any Mastodon accounts I should follow on this topic? Poke me if you're into this stuff and I'll follow you! :P)

ELLIOTTCABLE,

to lean on my existing network a bit … 😅

/cc @aeva @mcc @glowcoil

mcc,
@mcc@mastodon.social avatar

@aeva @ELLIOTTCABLE Checking and… god damn it Microsoft really did something nasty to us when they decided to have the C# VM specification technically be named the "CLI"

veronica,
@veronica@mastodon.online avatar

When you've spent hours writing a lot of code, and you figure out that most of it doesn't work they way you'd though together with the rest of the code base, so you revert most of it and are left with a small chunk of useful stuff ...

That's a Monday.

Time to go watch some SciFi instead 😊

18+ tmr232,
@tmr232@mastodon.social avatar

@veronica @jwildeboer

  • in the books, but I don't think it would've worked as a show.
    This took on a far more personal approach to the story. It's great, and impactful, but I really don't know where things are going.

I have some gripes with the show: one is that the vault feels too powerful; the other is that I did not enjoy the Tellem arc; but assuming the rest will play out well - they are minor.

18+ tmr232,
@tmr232@mastodon.social avatar

@veronica @jwildeboer

And the Demerzel finale is so strong. I absolutely love what they did with her character. Pulling so much emotion from a character that is portrayed as so cold and calculating. Fantastic work.

nixCraft,
@nixCraft@mastodon.social avatar

what was your last "how to..." search about or or topics? 🤔🔍

cathodion,
@cathodion@mastodon.sdf.org avatar

@nixCraft flask user-generated content handling. things like replacing the \n’s with <br>’s without breaking the safety defaults. haven’t quite figured it out yet.

El_Al,

@nixCraft Add custom/personal zsh functions
Like half an hour ago

AmenZwa,
@AmenZwa@mathstodon.xyz avatar

My favourite language implementations:
• C—Clang
• Smalltalk—Pharo
• Scheme—Racket
• Standard ML—SML/NJ
• Haskell—GHC
• Idris—reference
• OCaml—reference
• Go—reference
• Swift—reference
• Rust—reference
• Elixir—reference
• Nim—reference
• Zig—reference
• Python—reference
• TypeScript—reference

I countenance other languages and their implementations.

AmenZwa,
@AmenZwa@mathstodon.xyz avatar

@lproven @dekkzz76 I usually work with signal processing, image processing, radar, etc. I don't mean to trample the grounds outside my domain.

And I take your pointed objections about my choice of terminology. I was using those terms to describe the reinvention of old technologies in the Web stack, so I couldn't have avoided their use.

dekkzz76,
@dekkzz76@emacs.ch avatar

@AmenZwa @lproven

very interesting conversation

thisismissem, (edited )
@thisismissem@hachyderm.io avatar

Okay Fediverse, as funding is not happening at the levels necessary to sustain me working full-time on the Fediverse (whether that's on trust & safety or on Mastodon), I'm now looking for part-time or contract positions.

Most recently I worked for Sir Tim Berners-Lee's company Inrupt.

CV: https://docs.google.com/document/d/1gs5tzLXI6g_TgN3oFJVGfgLTqGi5JCAC06O2JX3_u0o/view
LinkedIn: https://linkedin.com/in/thisismissem

I'm based in Berlin, but tend to work EST.

Holla if you wanna work together: emelia+hireme@brandedcode.com

thisismissem,
@thisismissem@hachyderm.io avatar

Here's two of my recent recommendations that can be found on my LinkedIn profile:

becha,
Em0nM4stodon,

Is being a "minimalist programmer" a thing? 👀

As in a programmer who specializes in coding with as few external dependencies as possible. Or is this just generally frown upon?

BradRubenstein,

IMHO "dependency discipline" is at the core of responsible system design.

@Em0nM4stodon

jochie,
@jochie@strangeweb.page avatar

@Em0nM4stodon I don't know if there is a name for it, but I imagine that for anyone who has been bitten by dependency hell in some form or another, the pendulum has swung in that direction: "I can add library XYZ, and who knows when that is going to bite me, because it's no longer maintained, has a security vulnerability in some unrelated part, etc, or I can write just what I need in 10-50 lines of code.”

julienbarnoin,
@julienbarnoin@mastodon.gamedev.place avatar

I've been working a lot with for a while now, writing complex code. Overall, I feel like the single improvement that would make the most difference for the language would be support for pass-by-reference instead of copy in/copy out syntax, as suggested here https://github.com/KhronosGroup/GLSL/issues/84

This would make it possible to do a lot of things that are either not possible or ridiculously inefficient to compile, including object oriented programming.

julienbarnoin,
@julienbarnoin@mastodon.gamedev.place avatar

Also one thing that should be easier to do (I imagine) if pass by reference exists, is to accept arbitrary length arrays as parameters.

Right now you can declare a local array and iterate on it with a for loop on its .length(), but you can't move that for loop to a common function that accepts various array sizes as input. The only way to avoid repeating the code is using macros, which sucks.

Again for a language that inlines everything this seems like a strange omission.

dneto,
@dneto@mastodon.gamedev.place avatar

@gfxstrand @julienbarnoin

has pass by ref but we call them pointers.

And it also has a no aliasing restriction; you can't have two names for the same variable memory and have a RW, WR, or WW hazard in the same function.
https://www.w3.org/TR/WGSL/#alias-analysis

And with all that our compiler does call site specialization until it boils those pointer params away. It's convenient for the programmer but can bloat code size (hopefully no more than hand rolling it yourself)

markstos,
@markstos@urbanists.social avatar

For MLK day here in the US, I'm going to be doing some equity work with and mabe some and posting some updates throughout the day in this thread. If that's your jam, follow along.

Otherwise, you may want to mute me for 24 hours, because this may get noisy. 🧵

markstos,
@markstos@urbanists.social avatar

Why build a ped bridge if it's not going to connect anywhere useful, or safely? "Pedestrian Bridges of North Texas" captures the vibe of how our government often uses pedestrian bridges to solve transportation problems. https://www.youtube.com/watch?v=mu5JqkufLtE

enobacon,
@enobacon@urbanists.social avatar
smurthys, (edited )
@smurthys@hachyderm.io avatar

A serious question for C and C++ programmers:

What are the benefits of using C over C++ for greenfield projects, setting aside build times and such.

In other words, is there anything that can be done in C that cannot be done at least equally well in C++? Is there something that can be done in C that just can't be done in C++? What are the dealbreakers?

(No language wars please.)

Boosts appreciated: my sphere of influence is quite small. 🙏

#c

PeterSommerlad,
@PeterSommerlad@mastodon.social avatar

@smurthys
if C23 is ratified and while C++ is not yet based on it, you get assert(...) as a variadic macro in C23 but not in C++23:-) (I am guilty and working on it. )

gracicot,
@gracicot@mastodon.social avatar

@PeterSommerlad @smurthys that is, if C++ make it not a macro with contacts and choose to not introduce the ass keyword 🙃

rml,
@rml@functional.cafe avatar

I think something the scheme community could learn from Haskell is to lean-in on it's prestige. I see so many people post about how they were never able to figure out how to use scheme in any practical way, and most schemers I've spoke to said it took them about a year to get really compfortable. But I think the #scheme community has traditionally advertised it as "so easy, you can learn it in an afternoon!", and so people, often times already coming from some other #lisp like #clojure, expect to be able to just pick it up, and when they fail to they think the language is lacking. But nobody comes to #Haskell with such expectations, and the Haskell community never advertised it as super easy and quick to learn. In my experience, Haskell has always been sold as "takes time to learn, but is worth it".

ramin_hal9001,
@ramin_hal9001@emacs.ch avatar

@rml
If you were only interested in computers as a brute-force calculating tool, or interested only in the business side of software, you aren't interested in Lisp because it lost out to languages like Python, JavaScript, C/C++. So I think any Lisp will only attract people who are interested in lambda calculus and/or programming language theory, and/or maybe people interested in dependent typing, like anyone who has run across the work of Dan P. Friedman.

I assume it is not just me that the reason Scheme is appealing is because it is a well-designed minimal Lisp, and just being able to understand, from a pure computer science perspective, the implications of what a "well-designed, minimal Lisp" even means has already narrowed down the pool of potential converts to a tiny minority.

But the fragmentation is still the biggest problem. The absolute first question I had when I wanted to get started with Scheme was, "which implementation should I use?" And immediately it becomes clear that once you have picked one, it isn't easy to just switch your code over to some other implementation if you feel like the one you picked first is wrong. So there is soooo much pressure to pick the right implementation on your first try. That alone I think scares too many people away. I didn't run away because I was already committed to the idea mastering a "well-designed, minimal Lisp."

abbienormal,

@thatgeoguy @rml

as for the hyperfocusing on features rather than on use cases: do you know about "bropages" ?

It aims to substitute the linux "man" command and it explain commands with examples ONLY

https://blog.desdelinux.net/en/bropages-the-practical-replacement-for-the-old-manpages/

and as far as I understand there are 2 more alternative projects doing the same thing

does this tell you anything about sheme documentation ?

rml,
@rml@functional.cafe avatar

Cue quarterly community meltdown

To be fair, I think Haskell will continue to fill the niche it filled ~10 years ago, around the time it started to get mainstream hype. Small teams of skilled devs delivering robust products that would normally require much larger teams to maintain will continue to prevail. Purely functional lazy programming was never bound for world domination in an economy which is antagnostic to curiosity, creativity and truths.

On the other hand, I have the feeling that we're going to see more and more Haskellers-turned-Rustaceans come to realize that does little to alleviate the primary barrier to Haskell's wider success -- fast and predictable turnaround time for projects developing cutting-edge technologies -- and will wind up going the same route as some major Haskell projects such as and have in recent years, which is to try Scheme, only to discover that it allows them to release blazing fast functional programs on a generic foundation where major breaking changes are practically non-existent, providing incredible flexibility while significantly reducing dependencies by dint of the ad-hoc tooling that falls out of the bottom of . Not to mention the joys that come from near-instant startup times, some of the fastest compile time you've ever encountered, fully-customizable interactive development and a surgical that rivals Haskell in scheer fun. Yesterdays naysayers will become tomorrow's enthusiastic bootstrappers. Or a at least a boy can dream.

That said, in all seriousness I don't think Scheme will ever reach the heights of Haskell's moderate commercial success. But I do think that projects built on Scheme, like Unison, will get a leg up and eventually surpass it, and interest in will only grow.

https://nitter.net/graninas/status/1656519682822746113?cursor=NwAAAPAoHBlWgoCxgZ7Grf0tgsCz2c64l_0tjIC2pczQo_0thIC9xfeLvv0tgoCx4eq3tv0tJQISFQQAAA#r

ramin_hal9001,
@ramin_hal9001@emacs.ch avatar

@rml Yep, quarterly meltdown is right.

Though I must admit, I am exhausted trying to get people in my company and elsewhere to see the benefit of Haskell. I had hope for a time maybe 5-10 years ago, that the world of computer education would latch on to it as an education language. But alas, they went with Python because it's "easy." Easy to get started (not easy to maintain). But if you start people with Python, that is the only language they will ever want to use for their whole life and they will quiver in fear and react violently like a cornered animal if you ever tell them they have to use anything other than Python. And now the whole AI industry is using Python and JavaScript exclusively.

I am back to using Haskell as "for personal use projects" only. But lately I have become interested in using Scheme for personal use, so much of my unfinished Haskell code has gone untouched for a few months now. I just have so little motivation to continue working on those projects when no one seems to care about it outside of that subset of software engineers who have really understand how it is better than or in every possible way.

I'll probably get around to releasing some of my old projects at some point, but right now I am just having too much fun with , and I am just so god damned tired of this AI bullshit.

Fuck Python. Fuck JavaScript, fuck the whole god damned software industry who all insist these are the only languages anyone should be using.

yaxu,
@yaxu@post.lurk.org avatar

@rml I'm not really in that world, lucky to be able to move between languages and enjoy their different perspectives. But, I don't think it's healthy thinking really, pigeon-holing yourself and then fighting an imaginary war against other kinds of pigeons.

I guess as a researcher, I just see huge value in the idea of a 'research language'. Programming language development has been really stuck for decades so I'm all for learning research languages and trying out a new way of thinking.

It would be nice if we found ways in which the economy could support curiosity and creativity..

yossarian,
moshez,
@moshez@mastodon.social avatar

@meejah @yossarian @jugmac00 Why does Debian check if the next txtorcon is uploaded by the same person? Having a team upload a package is a good practice, I hope distributions are not actively encouraging practices that cause maintainer burn-out.

gpshead,

@yossarian
PGP signatures: worse than useless.

There, I fixed it for you.

As tools GPG (and PGP) are simply unusable by anyone but fastidious zealot pedants. And thus always used wrong.

@glyph

shaedrich,
@shaedrich@mastodon.online avatar

I've been for 14 years now, have been using , , , , and whatnot, but holy cow, when reading the following chapter, I've literally been yelling "what the heck" at every second paragraph:

https://tutorial.ponylang.io/types/traits-and-interfaces

I mean, really tries to explain everything in depth, and I appreciate the effort, but while it works fine in earlier chapters, it confuses the heck out of me in this at length.

shaedrich,
@shaedrich@mastodon.online avatar

@Crell Well, that's probably because someone decided, they don't like polymorphism ^^

Crell,
@Crell@phpc.social avatar

@shaedrich LOL. Who, me, the PHP team in 2004, or the Pony team? 😛

I've written on the difference between "is a" and "makes use of" before, when advocating for traits. Though I think default methods are a better answer most of the time:

https://www.garfieldtech.com/blog/beyond-abstract

Em0nM4stodon,

Music Recommendation Request :ablobdj:​:

I have been coding a lot this week
and I think I have listened to the entirety of YouTube's "Programming Music" mixes :ablobcatbongokeyboard:​🎶

Do you have any YouTube or ideally even PeerTube "Programming Music" mixes to recommend to me? 👀​

Preferably something without lyrics, energetic but not like going to a club, and not slow like being in a spa 😅

Incognitim,

@Em0nM4stodon
If you're looking for something a little different, you might enjoy this. It's not a mix (because most of his songs have some lyrics, although they're mostly in Yoruba), but it is a fun listen!
https://youtu.be/k6FVC1iS-oI?si=lhxYGMQO1aqNhiuu

Alister,
@Alister@mastodon.cloud avatar

@Em0nM4stodon Right now, I'm listening to a 1hr version of of a tune - but it's not making me want to attack a American special-ops squad, in a small village in Qatar 😆

parcifal,
@parcifal@hachyderm.io avatar

How often do you git commit? Should you be committing very frequently? What's your opinion?

fakeplastictree,

@parcifal It depends on the context. When it comes to my personal projects, my commits don't affect anyone else. If a feature I'm planning to implement consists of three tangible units of work, I'll commit as soon as each unit is implemented, unless, of course, they're small enough to be done together in one day. At work, I believe it doesn't matter too. People develop new features in separate branches, and commits should be squashed before creating a pull request.

luciano,
@luciano@parens.social avatar

@parcifal Not as much as I want to but much more than I did when I was new.

anderseknert,
@anderseknert@hachyderm.io avatar

What's your / of choice, and why is it so? Do you use that for all tasks and languages, or do you switch between editors depending on what you're working on?

I mostly use / for large projects, and for simpler ones. But tbh, I find myself increasingly using VS Code even for projects where I'd previously would reach for IntelliJ. And their poor story around language server integrations makes them feel less relevant today than they used to be.

iliveinatechworld,
@iliveinatechworld@techtoots.com avatar

@anderseknert No. Visual Studio, for instance, is Windows only, although I guess that is really more #IDE than just editor.
I would call VS Code an IDE as well, but there are those that claim it doesn't have all the functionality of one.
And XCode is macOS only.

anderseknert,
@anderseknert@hachyderm.io avatar

@iliveinatechworld yeah, that’s true. Definitely some IDEs with a more narrow user base.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • programming
  • kavyap
  • ngwrru68w68
  • tacticalgear
  • DreamBathrooms
  • mdbf
  • magazineikmin
  • thenastyranch
  • Youngstown
  • Durango
  • slotface
  • everett
  • vwfavf
  • rosin
  • anitta
  • Leos
  • khanakhh
  • GTA5RPClips
  • cisconetworking
  • InstantRegret
  • ethstaker
  • osvaldo12
  • tester
  • provamag3
  • modclub
  • cubers
  • normalnudes
  • megavids
  • JUstTest
  • All magazines