#Rescript

2025-05-21

I think my biggest frustration with #Rescript (which is why I'll probably rip it out of my pet project) is trying to translate all the #Typescript types into it.

I'm not sure if Rescript's types (which are basically #OCaml's types?) are less powerful per se, but it definitely feels like it. Maybe due to my inexperience with both.

2025-05-15

Any Rescript/Vue enthusiasts willing to roast my code?

It's a very incomplete attempt to bridge Vue 3's composition API to Rescript.

gitlab.com/-/snippets/4843469

#Rescript #vue #VueJS

2025-05-11

With the "magic" of imports and spending quite a while translating Vue's types to Rescript's, I managed to get them working together!

#Rescript #Vue #VueJS #Vue3

2025-02-20

Is #ReScript the future of #javascipt? A typed subset of JavaScript.

#Typescript is great but not all love it.

From the docs: "ReScript is the language for folks who don't necessarily love JavaScript, but who still acknowledge its importance."

rescript-lang.org

Kris Jenkinskrisajenkins
2025-02-20

As much as I like , I think there's still plenty of innovation left in the world of compiles-to-JavaScript languages. We need something that feels broadly like JavaScript, but shaves away the corner cases, makes everything immutable by default, and just...flows...better. And might well be that language. Let's find out...

youtu.be/yKl2fSdnw7w

2025-02-01

Hey scripting folks! I'm trying to get started with rescript-react-native and I'm having a bit of trouble, so I put a hundred dollars on it.

Come take my money!

github.com/rescript-react-nati

#bounty #bugbounty #javascript #react #reactJS #reactNative #rescript #rescriptReactNative

2024-12-10

thank you async await for saving me from #JavaScript callback hell

thank you #ReScript for saving me from typeless no-trail-of-what's-returning-what hell

I just followed a bunch of type errors and ended up with a beautiful chain of async calls that execute in the proper order it's so cute

J. David Eisenbergjdeisenberg@tech.lgbt
2024-10-21

@rauschma What is your opinion of #ReScript (rescript-lang.org/)? It has somewhat an #OCaml heritage via #ReasonML

Edit: Just looked at the source for Grain; it’s mostly ReasonML!

2024-10-21

So basically, it looks like the best way would be to:
1. Declare DTO types with *all* the fields (maybe using combining types if you use Rescript)
2. From these combined types, manually construct "entity" types. If needed, you can use composition (through records, tuples, etc) to combine multiple entities together.

#reasonml #Rescript #OCaml

2024-10-21

2. OCaml has proper OOP, with inheritance, method overrides, all that stuff. But, unlike records, it's not easy to bind to JS objects, I think.
3. Somewhere on Rescript forum I saw something like "prefer explicitness to DRY". Which I guess makes sense?

#reasonml #Rescript #OCaml

2024-10-21

What I think about it after some digging and poking around Melange and Rescript playgrounds:

1. Rescript can "combine" both object types and record types. If you have `type t1` and `type t2`, a `type t = {...t1, ...t2}` will have fields from both t1 and t2. But you can't put a variable of `type t` where a `t1` or `t2` is expected. At least this doesn't work: tinyurl.com/yv7j24mj

{cont}
#reasonml #Rescript #OCaml

2024-10-21

I don't mind breaking changes from time to time, but they really should have fully implemented import maps and written detailed documentation on the main site about how to upgrade *before* deprecating es6-global.

#ReScript

2024-10-19

A question about ReasonML/Rescript/OCaml on JS.
How do you deal with the lack of structure inheritance?

I'm mainly a backend dev with OOP background so I'm probably not seeing something.

But at work, our frontend has a lot of types (TS) like this:

```
type Client = BaseClient & {
assignees: Actor[]
}
```

We use these for types that we get from API (a base type + some additional fields).

How would you model something like that in Reason/Rescript/OCaml?

#reasonml #Rescript #OCaml

2024-10-12

I am adding the #ReScript language server to #nixpkgs. πŸ‘ this PR to get it merged github.com/NixOS/nixpkgs/pull/

2024-10-12

Hey, #Nix friends! I am working on making my first contribution to #nixpkgs, and I have a question:

The package I'm working on adding is an executable npm package, specifically the #ReScript language server.

I wouldn't mind taking on some responsibility for making sure that package is up to date, but it seems like the whole "maintainer" bit described here:

github.com/NixOS/nixpkgs/blob/

...isn't actually applicable to npm packages b/c they're handled automatically. Do I have that right?

#NixOS

2024-09-09

If a #JavaScript #programmer is compelled to trade up to #TypeScript, then he ought to take one more step to #ReScript and, from thence, to #Reason. With Reason in hand, he wields the full power of #OCaml.

JavaScript β†’ TypeScript β†’ ReScript β†’ Reason

2024-08-05

Wanted to bring #Rescript to one of my pet projects.
Realized that most of my JS code there is basically just fairly thin glue connecting Nanostores and some DOM events and native APIs. Not the part where Rescript would shine...

2024-06-22

During my parental leave I learned two new programming languages. One of them was #ReScript and I wrote up my impressions of it: snarky.ca/my-impressions-of-re .

2024-04-18

I wish #rescript had first-class monads 😭 I need my >=>
At the very least bring back online module opening syntax from #ReasonML and #OCaml πŸ˜”

#haskell #programming #functionalprogramming

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst