News for hackers. Stuff that matters.

adder46

Re:Show HN: A Minimal Traceroute Implementation on Tuesday September 14, 2021 @12:52AM (#28520362)
I wanted to share a very small traceroute implementation I wrote using Python. It is asynchronous and it supports probing over UDP or ICMP. It was a good networking exercise.
Re:Show HN: Unix style CLI client for dpaste.com on Saturday March 20, 2021 @11:26PM (#26527894)
dpaster-rs is a UNIX-style command-line client interface for the dpaste.com.

If you often need to share code or output of some command in a pastebin, this tool will lift some of the burdens from your back. It reads from stdin by default if no file argument is passed, meaning it perfectly fits a UNIX-style workflow. It is configurable and easy to use. Check out the README for examples on how to install it and how to use it:

https://github.com/adder46/dpaster.rs

Any critiques regarding improving the code quality, architecture, or functionality, are more than welcome.

Re:Show HN: A Terminal Tetris Game on Friday March 12, 2021 @10:09PM (#26443552)
I wanted to share my attempt at implementing the classic tetris game. It works in the terminal and uses the ncurses-rs bindings for the UI part. For me, the coolest part about it is that the tetrominos and their rotations are encoded as 16-bit unsigned integers. For example, to represent a square, we want 51! Why 51? Because 51 decimal is `0b0000000000110011`. We can make 4x4 Vec from that, and we get:

``` [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 1, 1], [0, 0, 1, 1]] ```

Notice how the 1s form a square?

As I'm still learning Rust, any suggestions regarding the architecture, overall design of the game, more idiomatic code, etc., are very welcome.

If you want to play or just see how it turned out, check out:

https://github.com/adder46/tetris.rs

If I enter `https://twitter.com/`, it gets cut off.
I entered `twitter.com`, it says invalid URL.
Re:Show HN: History suggest box for your Python shell on Thursday January 07, 2021 @01:25AM (#25667892)
pyhstr is a history suggest box for Python shells. It lets you quickly access the commands in your shell history. Just search for the command you want to execute (regex mode is supported), or, if you don't exactly know what you're looking for, you can browse through the commands until you find the one you want to execute. Apart from this, you can delete unwanted items from your history, too, and more. It works on all terminals ranging from linux term to alacritty to xterm. It was initially made for the standard Python shell but it should work with IPython and bpython, too.

It has been my daily driver for a while now.

Check out the README for instructions if you want to try it out.

Suggestions, bug reports, etc. are welcome.

Let me know what you think:

https://github.com/adder46/pyhstr

Re:Show HN: History suggest box for your shell on Sunday December 27, 2020 @01:40AM (#25549343)
hstr-rs is a shell history suggest box that provides quick access to the commands in your shell history. Just search for the command you want to execute (regex mode is supported), or, if you don't precisely know what you're looking for, you can browse through the commands until you find the one you want to execute. Apart from this, you can delete unwanted entries from your history, too, and more. It should work on all terminals ranging from linux term to xterm. It was initially made for bash but it should work as well with zsh, ksh, and tcsh, too.

I use it on a daily basis.

Check out the README for instructions if you want to try it out.

Suggestions, bug reports, etc. are welcome.

Let me know what you think:

https://github.com/adder46/hstr-rs

Since I spend a lot of time on IRC and I often need to share something in a pastebin, I wrote a little script to help me with that process and lift some of the burdens from my back. It's called dpaster, and it's actually a command-line client interface for the dpaste.com pastebin. It's configurable and easy to use. It reads from stdin by default if no file argument is passed, which means you can use it as a part of some UNIX pipeline. It can even guess syntax to highlight (limited to pygments' guessing ability ¯_(ツ)_/¯).

Check it out and let me know what you think:

https://github.com/adder46/dpaster

Re:GitHub download speed discrimination based on location on Tuesday November 24, 2020 @03:55AM (#25196593)
I'm downloading a release from Github and the download speed does not exceed 50KBps. So, I investigated a bit what was going on and I stumbled upon the linked reddit thread. It seems that Github and Microsoft prioritize connections from the US, thus discriminating the rest of the world. Very disappointing for such a huge corporation.
Re:Pyhstr now has bpython support on Sunday November 15, 2020 @08:35AM (#25101058)
v0.1.4 - added bpython support
Re:Pyhstr now has IPython support on Sunday November 01, 2020 @01:46AM (#24957467)
pyhstr is history suggest box for the standard Python shell. It also works with IPython.

This app lets you quickly search, navigate and manage your Python shell history.

Various issues were fixed, should be pretty usable now.

Let's try to do something about this.
Re:Use Humans.txt to credit your team for a project on Thursday October 15, 2020 @02:47AM (#24785603)
Pretty pointless, IMO.
Re:Ask HN: A story-telling intro to Probability and Stats? on Thursday October 15, 2020 @02:14AM (#24785418)
Re:Ask HN: Should an engineer try to understand type theory? on Tuesday October 13, 2020 @11:47AM (#24766696)
Awesome. :)

Ask HN: Should an engineer try to understand type theory?

I'm studying to become a software engineer, and I was wondering if I should bother learning type theory. I have TAPL by Pierce in mind in particular.What are the possible benefits if I successfully tackle the book?Also, other readings (not as in-depth as the book) are also welcome.

( Read More... | 3 comments | 2 points | on HN )
Re:What if you knew how computers work? (2015) on Saturday October 10, 2020 @02:30AM (#24737046)
There's much more to "How computers work" than just assembly. Where are networks, operating systems, databases, compilers, architecture, etc?
Re:Ask HN: What password manager do you use? on Wednesday October 07, 2020 @08:06AM (#24707362)
Re:Ask HN: What RSS feeds are you subscribed to? on Friday October 02, 2020 @10:11PM (#24668927)
I was wondering the same today. I only recently discovered Hacker News, and have been wondering since what other awesome resources are out there.