adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | Current MOOC: https://huit.re/ocamlmooc | OCaml 4.04.0 release notes: http://ocaml.org/releases/4.04.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
silver_ is now known as silver
mrf3000 has joined #ocaml
noddy2OOO has joined #ocaml
brunoro_ has joined #ocaml
brunoro_ has quit [Ping timeout: 265 seconds]
brunoro_ has joined #ocaml
MightyJoe has joined #ocaml
cyraxjoe has quit [Ping timeout: 258 seconds]
brunoro_ has quit [Ping timeout: 245 seconds]
brunoro_ has joined #ocaml
brunoro_ has quit [Ping timeout: 260 seconds]
brunoro_ has joined #ocaml
brunoro_ has quit [Ping timeout: 260 seconds]
brunoro_ has joined #ocaml
noddy2OOO has quit [Ping timeout: 265 seconds]
brunoro_ has quit [Ping timeout: 244 seconds]
brunoro_ has joined #ocaml
veggie_ has quit [Ping timeout: 250 seconds]
brunoro_ has quit [Ping timeout: 260 seconds]
brunoro_ has joined #ocaml
silver has quit [Quit: rakede]
TarVanim_ has joined #ocaml
TarVanimelde has quit [Ping timeout: 246 seconds]
brunoro_ has quit [Ping timeout: 260 seconds]
brunoro_ has joined #ocaml
wu_ng has joined #ocaml
brunoro_ has quit [Ping timeout: 256 seconds]
nomicflux has quit [Quit: nomicflux]
sh0t has quit [Remote host closed the connection]
axiles has quit [Ping timeout: 244 seconds]
axiles has joined #ocaml
malc_ has joined #ocaml
al-damiri has quit [Quit: Connection closed for inactivity]
brunoro_ has joined #ocaml
noddy2OOO has joined #ocaml
brunoro_ has quit [Ping timeout: 256 seconds]
brunoro_ has joined #ocaml
mfp has quit [Ping timeout: 260 seconds]
brunoro_ has quit [Ping timeout: 258 seconds]
sillyotter has joined #ocaml
sillyotter has quit [Client Quit]
wu_ng has quit [Remote host closed the connection]
brunoro_ has joined #ocaml
brunoro_ has quit [Ping timeout: 250 seconds]
wu_ng has joined #ocaml
TarVanim_ has quit [Ping timeout: 246 seconds]
TarVanimelde has joined #ocaml
brunoro_ has joined #ocaml
mrf3000 has quit [Remote host closed the connection]
mrf3000 has joined #ocaml
brunoro_ has quit [Ping timeout: 256 seconds]
mrf3000 has quit [Ping timeout: 244 seconds]
brunoro_ has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
brunoro_ has quit [Ping timeout: 240 seconds]
nomicflux has joined #ocaml
brunoro_ has joined #ocaml
flux has quit [Ping timeout: 260 seconds]
rbocquet has quit [Ping timeout: 245 seconds]
chelfi has quit [Ping timeout: 245 seconds]
cantstanya has quit [Ping timeout: 245 seconds]
theolaurent has quit [Ping timeout: 240 seconds]
flux has joined #ocaml
chelfi has joined #ocaml
rbocquet has joined #ocaml
theolaurent has joined #ocaml
cantstanya has joined #ocaml
<Drup> malthe: do you have the last menhir version ?
brunoro_ has quit [Ping timeout: 268 seconds]
brunoro_ has joined #ocaml
brunoro_ has quit [Ping timeout: 248 seconds]
brunoro_ has joined #ocaml
brunoro_ has quit [Ping timeout: 260 seconds]
brunoro_ has joined #ocaml
brunoro_ has quit [Ping timeout: 260 seconds]
brunoro_ has joined #ocaml
brunoro_ has quit [Ping timeout: 265 seconds]
malc_ has quit [Quit: ERC (IRC client for Emacs 25.0.50.2)]
brunoro_ has joined #ocaml
axiles has quit [Ping timeout: 244 seconds]
jao has quit [Ping timeout: 256 seconds]
brunoro_ has quit [Ping timeout: 265 seconds]
brunoro_ has joined #ocaml
mrf3000 has joined #ocaml
brunoro_ has quit [Ping timeout: 250 seconds]
copy` has quit [Quit: Connection closed for inactivity]
brunoro_ has joined #ocaml
mrf3000 has quit [Ping timeout: 250 seconds]
brunoro_ has quit [Ping timeout: 246 seconds]
AlexDenisov has joined #ocaml
okuu has quit [Ping timeout: 250 seconds]
axiles has joined #ocaml
brunoro_ has joined #ocaml
nomicflux has quit [Quit: nomicflux]
brunoro_ has quit [Ping timeout: 265 seconds]
brunoro_ has joined #ocaml
noddy2OOO has quit [Ping timeout: 244 seconds]
mrf3000 has joined #ocaml
brunoro_ has quit [Ping timeout: 258 seconds]
mrf3000 has quit [Ping timeout: 268 seconds]
MercurialAlchemi has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
MercurialAlchemi has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 256 seconds]
okuu has joined #ocaml
jsgrant has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fre has joined #ocaml
brunoro_ has joined #ocaml
Mercuria1Alchemi has joined #ocaml
brunoro_ has quit [Ping timeout: 265 seconds]
weoi has joined #ocaml
pyx has joined #ocaml
pyx has quit [Client Quit]
jsgrant has quit [Remote host closed the connection]
ygrek has quit [Ping timeout: 256 seconds]
brunoro_ has joined #ocaml
brunoro_ has quit [Ping timeout: 265 seconds]
ocaml596 has joined #ocaml
<ocaml596> Couldn't understand how to impose order here ? The gets should return parameters for find (find x )( get y)( get z )
<Drup> let f = find x in let y' = get y in let z' = get z in f y' z'
<Drup> If you want to impose order of evaluation, use let bindings
<ocaml596> So find has 3 paramters here ? x, y and z
<ocaml596> Ok. I think I get it.
brunoro_ has joined #ocaml
tmtwd has joined #ocaml
brunoro_ has quit [Ping timeout: 268 seconds]
brunoro_ has joined #ocaml
fre has quit [Ping timeout: 260 seconds]
wu_ng has quit [Read error: Connection reset by peer]
wu_ng has joined #ocaml
brunoro_ has quit [Ping timeout: 265 seconds]
brunoro_ has joined #ocaml
brunoro_ has quit [Ping timeout: 260 seconds]
brunoro_ has joined #ocaml
jnavila has joined #ocaml
TarVanimelde has quit [Quit: TarVanimelde]
TarVanimelde has joined #ocaml
mrf3000 has joined #ocaml
tmtwd has quit [Ping timeout: 248 seconds]
alfredo has joined #ocaml
ocaml596 has quit [Ping timeout: 260 seconds]
mrf3000 has quit [Ping timeout: 256 seconds]
brunoro_ has quit [Ping timeout: 240 seconds]
Simn has joined #ocaml
brunoro_ has joined #ocaml
larhat has joined #ocaml
brunoro_ has quit [Ping timeout: 260 seconds]
<malthe> Drup: let me try and update menhir
brunoro_ has joined #ocaml
dhil has joined #ocaml
freusque has quit [Ping timeout: 260 seconds]
frefity has quit [Ping timeout: 260 seconds]
AlexDenisov has joined #ocaml
<malthe> that does seem to fix the main issue.
rwmjones_holiday is now known as rwmjones
frefity has joined #ocaml
mrf3000 has joined #ocaml
mpenet has joined #ocaml
mrf3000 has quit [Ping timeout: 250 seconds]
kamog has joined #ocaml
d0nn1e has quit [Ping timeout: 248 seconds]
dhil has quit [Ping timeout: 265 seconds]
d0nn1e has joined #ocaml
brunoro_ has quit [Ping timeout: 240 seconds]
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ontologiae has joined #ocaml
AlexDenisov has joined #ocaml
Algebr` has quit [Ping timeout: 244 seconds]
cross has quit [Quit: Lost terminal]
pierpa has joined #ocaml
AltGr has joined #ocaml
brunoro_ has joined #ocaml
Algebr` has joined #ocaml
TarVanimelde has quit [Quit: Leaving]
mrf3000 has joined #ocaml
jwatzman|work has joined #ocaml
mrf3000 has quit [Ping timeout: 268 seconds]
freehck has joined #ocaml
wu_ng has quit [Ping timeout: 258 seconds]
brunoro_ has quit [Quit: WeeChat 1.5]
kakadu has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pierpa has quit [Ping timeout: 245 seconds]
mpenet has quit [Remote host closed the connection]
<malthe> Drup: I get another error "Error: Unbound value Parser.modlist", but "modlist" is a symbol in parser.mly.
mfp has joined #ocaml
<malthe> if you clone to repo and "make build-js" then you should see this.
<malthe> newbie build troubles :~|
laszloh has joined #ocaml
laszloh has left #ocaml [#ocaml]
<Drup> best to wait for stephen's answer
<malthe> k
zpe has joined #ocaml
<malthe> i'm trying to understand his paper and his code with the objective of writing an implementatin in C
<Drup> why would you ever want to implement a type checker in C ?
<malthe> its not terrible
<companion_cube> some people write their dependent type checker in C++ ;-)
dhil has joined #ocaml
<Drup> malthe: compared to any language with ADT ? Yes it is.
<malthe> I dispatch on id field and use anonymous struct/union (C11) to avoid clutter (and use unique field names for every term/node type).
<johnelse> is there an easy way to get the tyxml pretty printer to output nicely formatted xml? I basically want the same output I'd get by piping through xmllint --format
<Drup> johnelse: it's not implemented, but it should be easy to add. I just never bothered
<johnelse> Drup: ok thanks, maybe I'll have a go
<Drup> that would be nice
<Drup> I want it optional, though, since most of the time you don't care, and it would be quite less efficient if you do it with format)
<Drup> (but that should be easy, just add an optional ~pretty argument)
<johnelse> yeah, makes sense
<johnelse> although kinda funny to add a ~pretty argument to a pretty printer :)
Algebr` has quit [Ping timeout: 245 seconds]
<companion_cube> ~actually_pretty:true
<Drup> Format is useful both for prettyness and composability :p
<companion_cube> malthe: I think Drup's point is that OCaml is ∞-ly more convenient than C to write typecheckers
<johnelse> ~prettiness:5
<malthe> companion_cube: oh yes, definitely, or haskell, but i'm writing a compiler + runtime and to keep things simple (for me), I use C.
<companion_cube> :/
<companion_cube> well, good luck to you
<Drup> that's not simpler, really
<malthe> depends on your background I guess.
<Drup> Compilers are actually the one case where I'm pretty sure it's faster to learn the basics of OCAML. Just using ADT+pattern matching without anything else from the language is already ridiculously better
<Drup> but, well, it's your pain ;)
<malthe> the downside is that you need ocaml to build the compiler then.
<malthe> and ocaml has multiple versions, packages, etc. its an added dependency that has a cost, obviously.
<Drup> which is available on most plateforms and in most distributions
<malthe> very true
douglascorrea has joined #ocaml
Algebr` has joined #ocaml
mrf3000 has joined #ocaml
douglasc_ has joined #ocaml
douglascorrea has quit [Ping timeout: 258 seconds]
mrf3000 has quit [Ping timeout: 256 seconds]
orbifx has joined #ocaml
silver has joined #ocaml
<orbifx> kakadu: made a pull request
TarVanimelde has joined #ocaml
ontologiae has quit [Ping timeout: 260 seconds]
freusque has joined #ocaml
TarVanimelde has quit [Ping timeout: 244 seconds]
TarVanimelde has joined #ocaml
<_andre> hi
<_andre> i have a ppx rewriter that needs to save some state, and i'm doing that by saving a dump file of the marshalled data
<_andre> (kinda hackish but i couldn't find another way)
<_andre> anyway, it worked fine when building the tests, but now i'm trying to actually use the rewriter from another project, and the files are preprocessed in the "wrong" order, so it dies because the dump file wasn't created yet
<_andre> is there a way to force a different order in this case, or maybe some less hackish way to keep state with ppx?
noddy2OOO has joined #ocaml
mrf3000 has joined #ocaml
mrf3000 has quit [Ping timeout: 246 seconds]
AlexDenisov has joined #ocaml
sepp2k has joined #ocaml
<rfv> does anyone have any example on how to change the OUnit2 timeout ? I'm doing a coding challenge which takes more than one minute to test and I can't get the test running because of OUnit's timeout
malc_ has joined #ocaml
dhil has quit [Ping timeout: 250 seconds]
<companion_cube> there might be an option
agarwal1975 has quit [Quit: agarwal1975]
TarVanimelde has quit [Quit: TarVanimelde]
<vinoski> rfv: if you look at http://ounit.forge.ocamlcore.org/api-ounit/OUnitTest.html you can see that TestCase takes a test_length and test_fun. that test_length type lets you set a timeout
TarVanimelde has joined #ocaml
<rfv> vinoski: thanks, will check it out
<freehck> People, is there some library providing some analog of Racket Ports for Ocaml? The point is an ability to work with read/write functions using ports instead of Ocaml's channels. And it may be anything behind the port: it may be a fd, it may be Buffer, or String (Bytes for write operations).
<companion_cube> not that I know of
Algebr`` has joined #ocaml
Algebr` has quit [Read error: Connection reset by peer]
agarwal1975 has joined #ocaml
<orbifx> is it possible to assing a name to a signature of a function and then reuse that for function parameters?
<vinoski> orbifx: yes, just define a type
<orbifx> like: type callback: a -> b -> c ?
<orbifx> will try
<vinoski> orbifx: yes except = not :
<orbifx> ok thansk vinoski
<orbifx> yeah when i got to writing it I ended up with that
ontologiae has joined #ocaml
<rfv> vinoski: works with specifying OUnitTest.Long, but meanwhile I figured out I was compiling to bytecode which for my use case is 7 times slower than native. If I compile to native it works out of the box, without changing the timeout
<vinoski> rfv: nice, even better
al-damiri has joined #ocaml
copy` has joined #ocaml
ilovezfs_ has joined #ocaml
<ilovezfs_> did anyone get camlp5 working with 4.04.0?
<orbifx> kakadu: is the a function in lablqt to get the objects from the Qml context?
weoi has quit [Quit: Page closed]
<kakadu> No, I felt it is not needed
<kakadu> Well, It is useful only when you set context objects outside of OCaml
<kakadu> but it seems to be easy to add it
<orbifx> ok, looking at it now
<orbifx> Basing that branch on the one I have send for PR though :P
TarVanimelde has quit [Ping timeout: 244 seconds]
nomicflux has joined #ocaml
TarVanimelde has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Mercuria1Alchemi has quit [Ping timeout: 260 seconds]
<kakadu> ilovezfs_: Do you really need this or it is only curiosity?
<ilovezfs_> need it for homebrew
<ilovezfs_> I'm doing the ocaml 4.04.0 upgrade
<ilovezfs_> and this is one of the few that becomes broken if I push the upgrade
<ilovezfs_> I don't personally need it. I'm just one of the homebrew maintainers doing what we do hehe
<ilovezfs_> fedora maintainer hit the same problem :)
pierpa has joined #ocaml
<kakadu> It should not be very difficult
<ilovezfs_> that's good news
mrf3000 has joined #ocaml
AlexDenisov has joined #ocaml
FreeBirdLjj has joined #ocaml
pierpa has quit [Remote host closed the connection]
pierpa has joined #ocaml
mrf3000 has quit [Ping timeout: 250 seconds]
zv_ has joined #ocaml
Algebr`` has quit [Ping timeout: 256 seconds]
zv has quit [Ping timeout: 260 seconds]
shinnya has joined #ocaml
TarVanimelde has quit [Read error: Connection reset by peer]
TarVanimelde has joined #ocaml
TarVanimelde has quit [Read error: Connection reset by peer]
TarVanimelde has joined #ocaml
shambrarian has joined #ocaml
jao has joined #ocaml
seliopou has quit [Ping timeout: 256 seconds]
seliopou has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
cic has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 245 seconds]
<cic> hm, i'm trying to use something using camlp5. i installed ocaml etc. using brew on mac, and i got camlp5 in transitional mode from this. however, it seems that i need camlp5 in strict mode, so i installed camlp5 with opam and it seems to say that that version is strict ... so far so good. however, when i try to use camlp5 in the repl (the ocaml program) it seems that ocaml tries to use the "system" camlp5
<cic> instead of the version from opam (because it complains about some inconsistent files). any ideas how to get ocaml to use the version installed by opam?
<kakadu> You can try installing ocaml in separate opam switch
* kakadu thinks that camlp5 gains some popularity last days....
mrf3000 has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<cic> kakadu: do you mean "opam switch <some version>"? i tried that but it still finds the system camlp5 :(.
mrf3000 has quit [Ping timeout: 265 seconds]
freusque has quit [Quit: WeeChat 1.5]
<kakadu> and after that you need to install camlp5 in that switch
<kakadu> also you can occasionly forget to update environment after switching to new switch
<orbifx> kakadu, I wish to generalise our PropMap, so that it doesn't only support Qt Quick property maps, but any kind of binding
<orbifx> have you any thoughts or opinions on this?
<orbifx> want to PM so that we don't spam the room?
<kakadu> both is fine for me
alfredo has quit [Quit: Textual IRC Client: www.textualapp.com]
<cic> kakadu: i installed it and did the eval env thing also. but i think the problem is that it still finds the system camlp5 and sometimes uses it instead of the version installed by opam
<kakadu> cic: what does `ocamlfind query camlp5` say?
AlexDenisov has joined #ocaml
<kakadu> Also it can be an error in the way you are trying to use camlp5 in REPL
<kakadu> AFAIR you need to \#load "camlp5o.cma";;
<kakadu> orbifx: Do you get private messages in IRC?
sh0t has joined #ocaml
jmiven has quit [Quit: co'o]
jmiven has joined #ocaml
<cic> and now it works ... i realized that i didn't install camlp5 in the new switch after all. i have ocaml 4.03.0 as system compiler, then i picked a newer compiler, but camlp5 didn't work with that version, and i checked for camlp5 with which instead of ocamlfind (stupid mistake). but ocamlfind didn't find camlp5 after i switched to 4.03.0 from opam! so i installed it and using "ocaml -I `camlp5 -where`" i can
<cic> use camlp5 in the repl.
<cic> kakadu: thank you!
<orbifx> yeah was afk kakadu
freusque has joined #ocaml
TarVanimelde has quit [Quit: TarVanimelde]
pierpa has quit [Remote host closed the connection]
larhat has quit [Quit: Leaving.]
pierpa has joined #ocaml
kamog has quit [Remote host closed the connection]
veggie_ has joined #ocaml
TarVanimelde has joined #ocaml
pierpa has quit [Ping timeout: 260 seconds]
Simn has quit [Quit: Leaving]
frefity has quit [Ping timeout: 248 seconds]
mrf3000 has joined #ocaml
Anarchos has joined #ocaml
jnavila has quit [Quit: It was time]
nomicflux has quit [Quit: nomicflux]
jwatzman|work has quit [Quit: jwatzman|work]
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
govg has joined #ocaml
FreeBirdLjj has joined #ocaml
<companion_cube> anyone has problems building the last version of omake?
slash^ has joined #ocaml
larhat has joined #ocaml
ollehar has joined #ocaml
cross has joined #ocaml
SpiceGuid has joined #ocaml
larhat has quit [Quit: Leaving.]
<copy`> I am able to install omake without problems (from opam)
<companion_cube> version 0.10.1?
kakadu has quit [Remote host closed the connection]
<copy`> Yep
libertas has joined #ocaml
Algebr`` has joined #ocaml
ontologiae has quit [Ping timeout: 248 seconds]
<companion_cube> hmpf, weird
silver has quit [Ping timeout: 248 seconds]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
silver has joined #ocaml
zpe has quit [Ping timeout: 265 seconds]
rgrinberg has joined #ocaml
Algebr``` has joined #ocaml
Algebr`` has quit [Ping timeout: 244 seconds]
slash^1 has joined #ocaml
slash^1 has left #ocaml [#ocaml]
lujara has joined #ocaml
<lujara> Hi, I'm a total beginner with ocaml and am trying to insert a value into a sorted int list. Could someone tell me what's wrong with my function? http://pastebin.com/kVwW9u7r
koala_man has joined #ocaml
ygrek has joined #ocaml
<koala_man> how do I search for ocaml functions? in Haskell I'd use Hoogle
rgrinberg has quit [Remote host closed the connection]
kakadu has joined #ocaml
douglasc_ has quit [Remote host closed the connection]
<SpiceGuid> koala_man,
<SpiceGuid> OCaml standard functions :
<SpiceGuid> OCaml standard functions for GTK2 :
<SpiceGuid> OCaml standard methods for GTK2 :
<justin_smith> lujara: I don't know for sure, but my first guess is precedence issues between all the infix operators you are using, so parens might help
SpiceGuid has quit [Quit: ChatZilla 0.9.92 [SeaMonkey 2.40/20160120202951]]
<lujara> justin_smith, infix operator would be the "::"?
<justin_smith> lujara: :: and compare are both infix
<lujara> added parenthesis but the error persists
<lujara> the compiler says that it expects "value" to be a function
<lujara> i dont see why :s
octachron has joined #ocaml
<Algebr```> koala_man: I like using ocp-browser
<Algebr```> not exactly hoogle
<octachron> lujara, look at the condition in "if "head compare value" "
<lujara> octachron, what about it? I'm probably missing something really obvious
<lujara> "compare" is supposed to be something like "<="
<octachron> companion_cube, omake build fails for me too. Since it seems to be documentation related, it could be triggered by the presence of hevea
douglascorrea has joined #ocaml
<octachron> lujara, replace "head" by "f", compare => x, value ⇒ y: (head compare vale) ⇒ f x y
<octachron> i.e., "compare" is not an infix operator, when you write "head compare value" you are applying head as a function the arguments compare and value
<justin_smith> lujara: oh, I should have checked, it was compare that is not infix
<justin_smith> octachron: yeah - I was just playing with it, that's the problem exactly, thanks for checking it
<justin_smith> sorry for speaking up before actually trying it myself
<lujara> ahh i get the problem
<lujara> so i should rather do compare head value
<lujara> in order to use compare as a function
<justin_smith> yup, that fixes it (or at least it compiles now for me)
<lujara> neat, and it actually makes sense :p
<lujara> also np justin_smith, always appreciate people trying to help c:
<lujara> thanks you two
<octachron> lujara, yes, to complete the explanation, the weird type error was due to the fact that since you were applying head, the compiler deduced that list was a list of functions
<lujara> i see
_andre has quit [Quit: leaving]
ohama has quit [Ping timeout: 260 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
ohama has joined #ocaml
<lujara> ok now why does eclipse keep running the same old binary instead of actually compiling a new one ._.
freusque has quit [Ping timeout: 252 seconds]
AlexDenisov has joined #ocaml
ollehar has quit [Quit: ollehar]
<Leonidas> what is the magical incantation I need to put in _tags to let ocamlbuild know that a module requires a package?
<Leonidas> I have <**/web.ml>: package(webmachine) but that fails linking
<Leonidas> I don't want to add it to the true:-rules because I don't want to link it into every binary.
<Leonidas> I suppose I need to add some other <**/web.???>: rule but which one would that be?
shinnya has quit [Ping timeout: 260 seconds]
Onemorenickname has joined #ocaml
<Onemorenickname> Hi people
<Onemorenickname> I'm trying to do some network things in ocaml
<Onemorenickname> and i got type bitfield = Int64.t list
<Onemorenickname> now, i'm trying to send it with sendto
<Onemorenickname> but sendto expects a string
<Onemorenickname> how can i use a string as a bitfield ?
<Onemorenickname> or learn more about intern representation of strings, and how sendto uses it
<Onemorenickname> ?
<octachron> Leonidas, I think you only need to add a " "binary_name.native" : package(…)" tag
nomicflux has joined #ocaml
<Leonidas> octachron: yep, thanks, that worked :)
<octachron> Onemorenickname, a short-term solution might be to use the Marshal module
<Onemorenickname> octachron, and a long term one ?
<Onemorenickname> (i don't see how marshall would help though. marshalling every int64, concatenating the result, and send it through sendto ?)
<octachron> Onemorenickname, you can marshal the whole list
<Onemorenickname> but it won't be a bitfield
<Onemorenickname> just a string representation of my list
<Onemorenickname> i have a protocol with specific formatting for my packets
<octachron> Onemorenickname, if you have a specific protocol in mind, you can write it directly?
gahbu_ has joined #ocaml
<octachron> since a string/ Bytes.t is just an array of bytes in OCaml
<octachron> (or use one of the bynary protocol generator)
orbifx has quit [Quit: WeeChat 1.6]
mrf3000 has quit [Remote host closed the connection]
mrf3000 has joined #ocaml
jnavila has joined #ocaml
mrf3000 has quit [Ping timeout: 240 seconds]
<Onemorenickname> octachron, i don't understand what you mean by "writing it directly"
<Onemorenickname> (that's what i'm trying to do, writing at the bit level in a string)
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
rpip_ has quit [Ping timeout: 260 seconds]
slash^ has quit [Read error: Connection reset by peer]
malc_ has quit [Quit: ERC (IRC client for Emacs 25.0.50.2)]
<octachron> Onemorenickname, something like "let write b k n = for i = 0 to 7 do b.[k+i]<- char_of_int ( (n lsr (8*i)) land 0xFF) done" ?
<Onemorenickname> if i do so, the resulting string will be a c-like bitfield ?
<Onemorenickname> (like, char[] ?)
<Onemorenickname> if yes, where can i find the doc ?
<Onemorenickname> (i believe you, but i'd like to be able to find it by myself next time)
<octachron> Do you mean in term of memory representation for string/Bytes.t? If so, you could look either at the corresponding chapter in either manual or RWO.
<octachron> ( I am a bit confused on what you think strings are in OCaml.)
veggie_ has quit [Ping timeout: 252 seconds]
<Onemorenickname> octachron, basically, i don't know what strings are in OCaml.
<Onemorenickname> i don't know if its a (char list * int) or wtvr
<Algebr```> Onemorenickname: like at what level, at the OCaml level or the implementation level ?
<Onemorenickname> the ocaml level
<Algebr```> its a string type
<octachron> Strings are just (specialized) arrays
mrf3000 has joined #ocaml
averell has joined #ocaml
veggie_ has joined #ocaml
mrf3000 has quit [Read error: Connection reset by peer]
mrf3000 has joined #ocaml
AltGr has left #ocaml [#ocaml]
pierpa has joined #ocaml
douglascorrea has quit [Remote host closed the connection]
douglascorrea has joined #ocaml
douglascorrea has quit [Ping timeout: 258 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 248 seconds]
veggie_ has quit [Ping timeout: 265 seconds]
veggie_ has joined #ocaml
kakadu has quit [Ping timeout: 258 seconds]
MercurialAlchemi has quit [Ping timeout: 240 seconds]
zv_ has quit [Quit: WeeChat 1.5]
Algebr``` has quit [Remote host closed the connection]
jnavila has quit [Ping timeout: 248 seconds]
kakadu has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gahbu_ has quit [Quit: Textual IRC Client: www.textualapp.com]
Onemorenickname has quit [Quit: Leaving]
isd has quit [Read error: Connection reset by peer]
isd has joined #ocaml
bbc_ is now known as bbc
sepp2k has quit [Quit: Leaving.]
octachron has quit [Quit: Leaving]
kakadu has quit [Ping timeout: 252 seconds]
silver has quit [Read error: Connection reset by peer]
govg has quit [Ping timeout: 248 seconds]
shambrarian has quit [Quit: bye!]
pierpa has quit [Ping timeout: 256 seconds]
jao has quit [Ping timeout: 244 seconds]
freusque has joined #ocaml
d0nn1e has quit [Ping timeout: 260 seconds]
d0nn1e has joined #ocaml
agarwal1975 has quit [Quit: agarwal1975]
jao has joined #ocaml