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
gonadic io
Feb 16, 2011

>>=

Malcolm XML posted:

NoImplicitPrelude now mandatory

Prelude = ez for beginners
Prelude2 = the one people actually use

there is classy-prelude which imo was a precursor to this whole debacle (it uses lots of typeclasses get it??)

e: i actually quite like the idea of classy-prelude, but it was always quite experimental (at least when i was programming lots of haskell) so i never actually used it. like i said, the old-fashioned nature of standard prelude does regularly annoy me

gonadic io fucked around with this message at 21:30 on Oct 16, 2015

Adbot
ADBOT LOVES YOU

pepito sanchez
Apr 3, 2004
I'm not mexican
is there any reason to learn Scala anymore? the best i found was akka

i did get into Groovy, without knowing a thing about it before except the name. we were looking for utility methods already in place for use with mysql+JDBC, and groovy's abstraction on it was more than we could hope to search for.

Typical Yosposter
Mar 30, 2015

pepito sanchez posted:

is there any reason to learn Scala anymore? the best i found was akka

scala is bad op. use nodejs.

Soricidus
Oct 21, 2010
freedom-hating statist shill

Typical Yosposter posted:

obama is bad op. vote hitler.

VikingofRock
Aug 24, 2008




Is idris cool? I've been having the itch to learn a semi-useless language recently, and right now I'm thinking one of idris (for loving around with functional stuff), some lisp dialect (for the same reasons), ruby (for loving around with metasploit), or elm (for loving around with web stuff).

gonadic io
Feb 16, 2011

>>=

pepito sanchez posted:

is there any reason to learn Scala anymore?

only if you're on the jvm

Bloody
Mar 3, 2013

was there ever a reason to

pepito sanchez
Apr 3, 2004
I'm not mexican

gonadic io posted:

only if you're on the jvm

i am. but i see no reason to use it if i can use pure java 8. clojure looks a bit cleaner and without the problems i've seen people complain about here in Scala. other libraries provide any specific utility. wondering here where a yosposter finds a good use of Scala.

gonadic io
Feb 16, 2011

>>=

pepito sanchez posted:

i am. but i see no reason to use it if i can use pure java 8. clojure looks a bit cleaner and without the problems i've seen people complain about here in Scala. other libraries provide any specific utility. wondering here where a yosposter finds a good use of Scala.

clojure is a lisp.

if you like streams then they're a million times better in scala. if you don't like them, just keep on trucking in java7.

as much as i do have lots of complaints about scala, i'm very glad that we're using it over any other jvm lang.

jony neuemonic
Nov 13, 2009

pepito sanchez posted:

i am. but i see no reason to use it if i can use pure java 8. clojure looks a bit cleaner and without the problems i've seen people complain about here in Scala. other libraries provide any specific utility. wondering here where a yosposter finds a good use of Scala.

there are a few things scala does that java doesn't, like shell scripting and the repl, but its community values complexity too much for me to feel very comfortable with it.

clojure is simpler, but it's also less ambitious. i'm alright with that, for some problems it may be a dealbreaker.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

VikingofRock posted:

Is idris cool? I've been having the itch to learn a semi-useless language recently, and right now I'm thinking one of idris (for loving around with functional stuff), some lisp dialect (for the same reasons), ruby (for loving around with metasploit), or elm (for loving around with web stuff).

dear god don't learn ruby

i've spent a day on elixir and it's pretty cool.

the match operator is really weird i dunno what the gently caress is up with that thing. it...can do equality/sort of assert, assign a variable and reassign a variable. i guess it's that way because it lets you destructure data while simultaneously using it to do a pattern match, which is nice and all but it's really confusing in other contexts.

now i'm working on the agent/client/server stuff in their tutorial and it was incredibly confusing. i've got the hang of it now i think but it seems like a lot of boiler plate to deal with mutable state. seems like haskell had a better idea because you can just do <~> or whatever instead of writing 500 lines of message passing code.

the shell is good but it's annoying that if you call a function with the wrong arity, rather than suggesting the correct arity, it just tells you the function doesn't exist.

gonadic io
Feb 16, 2011

>>=

VikingofRock posted:

Is idris cool? I've been having the itch to learn a semi-useless language recently, and right now I'm thinking one of idris (for loving around with functional stuff), some lisp dialect (for the same reasons), ruby (for loving around with metasploit), or elm (for loving around with web stuff).

watch https://www.youtube.com/watch?v=vkIlW797JN8 for an introdduction to idris by the creator. sure it's an entire talk but it's way less commitment then actually learning a language.

in the version of that talk he gave in Nottingham he demoed space invaders. don't know if he does it in this london version.

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av
what do you guys use all these goofy languages for? like Scala, Haskell, Clojure. I use a lot of languages in my work, C, Objective C, C++, Groovy, Java, I work on web servers and mobile clients. what are those languages you always talk about for? are they especially suited for something? are they used in some super-popular framework, or a killer application for some niche? is it some "big data" thing, because that's a field I know nothing of

suffix
Jul 27, 2013

Wheeee!

tef posted:

every single feature rubyists tout as being magical, the quirks that make it pleasant to write a dsl for your boilerplate, and the shorthand that lets your example fit neatly on a slide, well, they have a downside.

code:
if nil
  puts "nil"
elif true
  puts "true"
else
  puts "else"
end
yes of course this prints else.

it took me a while to get what was happening here. this should have been "elsif true" but a one character typo made it "elif true", which is just a call to the function "elif" with one parameter

compare with sister plang python, where the corresponding typo would trigger three separate syntax errors

jre
Sep 2, 2011

To the cloud ?



hackbunny posted:

what do you guys use all these goofy languages for? like Scala, Haskell, Clojure. I use a lot of languages in my work, C, Objective C, C++, Groovy, Java, I work on web servers and mobile clients. what are those languages you always talk about for? are they especially suited for something? are they used in some super-popular framework, or a killer application for some niche? is it some "big data" thing, because that's a field I know nothing of

Clojure is popular for stream processing which is a "big data" thing

VikingofRock
Aug 24, 2008




hackbunny posted:

what do you guys use all these goofy languages for? like Scala, Haskell, Clojure. I use a lot of languages in my work, C, Objective C, C++, Groovy, Java, I work on web servers and mobile clients. what are those languages you always talk about for? are they especially suited for something? are they used in some super-popular framework, or a killer application for some niche? is it some "big data" thing, because that's a field I know nothing of

Personally most of my "goofy languages" are just for fun and because I think they are interesting. They do occasionally have some use though. For example, writing parsing code in Haskell is very nice, so some of my log file parsing / manipulation code is written in Haskell.

gonadic io
Feb 16, 2011

>>=

hackbunny posted:

what do you guys use all these goofy languages for? like Scala, Haskell, Clojure. I use a lot of languages in my work, C, Objective C, C++, Groovy, Java, I work on web servers and mobile clients. what are those languages you always talk about for? are they especially suited for something? are they used in some super-popular framework, or a killer application for some niche? is it some "big data" thing, because that's a field I know nothing of

no they're all general purpose langs.

any time you're using groovy or java you could be using scala (or probably clojure too). they're all general purpose jvm langs. i use scala when working on web servers but i'm sure you can program android in it.

haskell has it's own runtime (but libraries for web servers), but I don't think mobile is that good a fit for it since it's so tied to android (or ios).

Ralith
Jan 12, 2011

I see a ship in the harbor
I can and shall obey
But if it wasn't for your misfortune
I'd be a heavenly person today

VikingofRock posted:

Is idris cool? I've been having the itch to learn a semi-useless language recently, and right now I'm thinking one of idris (for loving around with functional stuff), some lisp dialect (for the same reasons), ruby (for loving around with metasploit), or elm (for loving around with web stuff).
If you want to play with dependent types, learn Coq or Agda instead. Or just wait for the GHC extension that'll add them.

Lisp is pretty cool. Racket's probably the easiest to get started with/least warty.

jony neuemonic
Nov 13, 2009

i don't know how large it is, but clojure seems to have carved out a niche in web dev too.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
i just want to be an early adopter of a cool/influential programming lanng

VikingofRock
Aug 24, 2008




MALE SHOEGAZE posted:

i just want to be an early adopter of a cool/influential programming lanng

You've gotta pick one there--programmers hate everything that is popular so if something ever because widely-used enough to be considered influential it will immediately cease to be considered cool and instead people will just whine about it forever.

Ralith
Jan 12, 2011

I see a ship in the harbor
I can and shall obey
But if it wasn't for your misfortune
I'd be a heavenly person today
Racket might be getting dependent types too soon, so that's pretty neat.

raminasi
Jan 25, 2005

a last drink with no ice
I can spin up little prototypes in F# way faster than any other language I know

qntm
Jun 17, 2009

suffix posted:

it took me a while to get what was happening here. this should have been "elsif true" but a one character typo made it "elif true", which is just a call to the function "elif" with one parameter

compare with sister plang python, where the corresponding typo would trigger three separate syntax errors

in Perl,

Perl code:
dsfhsdlkjgslhdsflsafdkjhas
is a 100% syntactically correct program which runs with no errors or warnings and exits with a return code of 0

Soricidus
Oct 21, 2010
freedom-hating statist shill

gonadic io posted:

i use scala when working on web servers but i'm sure you can program android in it.

wasn't programming android in scala the reason why facebook had to monkeypatch the dalvik vm at runtime


qntm posted:

in Perl,
Perl code:
dsfhsdlkjgslhdsflsafdkjhas
is a 100% syntactically correct program which runs with no errors or warnings and exits with a return code of 0

except that's just a historical artifact, and that code will produce two warnings if you turn warnings on, and will not even compile if you use strict like literally every single perl guide has been insisting for longer than some posters have been alive

ruby, meanwhile

Soricidus fucked around with this message at 00:51 on Oct 17, 2015

Shaggar
Apr 26, 2006
why would you ever use scala when you could just use java ?

pepito sanchez
Apr 3, 2004
I'm not mexican

hackbunny posted:

what do you guys use all these goofy languages for? like Scala, Haskell, Clojure. I use a lot of languages in my work, C, Objective C, C++, Groovy, Java, I work on web servers and mobile clients. what are those languages you always talk about for? are they especially suited for something? are they used in some super-popular framework, or a killer application for some niche? is it some "big data" thing, because that's a field I know nothing of

it was kind of my question, though not so well worded.

i found a use in groovy in one specific case where it just made working with java jdbc mysql drivers easier. i'm wondering about Scala and Clojure for big data analysis, but java 8 seems to have as much capability and i don't see the benefit of a lisp or in the case of scala something that does what java does but for some reason looks like python. it's why i ask what it's still really very good for in an honest way.

as for haskell i read a bit about it recently, and the answers for it are always so obscure. i don't see real world application in it at the moment, yet everyone says it'll make you think as a better programmer by practicing it. it's something i can see happening considering its capabilities. but then again - in the same way - i can see myself being a better programmer focusing more of my time just learning more about C, something still widely used and applicable. i don't yet see how the restrictions of a programming language i don't know could make me better at something i already somewhat know. it's not like re-learning a keyboard's layout and programming your brain to get used to dvorak instead of qwerty the homekey way. OO langs have design patterns that transcend the specific language you're working in, functional programming has "don't-gently caress-up"s, and the fact that most of them dynamically typed make them extremely unappealing.

jony neuemonic
Nov 13, 2009

Shaggar posted:

why would you ever use scala when you could just use java ?

because scala is the current hipste

jony neuemonic
Nov 13, 2009

pepito sanchez posted:

i don't see the benefit of a lisp

then you won't get clojure.

i don't mean that as snark, "lisp on a platform people actually use" is the entire reason it exists. if you want to know why you should care, this is probably the best concrete explanation i've seen.

tef
May 30, 2004

-> some l-system crap ->

gonadic io posted:

con: shut up, first impressions are important, the language shouldn't put barriers in the way of newcomers

this is the entire point of haskell tho?

tef
May 30, 2004

-> some l-system crap ->

pepito sanchez posted:

i found a use in groovy in one specific case where it just made working with java jdbc mysql drivers easier. i'm wondering about Scala and Clojure for big data analysis, but java 8 seems to have as much capability and i don't see the benefit of a lisp or in the case of scala something that does what java does but for some reason looks like python

a lot of the historical "lisp good, c bad" came from features like garbage collection, and higher order functions. things that have kinda commonplace for almost 20 years (java, javascript, python, ruby, c#, etc)

most of the modern lisp weenie stuff comes from macros, or the feeling that you really know better, and those 30 lines of code you saved with a macro are totes worth it.

clojure's strengths aren't so much that, but the way in which it handles mutability, and concurrency. the lisp syntax and macros i guess are vestigial parts from habit

tef
May 30, 2004

-> some l-system crap ->
scala is for people who want to write java but with functions

or people who want to write a taxonomy of types in a much more obsequious way than java permits

or people who want to be writing haskell but it actually has to be deployed

or people who think the permgen is a real cool place to allocate from

fritz
Jul 26, 2003

tef posted:

most of the modern lisp weenie stuff comes from macros

ive fought with enough c macroes to know that however good lisp might be, it's not worth it

fritz
Jul 26, 2003

and i remember greybeards back in the 90s getting all misty-eyed at remembering 'macro assembly language' and not really seeing the big deal

JawnV6
Jul 4, 2004

So hot ...
so what I'm hearing is that scala's perfect for a big data analytics machine learning containerized platform?

pseudorandom name
May 6, 2007

fritz posted:

ive fought with enough c macroes to know that however good lisp might be, it's not worth it

C doesn't have macros, it has a really poor text substitution DSL

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

pepito sanchez posted:

as for haskell i read a bit about it recently, and the answers for it are always so obscure. i don't see real world application in it at the moment, yet everyone says it'll make you think as a better programmer by practicing it. it's something i can see happening considering its capabilities. but then again - in the same way - i can see myself being a better programmer focusing more of my time just learning more about C, something still widely used and applicable. i don't yet see how the restrictions of a programming language i don't know could make me better at something i already somewhat know. it's not like re-learning a keyboard's layout and programming your brain to get used to dvorak instead of qwerty the homekey way. OO langs have design patterns that transcend the specific language you're working in, functional programming has "don't-gently caress-up"s, and the fact that most of them dynamically typed make them extremely unappealing.

well the point isn't learning what the restrictions of haskell are, it's about learning to approach & think about problems in a fundamentally different way. it's less like learning dvorak and more like taking a few steps to the side and seeing something from a different angle.

also which functional programming languages are you thinking about that are dynamically typed? like, clojure and maybe erlang (idk enough about erlang, is it dynamically typed?). most of them are statically typed. haskell, ocaml, f#, elm, the whole ml family really, scala, etc are all statically typed languages

sarehu
Apr 20, 2007

(call/cc call/cc)

pepito sanchez posted:

as for haskell i read a bit about it recently, and the answers for it are always so obscure. i don't see real world application in it at the moment, yet everyone says it'll make you think as a better programmer by practicing it. it's something i can see happening considering its capabilities.

The main differences between Haskell and "mainstream" languages are pretty mundane but important:

1. Static types (and not dynamic types)
2. Very lightweight easy type definitions (for algebraic types and struct types, and not some garbage like C++ or Java classes)

This tilts the solution space so that the contour map of difficulty in solving a problem is shaped differently, and the easiest way to solve the problem is now a more "correct" way in terms of software engineering standards. That makes you more aware of how languages like C# or Java or C++ fight against this, and how you can fight back or mitigate the downsides.

Other stuff it gives is less important:

3. Pattern matching and a culture of spergaciously handling all cases is good for the mind too.
4. Play with monads and monad transformers, and you'll get some instinct that maps back to real languages in the form of "just pass the goddamn parameter" instead of trying to be cute and putting database connections in private fields of miscellaneous objects because it's "convenient."
5. You get more awareness of the benefits of being very explicit about a function's inputs and outputs and side effects. (See the part about not being cute with database connections.)
6. Being lazy lets you write really elegant code and it's nice to turn off the part of the brain that thinks about literal performance.

Most of the important benefits are given by using other statically typed functional programming languages like OCaml or ML or F# or some shiz like that.

There's a lot of Haskell churchboys that'll wax poetic about the benefits of Haskell and give some example that any statically typed language can support. The darkweb mirror of lambdatheultimate has a wiki featuring footage of some of these people getting tortured to death.

Brain Candy
May 18, 2006

hackbunny posted:

what do you guys use all these goofy languages for? like Scala, Haskell, Clojure. I use a lot of languages in my work, C, Objective C, C++, Groovy, Java, I work on web servers and mobile clients. what are those languages you always talk about for? are they especially suited for something? are they used in some super-popular framework, or a killer application for some niche? is it some "big data" thing, because that's a field I know nothing of

ymmv: i work in simulations

i guess my answer is holy poo poo is it a pain in the rear end to keep things immutable in java and friends

it's like doing objects in C; you can, but goddamn that is a bunch of gross boilerplate

and if go down that road, you really want persistent data structures, and you aren't getting those without a GC so good luck with c-langs

as to why immutable, http://www.infoq.com/presentations/Are-We-There-Yet-Rich-Hickey is the best thing i've seen so far. working in simulations makes you very aware that implicitly coupling state with time is a losing game for anything that is really parallel

Adbot
ADBOT LOVES YOU

pepito sanchez
Apr 3, 2004
I'm not mexican

fart simpson posted:

also which functional programming languages are you thinking about that are dynamically typed?

f# is a good thing that i like, but any REPL isn't statically typed. and it requires you make your own type providers in any cases where it's not something inherent to the language or existing type providers. something i had to learn how to do. which isn't a complaint but a required learning experience. much like javascript and typescript, if you do want to use typescript beyond basic understanding. again: i know zero about Scala but it seems that static typing isn't something inherent to the language. i might be wrong there. python is something i want to learn more, specially for big data analysis. clojure and scala are both simply curiosities since i work with java a lot, and while java 8 is awesome and good, things that i could consider tools to make java that much easier are always welcome. anything that's optionally purely or purely functional is something that attracts me for its utility. i've yet to understand the full advantage of pure immutability in a language, like haskell offers. it's been something that sounds to me like "don't gently caress with my code, and don't let me gently caress my own code up accidentally" yet that bad sense for a definition of immutability sounds to me like it might have its own possible pitfalls, because only parts of anyone's code should ever be unfuckerupable by a system.

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