Rational numbers
Thanks, but I wasn’t able to make your hack work. Could you try it on this playground?
View ArticleRational numbers
You beat me to it! However, the whole fromString-conversion can be skipped with infix if we are ok with the n behind each number: Playground Edit: Again not sure if it makes sense, because then...
View ArticlePromise helper name
It might be worth noting that Node has a promise version of setTimeout that can be given an AbortSignal. I’ve called the Node version setTimeoutAsync and the promise+setTimeout version wait in my...
View ArticleRational numbers
Thank you so much! @fham: / will be needed for division of rational numbers, but one can use % to construct rationals. In both Haskell and purescript-rationals, % is used for this purpose.
View ArticleRational numbers
That’s true - since ReScript 12 we also have the % operator which you can overload as well.
View ArticleWhat is _ and ...?
i don’t really get the difference… i can do ...->Array.map(fn(x, _)) as well as ...->Array.map(fn(x, ...)) but what’s the actual difference here? also, why does … only work in the slot? should i...
View ArticleWhat is _ and ...?
_ is a pipe placeholder: Pipe | ReScript Language Manual … Is partial application: Function | ReScript Language Manual … only works in one spot, while you can use _ anywhere as a placeholder for a...
View ArticleExperimentation with simplifying pipe autocompletion
Related, and mostly shameless self-promotion: I made a video about some recent autocomplete improvements @zth made: When Your ReScript Editor Hits Avatar State
View ArticleWhy do I get "module or file RescriptCore can't be found" error on VSCode?
Hey! Any update on this? Last night I was working on a project, closed it and on the next day opened it and this error started to pop up radomly without any changes to the project or...
View ArticleWhy do I get "module or file RescriptCore can't be found" error on VSCode?
What editor are you using? Are you using the latest release of today?
View ArticleWhy do I get "module or file RescriptCore can't be found" error on VSCode?
Cursor. I do have the latest release from marketplace, which is from today. It seems that the latest release broke something for me.
View ArticleWhy do I get "module or file RescriptCore can't be found" error on VSCode?
1.66? Can you already get that on Cursor?
View ArticleWhy do I get "module or file RescriptCore can't be found" error on VSCode?
Sadly the current version for me is only 1.64… P.S Thanks for quick reply EDIT: I see that on vsc I got 1.66 tho
View ArticleWhy do I get "module or file RescriptCore can't be found" error on VSCode?
Ye, on vsc on the latest 1.66 I don’t get the module error anylonger from what I see EDIT: The current solution is to just download the latest release of the rescript extension and install it manually...
View ArticleRescript in neovim
Hi, I’m trying rescript in neovim for the first time. I’ve got some problem with the error reporting. First I didn’t have any error reporting, other than syntax errors. Then, I found that enabling...
View ArticleMap-like structure but using enum variants
If it’s just about mapping status → count, you could use a regular JS map: type status = Tracking | Watching | Completed let m = Map.make() m->Map.set(Watching, 1)
View ArticleRescript in neovim
Paging some Neovim users @aspeddro @shulhi @dkirchhof @DCKT @CarlOlson
View ArticleRescript in neovim
Hey, since language server version 1.62 or 1.63 you have to track for file changes by your own. So you can add the capabilities field to the lsp config: capabilities = { workspace = {...
View Article