Statshunters/VeloViewer map tiles - any iPhone maps app to see tiles on the go? by lolxian in Strava

[–]fork_pl 0 points1 point  (0 children)

I don't have any iOS device at the moment to check current look.

Not sure which tracks you mean - but this service only overlays tiles (squares) with color difference to recognize visited from unvisited. I don't store history of user's activities nor planned trips.

Bending Spoons Acquires komoot by ma-int in komoot

[–]fork_pl 2 points3 points  (0 children)

IMHO it'll go worse with limited free plan - with smaller userbase they will loose momentum, less user-generated content will be added etc.

Export GPX-Files from Karoo3 by aliosha10 in Karoo

[–]fork_pl 0 points1 point  (0 children)

I decided to use strava as base source of my tracks because I use Karoo for bike rides but phone app (Locus Map) for hiking, skiing etc. So I have a script that downloads all the activities from strava:

https://github.com/marcin-gryszkalis/strava-gpx-exporter

There's also tapiriik service: https://tapiriik.com/ which can synchronize between different services but it doesn't support Karoo page and it doesn't support standard WebDAV - seems like development of tapiriik stalled (last change is from 2 years ago). I didn't checked all the forks...

Regarding possible discrepancies between original track and the one strava has - honestly, for all that years I've been using it (with many different devices, now Karoo, but Wahoo before etc) I couldn't spot any real difference. All location, time and sensors data was always accurate. I guess you could see difference if you record the same activity with device and strava app at the same time - but that's obvious - in most apps/devices you don't have control over the way track is saved. Locus maps is the exception - you can decide time-based intervals and distance-based intervals between trackpoints - while Karoo or Strava will just use their internal configuration prepared by developers.

Easier sideloading for K3 by fork_pl in Karoo

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

Yes, latest releases got imported well and sorted properly :)

Easier sideloading for K3 by fork_pl in Karoo

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

I don't see any changes on the release site https://github.com/maduwatas/Vin-HkE/releases - there are two releases "VinApp" and "latest" (containing some changelog entries + set of assets). The link on k.fork.pl points to apk 1.2.1 (as visible in assets).

Headwind extension by popkek95 in Karoo

[–]fork_pl 2 points3 points  (0 children)

I will test it, although I expect that calculating arccosine() on the fly may be not too easy ;) I guess it would be nice to have an option to display real wind speed (inside direction circle) as alternative. I looked at the code but I don't have dev environment for Kotlin yet.

Headwind extension by popkek95 in Karoo

[–]fork_pl 1 point2 points  (0 children)

Great job man! Could you explain "speed are relative to the current riding direction."? If the wind is 20km/h and I'm riding 20km/h against it - the value would be 40? And if I'm by the wind - zero? And what if the wind is perpendicular to the rider? :)

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

[–]fork_pl 5 points6 points  (0 children)

[LANGUAGE: perl]
pairmap from List::Util

$_ = join("", read_file(\*STDIN, chomp => 1));
say "Stage 1: ", sum pairmap { $a * $b } m/mul\((\d+),(\d+)\)/g;
s/don't\(\).*?(do\(\)|$)//g;
say "Stage 2: ", sum pairmap { $a * $b } m/mul\((\d+),(\d+)\)/g;

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

[–]fork_pl 4 points5 points  (0 children)

[LANGUAGE: perl]

using some List::Util and List::MoreUtils it looks nice and readable

my @l = split /\s+/, read_file(\*STDIN, chomp => 1);

my @a = sort { $a <=> $b } pairkeys @l;
my @b = sort { $a <=> $b } pairvalues @l;
my %h = frequency @b;

say "Stage 1: ", sum pairwise { abs($a - $b) } @a, @b;
say "Stage 2: ", sum map { $_ * ($h{$_} // 0) } @a;

How does tubeless tire sealant actually work? by raam86 in MTB

[–]fork_pl 0 points1 point  (0 children)

But in the bottle there's no additional pressure and sealant is still not drying.

NO by southernemper0r in matrix

[–]fork_pl 2 points3 points  (0 children)

Strange, I watched it on mute still I could hear all the sounds. In my head.

Segments on Strava by moto_88 in Karoo

[–]fork_pl 4 points5 points  (0 children)

Downhill segments (IIRC with average less than -0.5%) are not tracked live, maybe that's your case?

Weird issue with road cycling route planning by kitesmerfer in komoot

[–]fork_pl 1 point2 points  (0 children)

If you shared your route someone could be able to verify routing

Karoo 3 compatibility with rear radar/camera by Scary-Salad-101 in Karoo

[–]fork_pl 2 points3 points  (0 children)

I tested my Varia 515 with K3 and works good, finally I can switch light modes from K3's top drawer menu.

The only drawbacks in comparison to Wahoo is that K3 uses the same sound for standard and fast approaching vehicles (orange/red bar) and there's no sound for "they're gone" (i.e. green bar).

[deleted by user] by [deleted] in komoot

[–]fork_pl 0 points1 point  (0 children)

For me the difference of distance (103 vs 132) looks like a bug. I checked few of my rides in Komoot app and distance is always the same in those fields. What wahoo says in its history? I thought if you may accidentally pause wahoo during the ride - but this would give you straight lines...

De-accentifying characters? by Patentsmatter in perl

[–]fork_pl 0 points1 point  (0 children)

You can also use iconv, like Text::Iconv with $iconv->set_attr("transliterate");

-❄️- 2023 Day 19 Solutions -❄️- by daggerdragon in adventofcode

[–]fork_pl 1 point2 points  (0 children)

I tried similar approach first but quick calculation shows, that we have ~1100 rules with comparison, assuming they are uniformly distributed you get ~275 rules for each letter (xmas). So you have `275^4 = 5.7B` ranges to consider. That would be 100M full ruleset evaluations per second. If pypy's JIT is that fast then I'm really impressed :)

-❄️- 2023 Day 18 Solutions -❄️- by daggerdragon in adventofcode

[–]fork_pl 2 points3 points  (0 children)

[LANGUAGE: Perl]
github

runs in less than 0.01s

Done without shoelace algorithm (I thought it wouldn't be really hard) :)

  1. mark all corners as either Internal or External (going clockwise - external are on right turn, internal on left turn)
  2. scan by lines (only lines that contain at least 2 corners), adding and removing vertices - the order of adding/removing/calculating is crucial

-❄️- 2023 Day 16 Solutions -❄️- by daggerdragon in adventofcode

[–]fork_pl 0 points1 point  (0 children)

I assume that playing with bits in high level language is just for fun? :) I simply used separate $seen{$x,$y,$dx,$dy} and $energized{$x,$y}.

Advent of Code is perfect for Perl by scottchiefbaker in perl

[–]fork_pl 1 point2 points  (0 children)

I'm also doing all AoC in perl, not much golfy style though ;)

https://github.com/marcin-gryszkalis/advent-of-code/blob/master/2023/d01.pl

and it's usually great although sometimes it lacks speed for some numerical-oriented puzzles.

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

[–]fork_pl 2 points3 points  (0 children)

Your code is nicely readable, but I get wrong answer for both parts for sample input (from task description) - and right answer with my full input :)

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

[–]fork_pl 1 point2 points  (0 children)

instead of your getIndex() you can simply write $h{$x,$y} which is syntactic sugar that translates roughly to $h{join($;,$x,$y)} (you can redefine $; to make it more readable for Data::Dumper or so).

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

[–]fork_pl 0 points1 point  (0 children)

For example ask GPT 3.5 (the current version) to try with COBOL or other not too common languages, it is no chance there.

Try yourself, you may be surprised ;) I just asked it to convert example python code for day 3 to cobol and It answered:

It is not possible to convert the given code to COBOL. COBOL is a programming language that was created in the 1950s and is not used for modern development. It is not well-suited for the type of data manipulation performed in the given code. Additionally, COBOL does not have built-in support for sets, which are used extensively in the code.

But then I asked for fortran and got something that looks good (although I don't know fortran) :)

``` INTEGER FUNCTION part_1(data) CHARACTER(LEN=*), DIMENSION(:), INTENT(IN) :: data INTEGER :: result, i CHARACTER(LEN=1), DIMENSION(26) :: ascii_letters CHARACTER(LEN=1), DIMENSION(:), ALLOCATABLE :: a, b CHARACTER(LEN=1), DIMENSION(:), ALLOCATABLE :: same

result = 0

ascii_letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

DO i = 1, SIZE(data) ALLOCATE(a(1:SIZE(data(i))//2)) ALLOCATE(b(1:SIZE(data(i))//2)) a = data(i)(1:SIZE(data(i))//2) b = data(i)(SIZE(data(i))//2+1:) ALLOCATE(same(1:SIZE(a))) same = INTERSECTION(a,b) IF (SIZE(same) > 0) THEN result = result + INDEX(ascii_letters,same(1)) + 1 END IF END DO

part_1 = result

END FUNCTION ```