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
brap
Aug 23, 2004

Grimey Drawer
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"

Adbot
ADBOT LOVES YOU

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
javascript is a language so bad that using the global scope is a best practice

Sapozhnik
Jan 2, 2005

Nap Ghost

fleshweasel posted:

an interface with static members :psyduck:

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.

Sweeper
Nov 29, 2007
The Joe Buck of Posting
Dinosaur Gum

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.

the old solution where you'd implement interface Foo and your utilities were all static methods like FooUtils.doShit(Foo foo, ...) was much shittier.

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

Notorious b.s.d.
Jan 25, 2003

by Reene

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.

JewKiller 3000
Nov 28, 2006

by Lowtax

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

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

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

HappyHippo
Nov 19, 2003
Do you have an Air Miles Card?

MALE SHOEGAZE posted:

javascript is a language so bad that using the global scope is a best practice

why is this the best practice?

Sniep
Mar 28, 2004

All I needed was that fatty blunt...



King of Breakfast
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

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror
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

Sniep
Mar 28, 2004

All I needed was that fatty blunt...



King of Breakfast

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)

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
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.

Stringent
Dec 22, 2004


image text goes here

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 :coffeepal:

my homie dhall
Dec 9, 2010

honey, oh please, it's just a machine

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.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
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.

the talent deficit
Dec 20, 2003

self-deprecation is a very british trait, and problems can arise when the british attempt to do so with a foreign culture





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".

Java's compiler is written in Java. I'm not aware of Erlang's implementation.

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?

MeruFM
Jul 27, 2010

the talent deficit posted:

bootstrapped with prolog,

wow what. i didn't know you could write anything with prolog

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

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".

Java's compiler is written in Java. I'm not aware of Erlang's implementation.

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

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
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.

ahmeni
May 1, 2005

It's one continuous form where hardware and software function in perfect unison, creating a new generation of iPhone that's better by any measure.
Grimey Drawer
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

cowboy beepboop
Feb 24, 2001

Suspicious Dish posted:

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.

rust was bootstrapped in ocaml. thanks, ocaml.

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
haxe is written in ocaml specifically to discourage people from working on it it worked

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
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)

Cybernetic Vermin
Apr 18, 2005

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

qntm
Jun 17, 2009
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 :psyduck:

and that's python 2, not 3

Workaday Wizard
Oct 23, 2009

by Pragmatica
distribution/packaging/installation will forever be a bitch cuz :worksonmymachine:

Malcolm XML
Aug 8, 2009

I always knew it would end like this.
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

gonadic io
Feb 16, 2011

>>=

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

see pipes 6 type params

see lens 8 type params

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

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

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

see pipes 6 type params

see lens 8 type params

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

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

Malcolm XML posted:

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
how else would i make the elephant wiggle his trunk

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

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

Malcolm XML
Aug 8, 2009

I always knew it would end like this.
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!!!!

fritz
Jul 26, 2003

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

fritz
Jul 26, 2003

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

Vanadium
Jan 8, 2005

Starting to think the interesting bit isn't whether they have a self-hosting compiler, but what lang they used to bootstrap it

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

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

like eigen in c++

but huge laffo if they're rewriting all that fortran

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

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

Malcolm XML posted:

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

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

MononcQc
May 29, 2007

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:
- concurrent processes
- selective message passing
- process groups
- error signaling and trapping mechanism based on process groups
- in line prolog code
- time slices
- round robin scheduling
- tracing interprocess messages
- debugging individual processes
- I/O to virtual channels (Ports)
All of which took approximately 1100 lines of Prolog code.

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

pointers
Sep 4, 2008

MeruFM posted:

wow what. i didn't know you could write anything with prolog
i dare you to say that to tef

Adbot
ADBOT LOVES YOU

fritz
Jul 26, 2003

Malcolm XML posted:

FWIW Eigen doesn't wrap lapack

it also doesn't parallelize at all, though it's single thread perf is great

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.

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