• chameleon@fedia.io
    link
    fedilink
    arrow-up
    0
    ·
    2 months ago

    Needed to write a syntax highlighter for VB.Net but I couldn’t find any weirdly written edge cases online, so I had to make some myself.

  • Mikina@programming.dev
    link
    fedilink
    arrow-up
    0
    ·
    2 months ago

    We found a RCE on a server during pentest. In KOBOL.

    Learning how to make a reverse shell in KOBOL was pretty unique experience. Thankfully, we found another path to DA ajd didn’t have to continue, but maan, learning KOBOL, especially of your use-case is niche, is borderline esoteric.

  • BehindTheBarrier@programming.dev
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    2 months ago

    It’s hyperbole, but I learned my first language because I wanted to be a god.

    I saw these magic windows that popped up, that had buttons, and I was jealous of these godly creators holding the power to make them do as they wanted. So, I learned it myself. I peeked at another program I was using, it was using python and PyQt so that’s what I set out to become my own god of the desktop.

    My first program was a GUI wrapper around the YouTube-dl CLI, and I still use it frequently.

    • AwkwardLookMonkeyPuppet@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      2 months ago

      Hey, that’s similar to me! Except I’d call it a wizard rather than a god. I wanted to learn the cryptic combinations of words that willed things into existence in the digital world. 23 years later I’m a senior professional, doing the same thing, and still learning too.

  • Ephera@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    2 months ago

    I was playing this really simple mobile phone game, where you basically go on these mining trips, then you tap the screen as quickly as possible. So, I thought to myself, I wonder if there’s a way to simulate screen taps, to tap at superhuman speeds.

    I found an app for that, this app had its own scripting language. Admittedly, there weren’t many concepts to learn in this language, but wait, there’s more.

    Then I thought, maybe I can also automate the menus, between the mining trips.
    But this language didn’t have support for multiple files, nor functions, you couldn’t even use labels in your goto statements, meaning my code started to get quite complicated.

    So, I actually sort of implemented support for goto labels / shitty functions within my program.

    Basically, at the start of the file, I had an if-else block, which read the value of a variable and based on that, it would select between different goto statements.
    So, if I wanted to “call a function”, I would set the variable to the function/label name and then goto 0.

    If I remember correctly, I did still need to manually update the line numbers in that lookup table at the start, but at least, I didn’t have to do it everywhere in the code anymore.

    And yes, I did manage to completely automate grinding that game, using this shitty scripting language.
    It was an offline game, and not a good one, I didn’t actually care about making progress in it. But scripting it was significantly more fun than playing it myself.

    • Luvon@beehaw.org
      link
      fedilink
      arrow-up
      0
      ·
      2 months ago

      There’s a game called something like “oh no the farmer is gone” which is about programming a little robot to harvest the fields and the programming is built directly into the game

  • thingsiplay@beehaw.org
    link
    fedilink
    arrow-up
    0
    ·
    2 months ago

    Somewhere before 2010, when I was still on Windows on my laptop and using AutoHotkey, I learned a dialect of Basic. To write an application starter on my USB stick, when going to internet cafes. The starters job was just to run my AutoHotkey script with AutoHotkey interpreter. I never used the Basic language again. I actually forgot which dialect, maybe FreeBasic.

  • Kojichan@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    2 months ago

    Might not be dumb, but I learned programming to create things and learn how things worked. Started with entering in hundreds of lines of BASIC printed in magazines, including debugging font typos.

    Then learned MUF, or Multi-User Forth, a stack-based text language for creating text based dungeons, and managed to stop some malicious users spying and people’s privacy in the server.

    Every so often, I pick up a new language to test it to see if it does cool stuff or help me further learn more about how things function.

  • FrostyCaveman@lemm.ee
    link
    fedilink
    arrow-up
    0
    ·
    2 months ago

    To have an easier time with another language (which the first language’s valid syntax is a superset of) which it papers over the faults of. And usually it’s pretty thin paper.

  • Electric@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    2 months ago

    Objects weren’t properly saving in a game, so the developer showed me what code I could copy paste to enable objects to save. Much like Thanos, “fine, I’ll do it myself”.

  • 1hitsong@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    2 months ago

    Because I wanted to listen to music while doing the dishes.

    The Jellyfin Roku client didn’t support audio playback, so I wrote it myself… while learning Roku’s proprietary language 🙄

    • Flatfire@lemmy.ca
      link
      fedilink
      arrow-up
      0
      ·
      2 months ago

      It occurs to me I’ve literally never tried to play my music library through Roku. I usually just cast to a speaker with my phone. Is it part of the main branch?

  • mindbleach@sh.itjust.works
    link
    fedilink
    arrow-up
    0
    ·
    2 months ago

    I learned Applesoft BASIC to draw a surprise Dickbutt.

    If we’re counting machine code, I learned 6502 ASM for faster division on NES, because it was half the CPU time on my first-person shooter. After many iterations pushing it down to mere hundreds of cycles, I slapped my forehead and implemented log tables in like 512 bytes and 45 cycles. It’s negligible now. And supports constant fractional scaling. And has overflow / underflow saturation. Really, 6502 ASM is fantastic to fuck around in, even though the rest of the NES’s hardware suuucks.