|
quote:C features AEMI, which stands for Automatic-Exclamation-Mark-Insertion. If you forget to end a statement with an exclamation mark, C will helpfully insert one for you! Jigsaw fucked around with this message at 00:56 on Aug 7, 2023 |
# ? Aug 7, 2023 00:53 |
|
|
# ? Jun 6, 2024 14:21 |
|
I was looking through the issues and PRs and apparently at one point there was talk of time travel, where you could say "give me the state of this variable as it was 5 seconds ago" or "give me the value of these stocks as they will be 10 minutes from now" but for whatever reason that seems to have been deleted from the readme.
|
# ? Aug 7, 2023 07:57 |
|
Carbon dioxide posted:I was looking through the issues and PRs and apparently at one point there was talk of time travel, where you could say "give me the state of this variable as it was 5 seconds ago" or "give me the value of these stocks as they will be 10 minutes from now" but for whatever reason that seems to have been deleted from the readme. There's still some of that there.
|
# ? Aug 7, 2023 15:31 |
|
quote:To run C, first copy and paste this raw file into chat.openai.com.
|
# ? Aug 7, 2023 15:58 |
|
*were run. Sorry (not sorry). Coding horrors, featuring the subjunctive mood.
|
# ? Aug 7, 2023 16:03 |
|
OddObserver posted:*were run. Paging forums user Subjunctive
|
# ? Aug 7, 2023 17:45 |
|
nullfunction posted:Coding Horrors: Booleans are stored as one-and-a-half bits. Coding horrors: When perfection is achieved and there is nothing left to delete
|
# ? Aug 8, 2023 09:09 |
|
I have this little app that I am making for myself for IPTV watching, and I'm adding to it now the ability to retrieve, remember and display the current channel's schedule. That is, get the EPG (Electronic Program guide) listing. All fine and cool, I have the URL, returns the current program the next 4 of them. A nice JSON to boot so things are looking good (documentation for said format seems to have disappeared from the internet so I'm just guessing things). Sample listing:JSON code:
After a bunch of time poking around, I realized. The server's timezone, which was presented when I authenticated for the first time, is "Europe/Amsterdam". The time, as a string, is in the server's timezone, GMT+2 right now, so it all makes sense. But what about the timestamp? Well, that's not "number of seconds since Jan 1st 1970, 00:00:00 GMT" but instead "number of seconds since Jan 1st 1970, 00:00:00 Europe/Amsterdam". Because ... of course. I can understand the string representation of the date/time to be in the server's timezone, but the number of seconds too? Really? Programmer idiocy, PHP (the server is running PHP) idiocy, both .... sigh.
|
# ? Aug 15, 2023 01:01 |
|
Volguus posted:I have this little app that I am making for myself for IPTV watching, and I'm adding to it now the ability to retrieve, remember and display the current channel's schedule. That is, get the EPG (Electronic Program guide) listing. All fine and cool, I have the URL, returns the current program the next 4 of them. A nice JSON to boot so things are looking good (documentation for said format seems to have disappeared from the internet so I'm just guessing things). Sample listing: I'm pretty confident Unix timestamps are specifically since 1970/01/01 00:00:00 UTC, so that's...definitely a fuckup. Is this like an official service or some nerd selfhosted one, because if it's the latter I'd shrug and add/subtract 7200 from the timestamp and go on with my day.
|
# ? Aug 15, 2023 01:49 |
|
Falcon2001 posted:I'm pretty confident Unix timestamps are specifically since 1970/01/01 00:00:00 UTC, so that's...definitely a fuckup. Is this like an official service or some nerd selfhosted one, because if it's the latter I'd shrug and add/subtract 7200 from the timestamp and go on with my day. It's probably a nerd hosted i guess, I have no idea. But yeah, that's what I'm gonna do just calculate the difference between server's timezone and mine, subtract and move on. Still, i don't even wanna know what kind of horrors lie inside that server if the responses are like this.
|
# ? Aug 15, 2023 01:52 |
|
If the server timezone is anything but UTC then it's probably running Windows and PHP on Windows explains the rest of the horror.
|
# ? Aug 15, 2023 02:36 |
|
returning dates in both incorrect unix timestamps and that dumbass start and end format instead of a single proper iso8601 string for the start and end (or proper unix timestamps...just anything but the current two wrong formats) is the real horror here
dc3k fucked around with this message at 07:20 on Aug 15, 2023 |
# ? Aug 15, 2023 07:18 |
|
Whichever of you nerds reading this thread owns that server, since yesterday you fixed it. Thanks. Now the timestamps are proper .... timestamps. Was curious as how can that number could even be returned before, and I think I may have found the code that runs on that server: https://github.com/tweakunwanted/OpenXC-Main/blob/master/wwwdir/player_api.php Going over the obfuscation (why???), we can see the SQL pretty clearly: SQL code:
quote:If called with no argument, returns a Unix timestamp (seconds since '1970-01-01 00:00:00' UTC) as an unsigned integer. If UNIX_TIMESTAMP() is called with a date argument, it returns the value of the argument as seconds since '1970-01-01 00:00:00' UTC. date may be a DATE string, a DATETIME string, a TIMESTAMP, or a number in the format YYMMDD or YYYYMMDD. The server interprets date as a value in the current time zone and converts it to an internal value in UTC. Clients can set their time zone as described in time zones. Combined with other horrors (server timezone, maybe running windows, etc.) I can kinda see how a wrong timestamp could be returned.
|
# ? Aug 23, 2023 01:15 |
|
I've been wondering for years why we had binary files of a few MB committed to our repo with names like "os", "sys", "numpy". Obviously committed in error (my users are idiots and my predecessors didn't think of commit guards.) Yesterday I solved the puzzle. If make an executable script under Linux, that contains: code:
If you add a single blank line at the very top of the script: code:
Eventually bash probably shat the bed, reaching some python code that wasn't also valid bash commands, so that particular behaviour wasn't very obvious. I deleted all these files from the repo during a recent upgrade of the server hosting it, so sadly I don't have copies. Maybe someone screenshot something incriminating.
|
# ? Aug 23, 2023 12:03 |
|
If it was on a repo couldn’t you rollback to a previous state of the repository and view the images? Or are you saying all of that supporting data got purged from the box hosting the repo
|
# ? Aug 23, 2023 13:16 |
|
Yes, we actually deleted those files from the repo and repo history, as there were a bunch of big, unnecessary binary files bulking up the repo, which made backups and checkouts slower as well as taking up space on /home for every user. I probably have a backup somewhere, let's see if I can be arsed to do something about it.
|
# ? Aug 25, 2023 08:45 |
|
My horrors are always coding setup related. It's such a pain always to move on to a new language and setup it. I have a windows pc where I use my editor, and a remote connection to a linux server with VsCode. Now I'm trying to learn haskell, thanks to university. I installed ghcup to linux, and I have the haskell extension installed on local windows pc, and on the remote linux server. Vscode still says "project requires ghcup but it isn't installed.". It always takes hours to setup anything.. E: apparently it must be installed as user, not as root. New try... Ihmemies fucked around with this message at 11:09 on Aug 29, 2023 |
# ? Aug 29, 2023 10:50 |
|
Ihmemies posted:My horrors are always coding setup related. It's such a pain always to move on to a new language and setup it. I have a windows pc where I use my editor, and a remote connection to a linux server with VsCode. Now I'm trying to learn haskell, thanks to university. I installed ghcup to linux, and I have the haskell extension installed on local windows pc, and on the remote linux server. Vscode still says "project requires ghcup but it isn't installed.". Honestly I agree with this 100 percent. Especially going to a new company or coding environment it's like whoof, how the hell do I get this setup properly.
|
# ? Aug 29, 2023 16:42 |
|
There's the coding environment and then there's the compilation/execution environment hell. Worse I had to work on was an HPC project developed on a single server and exclusively run on that single server. That is, everyone ssh'ed into the server to compile and run the code. The bigger the codebase got the more daunting the task became to make it compile or run elsewhere. The latency was getting to me (and the admins refused to install mosh), on account of being on the other side of the world, so I bit the bullet. It took about a week to get most of it to compile on a different linux server. In the end there were some processes I still had to kill manually because of some weird MPI difference, even if I was using the exact same library version. At some point a different team was brought in just to do the CI, with about double the headcount than the actual code touchers. And that was more to recreate the exact same server environment in docker rather than to change the project to be less environment-specific.
|
# ? Aug 29, 2023 17:40 |
|
The hardest thing Ive had to do in all my time working is setting up an older version of ruby on a freshly updated mac
|
# ? Aug 29, 2023 18:23 |
|
I've worked at Google my entire post college life and I dread ever having to learn things outside of our highly tooled ecosystem.
|
# ? Aug 29, 2023 18:30 |
|
Chin Strap posted:I've worked at Google my entire post college life and I dread ever having to learn things outside of our highly tooled ecosystem. Imagine people trying to follow Google's processes without the tooling.
|
# ? Aug 29, 2023 19:00 |
|
I just spent half a day banging my head against a wall setting up an r environment to run an ex-colleague’s load-bearing scripts, which I guess is a significant improvement on the last time when it took me nearly a week. Turns out the package system has a neat feature where it will download a corrupted .zip about one time in every three, and then hide this fact from you by announcing it right before ten screens of messages about how the other packages installed just fine.
|
# ? Aug 29, 2023 19:28 |
|
leper khan posted:Imagine people trying to follow Google's processes without the tooling. I periodically try to argue that we might as well shut down our test environment since we don’t actually do any testing there beyond ‘okay that built’ and we have never in three years caught anything in test that wasn’t also caught in dev much earlier but the siren call of the devops blogs is too strong
|
# ? Aug 29, 2023 19:33 |
|
it's a shame the nix documentation is completely inscrutable because it's almost there as a "just copy this file and you'll have all the dev tools you need" tool
|
# ? Aug 29, 2023 19:55 |
|
Chin Strap posted:I've worked at Google my entire post college life and I dread ever having to learn things outside of our highly tooled ecosystem. Having worked within and without Google, some tooling on the outside is Good, Actually, and some things within Google are Bad, Actually (don't worry, they'll just become unmaintained load bearing services in a couple years though! ). Google has some very smart people doing useful things, but Google's infrastructure needs are pretty unique outside of similarly large companies like Facebook (like needing to invent Piper, etc). Many Googlers also have a strong tendency to enjoy the smell of their own farts. There's a lot of stuff that's very good by virtue of being continuously maintained by a dedicated staff, without whom the whole thing would grind to a halt. If you're not supporting infrastructure on Google's scale, you simply do not need it, and can do just fine or better without it. Or, as internal cost cutting continues, you'll just get to learn how well you can do without it anyway! As someone who does Android development, I enjoy NOT having to pay the Blaze Tax to do any kind of incremental change.
|
# ? Aug 29, 2023 20:05 |
|
I'm moving a Linux system still running on 2.2.14 (and the build scripts and such are basically untouched since 2002 or 2006 or whenever that kernel came out) forward to a Debian 10 LTS 4.19 kernel and... gently caress everything about this lol The build folder looks like someone vomited a bunch of bullshit scripts and archives into a single folder. Top it off with a hellish 2000+ line script that kicks it off and the nonsense in there. (Why use git branches and commits? Just comment everything out.) I hate this job. Mellow_ fucked around with this message at 20:07 on Aug 29, 2023 |
# ? Aug 29, 2023 20:05 |
|
Mellow_ posted:I'm moving a Linux system still running on 2.2.14 (and the build scripts and such are basically untouched since 2002 or 2006 or whenever that kernel came out) Mellow_ posted:(Why use git branches and commits? Just comment everything out.)
|
# ? Aug 29, 2023 20:50 |
|
I'm just getting into Docker for building a few things and plan to dive into it more for projects with idiosyncratic build poo poo. Will that save as much pain as it feels like it will? Or am I about to run into a wall? I can imaging there will be a ton of IDE issues, since that can't run in Docker, but I've definitely had problems where the IDE thought it was fine, but the build system was actually broken, so I assume setting up the IDE is easier.
|
# ? Aug 29, 2023 21:53 |
|
Falcon2001 posted:Honestly I agree with this 100 percent. Especially going to a new company or coding environment it's like whoof, how the hell do I get this setup properly. My largest struggle is always setting up Gradle for a new Kotlin project. Even copying the setup from an existing working project somehow seems to always run into some incompatibility or other.
|
# ? Aug 29, 2023 22:26 |
|
Yeah and letting IDEA do it never seems to go quite right either
|
# ? Aug 29, 2023 22:38 |
|
StumblyWumbly posted:I'm just getting into Docker for building a few things and plan to dive into it more for projects with idiosyncratic build poo poo. Docker’s good and worth learning. I’ve never done anything complicated with it, like I think my Dockerfile is never more than like 20 lines, but it works great for my cases.
|
# ? Aug 30, 2023 00:04 |
|
The problem that Docker solves is a sad one that shouldn't have existed, but it does solve it.
|
# ? Aug 30, 2023 00:30 |
|
The best use for docker is setting up development environments and creating binary matching builds.
|
# ? Aug 30, 2023 01:17 |
|
ExcessBLarg! posted:To be fair, that machine predates git by about five years. People didn't use rcs quite as enthusiastically. Unfortunately most of the commenting has occurred in the last two years Also the old OS was Slackware.
|
# ? Aug 30, 2023 02:09 |
|
I did find, recently, another use for containers. I have an application (I made it) to watch IPTV . It's a desktop app. Well, my ISP got stupid and it started to throttle my streams. One solution is to use a VPN. Now, as far as I can tell I have a few solutions to that: - Use a VPN on my computer. Ugh ... kinda not quite ideal, I would rather not if at all possible. - Use TVHeadend in a VM, and use VPN there: done that, works, but to be fair TVHeadend is a bit annoying in its behaviour. It's hard to configure properly, I'm sure that it can do many things, but I can't be arsed to learn the ins and outs of it. Too complex for its own good. - Use a proxy (squid let's say) in a VM and use the VPN there and point my application to go through the proxy: That could work, maybe, depending how ffmpeg's proxy support is. I haven't researched this too much - Put my application in a container, start the VPN there, in the container and launch it like a desktop app "normally". Was a bit annoying to setup, ended up using x11docker for that, dbus passthrough seems to be a bit flaky, no idea what that thing does under the hood, but it works. For now. So there, another use for containers.
|
# ? Aug 30, 2023 02:55 |
|
Volguus posted:Now, as far as I can tell I have a few solutions to that: You could also create a new network namespace and use nsenter when lauching the IPTV software to place it in the new namespace. This is closer to what the container solution does. Also the container solution is fine, but if running it fully in a container presents other problems there's a few alternatives.
|
# ? Aug 30, 2023 15:05 |
|
ExcessBLarg! posted:Perhaps a simpler solution would be to run the IPTV software as a dedicated user and then set an ip rule on the uid to use the VPN interface. I wasn't aware of these alternatives. I'll explore them to see if they're easier/better.
|
# ? Aug 30, 2023 19:21 |
|
FlapYoJacks posted:The best use for docker is setting up development environments and creating binary matching builds. I love how easy docker makes things, but christ alive Docker Desktop hammers by 256gig SSD on my work windows laptop, constantly having to compress the file system just to get 'some' useable space.
|
# ? Aug 30, 2023 21:47 |
|
|
# ? Jun 6, 2024 14:21 |
|
Slimchandi posted:I love how easy docker makes things, but christ alive Docker Desktop hammers by 256gig SSD on my work windows laptop, constantly having to compress the file system just to get 'some' useable space. Docker should never be used in anything but Linux. Put docker in WSL2.
|
# ? Aug 30, 2023 22:59 |