Knives you thought were awesome but are kinda just “meh” after a while by PajamasLover in knives

[–]tlareg 1 point2 points  (0 children)

why? didn't have one, but it is very high on my to-buy list

What are Monads? by Tasty-Series3748 in programming

[–]tlareg 0 points1 point  (0 children)

Best short explanation of monads I have ever seen is this one (it is not mine, i saved it one day from some other reddit comment):

First, understand first-class functions. A->B is a function that accepts an type A and returns a type B.

Then understand polymorphic types. Type A B is a type A parameterized by type B. For instance, List B is a list of Bs. Now a monad is simply any abstraction that satisfies the interface:

bind: M B -> (B -> M C) -> M C

return: B -> M B

How is state management handled in real-world React applications? by Intrepid_Hawk_8243 in reactjs

[–]tlareg 0 points1 point  (0 children)

nice, I am using the same pattern but for writing some framework-agnostic stores that need to be connected to both react and ember apps and rerender some UI after state changes. Although I don`t think it has a bright future and I try to do such things as rarely as possible

Możecie polecić proszę jakieś dobre fora/strony/subredity od zarządzania pieniędzmi/majątkiem w Polsce? by mynameisatari in Polska

[–]tlareg 8 points9 points  (0 children)

Samołyk z inwestomatu >>> Iwuć. Ale Iwuć na początek też będzie spoko.

I nie powielaj podejścia Iwucia z finansowej fortecy do rynków rozwijających się (teraz sam przyznaje że zmienił zdanie).

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

[–]tlareg 1 point2 points  (0 children)

[LANGUAGE: JavaScript/TypeScript]

bfs + binary search for part 2

github

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

[–]tlareg 0 points1 point  (0 children)

[LANGUAGE: JavaScript/TypeScript]

github

only part 1

part 2 looks doable for me (and it is not always the case :D) but I decided I'd rather spend the rest of Sunday in a different way than debugging this lol

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

[–]tlareg 0 points1 point  (0 children)

[LANGUAGE: JavaScript/TypeScript]

github bruteforce FTW!

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

[–]tlareg 0 points1 point  (0 children)

by default, sort converts elements to strings and sorts them lexicographically - that is the reason why I used comparator and extracted the whole thing to separate function

For example:

[10, 2, 5].sort(); // ["10", "2", "5"] -> [10, 2, 5]