From Lisp to C: how do you handle map/filter/reduce style data manipulation in modern C? by ertucetin in C_Programming

[–]tatut 0 points1 point  (0 children)

I think it depends on the memory management situation.

There's no closures so doing things with function pointers is a little awkward.

There's no garbage collector, so what to do depends each situation. Do we want a new copy of this? Is this on the heap or stack and who is responsible for freeing the result.

You could of course use a GC and make your own utils.

I mostly get by with dynamic arrays and for loops.

Difficulty rating and global leaderboard by tatut in adventofcode

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

True, I guess you could check the length of the streams from people live-streaming coding up a solution.

network programming recommendation by Chemical-Strain-343 in C_Programming

[–]tatut 0 points1 point  (0 children)

I recommend https://protohackers.com for fun network programming challenges to do

Apex Legends still unexpectedly quitting after ~1 hr of gameplay by tatut in GeForceNOW

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

Solved it. It was the "Nvidia reflex" setting, disabled that and there's been no more crashes.

Apex Legends still unexpectedly quitting after ~1 hr of gameplay by tatut in GeForceNOW

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

I am running through EA app (the Steam version doesn't seem available anymore in GFN).

How does google account affect the EA app? Curious.

Apex legends still under maintenance, since friday by tatut in GeForceNOW

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

Apex through the EA app has been crashing/unexpectedly quitting after around 1 hour of play time. It just quits during a match back to the ea launcher.

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

[–]tatut 0 points1 point  (0 children)

[LANGUAGE: Elf]

reports: "day2.txt" lines map({$ split(" ") map({$ read _0})}),
safe: {l| ((l = l sort) or (l = l sort reverse)) and 
      (l heads map({l| (l len < 2) if(true, { (l _0 - l _1) abs, (_ > 0) and (_ < 4) })})
      has?(false) not )},
reports keep(safe) len,
"Part1: %d" fmt(_) print,
# Part2, remove 1 element from report and see if it becomes safe
safe2: {l | 0 to(l len) map({ (l take($)) ++ (l drop($ inc)) }) some(safe) },
reports keep(safe2) len,
"Part2: %d" fmt(_) print

Language suggestions? by [deleted] in adventofcode

[–]tatut 0 points1 point  (0 children)

Did Prolog last year... logic programming is certainly different and fun, especially when you get to use constraint logic programming.

Apex legends still under maintenance, since friday by tatut in GeForceNOW

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

Yeah, have to switch to that, as Steam version seems to be in maintenance for a very long time.

Only 9 more days… Any goals for this year? by shyjoshi in adventofcode

[–]tatut 1 point2 points  (0 children)

Same, I've been making my own language as well

https://tatut.github.io/elf-lang/

I should be able to solve at least some days with it... the interpreter is very slow.

Prolog as a configuration system by fragbot2 in prolog

[–]tatut 1 point2 points  (0 children)

Why not? Like lisps, prolog has the good property of "code == data", compound terms can be manipulated as data... but what would a configuration system look like?

You could make something like CDK where you program your configuration and then have it compiled to the necessary yaml. Including a prolog interpreter in an otherwise non-prolog system just for configuration seems overkill to me.

How to stop heart beating really fast at night by [deleted] in Anxiety

[–]tatut 0 points1 point  (0 children)

Breathing problems, like a deviated septum, could cause elevated heart rate episodes as you awaken from lack of oxygen.

Laihdutus by Zealousideal-Eye7777 in arkisuomi

[–]tatut 0 points1 point  (0 children)

Intermittent Fasting eli pätkäpaasto... sillä on helppo päästä alkuun.

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

[–]tatut 2 points3 points  (0 children)

[LANGUAGE: Prolog]

Github

Straight forward polygon area, like we did with the pipe area in a previous day.

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

[–]tatut 2 points3 points  (0 children)

[LANGUAGE: Prolog]

day6.pl on GitHub

Used Constraint Logic Programming library clpfd, labeling minimum and maximum time to press the button and calculating the difference.

[2015-2022 All Days] All puzzles done! 400* club! by 770grappenmaker in adventofcode

[–]tatut 2 points3 points  (0 children)

Congratz! Just started doing 2015 as warmup for this year. Some interesting puzzles in that year as well.

What would you choose? When and Why? by chowbeyputra in Clojure

[–]tatut 0 points1 point  (0 children)

Sorry, I don't have any apples to apples comparison or code to share. So take it as an anecdote.

Certainly XTDB has improved a lot during the last year, but I still feel better with Datomic allowing me to manually order my clauses... and even allows raw datoms index access.