HNHacker News
TopNewBestAskShowJobs

samlewis

177 karma · joined July 15, 2014

submissionscomments
samlewis··on Ask HN: Real-world Tailscale business use case
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.

samlewis··on A from-scratch tour of Bitcoin in Python
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!

samlewis··on Apollo 11 in Real Time
Really awesome, how long did it take you to put together?
samlewis··on Ask HN: Best alternative to Gmail?
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).

samlewis··on Edge Computing at Chick-fil-A
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!

samlewis··on Projects: Back to C
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.

samlewis··on Ask HN: Do you keep a personal knowledgebase? With What?
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.

samlewis··on Economics of Minecraft
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?

samlewis··on Replacing x86 firmware with Linux and Go
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.
samlewis··on Security alerts on GitHub
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.
samlewis··on Ask HN: How to stream low latency audio from one machine to another over LAN?
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.
samlewis··on Which service do you use to host static website?
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...

samlewis··on Ask HN: Resources to learn blockchain and smart contracts?
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/
samlewis··on Ask HN: What weekend projects have you created?
This is really cool! It'd be even more awesome if there was a permalink so I could save/share my results.
samlewis··on Bitcoin Workings Explained, for Real
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/

samlewis··on A peek under Bitcoin’s hood: Writing a client that can create a transaction
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.

samlewis··on A peek under Bitcoin’s hood: Writing a client that can create a transaction
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).
samlewis··on A peek under Bitcoin’s hood: Writing a client that can create a transaction
No promises but I was actually considering having a crack at this as my next project. stay tuned!
samlewis··on A peek under Bitcoin’s hood: Writing a client that can create a transaction
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.

samlewis··on A peek under Bitcoin’s hood: Writing a client that can create a transaction
Oops, you are correct. Good pick up, I'll get to changing that!
samlewis··on A peek under Bitcoin’s hood: Writing a client that can create a transaction
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.
samlewis··on Will Robots Take My Job?
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.

samlewis··on Ask HN: If Quantum computing wins, Blockchain then dies, right?
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.

samlewis··on To deflate the cryptocurrency token bubble, fix the market cap indicator
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?
samlewis··on Ask HN: What are some well written/engineered open source software?
What software do you use to analyze call graphs?
samlewis··on Ask HN: What is the most exciting development in your field right now?
In the embedded/IoT world, I'm fairly excited about two upcoming RTOS's: mynewt (http://mynewt.apache.org/) and Zephyr (https://www.zephyrproject.org/).
samlewis··on Blockchain Demo [video]
So, all the miners race to mine the block but only the winner gets the 12.5 btc reward? Does that mean if you're a Joe Bloggs Bitcoin enthusiast, you'll never be able to get any reward if you only ever mine on your low key laptop setup?
samlewis··on IoT’s killer app is not home security
Excuse my ignorance but what will you do if the battery fails or your firmware has a bug and the deadbolt won't open? smash the door down?
samlewis··on I made a cell phone [video]
Super cool, any chance of some pictures or a video of the finished product?
samlewis··on Ask HN: I Want to Build a Simple API-Backed iOS App - React Native or Swift?
Have you thought about using Cordova? If you're a web developer you'd be able to get something out quickly as it's all just HTML + JavaScript.
Page 1 of 2Next →