Hacker Newsnew | past | comments | ask | show | jobs | submit | jerrygoyal's commentslogin

Typescript is my favourite language. Glad it's being continuously developed.


I genuinely don’t understand this sentiment at all. Typescript looks great when you put it next to JavaScript in most cases. And looks like shit when you put it next to any other modern language that emerged from a similar time frame (Kotlin, Dart, Swift etc..)

I really don’t see TypeScript destined for long term success with the rise of Wasm on the web. It is only where it is currently because it has operated at a huge advantage of being the only viable solution to a problem that every web developer has needed.

I say this as someone who writes a lot of typescript professionally and a lot of Dart for everything else I possibly can. The difference between the two is huge on almost every factor I can think of where Dart wins by a considerable margin. I’m thankful that Typescript existed at a time when it did but I don’t think it’s in anyway actually a good or sensible language (because it’s so closely to JavaScript) and I can’t wait to not have to use it in the future because better options exist and are becoming viable for more use cases.


Have you engaged with the advanced features? TS is the only mainstream language that lets you express pretty much everything in the typesystem, to the point where I frequently have to hold myself back.

Having used Swift and Kotlin in the past, their typesystems don’t come close to the flexibility with which you can wrangle data in TS. Many concepts that I would consider fundamental are either not present or require complicated syntax eg.: product types A & B, sum types A | B, { …spreading }.

And where Swift needs custom syntax such as `guard let` and `case let` to narrow types, Typescript is able to analyze normal control flow.

For practical reasons, there are a ton of ugly workarounds, but I’d rather live with those than go back to the rigid “Java++” languages.


> product types A & B, sum types A | B

those are intersection types and union types and are much more unique and rare in type systems eg all typed functional languages have product/sum types but typescript is the only mainstream language I know to have unions and intersection.


The problem is the type system is not strong, where structural typing can cause a lot of issues, such as adding a property to an object for example and the typechecker will not care. This does not happen in more strongly, non-structural typed languages.


Yeah that's one of the practical workarounds I mentioned. It mostly comes up while spreading (which is why spreads should usually go first) and when persisting (which is why your ORM should have a runtime schema).

But it's a double edged sword:

- You can brand types with additional information. For example, React Query does this to keep track of which type is stored under which cache-key. This is where most strongly typed languages just give up.

- You can progressively extend/narrow types without having to worry about inheritance. Invariants can be statically checked by encoding them in a type: eg IssuedInvoice = Invoice & { … }. A function that needs only a subset of a domain-object can specify this rather than requiring the email-address to verify a phone number.

- You can even emulate nominal types using keyed unions.

The first two alone have saved me from more errors than structural typing introduced.


Why is Dart better in your experience?


Well: Static types exist at runtime, VM can optimize using type information (Inline caching, Devirtualization, predictable, fixed object layout), AOT compiled, Dart’s type system is sound, language-supported Isolates (wow feature), hot reload at runtime (wow feature) since Dart can patch classes and functions in memory.


That's a really good list. Thanks. I also miss type annotations not being reflected at runtime (like in Python). Would be great for things like schema validations at runtime. That said, I understand the challenges: that would require changing JS, and that would make JS files larger.

Hey, if anyone wants to use AI to draft replies but wants to make sure their data isn't trained by it, I've built a Chrome extension that does exactly that! You can plug in your API key, and it supports all SOTA models.

https://jetwriter.ai


I built a chrome extension (with over 600,000 downloads) that lets you chat with page, draft emails and messages, fix grammar, translate, summarize page, etc.. You can use models from OpenAI, Google, and Anthropic.

Yes, you can use your own API key as well.

https://jetwriter.ai

Feedbacks are welcome.


We used KaTeX via a React plugin to render math formulas as part of the AI response for our AI Writing Chrome extension (Jetwriter AI). We faced many challenges, especially with how different AI models syntax formulas, and had to do some string manipulation to make it work. Sadly, there isn't a go-to KaTeX library that would just work for AI chat apps.


For those who find red squiggly lines too distracting, I built a lightweight Chrome extension (<1MB) that approaches grammar correction in a minimalistic way: Highlight text -> Select "Correct grammar" from the toolbar -> Replace text.

The quality is unmatched because it uses SOTA models like GPT-5, Claude, and Gemini.

Yes, you can use your own API key as well.

https://jetwriter.ai


Does anyone know how to implement Memory feature like this for an AI wrapper. I built an AI writing Chrome Extension and my users have been asking to learn from their past conversations and I have no idea how to implement it (cost effective way)


For those who don't want to switch browsers I built a chrome extension that lets you chat with page, draft emails and messages, fix grammar, translate, summarize page, etc. You can use models not just from OpenAI but also from Google and Anthropic.

Yes, you can use your own API key as well.

https://jetwriter.ai

Feedbacks are welcome.


i do not want to use an API key. i just want to exploit my $20 chatgpt sub to the maximum. using an api key is just way too expensive.


You can’t even see a preview of your landing page without making an account. I tend to forget about sites like this after 60 seconds


I'm sorry but I didn't understand. You don't need to create any account to see landing page. There's also a video on landing page's hero section that shows a demo of product.


lol did you link the sign up link. It redirects to /app. Anyways give up there are too many of these


I see, I think you are already have an account so it redirects you to the web app.

If you want to give it another chance please try https://jetwriter.ai/home (it'll not redirect to /app for logged-in users)


They have 600k+ users - this is an achievement to be lauded!

Congrats on building something people want.


Thank you for the encouraging words! I've been building this for the last 3 years and I'm glad people are finding my tiny project helpful.


Can’t believe the top comment to this post is an ad of a competitor. No offense, your extension seems fine, but realistically how are you planning on surviving given OpenAI has moved to this space?


None taken :)

I'm not looking to become "Big" or "Rich", I want to just sustain my current lifestyle while building something I'm passionate about and I think this market is big enough to have room for such small players like me.


There's way more people using chrome (right now) than this new browser.


Duh? It just launched. That’s like saying there are way more people using vscode than cursor on the day cursor launched.


or you can extract book (kfx) from the Android kindle app location and run DeDRM via Calibre.


If you're not fan of vertical splitting sidebar check out Jetwriter AI. It opens up as an overlay modal and you can use your own API Key as well.


Hey, I'm the Author and this is such a nice surprise :). I'm glad you liked the story behind the project.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: