russmatney

joined 1 year ago
[–] russmatney 2 points 1 year ago

the top games were excellent this year! I think b/c the theme was interesting and expectation-reverseing. i struggled to get something on theme done... most of my ideas implied smart ai/behavior (e.g. interacting with an autonomous player character), which i decided was too big a rabbit hole for 2 days... it's impressive to see how far people got on some of these

[–] russmatney 4 points 1 year ago
[–] russmatney 2 points 1 year ago (3 children)

I'm interested! I've been curious about haxe recently, after seeing it was used to build Dead Cells and Papers, Please (and others: https://haxe.org/use-cases/games/)

[–] russmatney 4 points 1 year ago
[–] russmatney 6 points 1 year ago

In my experience, learning a new language makes you much better at the languages you already know, and each one you learn is an easier challenge than the last - it helps me understand what is shared across programming vs what is a specific style (or wart) in a language I already know. So I definitely recommend exploring widely!

In general, I'd encourage you to follow your gut and curiosity - whatever you're most interested in will end up being less effort/more fun, and likely the most/best growth for you - so, scratch that itch!


Some different options that you might take a look at:

My favorite by far is Clojure - it's practical and minimal and can be used for everything (full-stack + scripting), and interactive programming is really nice (vs the typical write + compile/run-the-world loop). Unfortunately, learning to read/write lisps is a bit mind-bending and tooling-intensive, so expect to invest time in your tools before you can really get going with it. (Connecting to a running repl from your editor is an excellent paradigm for writing code, but it's really on you to manage and debug the tools that support that workflow, and that's just difficult at the beginning.)

Elixir is another modern option that'll teach you some new patterns/paradigms, like the actor model (via OTP) and pattern matching. I'd be writing more elixir these days if I hadn't found Clojure :)

Haskell is totally different and quite difficult, but generally worth it. It's especially difficult to pickup without a mentor/team to learn it with. It can be very minimal and will change the way you think about functions and types (it did for me, anyway). I don't find it to be very practical (i've become quite opinionated about strict types), but I know folks who do. I wrote a post about using 'lenses' in Haskell a few years ago, a glance at some of the code will show you how different it is from other languages: https://medium.com/@russmatney/haskell-lens-operator-onboarding-a235481e8fac

Rust is increasingly popular, and for good reason - plenty to find on this, large community, definitely not bad choice at all from the sound of your path so far.

[–] russmatney 2 points 1 year ago

Small challenges can be a good way to practice and improve - i felt much more comfortable after doing a few days of advent-of-code in gdscript last december: https://github.com/russmatney/advent-of-godot (note this project is still on 3.5, but things haven't changed too dramatically for this project, as there's not much ui/node interaction, mostly just code)

[–] russmatney 2 points 1 year ago

Good idea! And don’t forget about the fediverse jam starting this weekend! https://itch.io/jam/summer-fediverse-jam - a good opportunity to share wips and what not here

[–] russmatney 1 points 1 year ago

Nice. Classic rust reimplementation.

[–] russmatney 2 points 1 year ago

Yesssss tldr is awesome!

[–] russmatney 2 points 1 year ago (1 children)

The simple and probably better answer is that you can just vim ~/.zsh_history and search for/delete the lines directly.

Buuuuut! I wrote zsh command for doing exactly that a few years ago (in my dotfiles, but i've pasted it below as well):

################################################################################
# Delete from history via fzf
################################################################################

# https://superuser.com/questions/1316668/zsh-bash-delete-specific-lines-from-history
function delete-command () {
  # Prevent the specified history line from being saved.
  local HISTORY_IGNORE="${(b)$(fc -ln $1 $1)}"

  # Write out the history to file, excluding lines that match `$HISTORY_IGNORE`.
  fc -W

  # Dispose of the current history and read the new history from file.
  fc -p "$HISTFILE" "$HISTSIZE" "$SAVEHIST"

  # TA-DA!
  print "Deleted '$HISTORY_IGNORE' from history."
}

function pick_from_history () {
  history | fzf --tac --tiebreak=index | perl -ne 'm/^\s*([0-9]+)/ and print "$1"'
}

function delete_from_history () {
  delete-command "$(pick_from_history)"
}

It uses fzf to filter and select a command to delete. It's cool but might be slow b/c you're doing it one at a time. It also may depend on your zsh config (i think the history command i'm using there comes from ohmyzsh, but i'm not too sure).

[–] russmatney 2 points 1 year ago

After further inspection, Atuin looks sweet! Looks like they encrypt your history and offer finer-grained search (like dates and things). Great rec, thanks for sharing!

[–] russmatney 4 points 1 year ago (3 children)

Interesting, syncing history across machines is pretty cool. While writing this I went looking for my yabai logs helper as an example, but of course, it's on my other machine, haha

Security (sharing secrets from that history) comes to mind, so I feel compelled to mention that adding a space before a command is a pattern for preventing it from being stored in history, though I think I had to opt-in to that in my zsh config: setopt HIST_IGNORE_SPACE

view more: ‹ prev next ›