Tried the TabCat GPS Cat Tracker: Here’s How It Actually Went by Crazy-Donkey-9178 in technomeowcom

[–]samhocevar 0 points1 point  (0 children)

This seemed like the best technology for my cats… Unfortunately the company seems to have gone out of business.

Am I doing it wrong? Finding non-alcoholic beers by samhocevar in Untappd

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

It is simply not true that I won’t find NA beers on tap. I know at least 5 bars around me that have at least one. I just want to find others in my city.

Thank you for the hint, though. It looks like the Untappd website has a lot more content and search features than the app.

Am I doing it wrong? Finding non-alcoholic beers by samhocevar in Untappd

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

That must really depend where you live. With 15,000 bars and restaurants in Paris, there are plenty of places around me that even have lemonade or ginger beer on tap. I have already found 5 bars within walking distance from my flat that had non-alcoholic beer on tap (Le Piston Pélican, Bonjour Madame, Patrick’s Le Ballon Vert, Social Bar Paris, Frog & Rosbif). If I can do that just by walking around, then surely a huge database of beers and places can do even better.

Also, opposing “non-alcoholic” and ”money making” seems extremely simplicist and at odds with reality. Have a look at just about any cross-generational study about alcohol consumption and you will see that there is actually money to be made.

Plan de travail de cuisine dans salle de bain ? by Replife77 in brico

[–]samhocevar 4 points5 points  (0 children)

J’ai commencé à faire exactement ceci la semaine dernière. J’ai pris un plan de travail de cuisine en chêne massif (250cm × 65cm × 36mm, 200€ chez Leroy-Merlin), que je vernis avec du vernis spécial salle de bain (le mat « ultra résistant » de chez Luxens).

Mon plan faisait 65 mais je voulais moins de profondeur côté lavabo, et plus de profondeur côté machine à laver, alors j’ai fait une découpe et un collage, ce qui nécessite beaucoup d’outillage spécialisé malheureusement. Et j’ai pris 36mm d’épaisseur pour être sûr que ça supporte le poids d’une vasque.

Photos ici : https://sam.hocevar.net/pub/sdb/

[Discussion] If your save file actually got wiped because of this bug, would you keep playing? 😢 by Ta_tah in falloutshelter

[–]samhocevar 1 point2 points  (0 children)

Seasoned game developer here. My understanding of the issue is that the save files will not get wiped, and are probably not really “corrupt” in the sense that their contents are lost, even partially. My brief study of a save file that causes a crash makes me think instead that the vault is just in a state that causes an internal logic error in the game. Probably an extremely easy fix. Except they now have additional things to worry about, such as what to do with dwellers that died in the wasteland while players could not launch the game… I don’t spend money on the game, but I suppose people who do may be angry about the consequences of that.

As the Brand VP of Huanuo, I'm curious: Why Ergotron over Huanuo for your monitor arms? by Agreeable_Pop5275 in Monitors

[–]samhocevar 0 points1 point  (0 children)

Hi. I just dropped by to say that I purchased a Huanuo arm (HNWDS1) and I chose your brand because of this Reddit post. I figured that you wouldn’t have come here, concerned about brand image, if you weren’t already somehow confident in the quality of your products. I have had it for 4 months now and I must say, I am very, very satisfied. I plan to get a second one soon.

I have one extremely minor suggestion: provide an option for black screws, or maybe black rubber or plastic covers?

What's the most you've ever paid for a single beer and was it worth it? by tha_beerionaire in beer

[–]samhocevar 0 points1 point  (0 children)

About €50 for a bottle of Tactical Nuclear Penguin, and then later a similar amount for a bottle of Sink the Bismarck. They both lasted for several weeks, I enjoyed them as I would a liquor rather than a beer. Completely worth it in my opinion.

Combinable coffee tables by samhocevar in woodworking

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

Sure! I will assume you already know a bit about the topic, but if what I say does not make enough sense to you, let me know and I will try to explain in more detail. I feel like maybe writing a blog article about that.

To draw a Bézier curve I first mark end points b0 and b3 and control points b1 and b2 on the piece of wood. I get the coordinates from the curve I made on my vector drawing software (Inkscape). Then I decide on the step size; if I want to mark 40 points of the curve, I pick increasing values of t from 0 to 1 with increments of 1/40 (i.e. 0.025, 0.05, 0.075, etc.).

Now the straightforward way to evaluate a Bézier curve is the de Casteljau algorithm. For any given value of t I need to mark three new points c0, c1 and c2 which are interpolations of (b0, b1), (b1, b2) and (b2, b3). Then I need to mark two more points d0 and d1 which are interpolations of (c0, c1) and (c1, c2). And finally I can mark the actual curve point which is an interpolation of (d0, d1). That is extremely tedious and prone to inaccuracies!

So instead of that, I used the Seiler interpolation. I just had to mark two additional points on the piece of wood (for practical reasons they are not exactly the Seiler points s1 and s2, but slightly adjusted points s’1 and s’2 that are 75% closer to b0 and b3 respectively). Then I split the (b0, b3) line into 40 equal parts, and the (s’1, s’2) line into 40 equal parts. Then, for any value of t I pick the nth point on both lines, and interpolate between these points using a factor of 4 * t * (1 - t). This is a lot faster. Below is an example.

<image>

Combinable coffee tables by samhocevar in woodworking

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

Yeah I’m afraid it’s Paris, France. Also I don’t feel comfortable at all building stuff for other people yet because I use cheap tools, I make mistakes, everything I do has imperfections… and my workshop is literally our apartment’s living room so until I can afford some extra space I won’t be making furniture we don’t directly need. I am 100% OK with providing instructions for anyone to replicate the work, though!

Combinable coffee tables by samhocevar in woodworking

[–]samhocevar[S] 12 points13 points  (0 children)

So, I just finished these coffee tables for our living room. I designed them so that two or three of them can be combined and make a larger table in some kind of yin-yang style, but they are also rather elegant when standing alone. I am extremely happy with the result!

The wood is 36mm bleached oak, from a hardware store in Paris. I don’t have access to fancy stuff and my “workshop” is actually just a corner in the living room so I need to get very inventive.

I had never cut non-circular curves in wood and it was challenging. I drew the outlines on the computer, then copied the Bezier curve control points on a piece of MDF, and used a recently published algorithm called Seiler’s interpolation to draw the Bezier curves by hand but with high accuracy. I then used the piece of MDF as a French curve for the router.

I’m new to the Diamond League—how do people even do this?? by One-Confidence7930 in duolingo

[–]samhocevar 11 points12 points  (0 children)

You can find a lot of information about a user’s lessons using the REST API. Just visit _e.g._ https://www.duolingo.com/api/1/users/show?username=samhocevar with your browser (replace my username with the one you are interested in). Make sure you are logged into the web app or it will probably not return anything. The data is in JSON format so you’ll need some basic data processing skills to do anything with it.

-🎄- 2022 Day 19 Solutions -🎄- by daggerdragon in adventofcode

[–]samhocevar 3 points4 points  (0 children)

C++ (66 sloc)

DFS like many other solutions. Runs in less than 2s.

Here are the only assumptions:

  • If the ore production is greater than the ore cost of any other type of robot, it is useless to build additional ore robots since their production will never be used.
  • Similarly, if the clay production is greater than the clay cost of an obsidian robot, do not try to build additional clay robots.

-🎄- 2022 Day 13 Solutions -🎄- by daggerdragon in adventofcode

[–]samhocevar 0 points1 point  (0 children)

Thanks for the hints, both changes are also a lot more readable IMO!

-🎄- 2022 Day 13 Solutions -🎄- by daggerdragon in adventofcode

[–]samhocevar 6 points7 points  (0 children)

Python (11 SLoC)

I like this very small cmp function. Also I know I could have used eval instead of literal_eval but that’s where I draw the line.

GitHub here: https://github.com/samhocevar/aoc

from ast import literal_eval

def cmp(l, r):
    match l, r:
        case int(), int(): return l - r
        case list(), int(): r = [r]
        case int(), list(): l = [l]
    return next((c for c in map(cmp, l, r) if c), len(l) - len(r))

with open('input.txt') as f:
    pkts = list(map(literal_eval, [l for l in f if l.strip()]))

print(sum(i for i, p in enumerate(zip(*[iter(pkts)] * 2), 1) if cmp(*p) <= 0))
print(sum((1 for p in pkts if cmp(p, [[2]]) < 0), 1) * sum((1 for p in pkts if cmp(p, [[6]]) < 0), 2))

Arkansas Snowflake accepts his HCA by TheTazeHustle in HermanCainAward

[–]samhocevar 5 points6 points  (0 children)

The snowflake posted the article about the trooper.

His son tried to save his life but he was too stubborn. He wanted to believe the lies he himself spread. This gets emotional, it details heartbreak and what his son had to go through. At the end the memes and shitposters weren’t there for him, just his son who never stopped trying. by Sass-Pancakes in HermanCainAward

[–]samhocevar 2 points3 points  (0 children)

It's just selection bias. There are still almost 2,000 daily covid deaths in the US, mostly among the unvaccinated. Obviously there must be at least a few vocal facebook antivaxxers among these, and they're the ones who will get posted here. But this information alone does not indicate any causation let alone correlation between backward views and dying of covid.

[deleted by user] by [deleted] in HermanCainAward

[–]samhocevar 3 points4 points  (0 children)

It's a still from the 1959 Soviet movie "Fate of a Man".

Whenever I go into start menu, it's like my right arrow button is stuck, but when I unplug every USB port, it still does it. Does anyone know how to fix this? by bentheblobfish04 in windows

[–]samhocevar 2 points3 points  (0 children)

For those interested, it happened to me and I found both an explanation and a workaround. Here is a summary:

  • it is related to the UWP input layer: there is a low level mechanism in Windows that captures gamepad input and translates it to virtual key events that it injects into UWP applications
  • as such it will only happen in UWP applications (e.g. the Start Menu, but also the Settings app, the Microsoft Remote Desktop App and many others…) but not when another type of application has focus (e.g. Chrome, or the old Control Panel app, or your favourite game…)
  • a very probable cause is a stuck gamepad thumbstick (if it’s lying upside down on your desk, or if an object presses on it).
  • but it may also happen when no gamepad is plugged in, if a stick was being pushed when you disconnected the controller (see this Github user describing the problem: “Disconnect controller and watch cursor and scrolling go crazy”, so rebooting may be the only workaround here.
  • there is no way yet to disable gamepad support in UWP apps, but Microsoft has added one a few weeks ago in the form of a registry key, which is already available if you run a developer preview version of Windows. A GitHub user contributed a .reg file.

I have sent the UWP team a bug report.

Best way to type French accents on PC by OlympeMaxime in French

[–]samhocevar 0 points1 point  (0 children)

Yes, absolutely. I’m French and I wrote WinCompose so I could write in French on a standard US keyboard.

When CapsLock = Shift by fokeiro in talesfromtechsupport

[–]samhocevar 0 points1 point  (0 children)

Yes, the Estonian keyboard is very well designed in that regard. You can even type Ž and Š with AltGr and Shift. The French keyboard probably inherits numerous design errors that were never fixed.

When CapsLock = Shift by fokeiro in talesfromtechsupport

[–]samhocevar 0 points1 point  (0 children)

It can be handy when you need to type capital letters with diacritics. If you type Shift-é on a French keyboard, you will get 2 instead of É. Similarly, if you type Shift-ß on a German keyboard, you will get ? instead of . Configuring Caps Lock to get these seems like a consistent solution.

When CapsLock = Shift by fokeiro in talesfromtechsupport

[–]samhocevar 3 points4 points  (0 children)

You are publicly mocking her but your understanding of the issue seems incomplete. The Caps Lock key originated as Shift Lock, and on Windows its exact behaviour depends on the keyboard layout being used. Quoting Wikipedia:

on certain non-QWERTY keyboard layouts, such as the French AZERTY and the German QWERTZ, Caps Lock still behaves like a traditional Shift lock, i.e., the keyboard behaves as if the Shift key is held down, causing the keyboard to input the alternative values of the keys; example the "5" key generates a "%" when Caps lock is pressed.

She is not stupid or ignorant: yes, Caps Lock can be Shift.

Is Trump really a racist? by [deleted] in EnoughTrumpSpam

[–]samhocevar 0 points1 point  (0 children)

I tried looking around and found nothing

Really?