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
DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
rust looks tempting.

Adbot
ADBOT LOVES YOU

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
i want to get in early with some language so i can write a really lovely library that is bad but everyone has to use it because it doesnt exist yet and then i can just say "i wrote x" for the rest of myl ife to get jobs

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

USSMICHELLEBACHMAN posted:

i want to get in early with some language so i can write a really lovely library that is bad but everyone has to use it because it doesnt exist yet and then i can just say "i wrote x" for the rest of myl ife to get jobs

me too and i've tried, but the problem is whatever new language you write that library for probably won't take off

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
that's why i'm biding my time. i'm gonna pick something like, i dunno, an html templating language, something that cant even be used because no one is making web servers or whatever.

Stringent
Dec 22, 2004


image text goes here

USSMICHELLEBACHMAN posted:

rust looks tempting.

if only so you can pick it up and then put it down so when people ask you later you can be like, "yeah my rust is a bit rusty"

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Stringent posted:

if only so you can pick it up and then put it down so when people ask you later you can be like, "yeah my rust is a bit rusty"

wish your posting was rusty

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
from a "learning functional programming" point of view I'd recommend ml over haskell just so you wouldn't get distracted with haskell's peculiarities like lazy evaluation


I'm biased because I like ml better to be honest

tef
May 30, 2004

-> some l-system crap ->
if you're on the .net platform, tbh f# would make a pleasing introduction

tef
May 30, 2004

-> some l-system crap ->
when i grow up i want to be erik meijer

https://www.youtube.com/watch?v=sTSQlYX5DU0

Dicky B
Mar 23, 2004

nimrod is good poo poo i like it more than rust

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

tef posted:

if you've already done ML or similar, you might not get that much from haskell. if you've only been doing OO languages, you will likely find it weird and hard, but you might pick up stuff along the way

ehh the relentless purity and laziness forces a different way of thinking

also laziness lets u replace macros as well in like 90% of the situations u wanna use them

gonadic io
Feb 16, 2011

>>=
neither f# or ml are pure though right? so you don't get an introduction to side effects or learn why mapM exists and is different from map, or consider IO actions as first class (which is something that bites c# programmers, see Erik Meijer's Curse Of The Excluded Middle talk)

gonadic io
Feb 16, 2011

>>=
tbh I think both the best and worst parts of laziness can be summed up in the function
code:
minimum (list) = head (sort (list))
or more idiomatically,
code:
minimum = head . sort
good sides: that function, depending on what sort you have, has O(n) runtime. laziness essentially gives you loop fusion for free well, for a much lower runtime cost than in a strict language anyway

bad sides: there's essentially no way of knowing that you need a particular variety of merge sort for this to work, the runtime is basically impossible to work out analytically and instead was tested extensively, and even after that it's still slower than handwriting your own loop

gonadic io fucked around with this message at 12:36 on Aug 1, 2014

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

AlsoD posted:

neither f# or ml are pure though right? so you don't get an introduction to side effects or learn why mapM exists and is different from map, or consider IO actions as first class (which is something that bites c# programmers, see Erik Meijer's Curse Of The Excluded Middle talk)

i think this is it in text form? http://queue.acm.org/detail.cfm?id=2611829

(a lot of it is going over my head, but i still enjoy trying to read these things :tipshat:)

tef
May 30, 2004

-> some l-system crap ->
btw this is the most yospos thing ever

https://www.youtube.com/watch?v=sTSQlYX5DU0&t=640s

10m 40s in

cowboy beepboop
Feb 24, 2001

Dicky B posted:

nimrod is good poo poo i like it more than rust

yeah nimrod looks good too

tef
May 30, 2004

-> some l-system crap ->

Malcolm XML posted:

ehh the relentless purity and laziness forces a different way of thinking

yeah, but in terms of the biggies of functional programming: adts + functional composition, it owns. i mean i am just recommending one microsoft language over another.

as for the relentless monads and currying, eh, i can live without them.

quote:

also laziness lets u replace macros as well in like 90% of the situations u wanna use them

yeah, this is the other big win for lazyness but weirdly enough i rarely want to use macros: they're really good for adding a huge barrier to maintenance and there is usually another way within the existing language semantics and flow control.

tef
May 30, 2004

-> some l-system crap ->

AlsoD posted:

neither f# or ml are pure though right? so you don't get an introduction to side effects or learn why mapM exists and is different from map, or consider IO actions as first class (which is something that bites c# programmers, see Erik Meijer's Curse Of The Excluded Middle talk)

meanwhile strict variants of haskell have map which handles monads + functions too

gonadic io
Feb 16, 2011

>>=

prefect posted:

i think this is it in text form? http://queue.acm.org/detail.cfm?id=2611829

(a lot of it is going over my head, but i still enjoy trying to read these things :tipshat:)

that's is yeah. basically the problem is that when you mix lazy evaluation and side effects, the effects happen in a hard to predict order. the same thing happens with haskell's map if you have hidden side effects.

this is why haskell makes side effects explicit and so you can't actually use map, you have to use mapM which ensures that the side effects happen sequentially. unfortunately this need for sequentiality means that you can't parallelise it necessarily (like you can with the side effect free map) and you can't really consume the output lazily since all the side effects need to happen before you get any output at all.

gonadic io
Feb 16, 2011

>>=

tef posted:

meanwhile strict variants of haskell have map which handles monads + functions too

sure. i'm not a huge fan of laziness (which is one of the reasons I was looking at Rust). none of the strict haskell dialects are out of the 'research prototype' stage though, unless by "variant" you mean 'other language' i.e. ml in which case i stand by what I said a few posts ago.

e: this is still from the perspective of learning a functional language to make your c# better, not for actually doing work in

gonadic io fucked around with this message at 13:02 on Aug 1, 2014

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

AlsoD posted:

that's is yeah. basically the problem is that when you mix lazy evaluation and side effects, the effects happen in a hard to predict order. the same thing happens with haskell's map if you have hidden side effects.

this is why haskell makes side effects explicit and so you can't actually use map, you have to use mapM which ensures that the side effects happen sequentially. unfortunately this need for sequentiality means that you can't parallelise it necessarily (like you can with the side effect free map) and you can't really consume the output lazily since all the side effects need to happen before you get any output at all.

yeah laziness and io do not mix at all.

th solution is an insane continuation passing style coroutine thing that has like 6 type paramemter (2 of which are useless wankery but still)

gonadic io
Feb 16, 2011

>>=
lol, pipes

basically people should just make their io strict and it's about as complicated as in any other language. if you really want lazy io then be prepared to have to learn a whole new complicated library with a bunch of custom operators.

Sapozhnik
Jan 2, 2005

Nap Ghost

USSMICHELLEBACHMAN posted:

i want to get in early with some language so i can write a really lovely library that is bad but everyone has to use it because it doesnt exist yet and then i can just say "i wrote x" for the rest of myl ife to get jobs

works for Keith Packard :v:

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

tef posted:

btw this is the most yospos thing ever

https://www.youtube.com/watch?v=sTSQlYX5DU0&t=640s

10m 40s in

he's talking about a getter than throws an exception if the value isn't there -- does that mean the program terminates in this case?

(apologies for what is probably a dumb question)

gonadic io
Feb 16, 2011

>>=

prefect posted:

he's talking about a getter than throws an exception if the value isn't there -- does that mean the program terminates in this case?

(apologies for what is probably a dumb question)

only if you don't handle that exception. his point is that if the type system doesn't mandate that you deal with the possible exception (like checked exceptions in java and option types in functional(ish) langs), it could cause a runtime crash which would cause the program to terminate.

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

AlsoD posted:

only if you don't handle that exception. his point is that if the type system doesn't mandate that you deal with the possible exception (like checked exceptions in java and option types in functional(ish) langs), it could cause a runtime crash which would cause the program to terminate.

so option types are a way to check exceptions without doing java's mandated checked exceptions? (he says that everybody hates checked exceptions)

gonadic io
Feb 16, 2011

>>=

prefect posted:

so option types are a way to check exceptions without doing java's mandated checked exceptions? (he says that everybody hates checked exceptions)

yeah, think of option types like possibly-null values except that you can't get access to the value without explicitly checking for null. this was, null-pointer exceptions simply can't happen.

this is alsowhy erik meijer says that he wishes null wasn't included in c# so that option types are the only way to get nullable references but it's too late now.

the slightly more advanced version is rather that just having one failure option, null, you might want 2 or 3 - one for a io error, one for an empty file or whatever.

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror
hey everyone for those of you that complain about PHP not having a specification like you actually want to read a huge pointless boring document of dry technical minutiae... have i got news for you

havelock
Jan 20, 2004

IGNORE ME
Soiled Meat

tef posted:

when i grow up i want to be erik meijer

https://www.youtube.com/watch?v=sTSQlYX5DU0

He's been doing the ienumerable / iobservable duality thing for years and it's still amusing to see. He also loves Visual Basic, which is certainly odd for a PL guy, but I understand why.

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror
visual basic for dos was awesome. it had a form drawer that made text based interfaces

Stringent
Dec 22, 2004


image text goes here

Tiny Bug Child posted:

hey everyone for those of you that complain about PHP not having a specification like you actually want to read a huge pointless boring document of dry technical minutiae... have i got news for you

coffeetable probably does, so :w00t:

Shaggar
Apr 26, 2006

tef posted:

btw this is the most yospos thing ever

https://www.youtube.com/watch?v=sTSQlYX5DU0&t=640s

10m 40s in

ugh. math-like programming and unchecked exceptions are the worst things

coffeetable
Feb 5, 2006

TELL ME AGAIN HOW GREAT BRITAIN WOULD BE IF IT WAS RULED BY THE MERCILESS JACKBOOT OF PRINCE CHARLES

YES I DO TALK TO PLANTS ACTUALLY

Stringent posted:

coffeetable probably does, so :w00t:
you could burn all the other textbooks and technical papers on earth and i still wouldn't read a php spec

Sapozhnik
Jan 2, 2005

Nap Ghost
PHP is proof that there is no god

it is proof that technical merit is completely and utterly irrelevant

and that all attempts to build a better world are futile, that the world will never be a good place, but rather it will forever be the worst place that people are still willing to tolerate.

(the same proof can be seen with more dramatic human cost in politics, ofc)

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

Shaggar posted:

ugh. math-like programming and unchecked exceptions are the worst things

when he said that everybody hates checked exceptions, i thought of you :)

Shaggar
Apr 26, 2006
math majors make the worst programmers so you can safely ignore them when they say checked exceptions are bad and math-like languages are good.

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

Shaggar posted:

math majors make the worst programmers so you can safely ignore them when they say checked exceptions are bad and math-like languages are good.

checked exceptions own

having the compiler bitch when you dont cleanup is great

also not need to use exceptions in 99.9% of cases is even better!

Shaggar
Apr 26, 2006
"Why the hell would anyone want to know about exceptions?? I will just deal with them at runtime" - math majors.

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

Shaggar posted:

"Why the hell would anyone want to know about exceptions?? I will just deal with them at runtime" - math majors.

lmao having the compiler be smart enough to remove all but a few async exceptions is p great


it will then complain at compile time if u forget to check for NPEs or the like (the cant even exist)))

Adbot
ADBOT LOVES YOU

Stringent
Dec 22, 2004


image text goes here

Malcolm XML posted:

lmao having the compiler be smart enough to remove all but a few async exceptions is p great


it will then complain at compile time if u forget to check for NPEs or the like (the cant even exist)))

async is planger bullshit and the user can just loving wait

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