News for hackers. Stuff that matters.
Re:New TypeScript Website by pouting on Wednesday August 05, 2020 @11:26AM (#24061863)
May I suggest changing the name from 'Typescript Playground' to something like 'Typescript Sandbox'? I found myself on a very nsfw website at work after clicking on a link shown in the results of a search using the strings 'TS' and 'Playground'.
Re:New TypeScript Website by zellyn on Wednesday August 05, 2020 @11:37AM (#24061997)
I couldn't get this to happen with Google — every result was for typescript. I tried using duckduckgo and every result but one was porn.

Guess I can put off that decision to switch to ddg a bit longer…

Re:New TypeScript Website by 52-6F-62 on Wednesday August 05, 2020 @12:03PM (#24062315)
I tried "typescript playground" and thought you were full of it because all of the results were relevant.

Then I tried "ts playground". Woof. That is a big no-go!

I definitely recommend being specific and explicit (in your phrasing...) with ddg still.

Re:New TypeScript Website by Shacklz on Wednesday August 05, 2020 @01:16PM (#24063162)
Only if you have the "Safe Search"-Option set to "moderate" (default) or below. If you set it to strict, typescript appears as the second result for me, without porn (but still a few links that I wouldn't want to click).
Re:New TypeScript Website by buzer on Wednesday August 05, 2020 @02:40PM (#24064080)
For me first page of Google results were about typescript (except for one imdb entry) in both normal & private mode, but image & video search had nothing to do with typescript. Safe search was off.

Location probably plays a part in the normal search.

Re:New TypeScript Website by BrandoElFollito on Wednesday August 05, 2020 @05:20PM (#24065726)
Yes. From France the first link is about typescript, then porn all the way

It is funny how do many people jumped on the search "for research" and proudly report back on the typescript vs porn ratio.

Re:New TypeScript Website by pests on Wednesday August 05, 2020 @05:26PM (#24065805)
Get to peer a little deeper
Re:New TypeScript Website by stu2b50 on Wednesday August 05, 2020 @12:27PM (#24062619)
Same for me. There's the benefit of user tracking, I guess. I definitely Google for docs frequently so it makes sense to tailor the results for the language.
Re:New TypeScript Website by zellyn on Wednesday August 05, 2020 @12:33PM (#24062676)
Unless Google is noticing my IP and doing user tracking in Firefox Private tabs, it's not user tracking. It's just understanding the query better.
Re:New TypeScript Website by y-c-o-m-b on Wednesday August 05, 2020 @02:17PM (#24063841)
Hahaha this brings back memories. Back in the 90s I had a homepage on Angelfire.com. I was in high school at the time and I would work on the homepage during lunch in the school library if a computer was available.

I walked into the library one day and all three computers were taken, but right before I turned around to leave, somebody got up and freed up the middle computer. I quickly darted over to it before someone else had the chance. I sat down and because my adrenaline was slightly going, I typed in Angelfire.com really fast, ready to start building. Only it was anglefire.com, a hardcore porn site with flashing green banners and gifs, VERY noticeable. I was so confused as to what the fuck just happened that I froze for several seconds - staring at the screen in disbelief - before it occurred to me to close the god damn browser idiot! I remember going into a full-on panic; nausea, heart-racing, the works.

I was sure I got caught and would be expelled. There's no way it went undetected. I was surrounded by two people to my sides, six people at the circle desk behind me, and the librarian working at the shelf behind them. Somehow during those many seconds of just staring at the screen in a panic, not a single freakin person noticed! I couldn't believe it.

Now you would think I would be thankful nothing bad came of it and learned a valuable lesson, but being the opportunistic teenager I was, I took note how everyone was so entrenched within their own personal bubble. They wouldn't notice anything I was doing at those computers. I eventually used that knowledge to hack the security software on there and install a key-logger...

Re:New TypeScript Website by sbergot on Wednesday August 05, 2020 @11:31AM (#24061941)
Try going to python.com to see what happens :p
Re:New TypeScript Website by stared on Wednesday August 05, 2020 @12:05PM (#24062341)
Nothing beats LaTeX. Image searches for symbols destroyed many innocent mathematicians.
Re:New TypeScript Website by johnhenry on Wednesday August 05, 2020 @12:16PM (#24062476)
Try searching "LaTeΧ".

(That's a "Chi" not an "Ex")

Re:New TypeScript Website by giancarlostoro on Wednesday August 05, 2020 @02:15PM (#24063824)
Are their web services powered by Python at least? I am more surprised I never accidentally went to this site honestly.
Re:New TypeScript Website by orta on Wednesday August 05, 2020 @02:39PM (#24064069)
It's a good idea, and I did consider it, but it's been "playground" for 7 years and even third party versions kept the playground name to let people know it's a REPL. Breaking that is a pretty big change which I opted to not do.

Your choice of naming matches mine too, the abstraction which lets anyone build their own TS repl is called the sandbox: https://www.typescriptlang.org/dev/sandbox/

Re:New TypeScript Website by arxanas on Wednesday August 05, 2020 @11:28AM (#24061896)
This has happened to me multiple times as well.
Re:New TypeScript Website by eitland on Wednesday August 05, 2020 @02:15PM (#24063819)
> To give a sense of the support matrix, here's what we account for with each page:

>

> - JavaScript being disabled

> - Keyboard-only navigation

> - Text-to-Speech users

> - Cookies/Local Storage being denied

> - A focused mobile navigation design

> - Light and Dark OS mode support, with a user-preference switcher

Now we are talking.

@every_web_developer_and_website_owner : this is the new trend, just trust me. Start preparing now and you'll be ahead of the curve when this Javascript everywhere fad finally goes away early next year ;-)

Re:New TypeScript Website by tashoecraft on Wednesday August 05, 2020 @02:28PM (#24063954)
You really think Javascript is somehow going to die next year? Percent of users with JS turned off is usually under 1%.
Re:New TypeScript Website by eitland on Wednesday August 05, 2020 @03:15PM (#24064419)
It was a joke on my wishful thinking.
Re:New TypeScript Website by sbergot on Wednesday August 05, 2020 @11:39AM (#24062019)
https://www.typescriptlang.org/docs/handbook/react-&-webpack... now redirects to https://webpack.js.org/guides/typescript/. It is a shame because this page was really well written.

Typescript is still one of the few languages where the official website is the best place to learn about it.

Re:New TypeScript Website by yodon on Wednesday August 05, 2020 @11:21AM (#24061793)
It's great that the samples are automatically run through the production typescript compiler as part of building the static documentation pages, so all output and error messages are current. It boggles my mind how many places treat technical docs as a write-once effort and then end up damaging their relationship with users as their docs get steadily less and less correct over time.
Re:New TypeScript Website by gmac on Wednesday August 05, 2020 @11:27AM (#24061889)
Absolutely agree: this is critical (I do the same myself in the documentation for my TS/pg library, https://jawj.github.io/zapatos/).
Re:New TypeScript Website by jgilias on Wednesday August 05, 2020 @02:31PM (#24063985)
Putting Deno project on the Typescript website frontpage is the most prominent advertising for it that I've seen. Nice! It does look really promising. Has anyone tried doing anything substantial with it?
Re:New TypeScript Website by SOLAR_FIELDS on Wednesday August 05, 2020 @04:33PM (#24065254)
I am currently working on porting some sound libraries from Node at the moment. The builtins like deno fmt and bundling make it a joy to code in. Some of the tooling is not yet complete though, for example deno lint is still missing quite a few rules.
Re:New TypeScript Website by thelazydogsback on Wednesday August 05, 2020 @03:43PM (#24064751)
I would love for MS to get behind Deno as a sponsor to foster growth in a mainstream Node-alternative. (Though I wish Deno would offer shared-mem concurrency, possibly w/green threads as a performant option to workers or clusters.)
Re:New TypeScript Website by iamwpj on Wednesday August 05, 2020 @11:55AM (#24062220)
I enjoy Microsoft blogs where the screenshots are from MacOS and not Windows. I have no social commentary, it's just a tee-hee :D
Re:New TypeScript Website by orta on Wednesday August 05, 2020 @02:20PM (#24063876)
Ha, yeah, I did consider getting my windows machine out for some the screenshots, then I could do light/dark win/mac. In the end, I figured the same framing was better because I mainly wanted to highlight the light/dark theming support, and "cross-OS" isn't really a feature you need to show for a website
Re:New TypeScript Website by owl57 on Wednesday August 05, 2020 @12:12PM (#24062423)
And the screenshot on VSCode page shows Linux version. Emphasis on non-Windows applications may be intentional.
Re:New TypeScript Website by uranusjr on Wednesday August 05, 2020 @01:18PM (#24063186)
In this case I believe it’s up to the blog author. Orta is a Mac user (was involved in a package manager, Homebrew? I forgot). The VSCode goes as far as detecting the OS you’re on and shows the most relevent screenshot, so you get Windows on Windows, Mac on Mac and iPhone, etc. But yeah, even just the fact they don’t force all of their websites use Windows screenshots is saying a lot by itself.
Re:New TypeScript Website by joobus on Wednesday August 05, 2020 @11:20AM (#24061786)
I'm fascinated by the oscillation between straight corners and rounded corners every so often. One is popular for a while, then the trend goes the other way, and back again.
Re:New TypeScript Website by benrbray on Wednesday August 05, 2020 @11:58AM (#24062262)
To me, the most infuriating trend in web design is adding a crazy amount of padding to everything and increasing the font size! The old TS website packed a ton of information into a single screen, but it seems like I need to scroll quite a bit in the redesign before I see the same amount of information.

Zooming out to 75% improves the experience, but honestly I feel like I'm going crazy!

Re:New TypeScript Website by Analemma_ on Wednesday August 05, 2020 @11:37AM (#24061991)
I have this theory that it's because of the "A/B-ification" of all web development. Our brains like novelty, and so when we see a different shape from what was there yesterday we instinctively prefer it, and so the A/B test dutifully reports that the new one performs better. And then two years later the same test tells you that people prefer the old shape, which is now new again.
Re:New TypeScript Website by hombre_fatal on Wednesday August 05, 2020 @11:50AM (#24062157)
The pendulum swing of the cool thing becoming lame and the old thing becoming cool describes all sorts of human trends.

Being a human endeavor, it always existed in web design as well. There was no -ification. Even the themes of early PHP software oscillated like this.

Re:New TypeScript Website by jbboehr on Wednesday August 05, 2020 @07:13PM (#24066636)
> Our brains like novelty, and so when we see a different shape from what was there yesterday we instinctively prefer it

How do you reconcile this with people complaining about redesigns? I tend to hate them, personally.

Re:New TypeScript Website by nikolay on Wednesday August 05, 2020 @03:57PM (#24064897)
Not sure why Microsoft shies away from offering compilation to MSIL. Maybe they don't want C# competition, but having TypeScript not require Node.js/Deno would actually be a good thing. Away from the transpilation part, it is shaping to be a great programming language!
Re:New TypeScript Website by orta on Wednesday August 05, 2020 @04:18PM (#24065082)
It's a good question ( I have a YouTube video on some of the reasonings, https://www.youtube.com/watch?v=8qm49TyMUPI ) but the TLDR is that TS really wants to only be a type layer above JS - turning into something like MSIL means breaking JS runtime semantics or re-creating that in MSIL ourselves. The idea has been tried a little differently by MS research though, https://www.microsoft.com/en-us/research/publication/static-...
Re:New TypeScript Website by octernion on Wednesday August 05, 2020 @12:40PM (#24062769)
a great improvement in my opinion! typescript has grown on me tremendously over the years (coming from a long-time coffeescript advocate, which has been out of fashion and out of date for a long time, typescript while orthogonal has filled that niche).
Re:New TypeScript Website by jordache on Wednesday August 05, 2020 @02:20PM (#24063874)
i see their release timeline visualization is just divs with width hard coded in css.

Sigh, I had assumed they would implement a programmatic visualization that's bound to actual release data.

Re:New TypeScript Website by orta on Wednesday August 05, 2020 @02:22PM (#24063896)
It is bound to actual release data!

https://github.com/microsoft/TypeScript-Website/blob/v2/pack...

The divs are updated every time the website is re-deployed, and it deploys often. This means we don't need to run JS to give you the right date info.

Re:New TypeScript Website by jordache on Wednesday August 05, 2020 @02:26PM (#24063941)
thanks for the info and that link to the source.

Edit: Isn't this where the 55%, 28%, 17% widths derived from? Looks like a hard coded values?

https://github.com/microsoft/TypeScript-Website/blob/d4c638f...

Re:New TypeScript Website by orta on Wednesday August 05, 2020 @03:03PM (#24064306)
Ah, yeah that's what you mean - so the first time I built this graph I used the real dates and their difference from release to give accurate %s. This turned out to not work, because there wasn't enough space to fit the text underneath. I then explored making the graph vertical with accurate %s, but it still felt heavily one-sided at end with the beta/rc/release. all clumped at the bottom.

The third iteration is this, I moved the release date up into a sentence above, then had a mostly representational but kinda accurate overview of the three release stages. I think it gets the idea of the phases across, works in all browser sizes etc and doesn't take up too much visual space

Re:New TypeScript Website by protomyth on Wednesday August 05, 2020 @11:54AM (#24062201)
Is there a link to download the documentation because I missed it?
Re:New TypeScript Website by orta on Wednesday August 05, 2020 @02:33PM (#24064016)
For the handbook specifically (the part where we expect you to read from start to finish) I created both an epub and pdf in the publishing process, you can see the links here: https://www.typescriptlang.org/docs

The PDF one isn't stunning, bit of a WIP, but the epub one is good.

Re:New TypeScript Website by sbergot on Wednesday August 05, 2020 @11:59AM (#24062266)
Right at the end of the first sentence of the article.
Re:New TypeScript Website by protomyth on Wednesday August 05, 2020 @04:35PM (#24065276)
I totally missed it on mobile.
Re:New TypeScript Website by boromi on Wednesday August 05, 2020 @12:23PM (#24062582)
What kind of stack have they used to create the new site?
Re:New TypeScript Website by textread on Wednesday August 05, 2020 @12:33PM (#24062687)
"The main website for TypeScript, a Gatsby website which is statically deployed" https://github.com/microsoft/TypeScript-Website
Re:New TypeScript Website by orta on Wednesday August 05, 2020 @02:14PM (#24063807)
I gave a write-up on my motivations for choosing Gatsby on their blog too: https://www.gatsbyjs.org/blog/2020-01-23-why-typescript-chos...
[dead]
Re:New TypeScript Website by recursive on Wednesday August 05, 2020 @12:22PM (#24062570)
You might be responding to the wrong post. "Angela Davis" is nowhere on this post. It's about typescript.
Re:New TypeScript Website by jcrubino on Wednesday August 05, 2020 @12:26PM (#24062608)
The name "Angela Davis" Occupation Professor is on the header logo
Re:New TypeScript Website by rainworld on Wednesday August 05, 2020 @12:28PM (#24062629)
Re:New TypeScript Website by valuearb on Wednesday August 05, 2020 @11:38AM (#24062008)
Oh Microsoft marketing.

“The new version of the website was built out of a desire to make the documentation for TypeScript feel as expansive as its type-system, ”

I don’t know if I would call it “expansive”. I’d call it modern, powerful, efficient.

I say this thinking that most web developers view type systems as constraining, the opposite of expansive.

Re:New TypeScript Website by hombre_fatal on Wednesday August 05, 2020 @11:44AM (#24062091)
By picking on such an inconsequential bullet point, it almost seems like you picked the first thing that you could use, no matter how tenuous, to trojan-horse in the age-old dynamic- vs static-typing debate. ;)
Re:New TypeScript Website by valuearb on Wednesday August 05, 2020 @05:46PM (#24065981)
BTW: ironically I’m in the middle of porting a Node/React project to Typescript and wishing fervently that I had started before I created so much crappy code to convert.
Re:New TypeScript Website by valuearb on Wednesday August 05, 2020 @12:16PM (#24062486)
It’s the classic war of eternity.

But seriously, marketing is about using the exact right words, and this seemed sloppy.

Still, excited about the new site.