me again

  • 2 Posts
  • 50 Comments
Joined 1 year ago
cake
Cake day: September 4th, 2023

help-circle

  • depends on the language and the compiler, pretty sure gcc without at least -O2 doesnt do tail call elimination(and still itll be slower than iteration), and rust didnt have it/low priority and when i was introducing myself to js it didnt have tco everywhere either. so just write in a way that is idiomatic to your language. in haskell recursion is encouraged, in part because it is guaranteed that it will be optimized by the compiler.

    regardless of the language if your recursive function is poorly designed, its going to result in stack overflow with sufficiently large inputs
















  • im not comfortable with shell yet, but here’s what i did
    in sway config i have

    for_window [title=“example_launcher”] floating enable
    set $menu foot -T “example_launcher” -w 240x240 -e sh -c ‘dmenu_path | example.sh | xargs swaymsg exec --’

    and somewhere in my $PATH i have example.sh which looks like this

    #!/usr/bin/sh
    #
    out=$(fzf -e --print-query “$@”)
    in=$(echo “$out” | head -1)
    res=$(echo “$out” | tail -1 )
    if test -n “$res”; then
    cmd=$res
    else
    cmd=$in
    fi
    exec echo “$cmd”

    there are a couple small issues with the set up though, and also u do need dmenu installed





  • you wont be able to use ms office, so either use alternatives or the web version(or through a vm)
    for most software you want to use the packages provided by your distribution maintainers, as that removes the need to deal with conflicts, often provides some sane defaults and makes it so that for the most part you only have to trust the team of maintainers rather than every software developer in the world.
    also you wont be able to play valo and some other shooters, though eac and battleye are both supported and besides native and wine/proton support u can play most games on kvm passthrough vms with little performance loss