maxProfit :: [Int] -> Int
maxProfit (p:ps) = fst . foldl go (0, p) $ ps
where
go :: (Int, Int) -> Int -> (Int, Int)
go (profit, minPrice) price = ( max profit (price-minPrice)
, min minPrice price)
vs
class Solution {
public:
int maxProfit(vector<int>& prices) {
auto [profit, price] = std::accumulate(
prices.begin()+1, prices.end(),
std::make_pair(0, prices[0]),
[](std::pair<int, int> acc, int price) {
return std::make_pair(
std::max(acc.first, price-acc.second),
std::min(acc.second, price)
);
}
);
return profit;
}
};CPP is an absolute nightmare
Haskell has so so so good type-system and even crazy AI can write a project in a seconds 👻
Origin: Garbage collection was invented by American computer scientist John McCarthy around 1959.
Language: It was specifically designed for the Lisp programming language to automate the management of memory for its characteristic list-based data structures.
Functional programming languages are GOAT I think
https://intellij-support.jetbrains.com/hc/en-us/community/posts/35329154803346-Goland-UI-on-MacOS
😒😒😒
😒😒😒
IDEs Support (IntelliJ Platform) | JetBrains
Goland UI on MacOS
When app is open long enough, on macOS this is happening. After restart all works again.Build #GO-261.22158.291, built on March 26, 2026Runtime version: 25.0.2+10-b329.72 aarch64 (JCEF 137.0.17-26...
https://github.com/abdivasiyev/telegram-teams-server
Telegram to Microsoft Teams bridge
vibe coded by expensive tokens
Telegram to Microsoft Teams bridge
vibe coded by expensive tokens
GitHub
GitHub - abdivasiyev/telegram-teams-server: A bridge to forward telegram messages into Microsoft Teams private channel via webhook
A bridge to forward telegram messages into Microsoft Teams private channel via webhook - abdivasiyev/telegram-teams-server
😁1
λ
Photo
Early years of my career, I was interested in writing articles, doing streams. But now everyone will use LLM instead of searching and learning something. LLM is developing reduced attention span among engineers as like TikTok, Instagram does. Hope everything should be ok🫠
And I do not have any ideas what about to write
And I do not have any ideas what about to write
Using primitive types is shooting yourself in the foot. One missing check and you will loose your all logic🤧🤧🤧
Even with Haskell or Rust's strong type system, you will end up with dynamic language (JS or PHP) like result.
So, parse, do not validate guys
Even with Haskell or Rust's strong type system, you will end up with dynamic language (JS or PHP) like result.
So, parse, do not validate guys