Programming thread

I started to do that again, but I think I kinda want to try to pick an implementation that has as much of this stuff already handled for me. Not that I'm shy about hacking stuff together myself, and I'm sure I'll need to do some of that, but I want to pick something that has as much of these features as off-the-shelf components as possible before diving in.
maybe just get things working without fancy oop shit and then introduce exactly enough oop shit to not want to kill yourself when you end up needing oop shit
then you basically just build an object system that works perfectly for what you specifically need out of an object system
I might actually try this with Chicken. Chicken is a great implementation, but I just wonder if cross-compiling with it will be a pain in the ass or not.
maybe take a look at gambit too, although chicken is probably better for your use case (as long as you figure out how to make it generate c that works in your windows cross compiler)
 
  • Agree
Reactions: Marvin
I've got a website I built using php/mysql a while back using PHP for Dummies. I'm returning to the project and trying to clean things up a bit, and I no longer have the book. Obviously Google is hugely useful, but I think it would be useful to have another book to have open next to me while I'm working. I've been looking at options on Amazon and I see PHP & MySQL: Server-side Web Development by Jon Duckett which looks promising, but there's no shortage of options and it couldn't hurt to ask for a recommendation.

I suspect I'm not using arrays to their fullest and that my queries could be improved through joins etc. The site runs fine but I'm hoping to make it less amateurish and maybe make it easier to maintain. I should probably look into using javascript to make things a little more dynamic but that's a separate category of improvements to explore.
 
i myself hate it when people start shilling alternatives instead of actually helping BUT... php is like a skinwalker, it lures you in with its echoing voice coming from the edge of the woods (people still talking about it), then it tears you into pieces because it hates you (cryptic errors scattered to random places, terrible standard function interfaces, poor documentation, 0days left and right).
unless working with php is a requirement to feed yourself and your family, invest your time in anything else, not because "php le bad", but to save yourself from the needless headaches. perl is simply a better php and python/flask is also nice.
 
to save yourself from the needless headaches. perl is simply a better php and python/flask is also nice
Always gotta give Ruby a nod. If overengineered, interpreted websites are your jam, Ruby on Rails is a great choice and competes with the Python options.
 
i myself hate it when people start shilling alternatives instead of actually helping BUT... php is like a skinwalker, it lures you in with its echoing voice coming from the edge of the woods (people still talking about it), then it tears you into pieces because it hates you (cryptic errors scattered to random places, terrible standard function interfaces, poor documentation, 0days left and right).
See PHP Sadness for all the PHP insanity.
 
i myself hate it when people start shilling alternatives instead of actually helping BUT... php is like a skinwalker, it lures you in with its echoing voice coming from the edge of the woods (people still talking about it), then it tears you into pieces because it hates you (cryptic errors scattered to random places, terrible standard function interfaces, poor documentation, 0days left and right).
unless working with php is a requirement to feed yourself and your family, invest your time in anything else, not because "php le bad", but to save yourself from the needless headaches. perl is simply a better php and python/flask is also nice.
yes if you want a janky sigil-encrusted scripting language to mangle url headers with using regex the best option by far is perl
Always gotta give Ruby a nod. If overengineered, interpreted websites are your jam, Ruby on Rails is a great choice and competes with the Python options.
you can always think bigger and Rewrite It In LISP (this message paid for and endorsed by the official kf programming thread obnoxious programming language supremacists)
 
i myself hate it when people start shilling alternatives instead of actually helping BUT... php is like a skinwalker, it lures you in with its echoing voice coming from the edge of the woods (people still talking about it), then it tears you into pieces because it hates you (cryptic errors scattered to random places, terrible standard function interfaces, poor documentation, 0days left and right).
unless working with php is a requirement to feed yourself and your family, invest your time in anything else, not because "php le bad", but to save yourself from the needless headaches. perl is simply a better php and python/flask is also nice.
I hear you, but right now I'm playing with a hobby site with low stakes and trying to make piecemeal improvements instead of ripping out whole sections of the site and re-building them in a new language. There's no professional angle to this, and the site has mostly been finished and just running fine for the past decade. I don't have any ambition here, I'm just looking for something to reference while I distractedly tinker.
 
I'm just looking for something to reference while I distractedly tinker.
the best thing to reference while you are messing with any program is any documentation that applies to the problem at hand
introductory books that explain all the language concepts are nice, but the most important thing is the manual explaining all of the details
you should probably read introductory books like that with the text editor closed
 
I've got a website I built using php/mysql a while back using PHP for Dummies. I'm returning to the project and trying to clean things up a bit, and I no longer have the book. Obviously Google is hugely useful, but I think it would be useful to have another book to have open next to me while I'm working. I've been looking at options on Amazon and I see PHP & MySQL: Server-side Web Development by Jon Duckett which looks promising, but there's no shortage of options and it couldn't hurt to ask for a recommendation.

I suspect I'm not using arrays to their fullest and that my queries could be improved through joins etc. The site runs fine but I'm hoping to make it less amateurish and maybe make it easier to maintain. I should probably look into using javascript to make things a little more dynamic but that's a separate category of improvements to explore.
You can download books off of https://annas-archive.se/ so you're not wasting money getting a book that may not be useful to you. However, if your code isn't trade secret, put it into chatGPT, ask it questions. You can start going down some rabbit holes just by asking follow up questions on things you don't understand.
 
  • Like
  • Dislike
Reactions: Umikot and Zeftax
What tools and programming languages can I use on a modern Windows machine to ensure that the program I write is compatible even with something as ancient as Windows 98? I don't have anything particular in mind (though being able to create a program with a proper GUI would definitively up the cool factor), I am just asking out of sheer curiosity. Any real-world examples would be appreciated.
 
What tools and programming languages can I use on a modern Windows machine to ensure that the program I write is compatible even with something as ancient as Windows 98? I don't have anything particular in mind (though being able to create a program with a proper GUI would definitively up the cool factor), I am just asking out of sheer curiosity. Any real-world examples would be appreciated.
I assume C and C++ would be your first option. I don't really know what kind of issues compilers could have targeting ancient Windows, and libraries might be a problem sometimes.
You might have to use mingw or something, and since windows 98 doesn't have an x86-64 variant, you will have to build it for 32-bit x86
also there's the nuclear option which is somehow obtaining a version of msvc from the 1990s (good luck using a version of msvc from the 1990s)
 
  • Like
Reactions: SIMON THE PIEMAN
What tools and programming languages can I use on a modern Windows machine to ensure that the program I write is compatible even with something as ancient as Windows 98?
MinGW-GCC is the usual recommendation if you accept Free Software solutions. Just gotta restrict yourself to the appropriate period-specific APIs. Apparently Clang can cross compile as well, target i686-pc-windows-msvc if you have the right cross-compilation enabled. Otherwise you gotta cobble together the appropriate proprietary toolchains. I don't know about the Clang stuff, but I have built some programs using MinGW-GCC recently.
 
What tools and programming languages can I use on a modern Windows machine to ensure that the program I write is compatible even with something as ancient as Windows 98? I don't have anything particular in mind (though being able to create a program with a proper GUI would definitively up the cool factor), I am just asking out of sheer curiosity. Any real-world examples would be appreciated.
Windows 98? I think that if you really want to make sure that it works with 98, you'll probably want to find a copy of the installation disk online and run that in a virtual machine with period accurate tools (check archive.org). You might end up maintaining a separate "legacy" version though; It's been a while since I last used windows but I remember having trouble getting some programs written for XP to work on 7.

If you do manage to create something that will work on both 98 and 11, please share, it sounds like an interesting project.
 
got my code working on DOS (not sharing bc too much of a PL), it compiles and runs fine with Borland C++ 3.0, but for testing I have to use Open Watcom 2.0, since I need to use an extender for fwrite, otherwise it won't save files larger than 36KB. I'm writing the program on some old version of Win11 (I blocked updates) with latest clang. I also test it using VS2005, since CMake support for it was removed only relatively recently.
What tools and programming languages can I use on a modern Windows machine to ensure that the program I write is compatible even with something as ancient as Windows 98? I don't have anything particular in mind (though being able to create a program with a proper GUI would definitively up the cool factor), I am just asking out of sheer curiosity. Any real-world examples would be appreciated.
Visual Studio 2005 is the last Visual Studio that compiles for Windows 98, so I use that. It's debugger also allows peeking into STL containers so it's not the end of the world. There's also the nuclear option of using C89 (i'm doing it) (not recommended for beginners). The best example I can give for something that works on something modern and ancient is ClassiCube.
 
So I'm in the process of getting back into programming after a stint of not doing so. I'm working on a little text dungeon explorer in C and / or Rust, and I gotta say, I like C more than I do Rust... I get that it's supposed to be memory secure, but I don't like how overbearing the compiler feels. Plus, I hear it helps keep the programming socks away, programming in C, that is.
 
I like C more than I do Rust
This is also my experience. There's nothing I dislike more than a computer trying to tell me what it thinks is right or wrong.

Case in point: recently the C compiler pissed me off by whining about a function without a return. Fucking retarded compiler doesn't get that the function exists TO TERMINATE THE PROGRAM and DOESN'T HAVE TO RETURN EVEN!

So I told it to piss off like this:

Code:
die(0);/*implies*/return;

Computers can't solve the halting problem, it is known. So I gotta give the compiler some slack. But development in Rust felt like this only turned to 11. I literally don't care what the compiler thinks. The point of development is that I am the one making the engineering adjudications, for better or worse.
 
Case in point: recently the C compiler pissed me off by whining about a function without a return. Fucking retarded compiler doesn't get that the function exists TO TERMINATE THE PROGRAM and DOESN'T HAVE TO RETURN EVEN!
Then declare that function _Noreturn. Knowing that a function can't return is really important for code like if (bad_condition) { die(); } do_otherwise_unsafe_thing();.
 
Then declare that function _Noreturn.
I appreciate the knowledge. I mischaracterized the circumstance. The die() branch does not return. The function returns elsewhere. I get that this has implications for specific optimizations. The point I'm getting at is that the intent of programming is for a computer to do what you say, not what it thinks you mean. The Rust approach turns this on its head: "I, the compiler, am the adjudicator of the author's meaning, and he's not allowed to do unsafe things."
 
while there is benefit in having a language that does what you say it is also a cause of potential errors when what you say is not what you mean
strict compilers assume you want a program that doesn't do a lot of things like crashing and leaking memory and they then need to prove it from the program you have submitted

i feel like rust could do more inference bullshit for its memory lifetime analysis but anything like that is going to be a bit tedious regardless if it can automatically infer that you meant to make that function argument mutable or whatever
the least retarded option for most applications is probably just biting the bullet and adding a garbage collector and using that lifetime analysis to make a lot of the garbage not need collection

rust troons need to realize that garbage collection won't freeze their 2d pixel platformer for 5 seconds at a time because this isn't the 1980s and garbage collectors can go really fast now
 
Back