wilfredh has quit [Quit: Connection closed for inactivity]
sagax has joined #ocaml
sveit has left #ocaml ["ERC (IRC client for Emacs 26.2)"]
webshinra has quit [Ping timeout: 258 seconds]
webshinra has joined #ocaml
kvda has joined #ocaml
jmsaunde has left #ocaml [#ocaml]
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kvda has joined #ocaml
nicklaf has joined #ocaml
<nicklaf>
hi. I'm trying to opam install imagemagick, but it fails to build because "fix_build.patch: "/bin/patch -p1 -i /home/nick/.opam/log/processed-patch-1596-d2c37b" exited with code 1"
<nicklaf>
I'd be interested in debugging this myself, is there an easy way to make a local package from something on opam?
mfp has quit [Ping timeout: 245 seconds]
AtumT has quit [Quit: AtumT]
rgrant has joined #ocaml
rgrant is now known as [rg]
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cobreadmonster has quit [Quit: Connection closed for inactivity]
kvda has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
[rg] has quit [Quit: [rg]]
kvda has joined #ocaml
keep_learning_M has quit [Quit: This computer has gone to sleep]
keep_learning_M has joined #ocaml
gravicappa has joined #ocaml
ihavelotsoffries has joined #ocaml
q9929t has joined #ocaml
narimiran has joined #ocaml
q9929t has quit [Quit: q9929t]
keep_learning_M has quit [Quit: This computer has gone to sleep]
keep_learning_M has joined #ocaml
ihavelotsoffries has quit [Remote host closed the connection]
keep_learning_M has quit [Client Quit]
nicklaf has left #ocaml [#ocaml]
barockobamo has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kvda has joined #ocaml
Haudegen has joined #ocaml
jbrown has quit [Remote host closed the connection]
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
keep_learning_M has joined #ocaml
keep_learning_M has quit [Client Quit]
gahr has quit [Quit: leaving]
gahr has joined #ocaml
gahr has quit [Client Quit]
gahr has joined #ocaml
gahr has quit [Client Quit]
gahr has joined #ocaml
jbrown has joined #ocaml
gareppa has joined #ocaml
gareppa has quit [Remote host closed the connection]
gahr has quit [Quit: leaving]
gahr has joined #ocaml
gahr has quit [Client Quit]
gahr has joined #ocaml
gahr has quit [Client Quit]
gahr has joined #ocaml
mfp has joined #ocaml
keep_learning_M has joined #ocaml
Redfoxmoon has quit [Ping timeout: 245 seconds]
keep_learning_M has quit [Quit: This computer has gone to sleep]
ShalokShalom has quit [Remote host closed the connection]
jbrown has quit [Remote host closed the connection]
uzuki has quit [Quit: pyon~!]
uzuki has joined #ocaml
khodzha has quit [Quit: Leaving.]
dimitarvp has joined #ocaml
nightblues has joined #ocaml
keep_learning_M has joined #ocaml
Redfoxmoon has joined #ocaml
rpcope has quit [Ping timeout: 245 seconds]
Redfoxmoon has quit [Changing host]
Redfoxmoon has joined #ocaml
rpcope has joined #ocaml
hio has joined #ocaml
Haudegen has quit [Read error: Connection reset by peer]
gravicappa has quit [Ping timeout: 268 seconds]
keep_learning_M has quit [Quit: This computer has gone to sleep]
gareppa has joined #ocaml
tsani has quit [Ping timeout: 268 seconds]
tsani has joined #ocaml
keep_learning_M has joined #ocaml
tsani has quit [Ping timeout: 252 seconds]
Redfoxmoon has quit [Read error: Connection reset by peer]
jbrown has joined #ocaml
Redfoxmoon has joined #ocaml
gravicappa has joined #ocaml
brett-soric has joined #ocaml
Haudegen has joined #ocaml
<notnotdan>
Is there a way to extract individual bits from a char?
<Armael>
you can turn it into an int using Char.code and then use bitwise operators on int
nightblues has quit [Remote host closed the connection]
<Armael>
(and Char.code is essentially a no-op since the representation is the same)
tsani has joined #ocaml
<notnotdan>
Hm, so what is a runtime representation of an int then?
<notnotdan>
it's not fixed size?
gareppa has quit [Quit: Leaving]
<Armael>
uh, yes it is
<notnotdan>
but i mean it's more than 8 bits?
<Armael>
Char.code converts a char to an int, in this direction it's always fine (integers are always more than 8 bits yes)
<octarin>
it’s like a C cast
<Armael>
in the other direction (Char.chr) the function can fail if the integer is out of the valid range for chars (0-255)
<notnotdan>
I understand that. Sorry I am kind of obtuse. You said that the representation of chars and ints is the smae. So what happens if you convert a character to an integer? you will have the original byte there somewhere, but the rest will be filled with what exactly?
<notnotdan>
If you can at least give me keywords to google I will be happy :)
<Armael>
depends on how you do it
<Armael>
in well-type ocaml code, you can't, since int and char are different types
<Armael>
if you circunvent the typechecker (one way or another) and convert an invalid int to a char, then you can get a segfault
<Armael>
(for instance because the pattern matching compiler relies on the fact that values of type char are in the range 0-255)
FreeBirdLjj has joined #ocaml
<Armael>
to answer your question maybe, a char is represented as an int, with the implicit invariant that its value must be in 0-255
spew has joined #ocaml
<notnotdan>
Ah I see. So it actually takes more than an byte in memory?
<Armael>
for isolated chars, yes
<Armael>
if you have a string or a Bytes.t then it's using a compact representation, which only uses 8 bits for each char
<notnotdan>
ah Ok. I will try to use bytes then
FreeBirdLjj has quit [Ping timeout: 268 seconds]
<Armael>
that's what you should use if you need to represent a sequence of bytes, yes
<Armael>
(just to be clear: you don't gain anything by using Bytes.t to store a single char)