companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 5.0 released(!!1!): https://ocaml.org/releases/5.0.0.html | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
alphacentauri has joined #ocaml
<discocaml> <akhilindurti> is there a reason why some of the return types in base use polymorphic variants, while others don't?
<discocaml> <akhilindurti> like https://ocaml.org/p/base/latest/doc/Base/List/Or_unequal_lengths/index.html#type-t.Unequal_lengths is a regular ADT
<discocaml> <akhilindurti> ```OCaml
<discocaml> <akhilindurti> type 'a t =
<discocaml> <akhilindurti> | Ok of 'a
<discocaml> <akhilindurti> | Unequal_lengths
<discocaml> <akhilindurti> ```
<discocaml> <akhilindurti> while https://ocaml.org/p/base/latest/doc/Base/Map/Or_duplicate/index.html#type-t.Duplicate is a polyvar
<discocaml> <akhilindurti> ```OCaml
<discocaml> <akhilindurti> type 'a t = [
<discocaml> <akhilindurti> | `Ok of 'a
<discocaml> <akhilindurti> | `Duplicate
<discocaml> <akhilindurti> ]
<discocaml> <akhilindurti> ```
pAw_patrol has joined #ocaml
pAw_patrol has quit [Remote host closed the connection]
waleee has quit [Ping timeout: 240 seconds]
nicosm has joined #ocaml
edr has quit [Quit: Leaving]
bibi_ has quit [Ping timeout: 258 seconds]
tizoc has quit [Quit: Coyote finally caught me]
tizoc has joined #ocaml
uncomfy has joined #ocaml
chrisz has quit [Ping timeout: 245 seconds]
chrisz has joined #ocaml
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
alphacentauri has quit [Ping timeout: 240 seconds]
alphacentauri has joined #ocaml
rgrinberg has joined #ocaml
bartholin has joined #ocaml
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<discocaml> <regularspatula> I have also wondered that. Interesting that base Base.Map has a few submodules where some use the poly variant and some don't
yoyofreeman has joined #ocaml
rgrinberg has joined #ocaml
uncomfy has quit [Ping timeout: 252 seconds]
azimut has quit [Ping timeout: 252 seconds]
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
uncomfy has joined #ocaml
bartholin has quit [Quit: Leaving]
Serpent7776 has joined #ocaml
mro has joined #ocaml
gentauro has quit [Read error: Connection reset by peer]
yoyofreeman has quit [Remote host closed the connection]
gentauro has joined #ocaml
myrkraverk_ has quit [Quit: Leaving]
nicosm has quit [Remote host closed the connection]
dhil has joined #ocaml
uncomfy has quit [Remote host closed the connection]
jlrnick has joined #ocaml
<discocaml> <sagar_matha> I'll help anyone interested in earning $30k within a week. But you will pay me 10% of your profits when you Receive it. Only interested people should DM. By Asking Me HOW!
<discocaml> <._null._> @admin
yoyofreeman has joined #ocaml
<discocaml> <._null._> Thank you
nicosm has joined #ocaml
jlrnick has quit [Ping timeout: 240 seconds]
nicosm has quit [Remote host closed the connection]
bibi_ has joined #ocaml
yoyofreeman has quit [Remote host closed the connection]
yoyofreeman has joined #ocaml
myrkraverk has joined #ocaml
nicosm has joined #ocaml
myrkraverk has quit [Read error: Connection reset by peer]
myrkraverk has joined #ocaml
yoyofreeman has quit [Read error: Connection reset by peer]
olle has joined #ocaml
<olle> "Finished" version 0.2 of my PHP-to-PHP-and-C transpiler. Written in OCaml of course. :D http://olleharstedt.github.io/programming/2023/03/19/memory-polymorphic-spldoublylinkedlist-pholyglot.html
<olle> Related to some previous ideas I had about opt-out-of-GC "kinds" or whatevs
bibi_ has quit [Ping timeout: 248 seconds]
nicosm has quit [Ping timeout: 255 seconds]
nicosm has joined #ocaml
myrkraverk has quit [Remote host closed the connection]
myrkraverk has joined #ocaml
nicosm has quit [Remote host closed the connection]
nicosm has joined #ocaml
nicosm has quit [Read error: Connection reset by peer]
nicosm has joined #ocaml
<discocaml> <darrenldl> anyone has a problem handy that's very nicely handled by recursion but exceptionally (or at least very) messy with loops+stack?
<discocaml> <darrenldl> (this is in the context of teaching, and trying to motivate recursion maybe more convincingly than needed)
bibi_ has joined #ocaml
<companion_cube> Anything with CPS
<companion_cube> Or really, many things involving tree traversal such as AST manipulation
nicosm has quit [Read error: Connection reset by peer]
nicosm has joined #ocaml
rgrinberg has joined #ocaml
waleee has joined #ocaml
jlrnick has joined #ocaml
nicosm has quit [Read error: Connection reset by peer]
nicosm has joined #ocaml
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<zozozo> typing / mapping of trees is very natural with recursion but annoygin with loops+stacks
<myrkraverk> darrenldl: numerical computations of the integration, differentiation variety. I once surprised my teacher so much that he thought I was cheating, because my final calculation "didn't do anything" and wasn't a mess of an imperative loop.
<myrkraverk> I had to explain the recursive solution.
<myrkraverk> [It also happened that my solution had the same name as the standard library that did the thing.]
azimut has joined #ocaml
waleee has quit [Ping timeout: 240 seconds]
waleee has joined #ocaml
rgrinberg has joined #ocaml
<discocaml> <darrenldl> many thanks companion_cube, myrkraverk
bibi_ has quit [Ping timeout: 240 seconds]
dnh has joined #ocaml
waleee has quit [Ping timeout: 240 seconds]
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nicosm has quit [Remote host closed the connection]
mro has quit [Quit: Leaving]
<discocaml> <fatpointer> Any advice on calling C/C++ functions from Ocaml? I have some sense by google search but not sure implementing in details. Anyone have experience doing that?
<discocaml> <fatpointer> Any advice on calling C++ functions from Ocaml? I have some sense by google search but not sure implementing in details. Anyone have experience doing that?
yziquel has joined #ocaml
<discocaml> <octachron> Without stable ABI, are there any options for C++ bindings other than going through C interface?
<discocaml> <jumpnbrownweasel> The only compilers I've seen do this are those with a C++ backend.
<companion_cube> you have to go through the C ABI yeah
<companion_cube> but in any case you need to write stubs, at least the traditional way, so it's not hard to use the C ABI there
<companion_cube> extern "C" { … // stubs here }
bibi_ has joined #ocaml
alphacentauri has quit [Quit: WeeChat 4.0.5]
alphacentauri has joined #ocaml
jlrnick has quit [Ping timeout: 255 seconds]
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
Anarchos has joined #ocaml
patrick has quit [Killed (NickServ (GHOST command used by podge!~patrick@fsf/member/patrick))]
patrick_ has joined #ocaml
patrick_ is now known as patrick
azimut has quit [Ping timeout: 252 seconds]
azimut has joined #ocaml
yziquel has quit [Quit: Ping timeout (120 seconds)]
Anarchos has quit [Quit: Vision[]: i've been blurred!]
rgrinberg has joined #ocaml
bibi__ has joined #ocaml
bibi_ has quit [Ping timeout: 240 seconds]
azimut has quit [Ping timeout: 252 seconds]
azimut has joined #ocaml
bibi__ has quit [Ping timeout: 258 seconds]
olle has quit [Ping timeout: 255 seconds]
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Serpent7776 has quit [Ping timeout: 248 seconds]
nicosm has joined #ocaml
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bibi_ has joined #ocaml
infinity0_ has joined #ocaml
infinity0 is now known as Guest2550
Guest2550 has quit [Killed (mercury.libera.chat (Nickname regained by services))]
infinity0_ is now known as infinity0
nicosm has quit [Remote host closed the connection]
nicosm has joined #ocaml
Serpent7776 has joined #ocaml
rgrinberg has joined #ocaml
<discocaml> <godpr> Can I run a dune based ocaml project on Rasberry Pi?
<discocaml> <Kali> if you compile for arm, yes
<reynir> dune is not an obstacle to running it on raspberry pie
dhil has quit [Ping timeout: 255 seconds]
jlrnick has joined #ocaml
nicosm has quit [Remote host closed the connection]
dnh has joined #ocaml
cedric has joined #ocaml
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nicosm has joined #ocaml
cedric has quit [Client Quit]
Anarchos has joined #ocaml
nicosm has quit [Remote host closed the connection]
nicosm has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
jlrnick has quit [Ping timeout: 252 seconds]
Serpent7776 has quit [Ping timeout: 258 seconds]
<discocaml> <dinosaure> You can cross-compile fof arm64 an simple executable or even more make your own operating system in OCaml for raspberry pie 4 (see https://github.com/dinosaure/gilbraltar)
nicosm has quit [Remote host closed the connection]
rgrinberg has joined #ocaml
bartholin has joined #ocaml
bartholin has quit [Quit: Leaving]
Tuplanolla has joined #ocaml
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hexology- has quit [Remote host closed the connection]
hexology has joined #ocaml