HackerTrans
TopNewTrendsCommentsPastAskShowJobs

thatjamesdude

no profile record

Submissions

Show HN: Gatekeeper, a hobbyist DHCP server written Go

gitlab.com
7 points·by thatjamesdude·4 ปีที่แล้ว·2 comments

comments

thatjamesdude
·4 ปีที่แล้ว·discuss
I have many future ideas for this. I wrote it out of boredom and a desire to do something "low level"-ish and parsing DHCP packets seemed like a fun example.

All this exercise has taught me is how nothing is ever simple and that specs can get really, really long over time. And also DHCP relays... Maybe one day I will support those.

In the long run: I wanna build a single binary to run the internet from my pi configured by a YAML file. This will do things like PPP connections and use the netlink kernel modules in Linux to setup routing and firewall rules.

But that's a ways off, for now, this is busy running my home network and some feedback is always appreciated
thatjamesdude
·5 ปีที่แล้ว·discuss
> Telling people they can have a religion but they can't practice it is as laughabaly silly as telling them they have freedom of speech so long as they don't say undesirable things.

Freedom of Speech != Freedom of Consequence.

Don't care for the rest of the comment because I've come to believe those that can't wrap their heads around the difference between civil and criminal law are not worth talking to about either.

Some might say there's irony in the religious component being mentioned, but I say it is natural. Not many incentives to think critically or against the grain in religion, not surprising it is rare amongst its proponents then.
thatjamesdude
·5 ปีที่แล้ว·discuss
>I'd also wager a guess that most South African farmers are not white

Given the demographics, not an unfair guess, albeit a lazy one. No, not even close.

Land reform is a controversial topic in my country so I'm just going to TL;DR the past 5 decades and provide some links[0][1] that you are going to have to be very sceptical about (given the controversial nature of the debate).

- We have one of, if not the, highest wealth gaps in the world as a direct result of Apartheid

- Unsurprisingly, land ownership is rare

- Ergo, most of the land is owned by the wealthy class, who are the white minority.

- I am not offering an opinion on the racial aspect here, violent crime affects all South Africans equally

[0]: https://en.wikipedia.org/wiki/Land_reform_in_South_Africa

[1]: https://www.gov.za/sites/default/files/gcis_document/201802/...
thatjamesdude
·5 ปีที่แล้ว·discuss
Vastly misunderstood this from the title and I suspect a few others have as well.

This seems to be more about internships than interviews for a qualified professional (or whatever you want to call those candidates).

Just make unpaid internships illegal. If you do work for a company that a paid employee would normally do, then you should be compensated.

But not paying someone to run around and get you coffee is just completely nonsensical these days.

I'd laugh all the way out of the door, and my country has a 40% unemployment rate. I'm just not going to do work I don't get paid for, because it turns out living is expensive.
thatjamesdude
·5 ปีที่แล้ว·discuss
What kind of documentation would you like to see for a service like this?

Genuinely asking because I've always used the query

    dig +short myip.opendns.com @resolver1.opendns.com
to resolve the public IP my ISP has assigned me so I can update my homelab's IP.

I use Route53 and I either completely missed the checkip link or they simply don't mention it
thatjamesdude
·5 ปีที่แล้ว·discuss
Whenever I see interface{} mentioned in Go I see vague references to polymorphism.

That is wrong.

Interface is a special type in Go. All interfaces in go, including ones you declare, hold 2 pieces of data in memory

1. Pointer to the concrete type

2. Metadata about the concrete type

interface{} is not a special thing, it is just the empty interface, and everything satisfies the empty interface.

This is quite neat. All a type assertion does is follow the pointer and check the type data.

There is also a type switch in Go. https://play.golang.org/p/22aegLocHXI

This makes building handlers around the dynamic type easy. But for the most part: Single function interfaces. Compose those to make make larger interfaces if absolutely needed (see io.Writer, io.Reader and io.ReadWriter)
thatjamesdude
·5 ปีที่แล้ว·discuss
Comments like this make me think we software engineers live in a different world.

>unlike USD, the court can’t do something like garnish your wages to pay back a 10M settlement by taking some crypto out of your incoming transactions

You think so, do you? "The law is the because that's what the law says it is". It might not be possible now (and I'm not sure I believe that, you can garnish foreign wages) but it will be if the need arises.

"But the code" yeah, no, that's a silly argument that only applies to cyberspace and not the physical world you occupy
thatjamesdude
·5 ปีที่แล้ว·discuss
>The theory is that the code is the law. There is no theft.

What rubbish. You cannot claim "the computer let me do it" and expect to be let off for that. That's an extreme absurdity and is absolutely not how the law works.

Contrary to what a lot of people seem to think: Crypto is not "outside" the law in any way. It is a token of value (like FIAT currency) and there are plenty of laws that cover use cases from capital gains taxes to money laundering to, you guessed it, theft.
thatjamesdude
·5 ปีที่แล้ว·discuss
Hey OP, just wanted to say thank you for putting this together! You have some amazing references in that readme, I particularly love the link to the go routine scheduler. You've also done such a wonderful job with explaining the why and how around some of the complex material.

Just really wanted to say thanks! This is an incredible resource