A secret garden of programming and random things
Last active 60 minutes ago
Don't wanna be here? Send us removal request.
Text
Many new parents are delighted to discover that if left to their own devices for long enough, their children will just go ahead and raise themselves. Later on, the same parents are shocked and dismayed to find that their children didn't raise themselves to obey and respect their parents.
20K notes
路
View notes
Text
I mostly use Ctrl+L to redraw the prompt when editing a multiline command, or when the shell gets confused by a previous command not ending with a newline.
Instead of typing a clear command, just press Ctrl+L to clear your terminal or shell screen on macOS, Linux, or Unix-like systems.
42 notes
路
View notes
Text
HEY, FELLOW HATERS OF INSANELY-BRIGHT CAR HEADLIGHTS, SOMEONE HAS STARTED A PETITION TO REGULATE THEM.
It's an official petition through the Australian Government's e-petition page, which means if it gets enough signatures, it will be tabled in government.
You do have to be an Australian citizen to sign it, BUT!!! PLEASE REBLOG THIS EVEN IF YOURE NOT, because these kind of things have a roll-on effect, and if Australia legislates LED headlights, then other countries may follow.
FYI, the petition asks only for your name and email, and once you've clicked the sign button, they'll send you an email to confirm your signature --- you need to click the confirmation link in the email to have your signature counted.
24K notes
路
View notes
Text

I just have to show everyone this really weird ice cube. I guess the top froze and then when the rest tried to freeze it needed to expand and just ... pushed out the top?
It's normal for this tray to make ice cubes that don't have flat tops but I've never seen this before.
0 notes
Text
Who needs a pen. Feet, hands can tap. Tap tap tap. Definitely more audible to the people not listening to the music...
clicking a pen over and over again is actually fun as fuck its a shame it makes everyone in a 30 foot radius want to kill me with a rock
99K notes
路
View notes
Text
@bonedev doing a great impression of @picsthatmakeyougohmm icon
2 notes
路
View notes
Text
My dad had a laptop. It was literally the size of a briefcase and had a handle. But it was the same form factor as current laptops, just bigger. The keyboard came out so you could type easier on a desk. It had a 5.25" floppy, hard disk, 286 processor, EGA graphics, but a monochrome panel. You needed to plug it in to a monitor to get all 16 colours. I am not sure if it had a battery. I think it was called Lap V but my dad called it the lappy. He would have used it at work and home.
This was supposed to sit on your lap? This is a mid-'90s laptop 馃槄
58 notes
路
View notes
Text
There's a program that looks at a device console and figures out what it is called. Obviously such a program needs to handle different systems. Alas, there was never any testing other than (apparently) some manual testing years ago. Of course there are bugs but more importantly, there's basically no way to automate tests with hardware. I created a mock that kinda works but I didn't have much confidence in it.
Yesterday, I thought my problem was that I just had to examine two real systems (Linux + FreeBSD) to better model the mock. Today I was going to model the third.
But the third system (Cisco IOS) doesn't work anything like how I thought it did. I'm still not sure I fully understand it.
And I found a fourth system (Junos OS) that is handled but which I had never seen before.
And there's a fifth system (Cisco NFVIS) that may or may not be important.
I've fixed bugs in this program before but none of the cases reported by customers happen on the hardware I could get my hands on.
The mock is revealing bugs in the program but at least I'm somewhat confident that I can fix them without breaking things for the customers.
0 notes
Text
When I worked at Subway this one guy would have handfuls of pickles on his sub. Only saw him every few weeks but he'd always order the same thing.
Any other fast food workers got a celebrity? Mine is a door dash that comes in every day around 1 that's a double cheese burger add 4 slices of cheese. That's 6 total slices. I love that guy.
5 notes
路
View notes
Text
I'm bluer than 97% of the population.
Da ba de da ba di.
HOW DO YOUR PERCEIVE BLUE AND GREEN?
24K notes
路
View notes
Text
I've been debugging SFP modules again. The last time I did this I found a hardware bug, where the clock signal we generate was not accurate enough.
This time, things were a little simpler.
There was a major update, that included a kernel upgrade. The PHY driver now knows how to talk to our chip so we don't need patches to allow that. But our old patches allowed the PHY to fall back to a fixed default if the link is up but auto-negotiation fails. The new driver was not doing that. When auto-negotiation fails, it just marks the link as down.
I'm not sure we ever advertised this ability, and we don't allow the fallback settings to be configured, but our customers were relying on this anyway so we have to make it work again.
But getting here took a while. I dusted off the low-level tool I wrote last time to talk to the PHY and figure out what is going on. Weirdly, the tool reported everything was fine, because at the PHY level, it was. Mostly.
The PHY can handle switching between Copper and SFP but the driver does not make use of this. Instead, it polls each interface to figure which should be active. So even though the SFP link was up, the driver was ignoring it, and making the copper interface active instead.
3 notes
路
View notes
Text
One of the products had a major UI rewrite last release. Today I was going down an old list of UI bugs, confirming they were no longer valid and closing them.
It was so much nicer than fighting with CI for the other product.
5 notes
路
View notes
Text
We have a bunch of devices. Between them all there's a few different types of network interface. Each of them supports a different set of link speeds. But until recently, we just had a fixed list of speeds to choose from.
I fixed that (yay) but the newest device snuck past me. Somehow this thing had 2 interfaces with 2 new, unique drivers, that support different speeds. But the thing that killed me all morning is that using ethtool to probe the interfaces only works if the interface is already up.
None of our other devices is like that. Took a while to figure out because running ethtool works but doing it from the early boot probe script doesn't. And debugging early boot scripts is painful.
Got there eventually 馃槍
0 notes
Text
Today I used pickle for the first time.
I wrote a tool that needs to parse a file to know what it can do.
Parsing YAML in python is weirdly slow. So I did a hack where it is converted to JSON at build time.
But the actual parsing still happened at runtime. Over time it has become slower. So I wanted to move the parsing to build time too.
Originally, this code communicated with the rest of the program using a format that could be serialised to JSON. But at some point I needed to extend things and hacked some dynamic classes in there.
Pickle is able to handle this. Well, it can't do dynamic classes but I only actually needed 3 classes so a small tweak later and now the runtime can avoid the parsing logic.
cProfile says it's only a second of saved time but it's a huge number of instructions.
3 notes
路
View notes
Text
Big system update meant the curl wrapper for lua was replaced with a different one.
Apparently the previous wrapper handled adding [] around IPv6 addresses for you, but the new one does not.
It took longer to get an IPv6 environment setup than to find and fix the bug. But I was pretty sure it was gonna be a [] bug as soon as I read it.
0 notes
Text
There's a dashboard with widgets. On one screen you define the layout. On the other screen you configure the widgets. But configuring widgets does not save config properly so your config ends up overridden by defaults, unless you changed the layout first.
0 notes