|
I have been reading a book called "Javascript: The Good Parts" and every time I mention this to a coworker they say "must be a pretty short book heh"
|
# ? Sep 11, 2014 03:41 |
|
|
# ? May 31, 2024 04:47 |
|
javascript is a language so bad that using the global scope is a best practice
|
# ? Sep 11, 2014 03:43 |
|
fleshweasel posted:an interface with static members Makes a great deal of sense actually; implement the core functionality of an interface, get a bunch of utility methods for free. And it's an interface instead of a base class so you get true mixin-style functionality without having to consume your one and only "parent class" slot. All the good parts of multiple inheritance with none of the bad. the old solution where you'd implement interface Foo and your utilities were all static methods like FooUtils.doShit(Foo foo, ...) was much shittier.
|
# ? Sep 11, 2014 03:50 |
|
Mr Dog posted:Makes a great deal of sense actually; implement the core functionality of an interface, get a bunch of utility methods for free. And it's an interface instead of a base class so you get true mixin-style functionality without having to consume your one and only "parent class" slot. All the good parts of multiple inheritance with none of the bad. why can't I have class level methods in interfaces. like I just want to make a class define a static function so I can be lazy. why won't Java let me do this
|
# ? Sep 11, 2014 04:00 |
|
fleshweasel posted:I have been reading a book called "java script: The Good Parts" and every time I mention this to a coworker they say "must be a pretty short book heh" it is a really short book as short as it is, half of the book is appendices detailing the bad parts.
|
# ? Sep 11, 2014 04:07 |
|
MALE SHOEGAZE posted:javascript isn't object oriented it just renamed hash as object correct post. fyi this applies equally to python and ruby and any other p-lang, it's a distinguishing feature
|
# ? Sep 11, 2014 05:28 |
|
MALE SHOEGAZE posted:javascript isn't object oriented it just renamed hash as object it's kinda ironic that using javascript objects as hashtables isn't a pleasant thing
|
# ? Sep 11, 2014 06:08 |
|
MALE SHOEGAZE posted:javascript is a language so bad that using the global scope is a best practice why is this the best practice?
|
# ? Sep 11, 2014 06:26 |
|
anything that is java.*$ is garbage trash designed by committee to allow non-programmers to add to an ecosystem that didn't develop out of products but possibilities, and the possibilities are exhibited in lovely code written by lovely coders who don't get it fully but learned on it because you can teach it to a baby, and now writing "enterprise software" within it when either a web app in a plang or a cpp/objc alternative was really the real solution
|
# ? Sep 11, 2014 06:34 |
|
javascript is a very cool language for making the interface part of applications and it's really good at that. there's really nothing wrong with the language when that's all you're doing with it. but i understand ppl are using it for actual server side stuff now and that is complete nonsense
|
# ? Sep 11, 2014 06:38 |
|
Tiny Bug Child posted:javascript is a very cool language for making the interface part of applications and it's really good at that. there's really nothing wrong with the language when that's all you're doing with it. but i understand ppl are using it for actual server side stuff now and that is complete nonsense or the ever popular, just taking the eclipse source and gutting it and using the complete framework to make an "enterprise" level app that is complete garbage (have seen this)
|
# ? Sep 11, 2014 06:43 |
|
The only serious languages worth using are those which have their own compiler written in them. That's the litmus test. If they don't have that, there's no complex program written in it.
|
# ? Sep 11, 2014 06:55 |
|
Suspicious Dish posted:The only serious languages worth using are those which have their own compiler written in them. That's the litmus test. If they don't have that, there's no complex program written in it. coffeescript finally getting some respect around here
|
# ? Sep 11, 2014 07:09 |
|
Suspicious Dish posted:The only serious languages worth using are those which have their own compiler written in them. That's the litmus test. If they don't have that, there's no complex program written in it. What does this prove? Isn't a compiler mostly just a parser(which some serious languages may not be so good at)? What about Java/Erlang?? legitimately asking, I'm a terrible programmer.
|
# ? Sep 11, 2014 07:11 |
|
Having a complex program like a compiler written in your language means you're actually using your own language, even if it's only a lexer, parser and a compiler. A lot of the ES6 features are just ones that sounded cool, and nobody actually ever used them to see how well they worked. I've tried to use ES6. A lot of the features there are awkward to use or just plain lovely, and when I bring my experience up on es-discuss they just point to the spec and say "look at how cool it is". Java's compiler is written in Java. I'm not aware of Erlang's implementation.
|
# ? Sep 11, 2014 07:59 |
|
Suspicious Dish posted:Having a complex program like a compiler written in your language means you're actually using your own language, even if it's only a lexer, parser and a compiler. A lot of the ES6 features are just ones that sounded cool, and nobody actually ever used them to see how well they worked. I've tried to use ES6. A lot of the features there are awkward to use or just plain lovely, and when I bring my experience up on es-discuss they just point to the spec and say "look at how cool it is". erlang's compiler is written in erlang (it was bootstrapped with prolog, which means it's pretty loving hardcore). didn't mozilla have a javascript compiler written in javascript at some point?
|
# ? Sep 11, 2014 08:12 |
|
the talent deficit posted:bootstrapped with prolog, wow what. i didn't know you could write anything with prolog
|
# ? Sep 11, 2014 08:17 |
|
Suspicious Dish posted:Having a complex program like a compiler written in your language means you're actually using your own language, even if it's only a lexer, parser and a compiler. A lot of the ES6 features are just ones that sounded cool, and nobody actually ever used them to see how well they worked. I've tried to use ES6. A lot of the features there are awkward to use or just plain lovely, and when I bring my experience up on es-discuss they just point to the spec and say "look at how cool it is". yeah but then u get langs like Haskell where the biggest thing is the compiler so every random feature is primarily aimed at compiler writers and making their lives easier I want a haskell designed for the professional programmer as opposed to language researchers is all I'm saying so proper modules and good interfaces and incremental compilation with code completion and poo poo baked into the compiler as opposed to yet another pointless type system extension
|
# ? Sep 11, 2014 08:42 |
|
Yeah, and OCaml is even worse about that. OCaml is a language for writing the OCaml compiler and nothing else. JavaScript has several self-hosting implementations, but none of them are written inside ES6. At one time, Adobe's engineers working on ES4 had ESC which compiled to their bytecode format. ES4 was still pretty crazy, with still lots and lots of R&D. I'm not happy with either ES4 or ES6 at this point.
|
# ? Sep 11, 2014 08:58 |
|
a compiler written in the target language is basically masturbation but it's complex enough to be used as a metric for people with no sense
|
# ? Sep 11, 2014 08:59 |
|
Suspicious Dish posted:Yeah, and OCaml is even worse about that. OCaml is a language for writing the OCaml compiler and nothing else. rust was bootstrapped in ocaml. thanks, ocaml.
|
# ? Sep 11, 2014 09:04 |
|
haxe is written in ocaml specifically to discourage people from working on it it worked
|
# ? Sep 11, 2014 10:20 |
|
at least one version of microsoft's code verifier was written in prolog also. the network interface configuration applet from the windows control panel? c++ gui over a prolog core (or at least in NT 4)
|
# ? Sep 11, 2014 10:23 |
|
MeruFM posted:wow what. i didn't know you could write anything with prolog if you want to write a correct compiler but don't care about performance prolog is something like a 100x gain in productivity. no exaggeration
|
# ? Sep 11, 2014 10:26 |
|
i don't know about requiring a programming language to compile and build itself but when i discovered that npm requires python to install anything i was pretty and that's python 2, not 3
|
# ? Sep 11, 2014 10:33 |
|
distribution/packaging/installation will forever be a bitch cuz :worksonmymachine:
|
# ? Sep 11, 2014 11:53 |
|
the other issue that often haskell programmers are too clever by half and end up making a totally inscrutable solution to a questoon nobody asked see pipes 6 type params see lens 8 type params
|
# ? Sep 11, 2014 11:59 |
|
Malcolm XML posted:the other issue that often haskell programmers are too clever by half and end up making a totally inscrutable solution to a questoon nobody asked i love this stuff. starts with a very reasonable two type params. hmm, i can generalise this! now u have 4. hmm i can generalise this! etc etc
|
# ? Sep 11, 2014 12:04 |
|
Malcolm XML posted:the other issue that often haskell programmers are too clever by half and end up making a totally inscrutable solution to a questoon nobody asked o it's actually only 7 type params type Optical p q f s t a b why yes i truly need 7 degress of freedom
|
# ? Sep 11, 2014 12:06 |
|
Malcolm XML posted:o it's actually only 7 type params
|
# ? Sep 11, 2014 12:11 |
|
AlsoD posted:i love this stuff. starts with a very reasonable two type params. hmm, i can generalise this! now u have 4. hmm i can generalise this! etc etc it's dumb as heck with pipes, since tekmo took a neat little core of unidirectional pipes and stapled 2 extra params for "bidirectional" functionality which is literally impossible to understand yeah i totes want to work out non local transfer of control, that's something humans do well to his credit he did figure out a way to remove at least one type param but still goddamn
|
# ? Sep 11, 2014 12:12 |
|
also i think there's some guy working on a grand unified matrix library but just lol @ a library that attempts to rewrite 40 years of numerical linear algebra Haskell the engineering culture doesnt scale cause the community is focused on clever solutions over maintainable and understandable ones Still, makes for interesting reddit posts!! oh and that one bank that hired haskell devs (stanchart?) apparently has it's own loving haskell compiler think about that they decided that they needed a compiler, for a lang that maybe a few thousand people know, a few hundred know well, and decided to write hudnreds of KLOCS still didnt keep them from getting hit by hundreds of millions in fines!!!!
|
# ? Sep 11, 2014 12:15 |
|
Malcolm XML posted:also i think there's some guy working on a grand unified matrix library but just lol @ a library that attempts to rewrite 40 years of numerical linear algebra idk what this is but lots of languages have matrix libraries that either wrap lapack and blas or implement some partial functionality themselves like eigen in c++ but huge laffo if they're rewriting all that fortran
|
# ? Sep 11, 2014 12:22 |
|
and in fairness if they're doing it to have matrices over other rings, like polynomials or number fields or wever ther yeah youre in a different domain than the numerical stuff
|
# ? Sep 11, 2014 12:27 |
|
Starting to think the interesting bit isn't whether they have a self-hosting compiler, but what lang they used to bootstrap it
|
# ? Sep 11, 2014 12:38 |
|
fritz posted:idk what this is but lots of languages have matrix libraries that either wrap lapack and blas or implement some partial functionality themselves iirc it's the latter wrapping is fine, u always need some kind of nice binding FWIW Eigen doesn't wrap lapack it also doesn't parallelize at all, though it's single thread perf is great
|
# ? Sep 11, 2014 12:46 |
|
Malcolm XML posted:iirc it's the latter but the difference between Eigen and Haskell is that there are many many people working on Eigen, and even then it's not nearly as good as say MKL or LAPACK
|
# ? Sep 11, 2014 12:46 |
|
MeruFM posted:wow what. i didn't know you could write anything with prolog http://www.erlang.se/publications/prac_appl_prolog.pdf This paper shows how they build the first interpreter and whatnot. Eventually moving to a C VM gave the language a 70x speedup or something. quote:this language had the following characteristics: E: quote for the speedup: quote:Having worked out the instruction set and the architecture of the machine the compiler was re-written in Erlang itself and the emulator in C. This version after three total re-writes now runs 70 times faster than the original prolog interpreter. MononcQc fucked around with this message at 15:24 on Sep 11, 2014 |
# ? Sep 11, 2014 15:16 |
|
MeruFM posted:wow what. i didn't know you could write anything with prolog
|
# ? Sep 11, 2014 15:25 |
|
|
# ? May 31, 2024 04:47 |
|
Malcolm XML posted:FWIW Eigen doesn't wrap lapack yeah, but its sparse solvers were good enough when i needed them a few months ago and now im doing fixed point numerical linear algebra on an embedded device. help. i dont wanna write an eigensolver.
|
# ? Sep 11, 2014 16:03 |