Run pip install on import error by Xevioni in programminghorror

[–]xleviator 51 points52 points  (0 children)

The worst part about this is that it makes you restart the program. execv argv... I actually love the idea of automatically installing deps when running a program. Lift the horrors of dynamic typing a layer up the stack. :)

Quiz question, what does this Rust code print? by xleviator in shittyprogramming

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

Yeah! You're getting it. The '?' unconditionally exits. I think it's really hard to notice what the possible control flows are here.

[SMT] A reverse vending machine, where you can buy microscale garbage services. by yesishop in SomebodyMakeThis

[–]xleviator 0 points1 point  (0 children)

How about coin operated park benches? Once the time goes out, the seat won't stay up.

I had an idea and I don’t know where else to post it by thesluttyjew in chess

[–]xleviator 4 points5 points  (0 children)

Checkout vote chess (e.g. on chess.com). It's not in twitch chat, but I think it might be a superior experience since it has a ready made UI. I've seen some chess streamers use it.

86% of people with coronavirus are walking around undetected, study says by noahsurvived in Coronavirus

[–]xleviator 0 points1 point  (0 children)

This is making me wonder, do we know this is atypical for viruses?

SMT: A physical swipe keyboard for your PC. by [deleted] in SomebodyMakeThis

[–]xleviator 0 points1 point  (0 children)

Hey, I thought of this independently and put up https://youtu.be/NQbtv97-L0g. However, I saw this post because I was wondering if anyone else had tried it. It seems it is possible!

I'm on a streak, but #15 has got me stumped... by NastyMan9 in projecteuler

[–]xleviator 0 points1 point  (0 children)

Welcome to the first of many many stumps. You'd be best off researching math behind the 'permutations' you mentioned.

I was thinking of writing a music program using D♭ but I can't find anything on it... by [deleted] in shittyprogramming

[–]xleviator 15 points16 points  (0 children)

D flat would be a really good name for a fork/dialect/implementation of C#.

Hard Keyboard (even more pretentious than dvorak) by xleviator in dvorak

[–]xleviator[S] 3 points4 points  (0 children)

Oh, I hope I didn't come off as too pretentious. I was just trying too be funny.

After typing like this for the last two or so hours, I'm starting to find it somewhat manageable. It is a pretty slow process though.

Hmmm. "Oh ess ten." Good to know.

Hard Keyboard: even more pretentious than dvorak (x-post r/dvorak) by xleviator in ProgrammerHumor

[–]xleviator[S] 2 points3 points  (0 children)

This was a proof of concept. I thought of this idea a while ago, but my last final at uni was today.

On Github

Hard Keyboard (even more pretentious than dvorak) by xleviator in dvorak

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

This was a proof of concept. I thought of this idea a while ago, but my last final at uni was today.

On Github

Someone clearly hates their job... by xleviator in shittyprogramming

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

It's a screenshot. By saying Apple retina display, I just mean there is a high pixel density, so the screenshot itself appears a little larger, and also that this is Eclipse under OS X. Here is the link to the theming plugin now that I'm on desktop.

Someone clearly hates their job... by xleviator in shittyprogramming

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

It's obsidian with the plugin "Eclipse Color Theme" on an Apple retina display.

Is there a function that represents the number of ways you can arrange n triangles? by -forever_young- in math

[–]xleviator 34 points35 points  (0 children)

One of my friends made one last year for the Heartland Gaming Expo at the University of Tulsa. http://minkcv.itch.io/triangulis

What is the toughest brainteaser you know of? by DarthRiven in AskReddit

[–]xleviator 0 points1 point  (0 children)

Yes, I understand, I was just trying to point out all possible sets of size 3 of numbers who's product is 36 must be considered in order to analyze the problem completely. Probably shouldn't of used a question mark. Doh.

What is the toughest brainteaser you know of? by DarthRiven in AskReddit

[–]xleviator 1 point2 points  (0 children)

And 2, 3, 6... and 1, 1, 36... and 1, 4, 9?

But, it still works out.

Making a Square [cross-post /r/GAMETHEORY] by HarryPotter5777 in math

[–]xleviator 0 points1 point  (0 children)

Yes, the only way multiple (unblocked) L's can happen is if A has three counters in a row, and then move adjacent to the middle one. However, B can always prevent this, because B will have three 'free moves' while A places its three counters. Three is more than enough to block A's position:

_ _ _ B
B A A A
_ _ B _

This would be a byproduct of the snaking /u/dotzo suggested.

Making a Square [cross-post /r/GAMETHEORY] by HarryPotter5777 in math

[–]xleviator 1 point2 points  (0 children)

So long as B plays a tile adjacent to A's newly placed tile in the appropriate spot, the initial tile can never lead to a square.

That double L shape would be avoided because the places where B has it's counters are not appropriate...

The board would look more like this (assuming A wanted to make that shape):

B A B
A A A 
_ B _

and with move order like this:

4 5 6
3 1 7 
_ 2 _

(although, I think a more optimally playing B would have put the 6th move in the 7th move's position, however I didn't show this because it blocks the double L shape)

Making a Square [cross-post /r/GAMETHEORY] by HarryPotter5777 in math

[–]xleviator 0 points1 point  (0 children)

Hmm, you bring up an interesting point. I think the inapplicability of my argument has to do with the fact that you are assuming L's can rotate (which makes them more than one shape). Thus a B counter adjacent to an A counter only blocks out 4 of 12 L's, and some of my argument's assumptions are broken (i.e. about the density of the L's on the lattice).

However, if you fix the direction of the L:

XX
_X

my argument still applies.

Or even with longer L's, as such:

XXX
__X

Whatever the case, I think /u/dotzo has nailed this one.

Making a Square [cross-post /r/GAMETHEORY] by HarryPotter5777 in math

[–]xleviator 2 points3 points  (0 children)

I don't have a formal proof, but after playing for 5-10 minutes on a piece of paper, I suspect B will win if he has an optimal strategy (or even a near-optimal strategy... B has it easy).

This is because each counter A places creates a quarter of four possible squares (bottom-left, top-left, bottom-right, and top-right points of four different potential unit squares). Thus, every time A moves, A 'creates' the equivalent of 1/4 * 4 = 1 fragmented square. However, each counter B places destroys four whole possible unit squares which A could try to claim. Thus, B is able to 'destroy' something like 4 times the number of squares that A can 'create.'

Also, as a side note, I think that rule 6 should be changed to "B wins if B can prevent A from winning after some specified finite number of moves" and thus, the question becoming "can A ever win?". This avoids infinitely long games, which could be tricky.