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.

nyan , in single binary executable and dlls

There is one case I can think of where statically linked binaries make sense: games. They’re almost always closed-source even on otherwise open-source systems, and so cannot be recompiled against newer library versions, and (for smaller indies especially) it isn’t unusual for the people who do have the code to close up shop and vanish off the face of the Internet. For those, it honestly is better for them to carry all their libraries around with them, even if it results in some binary bloat.

For open-source software, dynamic linking isn’t usually an issue until some piece of software goes unmaintained for so long that it catches bit-rot.

For software not in one of those two categories . . . well, maybe you ought to move off Windows?

UlrikHD ,
@UlrikHD@programming.dev avatar

For modding, it’s very useful to not have everything statically linked. DLSS swapping is probably the most prominent use case nowadays.

dylanTheDeveloper , in Hallelujah
@dylanTheDeveloper@lemmy.world avatar

sfc/scannow

mexicancartel , in Its not wrong though

Open source ≠ Source availiable

Example of non open source programs with source code …wikipedia.org/…/List_of_proprietary_source-avail…

lauha ,

Open source ≠ free software

KairuByte ,
@KairuByte@lemmy.dbzer0.com avatar

Open source inherently means you can compile the code locally, for free. You can’t necessarily redistribute it, depending on the license, but I’m not aware of a “you can compile this source for testing and code changes only but if you use it as your actual copy you are infringing” license.

I am very much open to correction here.

ono , (edited )

Open source inherently means you can compile the code locally,

Open Source means more than that. It is defined here:

opensource.org/osd/

If you use the phrase “open source” for things that don’t meet those criteria, then without some clarifying context, you are misleading people.

for free.

Free Software is not the same as “software for free”. It, too, has a specific meaning, defined here:

www.gnu.org/philosophy/free-sw.html

When the person to whom you replied wrote “free software”, they were not using it in some casual sense to mean free-of-charge.

too_high_for_this ,

Free as in free speech, not as in free beer

whyNotSquirrel ,
@whyNotSquirrel@sh.itjust.works avatar

Where are all those free beer I always hear about?!

MostlyBlindGamer ,
@MostlyBlindGamer@rblind.com avatar

Have you tried installing homebrew?

Hadriscus ,

I know where the hops go, but where am I supposed to put the cereal ? I think I ruined my disc drive

MostlyBlindGamer ,
@MostlyBlindGamer@rblind.com avatar

Floppy drive. That’s why you malt it first.

QuazarOmega ,

Most free software is also open source and vice versa, but not all, the difference usually lies in the licence, this stackexchange answer gets it pretty well

grue , (edited )

According to the Open Source Initiative (the folks who control whether things can be officially certified as “open source”), it basically is the same thing as Free Software. In fact, their definition was copied and pasted from the Debian Free Software guidelines.

rikudou ,

I think InnoSetup belongs on that list as wel.

covert_czar ,
@covert_czar@lemmy.dbzer0.com avatar

You are talking about free softwares there are nonfree licenses which provide source code

mexicancartel ,

There are apps having source public but does not have any developement practice like of open sauce

doom_and_gloom , in Its not wrong though
@doom_and_gloom@lemmy.ml avatar

OS - obfuscated source

NotYourSocialWorker , in Hallelujah

Yes but it can do “cd…”

just_ducky_in_NH , in Its not wrong though

Okay, boomer here, be gentle.

So back in the ‘70s I dabbled in programming (now called “coding”, I hear). I only did higher-level languages like Fortran, Cobol, IBM Basic, but a friend had a job (at age 13!) programming in assembler. Is assembler now called assembly, or are they different?

Almamu ,

Yep, some call it assembly, others call it assembler

Thwompthwomp ,

I thought that the assembler is a specific program that translates mnemonics into the corresponding machine code. Perhaps in early computing this was done by hand so a person was the assembler (and worked in assembler), but now that is handled by software (and supports various macros). So programming in assembly would generate a stream of text that must be assembled by an assembler. (Although I have heard people refer to programming in assembler as well, just not often.)

lhamil64 ,

I hear people say “program in assembler” but IMO that’s wrong. I’d say you write the code in “assembly language” (or better yet, the actual architecture you’re using like “x86 assembly”) but you “assemble” it with an “assembler”. Kind of like how you could write a program in the “C language” and “compile” it with a “compiler”

amki , (edited )
@amki@feddit.de avatar

A compiler and an assembler do wildly different things though. An assembler simply replaces mnemonics while a compiler transfers instructions to a whole other language.

Malfeasant ,

Depends on the language, really… C maps pretty closely to assembly language, it’s not as simple as one mnemonic to one machine code byte, more like tokens get mapped to sequences of machine code, a function call translates to some code that sets up a stack frame, a return tears it down…

fidodo ,

It’s still called programming, coding is the same thing. Assembler more commonly refers to the utility program that converts the assembly code to machine code while assembly refers to the code itself, but the term assembler code is also valid. It’s uncommon to simply call the code assembler because it would be easily confused with the utility program.

lugal ,

(at age 13!)

c/suddenlyfactorial

bamboo ,

Easier to say than “at age 6227020800”

Overzeetop ,

I was too young/poor to afford an assembler for my 6502 so I wore out the assembly long hand on a legal pad and then manually converted each operation to machine code.

Needless to say my programs done this way were exceptionally simple, but it’s interesting to understand the underlying code.

TheFerrango , in Hi Ricardo

Someone has a Motorola! 😀

carpelbridgesyndrome OP , (edited )

Just got another. Seems they still haven’t caught their intern

ImpossibleRubiksCube ,

Exactly how many Ricardos work there?

30p87 ,

I only got one and accidentally swiped that away :(

Kolanaki , in Its not wrong though
@Kolanaki@yiffit.net avatar

I’ve wondered: Can you go deeper than assembly and code in straight binary, or does it even really matter because you’d be writing the assembly in binary anyway or what? In probably a less stupid way of putting it: Can you go deeper than assembly in terms of talking to the hardware and possibly just flip the transistors manually?

Even simpler: How do you one up someone who codes in assembly? Can you?

mrpants ,

Re: Coding in binary. It makes no difference. Your assembly is binary, just represented in a more human readable form when writing it in assembly.

Re: Manual interaction. Sure there’s plenty of old computers where you can flip switches to input instructions or manipulate registers (memory on the cpu). But this is not much different from using assembly instructions except you’re doing it live.

You can also create purpose built processors which might be what you mean? Generally this isn’t too useful but sometimes it is. FPGAs are an example of doing this type of thing but using software to do the programming of the processor.

Kolanaki ,
@Kolanaki@yiffit.net avatar

this isn’t too useful

The point isn’t to be good, practical or useful. It’s to be cool 😎

But this silly question still informed me of something I had misunderstood: I had thought assembly and machine code were the same thing.

cacheson ,
@cacheson@kbin.social avatar

Perhaps you'd like to build an 8-bit computer?

PipedLinkBot ,

Here is an alternative Piped link(s): piped.video/watch?v=HyznrdDSSGM&

Piped is a privacy-respecting open-source alternative frontend to YouTube.

I’m open-source, check me out at GitHub.

CaptainBuckleroy ,

Yes, you can code in machine code. I did it as part of my CS Degree. In our textbook was the manual for the particular ARM processor we coded for, that had every processor-specific command. We did that for a few of the early projects in the course, then moved onto Assembly, then C.

thepianistfroggollum ,

That was a fun class. One of the last ones I took before recursion made me change majors.

jdaxe ,

Hand writing machine code and assembly was fine, but recursion is where you draw the line??

thepianistfroggollum ,

My brain just can’t write recursive code. I can read it, but not write it.

doggle ,

Assembly effectively is coding in binary. Been a long time since I’ve looked at it, but you’d basically just be recreating the basic assembly commands anyway.

I guess you could try flipping individual transistors with a magnet or an electron gun or something if you really want to make things difficult.

If you actually want to one-up assembly coders, then you can try designing your own processor on breadboard and writing your own machine code. Not a lot of easy ways to get into that, but there’s a couple of turbo dorks on YouTube. Or you could just try reading the RISC-V specification.

But even then, you’re following in someone else’s tracks. I’ve never seen someone try silicon micro-lithography in the home lab, so there’s an idea. Or you could always try to beat the big corps to the punch on quantum computing.

ylph ,

The first computer I used was a PDP-8 clone, which was a very primitive machine by today’s standards - it only had 4k words of RAM (hand-made magnetic core memory !) - you could actually do simple programming tasks (such as short sequences of code to load software from paper tape) by entering machine code directly into memory by flipping mechanical switches on the front panel of the machine for individual bits (for data and memory addresses)

You could also write assembly code on paper, and then convert it into machine code by hand, and manually punch the resulting code sequence onto paper tape to then load into the machine (we had a manual paper punching device for this purpose)

Even with only 4k words of RAM, there were actually multiple assemblers and even compilers and interpreters available for the PDP-8 (FOCAL, FORTRAN, PASCAL, BASIC) - we only had a teletype interface (that printed output on paper), no monitor/terminal, so editing code on the machine itself was challenging, although there was a line editor which you could use, generally to enter programs you wrote on paper beforehand.

Writing assembly code is not actually the same as writing straight machine code - assemblers actually do provide a very useful layer of abstraction, such as function calls, symbolic addressing, variables, etc. - instead of having to always specify memory locations, you could use names to refer to jump points/loops, variables, functions, etc. - the assembler would then convert those into specific addresses as needed, so a small change of code or data structures wouldn’t require huge manual process of recalculating all the memory locations as a result, it’s all done automatically by the assembler.

So yeah, writing assembly code is still a lot easier than writing direct machine code - even when assembling by hand, you would generally start with assembly code, and just do the extra work that an assembler would do, but by hand.

Lowered_lifted ,
@Lowered_lifted@lemmy.world avatar

You could like make a simple accumulator machine out of logic gates and enter binary instructions expressed in hexadecimal into its register to program it, yeah, but it’s not capable of all the operations of a computer. But yes the first programming was just op codes, switches flipped or punch cards, there was no assembly language. But assembly language is pretty much just mnemonics for operations and registers. Like I had to write a couple C programs in school and use GNU C compiler to disassemble them into x86 assembly and see what it was doing on that level, then we “wrote” some x86 assembly by copypasting a lot of instructions but its not that hard to make something that works in like x86 assembly or like Jasmin (Java virtual machine assembly language) if it’s simple enough.

gerryflap ,
@gerryflap@feddit.nl avatar

You can code in binary, but the only thing you’d be doing is frustrating yourself. We did it in the first week of computer science at the university. Assembly is basically just a human readable form of those instructions. Instead of some opcode in binary you can at least write “add”, which makes it easier to see what’s going on. The binary machine code is not some totally other language than what is written in the assembly code, so writing in binary doesn’t really provide any more control or benefit as far as I’m aware.

jadero ,

All those assembly language instructions are just mnemonics for the actual opcodes. IIRC, on the 6502 processor family, JSR (Jump to SubRoutine) was hex 20, decimal 32. So going deeper would be really limited to not having access to the various amenities provided by assembler software and writing the memory directly. For example:

I started programming using a VIC-20. It came with BASIC, but you could have larger programs if you used assembly. I couldn’t afford the assembler cartridge, so I POKED the decimal values of everything directly to memory. I ended up memorizing some of the more common opcodes. (I don’t know why I was working in decimal instead of hex. Maybe the text representation was, on average, smaller because there was no need of a hex symbol. Whatever, it doesn’t matter…)

VIC-BASIC had direct memory access via PEEK (retrieve value) and POKE (set value). It also had READ and DATA statements. READ retrieved values from the comma-delimited list of values following the DATA statement (usually just a big blob of values as the last line of your program).

I would write my program as a long comma-delimited list of decimal values in a DATA statement, READ and POKE those values in a loop, then execute the resulting program. For small programs, I just saved everything as that BASIC program. For larger programs, I wrote those decimal values to tape, then read them into memory. That let me do a kind of modular programming by loading common functions from tape instead of retyping them.

I was in the process of writing my own assembler so that I could use the mnemonics directly when I got my Apple //c. More memory and the availability of quite a few high level languages derailed me and I haven’t touched assembly since.

collegefurtrader ,

Assembly is binary

httpjames , in Who did this one
@httpjames@sh.itjust.works avatar

Someone forgot the back ticks 💀

ShroOmeric ,

debuggin already, aren’t we?

andrew ,
@andrew@lemmy.stuart.fun avatar

No back ticks helps prevent Lyme disease.

squaresinger ,

And Alpha-Gal (->red meat) allergy

threelonmusketeers ,
PipedLinkBot ,

Here is an alternative Piped link(s): piped.video/X6NJkWbM1xk

Piped is a privacy-respecting open-source alternative frontend to YouTube.

I’m open-source, check me out at GitHub.

steltek , in single binary executable and dlls

No one seems to mention license considerations when talking about static linking. Even if your app is open source, your particular license may not be legally compatible with the GPL, for example. 3BSD, MIT, and Apache most likely don’t change in a single binary but it’s kind of a new thing that no one was really thinking of before when mixing licenses together.

I think this default okay assumption comes from most developers having a cloud-centric view where there’s technically no “distribution” to trigger copyright.

TechieDamien ,

Even in the cloud you need to consider licenses such as the AGPL. Personally I don’t get this almost apathetic approach many developers have towards licensing and abiding by licenses.

dylanTheDeveloper , in Its not wrong though
@dylanTheDeveloper@lemmy.world avatar

Yeah but which version of assembly

over_clox ,

Depends on the CPU. Either way there are cross-compilers and cross-disassmblers.

And even failing those options, there’s always hex editors for those really in the know.

makingStuffForFun ,
@makingStuffForFun@lemmy.ml avatar

Microsoft’s Assembly# of course. It’s new. It’s just different enough to extinguish assembly

yum13241 ,

6502 assembly.

jadero ,

The last assembly I could understand. Well, pretend to understand.

southernwolf , in Its not wrong though
@southernwolf@pawb.social avatar

It’s honestly remarkable how few people in the comments here seem to get the joke.

Never stop dissecting things, y’all.

stevedidWHAT ,
@stevedidWHAT@lemmy.world avatar

As above so below, the microscopic and the macroscopic

potoo22 , in unrolling loops is efficient, right?

In my first CS class, the professor announced an extra credit project due at the end of the semester. It was to create a formatted terminal calendar given a year from user input. I finished it after learning about condition but before I learned about classes… or functions… or loops… or searching the internet… partially. I searched how leap years worked, but didn’t bother to search for code (Stack Overflow didn’t exist yet)

Anyway, long ass program with each month hard-coded with 7 possible calendars for each month depending on the first day of the week. Lots of copy and paste. Professor was speechless, but accepted it.

ICastFist ,
@ICastFist@programming.dev avatar

“It’s not stupid if it works”

DNOS , in Linux Best Practices

As an Italian I will fall for that … We hate France

DzikiMarian , in Wow, what a comp for doing free consulting work ¯\_(ツ)_/¯

Would you prefer SO to be paid?

UlrikHD ,
@UlrikHD@programming.dev avatar

That would never be an option for Stackoverflow

DzikiMarian ,

Well guy complains about compensation for his “work”. I assume he’s ready to shell out a few dollars for when he’ll need it :-)

UlrikHD ,
@UlrikHD@programming.dev avatar

His “work” as you put it, is the only thing of value on the site. SO without users to provide answers are worth zero dollars, so I’m not sure why you put work in quotation mark.

DzikiMarian ,

Because if he’s able to help anyone on SO, he very likely profited many, many times from free access to knowledge there before he got to this point. Given activity of average user he probably gained orders of magnitude more than he given.

I find rambling about money and compensation in such context distasteful.

SO provided platform which, while not perfect is used by millions of people. They aren’t overloaded with ads and dark patterns as many of the clones. If it’s worthless, why people are using it instead self hosted blogs for example?

silent_water ,
@silent_water@hexbear.net avatar

the owners of SO make far more than the benefit provided to any single dev. if that were not true, they wouldn’t be in business.

DzikiMarian ,

if that were not true, they wouldn’t be in business.

Why? They are not loosing anything while developers are gaining time using their website.

They had 66 million dollars revenue in 2021. They have about 20 million registered users (and much more unregistered, and that’s revenue not income, but let’s forget that). Do you really, honestly feel, that SO doesn’t save you $3 worth of time per year?

silent_water ,
@silent_water@hexbear.net avatar

I use stackoverflow for minutes at a time and it almost never has answers to the questions I need answers to. if it has an answer, it’s usually “you can’t do that”. reference docs are 100% of the time more helpful. so no, I don’t think so.

DzikiMarian ,

Why do you go there then? If you don’t, they won’t get their $3 out of you and universe is in balance again :-)

silent_water ,
@silent_water@hexbear.net avatar

frustration, usually, hoping against hope that the answer is relevant.

ToxicWaste ,

You guys are funny. If you don’t want to see ads, use adblock. Now SO is a free platform for people that want to contribute.

silent_water ,
@silent_water@hexbear.net avatar

I don’t want Google to have my info. the ads are secondary.

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