home.social

#codegolf — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #codegolf, aggregated by home.social.

  1. Meet me and some #RetroComputing #hackers at the #VintageComputing assembly on this years #39C3 in Hamburg!

    We will present some historcial running machines #AnalogSynthesizer patching, #AnalogComputer tinkering (with a #Vectrex as an #oscilloscope), and #BASIC #CodeGolf and #RetroGame workshops!

  2. So I've been trying to code-golf a JS-free menu bar from my website. The <details> HTML tag proves very useful to have a JS-free foldable menu in mobile mode, however I still need to duplicate the whole menu for desktop mode as I couldn't lock <details> to the open state in desktop mode even with media queries.

    The ::details-contents pseudo-element sounds promising though, let's see if it works! It's not widespread yet but just landed in Firefox 143: developer.mozilla.org/fr/docs/

    My bar for stability is at least some time in Firefox ESR, so it won't make it to my website for a year or two. #HTML #CSS #CodeGolf #NoJavaScript

  3. Exactly 13 DAYS left to start #js13k 2025!

    js13kgames.com

    We've added first batch of this year's Partners, Experts, and Prizes to the website and will be announcing them all in the coming days.

    #gamedev #gamejam #compo #competition #codegolf #challenge #JavaScript #HTML5 #indiedev #indiegames

  4. I kind of irrationally #CodeGolf my #Makefile rules, but sometimes I sit down to straighten out something awkward that bugged me for years, and get kind of mad when I seem to have been the first to actually treat `make` like the tool it is instead of as a broken shell script runner.

    This time it was #Python #VirtualEnv setup:

    ```
    dep: .venv/bin/pip .venv/lib/*/site-packages/__pycache__

    .venv/lib/%/site-packages/__pycache__: .venv/bin/pip requirements.txt
    .venv/bin/pip install -Ur requirements.txt

    %/bin/pip:
    /usr/bin/virtualenv $*
    ```

    (Yeah pretend those are tabs. Yeah that is make's worst wart.)

    I even use `!#.venv/bin/python3` in my scripts and hey presto everything just works everywhere and I can focus on the actual code.

    I'm curious what cases I'm ignoring or missing here. Non-install upgrades may deserve a target perhaps...

  5. postcss-color-golf plugin 1.2.0 released!
    github.com/xero/postcss-color-

    rgb(255,0,0) → red
    aliceblue → #f0f8ff
    #aabbcc#abc;
    rgba(255, 170, 187) → #fab
    rgba(255, 170, 187, 0.8) → #fabcc
    rgb(255, 255, 255, 1) → #fff
    rgb(0, 255, 0, 0.8) → #0f0c
    fuchsia → #f0f

    #postcss #css #csstransforms #color #codegolf #golf #plugin

  6. Another #CodeGolf puzzle for #JavaScript #WebDev people:

    I have n functions that type one argument of the same type and return a boolean.

    The current usage is:
    function a(b) {
    return c(b) && d(b)
    }

    I boiled down a to
    a = (b) => [c, d].every(fn => fn(x))

    I assume, this can be further boiled down via bind/ #PartialApplication/ #Currying

    What do you think?

    #amCoding #amProgramming #webDevelopment #softwareDevelopment #softwareEngineering

  7. #lispygopherclimate archives.anonradio.net/2025012 #archive
    #ClimateCrisis haiku/wildfires by @kentpitman

    Electric (guitar) #music by @ksaj, community message from @TheGibson

    Arrokoth #McClim Graphical adventure Game creation system #lisp
    by five decade #gamedev veteran @mdhughes
    #NUD #codegolf / adopting Arrokoth
    @baruchel #lisp destructive permutation

    #mastobook club - Snow crash

    #livechat in #lambdaMOO
    telnet lambda.moo.mud.org 8888
    co guest
    @join screwtape

    @nosrednayduj @ratxue @hairylarry

  8. A tiny way to compute a square / triangle wave at the same time without conditionals, only basic arithmetic and shifts.

    This can be used for or animations etc. is a variant of HAKMEM 149.

    Can also be used to draw a square. (And other shapes, see previous toot)

    Code also shows how to draw a diamond shape by rotating the square by 45°.

    There are two versions, optimized for size and optimized for speed.

  9. I need to reverse the order of elements within blocks in a vector.

    I will be using this for changing the endian-ness of raw bytes.

    Besides a "for-loop" the screenshot shows the only method I could think of.

    Anyone have any fresh ideas?