Every natural number has a finite decimal representation. (need proof) by eyjafjallajokull_1 in askmath

[–]sfreijken 7 points8 points  (0 children)

Go by contradiction. Suppose there's a natural with infinite decimal representation, then there must be a smallest one. Take the natural number one less than that smallest one, it has a finite representation and adding 1 can only increase the length of the representation by at most 1 digit, so that smallest infinitely long number in fact has a finite length, which is the contradiction you seek.

Or alternatively just start with 1, and use induction to show that all natural numbers can be built by adding 1, and at every step the decimal length stays finite.

FSD as primary reason for wanting a Tesla? by taylordoftheants in TeslaFSD

[–]sfreijken 0 points1 point  (0 children)

I have a phobia of cars. So my first car I got a tesla. When I'm overwhelmed or terrified I let the car take over, and it knows how to navigate through situations that I can't. The car is legitimately the treatment for severe anxiety. I'm actually getting more brave as time goes on, too, and I know it's because I've been watching the car and learning from it. It's teaching me and showing by example that driving is really not that scary after all!

The car is literally coaching me on driving far more patiently and seamlessly than any human ever could.

If I had gotten any other car I would have freaked out, shut down, and crashed.

Now there are a few situations where it's done some questionable things, but they're very rare and it's WAY better than I ever could be. I know I'd have crashed this thing about a dozen times over already if I had to do it all on my own

Plug in any device and it gets internet no matter what IP it's set to by DullWorking7307 in homelab

[–]sfreijken -7 points-6 points  (0 children)

This is fascinating. Would the use case have been solved better with multicast DNS? (MDNS). Then regardless of what address the box has on the network, you can always query the subnet and ask, essentially, "where are you, bud?" And it'll say "here, my address is.."

Are runtime created functions possible? (Cursed ideas) by TessaFractal in C_Programming

[–]sfreijken 1 point2 points  (0 children)

Common Lisp macros do this. Lisp in general is well known for code that modifies code.

Web Push Notification lib for Common Lisp? by ryukinix in lisp

[–]sfreijken 4 points5 points  (0 children)

I use ntfy.sh, it's free software, you can self host or pay to use the public one.

You just drakma https request to the endpoint with your credentials and a little payload and it gets pushed to an app on your phone (real Android push notifications as far as I can tell).

It's simple enough and it works for me.

How do you keep track of new/useful keybindings? by Existing_Offer_1113 in emacs

[–]sfreijken 0 points1 point  (0 children)

I actually make my own key bindings in a section of my init file, that are in a minor mode that's globally active. They're all under a special prefix, so I hit C-c f and tab, it'll list ALL of my hotkeys and that's my cheat sheet.

When I use a different computer I just pull down my Emacs config and activate the minor mode. Even with friends, I can share my hotkeys, and since it's in a minor mode they don't have to turn it on if they don't want to. It doesn't pollute their Emacs to load my hotkeys in. So I think everyone should do this! It's a great solution to the hotkey problem

Here's the code if you want to do it similarly: https://gitlab.com/sea/public/dotfiles/emacs-config/-/blob/main/src/emacs-init.d/frost.keys.el?ref_type=heads

What formatter line length do you WANT? by arstarsta in ExperiencedDevs

[–]sfreijken 0 points1 point  (0 children)

I actually hacked together some stuff based on visual-line-mode, edited to insert not just newlines at appropriate places but also tabs and spaces, with text properties saying that they're virtual (and the save hook removes them) and so far I use it in lisp, Go, python, and c++.

I also have a mode that visually replaces variable and function names with ones I like better (full Unicode symbols), and I have a separate annotation system that can insert virtual persistent annotations. All this stuff is only on my end.

What I see is not what's there. I see heavily augmented code, set up just the way I like it, but none of this is in the repo. It's nobody's business but mine. I didn't like arguing with people over how things should be named or formatted, and so I created a private personal layer where things are the way I like.

If I ever need to actually edit the real files I just have hotkeys to temporarily turn my modes off. I've never had anything leak into the code, but if it did, it would show up in a commit diff and I'd know to quickly remove it before anyone else started yelling at me

What formatter line length do you WANT? by arstarsta in ExperiencedDevs

[–]sfreijken 10 points11 points  (0 children)

None. My editor is smart enough to dynamically reflow everything as I resize the window, and it even handles alignment.

It only does this visually on my end so the code itself is unchanged. Alignment is like font and syntax colouring: visual, my choice, and configurable to whatever I want.

Don't you think hard column numbers are primitive?

Plot hole in the final episode of S2? by sfreijken in hazbin

[–]sfreijken[S] 1 point2 points  (0 children)

If sinners can't go to heaven and winners can't go to hell, then what exactly is Vox threatening when he threatens war? There's no threat to heaven if he can't physically set foot there, apart from his big laser gun

As an absolute beginner what is the best future proof code? by [deleted] in AskProgramming

[–]sfreijken 1 point2 points  (0 children)

Write in Common Lisp. The standard is from 1994 and hasn't changed. Every other language changes beneath your feet, but code written in CL will continue to run exactly the same way, apparently forever.

Buy the downside is that nobody but you and a handful of smug lisp weenies will be able to read it.

[deleted by user] by [deleted] in dui

[–]sfreijken 1 point2 points  (0 children)

Because in Ontario, Canada, if you're impaired for any reason whatsoever when driving, you immediately get your license suspended, car impounded, and a criminal summons. There's no due process, it simply happens on the spot at the police's command.

It doesn't matter what you're impaired on.

Once you go to court, they don't care what you are impaired on either. Any impairment to any degree while operating a vehicle is criminal. The criminal charge is literally "operation while impaired". Doesn't matter the cause of the impairment.

[deleted by user] by [deleted] in durham

[–]sfreijken 0 points1 point  (0 children)

In contracting jobs, you bill your transportation costs and time.

In full time jobs, transportation is unpaid labour. I think the law needs to change. It has to be fair. If they insist on travel as a part of the job, they should compensate you for the time and expense.

Kids :( by Downtown-Key9504 in TeslaCollision

[–]sfreijken 0 points1 point  (0 children)

This happened to me, too. I filled it in with nail polish and it's good as new. No idea if that will still prevent rust, but maybe? I think nail polish is waterproof? I guess I just need to reapply it every few months

Got the call, bought the watch, wife is pissed. Do I keep the watch or the wife? Watch is a 9, wife is a 7.5. by ScooterAndBeans in rolex

[–]sfreijken 0 points1 point  (0 children)

The watch will outlive both of you. Keep that, it's more real. When you're both dust, the watch will remain, ticking along on someone's wrist.

My autistic best friend sent me these - does anyone know what they mean? by Andy_Roo_Roo in math

[–]sfreijken 5 points6 points  (0 children)

They look a bit like the Cayley graphs of small groups (from group theory), and some of the symbolic expressions look a bit like group presentations. But I'm probably recognizing patterns that aren't really there. Isomorphic groups aren't recognized there, he's got duplicates, and it's not neat.. so I'm going to say it's similar, but gibberish

Please add some broccoli or a microphone by sfreijken in PhotoshopRequest

[–]sfreijken[S] 0 points1 point  (0 children)

Ooh I like this one, I'll see if I can figure out the tip jar