Programming thread

  • Want to keep track of this thread?
    Accounts can bookmark posts, watch threads for updates, and jump back to where you stopped reading.
    Create account
It's a nested deduplication tool, so it not only looks at the file hash, but for zip,7z,rar,chd, etc it goes in and hashes the content too so I can figure out how many TB of my "retro" game and computer stuff is really duplicates.
For a decent estimate, unpack as much as you can and use lrzip. I did this to a MAME set once and it was DRASTIC. This is a full deduplication, so if different cabinets used the same assets, it will tend to coalesce them. You seem to want straight "dupes" but that's weird with consoles because there are quasi dupes like translations to consider.
 
Yes, it's the class you take in college that tells you about all the languages you'll never use to make money. I'm not saying it's not good to know they exist, but you likely won't be seeing them ever again unless you need the skill to dunk on people on the Internet.

Python, for better or worse, is today's glue language. It's not bad from a programming point of view, it gets the job done, has the familiar control and loop flow and function syntax to every other common language.

I'm working on one of those "Write something that you want to write" projects right now and Python is pissing me off about the string vs byte stuff. Yes, I know my data has random unicode and random high-ascii and other assorted garbage, just shut up and stick it in the database. It's a nested deduplication tool, so it not only looks at the file hash, but for zip,7z,rar,chd, etc it goes in and hashes the content too so I can figure out how many TB of my "retro" game and computer stuff is really duplicates. But the filenames are also "retro" and sometimes don't obey the holy unicode laws. Maybe I should have just written it in C where everything can be a uint8[].
Python not having a proper char type, and strings obeying this weird recursive relationship of str :- Sequence[str] is a genuine pain in my ass, and IIRC, this exact oddity has caused bugs with static tools like mypy before.
 
I have a notion to hack together a primitive vi in Guile to vaguely mog on Emacs never adopting Guile. I don't use that many esoteric vi features or anything. Basic is fine for me. What editors do y'all use? I know nvim is popular here. Do you regularly use its odder features?
You might want to pattern your intended vi clone on one that exists but isn't as complicated as neovim or even just vim. nvi and elvis come to mind.
Python's niche is pretty much internal uses only, you usually should not publish production code which uses Python.
Why
 
You might want to pattern your intended vi clone on one that exists but isn't as complicated as neovim or even just vim. nvi and elvis come to mind.
BusyBox vi was more my thought. We'll see. I don't really have as much project time as I'd like but the notion is fun.

I solicit features people notably use to get a sense of breadth. I could use this, tho. I don't use any but a few vim features, personally. vim is way overkill for me.
 
For a decent estimate, unpack as much as you can and use lrzip. I did this to a MAME set once and it was DRASTIC. This is a full deduplication, so if different cabinets used the same assets, it will tend to coalesce them. You seem to want straight "dupes" but that's weird with consoles because there are quasi dupes like translations to consider.
I know there are likely TB of 100% redundancy between CHD, BIN/CUE and ISO. I just need to be able to compare them.
And if I had the space to unpack anything, I might try that.
internal uses only
Python warning sticker:
2025-09-09_12-22.webp
 
Hey all, recently I started out my “journey” in programming and I’m in the middle of learning HTML to familiarize myself. I was told to start there but once I’m done what should I move onto afterwards?
Creating a web page is a great start; A little bit of HTML, throw in some JavaScript to make it do stuff, all you need is a text editor and a web browser. After that, you can set up a simple web server (is xampp still around?) and write some PHP to generate HTML for you, or set up a (Fast)CGI gateway and use whatever language you like (like C).

The web needs more small, personal sites.

take: python is fucking dogshit and it's not even a very good beginner language imo
yes, i do want to cause a fight
(Am I too late for the fight?)
Python is (second) best language, in fact Python is what Rust (and C++) should have been.

Any decent "higher level" language was created to solve real problems with the level beneath it, usually at the cost of performance and maybe flexibility. Python solves some problems with C that are not strictly programming (e.g. windows vs *nix, unicode, etc) but you still have C available if you need it (a lot of Python modules are actually just wrappers around C libraries but with a nicer interface). Modern hardware is fast enough that performance isn't, and doesn't need to be, a concern for the beginner programmer, and I think that it can be a decent trade-off in more cases than some would be willing to admit.

Everyone should still learn C though, and performance is still a strong consideration for any serious program.

I'm working on one of those "Write something that you want to write" projects right now and it is pissing me off about the string vs byte stuff. Yes, I know my data has random unicode and random high-ascii and other assorted garbage, just shut up and stick it in the database. It's a nested deduplication tool, so it not only looks at the file hash, but for zip,7z,rar,chd, etc it goes in and hashes the content too so I can figure out how many TB of my "retro" game and computer stuff is really duplicates. But the filenames are also "retro" and sometimes don't obey the holy unicode laws. Maybe I should have just written it in C where everything can be a uint8[].
In Python? Are you reading the file as text and not binary data? If the filenames are broken, surely this is something that you would want to fix instead of ignoring? Unless you're a purist "archive exactly, even the flaws" type.
 
Unless you're a purist "archive exactly, even the flaws" type.
Well, yes, otherwise when I go to update from the source(s) then they don't match and I get even more duplicates.
And the filenames aren't "Broken" they're just not Python friendly, likely some other encoding like CP1252, but rather than play guess the encoding I want to just record the filename as stored on the disk in the database, and unzip the file, and do other horrible things to the file, but using the original name.
 
Python is (second) best language, in fact Python is what Rust (and C++) should have been.
Am I getting ragebaited?

Python is only a step up from shell. Making any decently sized program in it is pain. It lacks the best feature of C++ (that Rust borrowed ;)), which is RAII.
Also Python performance is actually so horrible that it starts to matter again. Unless you actually treat is as quasi shell, only gluing foreign libraries. Is it really that good for learning programming though?
 
Am I getting ragebaited?

Python is only a step up from shell. Making any decently sized program in it is pain. It lacks the best feature of C++ (that Rust borrowed ;)), which is RAII.
Also Python performance is actually so horrible that it starts to matter again. Unless you actually treat is as quasi shell, only gluing foreign libraries. Is it really that good for learning programming though?
Python isn’t comparable IMO to something like bash because it has a type system, that at least is the deciding factor for me when I have to choose between the two, and it depends on the application.
For scientific computing and ML though, Python is the play, the numpy family of libraries are all built off of Apache arrow these days, so there’s an absurd degree of compatibility with other tools and even languages
 
Python isn’t comparable IMO to something like bash because it has a type system, that at least is the deciding factor for me when I have to choose between the two, and it depends on the application.
Sure, that's why I call it a step up.

For scientific computing and ML though, Python is the play, the numpy family of libraries are all built off of Apache dart these days, so there’s an absurd degree of compatibility with other tools and even languages
True again. However unless you specifically want to do scientific computing or ML, Python is poor choice for learning how to program. Python just make it easy to ignore any engineering, you just write some code that calls what you need and you're done.
 
my perfect language would be C that abstracts away string fuckery (similar way rust does except without the String::new() bullshit) and maybe a foreach :)
C++
you can just stick to writing simple C style code in it, and pick for yourself what extra features you like and want to use.
don't want to fuck around with raw pointers to null terminated char arrays anymore? just use std::string.
don't want to handle primitive pointer based arrays and raw for loops? use std::vector and std::array and for (elem: container) {} loops.


c++ gets a bad rep because it's bloated as fuck, with all kinds of crazy features that can push code complexity to insane levels, but if you don't want to deal with that then you can just stick to using a small subset of the language that you like and simply ignore the rest, then you have the "C except with a few specific modern features" language you want.
 
Python just make it easy to ignore any engineering, you just write some code that calls what you need and you're done.
But, that is programming. There's a reason most Rust and JS and Golang projects all, like Python, have dependency lists longer than most of the code I've ever written.
The majority of non-classically-trained programmers got their start writing something to do something they wanted to do. Maybe then they made it better, maybe then they changed languages or got out the crayons and did a formal design for version 2. For instance, I know that my MATI transcription tool finishes up by comparing every file to every other file, so (n^2)/2 and I simply don't care. It did make me figure out how to deal with python's subprocess module(again) but the code would be largely the same in any language.

You don't need to teach most people "formal" programming, some get into it later and have to work for money but for a lot of programmers, in this thread and elsewhere they just need a thing to do a thing. Giving them Python to start is fine, just like Perl, just like QuickBasic, just like Commodore Basic, etc. It has the same fundamentals as most other popular languages like control flow, variables and functions. And that's a pretty good start.
 
True again. However unless you specifically want to do scientific computing or ML, Python is poor choice for learning how to program. Python just make it easy to ignore any engineering, you just write some code that calls what you need and you're done.
It's still lost on me why programming should be the exception to a general rule of STEM pedagogy which is: "start simple, then make things complex later". No one learns physics or chemistry like what is being suggested here. Or even music for example: typically no one starts with Bach or Philip Glass.
 
Last edited:
It's still lost on me why programming should be the exception to a general rule of STEM pedagogy which is: "start simple, then make things complex later". No one learns physics or chemistry like what is being suggested here.
To be fair, I think it's way easier to pick up bad habits with programming than it is in a traditional STEM field, there are plenty of wrong ways to do something in CS.
 
Back
Top Bottom