flyweight
proposal-type-annotations
flyweight | proposal-type-annotations | |
---|---|---|
9 | 101 | |
503 | 4,097 | |
- | 0.6% | |
8.9 | 4.7 | |
1 day ago | about 2 months ago | |
JavaScript | JavaScript | |
MIT License | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
flyweight
- Flyweight: A Node.js ORM Specifically for SQLite
-
Show HN: Quietone – search audio and video by transcript
Hey. This is my first electron app. It is called Quietone and I just thought it would be cool to navigate and manipulate videos by their transcript because searching through videos for the things I was looking for was very slow otherwise.
I used whisper.cpp to do the transcribing. It has held up really well. The tiny model (the fastest one) can transcribe 2 hours of video in a couple of minutes on my m2 mac mini and the accurate of even the tiny model is pretty good.
I used Electron Forge to package the app for different operating systems and distribution channels. There are no guides on the internet on how to do that properly so that took quite a bit of time to figure out.
At multiple stages I had to look through source code of Electron Forge's dependencies to figure out how I was supposed to use it to correctly sign the app for the mac app store.
I made this app using the tools I like to use, which is not very typical. I use straight javascript, no transpiling, and I wrote every single library myself from the ORM https://github.com/thebinarysearchtree/flyweight to the front-end framework, which is a thin wrapper over web components.
Oh yeah, Electron recently started supporting esm, but Electron Forge doesn't fully support it so I had to use esbuild to compile to cjs just for the packaging step.
I use events to make everything change in real-time in the UI. Umm... oh yeah I did include yt-dlp features but had to remove that for the store versions.
It is available on the mac store, and soon on the windows store. There is also a trial you can download. The windows store experience is not very polished compared to the mac store. I was amazed that there are humans reviewers looking through everything I upload. hah.
Anyway, I have to go find a job now and hope my username doesn't check out. Bye. Thanks for reading my blog.
-
Is TypeScript actually worth It?
I wrote https://github.com/thebinarysearchtree/flyweight in JavaScript, not TypeScript. It generates TypeScript declaration files as it types SQL, which helps with intellisense support in VSCode. That is the only reason I use TypeScript.
I don't like TypeScript though, and would never write anything in it. I have a long history with C# and I came to conclusions about this topic a long time ago. I just prefer writing JavaScript, it is more fun and more productive.
Flyweight is quite a complex library. It parses arbitrarily complex SQL. This is more complex than most of the things people work on and claim they need static typing. It isn't millions of lines of code, but often those codebases aren't complex, they are just many independent components that in themselves are not that complex.
The amount of time I spend having to update the TypeScript aspect of my library is really quite annoying. Also, with regards to your point about libraries not including type information - this is also true for the actual native APIs in the browser and so on as well. For example, TypeScript doesn't recognise the "indices" property of regular expression matches.
- GitHub - thebinarysearchtree/flyweight: An ORM for SQLite
- Flyweight: An ORM for SQLite
proposal-type-annotations
-
Bun 1.1
That proposal is not fully compatible with Typescript: https://github.com/tc39/proposal-type-annotations?tab=readme...
-
Go 1.22 Release Notes
They held a meeting a few months ago so it's alive but probably still years away.
https://github.com/tc39/proposal-type-annotations/issues/184
-
[AskJS] Kicking a dead horse - TS vs JS
I particularly like this thread in the TC39 types proposal. TypeScript IS a development trojan horse and locks you into the Microsoft Way of being a JS developer.
- Strong static typing, a hill I'm willing to die on...
-
HTML First – Six principles for building simple, maintainable, web software
Edit: There is a proposal to extend JavaScript with type annotations, which would allow ("a reasonably large subset") of TypeScript to run directly in the browser. Yay!
https://github.com/tc39/proposal-type-annotations
-
Building React Components Using Unions in TypeScript
More importantly, TypeScript typically commits to build things into itself when the proposal in JavaScript reaches Stage 3. The pattern matching proposal in JavaScript is Stage 1, but depends on many other proposals as well that may or may not need to be at Stage 3 as well for it to work. This particular proposal is interested on pattern matching on JavaScript Objects and other primitives, just like Python does with it’s native primitives. These are also dynamic types which helps in some areas, but makes it harder than others. Additionally, the JavaScript type annotations proposal needs to possibly account for this. So it’s going to be awhile. Like many years.
-
Show HN: Conway's Game of Life in TypeScript's type system
this is exactly what I want from the _Types as Comments_ proposal[0] as I think it's the only way that types can feasibly become part of the language. It's hard to imagine how all of the concepts TS introduces via special syntax can be covered otherwise.
[0] https://tc39.es/proposal-type-annotations
-
Why Htmx Does Not Have a Build Step
Crossing my fingers that the proposal for allowing (browser-ignored) type annotations in javascript progresses: https://tc39.es/proposal-type-annotations/
Between that, HTTP2/3 and ES modules many of the downsides for building apps with no compile step are almost completely mitigated.
-
TypeScript Without Transpilation
JSDoc can get you pretty far, but it can be clumsy sometimes. There’s a [TC39 proposal](https://github.com/tc39/proposal-type-annotations) to allow types to live in JS code and be treated as comments (similar with Python types today)
- Do you think typescript will ever have native support on brosers? Or we will have only the JS type annotations?
What are some alternatives?
sequelts
astexplorer - A web tool to explore the ASTs generated by various parsers.
mayim - The *NOT* ORM hydrator
Scala.js - Scala.js, the Scala to JavaScript compiler
d2-playground - An online runner to play, learn, and create with D2, the modern diagram scripting language that turns text to diagrams.
rescript-compiler - The compiler for ReScript.
Carp - A statically typed lisp, without a GC, for real-time applications.
LINQ to DB - Linq to database provider.
SQLDelight - SQLDelight - Generates typesafe Kotlin APIs from SQL
proposal-record-tuple - ECMAScript proposal for the Record and Tuple value types. | Stage 2: it will change!