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.
 
  • Locked thread
FamDav
Mar 29, 2008
there might be a new post, we just have to post harder to see it

Adbot
ADBOT LOVES YOU

Shaggar
Apr 26, 2006
I made a secret post

cinci zoo sniper
Mar 15, 2013




it was written in good javascript

FlapYoJacks
Feb 12, 2009

Sapozhnik posted:

cool now port the build to meson and groan at how much time you could have saved

Was going to say CMake as well. Either would have been so much better than freaking GNU Make.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
i like gnu make a lot just not as a build tool

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

FamDav posted:

there might be a new post, we just have to post harder to see it


FamDav posted:

there might be a new post, we just have to post harder to see it

should we remake this thread? i feel the bug is fitting but it's getting a little old i guess

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

mystes posted:

Facebook is a company that just relicensed their software that has nothing to do with their business and that they were giving away for free, after adamantly insisting that they would never do so

I saw some posts about this and was completely baffled. why was it such a big deal? if a license is incompatible with your needs then you shrug and move on? if it’s your code you can relicense whenever and however you want? who gives a gently caress???

jony neuemonic
Nov 13, 2009

Sapozhnik posted:

oh, something else:

typescript files have a .ts extension instead of .js, as you'd expect
flow files have a // @flow line instead

reeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee

they pulled this poo poo with jsx as well, their recommendation was use .js and too bad if it causes problems for anyone.

mystes
May 31, 2006

pokeyman posted:

I saw some posts about this and was completely baffled. why was it such a big deal? if a license is incompatible with your needs then you shrug and move on? if it’s your code you can relicense whenever and however you want? who gives a gently caress???
It was technically actually even dumber, because it was the patent license, and Facebook doesn't appear to have patented anything relating to React in the first place. Also, everyone was talking about moving to React clones that would presumably still violate their patents if they had.

In the end, the last straw was apparently a bunch of projects like WordPress announcing that they were going to *gasp* stop using React, after months of arguing on all sides.

OTOH, facebook also added an explicit patent license (exactly the same as the one that everyone had an issue with for React) to GraphQL which they appear to have actually patented for whatever reason, so I guess that was more of an issue except that nobody was worried about that? I guess nobody actually uses GraphQL, though, they just post on the internet about what a game changer it is.

brap
Aug 23, 2004

Grimey Drawer

Sapozhnik posted:

Still undecided on typescript vs flow for this reactjs side-project. I rather wish this rift didn't exist tbh

Flow:
- Written by a bunch of guys who love javascript so much they wrote a type checker for it in ocaml.
- poo poo performance under windows. Supposedly.
- The main IDE is Atom. What the gently caress even is Atom. How do I do anything beyond notepad.exe's capabilities with this goddamn bullshit.
- Yeah you can kind of use it from VSCode but the integration is third-party and really crappy and you have to rip out half of VSCode to make it work so wtf is the point.
- I erroneously wrote "import type * as types from 'whatever'" and this sent it into a crash loop. One crash loop per CPU core, as a matter of fact.
- There are already two incompatible versions in wide use.
- Facebook's whole dev tooling landscape in general is really vertically integrated and keeps wanting to drag in other poo poo of theirs.
+ Works with create-react-app out of the box (misnomer: this is a canned build system for react projects with sane defaults).
+ Facebook is stuck with this poo poo so they have to keep React and Immutable and all their other crap sort-of working with it.
+ Supposedly a stronger type system, and was in fact developed in response to perceived weaknesses in the design and objectives of TS.

TypeScript:
- Not a first-party solution: poo poo will break and I have to hope that people will be entertained by the process of fixing it.
- Don't know the details but the type system has impedance mismatches with Redux and Immutable.js. See above.
- Supposedly has a weaker type system than Flow.
+ I can edit it from VSCode and VSCode doesn't make me want to punch somebody
+ Has first-party support from redux-saga.
+ Has wider first-party support in general. Like there's a Protobuf library that emits TypeScript stubs, no such luck for Flow.

Honestly my main problem with Flow is that I really hate Atom from what little I've seen of it.

I wouldn't use languages invented by facebook unless I worked for facebook. they don't give a poo poo about the anyone's use case outside the company whereas microsoft does. the maintainers of @types are also pretty good at keeping definitions up to date when new versions of major libraries come out.

typescript is not about being a formally sound type checker. they carefully choose to allow certain gaps in order to function with the reality of how people write js code and their expectations in practice. they went a little too far with the c#-ey "null can be assigned to anything lol" early on and now the strict mode has fixed it and is where 99% of people wanna be.

fwiw, you can very easily get by in react without an immutable data structures library simply by using the spread syntax to for instance add a [newElement, ...originalList] or { newKey: newValue, ...originalObject}. I'm optimistic that the recent "mapped types" feature (e.g. a keyof MyType meta-type which is basically a set of strings) has enabled a much better experience with immutable.js though, and if you try it, please let us know your experience.

brap fucked around with this message at 20:54 on Oct 8, 2017

Shaggar
Apr 26, 2006
also typescript is the closest thing to a firstparty javascript thing you can get.

Sapozhnik
Jan 2, 2005

Nap Ghost

fleshweasel posted:

I wouldn't use languages invented by facebook unless I worked for facebook. they don't give a poo poo about the anyone's use case outside the company whereas microsoft does. the maintainers of @types are also pretty good at keeping definitions up to date when new versions of major libraries come out.

typescript is not about being a formally sound type checker. they carefully choose to allow certain gaps in order to function with the reality of how people write js code and their expectations in practice.

fwiw, you can very easily get by in react without an immutable data structures library simply by using the spread syntax to for instance add a [newElement, ...originalList] or { newKey: newValue, ...originalObject}. I'm optimistic that the recent "mapped types" feature (e.g. a keyof MyType meta-type which is basically a set of strings) has enabled a much better experience with immutable.js though, and if you try it, please let us know your experience.

who's "us", are you a member of the dev team?

and i do use spread syntax often in my react code yeah. though i'm still fairly new at this new-fangled modern javascript thing. tbh i don't actually use immutablejs much, i made a memoizing version of the redux-saga call() effect that uses an immutable map keyed by immutable lists to maintain its cache and that's about it.

i guess i'll stick with typescript and deal with the integration warts then. i'm just wary about interacting with a library developed by Group A via a condom written by Group B because 10/10 times that's a recipe for pain. whether that's "stubbed toe" pain or "dental abscess" pain remains to be seen.

brap
Aug 23, 2004

Grimey Drawer
us is tps thread

Notorious b.s.d.
Jan 25, 2003

by Reene

Sapozhnik posted:

elisp is poo poo and vimscript is double dog hypershit. atom is unironically a potentially better editor than both emacs and vim because it's built on top of javascript. yes, javascript is bad, but enough developers are stuck in this loveless marriage that the developer community is forced to somehow make javascript itself work.

modern editors are a text entry widget bolted on to a programming language, in much the same way that an A10 is an enormous gun that somebody mounted a plane onto. the choice of underlying language is crucial.

what makes emacs + elisp better than atom + js is that there's already tens of millions of lines of pre-existing code to glue emacs to everything you could ever need. to use atom for something useful you have to reinvent the wheel three times before breakfast

granted, elisp is poo poo, but it's no worse than js.

cinci zoo sniper
Mar 15, 2013




Notorious b.s.d. posted:

what makes emacs + elisp better than atom + js is that there's already tens of millions of lines of pre-existing code to glue emacs to everything you could ever need. to use atom for something useful you have to reinvent the wheel three times before breakfast

granted, elisp is poo poo, but it's no worse than js.

atom has like twice the number of packages emacs does since every stereotypical web developer uses it. granted, the focus is not as "do anything" as emacs tends to be about, but no one reasonable cares about bootstrapping a single tool into everything. before you start clamoring about "everything, and the best!!!!" for the n-thillion time, please do show me how to use pycharm's debugger from emacs

Notorious b.s.d.
Jan 25, 2003

by Reene

cinci zoo sniper posted:

atom has like twice the number of packages emacs does since every stereotypical web developer uses it. granted, the focus is not as "do anything" as emacs tends to be about, but no one reasonable cares about bootstrapping a single tool into everything. before you start clamoring about "everything, and the best!!!!" for the n-thillion time, please do show me how to use pycharm's debugger from emacs

python integrates with pdb, not pycharm

it's fairly amusing that atom requires a second, better IDE to be installed in order to get debugger support for python

cinci zoo sniper
Mar 15, 2013




Notorious b.s.d. posted:

python integrates with pdb, not pycharm

it's fairly amusing that atom requires a second, better IDE to be installed in order to get debugger support for python

it's fairly amusing to read someone not knowing poo poo they argue about this much

anyways:

1) i have no loving idea why you apparently think i use atom
2) pycharm is a complete ide (best in class in fact), and does neither need, nor can be run from under atom, a text editor with coat of drying up diarrhoea
3) pycharm does not use pdb. pdb (much like pydbgr, pudb, ipdb) is woefully incompetent compared to pycharm's pydev.debugger, which is a highly customised fork of the original pydev's debugger

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
I should check out pycharm again someday

cinci zoo sniper
Mar 15, 2013




Symbolic Butt posted:

I should check out pycharm again someday

its great, and community edition is both free and can be used commercially (if costs/use are something holding you back). you need professional edition, primarily, if you want to cython things up or if you are working with web stuff (like 90% of professional edition features are all the web frameworks, x-compatibility with other web shite, databases, and remote development)

Notorious b.s.d.
Jan 25, 2003

by Reene

cinci zoo sniper posted:

it's fairly amusing to read someone not knowing poo poo they argue about this much

anyways:

1) i have no loving idea why you apparently think i use atom
2) pycharm is a complete ide (best in class in fact), and does neither need, nor can be run from under atom, a text editor with coat of drying up diarrhoea
3) pycharm does not use pdb. pdb (much like pydbgr, pudb, ipdb) is woefully incompetent compared to pycharm's pydev.debugger, which is a highly customised fork of the original pydev's debugger

pycharm is a good and cool ide and i'm not knocking it

it's atom users who are dumb and should be using emacs

cinci zoo sniper
Mar 15, 2013




Notorious b.s.d. posted:

pycharm is a good and cool ide and i'm not knocking it

it's atom users who are dumb and should be using emacs

atom is bad but solution is not to go back to the prohibition era programming tools

mystes
May 31, 2006

Notorious b.s.d. posted:

it's atom users who are dumb and should be using vs code

TOO SCSI FOR MY CAT
Oct 12, 2008

this is what happens when you take UI design away from engineers and give it to a bunch of hipster art student "designers"

mystes posted:

Facebook is a company that just relicensed their software that has nothing to do with their business and that they were giving away for free, after adamantly insisting that they would never do so, just because the idea that some people on the internet who generate no money for Facebook might stop using it bruised their ego as elite programmers. I'm sure the announcement that they're deprecating Flow in favor of TypeScript will come any minute now.

(They also have a pointless different fork of Ocaml that appears to exist purely due to bikeshedding and NIH syndrome.)
Facebook open-sourced Thrift, donated it to the Apache foundation, and then a few years later open-sourced a different version as FBThrift.

cinci zoo sniper
Mar 15, 2013




TOO SCSI FOR MY CAT posted:

Facebook open-sourced Thrift, donated it to the Apache foundation, and then a few years later open-sourced a different version as FBThrift.

let me find that facebook mobile app code breakdown thing, one sec

anthonypants
May 6, 2007

by Nyc_Tattoo
Dinosaur Gum

cinci zoo sniper posted:

let me find that facebook mobile app code breakdown thing, one sec
while you're at it can you find the one where facebook and android worked together so the facebook app could use way too much memory on android

akadajet
Sep 14, 2003

mystes posted:

If your reason for using typescript is that you need an es.next to es5 transpiler, then yes typescript is probably unnecessary.

No. I mean that javascript doesn't need static type checking. It works just fine without it.

TOO SCSI FOR MY CAT
Oct 12, 2008

this is what happens when you take UI design away from engineers and give it to a bunch of hipster art student "designers"

anthonypants posted:

while you're at it can you find the one where facebook and android worked together so the facebook app could use way too much memory on android
This one? https://www.facebook.com/notes/facebook-engineering/under-the-hood-dalvik-patch-for-facebook-for-android/10151345597798920/

quote:

During standard installation, a program called "dexopt" runs to prepare your app for the specific phone it's being installed on. Dexopt uses a fixed-size buffer (called the "LinearAlloc" buffer) to store information about all of the methods in your app. Recent versions of Android use an 8 or 16 MB buffer, but Froyo and Gingerbread (versions 2.2 and 2.3) only have 5 MB. Because older versions of Android have a relatively small buffer, our large number of methods was exceeding the buffer size and causing dexopt to crash.

That's when we had the idea of using a JNI extension to replace the existing buffer with a larger one.

cinci zoo sniper
Mar 15, 2013




anthonypants posted:

while you're at it can you find the one where facebook and android worked together so the facebook app could use way too much memory on android

http://blog.timac.org/?tag=facebook here's that one (i think its that one, i dont have link saved anywhere but the breakdown images and 20% bloat look familiar)

not heard of the facebook android thing, so let me look it up now i guess

Flat Daddy
Dec 3, 2014

by Nyc_Tattoo
the only issue I experience w redux and ts in my setup is just that I manually have to look at my types for my mapDispatchToProps objects and make sure they match with my container event prop types

otherwise my experience with TS has been perfect. at the worst a tiny lib will be missing types or I can't express what I want and I slap an 'any' type on it. then worse comes to worst I get a runtime type error and know immediately where the problem probably is

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

cinci zoo sniper posted:

atom is bad but solution is not to go back to the prohibition era programming tools

so that's why keyboards for vim nerds sound like tommy guns

cinci zoo sniper
Mar 15, 2013





:psyduck:

i mean, its impressive, but wow, just wow

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

Notorious b.s.d. posted:

how long is it gonna take y’all to learn emacs is the one true path

it's not, the Genera Dynamic Listener is along with Zmacs

eschaton fucked around with this message at 00:45 on Oct 9, 2017

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

Notorious b.s.d. posted:

granted, elisp is poo poo, but it’s no worse than js.

elisp, despite being poo poo, is actually way better than JavaScript

still would be nice if it GNU emacs had switched to Common Lisp and basically become GNU Common Lisp plus an editor, but what can you do

Sapozhnik
Jan 2, 2005

Nap Ghost
still paralyzed by indecision lol

i've done a complete and utter 180 on the file extension thing in the space of like 2hrs because there's a whole bunch of poo poo like jsx or es2015 or type annotations that you can mix and match into your toolchain and you're not going to stick all those things into the file extension

flow is also strictly just a type checker. there is a completely separate babel plugin that just strips out all the type annotations without checking them. and you slot that in amongst all the other babel plugins that implement jsx, transpile es2017 down to es5, do the css import magic, etc etc. this feels very right on a fundamental level.

typescript is a transpiler, and you then feed its output into another transpiler (babel). ts has a lot of overlap with what babel does but babel is a lot more powerful. this seems strictly worse than the way that flow does its thing and it bugs the crap out of me.

e: oh and i got it to compile and something went wrong at runtime but it spit out a backtrace showing the typescript-transpiled code instead of my typescript code. naaaa gently caress this, flow it is. i'll hold my nose and deal with atom i guess. urgh.

Sapozhnik fucked around with this message at 01:32 on Oct 9, 2017

MrMoo
Sep 14, 2000

I force TS to use 'sourceMap':true files generated by the compiler via tsconfig.json.
JavaScript code:
require('source-map-support').install();
It's ugly but works and saves adding junk on the command line.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

MALE SHOEGAZE posted:

should we remake this thread? i feel the bug is fitting but it's getting a little old i guess

Yes, I appreciate the irony but it also breaks Awful.apk.

Gul Banana
Nov 28, 2003

Sapozhnik posted:

still paralyzed by indecision lol

i've done a complete and utter 180 on the file extension thing in the space of like 2hrs because there's a whole bunch of poo poo like jsx or es2015 or type annotations that you can mix and match into your toolchain and you're not going to stick all those things into the file extension

flow is also strictly just a type checker. there is a completely separate babel plugin that just strips out all the type annotations without checking them. and you slot that in amongst all the other babel plugins that implement jsx, transpile es2017 down to es5, do the css import magic, etc etc. this feels very right on a fundamental level.

typescript is a transpiler, and you then feed its output into another transpiler (babel). ts has a lot of overlap with what babel does but babel is a lot more powerful. this seems strictly worse than the way that flow does its thing and it bugs the crap out of me.

e: oh and i got it to compile and something went wrong at runtime but it spit out a backtrace showing the typescript-transpiled code instead of my typescript code. naaaa gently caress this, flow it is. i'll hold my nose and deal with atom i guess. urgh.

i view this as an vital advantage for typescript because it means you DON’T have to use babel, or in fact use npm at all. also, turn on sourcemaps in your tsconfig.json

Gul Banana
Nov 28, 2003

the last time i used babel for something it installed literally one hundred thousand files in node_modules and required me to write three separate config files.

anthonypants
May 6, 2007

by Nyc_Tattoo
Dinosaur Gum

Gul Banana posted:

the last time i used babel for something it installed literally one hundred thousand files in node_modules and required me to write three separate config files.
for something named babel that sounds pretty accurate

Adbot
ADBOT LOVES YOU

akadajet
Sep 14, 2003

[quote="“Gul Banana”" post="“477194136”"]
the last time i used babel for something it installed literally one hundred thousand files in node_modules and required me to write three separate config files.
[/quote]

you hosed up hard

  • Locked thread