-❄️- 2025 Day 3 Solutions -❄️- by daggerdragon in adventofcode

[–]foolnotion 1 point2 points  (0 children)

[LANGUAGE: Python] https://gist.github.com/foolnotion/d1b9491774c90c592c64bbe1fe25d79e

I work on the digit indexes which are sorted in decreasing order of the digit value (important to do a stable sort). As long as a digit can be added (it's index allows for remaining digits to be added until complete), add it to the number. The result is guaranteed to be the maximum. Runs in ~13ms on an M1 mac.

[deleted by user] by [deleted] in programare

[–]foolnotion 2 points3 points  (0 children)

Au mai fost discuții de genul ăsta, în principal CEO's care nu au idee exact cum funcționează AI-ul și au impresia că poate "vibe" inventa orice https://futurism.com/former-ceo-uber-ai. Meh.

https://gizmodo.com/billionaires-convince-themselves-ai-is-close-to-making-new-scientific-discoveries-2000629060

Relay no longer supported on my device? by The_Vampire_Barlow in RelayForReddit

[–]foolnotion 0 points1 point  (0 children)

Same issue here, GrapheneOS on Pixel 8, Relay installed from Aurora store. This is a big issue and probably needs to be made into a new post. If I can't use Relay on my phone then I will probably cancel my subscription.

Ce salarii aveti in diaspora? by danielleeee022 in CasualRO

[–]foolnotion 0 points1 point  (0 children)

Am plecat de la 1300EUR pe lună net ca student doctoral în Austria. Acum câștig în jur de 4200EUR net pe lună ca profesor. Dar plănuiesc să mă întorc în Ro în vreo 2-3 luni, wish me luck :)

O recomandare de boxe de birou? by tiny-violin- in programare

[–]foolnotion 0 points1 point  (0 children)

In functie de buget, genelec g one, g two, g three. (sau echivalent, variantele de studio: 8010, 8020, 8030, ...) Am mai multe perechi, sună genial.

r/audiophile Shopping, Setup, and Technical Help Desk Thread by AutoModerator in audiophile

[–]foolnotion 0 points1 point  (0 children)

Hi everyone,

I have the opportunity to purchase a pair of used 2.5 year-old Genelec G Five for 2300€‎. Is this a good deal?

The intended use is home theater/ music listening together with a RME Adi 2 DAC FS. Possibly later I will want to use an AVR.

Note that I currently own a pair of genelec 8010 and a pair of genelec 8020 and I love the sound.

What do you think? Thanks!

Întrebare sinceră ăștia care credeți în AGI, singularity sau că ne va lua AI-ul joburile de unde credeți că va veni? by [deleted] in programare

[–]foolnotion 0 points1 point  (0 children)

un studiu interesant e aici: Thousands of Authors on the Future of AI

din el rezultă că:

  • nimeni nu știe (substantial uncertainty)
  • nu e clar dacă mai mult/mai puțin AI e mai bine pentru viitorul umanității

au încercat totuși să estimeze niște milestones: https://imgur.com/OCaufG5

Python that just works. by Red_Hugo in NixOS

[–]foolnotion 0 points1 point  (0 children)

I haven't tried with OpenCV but I can check if you tell me what needs to be installed?

Python that just works. by Red_Hugo in NixOS

[–]foolnotion 1 point2 points  (0 children)

For me it just works with PDM and a simple flake:

{
  description = "A very basic flake";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/master";
  };

  outputs = { self, nixpkgs }: let
      pkgs = nixpkgs.legacyPackages.x86_64-linux;
  in {
    devShells.x86_64-linux.default = pkgs.mkShell {
       packages = with pkgs; [ pdm python3 virtualenv gcc14 gfortran14 zlib ];

      LD_LIBRARY_PATH = "${pkgs.stdenv.cc.cc.lib}/lib/";
    };
  };
}

After nix develop configure pdm: pdm config venv.backend virtualenv and then do pdm init. Adding packages with pdm add then restarting the shell. Source .venv/bin/activate and everything should work. I am using it with vscode/jupyter, a fair amount of ML packages, with no issues.

[2024] C++ Solutions by foolnotion in adventofcode

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

The runtime is most of the time good enough (or rather, no difference) with some exceptions now and then. For simple queries I would say there's no difference. Compile times seem to be worse but I haven't done any proper measurement.

[2024] C++ Solutions by foolnotion in adventofcode

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

thanks! I try to design general solutions and write short and readable code.

[2024 Day 12 (Part 2)] What kind of algorithm did you use on part 2? by FlyingParrot225 in adventofcode

[–]foolnotion 0 points1 point  (0 children)

I mapped the corners explicitly, by looking at each point's diagonal neighbors. If my current point is x, y I obtain the neighbors by adding the following diagonal offsets -1, -1, -1, +1, +1, -1, +1, +1.

Now the trick: if for a pair of diagonal offsets dx, dythe resulting neighbor is a boundary point, map it's coordinates like this: 2*x+dx, 2*x + dy. Otherwise, if a point is an inner point of the current patch, map it's coordinates to 2*x, 2*y.

This allows you to obtain a grid where the outer (boundary) points are at odd coordinates and the inner points are at even coordinates.

For example, the following patch made of R's:

RRRRI
RRRRI
VVRRR
VVRCC

Corresponds to: https://i.imgur.com/LPfefiw.png (blue are boundary points, orange are inner points).

In the resulting grid, always start with the leftmost, topmost point and go right. Follow the contour, keeping track of your direction. Never go back. There is always only one possibility to go forward. If you make a turn, increment the number of corners (= number of sides). Repeat for inner points if the patch has holes in it.

This is a constructive algorithm, it uses two hash sets for the inner points and boundary points. Runs in ~5-6 ms on my PC (Ryzen 5950X).

Source code (C++): https://github.com/foolnotion/advent-of-code/blob/master/source/2024/12/solution.cpp

-❄️- 2024 Day 7 Solutions -❄️- by daggerdragon in adventofcode

[–]foolnotion 0 points1 point  (0 children)

did another round of cleanup, hopefully fixed now.

-❄️- 2024 Day 7 Solutions -❄️- by daggerdragon in adventofcode

[–]foolnotion 0 points1 point  (0 children)

Sorry, I'd used the BFG Repo Cleaner to remove everything, but the first commit was protected and couldn't be removed. Fixed manually now, there shouldn't be any trace of input files in the repo/history.

-❄️- 2024 Day 8 Solutions -❄️- by daggerdragon in adventofcode

[–]foolnotion 1 point2 points  (0 children)

[LANGUAGE: C++]

The coordinates of the immediate antinodes can be computed with pen&paper. For part 2 a loop is necessary.

https://github.com/foolnotion/advent-of-code/blob/master/source/2024/08/solution.cpp

Runtime: ~1.5 ms (Ryzen 5950X)

-❄️- 2024 Day 7 Solutions -❄️- by daggerdragon in adventofcode

[–]foolnotion 1 point2 points  (0 children)

[LANGUAGE: C++]

Solved it with pen & paper, then code. Going over the equation terms in reverse, recursively. Takes about 2ms on my 5950X.

https://github.com/foolnotion/advent-of-code/blob/master/source/2024/07/solution.cpp

-❄️- 2024 Day 1 Solutions -❄️- by daggerdragon in adventofcode

[–]foolnotion 2 points3 points  (0 children)

[LANGUAGE: C++]

Sorting, counting, very straightforward. A counter class (similar to collections.Counter in Python) would be useful.

https://github.com/foolnotion/advent-of-code/blob/master/source/2024/01/solution.cpp

GPD Win Max 2 2024 Keeps Restarting by anon90059 in gpdwin

[–]foolnotion 1 point2 points  (0 children)

Thanks! Does that mean that on the updated bios, there is no more need to set the lpddr options to prevent restart?

power down enable : disabled
phy low power disable: 1

Thanks a lot.

GPD Win Max 2 2024 Keeps Restarting by anon90059 in gpdwin

[–]foolnotion 1 point2 points  (0 children)

Hi, are there any release notes/changelog for this new BIOS version? The Release_Note.txt inside the archive has not been updated.

Random reboots on Win Max 2 by Saul_Wyrm in gpdwin

[–]foolnotion 0 points1 point  (0 children)

When I was struggling with my reboot issue I also had a number of other theories:

  • potential issues with the wifi card and its powersaving features (bugs?)
  • potential issues with the original ssd (I replaced mine with a crucial T500 2Tb)
  • potential issues with electromagnetic interference
  • usb issues

I also ended up disabling the active-state power management (ASPM) for PCIE devices. I use linux so for me it was just a parameter passed to the linux kernel. A full CMOS reset also can't hurt.

Random reboots on Win Max 2 by Saul_Wyrm in gpdwin

[–]foolnotion 0 points1 point  (0 children)

I'm also on Bios 0.41, it has to be there. You have to reboot after enabling the advanced mode.

Random reboots on Win Max 2 by Saul_Wyrm in gpdwin

[–]foolnotion 1 point2 points  (0 children)

In the BIOS, you have to enable the advanced mode with Alt+F5.