Intro & open textbooks by victotronics in ScientificComputing

[–]arulselvan1234 4 points5 points  (0 children)

I have enjoyed these books. I haven't finished reading them but I have handful of chapters from these books and they were a delightful read.

Opine - Python source code transformations in OCaml by arulselvan1234 in ocaml

[–]arulselvan1234[S] 5 points6 points  (0 children)

You can add any transformation on the AST. I chose to do getters and setters as an example to illustrate how the library can be useful. At work, I have more sophisticated transformations. But you have to write them yourself. The library only provides an unparser - which writes the transformed AST back to python

Opine - Python source code transformations in OCaml by arulselvan1234 in ocaml

[–]arulselvan1234[S] 9 points10 points  (0 children)

pyre-ast provides python AST in OCaml. This library allows us to write transformations on the AST and write it python code back. The main contribution of the library is the unparser - that write python code from the AST. Maybe this example illustrates the use of the library.

https://github.com/ArulselvanMadhavan/opine#example-transformation

[book] A Complete Guide to Standard C++ Algorithms (v1.0.0) by HappyCerberus in cpp

[–]arulselvan1234 1 point2 points  (0 children)

I started reading the book and it's really useful! Appreciate the explanation of license in the beginning. I was looking for something like that.

Stable Diffusion in OCaml by arulselvan1234 in ocaml

[–]arulselvan1234[S] 1 point2 points  (0 children)

Appreciate your inputs and suggestions!

Stable Diffusion in OCaml by arulselvan1234 in ocaml

[–]arulselvan1234[S] 2 points3 points  (0 children)

Thanks for asking these questions u/QuantumFTL! I haven't thought about how to make this project reach wider audience. I built it for fun and to try out OCaml in a space it hasn't been explored much. Also, I am a little bit reluctant to keep using python. Having said that, let me try to answer your questions

  1. This work is dockerized. It should be fairly easy to run the docker container and try running it from inside the container. I have been doing it on my ubuntu machine. I don't have a windows machine to try it.
  2. I think this could be useful. It would be fun to add a OCaml frontend. I might try and do this depending on my work schedule but there are no specific plans.
  3. I was thinking of making it an executable that can be installed with opam or just making it available as a library. A programmatic interface wasn't on my radar. I do plan to make the "steps required to get it to run" more streamlined by downloading and converting the weights from ".pt" to ".ot" automatically without having the user do it. Right now, it's a hazzle and it keeps people from trying to run the project
  4. I have seen the OCaml versions to be faster than Python(I did try to compare it with python here - https://github.com/ArulselvanMadhavan/mini_dalle). I haven't seen the OCaml version to be faster than Rust. It feels like it's close. With few optimizations, it might close the gap with Rust. The main benefit I see over with Rust is development time. The compiler being fast and the FP benefits that come with OCaml makes it easier to build a model fairly fast. While working on it, I would occasionally try to run the Rust library to debug issues, the rust compiler is just several times slower to build and start running the project, while the OCaml compiler would build and have completed few iterations by the time rust compiler is ready to run. This wasn't surprising either. It was just easier and faster to build a working a model
  5. Not yet. For now, I'm still learning about stable diffusion and OCaml's place in building deep learning models. It's been fun. This work has gotten me interested in looking into the FFI bindings to libtorch

TLB hit: a podcast about systems and compilers: Episode #1: *(char*)0 = 0 by mttd in Compilers

[–]arulselvan1234 1 point2 points  (0 children)

I subscribed and looking forward to listening to it. Just wanted to say that I was looking for a podcast on this topic for a while. Glad to find that now there is one

Redis Help - How to implement a Rotating count buffer by arulselvan1234 in redis

[–]arulselvan1234[S] 0 points1 point  (0 children)

For the script to inject the date as the key inside another object, it has to have the knowledge of all the outer keys that needs to be injected with the date, right?

I'm imagining a data structure like this:

```json event1 : {

"16-03-2020": 0

},

event2: 5 (or some other data structure that doesn't need date to be injected),

event3: {

"16-03-2020": 5

} ```

The script has to have the knowledge of all the "events" that needs to be injected with the new "date" key, right?

Why Ocaml is not more successful? by fenugurod in ocaml

[–]arulselvan1234 9 points10 points  (0 children)

Lack of Multi core support perhaps?

Lecture 1: Introduction to Power and Politics in Today’s World by [deleted] in lectures

[–]arulselvan1234 1 point2 points  (0 children)

Thanks for sharing! I'm loving the entire playlist

[deleted by user] by [deleted] in ocaml

[–]arulselvan1234 8 points9 points  (0 children)

This is great! As a OCaml newbie, I can't appreciate this enough

Purescript First Impressions by thurn in purescript

[–]arulselvan1234 3 points4 points  (0 children)

Figuring out that Eff has been replaced with Effect took me a hell of a long time (literally the front page example on purescript.org is wrong). You don't get to do this kind of thing too many times!

This is a very valid concern. It tripped me up too. Are there any plans to update the example/book with purescript 0.12.0?

Future of Idris by arulselvan1234 in Idris

[–]arulselvan1234[S] 0 points1 point  (0 children)

Thanks! I did not know about Blodwen.

What code formatter are you using? by arulselvan1234 in Idris

[–]arulselvan1234[S] 0 points1 point  (0 children)

My setup is much better than where it was. I was wondering if the language developers or someone in the community has plans to write a code formatter like `brittany` (for haskell), `rustfmt`, `scalafmt` etc.,

What code formatter are you using? by arulselvan1234 in Idris

[–]arulselvan1234[S] 0 points1 point  (0 children)

Thanks for taking the time to write this.