Forwarded from Денис
считаю необходимым заметить, что вот прям совсем прямолинейный синхронный многопоточный сервер (но без тредпула) пишется на чистом расте очень просто и быстро))
TcpListener::bind(&addr).unwrap().incoming().try_for_each(|socket| {
let socket = socket?;
thread::spawn(|| handle(socket));
Ok(())
});Forwarded from Jack
язык не определяется наличием фич, он определяется толстотой по Тьюрингу
Forwarded from red75prime
mem::size_of_val(a_ref) - размер типа, на который a_ref ссылается, то есть размер i32. mem::size_of_val(&a_ref) - размер самой ссылки a_ref, то есть размер типа &i32Forwarded from Αλεχ Zhukovsky
YouTube
Fun(c) 2018.7: John De Goes - FP to the Max
What happens when you take a procedural program riddled with partial functions and effects, and incrementally refactor it to a purely functional program—and then dial it up to eleven? In this live coding session, John hopes you'll be amused and a maybe little…
Forwarded from ∇∀Σ∫λ∫Ψ
Всяко лучше TS, правда, гораздо менее практично (в плане тулинга и готовых решений). Но можно какие-то части писать на пурсе, а какие-то на чём-то другом, типа TS... Пост Фила https://medium.com/fuzzy-sharp/purescript-and-haskell-at-lumi-7e8e2b16fb13 про то, как он тащит пурсу в lumi (там, правда, ничего особенно интересного не написано, кроме того, что они постепенно заменяют компоненты на пурсовые).
Forwarded from A V
Потому что проёб случился из-за того что сначала стабилизировали футуры, а потом начали шлифовать async/await и получили "ой".
https://t.iss.one/rust_async/10460
Тем временем, центрил считает, что немного обосрались с сигнатурой self в футурах. Пользователи уже бьют челом за изменение std::future::Future. Поставить лайк / комментарий можно здесь:
https://github.com/rust-lang/rust/pull/63209#issuecomment-523398537
Тем временем, центрил считает, что немного обосрались с сигнатурой self в футурах. Пользователи уже бьют челом за изменение std::future::Future. Поставить лайк / комментарий можно здесь:
https://github.com/rust-lang/rust/pull/63209#issuecomment-523398537
Telegram
A V in Rust Async
Тем временем, центрил считает, что немного обосрались с сигнатурой self в футурах. Пользователи уже бьют челом за изменение std::future::Future. Поставить лайк / комментарий можно здесь:
https://github.com/rust-lang/rust/pull/63209#issuecomment-523398537
https://github.com/rust-lang/rust/pull/63209#issuecomment-523398537
Forwarded from Anton Rich
https://youtu.be/qNtgvE8enpA?t=401
at 6:41 Scala brought functional programming into the world. Who here likes Haskell? Nobody.
at 6:41 Scala brought functional programming into the world. Who here likes Haskell? Nobody.
YouTube
Writing Redis Modules In Rust
Gavrie Philipson at Redis Day Tel Aviv 2019
Forwarded from Sailor Moon
вот бы монады так кто нибудь обьяснил, что сразу все понятно, но видимо хаскеллисты до компутера дальше чем физики https://youtu.be/F_Riqjdh2oM
YouTube
Quantum Computing for Computer Scientists
This talk discards hand-wavy pop-science metaphors and answers a simple question: from a computer science perspective, how can a quantum computer outperform a classical computer? Attendees will learn the following:
- Representing computation with basic…
- Representing computation with basic…
Forwarded from Aliester Crowley
Stroustrup: Actually, I was thinking about those days, just before you arrived. Do you remember? Everyone was writing 'C' and, the trouble was, they were pretty damn good at it. Universities got pretty good at teaching it, too. They were turning out competent - I stress the word 'competent' - graduates at a phenomenal rate. That's what caused the problem.
Interviewer: Problem?
Stroustrup: Yes, problem. Remember when everyone wrote COBOL?
Interviewer: Of course. I did, too.
Stroustrup: Well, in the beginning, these guys were like demi-gods. Their salaries were high, and they were treated like royalty.
Interviewer: Those were the days, eh?
Stroustrup: Right. So what happened? IBM got sick of it, and invested millions in training programmers, till they were a dime a dozen.
Interviewer: That's why I got out. Salaries dropped within a year, to the point where being a journalist actually paid better.
Stroustrup: Exactly. Well, the same happened with 'C' programmers.
Interviewer: I see, but what's the point?
Stroustrup: Well, one day, when I was sitting in my office, I thought of this little scheme, which would redress the balance a little. I thought 'I wonder what would happen, if there were a language so complicated, so difficult to learn, that nobody would ever be able to swamp the market with programmers? ...'
Interviewer: You're kidding?
Stroustrup: Not a bit of it.
Interviewer: Problem?
Stroustrup: Yes, problem. Remember when everyone wrote COBOL?
Interviewer: Of course. I did, too.
Stroustrup: Well, in the beginning, these guys were like demi-gods. Their salaries were high, and they were treated like royalty.
Interviewer: Those were the days, eh?
Stroustrup: Right. So what happened? IBM got sick of it, and invested millions in training programmers, till they were a dime a dozen.
Interviewer: That's why I got out. Salaries dropped within a year, to the point where being a journalist actually paid better.
Stroustrup: Exactly. Well, the same happened with 'C' programmers.
Interviewer: I see, but what's the point?
Stroustrup: Well, one day, when I was sitting in my office, I thought of this little scheme, which would redress the balance a little. I thought 'I wonder what would happen, if there were a language so complicated, so difficult to learn, that nobody would ever be able to swamp the market with programmers? ...'
Interviewer: You're kidding?
Stroustrup: Not a bit of it.
Understanding Futures in Rust
https://www.viget.com/articles/understanding-futures-is-rust-part-2/?amp=true
https://www.viget.com/articles/understanding-futures-is-rust-part-2/?amp=true
https://www.viget.com
Understanding Futures in Rust -- Part 2 | Viget
Futures make async programming in Rust easy and readable. Learn how to use futures by building them from scratch. Part 2 focuses on combinators.
Forwarded from Awesome Rust
Common data structures and algorithms in Rust
https://github.com/EbTech/rust-algorithms
https://github.com/EbTech/rust-algorithms
GitHub
GitHub - EbTech/rust-algorithms: Common data structures and algorithms in Rust
Common data structures and algorithms in Rust. Contribute to EbTech/rust-algorithms development by creating an account on GitHub.