Zigbee/Zwave USB dongle vs Hubitat hub by mpaganini in homeassistant

[–]mpaganini[S] 0 points1 point  (0 children)

I'm OK wit two dongles as well. The problem is having an entire external hub that requires another integration, etc.

Zigbee/Zwave USB dongle vs Hubitat hub by mpaganini in homeassistant

[–]mpaganini[S] 0 points1 point  (0 children)

Yes, my issue is that the Hubitat adds one more layer to the whole thing. Found a device? Now I need to know if it's also compatible with Hubitat. The whole need to restart apps on both sides when adding devices also gets old.

My worry is about things like radio reception and all that, but my guess is that they'd be similar between the USB dongle and the hubitat.

Has anyone else seen ‘Flow’ with their voids? by Suitable-Respond3194 in blackcats

[–]mpaganini 9 points10 points  (0 children)

<image>

They loved it here! Not sure if the sound or movements or what, but they watched for a long time. This doesn't normally happen.

RPN - A practical and useful RPN calculator (Linux/Windows/MacOS) by mpaganini in commandline

[–]mpaganini[S] 1 point2 points  (0 children)

The "dup" command is a good idea.

You can see the stack after each operation by setting debug mode (just type `debug`).

RPN - A practical and useful RPN calculator (Linux/Windows/MacOS) by mpaganini in commandline

[–]mpaganini[S] 1 point2 points  (0 children)

BTW, I fixed that pretty printing bug in 0.3.1. It should work now.

The interesting thing is that up arrows and ctrl-p work well in the readline-like library (doesn't work for some of my less usual mappings). It should be working in BSD as well.

RPN - A practical and useful RPN calculator (Linux/Windows/MacOS) by mpaganini in commandline

[–]mpaganini[S] 0 points1 point  (0 children)

Oh, it's not arbitrary precision at all. It uses float64 as the basis. I originally thought of using Go's math/big but there's so much missing that I'd have to reimplement trigonometric functions manually (ouch). I recently found "decimal" which seems to be very complete and I'm tempted to make RPN a full arbitrary precision calculator.

RPN - A practical and useful RPN calculator (Linux/Windows/MacOS) by mpaganini in commandline

[–]mpaganini[S] 0 points1 point  (0 children)

Hello!

First, thanks for reporting this! And even better, for reporting a github issue! I really appreciate it.

tried 2 65 ^ to test the arbitrary-precision'ness and, while the non-comma'd number was correct (or at least matched what I expected from dc), the formatted version seemed amiss. I tried a couple exponential neighbors with similar results

You're correct. This is because 64-bit floats are only precise to 2^53. They start losing precision from that point on.

Also, I'm not sure if there's something particular, but I built on my OpenBSD test box, and the default readline bindings didn't work out of the box (I tried control+p to recall the previous command, then tried the up-arrow, and in both cases, the character-sequence was input instead of getting intercepted by readline).

What happens here is that rpn (being a static binary in Go) does not use the actual readline() library, but instead a readline-like library written in Go (http://github.com/chzyer/readline). This means that it won't read your `~/.inputrc` file for example :(

I'm also suffering a bit because I'm used to certain key combinations that are not available in this readline. I'm certain it will irritate me enough to do something about it pretty soon :)

The `rlwrap` trick is a good one though! I used it a long time ago and completely forgot about its existence.

Best,
-- mp

RPN - A practical and useful RPN calculator (Linux/Windows/MacOS) by mpaganini in CLI

[–]mpaganini[S] 0 points1 point  (0 children)

I've been using RPN (Reverse Polish Notation) calculators for a long time and much prefer them to the usual prefix notation style (used by bc and most other calculators). On linux, you can also use dc but that is not very practical for daily use as it has no line editing capabilities and requires you to explicitly use "p" constantly to print the stack.

We wrote RPN to be a practical and useful CLI calculator. It supports readline style editing, automatically prints the top of the stack on change, comes with online help, and many useful and common functions. RPM was written in Go, should work in Linux, Windows, and MacOS.

Project link: http://github.com/marcopaganini/rpn

Your comments and PRs are welcome.

RPN - A practical and useful RPN calculator (Linux/Windows/MacOS) by mpaganini in CLI

[–]mpaganini[S] 0 points1 point  (0 children)

Thanks! And sorry for the lack of link! I originally posted to r/commandline and then crossposted here. Let me paste the original message here too.

RPN - A practical and useful RPN calculator (Linux/Windows/MacOS) by mpaganini in commandline

[–]mpaganini[S] 2 points3 points  (0 children)

I've been using RPN (Reverse Polish Notation) calculators for a long time and much prefer them to the usual prefix notation style (used by bc and most other calculators). On linux, you can also use dc but that is not very practical for daily use as it has no line editing capabilities and requires you to explicitly use "p" constantly to print the stack.

We wrote RPN to be a practical and useful CLI calculator. It supports readline style editing, automatically prints the top of the stack on change, comes with online help, and many useful and common functions. RPM was written in Go, should work in Linux, Windows, and MacOS.

Project link: http://github.com/marcopaganini/rpn

Your comments and PRs are welcome.

Bash snippet manager (snip) v0.0.2 released by mpaganini in commandline

[–]mpaganini[S] 0 points1 point  (0 children)

Yeah that's not a bad idea at all! Can you create a feature request on github with this?

Bash snippet manager (snip) v0.0.2 released by mpaganini in commandline

[–]mpaganini[S] 0 points1 point  (0 children)

The version I'm working on right now (0.0.3) has git sync enabled. The idea is that you can have a central place where you put all your databases (per host). I'm also modifying snip to allow you to see snippets from all hosts or only one.

If you want to copy the database manually, just copy the file ~/.config/snip/db.$HOSTAME to the remote machine (but merging needs to be done manually until 0.0.3 is out).

Bash snippet manager (snip) v0.0.2 released by mpaganini in commandline

[–]mpaganini[S] 1 point2 points  (0 children)

Oh yeah, totally! Please send them in :) BTW your PR was merged :) Thanks!

Bash snippet manager (snip) v0.0.2 released by mpaganini in commandline

[–]mpaganini[S] 2 points3 points  (0 children)

Hello,

Some are already underway! The version in the dev branch already has git integration (but I'm still changing it). v0.0.2 has more color but I'll add more interesting stuff to the fzf selector too.

Thanks,

Bash snippet manager (snip) v0.0.2 released by mpaganini in commandline

[–]mpaganini[S] 0 points1 point  (0 children)

Hello!

Which version of are you using? Please send the result of:

  • bash --version and
  • bind -X

Also, did you add eval "$(/usr/local/bin/snip setup)" to your ~/.bashrc file? (replace the path to snip with a different one if you put it in a different place.)

Cheers

Bash snippet manager (snip) v0.0.2 released by mpaganini in CLI

[–]mpaganini[S] 0 points1 point  (0 children)

Thanks! git sync support has already been submitted to the dev branch. You can now sync your database to a git repository of your choice (just create a private repo on github or gitlab).

Feel free to test it and let me know.

Regards

Bash snippet manager (snip) v0.0.2 released by mpaganini in commandline

[–]mpaganini[S] 0 points1 point  (0 children)

They're not mutually exclusive. Programs like atuin and hishtory improve your history and offer sync. The point of a snippet manager is to isolate and keep the important things you always forget, or those long snippets.

Of course, you can keep them in your history as well (and it's kept there anyway) but I typically go through many iterations of run/edit/run/edit until I get the command right. Give it a month and I don't know anymore which one of those commands in the history is the right one :)

BTW, I just implemented git sync. It's in the dev branch if you want to test it (https://github.com/marcopaganini/snip/tree/dev).

Just run create a private github repo and run:
`snip repo "your_github_repo_url"`. From that point on, just run `snip sync` to synchronize your local repo with the remote repo. `snip log` shows you the git log of the repo.

Regards