Off-and-on trying out an account over at @[email protected] due to scraping bots bogging down lemmy.today to the point of near-unusability.

  • 116 Posts
  • 4.34K Comments
Joined 2 years ago
cake
Cake day: October 4th, 2023

help-circle
  • Haven’t done much with Windows for a long time, but IIRC Windows looks in the current directory for DLLs by default, and it has it in subdirectories. IIRC, there’s some way to make an app search relative directories in the exe and maybe the Ginger guys dicked that up? WINE seems to run it if I move the DLLs into the base directory.

    $ wget https://github.com/DominaeDev/ginger/releases/download/release-1.6.2/ginger_v1.6.2.zip
    $ unp -U ginger_v1.6.2.zip 
    $ cd ginger_v1.6.2/
    $ wine Ginger.exe 
    Unhandled Exception:
    System.TypeLoadException: Could not load type of field 'Ginger.SpellChecker:s_Hunspell' (0) due to: Could not load file or assembly 'NHunspell, Version=1.2.5554.16953, Culture=neutral, PublicKeyToken=1ac793ea843b4366' or one of its dependencies.
    $ mv Libraries/x64/* ./
    $ wine Ginger.exe
    

    And then it works.

    EDIT: Hmm. I was thinking that Windows might have something like -rpath to search relative paths for DLLs, but it sounds like it doesn’t:

    https://ibob.bg/blog/2018/12/16/windows-rpath/

    Anyway, you should know that on other operating systems when linking with a shared library (.so or .dylib file), you can supply a search path for it to the linker itself. In fact, to some people’s occasional frustration, the default search path when linking with no specific arguments is the absolute path to the shared library. This search path is called an rpath.

    If you do multi-platform programming, you’ve probably experienced frustration with the lack of rpaths on Windows.

    If you’re not a Windows programmer, I don’t know why you’re reading this article, but to put it simply: In Windows, shared libraries, or DLLs, don’t have rpaths. Instead the executable searches for a shared library by filename in a variety of places which you cannot control when building the executable. It searches the files in the same directory as the executable, then files in your PATH environment variable, and some other insignificant places. And if the DLL isn’t there?…

    When dealing with third party libraries, you typically don’t have such fine control over where their DLL files end up, so copying them alongside your executables is often the choice. This is probably the most popular solution for third party libraries. It’s employed by many existing package managers. This requires a common output directory6 and carries with it the drawbacks of having one, but it’s also wasteful, having multiple copies of the same files over and over again.

    To avoid this waste there’s another popular approach here and that is copying or installing third party DLLs to some directory in your PATH. This fixes the problem of filename clashes, but introduces a new one: the so called DLL Hell. DLL Hell is when you have multiple DLLs with the same name in your PATH. Executables will automatically load the first one which matches, but that may not be what you want. There might be differences in version or Debug/Release differences. Such problems are hard to detect and often lead to crazy behavior or, worse, subtle and hard to detect bugs. There is a way to deal with that on Windows (I mentioned redirection manifests above), but it requires you to have control over the DLLs as opposed to the executables. If a third-party vendor doesn’t support redirection manifests, it may be really hard to add them on your own.

    So it sounds like copying DLLs a la what I did above isn’t an unheard-of approach…


  • It looks like I was wrong about it being the default journaling mode for ext3; the default is apparently to journal only metadata. However, if you’re journaling data, it gets pushed out to the disk in a new location rather than on top of where the previous data existed.

    https://linux.die.net/man/1/shred

    CAUTION: Note that shred relies on a very important assumption: that the file system overwrites data in place. This is the traditional way to do things, but many modern file system designs do not satisfy this assumption. The following are examples of file systems on which shred is not effective, or is not guaranteed to be effective in all file system modes:

    • log-structured or journaled file systems, such as those supplied with AIX and Solaris (and JFS, ReiserFS, XFS, Ext3, etc.)

    • file systems that write redundant data and carry on even if some writes fail, such as RAID-based file systems

    • file systems that make snapshots, such as Network Appliance’s NFS server

    • file systems that cache in temporary locations, such as NFS version 3 clients

    • compressed file systems

    In the case of ext3 file systems, the above disclaimer applies (and shred is thus of limited effectiveness) only in data=journal mode, which journals file data in addition to just metadata. In both the data=ordered (default) and data=writeback modes, shred works as usual. Ext3 journaling modes can be changed by adding the data=something option to the mount options for a particular file system in the /etc/fstab file, as documented in the mount man page (man mount).




  • It’s not, and I think that Excel is often used where other tools would be more-appropriate because of existing expertise with Excel, but you don’t necessarily need to use a database for all tasks where a bunch of data gets stored.

    I have plenty of scripts that deal with large amount of schlorped up data that just leave it in a text file, and Unix has a long and rich tradition and toolset for using text files for data storage and processing data in them in bulk.

    GNU R, a statistics package, has a lot of tools to schlorp up data from many sources, including scraping it from the web, and storing it large data frames to be processed and maybe visualized. It’s probably rather more performant than databases for some kinds of bulk data processing.

    Okay, so…is it appropriate here?

    One thing that spreadsheets can be handy for is for making specialized calculators that plonk some data into some simple model and spit out a result. Having, say, the current temperature in a given city may be a perfectly reasonable input to make available to a spreadsheet, I think.


  • ind the address of the video that’s currently displayed on the page (to download with wget or yt-dlp)

    I think that what you’re wanting to actually do isn’t use the Firefox developer console, but rather the list of media.

    Click on the lock icon in the URL bar. Under that, choose “Connection secure”. Under that, “More information”. Click on the “media” tab. You’ll have a list to the URL of the videos on the page.

    For many sites, though, you can just feed the address of the page, not the video embedded in the page, to yt-dlp and it’ll go looking and can find the video itself.

    EDIT: If you’re new to yt-dlp and your URL has characters that bash interprets specially, like “&” or something, be sure to put quotes around the URL to avoid that.

    E.g.:

    https://www.youtube.com/watch?v=WOUY5H6b6N0&t=30s
    

    Should be:

    $ yt-dlp 'https://www.youtube.com/watch?v=WOUY5H6b6N0&t=30s'
    


    1. The best engineers are obsessed with solving user problems.

    Ehh. Not sure I agree. I mean, I think that there is a valid insight that it’s important to keep track of what problem you’re actually trying to solve, and that that problem needs to translate to some real world, meaningful thing for a human.

    But I also think that there are projects that are large enough that it’s entirely reasonable to be a perfectly good engineer who isn’t dealing with users much at all, where you’re getting requirements that are solid that have been done by up someone else. If you’re trying to, say, improve the speed at which Zip data decompression happens, you probably don’t need to spend a lot of time going back to the original user problems. Maybe someone needs to do so, but that doesn’t need to be the focus of every engineer.

    1. Bias towards action. Ship. You can edit a bad page, but you can’t edit a blank one.

    I think I’d go with a more specific “It’s generally better to iterate”. Get something working, keep it working, and make incremental improvements.

    There are exceptions out there, but I think that they are rare.

    1. At scale, even your bugs have users.

    With enough users, every observable behavior becomes a dependency - regardless of what you promised. Someone is scraping your API, automating your quirks, caching your bugs.

    This creates a career-level insight: you can’t treat compatibility work as “maintenance” and new features as “real work.” Compatibility is product.

    This is one thing that I think that Microsoft has erred on in a number of cases. Like, a lot of the value in Windows to a user is a consistent workflow where they can use their existing expertise. People don’t generally want their workflow changed. Even if you can slightly improve a workflow, the re-learning cost is high. And people want to change their workflow on their own schedule, not to have things change underfoot. People don’t like being forced to change their workflow.

    The fastest way to learn something better is to try teaching it.

    I don’t know if it’s the fastest, but I do think that you often really discover how embarrassingly large the gaps in your own understanding are when you teach it.

    A little kid asking “why” can be a humbling experience.



  • That’s because, according to the rumours, the jailbreak method can only be done with a physical version of one particular game.

    The game in question is Star Wars Racer Revenge, which, before the rumours, was selling for around $50. Now, listings on eBay are as high as $500, meaning that the price has increased tenfold.

    At a certain point, if you want an open system, it’s gotta be cheaper and less hassle to just get a PC than trying to start with a closed system and pay $500 to try and set up a brittle jailbreak of it.

    EDIT: I guess maybe some of these people are trying to get control of their environment specifically to cheat specifically in competitive multiplayer games in a console environment, and I suppose that it wouldn’t be the same on a PC for them, or maybe to pirate console-exclusive games that can’t be emulated, but outside of those very specific niches…



  • How could Lemmy implement an age verification system?

    I don’t think that it would matter much. Assuming that the legislation applies to the Threadiverse and doesn’t have some sort of exception, it’d still be effectively unenforceable, because most instances don’t operate in France’s legal jurisdiction, and I imagine that most users, even in France, don’t really care whether their instance is in France or not.


  • While I’m not enthusiastic about the idea of stripping citizenship as a general principle — so many other legal rights rest upon that — the UK doesn’t have constitutional restrictions on doing so the way the US does:

    https://en.wikipedia.org/wiki/Afroyim_v._Rusk

    Afroyim v. Rusk, 387 U.S. 253 (1967), was a landmark decision of the Supreme Court of the United States, which ruled that citizens of the United States may not be deprived of their citizenship involuntarily.[1][2][3] The U.S. government had attempted to revoke the citizenship of Beys Afroyim, a man born in Poland, because he had cast a vote in an Israeli election after becoming a naturalized U.S. citizen. The Supreme Court decided that Afroyim’s right to retain his citizenship was guaranteed by the Citizenship Clause of the Fourteenth Amendment to the Constitution.

    https://en.wikipedia.org/wiki/Vance_v._Terrazas

    Vance v. Terrazas, 444 U.S. 252 (1980), was a United States Supreme Court decision that established that a United States citizen cannot have their citizenship taken away unless they have acted with an intent to give up that citizenship.

    …and in fact has law explicitly permitting the Home Secretary to do so if he wants:

    https://en.wikipedia.org/wiki/Nationality,_Immigration_and_Asylum_Act_2002

    Deprivation of British nationality

    Under amendments made by the act to the British Nationality Act 1981, British nationals can be deprived of their citizenship if the Secretary of State is satisfied they are responsible for acts seriously prejudicial to the vital interests of the United Kingdom or an Overseas Territory.[3] This power is restricted to individuals who have dual citizenship.[3]

    https://en.wikipedia.org/wiki/Immigration,_Asylum_and_Nationality_Act_2006

    The Act contains several provisions empowering the Home Secretary to deprive a person of British citizenship (or Right of Abode) if it is considered that such deprivation is “conducive to the public good”.

    https://en.wikipedia.org/wiki/Nationality_and_Borders_Act_2022

    It can also remove British citizenship from dual nationals without notice.

    In Begum’s case, there was particular controversy, because the UK is signatory to international treaties that it will not strip a single national’s citizenship, and it was very questionable whether Begum was a dual national; the UK took the position that she was, whereas Bangladesh, which was supposed to be the country of which she was a dual national, did not consider her to be a Bangladeshi national. My own view is that countries should be considered authoritative on whether-or-not a person holds citizenship there; doing otherwise would lead to all kinds of legal problems, like being able to deny consular access to foreign nationals (“you aren’t really a citizen of that country”) and such, so the UK should have accepted Bangladesh’s position on Begum’s nationality.

    But there’s also the broader question of whether a government should be able to strip citizenship at all. In the US, the answer is “no”, but, well, that ain’t how the UK presently works.




  • I would not try to buy a product with a built-in battery for life. If you want a battery-powered speaker and want to keep it for a long time, I’d go for something that has standardized, removable batteries.

    EDIT: It looks like a lot of the products out there (a) are Bluetooth, which I don’t know if you want or not (but I wouldn’t consider that something that will be a buy-it-for-life feature either, since Bluetooth has steadily seen protocol change over time and I doubt that twenty years down the road, the state-of-the-art in Bluetooth will be what it is today) and (b) have built-in lithium batteries. What you might consider doing is getting a radio with a built-in speaker with aux-in, as it’s easy to find those with removable batteries and without Bluetooth.