|
jesus yeah I don't even come close to caring about this poo poo
|
# ? Mar 5, 2013 04:37 |
|
|
# ? Jun 11, 2024 11:08 |
|
I'm glad someone does though
|
# ? Mar 5, 2013 04:37 |
|
JewKiller 3000 posted:here you go then: programming doesn't have to be a career path, it's also used by people who want to automate a boring part of their actual job it shouldn't be some high priesthood of types and inference, sometimes people just want to mangle some csvs or screen scrape a web site
|
# ? Mar 5, 2013 04:38 |
|
well harper is an academic, so if your response is of the form "yes that's TECHNICALLY true but it's still a pain in the rear end in the programming language my boss lets me use", i doubt he cares. there are people out there whose job is to think beyond what is allowed by php and java, and we need these people!
|
# ? Mar 5, 2013 04:39 |
|
JewKiller 3000 posted:basically i think harper is arguing that, since a language like haskell can be made "dynamically typed" when necessary as you describe, but in addition it also supports other static types, there is no reason to use so-called dynamic languages where the unitype is the only one available But then the opposite idea is also true (see the list of optional typing systems I've posted on last page). You can turn dynamic languages -- at least some of them -- into static ones if you want. It's just a question of where you run the type checking, and if it's blocking compilation or not.
|
# ? Mar 5, 2013 04:40 |
|
JewKiller 3000 posted:well harper is an academic, so if your response is of the form "yes that's TECHNICALLY true but it's still a pain in the rear end in the programming language my boss lets me use", i doubt he cares. I'm not so sure about that last part.
|
# ? Mar 5, 2013 04:40 |
|
JewKiller 3000 posted:well harper is an academic, so if your response is of the form "yes that's TECHNICALLY true but it's still a pain in the rear end in the programming language my boss lets me use", i doubt he cares. you made the mistake of thinking anyone here actually wants to discuss programming languages in the programming language thread near as i can tell this thread is about posting braindead contrarian bullshit over and over
|
# ? Mar 5, 2013 04:42 |
|
Cocoa Crispies posted:programming doesn't have to be a career path, it's also used by people who want to automate a boring part of their actual job that's absolutely fine with me, not that anyone needs my permission. to give a silly engineering analogy, if you are building a bridge across the 2 foot wide creek in your backyard, nobody minds if you use old rotting boards and superglue. but if we're talking about the bay bridge, i don't wanna see any loving php
|
# ? Mar 5, 2013 04:42 |
|
TransatlanticFoe posted:I had this https://www.youtube.com/watch?v=0-BxxMp5BRE
|
# ? Mar 5, 2013 04:43 |
|
MononcQc posted:But then the opposite idea is also true (see the list of optional typing systems I've posted on last page). You can turn dynamic languages -- at least some of them -- into static ones if you want. It's just a question of where you run the type checking, and if it's blocking compilation or not. i think the key here is the caveat "some of them". there are definitely programs you can write in dynamically typed languages which will not statically type check without a more advanced type system than is tractable to run, if they type check at all. statically type checking dynamic languages is an active research area, but all systems i know of that handle real programs contain a catchall dynamic type to fall back on
|
# ? Mar 5, 2013 04:52 |
|
JewKiller 3000 posted:that's absolutely fine with me, not that anyone needs my permission. to give a silly engineering analogy, if you are building a bridge across the 2 foot wide creek in your backyard, nobody minds if you use old rotting boards and superglue. but if we're talking about the bay bridge, i don't wanna see any loving php that's a poo poo analogy though, because one of the nice parts about modern programming is most things scale horizontally to a point, and you can replace parts cheaply and easily
|
# ? Mar 5, 2013 05:07 |
|
advocating usage of h-m languages in production should be a fireable offense imo
|
# ? Mar 5, 2013 05:08 |
|
p langs are ok someone has to do the web janitoring
|
# ? Mar 5, 2013 05:09 |
|
Cocoa Crispies posted:that's a poo poo analogy though, because one of the nice parts about modern programming is most things scale horizontally to a point, and you can replace parts cheaply and easily i don't think that's really true. take facebook as an example, they started with some dirty php code, then needed to scale up. to do this, they first spent a shitload of money on hardware. then, when that wouldn't help anymore, they hired some very expensive developers to write a custom compiler (with jit!) from their busted-rear end php to c++. they also hired up all the "decent" php programmers to fix the code so their custom compiler can handle it efficiently. and facebook is still slow and it sucks. none of this sounds cheap or easy. if you are doing a little basic automation for your job that is not oriented around computers and providing services through them, do it however you want! otherwise i really believe it makes sense to plan for the future
|
# ? Mar 5, 2013 05:13 |
|
i just looked up hindley milner type inference and they're throwing upside down capital A's at me and i just realizd that you're all taking the piss
|
# ? Mar 5, 2013 05:16 |
|
the upside down A means forall, go read the wikipedia page on first order logic, it will take you 10 minutes. for some reason people present hindley-milner type inference in a much more complicated way than it needs to be presented imo. it's just unification, checking for consistency of types
|
# ? Mar 5, 2013 05:19 |
|
right on thx i really do enjoy reading about all of this, ive just stayed in the safe domain of boring procedural poo poo so far
|
# ? Mar 5, 2013 05:21 |
|
clojurescript is terrible but a fun way to get into functional programming. it produces unreadable and un-debugable javascript but could actually be useful if source maps are ever implemented in a comprehensive way im doing this terrible hybrid functional-ish style right now, since i wrote a dom binding js lib that im using that uses a completely mutable model to set properties and binds on, but i'd like to make some sort of more pleasant interface for dom binding in clojurescript. anyways you do get to do neat tricks like code:
code:
its weird learning the syntax rules though. i guess you should always indent a line to the argument of the call above it? this is from some style guide i found on github: code:
and parens management is also hell in sublime text 2, apparently vim and emacs have much better plugins for that ("rainbow parens" so you can have each set a different color sounds brilliant)
|
# ? Mar 5, 2013 05:23 |
|
but you can already write functional programs in just regular javascript ... ???
|
# ? Mar 5, 2013 05:25 |
|
i mean there's like nine million perfectly fine ways to write functional programs but no, some shitass has to come along and make a new language because i dont even know why
|
# ? Mar 5, 2013 05:26 |
|
i have to work with a thing written partly in clojure and ugh i hate clojure
|
# ? Mar 5, 2013 05:26 |
|
edit: this post is for jonny 290 assumption for this post: the * operator takes two integers and returns an integer let's say you have a function square, that takes an argument x and returns x * x now you want to set the variable y = square 2. what is the type of y? obviously it's int, because square 2 returns int. so why should you have to specify the type of y? just write "let y = square 2" and then use y. the compiler knows y is an int. if you do something with y that is not supported on ints, like string concatenation, you get an error like: "here you used y as a string, but y is an int" extrapolate that principle to the rest of the programming language. that's literally all there is to it. does this post seem retarded simple??? that's because it is!!!
|
# ? Mar 5, 2013 05:27 |
|
rotor posted:but you can already write functional programs in just regular javascript ... ??? and he's not even being a dick.
|
# ? Mar 5, 2013 05:28 |
|
rotor posted:i mean there's like nine million perfectly fine ways to write functional programs but no, some shitass has to come along and make a new language because i dont even know why well clojure makes some sense since it sits on top of the jvm do agree that whoever decided that it needed a js port was a lunatic, but the neat part is that because it originally was made to interop with java libraries, the same syntax works well for js interop but yeah you should just write javascript (or even coffeescript, i don't care, that output is perfectly readable and debuggable) unless youre loving around like me i like having something i sort of know as a basis for proper functional languageness
|
# ? Mar 5, 2013 05:28 |
|
rotor posted:but you can already write functional programs in just regular javascript ... ??? javascript got closures basically right. unfortunately that is the only thing javascript got right. the functional programming languages i've enjoyed working with provide a static type system featuring algebraic data types and h-m style type inference
|
# ? Mar 5, 2013 05:30 |
|
clojure's only positive aspect is the jam integration, sooooo...let's take that out
|
# ? Mar 5, 2013 05:31 |
|
functional programming doesn't seem like it'd be nearly as good without pattern matching
|
# ? Mar 5, 2013 05:31 |
|
abraham linksys posted:but the neat part is that because it originally was made to interop with java libraries, the same syntax works well for js interop you can call java stuff directly from javascript using liveconnect, assuming you have java installed in your browser (lmao)
|
# ? Mar 5, 2013 05:33 |
|
JewKiller 3000 posted:the upside down A means forall, go read the wikipedia page on first order logic, it will take you 10 minutes. Saying it's forall is a bit of a stretch, it can be best described as a type template.
|
# ? Mar 5, 2013 05:36 |
|
rotor posted:you can call java stuff directly from javascript using liveconnect, assuming you have java installed in your browser (lmao) i'm kind of shocked that i'd never heard about this technology before. obviously there's no real use for it unless you're making lovely korean banking apps (actually, i think those are supposed to be activex), but it sounds legendarily bad
|
# ? Mar 5, 2013 05:37 |
|
JewKiller 3000 posted:i think the key here is the caveat "some of them". there are definitely programs you can write in dynamically typed languages which will not statically type check without a more advanced type system than is tractable to run, if they type check at all. statically type checking dynamic languages is an active research area, but all systems i know of that handle real programs contain a catchall dynamic type to fall back on Yeah, there are some obviously uncheckable languages (say, non-strict perl that has been shown to be undecidable). I think the idea of dynamic languages as a broad group being unityped and thus more restrictive than static languages is not as cleanly defined as Bob would say. Is the dynamic Haskell less or more (or as) powerful depending on when checks happen? How do you define how powerful a language's optional type system is when it relies on some universal type, but less frequently than another one's? Are they to be considered as the same? It's tricky stuff, and just saying "eh, it's dynamic and thus unityped " is a reductionist approach, I think.
|
# ? Mar 5, 2013 05:38 |
|
abraham linksys posted:
it's no different from javascript talking directly to a flash plugin, a video plugin or any other native object exposing an interface.
|
# ? Mar 5, 2013 05:38 |
|
can java call back into js? i want to write a swing web app default laf and everything edit: a JS library implementing swing would be sufficient i guess
|
# ? Mar 5, 2013 05:39 |
|
FamDav posted:Saying it's forall is a bit of a stretch, it can be best described as a type template. ok i just checked the wikipedia page for hindley-milner and it is hopelessly spergorific for beginners. if the first time someone is hearing the term is this thread, i doubt they will get much from it
|
# ? Mar 5, 2013 05:40 |
|
Nomnom Cookie posted:can java call back into js? yes
|
# ? Mar 5, 2013 05:40 |
|
JewKiller 3000 posted:ok i just checked the wikipedia page for hindley-milner and it is hopelessly spergorific for beginners. if the first time someone is hearing the term is this thread, i doubt they will get much from it Like most wikipedia pages on anything logic-related beyond basic calculus, it's so mired in unexplained, terse terminology that it's incredibly difficult to parse. Like the first mention of a polytype is here: quote:A function with polytype \forall \alpha . \alpha -> \alpha by contrast can map any value of the same type to itself, and the identity function is a value for this type. As another example \forall \alpha . (SET \alpha) -> INT is the type of a function mapping all finite sets to integers. The count of members is a value for this type. Note that qualifiers can only appear top level, i.e. a type \forall \alpha . \alpha -> \forall \alpha . \alpha for instance, is excluded by syntax of types and that monotypes are included in the polytypes, thus a type has the general form blahblahblahblah. Notice where they do not loving once explain what a polytype is. EDIT: They also refer to an example 1 that is not inlined. And their use of latex is making GBS threads. f OO does not have to look like that, FamDav fucked around with this message at 05:49 on Mar 5, 2013 |
# ? Mar 5, 2013 05:44 |
|
https://developer.mozilla.org/en-US/docs/JavaScript/Guide/LiveConnect_Overview im tryin to test this stuff to see if it still works but ugh all this clicking
|
# ? Mar 5, 2013 05:45 |
|
MononcQc posted:Is the dynamic Haskell less or more (or as) powerful depending on when checks happen? How do you define how powerful a language's optional type system is when it relies on some universal type, but less frequently than another one's? Are they to be considered as the same? here i will diverge from harper's view towards my own, since i'm not qualified to speak for him. i think of power as expressivity. by that definition, dynamic languages are strictly more powerful than static ones, since they can express more programs. however, the goal of language design should not merely be to maximize power in this sense, but to balance power with safety. if your programming language allows you to run programs that are clearly wrong, i don't see that as a feature. analogously, power in static type systems is defined by the type language's expressive capability. in a dynamically typed programming language, you cannot express anything statically, so on this view you are powerless. in haskell with an optional dynamic type, you can express a great deal statically, with the dynamic fallback if necessary. so i would consider dynamic haskell to be more powerful than e.g. any p-language JewKiller 3000 fucked around with this message at 05:52 on Mar 5, 2013 |
# ? Mar 5, 2013 05:50 |
|
JewKiller 3000 posted:i don't think that's really true. take facebook as an example, they started with some dirty php code, then needed to scale up. to do this, they first spent a shitload of money on hardware. then, when that wouldn't help anymore, they hired some very expensive developers to write a custom compiler (with jit!) from their busted-rear end php to c++. they also hired up all the "decent" php programmers to fix the code so their custom compiler can handle it efficiently. and facebook is still slow and it sucks. none of this sounds cheap or easy. the beginning part where fuckerberg did a thing was cheap and easy, and the riskiest part of the business because it was his time and money if it wasn't cheap and easy it wouldn't have been done and we'd all be using MySpace or Friendster or Irkutsk or w/e instead and those were way worse than Facebook
|
# ? Mar 5, 2013 05:51 |
|
|
# ? Jun 11, 2024 11:08 |
|
myspace had a value proposition that wasn't just "you know you want it"
|
# ? Mar 5, 2013 05:57 |