Skip Navigation
Certified in AI
  • Jokes aside, LLMs are actually pretty nice, since they lower the barrier to entry for programming. A guy I know has been doing all of his data processing with obscure Excel hacks his entire life. But recently he had to parse a file with like a million or so lines, which would take forever in excel, so now he's hacking together a python script using ChatGPT and meta ai. And in the process, he's actually picking up a bit of python knowledge himself. He now knows what lists are, how loops and if statements work, and he even understands "intermediate" features like list comprehension and regex. They said llms would replace programmers, but in reality they're making more of us lol

  • Python is great, but stuff like this just drives me up the wall
  • Gradual typing isn't reinventing the wheel, it's a new paradigm. Statically typed code is easier to write and harder to debug. Dynamically typed code is harder to debug, but easier to write. With gradual typing, the idea is that you can first write dynamic code (easier to write), and then -- wait for it -- GRADUALLY turn it into static code by adding type hints (easier to debug). It separates the typing away from the writing, meaning that the programmer doesn't have to multitask as much. If you know what you're doing, mypy really does let you eat your cake and keep it too.

  • Python is great, but stuff like this just drives me up the wall
  • reasoning

    What reasoning? I'm not trying to make any logical deductions here, I'm just expressing annoyance at a inevitable, but nevertheless cumbersome outcome of the interaction between numpy and mypy. I like python and I think mypy is a great tool, I wouldn't be using it otherwise.

  • Python is great, but stuff like this just drives me up the wall

    Explanation: Python is a programming language. Numpy is a library for python that makes it possible to run large computations much faster than in native python. In order to make that possible, it needs to keep its own set of data types that are different from python's native datatypes, which means you now have two different bool types and two different sets of True and False. Lovely.

    Mypy is a type checker for python (python supports static typing, but doesn't actually enforce it). Mypy treats numpy's bool_ and python's native bool as incompatible types, leading to the asinine error message above. Mypy is "technically" correct, since they are two completely different classes. But in practice, there is little functional difference between bool and bool_. So you have to do dumb workarounds like declaring every bool values as bool | np.bool_ or casting bool_ down to bool. Ugh. Both numpy and mypy declared this issue a WONTFIX. Lovely.

    51
    What is your experience with btrfs snapshots?
  • Spent like a few hours learning about and setting up snapshots, only to never every use them lol. I guess I just don't break my computer often enough nowadays. Copy-on-write is great tho, especially for making quick backups of a large directory structure before running that risky shell one-liner.

  • When people complain about systemd "violating the unix philosophy", this is what they actually mean
  • Thanks for posting your original comment btw, now that I read over my own comments I do realise that it comes across as very hostile and a little silly, regardless of intention.

  • When people complain about systemd "violating the unix philosophy", this is what they actually mean
  • I don't support calling people who volunteer their time to develop free software "just shit", but I can't help but agree at least a little bit about redhat. Redhat is kind of like Richard Nixon: if you just assume that eveything you dislike is their fault, you would be right surprisingly often.

    • "Predictable" interface naming
    • avahi
    • dbus

    That being said, they did also contribute to a lot of kickass software, from btrfs to Firefox to linux namespaces to qemu to pipewire, as well as to software that you can't really live without like glibc or gdb. So I guess the converse also holds: if you just assume that everything you like is there thanks to redhat, you would be correct pretty often as well. Can't really say that about Nixon though.

  • When people complain about systemd "violating the unix philosophy", this is what they actually mean
  • I was being serious, but I'm not calling everyone who uses sytemd a bot. It has its merits, I use it on my homeserver (NixOS). When I say "systemd bot" I mean "people who blindly dismiss valid criticism of systemd". Same as when some people say "russian bot" they mean "troll who is paid to advocate for the actions of russian government", and not "everyone from russia is a bot".

  • Code interviews for a PHP developer roles
  • If you wanted me to do that in literally any programming language, once the psudocode is done, you just spend an hour or so looking up the details.

    In some cases, you can even use an AI chatbot as a "pseudocode compiler". Just tell it to translate your pseudocode to an actual language. I've done it for shell scripts a couple of times, works surprisingly well. Not that I would do this at a job interview haha.

  • batman or man bat?
  • Good software can come from almost any language, but yeah there's just something about rust CLI tools. I've pretty much always had issues with incorrect file type associations on Linux, until I started using handlr. exa (or eza?) is great too. Just like ls but better in every way.

  • Me in the pic
  • I also have both. VLC's UI is good for some strange one-off tasks like playing CD's and stuff. Sure, mpv can do it too, but I would rather push some buttons in a UI than dive head-first into a manual to figure out how to do it with mpv.

  • When people complain about systemd "violating the unix philosophy", this is what they actually mean
  • If you've never had a reason to not use it, then it's fine to continue using it. Systemd has been shown to be more or less stable, fast, and secure. The reason I don't like it is because it makes simple things really complicated. Some examples:

    • The meme
    • u/phoenixz@lemmy.ca example with sshd
    • Distros that use systemd init also seems to prefer using other systemd components as well. So you can get caught in weird situations where one task is spread across two different systems (e.g. systemd timers vs cron, systemd-elogind vs acpid)

    If none of these sound familiar, then switching to a non-systemd distro likely won't make your life easier. But if you do, then it might be worth considering.

  • When people complain about systemd "violating the unix philosophy", this is what they actually mean
  • Miryoku isn't a regular layout. It has things like keys that change what they do depending on whether you tap them or hold them. Maybe it's theoretically possible to implement it as a standard XKB layout, but it would not be fun. Usually, Miryoku is implemented in your keyboard firmware. But if your keyboard doesn't support flashing custom firmware (e.g. builtin laptop keyboard), then you have to use a software solution like kmonad, which is a daemon that has to run as root.

    As a sidenote, even for some "standard" keyboard layouts there needs to be background process. For example, Chinese and Japanese have too many characters to fit on a keybaord, so they use something called an Input Method Editor. But those usually don't need root, in contrast to kmonad.

  • If we had parties
  • Flatpak nowadays feels like the spiritual successor to appimage. All the dependencies are containerized, and uninstalling an app doesn't leave behind a residue of automatically created files on your system... at least in theory. All of these benefits are kind of negated if an app has full disk read/write permission.

    Appimage is kind of silly in my opinion. Appimage is just "portable application" (i.e. when an app gets shipped as a folder containing the executable, .so dependencies, and resources), but crammed into a disk image for some reason.

  • Solutions? Where we're going, we don't need solutions.

    Please dont take this seriously guys its just a dumb meme I haven't written a single line of code in half of these languages

    204
    With all the talk about privacy, people seem to be forgetting that censorship is also a major problem for today's internet.

    Many "alternative" search engines are better for privacy, but they are still vulnerable to censorship, because they rely on g\*\*gle and m\*crosoft's indices for their search results. This isn't a deep-hidden secret either, many of them disclose what search index they use on the "about" page, for example:

    • https://duckduckgo.com/duckduckgo-help-pages/results/sources/
    • https://support.startpage.com/hc/en-us/articles/5138782571796-Why-isn-t-a-particular-site-appearing-in-the-results
    • https://www.ecosia.org/privacy

    There are still search engines that (claim to) maintain their own index. Most surprisingly, br\*ve:

    • https://brave.com/search-independence/
    102
    What do you guys do when you want to run unmaintained programs?

    I recently wanted to run tegaki, and my experience is pretty much summed up by the meme. I consider myself fairly tech-savvy, but I just couldn't figure out how to compile it. So I just gave up, downloaded the .exe and put it into a fresh wine prefix. After installing CJK fonts, everything ran fine. Now I'm trying to get gpaint to work. My distro recently dropped support for gtk+2 (which I am fairly pissed about, since it's the last good version of GTK+), so I have to set that up manually as well. [[[ EDIT: gtk2 is alive and well. I was just being and idiot and searching for gtk2, when the package is actually called gtk+2. ]]] I installed all of the dependencies that ./configure told me to, but I still kept getting obscure errors when running make.

    So, here's my question: what tools make the process of running abandonware easier? Docker containers? Also, what can I use to package abandonware in order to make it easy for other people to run? Flatpak? Appimages? Any advice is appreciated!

    Also, inb4 "just find a modern alternative". That would be a reasonable solution. I don't want reasonable solutions!

    72
    But hey, at least everyone supports webp now.

    Context: Even though Chromium has native support for AVIF, a very nice image format, Microsoft goes out of their way to remove it from Edge, which is a chromium fork. Jpeg XL (JXL) (not to be confused with Jpeg (JPG) or Jpeg 2000 (jpg2k) ) is another nice image format, which, IIRC, is only supported in Firefox.

    36
    You do know you can just click the "reject all" button, right?

    Context: https://www.youtube.com/watch?v=fqhPUmyrfGI Without ads/tracking: https://www.yewtu.be/watch?v=fqhPUmyrfGI

    86
    I organized the non-stick cooking spray meme into a flowchart and made it open-source

    ``` /* * This DOT code is provided under the Creative Commons Zero (CC0) license. * For details, see: https://creativecommons.org/publicdomain/zero/1.0/ */

    digraph cooking_stick {

    rankdir=LR;

    node [shape=box] node [width=1.0]

    here [shape=diamond label="start\nhere"] nonstick [label="non-stick"] nonspray [label="non-spray"] noncooking [label="non-cooking"]

    nt_cooking [label="cooking"] nt_spray [label="spray"]

    ns_cooking [label="cooking"] ns_stick [label="stick"]

    nc_spray [label="spray"] nc_stick [label="stick"]

    nt_c_s [label="spray"] nt_s_c [label="cooking"] ns_c_t [label="stick"] ns_t_c [label="cooking"] nc_s_t [label="stick"] nc_t_s [label="spray"]

    node [width=1.6 height=1.5 fixedsize=true] nt_c_s_i [label="" image="nt_c_s.jpg"] nt_s_c_i [label="" image="nt_s_c.jpg"] ns_c_t_i [label="" image="ns_c_t.jpg"] ns_t_c_i [label="" image="ns_t_c.jpg"] nc_t_s_i [label="" image="nc_t_s.jpg"] nc_s_t_i [label="" image="nc_s_t.jpg"]

    splines=curved here -> nonstick here -> noncooking here -> nonspray

    nonstick -> nt_cooking nonstick -> nt_spray

    nonspray -> ns_cooking nonspray -> ns_stick

    noncooking -> nc_spray noncooking -> nc_stick

    nt_cooking -> nt_c_s nt_spray -> nt_s_c ns_cooking -> ns_c_t ns_stick -> ns_t_c nc_stick -> nc_t_s nc_spray -> nc_s_t

    nt_c_s -> nt_c_s_i nt_s_c -> nt_s_c_i ns_c_t -> ns_c_t_i ns_t_c -> ns_t_c_i nc_t_s -> nc_t_s_i nc_s_t -> nc_s_t_i } ```

    14
    I organized the non-stick cooking spray meme into a flowchart and made it open-source

    ``` /*

    • This DOT code is provided under the Creative Commons Zero (CC0) license.
    • For details, see: https://creativecommons.org/publicdomain/zero/1.0/ */

    digraph cooking_stick {

    rankdir=LR;

    node [shape=box] node [width=1.0]

    here [shape=diamond label="start\nhere"] nonstick [label="non-stick"] nonspray [label="non-spray"] noncooking [label="non-cooking"]

    nt_cooking [label="cooking"] nt_spray [label="spray"]

    ns_cooking [label="cooking"] ns_stick [label="stick"]

    nc_spray [label="spray"] nc_stick [label="stick"]

    nt_c_s [label="spray"] nt_s_c [label="cooking"] ns_c_t [label="stick"] ns_t_c [label="cooking"] nc_s_t [label="stick"] nc_t_s [label="spray"]

    node [width=1.6 height=1.5 fixedsize=true] nt_c_s_i [label="" image="nt_c_s.jpg"] nt_s_c_i [label="" image="nt_s_c.jpg"] ns_c_t_i [label="" image="ns_c_t.jpg"] ns_t_c_i [label="" image="ns_t_c.jpg"] nc_t_s_i [label="" image="nc_t_s.jpg"] nc_s_t_i [label="" image="nc_s_t.jpg"]

    splines=curved here -> nonstick here -> noncooking here -> nonspray

    nonstick -> nt_cooking nonstick -> nt_spray

    nonspray -> ns_cooking nonspray -> ns_stick

    noncooking -> nc_spray noncooking -> nc_stick

    nt_cooking -> nt_c_s nt_spray -> nt_s_c ns_cooking -> ns_c_t ns_stick -> ns_t_c nc_stick -> nc_t_s nc_spray -> nc_s_t

    nt_c_s -> nt_c_s_i nt_s_c -> nt_s_c_i ns_c_t -> ns_c_t_i ns_t_c -> ns_t_c_i nc_t_s -> nc_t_s_i nc_s_t -> nc_s_t_i } ```

    9
    Gonna need a bigger bowl!

    Context: https://medium.com/collapsenews/new-study-at-least-15-of-all-reddit-content-is-corporate-trolls-trying-to-manipulate-public-b249bd42ab42

    Without paywall/tracking: https://freedium.cfd/https://medium.com/collapsenews/new-study-at-least-15-of-all-reddit-content-is-corporate-trolls-trying-to-manipulate-public-b249bd42ab42

    22
    "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearRE
    renzev @lemmy.world
    Posts 23
    Comments 169