alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tsns has quit [Remote host closed the connection]
rgrinberg has joined #ocaml
<discocaml>
<ec> How do you attach a syntax-extension / attribute to a particular one of several comma-separated let-bindings? i.e. this is syntactically invalid, is there a correct way to write it: `let a, b [@@foo], c = something`
sugarbeet has joined #ocaml
sugarbeet has left #ocaml [#ocaml]
bobo has joined #ocaml
spip has quit [Ping timeout: 260 seconds]
<discocaml>
<anmonteiro> `let a, (b [@foo]), c = something`
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
azimut has quit [Ping timeout: 255 seconds]
azimut has joined #ocaml
spip has quit [Remote host closed the connection]
spip has joined #ocaml
bgs has joined #ocaml
bgs has quit [Remote host closed the connection]
perrierjouet has quit [Ping timeout: 248 seconds]
perrierjouet has joined #ocaml
ionut_farcas has joined #ocaml
jao has quit [Ping timeout: 256 seconds]
ionut_farcas has quit [Remote host closed the connection]
Haudegen has joined #ocaml
Serpent7776 has joined #ocaml
bartholin has joined #ocaml
<discocaml>
<lukstafi> A non-abstract type -- product or disjunctive union: tuple types, record types, variant types, polymorphic variants.
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
azimut has quit [Ping timeout: 255 seconds]
bartholin has quit [Quit: Leaving]
waleee has quit [Ping timeout: 252 seconds]
tsns has joined #ocaml
olle has joined #ocaml
olle has quit [Remote host closed the connection]
<discocaml>
<emillon> I'm not sure I follow: attributes are attached to AST nodes, not types?
<discocaml>
<emillon> `@` attaches to things like expressions and patterns (as described in the linked manual)
<discocaml>
<NULL> It seems to me that this is the answer to the question : "What is an algebraic data type (ADT) ?", not an algebraic *category*
troydm has quit [Ping timeout: 255 seconds]
darchitect has joined #ocaml
<darchitect>
hey guys I'm just going through the RealWorldOcaml book
<darchitect>
and one of the first examples is about opening modules as a local context within a let binding
olle has joined #ocaml
<darchitect>
and it goes something like -> let open Float.O in ...
<darchitect>
what is the meaning or ".O" ? can't we just say -> let open Float in ...
<darchitect>
?
<olle>
Ehm
<olle>
Just dot works too
<olle>
let x = 10. in ...
<discocaml>
<emillon> Float.O is the name of a module
<discocaml>
<emillon> Here O is a module in the Float module
<discocaml>
<emillon> This is a naming convention to puts operators in a O submodule
<discocaml>
<emillon> This is a naming convention to put operators in a O submodule
<companion_cube>
(note that this module only exists in Base)
<olle>
Oh god base again
<discocaml>
<reynir> I have not heard of this convention before
Anarchos has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
<discocaml>
<leviroth> It’s a convention within base, not a general convention of OCaml code.
<discocaml>
<beajeanm> One of the numerous JaneStreet conventions. I think MyModule.Infix is bit more used elsewhere.
jao has joined #ocaml
Anarchos has quit [Read error: Connection reset by peer]
<discocaml>
<Bluddy> darchitect: I recommend switching to the Cornell book (https://cs3110.github.io/textbook/cover.html), which is more compatible with the stdlib. Once you've learned enough, reading RWO should be easier.
Anarchos has joined #ocaml
<olle>
RWO should come with a warning label xD
zozozo has quit [Ping timeout: 260 seconds]
<discocaml>
<boosh> bros
<discocaml>
<boosh> im wondering whats a cleaner way to write this in ocaml
<discocaml>
<boosh> ```ocaml
<discocaml>
<boosh> generate_all = (fun duel ->
<discocaml>
<boosh> let position_choices = List.init 5 (fun x -> x) in
<discocaml>
<boosh> let direction_choices = List.init 2 (fun x -> x |> direction_of_enum |> Option.get) in
<discocaml>
<boosh> let guardian_star_choices = List.init 2 (fun x -> x |> guardian_star_choice_of_enum |> Option.get) in
<discocaml>
<boosh> in haskell could be done in one line with list comprehension ```haskell
<discocaml>
<boosh> [hand_play_monster_single_cmd p d gs | p <- positions, d <- directions, gs <- guardian_stars]```
<olle>
oh-
<olle>
Please don't dump code longer than 5 lines or so
<olle>
That's actually readable on IRC tho
<discocaml>
<darrenldl> @boosh id try Seq.flat_map first
<discocaml>
<KW78> with let binding syntax `x3` (the monad being bound is the non-deterministic monad (bind is flat map indeed here) `let* pos =...`. You need to define your monad `let ( let* ) m kl =...flatmap...`
<discocaml>
<reynir> there is as well `List.concat_map`
<discocaml>
<NULL> The usual replacement for list comprehension is the monadic let, it would look like `let* p = positions in let* d = directions in let* gs = guardian_stars in return (hand_play_monster_single_cmd p d gs)`
trev_ has quit [Remote host closed the connection]
genpaku has quit [Read error: Connection reset by peer]
genpaku has joined #ocaml
bgs has joined #ocaml
Guest31 has joined #ocaml
Guest31 has quit [Client Quit]
tsns has joined #ocaml
rgrinberg has joined #ocaml
waleee has joined #ocaml
count3rmeasure has joined #ocaml
Anarchos has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
<discocaml>
<lukstafi> I'm having a hard time compiling manually, via `ocamlopt` or `ocamlfind ocamlopt`... I'm pointing to the folder with the `foo.cmx` (and `foo.o`) file with `-I`, but I'm still getting `Error: Unbound module Foo`.
<discocaml>
<froyo> you still need to specify the cmxes
Anarchos has quit [Remote host closed the connection]
<olle>
oh ok
<olle>
:(
<olle>
BeOS?
<discocaml>
<froyo> oooo ocaml on haiku/beos nice!
<olle>
What cpu...? Do I dare ask?
<olle>
68k ^^
<olle>
Z80?
oriba has joined #ocaml
Serpent7776 has quit [Ping timeout: 260 seconds]
xenu has quit [Quit: leaving]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
olle has quit [Ping timeout: 260 seconds]
count3rmeasure has quit [Quit: Leaving]
gwizon has quit [Ping timeout: 260 seconds]
gwizon has joined #ocaml
Anarchos has joined #ocaml
<discocaml>
<MasterBuilder> what options are there for realtime MIDI I/O?
bobo has quit [Ping timeout: 255 seconds]
drewolson has quit [Remote host closed the connection]
drewolson has joined #ocaml
companion_cube has quit [Ping timeout: 252 seconds]
companion_cube has joined #ocaml
bobo has joined #ocaml
<discocaml>
<mbacarella> is there a black magic way to create an uninitialized Array.t? (I'm aware there's a float_uninitialized but I'm not doing floats)