233 karma · joined Jun 16, 2007 (19y ago) · 85 submissions
comment 1y ago · link · parent
I was playing with a toy TCP/IP stack, and decided using SLIP over a pty on Linux was a great way to interface with the kernel. Unfortunately it looks like macOS previously shipped with slattach(1) a very long time ago, but no longer does.
I'm curios if other people have used SLIP on macOS to get a dead-simple, cross-platform API to the networking stack?
The alternative would be to use tun/tap on Linux and utun on macOS, but SLIP would be so much nicer.
comment 2y ago · link · parent
comment 4y ago · link · parent
comment 5y ago · link · parent
comment 6y ago · link · parent
Youch. Was the PDP-11 really so unreliable?
comment 11y ago · link · parent
comment 11y ago · link · parent
comment 11y ago · link · parent
Two weeks ago, after becoming fed up with having to copy and paste results from one line to the next, I wrapped it in a repl and added bc(1)-like support for "." expanding to the last value. Rather embarrassingly, I started to implement bc(1)-style variables, but then realized this was incredibly silly as you can simply use perl variables directly. :-)
https://github.com/mct/junkdrawer/commits/master/bin/calc
I fully support writing other calc implementations, especially in languages such as C! It's a great exercise, and can become very complex very quickly. bc(1) supports arbitrary precision (try: echo "scale=500; 4a(1) 42" | bc -l), which is super awesome. In C, I've only implemented RPN calculators, never infix, which would be fun to try.
comment 11y ago · link · parent
comment 11y ago · link · parent
comment 11y ago · link · parent
* Toggling if search results should be highlighted (:set hls, :set nohls)
* Opening the filename under the cursor in a new window (^W f)
Completely emulating an entirely different editor is very, very difficult :-(
I applaud everyone contributing to these projects, and hope they continue to improve! They've already come a very long way from evil, and viper-mode.
comment 11y ago · link · parent
Thanks!
comment 11y ago · link · parent
* When no entry already exists in the cache, bind will forward the ANY query to an authoritative server and return the result.
* When some information is already present in the cache, bind will return only the information already cached, without querying more information from an authoritative server
Thus, if you need to know if a specific RR exists, you must query for that specific RR.
Still, to aid humans in debugging DNS problems, a nice compromise might be to allow ANY queries only over TCP. That would alleviate the spoofing problem.
comment 11y ago · link · parent
One example is embedded systems. Many don't have an RTC, or boot after the RTC has lost power. If a network connection finally comes up, NTP will instantly fast-forward the clock by years
comment 11y ago · link · parent
The article mentions many traceroute implementations change the source port to associate queries with responses. Another technique is to use the IP ID field, leaving the source port static. In tcptraceroute, you can choose either method using "--track-id" or "--track-port". By comparing the two, you can sometimes see traffic being load-balanced across multiple links.
I just did a quick write up of this at https://gist.github.com/mct/2ae1dbc2d596f59f5aff (which I should add to the examples.txt file)
comment 11y ago · link · parent
You can select packets to be sent to userspace with the "-j QUEUE" iptables target handler, and then read those packets using libnetfilter.
comment 11y ago · link · parent
I just uploaded it to https://github.com/mct/assembly-toys/tree/master/imp
comment 12y ago · link · parent
You can try searching for public transit apps specific to the cities you'll be visiting. Depending on where you'll be travelling, there are some nice ones that have built-in maps of the transit system, trip planning, and real-time departure estimates. For a city like San Francisco, you may need more than one to cover the various public transit providers available (BART vs MUNI, etc). Lacking a specific app, you may want to just bookmark mobile versions of the public transit provider's website.
I also like installing a maps program that can make use of offline data. On Android, there's OsmAnd. That way, even if you no longer have data service, you can use the GPS to get a sense of where you are and what's nearby.
TripIt can be nice for keeping your travel itinerary easily accessible -- but of course it's always good to have hardcopies either on your person or in your carry-on.
Good luck!