adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | Upcoming OCaml MOOC: https://huit.re/ocamlmooc | OCaml 4.03.0 release notes: http://ocaml.org/releases/4.03.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
d0nn1e has joined #ocaml
smondet has joined #ocaml
veggie_ has quit [Ping timeout: 252 seconds]
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 250 seconds]
dreadedfrog_ has quit [Ping timeout: 245 seconds]
dreadedfrog_ has joined #ocaml
bronsen has quit [Ping timeout: 250 seconds]
sz0 has quit [Quit: Connection closed for inactivity]
al-damiri has quit [Quit: Connection closed for inactivity]
MrMateus has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
yomimono has quit [Ping timeout: 244 seconds]
jmiven has quit [Quit: co'o]
jmiven has joined #ocaml
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 268 seconds]
ocaml727 has joined #ocaml
conrad4 has joined #ocaml
maattdd1 has joined #ocaml
maattdd has quit [Ping timeout: 260 seconds]
grinbergr has quit [Remote host closed the connection]
rgrinberg has joined #ocaml
rgrinberg has quit [Remote host closed the connection]
brunoro has joined #ocaml
silver has quit [Read error: Connection reset by peer]
brunoro has quit [Ping timeout: 256 seconds]
mfp has quit [Ping timeout: 260 seconds]
huza has joined #ocaml
nomicflux has quit [Quit: nomicflux]
minn has joined #ocaml
ygrek has quit [Ping timeout: 260 seconds]
smondet has quit [Ping timeout: 250 seconds]
nomicflux has joined #ocaml
agarwal1975 has quit [Quit: agarwal1975]
<Heasummn> how do I pass in variables to menhir
<Heasummn> I have an error handler that I want menhir to update
<Heasummn> I'd like to do it functionally, by letting menhir take my error handler from the lexer, but I can use globals if that's required
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 256 seconds]
wxfdglm has joined #ocaml
TarVanimelde has joined #ocaml
nomicflux has quit [Quit: nomicflux]
conrad4 has quit [Quit: WeeChat 1.3]
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 256 seconds]
kevinch has joined #ocaml
michbad has joined #ocaml
nomicflux has joined #ocaml
AlexRussia has quit [Ping timeout: 268 seconds]
TarVanimelde has quit [Ping timeout: 250 seconds]
Heasummn has quit [Ping timeout: 250 seconds]
djellemah_ has joined #ocaml
MercurialAlchemi has joined #ocaml
AlexDenisov has joined #ocaml
brunoro has joined #ocaml
AlexRussia has joined #ocaml
brunoro has quit [Ping timeout: 244 seconds]
nomicflux has quit [Quit: nomicflux]
wxfdglm has quit [Ping timeout: 260 seconds]
ocaml727 has quit [Ping timeout: 260 seconds]
wxfdglm has joined #ocaml
pierpa has quit [Ping timeout: 265 seconds]
michbad has quit [Ping timeout: 244 seconds]
MercurialAlchemi has quit [Ping timeout: 250 seconds]
michbad has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
MercurialAlchemi has joined #ocaml
ygrek has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 260 seconds]
mcc has quit [Quit: Connection closed for inactivity]
noddy has quit [Ping timeout: 256 seconds]
wolfcore has quit [Ping timeout: 250 seconds]
brunoro has joined #ocaml
wolfcore has joined #ocaml
brunoro has quit [Ping timeout: 250 seconds]
michbad has quit [Read error: Connection reset by peer]
noddy has joined #ocaml
powq has joined #ocaml
Algebr` has quit [Ping timeout: 252 seconds]
MercurialAlchemi has joined #ocaml
brunoro has joined #ocaml
djellemah_ has quit [Ping timeout: 256 seconds]
brunoro has quit [Ping timeout: 260 seconds]
Algebr` has joined #ocaml
malc_ has joined #ocaml
alfredo has joined #ocaml
kevinch has quit [Quit: Computer has gone to sleep.]
kevinch has joined #ocaml
alfredo has quit [Ping timeout: 260 seconds]
timeyyy has joined #ocaml
ygrek has quit [Ping timeout: 250 seconds]
timeyyy_ has joined #ocaml
timeyyy has quit [Read error: Connection reset by peer]
demonimin has quit [Ping timeout: 260 seconds]
timeyyy has joined #ocaml
ia0 has quit [Quit: reboot]
demonimin has joined #ocaml
timeyyy has quit [Read error: Connection reset by peer]
_timeyyy has joined #ocaml
_timeyyy has quit [Read error: Connection reset by peer]
ia0 has joined #ocaml
timeyyy_ has quit [Ping timeout: 260 seconds]
rand__ has joined #ocaml
<ra4king> fun times
huza has quit [Quit: WeeChat 1.0.1]
<ra4king> I thought I was done with OCaml for my Programming Languages course but Assignment 2 involves it
<ra4king> welcome back gang
argent_smith has joined #ocaml
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 260 seconds]
jnavila has joined #ocaml
Algebr` has quit [Ping timeout: 250 seconds]
zpe has joined #ocaml
<flux> :)
argent_smith1 has joined #ocaml
argent_smith has quit [Ping timeout: 265 seconds]
copy` has quit [Quit: Connection closed for inactivity]
kevinch has quit [Quit: Computer has gone to sleep.]
AltGr has joined #ocaml
frefity has quit [Ping timeout: 260 seconds]
TarVanimelde has joined #ocaml
TarV has joined #ocaml
TarV has quit [Client Quit]
Simn has joined #ocaml
zpe has quit [Remote host closed the connection]
frefity has joined #ocaml
frefity has quit [Ping timeout: 260 seconds]
argent_smith has joined #ocaml
AlexRussia has quit [Ping timeout: 256 seconds]
argent_smith1 has quit [Ping timeout: 260 seconds]
brunoro has joined #ocaml
AlexDenisov has joined #ocaml
argent_smith1 has joined #ocaml
argent_smith has quit [Ping timeout: 252 seconds]
brunoro has quit [Ping timeout: 250 seconds]
malc_ has quit [Ping timeout: 268 seconds]
frefity has joined #ocaml
Sim_n has joined #ocaml
dmi3y has joined #ocaml
dmi3y has quit [Client Quit]
Simn has quit [Ping timeout: 250 seconds]
djellemah_ has joined #ocaml
dmi3y has joined #ocaml
argent_smith1 has quit [Ping timeout: 268 seconds]
ontologiae has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
djellemah_ has quit [Ping timeout: 245 seconds]
dmi3y has quit [Quit: dmi3y]
larhat has joined #ocaml
AlexDenisov has joined #ocaml
baozii has joined #ocaml
baozii has left #ocaml [#ocaml]
dmi3y has joined #ocaml
brunoro has joined #ocaml
average has quit [Quit: leaving]
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
brunoro has quit [Ping timeout: 260 seconds]
jwatzman|work has joined #ocaml
argent_smith has joined #ocaml
malc_ has joined #ocaml
TarVanimelde has quit [Quit: Leaving]
minn has quit [Ping timeout: 245 seconds]
minn has joined #ocaml
brunoro has joined #ocaml
kakadu has joined #ocaml
zpe has joined #ocaml
djellemah_ has joined #ocaml
zpe_ has joined #ocaml
zpe has quit [Ping timeout: 265 seconds]
mfp has joined #ocaml
Algebr` has joined #ocaml
zpe_ has quit [Ping timeout: 244 seconds]
AlexDenisov has joined #ocaml
Algebr` has quit [Read error: Connection reset by peer]
Algebr` has joined #ocaml
_andre has joined #ocaml
average has joined #ocaml
sillyotter has joined #ocaml
AlexRussia has joined #ocaml
minn has quit [Ping timeout: 245 seconds]
dmi3y has quit [Quit: dmi3y]
AlexRussia has quit [Ping timeout: 268 seconds]
AlexRussia has joined #ocaml
jao has joined #ocaml
zpe has joined #ocaml
sillyotter has quit [Quit: WeeChat 1.4]
brunoro has quit [Ping timeout: 252 seconds]
Algebr`` has joined #ocaml
Algebr` has quit [Ping timeout: 250 seconds]
jao has quit [Read error: Connection reset by peer]
jao has joined #ocaml
freusque has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dmi3y has joined #ocaml
jao has quit [Ping timeout: 260 seconds]
Algebr`` is now known as Algebr
dmi3y has quit [Client Quit]
dmi3y has joined #ocaml
dario9 has joined #ocaml
<dario9> I've come across an issue with Oasis. Basically I have an executable "exec" that has one module "foo_stubs.c" written in C.
<dario9> I've added "CSources: foo_stubs.c" to the "Executable exec" section of my _oasis file.
<dario9> However, upon compilation I get an undefined reference to "caml_foobar" error. "caml_foobar" is the name of the function declared in foo_stubs.c.
<dario9> I've successfully used CSources with Oasis before, but always in the context of libraries, not executables.
<dario9> Is this a known limitation of Oasis, or is there some special incantation I'm missing?
<Algebr> maybe just make a small wrapper lib just for this c file, then add in BuildDepends of the exectuable
brunoro has joined #ocaml
rgrinberg has joined #ocaml
agarwal1975 has joined #ocaml
malina has joined #ocaml
gjaldon has joined #ocaml
shinnya has joined #ocaml
<rgrinberg> Is there a way to constrain an opam package to be available on ocaml switches with ocamlopt?
<rgrinberg> I.e. the package isn't available on bytecode only systems
<Drup> rgrinberg: the predicate "ocaml:native" is avaiable
fraggle-boate_ has quit [Quit: Quitte]
fraggle-boate has joined #ocaml
malc_ has quit [Read error: Connection reset by peer]
<rgrinberg> Drup: so could I add something like & "%{ocaml-native}" to the available field??
<rgrinberg> or just & {ocaml-native} actually
dmi3y has quit [Quit: dmi3y]
wu_ng has joined #ocaml
<Drup> I think
<Drup> you should consult the manual :D
dmi3y has joined #ocaml
grayswandyr has joined #ocaml
troydm has quit [Ping timeout: 268 seconds]
octachron has joined #ocaml
ethnopes has joined #ocaml
whisperedcigar has joined #ocaml
dreadedfrog_ has quit [Ping timeout: 245 seconds]
malina has quit [Ping timeout: 260 seconds]
ethnopes has quit [Read error: Connection reset by peer]
ethnopes has joined #ocaml
ethnopes has quit [Read error: Connection reset by peer]
ciniglio` has joined #ocaml
<rgrinberg> Well that didn't work :/
<Drup> huum, I'm not sure
minn has joined #ocaml
<Drup> AltGr ?
ethnopes has joined #ocaml
<AltGr> Have I been summoned ?
<Drup> Yes you have :D
<companion_cube> aantron: btw, re-read the thread on lwt-stream, still quite interesting ^^
<rgrinberg> AltGr: how do I make a package ocamlopt only? I tried https://github.com/ocaml/opam-repository/pull/7727/commits/cde34a3547b9ed27743012a7024e7908cf7658d6 but it didn't work
<AltGr> opam 1.2.2: `available: ocaml-native`
<AltGr> without the braces
ethnopes has quit [Read error: Connection reset by peer]
ethnopes has joined #ocaml
<Drup> no change for 2.0 ?
<Drup> (pure curiosity)
djellemah_ has quit [Ping timeout: 250 seconds]
<AltGr> there is no easy way on 2.0 actually
<AltGr> you can't define that variable globally since ocaml is now a package
<gjaldon> hannes: ping! are you around?
<AltGr> so package-variable `ocaml:native` is available, but you can't use it in the `available:` field
<Drup> Algebr: do we need base-native ?
<AltGr> yes, we would need something like that
AlexDenisov has joined #ocaml
orbitz has quit [Ping timeout: 258 seconds]
<Drup> hum, not unreasable, at least it's consistent
<Drup> unreasonable*
<Drup> unreasonable
<Drup> grmbl.
<AltGr> everything in the `available:` field that is not tied to the system, outside of opam, should be encoded as `depends:` (therefore, as packages)
<hannes> gjaldon: yes.. feel free to DM or in #mirage...
<gjaldon> hannes: oops just realized this was #ocaml. ok will DM
<AltGr> interestingly enough, we had no package with `available: ocaml-native`, so I was able to skip this issue.
<AltGr> Now if rgrinberg is adding one to the repo, that'll choke my migration script... :/
<dario9> Any Oasis gurus in the audience?
<companion_cube> not particularly :3
<Algebr> dario9: faster replies by asking in the oasis gitter
<rgrinberg> AltGr: awww, that's too bad. Gerd is making a fix for this issue so the next point release of omake will be available on bytecode systems
<rgrinberg> So if it's easy, you could just skip migrating this particular version of omake
<rgrinberg> But it would be nice if 2.0 supported restricting to native only as well of course.
<Drup> AltGr: maybe you should just add base-native (and base-dynlink, while we're at it)
<rgrinberg> +1
<AltGr> ok, cool. That's what the script should do actually, with a warning
<AltGr> Drup, yes, that's the easiest fix
<Drup> it seems consistent to how unix/thread/bigarrays are handled
orbitz has joined #ocaml
<AltGr> but what is the rule to know if base-native is available or not ?
<AltGr> There must be some OS/ocaml version based formula ?
<rgrinberg> check if ocamlopt is in path?
<rgrinberg> kinda like how the conf-* packages work
<AltGr> nope, that's dynamic
sh0t has joined #ocaml
<AltGr> it's possible, but this way, the solver would choose a solution requiring base-native, then the install would fail
spion_ is now known as spion
<Drup> AltGr: how is the presence of base-unix and co decided ?
<rgrinberg> What about reading ocaml/Makefile.config?
th5 has joined #ocaml
<AltGr> if we can find a static formula + dependencies to the actual OCaml package, the solver can handle it properly
<AltGr> Drup: base-unix is always available, actually :S
<companion_cube> would jsoo become a compiler-as-a-package at some point?
<Drup> companion_cube: why ?
<AltGr> but you could depend on a selected subset of the ocaml implementation packages
brunoro_ has joined #ocaml
<companion_cube> because jsoo would not have base-unix ;)
<Drup> companion_cube: actually, it could, there is a set of implementation for some specific use cases
<AltGr> Until we have `provides:`, the easiest, although a little convoluted, is to have `base-foo` always available, then all compilers _not_ providing it indicate a conflict. This way, `base-foo` gets pulled by the solver when needed and if the compiler is compatible
<Drup> AltGr: but isn't the presence of native (or threads ?) architecture dependent ?
brunoro has quit [Ping timeout: 260 seconds]
<Drup> not sure if it should be really static ...
<AltGr> that can be checked using predefined opam variables
<Drup> hmmm
<AltGr> yes, sorry, my definition of "dynamic" was a bit weird
<Drup> what you mean by static is "before calling the solver", right ?
<AltGr> yes
<Drup> yeah
<AltGr> actually, we currently have two species of `base-*` packages
minn has quit [Ping timeout: 265 seconds]
<Drup> I don't really have a proposition, sorry. Maybe that should be discussed on the mailing list/bug tracker ?
<AltGr> e.g. `base-unix` is determined from the compiler package (except in reality, it's always available, but let's assume the compiler `provides:` it)
<companion_cube> Drup: meh, if you only provide a subset it's quite dangerous...
<AltGr> and e.g. `base-ocamlbuild` belongs to the other family: the compiler has no knowledge of it, and it's determined by a formula `depends: "ocaml" {>= "3.10" & < "4.03"}`
<Drup> I see
<AltGr> (or `available:` in 1.2)
minn has joined #ocaml
<AltGr> yep, feel free to open an issue or thread
<Drup> well, the conclusion seems to be "we need provide to do it correctly"
<AltGr> well, that isn't exactly the issue; we have workarounds for provides, they are just more verbose
<AltGr> here, your ocaml packages would still have to specify "statically" wether the provide a native code compiler or not.
minn has quit [Ping timeout: 244 seconds]
dario9 has quit [Quit: Konversation terminated!]
<AltGr> (hmm, maybe `provides:` as "just" a way of specifying dependencies in reverse is already useful...)
TarVanimelde has joined #ocaml
ethnopes has quit [Read error: Connection reset by peer]
ethnopes has joined #ocaml
dmi3y has quit [Quit: dmi3y]
Sim_n has quit [Read error: Connection reset by peer]
wu_ng has quit [Ping timeout: 256 seconds]
Simn has joined #ocaml
ethnopes has quit [Read error: Connection reset by peer]
shinnya has quit [Ping timeout: 256 seconds]
ethnopes has joined #ocaml
TarVanimelde has quit [Ping timeout: 244 seconds]
nomicflux has joined #ocaml
brunoro_ has quit [Ping timeout: 260 seconds]
brunoro_ has joined #ocaml
zpe has quit [Remote host closed the connection]
larhat has quit [Read error: No route to host]
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
larhat has joined #ocaml
al-damiri has joined #ocaml
wu_ng has joined #ocaml
TarVanimelde has joined #ocaml
AlexDenisov has joined #ocaml
yomimono has joined #ocaml
<grayswandyr> hi if anyone from the RWO authors is here: the RWO site is down
powq has quit [Quit: Page closed]
freusque has quit [Ping timeout: 260 seconds]
dmi3y has joined #ocaml
freusque has joined #ocaml
TarVanimelde has quit [Ping timeout: 265 seconds]
MercurialAlchemi has quit [Ping timeout: 268 seconds]
wu_ng has quit [Ping timeout: 260 seconds]
Sim_n has joined #ocaml
Simn has quit [Ping timeout: 250 seconds]
noddy has quit [Ping timeout: 265 seconds]
kevinch has joined #ocaml
yomimono has quit [Ping timeout: 245 seconds]
yomimono has joined #ocaml
ocaml871 has joined #ocaml
ryanartecona has joined #ocaml
malc_ has joined #ocaml
<ocaml871> Hello, how can I disable, or handle the resizing event using the Graphics module?
kevinch has quit [Quit: Computer has gone to sleep.]
kevinch has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
freusque has quit [Quit: WeeChat 1.5]
<Drup> ocaml871: graphics is very limited, not sure you can
freusque has joined #ocaml
yout has joined #ocaml
octachron has quit [Ping timeout: 260 seconds]
<ocaml871> well, thanks for the tip, looking for an alternative
veggie_ has joined #ocaml
yout has quit [Client Quit]
wxfdglm has quit [Ping timeout: 250 seconds]
MercurialAlchemi has joined #ocaml
AlexDenisov has joined #ocaml
freusque has quit [Quit: WeeChat 1.5]
bronsen has joined #ocaml
malina has joined #ocaml
freusque has joined #ocaml
dmi3y has quit [Quit: dmi3y]
nomicflux has quit [Quit: nomicflux]
d0nn1e has quit [Ping timeout: 260 seconds]
d0nn1e has joined #ocaml
malina has quit [Remote host closed the connection]
freusque has quit [Quit: WeeChat 1.5]
freusque has joined #ocaml
dmi3y has joined #ocaml
djellemah_ has joined #ocaml
<grayswandyr> the ppx_deriving_morphism extension allows to generate mappers and folders for ADTs relying on open recursion (in the style of OCaml's Ast_mapper). However, it relies on records which makes its use a bit tedious. Another way to implement folders relies on classes and late binding (see e.g. RWO ch. Classes § Private methods). Anyone knows of a ppx implementing the way with classes?
djellemah_ has quit [Ping timeout: 256 seconds]
tane has joined #ocaml
frefity has quit [Ping timeout: 244 seconds]
th5 has quit []
dmi3y has quit [Quit: dmi3y]
MrMateus has joined #ocaml
wxfdglm has joined #ocaml
frefity has joined #ocaml
<MrMateus> can someone help me with basic code? getting error
octachron has joined #ocaml
<tane> $paste
<tane> hm
<tane> wrong channel :) MrMateus what's your problem?
<MrMateus> hey, do you mind if i show you the code in message?
kevinch has quit [Quit: Computer has gone to sleep.]
<tane> MrMateus, better paste it somewhere
<tane> https://bpaste.net/ for instance
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ryanartecona has quit [Quit: ryanartecona]
slash^ has joined #ocaml
jnavila has quit [Quit: It was time]
larhat has quit [Quit: Leaving.]
jwatzman|work has quit [Quit: jwatzman|work]
marsam has joined #ocaml
gjaldon has quit []
madroach has quit [Ping timeout: 264 seconds]
Algebr has quit [Ping timeout: 268 seconds]
madroach has joined #ocaml
ontologiae has quit [Ping timeout: 260 seconds]
pierpa has joined #ocaml
djellemah_ has joined #ocaml
frefity has quit [Ping timeout: 268 seconds]
ygrek has joined #ocaml
aggelos_ has quit [Ping timeout: 256 seconds]
kevinch has joined #ocaml
ethnopes has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chris2 has quit [Ping timeout: 245 seconds]
Algebr has joined #ocaml
smondet has joined #ocaml
average has quit [Quit: leaving]
frefity has joined #ocaml
AltGr has left #ocaml [#ocaml]
agarwal1975 has quit [Quit: agarwal1975]
agarwal1975 has joined #ocaml
chris2 has joined #ocaml
marsam has quit [Remote host closed the connection]
aggelos_ has joined #ocaml
dmi3y has joined #ocaml
malina has joined #ocaml
nomicflux has joined #ocaml
ethnopes has joined #ocaml
ryanartecona has joined #ocaml
wxfdglm_ has joined #ocaml
wxfdglm has quit [Ping timeout: 244 seconds]
malina has quit [Remote host closed the connection]
average has joined #ocaml
kakadu has quit [Remote host closed the connection]
whisperedcigar has quit [Ping timeout: 245 seconds]
noddy has joined #ocaml
kevinch has quit [Quit: Computer has gone to sleep.]
veggie_ has quit [Ping timeout: 244 seconds]
noddy has quit [Ping timeout: 260 seconds]
fraggle_ has quit [Ping timeout: 260 seconds]
veggie_ has joined #ocaml
Onemorenickname has joined #ocaml
octachron has quit [Quit: Page closed]
<Onemorenickname> Hi people
zpe has joined #ocaml
<reynir> hi Onemorenickname
* reynir wonders what the original nick was
<Onemorenickname> I often pattern match |{a=x;position=_}, I was wondering if there was a way to do something like "let pattern x = {a=x;position=_} in match my_var with | pattern(x)", or something similar
<Onemorenickname> reynir, it seems I've forgotten it myself
<reynir> You can write a pattern »{ a=x; _ }« if you like. "Punning" the field name is also possible: »{ a; _ }«
<zozozo> Onemorenickname: afaik, that's not possible
slash^ has quit [Read error: Connection reset by peer]
fraggle_ has joined #ocaml
<Onemorenickname> reynir, actually, sometimes, i'd like to do patter2 x y = {a=x,position=y}
<Algebr> could use `when`
<Onemorenickname> zozozo, hm... So there is no way around long pattern matchings ?
<zozozo> well, no, but as reynir said, you can do something like: match .. with { a; position; } -> ...
<zozozo> which is actually fairly concise
zpe has quit [Remote host closed the connection]
<lyxia> |{a} -> ...
<Onemorenickname> zozozo / reynir, and then, I can use a as a variable ?
<zozozo> yup
<Onemorenickname> oh, I haven't understood that from what he wrote
<flux> onemorenickname, if you name your variables right, you can use the punning that direction as well: let patter2 a position = { a; position }
<zozozo> flux: in that case, it's not a pattern, but a way to construct a value
<Onemorenickname> Well, later, I have more than 1 level of pattern matching, like {a;position={fst;len}}, does it still work ?
AlexDenisov has joined #ocaml
<flux> zozozo, well yes, but it seemed he was interested in constructing as well
<zozozo> sure, although, you'll probably need to use 'as' construct if you want access to the position field
<reynir> as you wrote it yes, but I don't think 'position' will be bound
<reynir> zozozo: you're reading my mind :-)
<zozozo> Onemorenickname: btw, if you have records, you knwo you can simply do : v.a, v.position, v.position.fst, ... ?
<zozozo> reynir: ^^
<lyxia> You can also apply a function that extracts the relevant fields before pattern matching.
agarwal1975_ has joined #ocaml
<Onemorenickname> yep, but it's what's inside the record that allows me to pattern match
<Onemorenickname> {a=`Some_Polymorphic_Variant(some_variable);position}
<Onemorenickname> It's more about pattern matching than retrieving fields
<Onemorenickname> (and that's why i want to sugar-candy it, so I don't have to write {a=`Some_Polymorphic_Variant(x);_} everytime
<Onemorenickname> )
<zozozo> you could do : match v.a with `Some_poly_variant(x) -> ... | ..
agarwal1975 has quit [Quit: agarwal1975]
larhat has joined #ocaml
agarwal1975_ is now known as agarwal1975
<Onemorenickname> zozozo : ha ha, actually, it's even worse
<Onemorenickname> One of the main reason I'm doing this in ocaml is because of deep pattern matching
whisperedcigar has joined #ocaml
<Onemorenickname> (actually, i don't know how it's called, but you get what i mean)
<flux> onemorenickname, well you could write a function like: let tupleify { a; position } = (a, position) match List.map tupleify input with | (`Id_Token s, _) :: (`Block_Open_Token; pos) :: rest -> ..
<Onemorenickname> hm
<flux> (oops, the last ; should be ,)
<Onemorenickname> I can transform my data, indeed
<Onemorenickname> I guess that's what I'll do, as performance is not an issue
<Onemorenickname> But, there is no better way to do this ?
<flux> other than restructing the whole problem from explicit pattern matching to a rule machine, I don't think so..
<flux> seems like you're doing something ocamlyacc does for you.
kakadu has joined #ocaml
MrMateus has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<Onemorenickname> flux : ? Could you explain the part about ocamlyacc ?
MrMateus has joined #ocaml
<flux> you're parsing, ocamlyacc is a parser generator..
<Onemorenickname> oh, you are talking about my code, i see
<Onemorenickname> i thought you were talking about the problem
<Onemorenickname> (well, i don't know how i can make ocamlyacc change the fixity of arbitrary operators)
brunoro_ has quit [Ping timeout: 260 seconds]
brunoro has joined #ocaml
<flux> arbitrary as in dynamically introduced?
<Onemorenickname> flux : "dynamically" not as "runtime", but as scope + rules based
<Onemorenickname> like, in a bloc, I can "open SomeOtherBloc", and I will get the operators from this bloc with their fixity
<flux> sounds like something it wouldn't be able to do
whisperedcigar has quit [Quit: WeeChat 1.5]
<Onemorenickname> I don't know any parser generator able to do that ha ha :D
TheLemonMan has joined #ocaml
<Bluddy[m]> wasn't deep pattern matching proposed for the compiler?
<lyxia> Onemorenickname: you could parse infix expressions in a flat list first, and resolve fixity at the same time you do names.
<Algebr> wasn't there a way to use the private keyword such that it would let you see the record definition but you couldn't make one besides the use of a function
<zozozo> Algebr: type t = private { foo: int} int the signature
dmi3y has quit [Quit: dmi3y]
<Algebr> hmm, I thought that was the case but then my function gets a complaint that I can't make it
<Algebr> it has to be in a signature? can't be in a struct?
<zozozo> that's because the "private" should only be in the signature, not the definition in the .ml
<Algebr> i c
maattdd2 has joined #ocaml
<Onemorenickname> lyxia : There are several other things done dynamically, but I haven't thought about such options for these too
<Onemorenickname> Thank you !
maattdd1 has quit [Ping timeout: 260 seconds]
<Onemorenickname> (by the way, does anyone know of a tutorial for ocamlbuild ?)
TheLemonMan has left #ocaml [#ocaml]
<Onemorenickname> (omg, I managed to make it work, it's my first time)
<Onemorenickname> (this feels so good)
aggelos_ has quit [Ping timeout: 268 seconds]
malc_ has quit [Remote host closed the connection]
argent_smith1 has joined #ocaml
noddy has joined #ocaml
kevinch has joined #ocaml
argent_smith has quit [Ping timeout: 250 seconds]
aggelos_ has joined #ocaml
_andre has quit [Quit: leaving]
veggie_ has quit [Ping timeout: 256 seconds]
wxfdglm_ has quit [Ping timeout: 265 seconds]
ryanartecona has quit [Quit: ryanartecona]
veggie_ has joined #ocaml
brunoro has quit [Ping timeout: 252 seconds]
djellemah_ has quit [Quit: Leaving]
brunoro has joined #ocaml
octachron has joined #ocaml
ryanartecona has joined #ocaml
<Bluddy[m]> ocamlbuild is pretty easy to use
zaquest has quit [Ping timeout: 250 seconds]
yomimono has quit [Ping timeout: 260 seconds]
kevinch has quit [Quit: Computer has gone to sleep.]
kevinch has joined #ocaml
kevinch has quit [Read error: Connection reset by peer]
ocaml871 has quit [Quit: Page closed]
octachron has quit [Quit: Leaving]
nomicflux has quit [Quit: nomicflux]
Onemorenickname has quit [Read error: Connection reset by peer]
troydm has joined #ocaml
rand__ has quit [Quit: leaving]
yomimono has joined #ocaml
Sim_n has quit [Read error: Connection reset by peer]
MercurialAlchemi has quit [Ping timeout: 252 seconds]
<Algebr> hmm, caml_alloc_array uses char* instead of void*
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wolfcore has quit [Ping timeout: 245 seconds]
Nahra has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
agarwal1975 has quit [Quit: agarwal1975]
Nahra has joined #ocaml
argent_smith1 has quit [Quit: Leaving.]
brunoro has quit [Ping timeout: 250 seconds]
wolfcore has joined #ocaml
<companion_cube> hey rgrinberg, is hamt still maintained?
<companion_cube> looks like it doesn't like the last version of oasis
<MrMateus> hey guys anything wrong with this syntax? let sorted = List.sort (fun (_, i1, _) (_, i2, _) -> Pervasives.compare i1 i2) main_list;
smondet has quit [Ping timeout: 250 seconds]
<companion_cube> the `;` at the end
<companion_cube> if it's a definition, don't add anything after main_list
<MrMateus> still get compiling error ):
<companion_cube> in the toplevel, add `;;` to tell ocaml to start parsing, is all
<MrMateus> if i remove that line the code compiles and works
<MrMateus> can it be any problem with the compiler?
<companion_cube> probably not.
<MrMateus> :/ any other idea why it doesnt work?
<companion_cube> well, the ;
<companion_cube> it's just wrong
<MrMateus> without the ; it doenst work also
<companion_cube> is it in another block of code?
<companion_cube> are you running in the toplevel, or in a file?
<MrMateus> file
<MrMateus> in top level it works fine
Muzer has quit [Read error: Connection reset by peer]
<companion_cube> can you show the file's content (using a paste)?
AlexRussia has quit [Ping timeout: 268 seconds]
zaquest has joined #ocaml
Muzer has joined #ocaml
jave has quit [Ping timeout: 250 seconds]
jave has joined #ocaml
michbad has joined #ocaml
brunoro has joined #ocaml
agarwal1975 has joined #ocaml
grayswandyr has quit [Ping timeout: 260 seconds]
brunoro has quit [Ping timeout: 256 seconds]
kakadu has quit [Remote host closed the connection]
minn has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
d0nn1e has quit [Ping timeout: 245 seconds]
yomimono has quit [Ping timeout: 244 seconds]
<MrMateus> anyone around?
<pierpa> no, nobody.
<MrMateus> ):
<pierpa> just kidding!
<MrMateus> can you give me some help with code? xD
Heasummn has joined #ocaml
<pierpa> probably not, but you ask your question, and someone will be able to
<MrMateus> well
<ethnopes> there's no point in asking to ask, just ask
<MrMateus> soo i try this in console it works : let a_tuple = (3,"three");; then: let (x,y) = a_tuple;; , i get the x and y receiving the values of a_tuple positions
<MrMateus> i did very similar in file but it gives syntax error
brunoro has joined #ocaml
<MrMateus> let firstValue = List.hd (sorted) in
<MrMateus> let (n1,v1,m1) = firstValue;