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
Nomnom Cookie
Aug 30, 2009



Dessert Rose posted:

if c# didn't have first-class anonymous functions i'd probably hate its guts too

you could argue that neither of those things provides any immediate benefit but it sure did make my code cleaner when i was able to pass predicates around instead of doing some convoluted delegate garbage

and the time i ran into a wall because i wanted to specialize a generic type with another type that i'd only know at runtime, and had to write some ungodly reflection code to approximate what i was looking for, well, that sure did suck and made my code uglier

so basically it goes like this

1. learn haskell
2. wish you were programming haskell
3. do terrible things trying to make c# be haskell

this doesn't recommend haskell to me, someone who is trying to do the best job possible with the tools available to me

Adbot
ADBOT LOVES YOU

Notorious b.s.d.
Jan 25, 2003

by Reene

Internaut! posted:

no and no but you're on my list, tbh scala seems to be winning the war of hearts and minds and I can understand why but it's a shame nonetheless

clojure is riddled with the impracticality you just complained about in other languages. second rate java interop and little/no provisions for OO guaranteed clojure would be a non-starter outside niche use.

clojure was never really part of the battle for the hearts and minds in the commercial world. it was groovy vs scala all along. i think scala is winning




(does anyone actually prefer groovy to scala? i've never met a hardcore groovy user, just people who wanted to flirt with gradle)

Nomnom Cookie
Aug 30, 2009



groovy is for embedding afaict

scala is disappointing, it has lots of cool stuff and even more terrible stuff

Posting Principle
Dec 10, 2011

by Ralp
c++ is too big a language, and java is too slow. i know, i'll use scala

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

Internaut! posted:

my point about dollars was we're not some shoestring startup stuck using open sores, we typically buy the best poo poo because it's cheaper than evaluating alternatives (lol IBM $profit/head)

dudes who write those old i-langs you listed have no problem understanding python or java or whatever and math geek lambda calculus programming has been a thing since olden times, adding category theory to the learning curve isnt going to help make it more popular outside the tiny number of areas where it's always been used - if it ever gains popular acceptance it will be because it's been papered over with a J2EE stye abstraction that makes it palatable to human beings, and whatever that tech is it will likely come from someone like IBM

Im one of the guys pushing clojure wherever I can in our shop but lol @ using it for the 99% of our business which is traditional information processing


no and no but you're on my list, tbh scala seems to be winning the war of hearts and minds and I can understand why but it's a shame nonetheless



You need literally 0 category theory to become proficient in haskell. It's useful for design patterns and stuff, and anecdotally the people I know (not all mathematicians) who have 0 programming ability tend to love haskell's mathematical approach since it's very similar to how they've been taught to reason about things, rather than bowing to the tyranny of the machine.

For example,
code:
x = x +1 
is infamous for tripping up beginners since to them it's a clearly unsatisfiable equation (excluding poo poo like infinity,NaN, w/e) rather than "assignment"

It's telling that the total beginners who I've shown Haskell love it and the established programmers tend to have preconceptions that it's some super scary language with commutative diagrams coming out of its rear end at every turn. The plural of anecodote isn't data, but still.


Clojure owns, and macros own for tedious processing tasks. macropy is the greatest thing to happen to python in forever and should be included by default.

Opinion Haver
Apr 9, 2007

Internaut! posted:

I have no doubt an abstract, first principles, category-theoretic approach to software development has its advantages

I'm saying the effort:reward ratio is way off for the vast majority of programming needs, so I wouldn't sweat "not getting it"

I mean I work for a capital markets group that earned our bank ~$400m profits last year so we have money to spend and the will to spend it on systems and talent, we're rewritten and continue to rewrite our entire trading core in functional scala/clojure for maximum safety/reliability/performance, and I would say the code/docs are pretty readable to the average senior dev

we might have improved the system a percentage point or two by doing it the author's way but the disadvantages are that no one but math PhDs could write the code, no one but those same math PhDs could read or modify the code, and the number one issue that code written by math PhDs is almost always terrible

i think the point of articles like those isn't 'you as generic developer X should know about all these interesting isomorphisms'; like i said, the author of that article doesn't think writing code like that is a good idea outside of blog posts. the point is more 'hey we're using a language that has a really nice theoretical underpinning to it, let's take that and see where it gets us'. near the end the author points out that memoization falls out of the concept of a 'representable' functor; since Product Identity Identity, the functor that takes a to (a, a), can be represented by (Bool ->), you can use pairs to memoize functions from booleans to things. this specific example isn't terribly useful obviously but if you run with it you might be able to construct more interesting memoizers. for example, you can represent integers as positions in infinite binary trees by using their bit expansion to go left/right, and infinite binary trees form a representable functor, so you can use them to memoize functions from integers, which is neat.

of course you shouldn't be writing your own memoization code anyway, you should be using someone else's memoization library. but the author of that library might want to know this isomorphism so they can write better code with it.

Opinion Haver fucked around with this message at 15:26 on Oct 2, 2013

Notorious b.s.d.
Jan 25, 2003

by Reene

Nomnom Cookie posted:

groovy is for embedding afaict

scala is disappointing, it has lots of cool stuff and even more terrible stuff

groovy doesn't appear to have any special faculties for embedding, no more so than java itself. and its marketing literature describes it as a "language alternative" for the jvm

a few years ago it had "buzz," now it doesn't

Notorious b.s.d.
Jan 25, 2003

by Reene

Posting Principle posted:

c++ is too big a language, and java is too slow. i know, i'll use scala

it's true that scala is a big language. unlike C++, it's a big language designed by people who had done it before. their first attempt was so difficult to use they essentially abandoned it.

scala is the language built with lessons learned from "funnel" (the experimental thing) and work on java generics

tl;dr: scala is not as crazy as c++, even if it is quite large

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror

Malcolm XML posted:

For example,
code:
x = x +1 
is infamous for tripping up beginners since to them it's a clearly unsatisfiable equation (excluding poo poo like infinity,NaN, w/e) rather than "assignment"

so what? once you say "= means assignment and not comparison" a couple times anyone who's ever going to get it will get it

Malcolm XML posted:

It's telling that the total beginners who I've shown Haskell love it and the established programmers tend to have preconceptions that it's some super scary language with commutative diagrams coming out of its rear end at every turn. The plural of anecodote isn't data, but still.

yeah it's very telling that the people who love it are the ones who know nothing about programming

Posting Principle
Dec 10, 2011

by Ralp

Notorious b.s.d. posted:

it's true that scala is a big language. unlike C++, it's a big language designed by people who had done it before. their first attempt was so difficult to use they essentially abandoned it.

scala is the language built with lessons learned from "funnel" (the experimental thing) and work on java generics

tl;dr: scala is not as crazy as c++, even if it is quite large

nobody uses scala so the developers can break compatibility on every point release. c++ doesnt have that luxury

double sulk
Jul 2, 2010

Tiny Bug Child posted:

yeah it's very telling that the people who love it are the ones who know nothing about programming

tiny bug shaggar was right

Posting Principle
Dec 10, 2011

by Ralp
i unironically know nothing about programming but :justpost::justpost::justpost:

Notorious b.s.d.
Jan 25, 2003

by Reene

Posting Principle posted:

nobody uses scala so the developers can break compatibility on every point release. c++ doesnt have that luxury

they break binary compatibility because they have to, the constraints of the jvm force their hand. C++ does this also.

they don't break source compatibility any more quickly than other language designers. old things are marked deprecated and removed a few releases later; new things are marked experimental and subject to change.

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

gucci void main posted:

tiny bug shaggar was right

not really though. haskell owns

double sulk
Jul 2, 2010

MeramJert posted:

not really though. haskell owns

it owns if u like academic languages with little real world value

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

Tiny Bug Child posted:

yeah it's very telling that the people who love it are the ones who know nothing about programming
tbc what's the functional-est language you've worked with. not as in "played with for an afternoon" or "saw quoted on a forum once", but actually worked with for >month

e: you too sulk

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

Internaut! posted:

no and no but you're on my list, tbh scala seems to be winning the war of hearts and minds and I can understand why but it's a shame nonetheless

i really haven't spent as much time with lisp dialects as i'd like to have. there any papers/articles/posts/books you can recommend on the cool stuff that's possible when you finally get used to homoiconic languages?

coffeetable fucked around with this message at 16:30 on Oct 2, 2013

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

Notorious b.s.d. posted:

(does anyone actually prefer groovy to scala? i've never met a hardcore groovy user, just people who wanted to flirt with gradle)

gradle is pretty cool

trex eaterofcadrs
Jun 17, 2005
My lack of understanding is only exceeded by my lack of concern.

Notorious b.s.d. posted:

clojure is riddled with the impracticality you just complained about in other languages. second rate java interop and little/no provisions for OO guaranteed clojure would be a non-starter outside niche use.

clojure was never really part of the battle for the hearts and minds in the commercial world. it was groovy vs scala all along. i think scala is winning




(does anyone actually prefer groovy to scala? i've never met a hardcore groovy user, just people who wanted to flirt with gradle)

i use groovy (and clojure fwiw) a lot and i like it more than scala simply because the idiomatic programming style is basically java with better syntax, it suffers from some pretty gnarly syntactic corner cases by trying to be ruby and python at the same time, but just like any language you have to know wehre the dogshit is and veer away

i still don't get why you think clojure has second rate java interop? i've got a handful of significant (as in, in production servicing ecommerce) clojure projects and every time i pull in a java library it's easy peasy.

Posting Principle
Dec 10, 2011

by Ralp
at some point i need to change this project to maven or gradle from the built in IDEA build system and both terrify me

trex eaterofcadrs
Jun 17, 2005
My lack of understanding is only exceeded by my lack of concern.

Posting Principle posted:

at some point i need to change this project to maven or gradle from the built in IDEA build system and both terrify me

use maven and dont look back, once you get over that initial soreass of moving your source structure to maven everything is gravy

Condiv
May 7, 2008

Sorry to undo the effort of paying a domestic abuser $10 to own this poster, but I am going to lose my dang mind if I keep seeing multiple posters who appear to be Baloogan.

With love,
a mod


trex eaterofcadrs posted:

use maven and dont look back, once you get over that initial soreass of moving your source structure to maven everything is gravy

this

Notorious b.s.d. posted:

they break binary compatibility because they have to, the constraints of the jvm force their hand. C++ does this also.

they don't break source compatibility any more quickly than other language designers. old things are marked deprecated and removed a few releases later; new things are marked experimental and subject to change.

they don't even break binary compatibility every point release anymore, it's every major release now (I guess you can call 2.10 -> 2.11 a point release, but 2.11.x is a feature release while 2.10.3 is bugfixes).

JewKiller 3000
Nov 28, 2006

by Lowtax

Internaut! posted:

no and no but you're on my list, tbh scala seems to be winning the war of hearts and minds and I can understand why but it's a shame nonetheless

there's no shame in seeing LISP lose again for the same good reasons

MononcQc
May 29, 2007

I'd definitely go for clojure over Scala for my own personal fun any day, and I really appreciate Rich Hickey's talks.

I haven't done it yet because I have always been too lazy to set it up, and I need to go back to learning Forth also :toot:

Nomnom Cookie
Aug 30, 2009



trex eaterofcadrs posted:

i use groovy (and clojure fwiw) a lot and i like it more than scala simply because the idiomatic programming style is basically java with better syntax, it suffers from some pretty gnarly syntactic corner cases by trying to be ruby and python at the same time, but just like any language you have to know wehre the dogshit is and veer away

i still don't get why you think clojure has second rate java interop? i've got a handful of significant (as in, in production servicing ecommerce) clojure projects and every time i pull in a java library it's easy peasy.

clojure is ok at calling java code. its more painful for java to call clojure--and before you say but but but you can use reify and gen-class and whatever--java calls scala code by calling it. u make a scala class and java can use it. that's why clojure's interop is second-rate

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror

coffeetable posted:

tbc what's the functional-est language you've worked with. not as in "played with for an afternoon" or "saw quoted on a forum once", but actually worked with for >month

e: you too sulk

"you can't criticize my lovely language until you've used it. for a MONTH." lol get the gently caress out of here.

trex eaterofcadrs
Jun 17, 2005
My lack of understanding is only exceeded by my lack of concern.

Nomnom Cookie posted:

clojure is ok at calling java code. its more painful for java to call clojure--and before you say but but but you can use reify and gen-class and whatever--java calls scala code by calling it. u make a scala class and java can use it. that's why clojure's interop is second-rate

ah

well that said :gen-class is easy enough to use, so i guess second-rate is fine by me

Max Facetime
Apr 18, 2009

trex eaterofcadrs posted:

i use groovy (and clojure fwiw) a lot and i like it more than scala simply because the idiomatic programming style is basically java with better syntax, it suffers from some pretty gnarly syntactic corner cases by trying to be ruby and python at the same time, but just like any language you have to know wehre the dogshit is and veer away

goddamn debugging groovy was terrible. you'd add some debug output, set a breakpoint and start things up. you hit the breakpoint, inspect the call stack, look at the output. so far so good.

you'd change the output abit and think 'it's pretty nifty that I don't have to restart anything, I'm so agile and dynamic and productive right now'

then you'd hit the breakpoint again and the call stack would be completely different, totally alien, nothing in common from just a moment ago. 'well that's not good, maybe a restart will fix that.' and what do you know, it does, every time it happens

power botton
Nov 2, 2011

coffeetable posted:

tbc what's the functional-est language you've worked with. not as in "played with for an afternoon" or "saw quoted on a forum once", but actually worked with for >month

e: you too sulk

tbc is a php troll but a good lad that means well and you shouldn't expect good answers from him

sulk is amazingly stupid and you shouldn't expect good answers from him, but add in a heaping dose of pity

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

MononcQc posted:

I'd definitely go for clojure over Scala for my own personal fun any day, and I really appreciate Rich Hickey's talks.

I haven't done it yet because I have always been too lazy to set it up, and I need to go back to learning Forth also :toot:

Chuck moore has literal forth machines for sale, which are basically 144 tiny cores on a chip, but my soldering skills suck :/

green arrays dev board is like $400 for a presoldered one

Notorious b.s.d.
Jan 25, 2003

by Reene

Tiny Bug Child posted:

"you can't criticize my lovely language until you've used it. for a MONTH." lol get the gently caress out of here.

i actually agree with him

when i poo poo all over php and call a piss bucket for idiots, it's because i've spent months of my life suffering through the maintenance of php codebases

Notorious b.s.d.
Jan 25, 2003

by Reene

MononcQc posted:

I'd definitely go for clojure over Scala for my own personal fun any day, and I really appreciate Rich Hickey's talks.

I haven't done it yet because I have always been too lazy to set it up, and I need to go back to learning Forth also :toot:

rich hickey is a great speaker and clojure is carefully designed. i'm not gonna poo poo on clojure it's pretty good at doing what it does. it's just not the language i want for most things most of the time.

Nomnom Cookie
Aug 30, 2009



i just finished working on a high-quality php codebase and its only about half as bad as working on a bad one

SavageMessiah
Jan 28, 2009

Emotionally drained and spookified

Toilet Rascal

Notorious b.s.d. posted:

rich hickey is a great speaker and clojure is carefully designed. i'm not gonna poo poo on clojure it's pretty good at doing what it does. it's just not the language i want for most things most of the time.

a reasonable opinion in yospos :monocle:

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

Nomnom Cookie posted:

so basically it goes like this

1. learn haskell
2. wish you were programming haskell
3. do terrible things trying to make c# be haskell

this doesn't recommend haskell to me, someone who is trying to do the best job possible with the tools available to me

i wasnt suggesting that you learn haskell in particular i was saying that i learned programming concepts in haskell that make shitloads of sense but c# does not have one of them

first class [anonymous] functions are a feature that are in literally every language i will ever care about writing code in (c#, objc, c++, all the good p-langs)

type constructors are basically only in haskell, and that sucks, because there's a lot of neat stuff you can do with them. however, like any language feature, they're really just syntactic sugar and it's possible to implement something that achieves the same effect in other languages (assuming they make sense. it doesn't make sense to have type constructors outside a strongly typed language.)

but if you didn't even understand the concept, and had never written code in a language that made that sort of thing easy, you'd never think to design a system that way

learning something like c#, a language which supports nearly everything modern you can think of, means that you will learn one way of doing things and never step outside of it

learning something like haskell, or lisp, languages which are very narrow in what they allow you to do and that use drastically different methodologies from the "norm" (ie procedural OO), forces you to learn a different way to see the code you want to write. spending a month or so "native" in this environment will change the way you think about your code, improving your mental models, etc.


but hey, if all you care about is making dollars and you're not interested in actually learning how to think about your code outside of the restrictive terms of a single language, go nuts

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

Nomnom Cookie posted:

so basically it goes like this

1. learn haskell
2. wish you were programming haskell
3. do terrible things trying to make c# be haskell

this doesn't recommend haskell to me, someone who is trying to do the best job possible with the tools available to me

jokes on u, c# picks and chooses haskell features and changes them to fit in the CLR

Monads, do notation => LINQ
FRP => .NET Reactive Extensions

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

Tiny Bug Child posted:

"you can't criticize my lovely language until you've used it. for a MONTH." lol get the gently caress out of here.

soooo you haven't worked in any functional languages then

trex eaterofcadrs
Jun 17, 2005
My lack of understanding is only exceeded by my lack of concern.

coffeetable posted:

soooo you haven't worked in any functional languages then

what are you talking about php has had closures for like 4 years now

Nomnom Cookie
Aug 30, 2009



Malcolm XML posted:

jokes on u, c# picks and chooses haskell features and changes them to fit in the CLR

Monads, do notation => LINQ
FRP => .NET Reactive Extensions

it's called throwing out the bathwater and stealing the baby

Adbot
ADBOT LOVES YOU

X-BUM-RAIDER-X
May 7, 2008
php is loving poo poo though

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