Readit News logoReadit News
cjvirtucio commented on jq 1.7   github.com/jqlang/jq/rele... · Posted by u/wwader
cjvirtucio · 2 years ago
my favorite tool; makes writing a bash fun for me.
cjvirtucio commented on Pure Bash Bible (2018)   github.com/dylanaraps/pur... · Posted by u/softwaredoug
javier_e06 · 2 years ago
After years writing bash scripts I stumbled with this line...

set -e

Which forces the script to exit on first error.

This line be in the bible as Genesis 1:1

cjvirtucio · 2 years ago
you could also just write as if you're writing go:

function main {

  if ! failing_cmd; then
    log "this fails!"
    return 1
  fi

  log "this won't log"
}

main

I only mention this because there are folks who don't like set -e.

cjvirtucio commented on I Am Leaving   briefs.video/videos/i-am-... · Posted by u/tagawa
BirAdam · 2 years ago
First, there was LiveJournal. Then there was MySpace. Then there was FaceBook. I was on FaceBook until .edu stopped being a requirement. Shortly after that change, my wall became a mix of soft porn and hightimes. Nothing wrong with that, but it isn’t what I want to see so I deleted my FaceBook account. I went over to Twitter. Over time, Twitter ceased to be interesting as it turned into people affirming their positions on things they usually didn’t understand very well. I deleted my Twitter account half a decade ago. All of it is actually useless, and it does nothing but eat time.
cjvirtucio · 2 years ago
reddit and youtube were my last remaining social platforms. quit reddit because of the API changes. might be quitting youtube, as well, because of the ads. and then there'll be nothing left for me to spend time on except code and family.
cjvirtucio commented on Comprehensive Rust: course used by the Android team at Google   github.com/google/compreh... · Posted by u/ingve
mmastrac · 2 years ago
I'm very happy I dug into rust half a decade ago. The language has been fun to learn as it evolved futures and async/await, and the future continues to look promising. I've had the pleasure of working professionally in Rust twice in my life (once at Full story, now at Deno) and I can say it's by far my favourite language to work in.

I did some Rust training with Ferrous but by far the most useful way to learn was just picking up a project and building it.

cjvirtucio · 2 years ago
most fun I've had with a programming language in years
cjvirtucio commented on Ask HN: Programs that saved you 100 hours? (2022 edition)    · Posted by u/zJayv
cjvirtucio · 3 years ago
good ole find, grep, sed, and jq.
cjvirtucio commented on Vim After 15 Years (2017)   blog.langworth.com/vim3... · Posted by u/metadat
Trufa · 3 years ago
It's alway pretty fascinating to me that people can actually be productive without an IDE.

I've tried several times Vim and I just don't get it how you can live without certain functionalities, I'm sure that with enough tinkering you can get pretty close but, for example, search seems to always be kind of a pain in the ass for the complex queries with regex through many files and stuff like that, specially the presenting of results has never been close in my opinion as to something like IntelliJ does it.

Things like "god damn, I've done goofed or I don't quite remember something" and having the internal file history with a diff readily available.

Some of the click and find implementation/usages never seems to quite there to me.

I could go on, if you're truly being productive and not missing out on feature, more power to you, but I honestly wonder if there's no element of fun/pride in using something like vim now-a-days, which of course is totally fine and way more important in my book (to an extent) to pure productivity.

There is also the point of being able to use vim bindings inside of the IDE.

Maybe I'm just an idiot that can't Vim, totally open to that idea, but I'm truly wondering how productive it actually is.

cjvirtucio · 3 years ago
the main thing that allows me to be productive with "only" vim is, funnily enough, things outside vim: bash knowledge. search, for instance, I can usually do in flexible ways with a pipeline of commands.
cjvirtucio commented on Google is shutting down Stadia   theverge.com/2022/9/29/23... · Posted by u/vyrotek
stickfigure · 3 years ago
They could just take the old game engine as-is, give it a new plot and art, and I would beg them to take my money.
cjvirtucio · 3 years ago
I wouldn't mind this, honestly. a game can be solid even on an old engine. just look at how long the Monster Hunter series had been on their old engine before overhauling with World.
cjvirtucio commented on Advanced Bash-Scripting Guide (2014)   tldp.org/LDP/abs/html/... · Posted by u/jolux
metadat · 3 years ago
100% sane advice on the "should" front, but I don't always follow the shoulds..

Bash is just too damn fast to whip things up in (even at the risk of endless footguns). Build up a pipeline of commands, translate into script, done. It's powerful and can scale if common conventions and good practices are used.

For easier debugging I always add a simple flag along the lines of: if $1 = -v then set -x; shift

Obviously shellscripts are a terrible or highly suspect idea when production-grade transactional integrity is critical, but in many cases the swiftness of shell development outweighs the cons when the goal is to Get Things Done.

The shell is a pretty sweet interface.

cjvirtucio · 3 years ago
it's so much easier to glue tools together with it. I'd end up writing more code if I had used python's subprocess package or ruby's IO package. as long as I don't need a complex data structure of some sort.
cjvirtucio commented on You can read my blog posts using curl   mahdi.blog/raw-permalinks... · Posted by u/mdibaiee
Zhyl · 3 years ago
cjvirtucio · 3 years ago
huh. TIL, that's pretty cool. guess I know what I'm doing next weekend..
cjvirtucio commented on You can read my blog posts using curl   mahdi.blog/raw-permalinks... · Posted by u/mdibaiee
cjvirtucio · 3 years ago
would've liked something like this on hugo

u/cjvirtucio

KarmaCake day74September 27, 2016View Original