Better HN
topnewbestaskshowjobs
Log inSign up

samlewis

178 karma · joined Jul 15, 2014 (12y ago) · 38 submissions

Submissions

1.

For a brief generation or two, we clicked(svrl.net ↗)

3 points · by samlewis · 1mo ago · 1 comment

2.

How we see groups in design(canva.dev ↗)

3 points · by samlewis · 2y ago · discuss

comment 5y ago · link · parent

Shameless plug but I was also interested in the magic behind these mesh networking tools, so I wrote my own toy version that was very much inspired by the tools you mentioned. I blogged about it here: https://www.samlewis.me/2021/07/creating-mesh-vpn-tool-for-f...

The short answer to your question though is that the packets are sent over a secure tunnel.

4.

How do Mesh VPNs work? Writing my own VPN tool in Golang to find out(samlewis.me ↗)

4 points · by samlewis · 5y ago · discuss

5.

Creating a mesh VPN tool for fun and learning(samlewis.me ↗)

2 points · by samlewis · 5y ago · discuss

comment 5y ago · link · parent

Shameless self-promotion but there's also this post I wrote in 2017 if anyone interested in a slightly different take (but a very similar write up to the OP): https://www.samlewis.me/2017/06/a-peek-under-bitcoins-hood/

Cool that this article implements the cryptography primitives, though!

e: Funnily, like the article, I also stored some BTC in a wallet and challenged people to (manually) take/steal it. At the time it was worth $10 USD.. now it's worth $123 USD!

comment 7y ago · link · parent

Really awesome, how long did it take you to put together?

comment 8y ago · link · parent

Last time I tried this, I found a lot of corporate spam filters seemed to (silently) drop my emails, so I went back to using GMail out of frustration.

Is there anything you do that helps with this? I was using GApps and I don't think my domain name was too spammy (samlewis.me).

comment 8y ago · link · parent

Seems like a very appropriate use of technology to me?

If they can get "good enough" results using Linux and running with technologies that the average developer is more likely to know, is it worth the investment in running a RTOS? Especially given running a RTOS will make any higher level app integration more difficult?

The benefit of running with Linux outweighs the risk of "lettuce on the floor", imo. Yes, there's probably overhead in terms of clock cycles, but there's also probably dramatically less overhead in terms of developer resources.. and when you're running off commodity hardware you can guess which overhead will cost more!

comment 8y ago · link · parent

Asking out of mostly ignorance, but is Qt still relevant in 2018?

I've noticed that even for standalone graphical applications, it's becoming more and more common to use webapps - either served locally and accessed through a browser, or through something like electron.

comment 8y ago · link · parent

http://jrnl.sh/ is nice

The low amount effort to add an entry allows me to jot down thoughts, conversations etc easily which makes me actually do it.

Having it save as a plain .txt file is nice for versioning/backup as well.

comment 8y ago · link · parent

That was a really fun to read, well written piece.

Definitely makes me interested in trying something like this - does anyone know of any other games that have similar economy aspects?

comment 9y ago · link · parent

Am I missing something or is the next step going to be Intel making ME impossible to remove without bricking your CPU? If so, seems like these efforts are fairly futile if they'll only work for the current gen of processors.

comment 9y ago · link · parent

If you're a large enterprise, paying an extra $20/month could definitely be worth not having the pain & cost of having your employees having to manage paying an extra bill each month.

comment 9y ago · link · parent

This should be really easily if you use gstreamer pipelines. Something like this:

  # To send
  gst-launch filesrc location=file.wav ! wavparse ! audioconvert ! audio/x-raw-int,channels=1,depth=16,width=16,rate=44100 ! rtpL16pay ! udpsink host=localhost port=1234

  # To receive. You could also use something like VLC with "vlc rtp://localhost:1234" for this part. 
  gst-launch udpsrc port=1234 ! "application/x-rtp,media=(string)audio, clock-rate=(int)44100, width=16, height=16, encoding-name=(string)L16, encoding-params=(string)1, channels=(int)1, channel-positions=(int)1, payload=(int)96" ! rtpL16depay ! audioconvert ! alsasink sync=false
gstreamer gives fairly good control over tuning things like jitter buffers and sampling rates. That said, I've never had to use it on Windows so YMMV.

comment 9y ago · link · parent

GitHub Pages with a static site generator and Travis CI is superb.

I have my blog [0] setup so that all I need to do in order to publish a new article is add a markdown file to my GitHub pages source repo. Travis then builds the html and pushes it back to the GitHub pages repo.

You can easily add files and edit markdown on the GitHub web interface so I essentially use GitHub as a CRM. If you're interested, have a look at my GitHub Pages repo [1] and Travis CI build config [2].

[0] http://www.samlewis.me [1] https://github.com/samvrlewis/samvrlewis.github.io/tree/webs... [2] https://github.com/samvrlewis/samvrlewis.github.io/blob/webs...

comment 9y ago · link · parent

If you're interested in the nitty gritty of the mechanics of Bitcoin, check out my blog post: http://www.samlewis.me/2017/06/a-peek-under-bitcoins-hood/

comment 9y ago · link · parent

This is really cool! It'd be even more awesome if there was a permalink so I could save/share my results.

comment 9y ago · link · parent

Theres a number of DNS seed servers that are hard coded into the Bitcoin core codebase. A Bitcoin client does a nslookup on these seeds to find intial peers to connect to and bootstraps this way.

For a bit more detail and if you're interested in this sort of thing, have a read of my blog article I wrote about the technical side of Bitcoin: http://www.samlewis.me/2017/06/a-peek-under-bitcoins-hood/

comment 9y ago · link · parent

Ah, my bad. Sorry if I was being condescending in my previous reply then.

I suspect it was a design decision, yeah. If outputs could be spent multiple times then you'd need to traverse the chain of outputs backwards to see how much an output has left in it. Bitcoin's implementation is less complex and more elegant, imo.

comment 9y ago · link · parent

It has to do with the way transactions and the blockchain ledger works, reread the transaction part of the article and it might make more sense. Basically, transaction outputs can either be spent or unspent, you can't half spend an output (or perhaps more accurately, you can't spend a previous output twice).

comment 9y ago · link · parent

No promises but I was actually considering having a crack at this as my next project. stay tuned!

comment 9y ago · link · parent

My intention in using "hand crafted"/memorable private keys was just to make the article and what I was doing easier to follow.

I don't think there's any harm in people copying and pasting examples, it only becomes an issue if they start depositing money to either of the addresses that I listed the private keys for. I hope that's an obvious enough mistake not to make! Thanks for the feedback anyway, I'll keep an eye on those addresses and if they start getting mysterious deposits change the article to include more cryptographically secure keys.

comment 9y ago · link · parent

Oops, you are correct. Good pick up, I'll get to changing that!

comment 9y ago · link · parent

I did deliberately leave that there in the hope someone might take it using what they'd learnt from the article. there's a short note about this in the conclusion to the article. From the "non whole" fee amount it looks as though someone might have just used some sort of wallet software to take it though, which is a shame.

26.

A peek under Bitcoin’s hood: Writing a client that can create a transaction(samlewis.me ↗)

241 points · by samlewis · 9y ago · 63 comments

comment 9y ago · link · parent

But with the changing nature of computer programming, arguably programming becomes more efficient and needs less manpower. It's easy to see that programming a web app today takes less man hours than it would've if you were to try to do it 30 years ago using C.

So far it seems that these efficiency gains have been offset by growing demands in what software can do, making the industry continue to grow. I wonder if at some point in the future, these demands will stabilise and continued improvements in efficiency will necessitate a reduction in the workforce.

Will automation make a computer programmer's job disappear? No, probably not. But will it allow one person to do the job of ten? Maybe.

comment 9y ago · link · parent

If you don't reuse Bitcoin addresses, then your Bitcoin will be safe. Bitcoin public keys aren't revealed until they're used to sign a transaction. An address is the SHA256 hash of the public key and SHA256 is quantum safe.

That said, the method of transaction signing would need to be reworked to be quantum safe. But not all Bitcoin would be able to be disappeared overnight.

comment 9y ago · link · parent

You can margin trade on exchanges like Poloniex right now. Whether or not it's a bright idea is another matter. Even if you assume that it's presently overvalued, how can you know when (or even if) the bubble will pop?

comment 9y ago · link · parent

What software do you use to analyze call graphs?
12