Quantcast
Channel: ReScript Forum - Latest posts
Browsing all 1912 articles
Browse latest View live

Why are the bindings for most libraries outdated?

Plugging my own things here, but check out these two for working with databases: pgtyped-rescript/RESCRIPT.md at rescript · zth/pgtyped-rescript · GitHub GitHub - zth/rescript-edgedb: Use EdgeDB fully...

View Article


Why are the bindings for most libraries outdated?

Nice. Thank you for your efforts!

View Article


Why are the bindings for most libraries outdated?

Keeping up with JS libraries APIs is a very thankless task. Most companies use a certain version of e.g. NextJS and when it’s good enough already, they don’t change anything. I myself maintain...

View Article

Why are the bindings for most libraries outdated?

I see it’s not a rewarding task. But creating bindings are not easy for beginners. I am getting to know how to write half baked bindings after 2 weeks. Lack of sufficient tutorials is one big reason....

View Article

AI bindings for ReScript + thanks for the meetup

Hi, Are there any ongoing initiatives for generating bindings with AI? I can’t find what is showcased in https://www.youtube.com/watch?v=3MzqLLLI8ts&t=3599s Nor does...

View Article


Image may be NSFW.
Clik here to view.

Merge tuples types

Could I do something clever to merge tuples? For example: ReScript Documentation ReScript Playground Try ReScript in the browser I have two values, and I want to create a new combined tuple value from...

View Article

Merge tuples types

you’re trying to create some kind of heterogeneous list, right? What problem are you trying to solve with this data structure?

View Article

Merge tuples types

Yes, I believe so. Right now, in my bindings I invoke an external function that returns: type queryResult<'documentdata> = ( option<Firebase.Firestore.querySnapshot<'documentdata>>,...

View Article


Merge tuples types

you likely know at compile time the types of the results you’re going to get, so depending on how you can to consume the results, you have multiple choices. create a record: type okResults = { a?:...

View Article


Merge tuples types

It really depends on the component. In some components, I have a single query, while in others, I have eight queries. Sometimes all the queries share the same generic type; other times, they do not....

View Article

Merge tuples types

at some point, you have to consume these results, so you have to know the dimension of your tuple and its inner types. What is the problem here? Is it about having tuples of dynamic size (which you...

View Article

Merge tuples types

Hmm, if combine8 needs to call all the other combineX functions that doesn’t seem so beneficial. Is there any reflection possible to merge 'a and 'b if they are tuples? Or maybe even some inline...

View Article

Merge tuples types

Would need to be tested, but I think this variadic JS function would work as an implementation. It’s not exactly pretty. const combineImpl = (...results) => { let result; for (const [data, loading,...

View Article


Confusion regarding generic type function definition inside of another function

let trace = (x:'a, b: string) => { Js.logMany([String.make(x), b]) x } let main = (): unit => { Console.log("Hi") let trace_err = trace(_, "err") trace("ADaS", "FD")->ignore trace(23,...

View Article

Image may be NSFW.
Clik here to view.

Confusion regarding generic type function definition inside of another function

I guess you have to use scoped polymorphic types for that. ReScript Syntax Lookup Syntax Lookup | ReScript Documentation Discover ReScript syntax constructs with our lookup tool Actually I can’t tell...

View Article


Merge tuples types

The issue is not really about merging the tuples but about keeping the type information, right?

View Article

Merge tuples types

And if it’s about writing those cumbersome combine functions, well, you’re going to write those only once and use it many times, so it’s likely worth it!

View Article


Merge tuples types

Yes, I have different pages in my application. Each react component linked to a page does a different set of queries (so multiple queryResults). And I want to show a spinner when something is loading,...

View Article

Confusion regarding generic type function definition inside of another function

Type variables are scoped to the top level definition, so by naming it you are forcing it to take on a single type for each invocation of the top level function. Part of your confusion might also stem...

View Article

Merge tuples types

To clarify, my point was simply that, putting that JS function (or something like it) in a file, you could then bind to it for all of your combine functions without having to do the runtime busywork...

View Article
Browsing all 1912 articles
Browse latest View live