adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml MOOC http://1149.fr/ocaml-mooc | OCaml 4.02.3 announced http://ocaml.org/releases/4.02.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
darkf has joined #ocaml
sz0 has quit [Quit: Connection closed for inactivity]
chindy has quit [Remote host closed the connection]
pyon has quit [Quit: Reality is multi-dimensional. More precisely, two-dimensional.]
cdidd has quit [Ping timeout: 244 seconds]
pyon has joined #ocaml
cdidd has joined #ocaml
Vintila has quit [Ping timeout: 260 seconds]
Kakadu has quit [Remote host closed the connection]
noddy has quit [Ping timeout: 244 seconds]
silver has quit [Quit: rakede]
tennix has quit [Ping timeout: 276 seconds]
srax has joined #ocaml
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 260 seconds]
fluter has quit [Ping timeout: 248 seconds]
fluter has joined #ocaml
mistermetaphor has joined #ocaml
dsheets has joined #ocaml
shinnya has quit [Ping timeout: 244 seconds]
mistermetaphor has quit [Ping timeout: 264 seconds]
dsheets has quit [Ping timeout: 250 seconds]
mistermetaphor has joined #ocaml
nichola__ has joined #ocaml
FreeBirdLjj has joined #ocaml
nicholasf has quit [Ping timeout: 264 seconds]
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 260 seconds]
nichola__ has quit [Ping timeout: 264 seconds]
misterme_ has joined #ocaml
cdidd has quit [Ping timeout: 248 seconds]
mistermetaphor has quit [Ping timeout: 264 seconds]
tennix has joined #ocaml
cdidd has joined #ocaml
Reshi has joined #ocaml
badon has quit [Disconnected by services]
badon_ has joined #ocaml
badon_ is now known as badon
nicholasf has joined #ocaml
Reshi has quit [Ping timeout: 244 seconds]
teknozulu has joined #ocaml
cdidd has quit []
Reshi has joined #ocaml
pierpa has quit [Ping timeout: 260 seconds]
Reshi has quit [Ping timeout: 260 seconds]
Reshi has joined #ocaml
dsheets has joined #ocaml
cdidd has joined #ocaml
dsheets has quit [Ping timeout: 250 seconds]
<destrius> anybody knows if cohttp works in windows?
johnelse has quit [Ping timeout: 244 seconds]
johnelse has joined #ocaml
<pyon> Does OCaml have anything like SML's datatype replication (datatype foo = datatype Bar.bar)? It brings Bar.bar's constructors into the local scope.
<pyon> AFAICT, the only thing I can do is open an entire module, but that's not really what I want. The module Bar could contain a lot of algebraic data types, but I only want to open one of them.
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 246 seconds]
misterme_ has quit [Remote host closed the connection]
mistermetaphor has joined #ocaml
dsheets has joined #ocaml
mistermetaphor has quit [Ping timeout: 268 seconds]
dsheets has quit [Ping timeout: 250 seconds]
FreeBird_ has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
cgc_ has joined #ocaml
mistermetaphor has joined #ocaml
<struk|desk> destrius: it has two impls right? one for async and one for lwt?
<struk|desk> pyon: you could consider ppx_import maybe?
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 268 seconds]
<struk|desk> pyon: or more verbosely, you can redefine the type but assure the same type resolution: eg. type coin = H|T module Coin = struct type t = coin = H|T end
MercurialAlchemi has joined #ocaml
Reshi has quit [Ping timeout: 268 seconds]
<cgc_> hi, i get unbound record field and the record is declared in a module which i open. do you have any idea?
sz0 has joined #ocaml
FreeBird_ has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
<def`> cgc_: share the code?
<cgc_> sure. Heap.extend nl {id=id;env=fEnv} state.heap . the record is heapEntry = {id: Syntax.id; env: Syntax.typeValue Environment.t;}
<cgc_> and the sig of extend is: val extend : Syntax.value -> heapEntry -> t -> t
<cgc_> i also tried Heap.id = id, but nothing changed
tmtwd_ has quit [Ping timeout: 260 seconds]
AndroUser has joined #ocaml
<AndroUser> Hello
AndroUser has quit [Remote host closed the connection]
<struk|desk> cgc_: where / in what scope is heapEntry defined though?
dsheets has joined #ocaml
<cgc_> In Heap. type t = (Syntax.value * heapEntry) list
<cgc_> and heapEntry = {id: Syntax.id; env: Syntax.typeValue Environment.t;}
<struk|desk> if heap is open why are you doing "Heap.extend" ? shouldn't it just be extend? not saying it actuall matters but..
<struk|desk> it doesn't provide confidence that you opened it, anyhow
<cgc_> I also have Environment.extend and it's just for the beauty of the code and at first i didn't open Heap
<cgc_> it knows about Heap.extend and i declared a heapEntry where i call the function, but asked for Heap.heapEntry
dsheets has quit [Ping timeout: 250 seconds]
Reshi has joined #ocaml
<struk|desk> cgc_: I can't duplicate it with similar code. you should paste the entire thing on gists or something.
mistermetaphor has quit [Remote host closed the connection]
MercurialAlchemi has quit [Ping timeout: 244 seconds]
<destrius> struk|desk: yup... async works in windows i guess?
struk|lap has joined #ocaml
<struk|lap> cgc_: you need to defined the record type in the signature too of heap
copy` has quit [Quit: Connection closed for inactivity]
<flux> def`, it's not that big of a deal but nice if it'll just work out of the box in the future, thanks
<cgc_> i have "type t
<cgc_> and heapEntry" in heap.mli
<flux> pyon, it has this: type foo = Bar.bar = Open of int | Close of char, that is, you need to enumerate the constructors
<flux> oh, never mind, struk| answered :)
<struk|lap> but drop that stray equals, sorry..
<cgc_> but why it doesn't complain about t?
<struk|lap> oh I don't know if it allows the equals or not. but anyhow you need to expose the record type in the sig or if you want other modules to use it, fundamentally
<struk|lap> cgc_: but yeah if you want it opaque on purpose, then your definition is fine, and you can always provide accesors and whatnot
<cgc_> yes, it works, thank you. so t is ok because it's not a record?
<struk|lap> nothing to do with records
<struk|lap> its whether the constructors of the type are public
<struk|lap> and whether you try to use those constructors...
<struk|lap> but yeah in this case it's record. same issue with variants though
njvg has joined #ocaml
<cgc_> oh, i get it now...t works because i don't use its constructor
<struk|lap> cgc_: yep
<cgc_> thank you for your time, you saved me :D
<struk|lap> cgc_: no problem
kushal has joined #ocaml
MercurialAlchemi has joined #ocaml
tmtwd_ has joined #ocaml
zpe has joined #ocaml
mietek has left #ocaml [#ocaml]
dsheets has joined #ocaml
<sfri> Hi, I have a problem with Ctypes that I don't understand (http://pastebin.com/BNB76nBB). There is a problem to convert Ctypes_static into Ctypes. Does anybody understand what I'm doing wrong?
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
dsheets has quit [Ping timeout: 250 seconds]
zpe has quit [Ping timeout: 244 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
<struk|lap> its converting a function to a type actually
<struk|lap> Ctypes.fn to Ctypes.typ is not valid
Vintila has joined #ocaml
badon has quit [Ping timeout: 260 seconds]
Reshi has quit [Ping timeout: 244 seconds]
<sfri> I'm guessing how to can solve this.
Reshi has joined #ocaml
ygrek has joined #ocaml
teknozulu has quit [Ping timeout: 252 seconds]
mistermetaphor has joined #ocaml
kushal has quit [Ping timeout: 268 seconds]
mistermetaphor has quit [Ping timeout: 244 seconds]
zpe has joined #ocaml
tmtwd_ has quit [Ping timeout: 268 seconds]
cgc_ has quit [Ping timeout: 246 seconds]
Algebr has quit [Read error: Connection reset by peer]
Algebr has joined #ocaml
Algebr has quit [Remote host closed the connection]
AltGr has joined #ocaml
Algebr``` has joined #ocaml
nicholasf has quit [Ping timeout: 246 seconds]
Algebr`` has quit [Read error: Connection reset by peer]
sepp2k has joined #ocaml
Algebr``` has quit [Read error: No route to host]
silver has joined #ocaml
cgc_ has joined #ocaml
ygrek has quit [Ping timeout: 260 seconds]
kushal has joined #ocaml
Simn has joined #ocaml
mistermetaphor has joined #ocaml
mistermetaphor has quit [Ping timeout: 248 seconds]
larhat has joined #ocaml
sepp2k has quit [Quit: Leaving.]
Reshi has quit [Ping timeout: 252 seconds]
<companion_cube> o/
<companion_cube> pyon: you can: 1/ open the module 2/ write type foo = Bar.bar = A | B 3/ use ppx_import to do it for you
rand__ has joined #ocaml
<flux> I wonder if we'll end up with the same lack of namespaces-issue with ppxes as we now have with plain modules ;)
<flux> a proper namespace solution for ocaml would probably need to address both?
<companion_cube> I don't think so, unless we plan to have hundreds of different ppxes
<companion_cube> module namespaces are much more important
<flux> opam search ppx_ | wc -l -> 58. and I must use them all :)
<companion_cube> woow
noddy has joined #ocaml
Reshi has joined #ocaml
<flux> given how much easier ppxs are to write than pas (and how much less pain-in-the-butt they are) I wouldn't surmise the possibility of the number keeping going up..
<companion_cube> given how fragile ppx are w.r.t OCaml upgrades, this would really worry me...
<flux> it seems to me "actual" ppx extension aren't that fragile, but the tools for making them nice to write (ppx_tools) might be a bit more fragile
<companion_cube> well they still depend on the raw AST
<flux> but only parts of it. regarding extending the language I think they seem pretty safe. except for ppx_tools that I think requires more complete knowledge.
nicholasf has joined #ocaml
noddy has quit [Ping timeout: 276 seconds]
dsheets has joined #ocaml
badon has joined #ocaml
jwatzman|work has joined #ocaml
A1977494 has joined #ocaml
djellemah has quit [Ping timeout: 240 seconds]
d0nn1e has quit [Ping timeout: 244 seconds]
d0nn1e has joined #ocaml
Khady_ is now known as testcross
testcross is now known as Khady
Khady has quit [Changing host]
Khady has joined #ocaml
djellemah has joined #ocaml
<Drup> ppx_tools is supposed to be the compatibility layer, it's normal that it's very tied to the ocaml version
<Drup> flux: well, if your ppx is well behaved, you are supposed to namespace it. For example for eliom, you can use both [%client ..] and [%eliom.client ...]
<companion_cube> Drup: but then you need to use *only* the metaquot stuff
<companion_cube> I suppose it's fine in general, but you cannot write everything purely using quoting... can you?
<Drup> Oh, no, I'm talking about the rest of ppx_tools too
<Drup> For tyxml's and lwt's ppx, I added some compatibility layers in ppx_tools, and there isn't any need for cppo in the code itself
<companion_cube> ok, I don't know the rest of ppx_tools
zpe_ has joined #ocaml
AltGr has left #ocaml [#ocaml]
zpe has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
Vintila has quit [Ping timeout: 260 seconds]
Reshi has quit [Ping timeout: 246 seconds]
<flux> drup, by namespacing you simply mean supporting both etension names or have some ability to disable the short one?
<Drup> no need to disable it
<flux> ie. pgsql now has [%pgsql], not sure how to namespace that better..
<Drup> just propose both
<Drup> flux: that sounds enough to me
<flux> but perhaps it will have [%pgsql.exec] if it needs more extensions
sz0 has quit [Quit: Connection closed for inactivity]
kushal has quit [Ping timeout: 276 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
nicholasf has quit [Remote host closed the connection]
nicholasf has joined #ocaml
cgc_ has quit [Ping timeout: 244 seconds]
kushal has joined #ocaml
hcarty has joined #ocaml
tree_ has joined #ocaml
sepp2k has joined #ocaml
cgc_ has joined #ocaml
ggole has joined #ocaml
dsheets has quit [Remote host closed the connection]
mrvn has quit [Ping timeout: 248 seconds]
nicholasf has quit [Remote host closed the connection]
mrvn has joined #ocaml
nicholasf has joined #ocaml
mrvn has quit [Ping timeout: 250 seconds]
mrvn has joined #ocaml
Simn has quit [Read error: Connection reset by peer]
zpe_ has quit [Remote host closed the connection]
zpe has joined #ocaml
tree_ has quit [Ping timeout: 250 seconds]
BitPuffin has joined #ocaml
zpe has quit [Ping timeout: 248 seconds]
dsheets has joined #ocaml
<companion_cube> Warning 58: no cmx file was found in path for module Z, and its interface was not compiled with -opaque <--- so many warnings ;_;
<companion_cube> oook, and flambda makes something go from 3.2s to 5.7s...
<companion_cube> :s
<companion_cube> (or maybe it's ephemeron, not sure)
Sorella has joined #ocaml
noddy has joined #ocaml
TheLemonMan has joined #ocaml
cgc_ has quit [Ping timeout: 244 seconds]
<hcarty> companion_cube: I suspect the flambda folks would be very interested in a benchmark which slows down that much
<companion_cube> I wonder if it's flambda, actually, I suspect the ephemerons (lots of weak refs)
<companion_cube> problem is, the "benchmark" is pretty complicated :D
<companion_cube> maybe it's the debug mode, t oo
noddy has quit [Ping timeout: 252 seconds]
sz0 has joined #ocaml
rand__ has quit [Quit: leaving]
nicholasf has quit [Remote host closed the connection]
Vintila has joined #ocaml
noddy has joined #ocaml
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
noddy has quit [Ping timeout: 246 seconds]
jwatzman|work has quit [Quit: jwatzman|work]
Reshi has joined #ocaml
Simn has joined #ocaml
Stalkr_ has joined #ocaml
Stalkr_ has quit [Changing host]
Stalkr_ has joined #ocaml
mistermetaphor has joined #ocaml
Reshi has quit [Ping timeout: 244 seconds]
Simn has quit [Read error: Connection reset by peer]
silver has quit [Quit: rakede]
mistermetaphor has quit [Remote host closed the connection]
Simn has joined #ocaml
njvg has quit [Quit: Page closed]
Reshi has joined #ocaml
FreeBird_ has joined #ocaml
FreeBird_ has quit [Remote host closed the connection]
Nahra has quit [Remote host closed the connection]
Reshi has quit [Quit: WeeChat 1.4]
FreeBirdLjj has quit [Ping timeout: 248 seconds]
Nahra has joined #ocaml
musha68k has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 244 seconds]
mistermetaphor has joined #ocaml
tane has joined #ocaml
mistermetaphor has quit [Ping timeout: 252 seconds]
jwatzman|work has joined #ocaml
Vintila has quit [Ping timeout: 248 seconds]
cdidd has quit []
dsheets has quit [Remote host closed the connection]
tennix has quit [Ping timeout: 248 seconds]
dsheets has joined #ocaml
dsheets has quit [Remote host closed the connection]
sh0t has joined #ocaml
cdidd has joined #ocaml
dsheets has joined #ocaml
cdidd has quit [Client Quit]
cdidd has joined #ocaml
mistermetaphor has joined #ocaml
ggole has quit []
julien_t has joined #ocaml
dsheets has quit [Remote host closed the connection]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
dsheets has joined #ocaml
tennix has joined #ocaml
MercurialAlchemi has joined #ocaml
julien_t has quit [Ping timeout: 260 seconds]
copy` has joined #ocaml
slash^ has joined #ocaml
<christoph_debian> hm. is logical and/or (&& / ||) lazy or will it alwasy evaluate both arguments?
<Drup> It's lazy
<Simn> Is there a language where that isn't "lazy"?
<christoph_debian> java has & and &&
<christoph_debian> and one evaluates both arguments
<christoph_debian> and given side-effects the intuitive first guess would be evaluating both sides so some languages might have that as default to not surprise novice programmers
cdidd has quit []
<Drup> Well, if you want guaranteed evaluation, you let bind.
<lyxia> I think the benefits of lazy boolean operators outweigh the potential confusion for newcomers by far.
<christoph_debian> not arguing it should evaluate ;-)
<adrien> I've seen code that does
cdidd has joined #ocaml
<adrien> if (access(somedir) || mkdir(somedir))
<rks_> :)
<adrien> instead of access() which doesn't have side-effects (besides filling a buffer in memory), you could also find other functions that do things on the filesystem
<adrien> so they're not only with side-effects, they're with side-effects to the whole system
<adrien> you definitely don't want the order of this to change)
<adrien> s/)//
<adrien> although I wouldn't mind that perpetrators of such code get a serious kick
<adrien> (although' the idea is nice: inside the "then" part, you are sure the directory exists and inside of the "else" part, it doesn't)
<Simn> I don't think that particular example is so terrible, but yes it often leads to cleverness vs. clarity situations.
Stalkr^ has joined #ocaml
cgc_ has joined #ocaml
Stalkr_ has quit [Ping timeout: 244 seconds]
<flux> afaik visual basic has a strict version
<flux> like "OR" and then the lazy version is something like "OR ELSE"
<flux> ..that's actually not that bad a solution ;-)
<flux> too bad I don't think it would go through the ocaml parser, so it cannot be implemented as a ppx ;-)
<adrien> Simn: that's because I've skipped half of the parameters :P
noddy has joined #ocaml
<Simn> Fair enough!
<adrien> flux: your writing make it seem like you've been infected by cobolitis ='(
<adrien> sorry: COBOLITIS
<flux> well I don't really see why '||' is superior to 'or', other than familiarity
<Drup> flux: you don't need a ppx
<flux> though perhaps that 'or else' is a bit much ;)
<Drup> let (&&!) x y = x && y
<flux> drup, yeah, I only meant the 'or else' part
Algebr`` has joined #ocaml
<adrien> flux: it was more because of the capitalization ;-)
darkf has quit [Quit: Leaving]
sh0t has quit [Ping timeout: 268 seconds]
leyyin has joined #ocaml
Algebr``` has joined #ocaml
bbc has quit [Ping timeout: 246 seconds]
A19774941 has joined #ocaml
A1977494 has quit [Ping timeout: 276 seconds]
giing3r97 has left #ocaml [#ocaml]
wiredsister has joined #ocaml
cgc_ has quit [Ping timeout: 268 seconds]
Anarchos has joined #ocaml
noddy has quit [Ping timeout: 260 seconds]
jwatzman|work has quit [Quit: jwatzman|work]
cantstanya has quit [Remote host closed the connection]
cantstanya has joined #ocaml
dsheets_ has joined #ocaml
dsheets has quit [Ping timeout: 244 seconds]
Stalkr^ has quit [Ping timeout: 268 seconds]
shinnya has joined #ocaml
tennix has quit [Ping timeout: 264 seconds]
Anarchos has quit [Ping timeout: 244 seconds]
larhat has quit [Quit: Leaving.]
igitoor has quit [Ping timeout: 250 seconds]
fs4lv1n1 has quit [Ping timeout: 248 seconds]
fs4lv1n1 has joined #ocaml
noddy has joined #ocaml
igitoor has joined #ocaml
jgjl has joined #ocaml
dsheets_ has quit [Remote host closed the connection]
wiredsister has quit [Ping timeout: 250 seconds]
noddy has quit [Ping timeout: 240 seconds]
sh0t has joined #ocaml
dsheets has joined #ocaml
shinnya has quit [Ping timeout: 244 seconds]
dsheets has quit [Ping timeout: 240 seconds]
igitoor has joined #ocaml
igitoor has quit [Changing host]
dsheets has joined #ocaml
ygrek has joined #ocaml
dsheets has quit [Ping timeout: 250 seconds]
pierpa has joined #ocaml
misterme_ has joined #ocaml
mistermetaphor has quit [Ping timeout: 240 seconds]
sh0t has quit [Ping timeout: 268 seconds]
sh0t has joined #ocaml
lokien_ has joined #ocaml
Algebr``` has quit [Ping timeout: 260 seconds]
Algebr`` has quit [Ping timeout: 276 seconds]
wolfcore has quit [Ping timeout: 244 seconds]
LowPotential has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
BitPuffin has quit [Read error: Connection reset by peer]
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dsheets has joined #ocaml
octachron has joined #ocaml
matason has joined #ocaml
<octachron> question: existential types should never escape to a toplevel type aren't? i.e a toplevel function with an ex#0 somewhere in its type should not be possible?
<Drup> TIL the error "Error: Unexpected existential"
<Drup> octachron: I would tend to say yes
<flux> suddenly! unexpected existential!
<Drup> flux: exactly :D
<flux> someone should nethack up the ocaml compiler error messages
<flux> the poetry reporting mode was a great start, though
<octachron> Drup, well, I have sneaky unexpected existential here https://gist.github.com/Octachron/c1f62f433511e9c3033902fb2480dfa1
Ravana has quit [Ping timeout: 248 seconds]
<octachron> and the full version of the code triggers an assertion failure in typecore (at least in 4.02.3)
<octachron> get_2 hast the lovely type "< elt : 'elt; shape : ('a, $'b) matrix > m -> 'a H.t -> $'b H.t -> 'elt" (in 4.03 notations)
Ravana has joined #ocaml
<Drup> GADT + object types + poly variants
<Drup> are you trying to make a type bingo ?
zpe has joined #ocaml
<octachron> far worse, a multidimensional array library with statistically checked acces and slicing
<Drup> have you looked at slap ?
<flux> you're trying to implement a black hole with the type system?
<companion_cube> what, don't you use all three in the same program, Drup?
<companion_cube> hmmm otoh I don't know what this $'a is
<Drup> companion_cube: of course I do, it's called ocsigen
<companion_cube> \o/
<Drup> but they are in different part of ocsigen :D
<companion_cube> not funny then
<octachron> Drup, slap is far saner: only tensor of order 0 to 2, no statistical access check, no slicing
<Drup> (ocsigen as a whole definitly checks any OCaml type bingo)
<_y> what are those $?
TheLemonMan has joined #ocaml
<Drup> _y: new way of showing the type such as t#3
<octachron> _y, it is the future 4.03 notation for existential types
data_hope has joined #ocaml
<Drup> Actually, I don't think we have extensible types in ocsigen
<Drup> we do have a universal map with exceptions, though
<Drup> octachron: slap doesn't support taking slices ? I'm surprised
Kakadu has joined #ocaml
matason has quit [Ping timeout: 244 seconds]
<Drup> Actually, slices on any dimension does sounds difficult
<octachron> Drup, sorry slap does support (unsafe) slices on matrix and vectors
jeffmo has joined #ocaml
<Drup> right
<octachron> Drup, the arbitrary dimensions do require some works but it is doable (at least in a partially type-safe way)
<flux> someone should just take ppx_implicits and port c++ templates to oacml :)
nicholasf has joined #ocaml
bbc has joined #ocaml
<mrvn> templates need instantiation
<flux> but a big part of them is that they get instantiated by just using them.
<mrvn> use a functor
tree_ has joined #ocaml
<flux> yep, functors would make great back ends.. for implicit instantiation :)
<flux> in any case, the more interesting thing about templates is that they are turing complete
silver has joined #ocaml
sh0t has quit [Ping timeout: 250 seconds]
sepp2k has quit [Quit: Leaving.]
sh0t has joined #ocaml
matason has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 260 seconds]
wolfcore has joined #ocaml
leyyin has quit [Quit: So Long, and Thanks for All the Fish]
seangrove has joined #ocaml
blablaa has joined #ocaml
<blablaa> is it possible to get a reference to an array element?
<mrvn> no
<blablaa> mrvn, thanks
<mrvn> make one out of a reference to the array and index
<mrvn> or slice a bigarray
pierpa has quit [Ping timeout: 244 seconds]
<blablaa> mrvn, hmm but the slices are copies, not references, if i understand right...
<blablaa> so the solution is ref plus index, i get
<mrvn> or an array of refs
pierpa has joined #ocaml
<mrvn> blablaa: no, big array slices are references to the same data
octachron has quit [Quit: Leaving]
data_hope has quit [Quit: leaving]
enquora has joined #ocaml
dsheets has quit [Remote host closed the connection]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
nicholasf has quit [Remote host closed the connection]
silver has quit [Quit: rakede]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
A19774941 has quit [Quit: Leaving.]
hcarty has quit [Ping timeout: 246 seconds]
zpe has quit [Ping timeout: 260 seconds]
dsheets has joined #ocaml
dsheets has quit [Remote host closed the connection]
nicholasf has joined #ocaml
dhil has joined #ocaml
tane has quit [Quit: Verlassend]
Simn has quit [Quit: Leaving]
dhil has quit [Ping timeout: 244 seconds]
struk|lap has quit [Ping timeout: 248 seconds]
<Algebr`> are there ready made parse.mly for parsing known languages?
<Algebr`> I'm working with a language is that basically a syntax extension on top of objective-c
<Algebr`> I'm wondering if I can use ppx + some existing C parsers
<Algebr`> like [%extension_1 ....objectice-c code ]
malina has joined #ocaml
<fds> Frama-C has a C parser and lexer.
<fds> I don't know if that's any help...
malina has quit [Remote host closed the connection]
nicholasf has quit []
d0nn1e has quit [Ping timeout: 250 seconds]
d0nn1e has joined #ocaml
<Drup> C is not LR(1), isn't it ?
<Drup> (something about typedefs ...)
<mrvn> not shift/reduce free because of if
<jyc_> hm? no, you can avoid the dangling else problem
<mrvn> nope
<jyc_> yes :)
<jyc_> the syntax itself is not ambiguous, but it is very easy to write an ambiguous grammar
<mrvn> "if () if () {} else {}" is ambigious
<jyc_> The else binds to the nearest if by the spec
<mrvn> jyc_: but you can't say that in LR(1)
<jyc_> writing an unambiguous CFG for that is something that shows up on homework in a compilers class
<jyc_> The Wikipedia article has an example LR(1) grammar implementing the rule https://en.m.wikipedia.org/wiki/Dangling_else
<mrvn> ok, I stand corrected. you can write that grammar. Just nobody does because fixing this ba handling a shift/reduce conflict is so much easier.
<jyc_> yea that's true, sorry for pressing the pt
<jyc_> point*
<mrvn> anyway, typedef should be no problem. they just give identifiers meaning later when you type check.
<mrvn> things like "foo * bar;" are a pain though. Does that define a new type? Or just multiply and forget?
Kakadu has quit [Remote host closed the connection]
matason has quit [Ping timeout: 244 seconds]
lokien_ has quit [Quit: Connection closed for inactivity]
nicholasf has joined #ocaml
zpe has joined #ocaml
malina has joined #ocaml
Vintila has joined #ocaml
madroach has quit [Ping timeout: 244 seconds]
madroach has joined #ocaml
darkf has joined #ocaml
sh0t has quit [Ping timeout: 260 seconds]
sz0 has quit [Quit: Connection closed for inactivity]
jeffmo has quit [Ping timeout: 246 seconds]
misterme_ has quit [Remote host closed the connection]
jeffmo has joined #ocaml