trampi | Hi! Where can I find the TypeScript language spec? It was previously available here, but it has been archived: https://github.com/microsoft/TypeScript/tree/main/doc |
systemfault | trampi: There's no spec, they stopped caring about it a few years ago |
rindolf | systemfault++ |
rindolf | IRC karma > gold |
rindolf | ;) |
rindolf | I think specs can often be useful for design, though. |
rindolf | sometimes they can be pointless. |
systemfault | :) |
systemfault | I don't believe anyone would write another complete TypeScript compiler (I'm not talking about a TS stripper, there are already a lot of them) |
rindolf | systemfault: "believe it." -- http://www.earthstar.co.uk/deep1.htm |
rindolf | or https://www.shlomifish.org/humour/bits/facts/Taylor-Swift/ … |
rindolf | or Chuck for that matter: https://en.wikipedia.org/wiki/Chuck_Norris_facts |
rindolf | ;) |
systemfault | Haha :) |
rindolf | systemfault: \o/ |
rindolf | systemfault: my sites/blogs have many other jokes |
rindolf | systemfault: do you have WWW presence? |
systemfault | I've browsed through your website, it's fine. |
jadew | hey guys, I have a generic class <T>, and a method that takes <O>, is there a way to constrain O to extend T? |
jadew | hmm, there might be |
rindolf | systemfault: http://old-1998-site.shlomifish.org/ - humble start |
systemfault | I don't, I bought my domain name but only use it for my Google email account |
systemfault | jadew: have you tried <O extends T> ? |
jadew | yeah, doesn't work |
systemfault | Can you write a small repro on the TS playground? |
rindolf | systemfault: ah. :| |
jadew | wait, that's not what I want |
jadew | I want T extends O |
jadew | nevermind, this is a non-issue |
systemfault | Good :) |
systemfault | rindolf: simple websites like that age well, it looks fine on my phone |
rindolf | jadew++ # updating us |
rindolf | systemfault: true, but I want a navigation menu, a breadcrumbs trail/etc |
rindolf | https://everybootstrap.site/ ;) |
sig | hey philosophical question. I think I saw an answer somewhere but forgot it. Why do programming languages have statements? I know the historical reason: FORTRAN had statements and expressions, and then the division just kind of was inherited on to other languages. But is there some tangible BENEFIT from saying "this here is not an expression, it doesn't return a value you can assign or use elsewhere"? |
systemfault | I don't know, my guess is simply because of how programming started. |
sig | maybe something to do with sequence points? |
sig | but it's such an "obvious" thing that you might always want to potentially have a value back from any kind of expression; and, like, why not? It can always be ignored if it's not needed |
sig | and I mean, new languages get designed all the time. Why does TypeScript have statements (ok, because js). Why does rust have statements? |
sig | https://doc.rust-lang.org/reference/statements.html seems it's declarations mostly |
systemfault | There's a classic old paper that could be relevant… "Can Programming Be Liberated from the von Neumann Style? A Functional Style and Its Algebra of Programs" |
systemfault | By John Bacus |
systemfault | https://www.cs.cmu.edu/~crary/819-f09/Backus78.pdf |
rindolf | systemfault: https://en.wikipedia.org/wiki/Betteridge%27s_law_of_headlines |
rindolf | sig: https://twitter.com/shlomif/status/1479822015464976389 |
rindolf | sig: https://duckduckgo.com/?q=lambda+calculus&atb=v140-1&ia=web , Lambda Calculus, is cool, but gets tedious |
rindolf | https://www.shlomifish.org/humour/fortunes/show.cgi?id=sharp-programming-German-as-he-is-spoke |
sig | rindolf: Lambda Calculus is tedious because there aren't good tools; there aren't good tools because there hasn't been a billion dollar demand |
sig | systemfault: cool paper. Reminds of Ryan Dahl lamenting how broken NPM and node.js is |
systemfault | sig: Then he went on to create Deno… which isn't that much better… |
rindolf | sig: perl is not tedious |
systemfault | sig: What will be his next project? Oden? Done? Nedo? Edon? What combination of "Node" is he going to use? ;) |
sig | rindolf: perl also has absolutely nothing to do with lambda calculus :D |
systemfault | Anyway, TL;DR… programming started really close to the machine which is imperative |
sig | systemfault: I don't know enough history to know if Backus ever got a chance to have a stab at (more) functional languages than fortran and algol… |
rindolf | I used to write Perl in https://en.wikipedia.org/wiki/Joe's_Own_Editor |
systemfault | The first programming languages were very simple abstractions on top of assembly… because well, CPU and RAM were very limited |
rindolf | sig: my point was that Perl lacks good tools and yet |
systemfault | Perl is dead :P |
sig | ahum, ok |
sig | I was actually super impressed with Perl when I once tried it |
sig | I had this list of files and I wanted to generate an album HTML page |
systemfault | It's like COBOL, existing codebases will keep being maintained… but I'm not sure that anyone is going to start a new Perl 5 project in 2022 |
sig | @files = `ls` # holy shit did I just parse the filenames in current directory into a list?! |
systemfault | And Perl 6… was renamed Raku. |
rindolf | sig: heh, I did an HTML album too |
avu | sig: you did just parse the filenames in the current directory in a broken way that at best works most of the time, yes :) |
sig | avu: scripting only needs to work for me, right now |
sig | TypeScript is an okay scripting language ";D" |
sig | hey is it true btw that ts-node isn't "production quality"? You can't actually spawn lots of workers using it or whatever |
avu | using ls in scripts is just as wrong in perl as it is in bash |
sig | not if it works >:3 |
rindolf | systemfault: https://hackernoon.com/how-it-feels-to-learn-javascript-in-2016-d3a717dd577f ;) |
rindolf | sig: I find tsc/ts better than raw js. |
rindolf | I also use https://emscripten.org/ |
rindolf | Night all. Try dreaming of something more pleasant than COBOL… |