[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

>using a non-functional langauge for your concurrent program

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 26
Thread images: 2

File: parallelconcurrenthaskell.jpg (795KB, 2100x2756px) Image search: [Google]
parallelconcurrenthaskell.jpg
795KB, 2100x2756px
>using a non-functional langauge for your concurrent program
enjoy race conditions faggot
>>
>>55257704
>what is Monad.Lock
>>
>>55257704
Just use rust, it literally prevents race conditions straight via the typesystem, no need to restrict yourself into a paradigm that outright forbids mutations.
>>
>>55259874
Not him but depending on performance requirements of what you are doing its possible to not even need mutations
>>
>>55260907
Rather than "needing" mutation, it's about the convenience of being able to use mutation. Some problems are inherently easier to express in that context. Just like trying to program functionally in a language that doesn't inherently support it creates a mess, so does trying to implement solutions to problems that naturally lend themselves to a sequential solution using mutation.
>>
>>55259874
The problem is that Rust's approach limits throughput. This approach works fine for device drivers and the like, but is unsuitable for high-level applications.

The best approach is Clojure's in-memory implementation of MVCC. While high contention circumstances will lead to some wasted work, studying results from database theory informs us that this drawback isn't as exaggerated as you'd imagine, and STM usually out-performs traditional lock-based or type-based solutions.
>>
>>55261699
There's nothing preventing the use of STM in rust. In fact, there are already two STM libraries for rust: stm and stim.
>>
>>55261793
Yes, but it's provided via a library and thus will never integrate into the core language like Clojure, and the benefits of STM are lost in the granularity if you permit mutable data structures.
>>
Semaphores
>>
What's the best language for distributed systems?
>>
Erlanggggg
>>
I just need some of the stuff to run asynchronously. C# is perfect for that.
>>
>>55257704
>what is mutex
>>
>>55265279
>what is deadlock
>>
>Rust
>The new meme in town, after Go, after Node.JS
>Chinese people are already coding Rust libs on github
>>
>>55265279
A workaround for shitty languages
>>
>>55265159
Java has Hadoop
>>
File: haskell.png (12KB, 225x321px) Image search: [Google]
haskell.png
12KB, 225x321px
daily reminder
>>
>>55262987
>Semaphores
>reliable
choose one
>>
>>55266710
It's something Haskell does for you....mutex is cheaper and therefore more cost effective
>>
>>55267218
kek
>>
>>55267269
>mutex is cheaper and more cost effective
This actually isn't true. There's literature out there that suggests that STM techniques out-perform lock-based concurrency.

http://dl.acm.org/citation.cfm?id=1189288
>>
>muh CSR

Some problems are parallel in nature, some are concurrent. Even C has APIs to do CSR properly.

You don't avoid concurrency just because you're using Haskell.
>>
>>55269298
>You don't avoid concurrency just because you're using Haskell
I'm not sure what you mean by this?
>>
>>55269298
You inherently avoid concurrency issues because your code is side-effect free and therefore ALWAYS safe to parallelize outside the explicit dependency graph laid out by the very AST itself, since there is no other dependencies at any time.
>>
>>55269284
Pajeets btfo
Thread posts: 26
Thread images: 2


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.