Hacker News new | past | comments | ask | show | jobs | submit | pR0Ps's comments login


https://cmetcalfe.ca/blog

Contains mostly guides on random things I learn over time and other bits of information I think should be publicly available.

Not very frequently updated, but RSS is available so it can be chucked in an RSS reader and forgotten about.


This has been an issue forever (I have a similar blog post from 4+ years ago tracking down the exact same issue: https://cmetcalfe.ca/blog/diagnosing-periodic-high-ping-time... ) and I can't believe it's still not fixed.


It is fixed, but it requires Qt application developers to update their application to Qt6 or as a workaround they can disable bearer management in Qt5.


You can actually do this with any level of log message by passing `exc_info=True` to it. This is super useful in cases where you want to log the exception context, but don't need to be at a high logging level.

Ex:

    logger.debug("A non-critical exception occurred", exc_info=True)


Maybe it's Stockholm syndrome, but contrary to what seems like most people I don't actually mind the built in logging library. Sure, it reeks of its Java roots and can be a bit of a pain to set up configure, but once that's done it's incredibly flexible and generally works really well.

One of the main gripes I do have with it is its reliance on the old-school %-based formatting for log messages:

    logger.debug("Invalid object '%s'", obj)
As there are real advantages to providing a template and object args separately, this is a bit of a shame since it pushes people to use pre-formatted strings without any args instead.

I fixed this for myself by writing bracelogger[0]. If this is a pain point for you too, you might find it useful.

Ex:

    logger.debug("Invalid object of type {0.__class__.__name__}: {0}", obj)
[0]: https://github.com/pR0Ps/bracelogger


For 2, see chronic[0] (part of moreutils[1]). It runs a command, muting stdout and stderr unless the command exits with a non-zero status.

[0]: https://manpages.debian.org/jessie/moreutils/chronic.1.en.ht...

[1]: https://joeyh.name/code/moreutils/


While it's true that jq's DSL has a bit of a learning curve, being able to try expressions and see immediate feedback can help immensely.

Here is a demo of a small script I wrote that shows jq results as you type using FZF: https://asciinema.org/a/349330 (link to script is in the description)

It also includes the ability to easily "bookmark" expressions and return to them so you don't have to worry about losing up an expression that's almost working to experiment with another one.

As a jq novice, I've personally found it to be super useful.


> The closest I'm come to mimicking Mac style on Windows to create an installer that does not actual install but extracts the contents to user's temp directory and executes the application. Needed a simple solution so the end-user just had to download and double click to run the application since they might not have admin rights to install the application.

I create these self-extracting packages all the time too. Getting the icons and such right on the package can be a bit of a pain so I made a quick script[0] to automate the process. You may find it useful too.

[0]: https://github.com/pR0Ps/make-sfx-package


It's 100% possible to play with all the emulators running on the same computer. I worked my way through most of game with multiple players. There was a little bit of input lag but not too bad (and the game is pretty forgiving). If you have a couple friends who are into LoZ games I definitely recommend it.

We also just embraced screen-peeking as everything was up on the same screen for everyone to see.

https://i.imgur.com/pnhyEjS.png

It was definitely a bit of a pain to set up each time. Something like a batch script that automates setting the emulators to a known-good config, configuring the controls, opening up the emulators, and starting the game would be possible and would make it a lot easier.


Ugh. I had the exact same issue with Qt and it took me forever to track it down[0].

Even though it's been fixed since 2017 I can confirm that there's still lots of network-using software out there that isn't using the most recent Qt library. Installing any of it will destroy your ability to have lag-free video chats or do any other real-time streaming.

I've always been in the "wires wherever possible" camp and it's things like this that are keeping me there. Hopefully headphone jacks don't go totally extinct anytime soon...

[0] https://cmetcalfe.ca/blog/diagnosing-periodic-high-ping-time...


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: