HNHacker News
TopNewBestAskShowJobs

papascrubs

135 karma · joined June 20, 2021

https://keybase.io/nathansubra

nate(at)natesubra.com @natesubra@infosec.exchange natesubra @ twitter

submissionscomments
papascrubs··on Blessed.rs – An unofficial guide to the Rust ecosystem
Does something like this exist for other languages (Go/Python etc)? This seems well curated, looking for community input vs digging on a search engine.

I'm all for "batteries not included", but every time I dip my toes into languages like that, it can take a bit of work to find out common libraries that the majority is using. Not trying to re-ivent the wheel. It's nice to see opinionated takes on things in one central location.

papascrubs··on Psychedelics: A Personal Take (2021)
TBH I prefer a macrodose. It's great as a tool if you want to be introspective and change. But I agree that microdosing, at least for me would drive me to be too introspective at times. Balance is good. I've found psychedelics more useful as a point in time tool than as a constant. Macro w/ a goal works better for me than a micro dose.
papascrubs··on Nushell: Introduction to a new kind of shell
Been using the latest PSReadline but CompletionPredictor is awesome and exactly what I've been looking for.

One other PowerShell protip

Ctrl+Space is also another great shortcut for completing commands, it lets you see what type a parameter is expecting etc.

    $ Get-ChildItem -<ctrl+space>
    Path                 Depth                File                 ErrorAction    
    <snip>
    [string[]] Path
papascrubs··on The first minute of every phone call is torture now
To be fair, a good chunk of Android in total is a UX hellscape. This coming from a lifelong Android user. One of Android's greatest strengths (customization) is also it's greatest weakness.
papascrubs··on Ask HN: How to deal with burnout and its consequences?
If you're seeking care, this can also keep you from being fired (at least in the US/some countries). Most corporations have an employee counseling hotline that you can engage with that can help with this. Not that you want/plan to stay there. But that corp helped contribute to your condition-- they can help foot the bill. Don't put this all on yourself (but also don't put it all on others).

I was diagnosed at 32. Extremely high functioning but prone to burnout. I was hesitant as well, but embracing my diagnosis was life changing. You don't have to make ADHD your SINGLE core attribute like some people do. But ignoring what might be a core part of yourself isn't beneficial. Remember that it's just information-- what you do with the data is what's important. Meds can help but learning how to have healthy interactions with work and in my personal life was key.

You're not alone in this. I've found that there seems to be a higher concentration of ADHD in Dev/Security work. The constant newness of things keeps us interested-- but can also be dangerous.

Also, consider therapy. Even if you think you don't need it. Not a psychologist. But an actual factual therapist. I would prioritize this over medication, but honestly pursue them both. Therapy isn't what you think it is. It's a great way to have a sounding board.

papascrubs··on Obsidian 1.0 – Personal knowledge base app
I honestly haven't played with ReStructuredText. I'll take a peek.

AsciiDoc includes are very powerful though, being able to populate your tables/code blocks from external data sources (filtering for certain lines/ranges). Also Tables can have complex structures (merged cells etc).

I feel like AsciiDoc was designed around writing technical papers than code documentation. It's essentially an opinionated wrapper around LaTex but less complexity. reST looks like it can produce great code documentation. AsciiDoc lets me cover both code documentation and customer facing documentation/reports with one code base. But I'll definitely continue to take a peek at reST. Although I think it's use case is more for embedding documentation directly in code. It's probably just my "I know the AsciiDoc toolchain well" bias though.

papascrubs··on Shell script best practices, from a decade of scripting things
What things are you not able to do with PowerShell that you can with Bash + utilities? PowerShell literally gives you access to every way you can manipulate a string in C#. I get it, you're familiar with bash. But just because you know how to do something with something you're familiar with, doesn't mean PowerShell can't do what you wanted it to do.

Not trying to be combative, but learning any new language is going to require some dogfooding and digging in order to be as efficient as something you're already familiar with. I use bash and PowerShell daily. I can't think of any one thing I couldn't do in one or the other. Bash usually requires tying in another tool though. It's not strictly bash at that point. People saying stuff like jq. I rarely find that pre-installed. And if it's your machine, you can just as easily install something that doesn't require you to learn multiple languages (jq is a language).

I here you. I've been there. I'd lazily prod you to give POSH another shake. I've no horse in this race but I think you're missing out if you weren't able to accomplish in POSH what you were able to do in bash.

papascrubs··on Shell script best practices, from a decade of scripting things
The verbosity of PowerShell is overstated I think. You easily make POSH look as gnarly and esoteric as Bash if you so desire. That said, the majority of heavy lifting in POSH is done via methods these days (vs cmdlets). Your initial API query to snag the JSON might be via a cmdlet, but after that, you're slicing and dicing with real data structures. You can interact with them without having worry about whitespace or structure (meaning complex loops can easily be written on the command line without worrying about indentation).

It's a little more wordy if you're use to C or Bash. But hands down it's one of my favorite languages for slicing dicing data. No need for 3rd party libraries or binaries. No need to learn a bunch of weird awk/jq syntax which is only useful for those two tools (yay, lets learn 3 language instead one?). Plus, most of the structure translates over to C#, and you can integrate C# code directly into your POSH code if desired, as well as access pretty much any low level C# methods directly.

Working with strings? Pretty much any/every tool you could want to slice and dice strings.

The POSH REPL is amazing. You have far more flexibility around interacting with the command line than you do with Python. It's both a shell and a true language. As with any language, there are ISMs, but far fewer footguns than any other language I've spun up.

Cross platform as well with 6.0+

Intellisense ON the commandline (did I mention the awesome REPL?). Hands down one of the best built-in parameter/args/help parsing I've encountered across any language. Debugging? Amazing in vscode. And can be done strictly from the commandline as well (dynamic breakpoints? You've got it, drop you right into your catch block with an interactive shell so you can see the current status of any/all variables and manipulate them live and resume if desired)

Okay, I'm done shilling for POSH. It's hands down one of my favorite shells/languages for doing POC work, or writing utility functions. Treat it more like Python than bash. But realize that you can easily use that Pythonic-esque code right inside your shell.

papascrubs··on Obsidian 1.0 – Personal knowledge base app
Fellow AsciiDoc supporter. I want an AsciiDoc note taking app so badly too. So many awesome features in AsciiDoc that blow markdown out of the water. I use asciidoc-pdf for doc/report generation and the workflow is so smooth.

- Includes/embeds (reference your source code by line range(s)

- Complex table support + the ability to embed CSV (automatic headers)

- Frontmatter as a first class citizen

- Macros (Variables) that can be referenced across documents

- Numerous Diagram parsing libraries (embed pretty much any diagram-as-code language)

I've had the same thoughts on building a Dendron type extension for AsciiDoc (AsciiDoc vscode plugin is fairly robust). Really would just need to hammer out some front matter parsing to get basic functionality.

papascrubs··on Ask HN: Which web browser do you use and why?
Edge. Best Vertical Tabs implementation. Basically Chrome. Don't act like FF/Chrome don't already eat your data.
papascrubs··on The high-stakes race to engineer new psychedelic drugs
Citation needed?
← PreviousPage 3 of 3