|
MononcQc posted:
Yea I mean I guess they really are different problem domains. But your problem domain sounds way loving smarter than mine.
|
# ? Feb 5, 2014 18:59 |
|
|
# ? Jun 11, 2024 11:15 |
|
i am rather enjoying the death of oo lol if you didn't see it coming after the second patterns book
|
# ? Feb 5, 2014 19:07 |
|
I decided I wanted to do a bunch of async crap in that Pandora client I was working on so its loads of delegates and I guess function pointers or something. idk. its way crazy overkill and looks really gross but it works. that's my functional programming story
|
# ? Feb 5, 2014 19:07 |
|
Cybernetic Vermin posted:i am rather enjoying the death of oo countin chickens itt
|
# ? Feb 5, 2014 19:13 |
|
The moment functional programming takes over is the moment it becomes all about logic programming.
|
# ? Feb 5, 2014 19:14 |
|
not that i know anything, but oo seems great at dealing with object-shaped problems. the problem is that the overwhelming majority of developers are comfortable with only OO, and so when they encounter a problem which doesn't have any clearly defined objects they try to smush it to fit in an object-shaped hole anyway there's also a secondary problem which is that the power of OO is predicated on the human mind's innate ability to reason about interactions between objects. thing is, there're an awful lot of interactions that are beyond any individual's ability to reason effectively about, and in those cases it might be better to throw out intuitiveness in favour of rigour so that when you inevitably gently caress up at least the type system/static analysis/quickcheck/whatevs can catch you.
|
# ? Feb 5, 2014 19:23 |
|
I am fond of grotesque hybrids like scala because I want both. I want to have an OO type system I understand, and I *ALSO* want to have option types and either and map/filter/fold. I can use each set of features on problems when it is intuitive to me, not along the boundaries that a theorist or a language designer pre-determined
|
# ? Feb 5, 2014 19:25 |
|
Use Racket
|
# ? Feb 5, 2014 19:26 |
|
Cybernetic Vermin posted:i am rather enjoying the death of oo mega lol
|
# ? Feb 5, 2014 19:40 |
|
MononcQc posted:The moment functional programming takes over is the moment it becomes all about dependently typed programming.
|
# ? Feb 5, 2014 19:42 |
|
Notorious b.s.d. posted:I want to have an OO type system I understand, and I *ALSO* want to have option types and either and map/filter/fold. sounds like you need the power of PHP.
|
# ? Feb 5, 2014 19:47 |
|
or just have a global "functions" singleton
|
# ? Feb 5, 2014 19:52 |
|
Sorry but Mercury already has something somewhat close to dependent types: http://dbpmail.net/essays/2011-09-03-mercury-tidbits.html it still is the future.
|
# ? Feb 5, 2014 19:53 |
|
With javascript you have the power to do both functional and OO programming all half-assed.
|
# ? Feb 5, 2014 19:54 |
Tiny Bug Child posted:sounds like you need the power of ruby 2.1.
|
|
# ? Feb 5, 2014 19:54 |
|
can anyone explain how Mathematica works? it feels pretty functional and i think there's a type system there somewhere but it seems very flexible.
|
# ? Feb 5, 2014 19:55 |
|
my day job involves a great deal of ruby. i do not need to take that mess home with me to my hobby projects edit: anyone who thinks ruby is an elegant language should consider two things 1. what is the difference between a bloc, a proc, and a lambda? when does this difference benefit you, the programmer? when does it benefit a naive C implementation of the language? 2. why are refinements scoped to a file on disk? same question as before: when does this scoping rule benefit you, the programmer, and when does it benefit a naive C implementor? Notorious b.s.d. fucked around with this message at 19:58 on Feb 5, 2014 |
# ? Feb 5, 2014 19:55 |
|
pointsofdata posted:can anyone explain how Mathematica works? it feels pretty functional and i think there's a type system there somewhere but it seems very flexible. it's powerpoint for math and it sorta incidentally includes a scripting language
|
# ? Feb 5, 2014 19:56 |
|
pointsofdata posted:can anyone explain how Mathematica works? it feels pretty functional and i think there's a type system there somewhere but it seems very flexible. it uses the same thought process as php: whatever argument is passed to a function, it should try its best to do something with. coffeetable fucked around with this message at 20:06 on Feb 5, 2014 |
# ? Feb 5, 2014 20:00 |
|
pointsofdata posted:can anyone explain how Mathematica works? it feels pretty functional and i think there's a type system there somewhere but it seems very flexible. you press = twice and do everything as a wolfram alpha query
|
# ? Feb 5, 2014 20:02 |
|
Notorious b.s.d. posted:I am fond of grotesque hybrids like scala because I want both. is there anything in scala (or another multiparadigm language) that allows you to declare a fragment of the program as entirely functional, and forbids side effects/mutability/etc? cause the problem with letting the programmer do whatever they want is that programmers do whatever they want .
|
# ? Feb 5, 2014 20:03 |
|
MononcQc posted:The moment functional programming takes over is the moment it becomes all about logic programming. Dependent types now! MononcQc posted:Sorry but Mercury already has something somewhat close to dependent types: http://dbpmail.net/essays/2011-09-03-mercury-tidbits.html it still is the future. ehhh i like having my logic programming hived away. Slap the unifier as a lib i guess.
|
# ? Feb 5, 2014 20:08 |
|
Notorious b.s.d. posted:it's powerpoint for math and it sorta incidentally includes a scripting language cool that's how i've been using it. good to know i shouldn't be trying to do any more with it
|
# ? Feb 5, 2014 20:12 |
|
pointsofdata posted:can anyone explain how Mathematica works? it feels pretty functional and i think there's a type system there somewhere but it seems very flexible. The Wolfram Language is a highly developed knowledge-based language that unifies a broad range of programming paradigms and uses its unique concept of symbolic programming to add a new level of flexibility to the very concept of programming. from https://reference.wolfram.com/language/guide/LanguageOverview.html to think that years ago I had only a vague impression that wolfram was full of poo poo
|
# ? Feb 5, 2014 20:33 |
|
Symbolic Butt posted:The Wolfram Language is a highly developed knowledge-based language that unifies a broad range of programming paradigms and uses its unique concept of symbolic programming to add a new level of flexibility to the very concept of programming. yeah i found that before i asked the question but it didn't really help.
|
# ? Feb 5, 2014 20:42 |
|
pointsofdata posted:yeah i found that before i asked the question but it didn't really help. it wasn't written to be helpful
|
# ? Feb 5, 2014 20:44 |
|
Notorious b.s.d. posted:I am fond of grotesque hybrids like scala because I want both. Scala owns :3
|
# ? Feb 5, 2014 20:46 |
|
wtf are call/cc and delimited continuations, and what are they good for? wikipedia's explanations of both concepts are your typical legendarily bad wikipedia explanations with no motivating context. if you want a generator or something then can't you just construct a closure and call it from time to time?
|
# ? Feb 5, 2014 21:21 |
|
Mr Dog posted:wtf are call/cc and delimited continuations, and what are they good for? wikipedia's explanations of both concepts are your typical legendarily bad wikipedia explanations with no motivating context. continuations are an abstract representation of control state. a continuation represents a context from which program execution can continue, once a value is known. so continuations are really just a representation of "what still needs to be computed." call/cc just takes the current continuation (i.e. everything that still needs to be computed from that point on) and passes it to a function. the function can then call the continuation it gets whenever it wants to "resume" execution from the point where call/cc was called. continuations are cool because they let you implement a lot of control flow mechanisms. for example, here is how you can write exceptions using continuations code:
the inner call/cc is similar, if you call fail the execution resumes at the point of that call/cc. so fail "it's zero" makes the inner call/cc return "it's zero" (binding it to theError) and then you just pass it off to your error handler. delimited continuations are similar, except instead of representing the rest of the execution, they represent the rest of the execution up to a certain point. this can be useful for example if you are building an interactive loop in scheme - you don't want your continuation to capture the loop itself, just everything up to the point of returning control back to the loop (for output/input). one neat thing about delimited continuations are that they're able to be composed, since they are kinda like functions. continuations are more powerful than generators in the sense that they can be used to implement more control flow structures. a lot of people (rightly so) don't like continuations, because they can be confusing to reason about and provide power that no one really needs. Pie Colony fucked around with this message at 21:51 on Feb 5, 2014 |
# ? Feb 5, 2014 21:45 |
|
one fun thing to now and then ponder about oo is whether clos was ridiculously insightful or if it missed the point entirely don't entirely know how to feel
|
# ? Feb 5, 2014 21:48 |
|
coffeetable posted:is there anything in scala (or another multiparadigm language) that allows you to declare a fragment of the program as entirely functional, and forbids side effects/mutability/etc? cause the problem with letting the programmer do whatever they want is that programmers do whatever they want . d's got pure but it's d
|
# ? Feb 5, 2014 22:14 |
probably gonna pick up one of scala or clojure at some point in the future. i guess i'd be dehumanizing myself pretty hard for the latter though.
|
|
# ? Feb 5, 2014 22:58 |
|
GrumpyDoctor posted:d's got pure but it's d what programming language feature wont d poorly implement
|
# ? Feb 5, 2014 23:25 |
|
is double sulk actual sulk or somebody else because if so get the gently caress out sulk
|
# ? Feb 6, 2014 00:07 |
|
coffeetable posted:is there anything in scala (or another multiparadigm language) that allows you to declare a fragment of the program as entirely functional, and forbids side effects/mutability/etc? cause the problem with letting the programmer do whatever they want is that programmers do whatever they want . there's an effect typing plugin for the scala compiler that kind of does that with annotations. code:
|
# ? Feb 6, 2014 00:32 |
|
Notorious b.s.d. posted:2. why are refinements scoped to a file on disk? same question as before: when does this scoping rule benefit you, the programmer, and when does it benefit a naive C implementor? maybe I'm misunderstanding you, but I believe this has changed in 2.1. refinement imports can be scoped to a module and methods of that module relying on that refinement can be used from another file: Ruby code:
code:
|
# ? Feb 6, 2014 01:10 |
|
FamDav posted:is double sulk actual sulk or somebody else yes he's sulk
|
# ? Feb 6, 2014 01:14 |
|
MononcQc posted:The moment functional programming takes over is the moment it becomes all about logic programming. one day
|
# ? Feb 6, 2014 01:16 |
|
Deus Rex posted:maybe I'm misunderstanding you, but I believe this has changed in 2.1. refinement imports can be scoped to a module and methods of that module relying on that refinement can be used from another file: it's still kinda wack that the method lookup depends on the lexical context of the call, and not just on the object the method is being called on. that said, i appreciate the demo and might have a use for it
|
# ? Feb 6, 2014 01:21 |
|
|
# ? Jun 11, 2024 11:15 |
|
hepatizon posted:it's still kinda wack that the method lookup depends on the lexical context of the call, and not just on the object the method is being called on. that said, i appreciate the demo and might have a use for it it kind of has to, though, right? like if you don't include the module that the code is in, you can't call the code. seems pretty logical to me.
|
# ? Feb 6, 2014 01:25 |