I don't know why engineers do not use types as many as even if it is possible. A compiler provides strong type guarantee, but they will use just a string, an int or a bool for anything. One day this will chop our legs and they will start complaining about code.
I want that every engineer write code following by this guide: https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-validate/
fyi: these are just random thoughts
I want that every engineer write code following by this guide: https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-validate/
fyi: these are just random thoughts
👍2
type classes are the best abstraction I've ever seen. Every line of code you write can be compatible with Haskell's compiler and works like a built-in into compiler. As an example Functor, Applicative, Foldable, ... very common type classes and when you implement them for your types, they will work smoothly like a built-in types. Just amazing. I can not leave this world🙈
👍2
While AI hype is growing and much more data is processing through DCs, demand to new types of chips are increasing also. For example: light based chips, quantum chips or ternary chips. All of them was created many years ago and now they are being re-reviewed again. A war between engineers and big-tech companies goes so crazy😁
Personally I interested in light based chips because they are more real to mass produce
Personally I interested in light based chips because they are more real to mass produce
if you have enough subscribers in your public channel and even you will say any bullshit, the audience will laugh, idk why. I saw so many times this kind of posts🙈
😁2
A few days ago, my colleague said a pattern "Single flight". It is a concurrency pattern and controls parallel requests to get same response with single execution. Nice pattern
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