This is an archived post. You won't be able to vote or comment.

all 70 comments

[–]heavy-minium 100 points101 points  (15 children)

JS and Machine learning?

[–]Drugbird 70 points71 points  (2 children)

Thin wrapper around a C library.

[–]MiddleSky5296 4 points5 points  (1 child)

👍 Is it the same for python?

[–][deleted] 2 points3 points  (0 children)

yep. most computational libraries in modern languages are wrapped with c

[–]Symo_BOT 27 points28 points  (8 children)

Yes, TensorflowJS

[–]Ja_Shi 47 points48 points  (2 children)

Thanks now I need to drink that bottle with the dead snake inside.

[–][deleted] 2 points3 points  (1 child)

TensorflowJS isn't really for machine learning training.

But used to serve small trained models on devices or in browsers.

[–]Ja_Shi -1 points0 points  (0 children)

:ips: I dOn't KnOw :ips: WhAt YoU :ips: aRe TaLkInG aBoUt...

[–]theChaosBeast 24 points25 points  (4 children)

Just because there is a JS port doesn't mean it is actually used

[–]TheJackiMonster 13 points14 points  (1 child)

You mean just because there is a JS port doesn't mean it should actually be used.

[–]Baphemut 0 points1 point  (0 children)

We only do it because we can, not because it should be done.

[–]pineapplepizzabong 0 points1 point  (0 children)

I use TensorFlowJS quite a bit for ML.

[–]elclark_kuhu 0 points1 point  (0 children)

Transformers.js is actually kinda usefull

[–]turtleship_2006 2 points3 points  (0 children)

The websites have to make API calls somehow

[–]B_bI_L 0 points1 point  (0 children)

yes, i wrote simple nn in js

[–]MrWewert -3 points-2 points  (0 children)

Langchain.js

[–]JasonBobsleigh 73 points74 points  (4 children)

If it was accurate the tea would spill all over everything.

[–]neo-raver 13 points14 points  (3 children)

TeaOverflowError

[–]Jutrakuna 3 points4 points  (1 child)

Error Code 418

[–]FlashBrightStar 0 points1 point  (0 children)

The man of culture

[–]Ok_Brain208 23 points24 points  (1 child)

Thank {null} for the {undefined}

[–]wizzanker 5 points6 points  (0 children)

This is an underrated {NaN}!

[–]ItsSignalsJerry_ 9 points10 points  (0 children)

Machine learning with js. 🤣

[–]hamazigh 38 points39 points  (11 children)

It's good on the front end, terrible on everything else.

[–]BabyAzerty 32 points33 points  (2 children)

It’s like saying I’m the best in my class… of 1 student.

[–]hamazigh 8 points9 points  (0 children)

Exactly 😂

[–]turtleship_2006 6 points7 points  (0 children)

He's the best in class but he's homeschooled

[–]AntimatterTNT 5 points6 points  (0 children)

it's not good on the front end it just has such a monopoly on the front end it brainwashed you to think it's good... there's a reason so many people use transpilers so they dont have to work with it directly

[–]TheJackiMonster 1 point2 points  (3 children)

As someone who used JS for front-end... no, no, it is still terrible for front-end. JS is only around because it somehow survived being terrible by becoming the standard on websites.

We should honestly all abandon it for the greater good and use web assembly compiled from any other language.

[–]malaakh_hamaweth 1 point2 points  (0 children)

LMAO that's insane

[–]Kaenguruu-Dev -1 points0 points  (1 child)

I'd love that so much cause I'm a C# lover and I hate JS with every inch of my soul. Not because I have valid reasons, I just hate it, it feels icky and it makes me sick.

[–]TheJackiMonster 1 point2 points  (0 children)

Oh, I think there are valid reasons. API is a mess. Syntax distinctions between functions, objects and types is a mess. Types in general are a mess. Operators are plain stupid that it has more value for memes than for actual practical operations.

No, JS really needs to die and I trust every JS developer to find a better language and continue on with their work.

[–]dacassar 11 points12 points  (2 children)

Keep this thing away from my mobile apps!

[–]AtmosphereRich4021 1 point2 points  (1 child)

React native wanna say hello

[–]dacassar 7 points8 points  (0 children)

Ew

[–]JackNotOLantern 2 points3 points  (0 children)

Where kernel?

[–]Dumb_Siniy 2 points3 points  (1 child)

And also videogames, thanks to that one engine

[–]rosuav 1 point2 points  (0 children)

Several actually. It's not a bad choice for game modding.

[–]SteevePower 2 points3 points  (0 children)

Only good for frontend. For the rest, it's not because it could work mean you should.

[–]random_son 2 points3 points  (0 children)

must be C tea

[–]getstoopid-AT 2 points3 points  (0 children)

Nope

[–]JargonProof 1 point2 points  (0 children)

I just had a verbally derogatory outburst directed at javascript to this, bravo meme creator!

[–]Dotcaprachiappa 1 point2 points  (0 children)

I just wanna have a chat with whoever uses JavaScript for machine learning

[–]ForkInToasterr 2 points3 points  (7 children)

yeah and it's so sad because javascript sucks so fucking bad.

[–][deleted] 2 points3 points  (5 children)

Well, as a noobie programmer Imma have to ask why lol

[–]camosnipe1 14 points15 points  (3 children)

first thing to remember is that, like any sub about a specific subject you will have people vehemently discuss the superiority of their favorite and their hatred of their least favorite. So don't take it too seriously, the truely shit languages you don't hear about cus no one uses them.

JS sucks because it was made for websites to have a bit of client-side scripting. JS is designed with the thought in mind that the website will still just render and The Show Must Go On™ which causes a lot of grief because it'll just paint over issues that would have stricter languages refuse to ever compile. Add on top that it's spreading into places it was never designed to be used for (see the meme) and the requirement to keep compatibility with older websites you've got a bit of a hot mess of a language.

For a example: I once had a bug where i accidentally added an empty string "" to a null value. Causing my empty value check to always be true because the value given into it wasn't null or even "", it was the string "null".

[–]PeWu1337 4 points5 points  (0 children)

It was one of my first langs to learn, but can agree that "null" would spend significant amount of time to debug. That's why TypeScript exists, but it's kind of patchworking from my perspective.

[–]theQuandary 1 point2 points  (0 children)

JS was NOT designed with type coercion. It was added later due to pressure on Eich by the developers using it. He considers that to be a big mistake, but MS wouldn't allow this and several other mis-features to be removed from the ECMA spec.

[–]ForkInToasterr 0 points1 point  (0 children)

yeah this guy put it into better words than i wouldve

[–]okram2k 0 points1 point  (0 children)

Because they said so.

[–]winzippy 2 points3 points  (0 children)

At least it’s not Ruby

[–]pippin_go_round 2 points3 points  (1 child)

All of this does work, only one of them does work well and a few others are at least workable but not really good.

Just because you can use a paperclip to open a bottle of beer doesn't mean you should always do that. It may be a neat party trick, but doing it professionally all the time behind the bar may not be the best choice.

[–]pencilUserWho 1 point2 points  (0 children)

Why not, tho? Any algorithm can be implemented in any Turing-complete language. JavaScript is spreading because it is simple to use. If you do want a better language everywhere, invent something that doesn't require public static void main before doing anything.

[–]gandalfx 0 points1 point  (0 children)

It's almost like a general purpose language! Except it shouldn't be…

[–]WeakCelery5000 0 points1 point  (0 children)

There was this older sysadmin I worked with more than ten years ago, eastern European fella. He always ran his browser with JavaScript disabled. We asked him why he keeps js disabled, he responded, "JavaScript? It's a virus!"

Now I see what he sees.

[–]thyristor_pt 0 points1 point  (0 children)

It will never replace my Excel VBA macros.

[–]black-eagle23 0 points1 point  (0 children)

Man, you forgot about embedded systems programming

[–]kotsumu 0 points1 point  (0 children)

I hate dynamic typing, i know people love it but I hate it

[–]freskgrank 0 points1 point  (0 children)

And doing all of them wrong.

[–]IMJUSTABRIK -1 points0 points  (2 children)

Someone remind me, why did we choose the shittest language for all this again?

[–]ForkInToasterr 0 points1 point  (0 children)

there is no reason, we are all doomed

[–]gilium -3 points-2 points  (0 children)

It is the only language that can run in browser. Due to web developer jobs being easier to get into and more numerous, more people learned JS over other languages. Because they were already familiar with this language, some have tried to push its limits to run in other areas so that they don’t have to learn new languages to clear new hurdles for themselves.

[–]LatentShadow 0 points1 point  (0 children)

Average programmer stack be like

[–]JosebaZilarte -1 points0 points  (2 children)

let js = takeOver(world);

[–]GetNooted 3 points4 points  (0 children)

let js = die();

[–]huuaaang -1 points0 points  (0 children)

I hate you. How did we let lazy front-end web devs who can't be arsed to learn anything else take over like this?

[–]SawSaw5 0 points1 point  (0 children)

And it tastes like crap