Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Opinion Haver
Apr 9, 2007

gucci void main posted:

i wanna use something that ain't ruby cause it's all i'm using at work but i really don't know what. at least a couple of the experienced people i work with are all haskell/"monads monads" and i really don't know poo poo about monads other than i think i remember reading that people overcomplicate the gently caress out of them. also no one actually uses it for anything meaningful so i'm still thinking scala instead but idk.

monads are incredibly oversold as a thing about haskell imo. people will tell you 'read these 3 tutorials and you will Get Monads' but the only way to really understand them is to write a lot of haskell and over time you'll just go 'oh'

Adbot
ADBOT LOVES YOU

more like dICK
Feb 15, 2010

This is inevitable.

gucci void main posted:

i wanna use something that ain't ruby cause it's all i'm using at work but i really don't know what. at least a couple of the experienced people i work with are all haskell/"monads monads" and i really don't know poo poo about monads other than i think i remember reading that people overcomplicate the gently caress out of them. also no one actually uses it for anything meaningful so i'm still thinking scala instead but idk.

learn something that doesn't look like algol and doesn't run on the jvm or clr. make something that doesn't spit out html

Shaggar
Apr 26, 2006

gucci void main posted:

i wanna use something that ain't ruby cause it's all i'm using at work but i really don't know what. at least a couple of the experienced people i work with are all haskell/"monads monads" and i really don't know poo poo about monads other than i think i remember reading that people overcomplicate the gently caress out of them. also no one actually uses it for anything meaningful so i'm still thinking scala instead but idk.


so what happens if they get a message they can't handle? can that happen?

use java or c#

Nomnom Cookie
Aug 30, 2009



type classes, higher-order functions, other haskell poo poo are :2bong: and worth learning. monad poo poo is w/e

like lisp, haskell is good to learn bc of the additional perspective on programming. then never use it for production code

Nomnom Cookie
Aug 30, 2009



Sang- posted:

what. is this the whole "actors only deal with messages they know how to handle" or what?

nah akka's message delivery is best effort only. it's an incredibly lazy copout from the Hard But Very Important issue of reliable messaging and more generally consensus. it wont show up when youre just learning akka cuz akka does guarantee intra-jvm delivery but as soon as you think about distributing work it becomes an issue because nodes fail all the loving time and akka does jack poo poo to help you detect failures let alone recover from them. why yes i'd like to write my own heartbeat code all over the loving place because you lazy assholes at typesafe punted on whether your messaging framework can actually deliver messages

im mad about distributed processing frameworks

MononcQc
May 29, 2007

What is an end-to-end principle?

Though heartbeats should be offered at the library or node/VM level.

tef
May 30, 2004

-> some l-system crap ->

MononcQc posted:

What is an end-to-end principle?

Though heartbeats should be offered at the library or node/VM level.

http://www.250bpm.com/blog:22 this was pretty interesting

Nomnom Cookie
Aug 30, 2009



poo poo like storm provides message timeouts and library classes that build functionality on top of timeouts. it's not full actor model so timeouts are super cheap to implement (a DAG of messages is equivalent to the roots for timeout tracking). you can build useful things using it on a cluster without tearing your hair out

akka pisses me the hell off because detecting and handling failures is something everyone needs to a greater or lesser extent. i mean if you literally dont care whether any message ever arrives then why are you sending them in the first place. therefore reliability belongs in the loving library with some thought put into it because that's what the library is for. any purportedly distributed library whose reliability guarantee is "you didn't want that message delievered anyway" is a worthless library. acking isnt that loving hard

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe

tef posted:

http://www.250bpm.com/blog:22 this was pretty interesting

You always find the coolest poo poo

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>
i started looking at erlang. pretty cool. im also going to wwdc hopefully

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Hard NOP Life posted:

You always find the coolest poo poo

tef
May 30, 2004

-> some l-system crap ->
ps i thought this was neat http://conferences.sigcomm.org/sigcomm/1997/papers/p062.pdf

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

hipster base64

FamDav
Mar 29, 2008

gucci void main posted:

i wanna use something that ain't ruby cause it's all i'm using at work but i really don't know what. at least a couple of the experienced people i work with are all haskell/"monads monads" and i really don't know poo poo about monads other than i think i remember reading that people overcomplicate the gently caress out of them. also no one actually uses it for anything meaningful so i'm still thinking scala instead but idk.

monads are nothing more than a wrapper around something, plus a way to put something in a wrapper, plus a way to take that thing out of a wrapper and plug it into a function that returns another thing in the same wrapper.

monads are a way of describing what should happen between lines of computation.

monads are like your mother except not as easy.

tef
May 30, 2004

-> some l-system crap ->

gucci void main posted:

i wanna use something that ain't ruby cause it's all i'm using at work but i really don't know what. at least a couple of the experienced people i work with are all haskell/"monads monads" and i really don't know poo poo about monads other than i think i remember reading that people overcomplicate the gently caress out of them. also no one actually uses it for anything meaningful so i'm still thinking scala instead but idk.

it sounds like you have a bunch of people at work you can ask about haskell, and you want to use something that isn't ruby. pick up a haskell book like bonus' or real world haskell and play around with the exercises and ask people at work some questions when you get stuck.

FamDav
Mar 29, 2008
if were actually indulging him with real world advice then i would also suggest asking simple questions like "how do i memoize a function?" or "how do i traverse a data structure like a binary tree?" because they will often lead to interesting/illuminating answers in haskell as compared to ruby.

Nomnom Cookie
Aug 30, 2009



monads are interesting but knowing anything about them is only really useful in haskell. regular FP stuff is a lot more valuable and you might as well learn it from haskell bc #haskell on freenode has like a jillion people to answer dumb newbie questions

tef
May 30, 2004

-> some l-system crap ->

FamDav posted:

monads are nothing more than a wrapper around something, plus a way to put something in a wrapper, plus a way to take that thing out of a wrapper and plug it into a function that returns another thing in the same wrapper.

monads are a way of describing what should happen between lines of computation.

monads are like your mother except not as easy.

personally i found arrows easier to understand than monads. :3:

for me anyway, the big deal is that monads (and others) give programmers the power to compose programs from functions, but allowing for custom flow control and/or evaluation order, in a type safe and hygienic manner, thanks to lazy evaluation. they're akin in power to some lisp macros, but safer to combine.

they do this by smuggling information in the types and building functions to compose these new data types, letting you define your own building blocks for programs, and letting you plug pure functions in. there is a formal definition, but sometimes people use monads as a byword for program construction in this manner.

in a language like haskell, monads let you simulate strict evaluation atop lazy, and they are one of the more popular techniques for managing side effects and state within a pure language.

meanwhile, without first class functions, purity, or lazy evaluation, monads aren't so useful. to quote someone "Instead, we model time and state directly with time and state" :3: when transposed to OO, monads end up looking like a overblown version of method chaining.

MononcQc
May 29, 2007

tef posted:

http://www.250bpm.com/blog:22 this was pretty interesting
Interesting read. I'm a bit intrigued by the guy seemingly thinking that you can distinguish failure from very high latency (due to full buffer or whatever) when in practice, it's often impossible to say what's the problem.

I've had issues where the symptoms are the same as congestion or a dead endpoint on the other end, except the problem was a bug in the local machine's TCP stack somehow getting in a bad state and never sending anything out -- TCP as a protocol gives you a confirmation that data was sent successfully the moment the packet makes it to the send buffer, but you don't get to know it never got received until you get an app-level confirmation, because TCP is not allowed to consider a connection broken until it receives a packet with the reset flag (RST). See http://blog.gerhards.net/2008/05/why-you-cant-build-reliable-tcp.html

Heartbeats over TCP are nice because they're some control message that lets you know, at a higher-level than the TCP stack, when things start to fail or be too slow. They're the neutral message that goes app-to-app to make sure that everything is fine outside of the 'lower' level stuff.

I'm figuring SCTP is providing some solutions to that stuff -- I'm one of these people who didn't know about it very well -- but if it doesn't, then you might still need to stick checks on top of it.

Then you gotta prepare for not being able to figure out if something failed or timed out and you need idempotence. http://queue.acm.org/detail.cfm?id=2187821 is an interesting link on why you want it everywhere you can.

MononcQc fucked around with this message at 12:30 on Apr 25, 2013

MononcQc
May 29, 2007

vapid cutlery posted:

i started looking at erlang. pretty cool.

:getin:

JewKiller 3000
Nov 28, 2006

by Lowtax

tef posted:

in a language like haskell, monads let you simulate strict evaluation atop lazy, and they are one of the more popular techniques for managing side effects and state within a pure language.

this is why haskell programmers love monads so much. strict evaluation is typically what you want

double sulk
Jul 2, 2010

tef posted:

it sounds like you have a bunch of people at work you can ask about haskell, and you want to use something that isn't ruby. pick up a haskell book like bonus' or real world haskell and play around with the exercises and ask people at work some questions when you get stuck.

at least two, although both are not immediately available at the moment.

i only futzed around so much with erlang and really only used it for some euler poo poo. it'd be nice if haskell had more industry use than "just because" though

Nomnom Cookie posted:

monads are interesting but knowing anything about them is only really useful in haskell. regular FP stuff is a lot more valuable and you might as well learn it from haskell bc #haskell on freenode has like a jillion people to answer dumb newbie questions

most of the basic fp poo poo doesn't bug me too much i think and i'd rather learn more about concurrency and the like

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

tef posted:

personally i found arrows easier to understand than monads. :3:

for me anyway, the big deal is that monads (and others) give programmers the power to compose programs from functions, but allowing for custom flow control and/or evaluation order, in a type safe and hygienic manner, thanks to lazy evaluation. they're akin in power to some lisp macros, but safer to combine.

they do this by smuggling information in the types and building functions to compose these new data types, letting you define your own building blocks for programs, and letting you plug pure functions in. there is a formal definition, but sometimes people use monads as a byword for program construction in this manner.

in a language like haskell, monads let you simulate strict evaluation atop lazy, and they are one of the more popular techniques for managing side effects and state within a pure language.

meanwhile, without first class functions, purity, or lazy evaluation, monads aren't so useful. to quote someone "Instead, we model time and state directly with time and state" :3: when transposed to OO, monads end up looking like a overblown version of method chaining.

wait what. monads are literally a design pattern. i think it's only IO and ST that use the bind to implement some sort of ordering but the list monad(plus,zip) is useful even outside of that to model nondeterminism. Also list comprehensions can be generalized to monad comprehension (you need a monadplus instance to allow guards)

they have nothing to do with lazyness and the seq primitive is what allows you to actually enforce strictness in haskell (and in fact some of the monad laws break in the presence of seq)

it just turns out that a lot of the common design patterns in a lazy,pure functional language end up being monads (Maybe, State (and ST), Reader, Writer, List are the big ones) and you can then build up complex ones using monad transformers. ST allows for mutable memory and uses the type system to prevent STrefs from leaking out and IO is basically ST with a "RealWorld" type parameter in GHC but obviously handled differently

monads are a design pattern with a lovely name and you've probably used one unknowingly via list comprehensions or LINQ

The "monoids in the category of endofunctors" is a terse way of describing exactly what they do: they're functors (so they support fmap:: a->b->f a->f b) and the monoidal operation of a monad is join :: m (m a) -> m a by collapsing the two levels of m into one. for sequencing (>>=) = fmap . join ends up being more useful but the list monad can be understood both ways (And the maybe monad is basically the list monad with up to a one element list)


Sulk go to http://learnyouahaskell.com/ and start fiddling around, it has the best tutorial on monads (monoids then functors then monads) that lets u see why they're useful

category theory is cool and it's a source of inspiration for patterns

double sulk
Jul 2, 2010

gently caress anyone at my job that thinks symbol: value is better than :symbol => value

gently caress you matz for adding it to ruby

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
i've given up on any hope of learning what category theory is about because everyone who's been successful at learning seems to have learned topology first and who gives a poo poo

double sulk
Jul 2, 2010

also I'm never getting this loving pull merged because every line needs some bullshit rspec syntactic sugar according to people looking at it, if it ain't broke merge it and modify the poo poo later, poo poo needs to just get done

gently caress rspec, im mad and need to lift to get out my rage

Stringent
Dec 22, 2004


image text goes here

gucci void main posted:

also I'm never getting this loving pull merged because every line needs some bullshit rspec syntactic sugar according to people looking at it, if it ain't broke merge it and modify the poo poo later, poo poo needs to just get done

gently caress rspec, im mad and need to lift to get out my rage

git pull --rebase ?

Opinion Haver
Apr 9, 2007

tef posted:

meanwhile, without first class functions, purity, or lazy evaluation, monads aren't so useful. to quote someone "Instead, we model time and state directly with time and state" :3: when transposed to OO, monads end up looking like a overblown version of method chaining.

jquery is a monad!!!

PleasingFungus
Oct 10, 2012
idiot asshole bitch who should fuck off

Stringent posted:

git pull --rebase ?

the problem isn't git, the problem is the pull request review

<3 git

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>
im gonna read through all of learn you some erlang probably

CamH
Apr 11, 2008

yospos i have to learn to do oophp this weekend

CamH
Apr 11, 2008

it looks dumb + gay

Catalyst-proof
May 11, 2011

better waste some time with you

CamH posted:

yospos i have to learn to do oophp this weekend

Owned

skeevy achievements
Feb 25, 2008

by merry exmarx

Gazpacho posted:

i've given up on any hope of learning what category theory is about because everyone who's been successful at learning seems to have learned topology first and who gives a poo poo

topology is fun, easy, and useful in physics

there's 3 reasons to learn it, grab munkres and get to work

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip




sw8 sig

compuserved
Mar 20, 2006

Nap Ghost

Internaut! posted:

topology is fun, easy, and useful in physics

there's 3 reasons to learn it, grab munkres and get to work

this book owns and has my favorite introduction to the axiom of choice

double sulk
Jul 2, 2010

tef
May 30, 2004

-> some l-system crap ->
fizzbuzz

in rust http://composition.al/blog/2013/03/02/fizzbuzz-revisited/

in haskell http://dave.fayr.am/posts/2012-10-4-finding-fizzbuzz.html

or a cheap excuse to shill some language features


meanwhile, java

http://forrst.com/posts/Why_Cant_Programmers_Design_Software-gOg

Shaggar
Apr 26, 2006
yeah he did a more real world example which isn't possible in the other 2 cause they've never been used in the real world.

Adbot
ADBOT LOVES YOU

Shaggar
Apr 26, 2006
altho tbh using the enum doesn't allow you to extend beyond the 3 fizz buzz combinations so its probably not the right choice. i would use a class w/ mod, exclamation, and the same applies method. then its a simple matter of altering the list to add/remove/change order of the evaluated fizzbuzzes.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply