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.
 
  • Locked thread
gonadic io
Feb 16, 2011

>>=
i learned java and haskell at the same time.

going through loops and classes and objects one one hand, vs seeing this
code:
 quicksort [] = []
 quicksort (x:xs) = quicksort small ++ [x] ++ quicksort large)
   where small = [y | y <- xs, y <= x]
         large = [y | y <- xs, y > x]

Adbot
ADBOT LOVES YOU

gonadic io
Feb 16, 2011

>>=
ive formally verified that my program is a piece of poo poo

gonadic io
Feb 16, 2011

>>=
i wrote a map and a fold function in c using void function pointers. it seemed to work.

gonadic io
Feb 16, 2011

>>=

Cocoa Crispies posted:

step 1 to functional php is using the "render mathy" tool `rm` on all your php files

It certainly does eliminate the side effects of the code

gonadic io
Feb 16, 2011

>>=

ultravoices posted:

computerphile just posted their what is a monad video, which was somewhat helpful, but stay for the end for the presenter making bitchy spergy functional programmer comment about why they are called monads and not something more understandable for mere computer programmers.

unless the comment "it's stupid and historical and literally everybody wishes they were called something else but it's too late now" he's wrong.

i mean you can also talk about why it was named that originally i.e. sperg about endofunctors and natural transformations between categories of functors but that 1) doesn't mean it is a good name and 2) gently caress youuuu they're not even the same i actually covered monads in my maths theory masters and i didn't recognise haskell's monads in it at all. at best they're kind of similar.

gonadic io
Feb 16, 2011

>>=

fart simpson posted:

monads fewer problems

tempting, but my current username still isn't getting old for me. i'll consider this next time i change it

gonadic io
Feb 16, 2011

>>=

ultravoices posted:

dinkering with old computer is cool or hearing from ancients about the origins of things is neat

the guy who parrots lesswrong fears about AI is not so neat

fun fact: he goes around campus on his electric skateboard instead of walking and iirc wears fingerless gloves

i haven't actually seen him since vaping became a thing but i'm pretty sure he would

gonadic io
Feb 16, 2011

>>=

MALE SHOEGAZE posted:

i'm going to learn F# i think. does it still require that you declare your functions before using them within the same lexical scope? or was it something weird about file names? i cant remember.


rude!!

F# is only similar to scala in intent, they're extremely different languages.
If you take haskell, strip out any language features developed in the last 20 years and make the syntax slightly worse (ie no where, only let-in clauses) then you have F#. Honestly if it weren't for the dotnet interop nobody would ever use it even a little.

That said, it's better than c#. http://www.trelford.com/blog/post/LighterCSharp.aspx

Adbot
ADBOT LOVES YOU

gonadic io
Feb 16, 2011

>>=

MALE SHOEGAZE posted:

bleh, that's disappointing.

Computational expressions are cool though, f#'s only novel feature as far as I know. They effectively do the same thing as haskell's monads, but can replace the semantics of let, while, andThen etc in the same way that haskell's do notation does. The neat thing is that they can be generated from specification files at compile time, so you can do all sorts of system interop poo poo with them.

And OCaml with better libraries (but a less mature compiler) is still a better language than scala...

Janestreet have optimised the poo poo of ocamls compiler infrastructure

gonadic io fucked around with this message at 11:20 on Dec 14, 2017

  • Locked thread