gamma

joined 1 year ago
MODERATOR OF
[–] gamma@programming.dev 3 points 1 week ago

Basically the Matrix Spec Change Proposal system, I like it. Opens the floor to more players, gives tool authors a list of protocols they could choose to build on, and hopefully compositors will choose to adopt or adapt one of these protocols before writing their own.

[–] gamma@programming.dev 8 points 2 weeks ago (1 children)

I know that "Vanity Addresses" are a common thing for onion sites, and there are tools which generate tons of keys looking for prefixes. I haven't seen such a tool for ssh host keys though.

[–] gamma@programming.dev 8 points 1 month ago

I put newlines in my filenames to break both CLI tools and Windows filesystems

[–] gamma@programming.dev 7 points 1 month ago* (last edited 1 month ago)

Taking courses which involve subjects that you will likely never encounter in the workforce is a thing in every discipline. Most engineers don't need to manually solve differential equations in their day jobs, they just need to know that they exist and will often require numerical solutions.

Getting your hands dirty with the content provides a better understanding when dealing with higher level concepts.

[–] gamma@programming.dev 9 points 2 months ago

zsh-syntax-highlighting

There's also a fork called fast-syntax-highlighting, I use it.

[–] gamma@programming.dev 14 points 2 months ago* (last edited 2 months ago) (1 children)

Optional crash reporting was merged. Most of the backlash in the PR is about the significant dependencies (Google's BreakPad) which were pulled in with it.

However, by default Audacity isn't built with it, you need to specify a CMake with the URL to send data to. No distros that I know of enable reporting.

[–] gamma@programming.dev 4 points 3 months ago

Judging purely on the dependencies I see in pacman, nsxiv depends on imlib2, which pulls in a lot of libraries, while imv links to a subset of those libraries directly.

[–] gamma@programming.dev 1 points 3 months ago

What about adding the flags last?

rm deletethisrepo -rf
[–] gamma@programming.dev 3 points 3 months ago* (last edited 3 months ago) (3 children)

Strange, I don't see this behavior on my device. Not sure what information would be relevant to debugging this though.

[–] gamma@programming.dev 3 points 4 months ago (3 children)

It's probably the biggest deal for games running in xwayland

[–] gamma@programming.dev 1 points 5 months ago

How is it compared to wofi?

[–] gamma@programming.dev 1 points 6 months ago (1 children)

More people should be like you.

 

Check out the newest version of everyone's favorite^[citation needed] command line json processing tool!

Highlights include significant speed improvements (>10x on some of my workloads), new flags, new builtins, and a litany of bugfixes.

 

I'm sure some of you have absolute monstrosities of sigils (I know I do, in my .zshrc alone). Post them without context, and try and guess what other users's lines are. If you want to provide context or guess, use the markdown editor to spoiler-tag your guesses and explanations!

 

This came out of playing around with curl and the Lemmy API. I wanted a repeatable way to declare a bunch of shell parameters from a json object, so I wrote a jq module! Take a look at the README for examples, or once you install, run

source <( curl 'https://programming.dev/api/v3/community?id=267' | jq -r 'import "shell" as shell; .community_view | shell::param' )

Currently this project only provides a param function, and only supports Bash and Zsh. If I think of other useful helper functions, I may add them to the project.

This uses _ as a default prefix for each parameter. This is so things like {"PATH": "..."} generate typeset _PATH='...' and don't mangle your $PATH, for example. The prefix can be customized by passing in a string: param("mypfx").

Before declaring a 1.0, I'm planning on expanding shell support, and have the function determine how to output using the the $SHELL parameter:

# This does not work (yet!)
eval (curl $URL | jq -r '
  import "shell" as shell;
  "fish" as $SHELL |
  .community_view | param
')

Always up for feedback!

 

YSH, or the shell formally known as oil, is touted as a possible upgrade path from Bash.

This is the first in a three-part series of posts re-introducing the language.

  1. Reviewing YSH
  2. Sketches of YSH Features (you are here)
  3. YSH, Narrow Waists, and Perlis-Thompson Problems (Not yet released)
1
[ysh] (1/3) Reviewing YSH (www.oilshell.org)
submitted 1 year ago* (last edited 1 year ago) by gamma@programming.dev to c/shell@programming.dev
 

YSH, or the shell formally known as oil, is touted as a possible upgrade path from Bash.

This is the first in a three-part series of posts re-introducing the language.

  1. Reviewing YSH (you are here)
  2. Sketches of YSH Features
  3. YSH, Narrow Waists, and Perlis-Thompson Problems (Not yet released)
 

A huge part of programming in general is learning how to troubleshoot something, not just having someone else fix it for you. One of the basic ways to do that is by tracing. Not only can this help you figure out what your script is doing and how it's doing it, but in the event that you need help from another person, posting the output can be beneficial to the person attempting to help.

(If your shell isn't listed and you know how to enable tracing, comment below and I'll add it to the table!)

Shell How to enable tracing
Bash set -x or set -o xtrace
Fish set fish_trace on
sh set -x
Zsh set -x or setopt xtrace

Also, writing scripts in an IDE that supports your language. syntax highlighting can immediately tell you that you're doing something wrong.

If an IDE isn't an option and you're using Bash or Sh, you can paste your script into https://www.shellcheck.net/

(Inspired by this post on /r/bash)

 

Feedback is still welcome, either here or as Merge Requests to my Gitlab Pages repo.

view more: next ›