ec changed the topic of #elliottcable to: a 𝕯𝖊𝖓 𝖔𝖋 𝕯𝖊𝖙𝖊𝖗𝖒𝖎𝖓𝖊𝖉 𝕯𝖆𝖒𝖘𝖊𝖑𝖘 slash s͔̞u͕͙p͙͓e̜̺r̼̦i̼̜o̖̬r̙̙ c̝͉ụ̧͘ḷ̡͙ţ͓̀ || #ELLIOTTCABLE is not about ELLIOTTCABLE
Sgeo has quit [Read error: Connection reset by peer]
Sgeo has joined #elliottcable
<ec>
Welp finally got fired
<jfhbrook>
ouch
<jfhbrook>
what happened?
<ec>
MylesBorins: what the hell is this blasphemy
<ec>
(like two weeks later lol oops@
<jfhbrook>
lmao
alexgordon has joined #elliottcable
<ec>
jfhbrook: i'm a very bad software developer and don't deserve to be employed ¯\_(ツ)_/¯
<ec>
literally just started talking for the first time in weeks :P
<alexgordon>
ec: wanna help me download wiktionary?
<alexgordon>
lolol
<ec>
haha what
<ec>
also wordnik > wiktionary
<jfhbrook>
I had a doc a few weeks ago that was fairly insistent that I had ADHD
<jfhbrook>
and uh
<alexgordon>
this is for langs other than english tho
<jfhbrook>
I did the research and it checks out
<ec>
jfhbrook: congrats
<jfhbrook>
hah!
<ec>
now good luck getting the drugs you desperately need for t
<jfhbrook>
yeah I mean
<ec>
llololol
<jfhbrook>
I have a bag of "amphetamine salts" now
<jfhbrook>
and directions - I'm gonna take one when I leave work and yeah
<jfhbrook>
ugh frick >_< I met someone at a bar on friday and I gave myself a deadline of 2:00pm today to send her a follow-up text
<jfhbrook>
and that's in like 20 minutes and >_< I hate this part
<ec>
a cute unit
<ec>
or like a rando new friend
<jfhbrook>
anyway - yeah, adderall script now
<ec>
well lol jelly
<jfhbrook>
a cute girl, yeah
<ec>
my beloved-and-very-skilled shrink told me years ago that I should be on the stuff
<jfhbrook>
she just kinda started talking to me and the friends we were with mutually winged in hard and we ended up smoking weed at my place at like 2am
<ec>
and I've a litany of prescribing MDs who are basically like “Yeah you're making all your problems up you're just a druggie”
<jfhbrook>
super not what my plan was that night, was gonna have a few beers and go home early and chill
<jfhbrook>
but she was cute
<alexgordon>
omg you met a GIRL at a BAR
<jfhbrook>
yeah ec I know that feel, I skipped my reg pdoc cause of this
<jfhbrook>
why you hating alexgordon :( I date maybe one person a year hah
<ec>
at least in my circle, the experience seems to be "ADHD was over-prescribed when we were kids, so the pendulum effect is now screwing all of those of us who're diagnosed as adults with inaccess to important drugs" -_-
<alexgordon>
nah I'm not hating
<alexgordon>
not hating ur dating
<ec>
jfhbrook: are you male/straight?
<jfhbrook>
yeah ec I kinda self-owned myself here
<jfhbrook>
yeah ec cishet
<ec>
how did I not know that lmao
<ec>
are you mono too?
<jfhbrook>
yeah, at least so far
<jfhbrook>
I like
<jfhbrook>
a lot of my friends are poly and/or queer and in a lot of ways dating seems way healthier for them
<alexgordon>
ec: I mean afaik america is pretty unique in the way it treats adhd with drugs
<ec>
omg you might be my only male monoheteromantic friend
<alexgordon>
although I could believe ANYONE had adhd it would be you
<alexgordon>
*if
<alexgordon>
I mean... yeah
<jfhbrook>
ahaha
<jfhbrook>
the doc also said I need to do a paleo diet
<jfhbrook>
so I'm giving it a shot
<alexgordon>
paleo omg
<jfhbrook>
I got a "paleo bowl" from chipotle
<ec>
ugh I've gained so much weight since I stopped doing keto regularly
<ec>
I'm over 200lbs for the first time in my entire life as of a couple days ago
<jfhbrook>
so a bowl w/ no rice + guac
<jfhbrook>
damn
<alexgordon>
did your doctor get his degree from bodybuilding.com?
<ec>
it's a bad time lmao.
<jfhbrook>
I've always been over 200
<jfhbrook>
I think my doc doesn't care too much about the specific flavor of lo-carb
<jfhbrook>
just wants me to stop eating so much bread and rice
<ec>
savory carbs are the One True Food ;_;
<alexgordon>
bread and rice is good for you!
<jfhbrook>
I'm gonna miss mac and cheese
<alexgordon>
low carb diets make me so angry lol
<ec>
what lol
<ec>
ugh I'm off y'all, back to reading the OCaml compiler
<jfhbrook>
seeya o/
<alexgordon>
literally everybody in the world eats high carb diets
<ec>
relatedly CHECK OUT HOW WELL-DOCUMENTED THIS STUFF IS, HOLY CRAP:
<jfhbrook>
I just don't want this doctor throwing shade at me all the time haha
<jfhbrook>
she wants me off my sleep med too
<jfhbrook>
I'm wondering if a low level of adderall will help with that
<alexgordon>
your doctor is weird haha
<alexgordon>
ec: so what are you gonna do now that you have been manumitted?
<ljharb>
ec: not only
<ljharb>
ec: i breed too
<ec>
ljharb: wat
<ljharb>
second baby was born Friday
<ec>
omg congrats, but also, horrifying
<ljharb>
both home births, so i was really in the mix
<jfhbrook>
congrats, but harrowing!!
<jfhbrook>
nah the sleep med makes sense
<alexgordon>
tc39 has gained a new member
<ec>
hahahaha
<jfhbrook>
I don't sleep well probably because of ADHD and my pdoc's response was to load me up on trazodone
<ec>
o god tzd
<ec>
unsubscribe unsubscribe
<jfhbrook>
doc thinks it's making me fat
<jfhbrook>
I think it's treating the symptom and not the cause
<ljharb>
trazodone made me sleep like a coma sleep, i only took it once
<ljharb>
Wellbutrin, tho, that’s a horror drug
<jfhbrook>
for me it's like tranquilizing an elephant
<jfhbrook>
strong drugs (I take 200mg) but my mind is screaming so much it like barely works for like 4 hours
<alexgordon>
the only drugs I have taken since I was born is like antibiotics and paracetamol lol
<jfhbrook>
I have a pretty serious drug cabinet at this stage in my life
<ljharb>
what’s paracetamol
<jfhbrook>
tylenol
<alexgordon>
acetaminophren or whatever you call it
<jfhbrook>
acetaminophen yeah
* alexgordon
cannot say that word
<ljharb>
ah ok yeah
<ljharb>
surely you’ve had ibuprofen
<alexgordon>
yeah sometimes but I try to avoid it
<ljharb>
and Sudafed is the shit
<ljharb>
if they ever make that fully illegal i will straight riot in the streets
<jfhbrook>
yeah fake sudafed is bad
<alexgordon>
haha yeah you can still buy it here but they keep it locked up
<alexgordon>
I have never taken it though
<jfhbrook>
it's not interesting psychoactively
<jfhbrook>
does a great job at decongesting though
<jfhbrook>
swear by it for colds
<jfhbrook>
though this doc said the pro move for me would be claratin d
<jfhbrook>
apparently good for my asthma too!
<jfhbrook>
(which is why I saw this doc in the first place)
<ec>
gimme that claritin Ddddd :d
<alexgordon>
ec wants the d
<ec>
alexgordon: are you using exclusively OCaml yet? :P
<alexgordon>
nope but I am exclusively using typescript
<alexgordon>
except for python whenever I have to do anything mathematical
<alexgordon>
I wish they would get operator overloading in JS and port numpy so I can dump Python forever
<alexgordon>
alas the kids are afraid of that shit
<ec>
typescript ugh
<ec>
I was pretty pro-typescript for a while, but recently I've been changing my tune
<ec>
Reason, dude! Get on my ML level!!
<alexgordon>
don't go all hipster, ec. TypeScript is awesome
<alexgordon>
just turn all the strictness settings up to 11
<alexgordon>
typescript's type system can do stuff that even ocaml's cannot
<ec>
not hipster, it's good and pure and strong and old :P
<ljharb>
lol i asked the pharmacist once and it turns out the reason you have to show your ID is ofc because they cap the number you can buy - the limit is TWO HUNDRED boxes a month
<ec>
lol vice versa
<ec>
typescript's type system can do things because it's *unsound*, even when you try and make it as sound as possible
<ec>
very directly, typescript's biggest strength is when you *don't* enable all the strictness stuff.
<alexgordon>
yeah they're just different, it's not one better than the other. like typescript's literal types are great and really useful
<alexgordon>
I disagree
<ec>
Gradual typing? If you have a giant codebase, and can't afford the time to fully rewrite/refactor? That's the shit! I'm into it. And proud.
<ec>
But for any other use case, don't start with the intentionally-broken-specifically-to-enable-that-usecase tool, good lord.
<ec>
no, definitely wrong dude. One is definitely, provably, objectively better — it's not a flavour thing, it's like, *a different thing*. One space is completely subsumed into the other.
<ec>
ugh have this argument later when I'm in a better mood lmao, can't multitask *and* empathise *and* sell you on a good tool. loveyoulotsbackinabit
<alexgordon>
how do you write this in ocaml? type X = 10|20|30;
<ljharb>
wait why would you use types at all without maximal strictness
<alexgordon>
typescript's type system has some ridiculous capabilities, don't think that just because it's meant for javascript that it's somehow inferior
<ec>
ljharb: gradual typing, of course
<jfhbrook>
some strictness seems better than no strictness and maximal strictness sounds like it would require a lotta brain cycles
<ec>
large codebases or reluctant coworkers, or worst of all, reluctant managers
<alexgordon>
fact is typescript is really well funded and it gets new type system features at a faster rate than most other languages
<jfhbrook>
I have a project I think I'm gonna try to do if this adderall does the trick
Sgeo has quit [Quit: Leaving]
<alexgordon>
jfhbrook: nah it's fine I run using maximal strictness and it saves time
<ec>
jfhbrook: yes, if C++ or Scala or something. No, if it's an HM language like the MLs or Haskell (well, theoretically. Haskell throws all that out.)
<jfhbrook>
like I have a long history of having good ideas for projects and then not following through
Sgeo has joined #elliottcable
<jfhbrook>
yeah static typing is a skill I haven't worked out that well
<alexgordon>
the real advantage of typescript's type system is the granularity is better than any other language other than maybe the dependently typed languages
<ljharb>
ec: gradual is fie
<ljharb>
fine
<ljharb>
but that’s what “any” or “unknown” is for
<jfhbrook>
oh but the project I wanna work on
<jfhbrook>
I wanna make a browser extension that removes utms from clickable links
<ljharb>
and if people are reluctant you shouldn’t have any types in the first place :-) get buyin first
<jfhbrook>
we use flow at work
<jfhbrook>
I think they regret that technical decision
<alexgordon>
yeah flow is dead
<ec>
flow is objectively better
<ec>
but unfortunately dying.
<alexgordon>
and dead
<jfhbrook>
but yeah I wanna do that shit w/ CRA + typescript/tsx + hacking some shit up
<alexgordon>
the thing about having strict types is that, while it takes time to write the types, it saves time because you write less bugs and you get better autocompletion
<jfhbrook>
I use no-plugins vim tho
<ec>
it goes ML > Flow > TypeScript, in terms of "arguable goodness"; but TypeScript > ML > ... anything else > Flow in terms of "what I'd try and sell to my boss"
<alexgordon>
I realised that for years I avoided statically typed languages not because they were too strict, but because the granularity was super bad
<ec>
<+ljharb> and if people are reluctant you shouldn’t have any types in the first place :-) get buyin first
<ec>
strong disagree.
<ec>
that's like saying "Make sure everybody wants tests, before you try and start writing tests"
<ec>
nowadays, I think strong typing, like tests, are *non-optional* for some problems (most, perhaps? but only barely? let's say 60 percent.)
<ec>
and if your team-members or collaborators don't like that, well, educate them. Find the tools and methods and improvements that *demonstrate the benefits* to them, don't just brush them off, but also don't allow taste to get in the way of good SE praxis.
<jfhbrook>
I need to learn how to mypy better
<jfhbrook>
my projects don't use it but my coworker mike uses them a lot
<ec>
help them set up their editor. Show them how cool HM languages are, and how using a language with strong inference is *nothing* like whatever-bad-experience they had years ago that one time with C++ or something.
<ec>
but don't just be like “eh it's just like semicolons, do whatever the most people like and don't worry about it.”
<ec>
die on that fucking hill.
<alexgordon>
static typing was always non-optional for projects with a lot of developers. What has happened is that the N for how many developers have to have in a project before static typing is required has dropped to 1 because of better languages and tooling
<jfhbrook>
so like
<ec>
hahahahah alexgordon
<jfhbrook>
I think static typing is a great tool
<jfhbrook>
but
<jfhbrook>
people have managed to ship large non-annotated dynamically-typed codebases for a while
<ec>
so dynamism is great for prototyping and exploring ideas and shit.
<ec>
I disagree that "number of developers" is an important metric here.
<alexgordon>
like it's been true for ever that if you have 100 people working on one codebase you _need_ static typing
<ec>
I think "estimated time until a complete-rewrite refactor" is a much better one.
<ec>
Is that code being written by one single person, but is likely to go unrefactored and unaddressed for two fucking goddamn years, or even more? please type that, please test that, for gods' sake.
<alexgordon>
well no it's about communication
<alexgordon>
types are a form of communication, both with other developers, and with yourself
<ec>
Is the code being written by a team of N, but it's only to POC out the concept and explore the problem-space? Are they already planning to throw it away and write it 'properly' (… ‘in a typed language’) within a couple of months? Cool, write it in whatever's fastest and funnest and motivates them.
<alexgordon>
but for me, it's faster to write code in typescript than javascript now
<alexgordon>
because the autocompletion
<ec>
jfhbrook: people also wrote very large pieces of software, successfully, in ISO C. :P
<ec>
doesn't mean you should start new projects in it, or implicitly enable juniors by staying silent when they think it's a good idea to write software in it.
<alexgordon>
I have basically stopped using plain JS except for legacy stuff
<ec>
alexgordon: next up, Reason :P
<alexgordon>
when reason grows a dependent type system :P
<ec>
very close, actually! but also very unnecessary for almost all development. Even when it lands, it'll be a *terrible* idea to use it for the vast majority of software constructs.
<ljharb>
ec: yes, if anyone doesn’t want tests, persuade or fire them before writing any :-)
<ec>
Just like OO, just like exceptional control-flow, it's mostly a code-smell.
<alexgordon>
I don't consider TS -> Reason to be an upgrade, type system feature wise
<ec>
wow, relatedly, it's so sad to realize that people think Reason is *hipster*
<ljharb>
I find types severely optional, ftr
<ec>
goddamn that name is dumb
<alexgordon>
I just think of the audio software lol
<alexgordon>
also surprised they haven't been sued
<ec>
hhaaaaaaaad to make it some React Thing, didn't'cha, dude 🙄
<alexgordon>
I guess nobody wants to sue facebook
<ec>
just call it goddamn OCaml, it's been around for thirty fuckiiiiin years
<ljharb>
reason is a word
<ljharb>
There’s by zero basis for a lawsuit
<alexgordon>
Windows is a word too
<alexgordon>
try calling your language Windows and see what happens
<ec>
… no lawsuit, still, but a lot of fun getting made of it?
<ec>
:P
<ljharb>
alexgordon: you could
<alexgordon>
you'd get sued into the ground lol
<ljharb>
if it’s not an operating system there’s no basis in copyright law to stop you
<ljharb>
well yes Microsoft would win by attrition. But not because they have a right to
<alexgordon>
I dunno some courts consider all "software" to be in the same category
<ljharb>
it’d eventually make its way to a not dumb one ec
<ljharb>
but not before you ran out of money ofc
<ljharb>
but also the audio software is hardly a household name
<ljharb>
nobody outside of audio’s prolly heard of it
<ec>
ljharb: wish to elaborate on your feelings of types? and before you do, have you used SML or F# or any ML?
<ec>
(heavily — not like, in one CS class somewhere where the instructor told you you'd never use it again :P)
<ljharb>
i haven’t, no
<jfhbrook>
I kinda want someone to make a ML family of languages called FML
<ec>
roll
<alexgordon>
I am kind of interested in F#
<alexgordon>
jfhbrook: LOL
<ljharb>
I don’t find types to be particularly useful. Adding types to an untyped codebase tends to be useful, but writing new code in typed codebases in my experience often ends up making less elegant APIs solely to satisfy the type system
<jfhbrook>
I think if you have a "good" type system you can build an api that can handle those types
<ljharb>
also in the case of typescript, all of the types are build time only. By using those types at all, engineers tend not to write the same run time checks and tests they otherwise would, leading to a false sense of security
<jfhbrook>
leveraging union types and/or typeclasses helps a lot
<ljharb>
jfhbrook: maybe, but show me a good type system in a popular language
<jfhbrook>
there's a name for that but I'm spacing on it
<alexgordon>
ljharb: that's less of a problem with structural typing tho
<jfhbrook>
well, typescript :v
<ljharb>
I’ve spent about one person week with typescript and found 4-6 core bugs in it already, so no
<alexgordon>
ocaml is also structurally typed
<ljharb>
also it’s not spec compliant by default
<ljharb>
super set of JS my ass
<alexgordon>
hey enums are useful!
<alexgordon>
get off your ass and standardise them :joy:
<alexgordon>
^ like if I want to represent the value { foo: 10, bar: 20 } in java, I have to make a class, it affects my code. But in a structurally typed language I can just write that in the type and pass the value around...
<ljharb>
enums are fine
<ljharb>
I’m more excited for protocols
<alexgordon>
what's that?
<ljharb>
that will provide a runtime target for many typescript features that are currently only build time
<alexgordon>
yeah that is one thing I would like, some better way to do runtime verification of JSON
<ljharb>
not sure that’s the same
<ljharb>
that’s just jsonschema
<alexgordon>
but I don't want to write the types twice
<alexgordon>
I think rust and swift can do that?
<alexgordon>
you just say "I want to take this json and put it into these structs/classes" or the reverse
<alexgordon>
and you get both compile-time types and runtime validation
<ec>
ugh. my stomache hurts so bad.
<ec>
fuck me up
<alexgordon>
why?
<alexgordon>
also ec paws is like 10 years old this year right? 2009 I think
<ec>
yes it is at the end of this year ;_;
<ec>
can't talk having an argument
<alexgordon>
haha
<alexgordon>
I'm writing PHP
<ec>
lol screaming argument with my ex, whom I have to live with day-in-day-out for god-knows-how-much longer, is getting in the way of this convo, sorry sorry sorry
<ec>
ljharb: a couple things
<ec>
fuck. be right back.
<ljharb>
lol k
<ljharb>
(also reminds me that typescript can’t type integers)
<jfhbrook>
ahahaha ouch
<jfhbrook>
you can't stop ME from typing out integer literals!!
<ec>
man I can't even select a thing to start with
<ec>
well, I'm gonna ignore all the specific typescript dislike — I disagree with almost every single point you brought up, for one reason or another, but I *also* have issues with it, so like, ¯\_(ツ)_/¯ who cares, not important. also kinda not what I asked, I think that was more a response to jfhbrook :P
<ec>
second, and only in passing — “… but writing new code in typed codebases in my experience often ends up making less elegant APIs solely to satisfy the type system”; well, same-ish response jfhbrook had! You've clearly had the experience of seeing people *work around* a sub-par typing system.
<ec>
(If done poorly, typing *does* get in the way, but exactly that — “if done poorly.” That doesn't imply it's an inherent attribute of strong types, as much as I've always seen people argue — hell, as much as I, myself, have argued in the past)
<ec>
but! the most important thing … “ but show me a good type system in a popular language.”
<ec>
OCaml! Holy shit, OCaml! I cannot. crow. *enough* about this.
<ec>
type system strength aside — use it for one week and you'd be sold, I don't feel the need to do the selling, there, lol — let's talk popularity and pragmatism.
<ec>
first off, let's set aside all the classic OCaml stuff, which I can return to afterwards, and chat JavaScript.
<ec>
BuckleScript is fucking *amazing.* This isn't emscripten/ASM.js, or ClojureScript, or Closure Compiler's output, or whatever that Haskell one is.
<ljharb>
wth is bucklescript
<ljharb>
ocaml I’ll keep in mind, sure
<ec>
ML's concepts map so, so, so cleanly, and so well, to a mind-fuckingly large subset of JavaScript efforts … (Functional patterns? There. Asynchronous patterns? Already common. Objective patterns? First-class support. Imperative patterns? Whodathunk — awesomely there.)
<ec>
… and add to that how *well* BuckleScript compiles most of the basics to JavaScript,
<ec>
and working with Reason everyday feels a lot less like, idk, writing Haskell or Clojure and ‘compiling it to Javascript’,
<ec>
and a lot more like a “better typescript” sitting in your Babel pipeline.
<ec>
(BuckleScript / Reason / OCaml, all the same thing, basically. BuckleScript is the npm-enabled JavaScript backend for the OCaml compiler, it's really fucking cool.)
<ljharb>
i love writing JS tho, and I don’t tend to write a sort of bugs that type system apparently are meant to catch
<ljharb>
so the value doesn’t present itself much to me so far, in general
<ec>
so, to your quote again —“show me a good type system” (OCaml, famously excellent types) “in a popular language.” (JavaScript, there's literally none more widespread.)
<ec>
eh the "I bet we can make type systems more useful to you, because it sure as shit worked for me" convo is one I'd absolutely love to have later — but it's deeper, more nuanced, and should probably be done in a different setting;
<jfhbrook>
ljharb when I write javascript I usually am continuously trying to run a half-done program to see if it does what I expect it to do - this happens with scala but less often, since merely compiling is a pretty good sanity check
<ec>
but *in particular* I just have one, single point to make here: OCaml is *the best JavaScript type-system*, hands the fuck down. 🤣
<jfhbrook>
cripes
<jfhbrook>
you're referring to reason here?
<ec>
if you happen to choose to use a type system — and you don't specifically need the *one thing* TypeScript is really, really good at (the `any` type / gradual typing), then I strongly, absurdly enthusiastically suggest OCaml. :P
<ec>
also happy to discuss the many and varied downsides — but they, honestly, can't hold a candle to the upsides. (youth of the BuckleScript project itself, division of community in the ML world, opaqueness of ML syntax to newbies if they learned primarily on C-family languages …)
<ec>
(though Reason is very specifically desined to address that last one, I personally kinda hate it)
<ec>
jfhbrook: yeppers. well. okay. kinda.
<ec>
the terms and names are annoying and confusing — largely because all of this is a collaboration of a few separate communities, each of which contributed a separate part to the story of "using ML as your JavaScript type-system"
<ec>
1. OCaml (a product of a mostly-academic community interested mainly in type theory and systems programming, used by a lot of big fintech players): A programming-language semantic. i.e. “what's a binding, what's a function, what's a module, how are values passed …”
<ec>
2. Reason (a product of the React community; specifically, the guy who created React): A *syntax* for that semantic — “what characters do you type for a pattern-match, do you need semicolons, how are strings introduced and what is their encoding …” — that is intended to be ‘more friendly to JavaScripters than the one that's shipped with Caml for thirty years.’
<ljharb>
I’m not sure that’s accurate
<ljharb>
seb markbage made react; i think someone else made reason?
<ec>
ljharb: Jordan Walke
<ec>
but it came directly from the React team at FB — it's strongly sanctioned as the “react replacement”
<ec>
which ofc was originally written in SML, because ML is *perf* for React's concepts. problem was just that BuckleScript was the missing piece at the time.
<ec>
speaking of,
<ec>
3. BuckleScript (a product of a fintech firm using OCaml, who needed to target JavaScript-ecosystem products): Technically a fork of the OCaml compiler, but effectively just another backend to the existing type-checker and compiler for aforementioned OCaml semantic (whether that's actually *written out* in the ReasonML or OCaml syntax.) …
<ec>
… that's designed very directly with the goals of 1. producing as-readable-as-humanly-possible JavaScript output (so you can partially apply it in a larger product, instead of assuming full buy-in on day one), and 2. integrating directly and simply with the existing JavaScript paradigms and ecosystem of products and tools (npm and ES6 modules, webpack and babel, React …)
<ec>
collectively all of that is generally known as “Reason”. which I kinda hate, because I'm not a fan of that alternative syntax, but whatever ¯\_(ツ)_/¯
<ec>
jfhbrook: useful explanation?
<ec>
wasn't kidding about the “hella enthusiastic” bit :P
<ec>
I haven't been this excited about — or unreseverdly a proponent for — a single particular tool or language in, uh, like twelve years.
<jfhbrook>
i’m sorry i’m freaking out a little bit and need a minute to get my head straight
<ec>
I'm so sorry ignore everything I typed literally anything is more important than programming <3
<ec>
come back whenever
<ec>
omg ljharb, Sweet.js is mentioned in that tc proposal you linked
<ec>
I haven't thought about Sweet.js in … in *years*, holy shit
<jfhbrook>
no I can do this I just
<jfhbrook>
the excitement about the new drugs and the terror involved in asking that girl out to brunch has me internally screaming pretty hard
<jfhbrook>
and I can’t smoke cigs
<ec>
did you do it :D
<ec>
person. not cigs.
<jfhbrook>
I did
<jfhbrook>
and that was a useful explanation yes
<ec>
YAHHs congrats
<ec>
what'd they say
<jfhbrook>
she has not responded and at this point it’s been a while
<jfhbrook>
like who knows
<ec>
deep breath all's well, focus on something else :*
<jfhbrook>
not a bad sign or anything and tbh if she completely ghosts i’m not really any worse odd
<jfhbrook>
off*
<jfhbrook>
but still my brain is screaming oh noooo
<ec>
ljharb: I'm totally left lost by that first-class-protocols proposal, by the way.
<ec>
I should probably open an Issue, but I'm lazy … anyway, none of the examples show what happens *after* the `Protocol.implement` call
<ec>
i.e. there's a lot of discussion of symbols and namespaces and basically no description of what the feature actually *does*.
<ljharb>
ec: what do you mean what happens after?
<ljharb>
ec: it installs symbol methods when they have an implementation
<ljharb>
ec: and when not, it throws if there isn't a symbol property present
<ljharb>
ec: and then it gives a runtime `implements` test to see if a thing has all the required symbols
<alexgordon>
cool well I'm importing wiktionary, at 100 pages per second it should take 15 hours
<alexgordon>
(should have provisioned a high CPU instance lol)
<ec>
ljharb: thanks, that's exactly what wasn't explained
<ec>
alexgordon: what for?
<alexgordon>
gonna parse it
<ec>
alexgordon: what for?
<ec>
also: use OCaml ;)
<alexgordon>
a project i'm working on
<ec>
menhir 'n sedlex
<alexgordon>
haha
<ljharb>
ec: it's an early proposal; right now the main thing is what problems it solves. that's just an example/likely impl
<alexgordon>
-clouds
<ec>
ljharb: interesting.
* alexgordon
is in the clouds
<ec>
somebody build purr 2.0
<alexgordon>
ljharb: yeah the lack of integers in TS is annoying, I end up writing type int = number in every file just so I can make my types self documenting
<ljharb>
alexgordon: TS doesn't have opaque types tho, does it?
<alexgordon>
opaque types?
<ljharb>
ie, that just narrows back to number
<alexgordon>
yeah yeah
<ljharb>
like `type NotANumber = number`
<ljharb>
opaque types would resolve a lot of issues
<ljharb>
because then i could do `type ID = string` and it wouldn't be super terrible
<ec>
again, TypeScript *is good*, but for one specific thing.
<alexgordon>
I don't really write code in that style
<alexgordon>
but ok
<ec>
(this comes back to your "not a superset of JS" comment, ljharb — I mean, it's not a *strict* superset, but I can't fathom why you care about that. When it comes down to it, in every almost decision made in almost every corner, it always goes with the “be as javascriptey as possible, even if that means damaging the experience, expressiveness, or safety of the language”.)
<alexgordon>
yeah well that's their schtick
<ec>
and they're good at it
<ec>
and it's The Strength to focus on.
<alexgordon>
I would love a non-superset TypeScript fork
<ec>
'cuz everything else demonstrably sucks because of it :P
<ec>
alexgordon: oh hey, have I mentioned,
<alexgordon>
REASON
<ec>
alexgordon: … OCaml? ;)
<alexgordon>
?
<alexgordon>
:joy:
<alexgordon>
I'm just gonna pretend this is slack
<ec>
then I'm gonna make up :emoji: that don't exist
<ljharb>
ec: it's marketing speak often used to justify TS
<ljharb>
ec: and it's untrue
<ec>
also are you *not* using IRCcloud, because it tried hard to turn that into an emoji lmao
<alexgordon>
ec: I did want to make a lisp that uses typescript for type checking but everybody said that was stupid
<ljharb>
ec: i'd rather TS market themselves on their accurate strengths
<alexgordon>
in the end, I am willing to put up with some small warts in TS because of DefinitelyTyped
<alexgordon>
which is the real MVP
<ec>
marketing speak: yes, but untrue … it's true in its effect? i.e. the things that make typescript good, and they want you to use it because of, are exactly the things you're gonna expect when they advertise it as "just JavaScript"
<ec>
it's only untrue in the most literal, irrelevant-to-whether-it-helps-users sense /=
<ljharb>
it's untrue in more senses than hat.
<alexgordon>
in the end, the reason people use JS is because of NPM, and the reason people use TypeScript is because of DefinitelyTyped
<ljharb>
TS doesn't currently support symbols as indexes, for example
<ec>
alexgordon: there's tools to import dts into …
<ec>
alexgordon: … OCaml ;)
<alexgordon>
but it's never gonna be the same
<ec>
ljharb: that seems like a way in which they're behind-the-curve instead of actively-forking-the-language, though
<ljharb>
alexgordon: which is why it's disingenuous marketing
<alexgordon>
you can make academic objections to stuff in JS and academic objections to stuff in TS, but their communities are so huge that it overrides them all
<ec>
i.e. a bug, or a feature-request.
<ljharb>
ec: i mean, TS violates the spec unless you enable synthetic imports and esModuleInterop, eg
<ec>
yeah ugh I hate that the default TypeScript settings are bullshit
<ljharb>
ec: it's certainly possible for TS to be made a subset, but it's not one out of the box
<ljharb>
even modulo bugs
<alexgordon>
the next biggest statically typed language is probably Java and fuck me if I'm going to be using anything written by the java community
<ljharb>
(like the symbol thing, which i've filed)
<ec>
okay so I see three categories, let's divide it up maybe?
<ljharb>
yeah bugs are forgivable as long as they fix them consistently
<alexgordon>
everything has bugs
<ljharb>
griping about that is just something i do when i'm amateur-level trolling
<ljharb>
it doesn't matter
<ljharb>
ec: when you come back, ping me for 2+ :-p
<alexgordon>
I haven't come across many bugs in TS, and I use it 8 hours a day
<alexgordon>
just two that I can think of actually
<ljharb>
alexgordon: i found 4-6 in a week tho. they're there.
<ljharb>
alexgordon: so it might depend on how people try to use it; and i'm trying to use it like JS is the source of truth, not the type system
<alexgordon>
such as?
<alexgordon>
yeah I've given up JS mostly
<ljharb>
symbols not indexing, type narrowing bugs that they fixed in 3.3, the base language types for Object.keys were wrong, and .call is selecting the wrong overloaded type of the .called function
<alexgordon>
oh so just bad type definitions?
<alexgordon>
yeah but I wouldn't really call that a bug, IMO it's something you have to just deal with considering the herculean scale of what they are attempting
<ljharb>
2 of those 4 are just bad type defs
<ljharb>
but the first one is like the ENTIRE reason for symbols to exist - that they can be property keys
<ljharb>
so that that wasn't part of initial support for symbols is just absurd
* alexgordon
doesn't use symbols lol
<jfhbrook>
I don't use symbols much but they're a cool idea
<jfhbrook>
there are a lot of es6-y things that are super underrated, I think symbols are one of them
<jfhbrook>
though the syntax for symbols sucks iirc
<alexgordon>
I'm fine if like some small percentage of their type definitions are inaccurate, better than having no types at all IMO
<alexgordon>
yeah I get what they are for but I find them too awkward to use
<alexgordon>
my wiktionary import has sped up, only 11 hours remaining!
<alexgordon>
personally I would for someone to fork typescript and drop source compatibility with JS
<alexgordon>
... but I don't think anybody will
<alexgordon>
I really want operator overloading
* alexgordon
glares at python
<jfhbrook>
good ol' snakes
<alexgordon>
if there was a JS equivalent to numpy/scipy/pandas/etc it would be glorious
<alexgordon>
I have considered making a compile-to-python language that doesn't like suck
<jfhbrook>
I don't mind python, it's my daily driver
<jfhbrook>
it's not great but it works
<alexgordon>
yeah
<jfhbrook>
I wanna get better at mypy
<alexgordon>
I dunno I've been writing python for like 10+ years... I'm mad as hell and I'm not going to take it anymore
<alexgordon>
I've grown to hate significant indentation
<alexgordon>
but what really pisses me off is the N different ways of making a record
<ec>
sigh
<alexgordon>
{ "foo": "bar" } or dict(foo="bar") or namedtuple or attrs or plain classes or auhguhgoijao
<alexgordon>
it's like error handling in haskell
<ec>
ljharb: sorry ugh hi back ish
<alexgordon>
meanwhile in js land there's ONE way to do it and it fucking makes sense
<jfhbrook>
oh, yeah, I appreciate javascript object literals
<alexgordon>
also the lack of multiline lambdas is embarrassing in 2019
<ec>
python /=
<alexgordon>
but, if you are doing numerical stuff there's no alternative (except maybe julia), all the libraries are for python
<ec>
how do you feel about Julia
<jfhbrook>
julia is a clusterfuck though
<alexgordon>
I've never used it
<jfhbrook>
I don't have a ready list as to why but that's my impression every time I look at it
<jfhbrook>
those guys are like, they're scientist types that haven't written prod grade software
<jfhbrook>
they're coming at this from the angle of, man, these janky ass scientific pipelines written in bash and ruby and python and a tiny bad c program
<alexgordon>
yeah the thing is I don't really want to use a language that is designed for numerical programming? because I still have to do general purpose programming to get the data in and clean it, validate it, etc
<alexgordon>
so even if the core of what I'm doing is numerical, I don't want to use R or Julia because... it makes all the other stuff more painful
<jfhbrook>
they successfully made a single language that's not stupid hard to write but still competitive w/ c
<jfhbrook>
but there are so many other ways of solving that problem where the people who wrote those know how to ship production software
<jfhbrook>
like the tooling around rust is really good!
<jfhbrook>
and python + libffi works fairly well!
<alexgordon>
I guess I am stuck with python :|
<alexgordon>
at least I dumped it for web stuff though
<jfhbrook>
rust seems like a good target for reasonable linear algebra libs
<alexgordon>
node <3
<alexgordon>
jfhbrook: I dunno if their type system is suitable
<jfhbrook>
suitable to represent matrices?
<jfhbrook>
that would be surprising
<alexgordon>
like you need to be able to write Vector<f32, 10>
<alexgordon>
last I checked they don't support that, but maybe they implemented it I dunno
<jfhbrook>
oh you want matrix size represented in the type?
<alexgordon>
well yeah
<jfhbrook>
yeah no I gotcha
<jfhbrook>
seems like having bad dimensions in matrix mults get caught at compile time would be good
<alexgordon>
I mean you can generate types for Vector2, Vector3, Vector4 lol
<jfhbrook>
sure, sure
<jfhbrook>
scala does that for tuples
<jfhbrook>
up to 22!
<alexgordon>
I mean nobody really needs vectors bigger than 4
<alexgordon>
or matricies bigger than 4x4
<alexgordon>
typed anyway
<jfhbrook>
I've almost certainly worked with matrices with millions of elements
<alexgordon>
but the point of the typing is that you don't need to do bounds checks or unwrap anything
<alexgordon>
jfhbrook: oh yes but I mean if you have more than 4 then you don't need the size in the type because it will be dynamic
<alexgordon>
I can't say I've ever needed a vector that is statically known to have exactly 5 elements
<alexgordon>
it's always either 2, 3, 4 or Many
<jfhbrook>
I feel like I would want something like Manyx3
<alexgordon>
the real problem is that if vectors and matricies are not built into the standard lib, then you will die from a death by a thousand cuts because every library will reinvent its own. In python-land everything depends on numpy.ndarray, although it's not in the stdlib it might as well be
<jfhbrook>
right!
<alexgordon>
I feel like rust doesn't really care about scientific computing
<jfhbrook>
I think rust wasn't designed with scientific computing specifically in mind, and that those guys are still at the stage where there aren't a ton of involved userspace libs
<jfhbrook>
but that as rust matures and people invest in userspace
<jfhbrook>
that kinda stuff can happen - or at least some of it, anyway
<alexgordon>
thinking about it some more... I think the path of least resistance is to improve python rather than to reimplement all the python numerical computation libs
<jfhbrook>
possible!
<jfhbrook>
something else to consider is distributed numerical libs, like what you see in spark
<jfhbrook>
I think spark but in rust and you compile a bespoke worker could be super interesting
<alexgordon>
what's the name of that jit compiler for python code?
<alexgordon>
numba
<jfhbrook>
sounds right yeah
<alexgordon>
see you could make a language that compiles down to numba-aware python code
<alexgordon>
I like all the libraries I just hate python lol
<jfhbrook>
hah
<jfhbrook>
that could be interesting yeah
<alexgordon>
I should learn Hy
<jfhbrook>
hy?
<jfhbrook>
I have a big list of stuff I wanna get into
<jfhbrook>
I'm legit curious if this new prescription will help me actually get into those things