Do you agree with this?
Yes, at least for hobby use. If it really needs something more complex than SQLite and an embedded HTTP server, it’s probably going to turn into a second job to keep it working properly.
Interests: programming, video games, anime, music composition
I used to be on kbin as e0qdk@kbin.social before it broke down.
Do you agree with this?
Yes, at least for hobby use. If it really needs something more complex than SQLite and an embedded HTTP server, it’s probably going to turn into a second job to keep it working properly.
Frankly, the only sane option is an “Are you over the age of (whatever is necessary) and willing to view potentially disturbing adult content?” style confirmation.
Anything else is going to become problematic/abusive sooner or later.
I just download the offline installers from GOG and keep those on my NAS organized into folders per game until I want to install them. Not fancy, but it works fine for me.
Try adding some prints to stderr through my earlier test program then and see if you can find where it stops giving you output. Does output work before curl_easy_init
? After it? Somewhere later on?
Note that I did update the program to add the line with CURLOPT_ERRORBUFFER
– that’s not strictly needed, but might provide more debug info if something goes wrong later in the program. (Forgot to add the setup line initially despite writing the rest of it… 🤦♂️️)
You could also try adding curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
to get it to explain more details about what it’s doing internally if you can get it to print output at all.
Does hello world work? You should’ve gotten at least some console output.
#include <stdio.h>
int main()
{
fprintf(stderr, "Hello world\n");
return 0;
}
As a sanity check, does this work?
#include <curl/curl.h>
#include <stdio.h>
#include <stdlib.h>
size_t save_to_disk(char* ptr, size_t size, size_t nmemb, void* user_data)
{
/* according to curl's docs size is always 1 */
FILE* fp = (FILE*)user_data;
fprintf(stderr, "got %lu bytes\n", nmemb);
return fwrite(ptr, size, nmemb, fp);
}
int main(int argc, char* argv[])
{
char errbuf[CURL_ERROR_SIZE];
FILE* fp = NULL;
CURLcode res;
CURL* curl = curl_easy_init();
if(!curl)
{
fprintf(stderr, "Failed to initialize curl\n");
return EXIT_FAILURE;
}
fp = fopen("output.data", "wb");
if(!fp)
{
fprintf(stderr, "Failed to open file for writing!");
return EXIT_FAILURE;
}
curl_easy_setopt(curl, CURLOPT_URL, "https://www.wikipedia.org");
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, save_to_disk);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp);
curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, errbuf);
errbuf[0] = 0; /* set error buffer to empty string */
res = curl_easy_perform(curl);
if(fp)
{
fclose(fp);
fp = NULL;
}
if(res != CURLE_OK)
{
fprintf(stderr, "error code : %d\n", res);
fprintf(stderr, "error buffer : %s\n", errbuf);
fprintf(stderr, "easy_strerror: %s\n", curl_easy_strerror(res));
return EXIT_FAILURE;
}
else
{
fprintf(stderr, "\nDone\n");
return EXIT_SUCCESS;
}
}
That should write a file called output.data with the HTML from https://www.wikipedia.org and print out the number of bytes each time the write callback receives data for processing.
On my machine, it prints the following when it works successfully (byte counts may vary for you):
got 13716 bytes
got 16320 bytes
got 2732 bytes
got 16320 bytes
got 16320 bytes
got 128 bytes
got 16320 bytes
got 16320 bytes
got 1822 bytes
Done
If I change the URL to nonsense instead to make it fail, it prints text like this on my system:
error code : 6
error buffer : Could not resolve host: nonsense
easy_strerror: Couldn't resolve host name
Edit: corrected missing line in source (i.e. added line with CURLOPT_ERRORBUFFER which is needed to get extra info in the error buffer on failure, of course)
Edit 2: tweaks to wording to try to be more clear
You might consider using Google Takeout to export the emails to an mbox file, and then importing that into your new mail server.
Did you flip a power switch on the PSU at some point, perhaps? (Done that one a few times myself…)
It’s the Esperanto word for “forge”, according to the FAQ.
According to their FAQ, they say it’s supposed to be pronounced /forˈd͡ʒe.jo/ and provide an audio clip: https://forgejo.org/static/forgejo.mp4
To me that sounds like “for-jay-oh”.
You can do this by configuring an HTTP server (e.g. Apache) to listen on port 80 and/or 443 (HTTP and HTTPS standard ports, respectively) and select which site to serve based on the name of the site requested. Apache documentation for this feature is here: https://httpd.apache.org/docs/2.4/vhosts/name-based.html
Note the sample config snippet showing how to set up a simple static site serving both www.example.com
and other.example.com
using ServerName
in a VirtualHost
to select between them.
You can also have Apache match a pattern in the URL and reverse proxy to another HTTP server – that can just be another program on the same computer listening on a different port, or could be on another computer entirely. See the simple reverse proxy config example on this page for a starting point: https://httpd.apache.org/docs/2.4/howto/reverse_proxy.html (Note also that you probably don’t need anything further down that page – e.g. the load balancer and failover stuff is not likely to be useful to you for a small personal project.)
Other popular HTTP servers can do this too; I just happen to have done it with Apache before.
Best way to fix that is to join in and post something!
Otome isn’t my personal interest (my sexuality goes the other way), so I don’t have much to say myself, but I’ve seen Elevator7009 trying to build a community first on kbin.social (before that site died) and then on kbin.run (before it died) and now there and I’d like to see her efforts succeed.
If you’re not interested, feel free to ignore it, but if you’d like a place on Lemmy for discussion, there are at least a few people there who’ve been trying their damnedest to get something going.
I’m a huge fan of otome visual novels, but I don’t think it’s something that many here would appreciate lol
Definitely! I usually name my files starting with YYYY_MM_DD
(which makes it easy to sort by the date I started making the file), a number for which entry it was on that day (1,2,3,4… plus sometimes a letter too if I want to keep multiple drafts), and a few words if I have other details I want to remember. e.g. “transcribe_song_by_artist
” or things like “cont_YYYY_MM_DD-entry
” when I continue working on a piece from a long time I ago. Sometimes I add a title after that too if I wanted to give the piece one.
Deliberately copy snippets of a work you’re interested in as a study – e.g. transcribe it – and experiment with elements you find interesting (rhythm, chords, synths, effects, whatever) in small test pieces to make sure you understand what’s going on. Let the ideas stew for a while and then much later try to use the techniques you learned in a real piece.
That’s what I do anyway.
GoG homepage > (your name [drop down menu] when logged in) > “Games” > Click on any game in your collection > Download offline backup game installers
You can download installers for whatever systems the game supports – usually that’s just a Windows .EXE installer (+ several .bin files if the game is large). For games intended to run on Linux w/o WINE, you can select “Linux” from a drop down where it says system and it will give you an .sh file.
If you want to improve significantly, go read someone else’s code and modify it. Try to fix a bug in a program you use, add a feature you want that doesn’t exist already, or even just do something simple for the sake of proving to yourself that you can do it – like compiling it from source and figuring out how to change some small snippet of text in a message box. Even if you don’t succeed, if you put in a serious effort attempting it, you will almost certainly learn a lot from trying.
Edit: changed wording to try to be clearer
Glad I could help you make progress – I hope you can get it all the way working now. Good luck!
How 'bout that! :D
If the SSD itself is OK, then it was probably trying to boot the SSD still. The blank screen issue might have to do with the graphics drivers then? I remember having a similar blank screen problem with Ubuntu a long time ago where I had to put in “nomodeset” as a parameter in GRUB when booting until I got the right drivers set up.
It’s really about lowering cognitive load when making edits. It’s not necessarily that someone can’t figure out how to do something more sophisticated, but that they’re more likely to get things right if the code is just kind of straightforwardly dumb.
The last two are definitely situational – changing things like that might lower cognitive load for one kind of work but raise it significantly for another – but I can see where they’re coming from with those suggestions.