I need help with Boolean Satisfiability Solver Project in OCAML
Reddit » OCaml
by /u/Maleficent_Damage829
5h ago
I need to complete this project but I have very little knowledge in Ocaml. I have the complete PDF explaining what needs to be done as well as the starting files including a driver. All the functions are created just need to be implemented. https://preview.redd.it/j9ahy1fohvwc1.png?width=630&format=png&auto=webp&s=6b3f41919cf7c6d21adcbdc8ccfabe71b77fc58f submitted by /u/Maleficent_Damage829 [visit reddit] [comments ..read more
Visit website
Not needing to equate field value in record when matches a function argument
Reddit » OCaml
by /u/Exciting_Ganache4295
5h ago
I'm not exactly sure why this confused me and it's definitely a newbie question so bear with me: Does value in the new_elt record not need to be equated to anything in... let insert_after elt value = let new_elt = { value; prev = Some elt; next = elt.next } in (match elt.next with | Some old_next -> old_next.prev <- Some new_elt | None -> ()); elt.next <- Some new_elt; new_elt ...because when the user puts in a value for the value argument of insert_first it's essentially the same as let value = whatever you put as the argument limited to the scope of the function? submitted b ..read more
Visit website
The OCaml Weekly News for 2024-04-23 is out
Reddit » OCaml
by /u/brabarb
3d ago
submitted by /u/brabarb [visit reddit] [comments ..read more
Visit website
Help with OCaml Interpreter for Functional Programming
Reddit » OCaml
by /u/Melodic_Barracuda212
3d ago
I need help to complete an OCaml Project. For my OCaml class, I have completed two projects on building an interpreter for a stack-oriented language. Now this last project is shorter, and almost the same excpet for functional programming languages. This is a short project that involves building an interpreter for a short functional language. There is an EBNF grammar for the syntax of the language as well as the collection of inference rules for the reduction relation which defines the operational semantics of the language. I completed the first two projects for the class, and now I'm worn out ..read more
Visit website
Do modules support dependency injection? (details enclosed)
Reddit » OCaml
by /u/mister_drgn
5d ago
I know modules support some kinds of dependency injection, but here’s what I’m thinking of… I have several components. A component is a data structure that supports certain functions. Thus, all components share the same signature (say, the same module type), similar to how you might say they support the same interface in a language like Go. But they have different internal representations, and they do different things (image segmentation, object detection, various AI reasoning tasks, etc). Now, I want to collect these components in an ocaml list, so I can fold over them and call a supported f ..read more
Visit website
Differences between functor and functions on modules
Reddit » OCaml
by /u/MrBrownFR
5d ago
Hi, I've been learning OCaml for 2 years now, but I'm still confused on the differences between functors and functions that act on modules. From what I understand, functors are modules that take a module as a parameter, so that functions from the parameter can be used to create other functions in the resulting module. However, modules being first-class citizens, they can also be passed in and returned from functions, in the same way a functor would. So what are the differences between both ? Is one more idiomatic than another ? Thanks ! submitted by /u/MrBrownFR [visit reddit] [comments ..read more
Visit website
Is Ocaml as Functional as Haskell?
Reddit » OCaml
by /u/CodeNameGodTri
1w ago
[Sorry I don't know how to make this shorter] hi, does Ocaml support monad transformer first class as in Haskell? I know there is the monad library implementing monad transformer, but would people use it regularly, or they would avoid using it until really need it? Like I would imagine people using Haskell live and breathe in monad and monad transformer with do notation everywhere, is Ocaml the same in that aspect? I mean last I check, there is no native equivalent of Haskell do-notation in Ocaml, and people have to simulate it by create a `let*` that aliases the bind function, so I guess it ..read more
Visit website
Just started learning OCaml and wow, this is amazing
Reddit » OCaml
by /u/vicisvis
1w ago
https://preview.redd.it/z49hfsb4mavc1.png?width=941&format=png&auto=webp&s=2260424ee13b40719f965987f43939546045fa47 submitted by /u/vicisvis [visit reddit] [comments ..read more
Visit website
OCaml for F# Devs
Reddit » OCaml
by /u/Proclarian
1w ago
I'm coming from an F# background. I know F# started off as OCaml for the .Net platform, but the two have idiosyncracises -- similar to when you compare Java and C#. I tired OCaml a while back and one thing that I got annoyed with was the "in" keyword. I couldn't quite figure out when I needed to use it. I was thinking about picking it up again but I want to know what language-level constructs are different between OCaml and F# so I can manage my expectations going into it. Also, are there any gotchyas in the standard library I should watch out for? submitted by /u/Proclarian [visit reddit ..read more
Visit website
The OCaml Weekly News for 2024-04-16 is out
Reddit » OCaml
by /u/brabarb
1w ago
submitted by /u/brabarb [visit reddit] [comments ..read more
Visit website

Follow Reddit » OCaml on FeedSpot

Continue with Google
Continue with Apple
OR