<kino`>
But then, how can I know the sign of a two's complement number?
al-damiri has joined #ocaml
<Fardale>
x < 0 ?
<Fardale>
what are you trying to do ?
<kino`>
Ah, but I only get operations and logical operators.
<kino`>
I'm trying to implement >, actually :)
<kino`>
-get +have available
<Fardale>
what operations do you have ?
<kino`>
I've got a nand, so `and, not, xor et al`, as well as (+ - /)
<Fardale>
what is al ?
<companion_cube>
the coauthor of far too many papers
<kino`>
Hahaha
<kino`>
I mean and so on
<Fardale>
I'm not use to yet
<companion_cube>
kino`: just use "etc."? :)
<zolk3ri>
kino`: then you meant etc., I believe
<kino`>
Yeah, I should have had :)
<kino`>
Sorry for the confusion.
<Fardale>
kino`: do you have any comparaison operation ?
<Fardale>
<, > or = ?
<kino`>
Yeah, I've got =, since it's a not xor.
<Fardale>
You car do this by shifting to the right until you get only the sign bit
<Fardale>
then compare with 1
<kino`>
Ah, and shift is divide
<kino`>
In Ocaml, the sign bit's the 31th, right?
<companion_cube>
depends on your architecture
nunu has joined #ocaml
<companion_cube>
you can use Sys.word_size to know though
<companion_cube>
should be Sys.word_size-1, basically
kalio has joined #ocaml
<kino`>
Oh, nice.
<kino`>
Thanks a lot.
<Fardale>
I think divide preserve the signe, so you need a real shift
<Fardale>
lsr in ocaml
<kino`>
Ah.
<kino`>
Is there anyway to recode a divide that doesn't?
<kino`>
(btw, for getting the sign bit, it should be lsr (word_size - 2). iirc Ocaml does something with the last bit)
<companion_cube>
hannes: your https certificate is expird
<companion_cube>
+e
yourtash has joined #ocaml
<yourtash>
Hey folks! My name is Tash and I'm looking for women and people of color here who are oCaml experts - I have an immediate opportunity to fill and would LOVE to see if you'd be interested. Pls msg me here!
<Drup>
yourtash: you might want to make a post on discuss and/or the mailing list, you should reach more people
FreeBirdLjj has joined #ocaml
<yourtash>
Hi Drup - Great suggestions - how would I do that? How do I reach the mailing list operator?
<yourtash>
Thanks Drup and kit_ty_kate! Heading there now :D
nunu has quit [Quit: Page closed]
huglovefan_ has joined #ocaml
huglovefan has quit [Disconnected by services]
huglovefan_ is now known as huglovefan
FreeBirdLjj has quit [Remote host closed the connection]
<reynir>
awesome! \o/
FreeBirdLjj has joined #ocaml
jnavila has joined #ocaml
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 256 seconds]
huglovefan has quit [Quit: huglovefan]
sgnb has joined #ocaml
jnavila has quit [Ping timeout: 240 seconds]
<hannes>
companion_cube: thanks for reporting, sorry for the inconvience... i should really get this let's encrypt automation deployed
kino` has quit [Quit: WeeChat 2.1]
FreeBird_ has quit [Remote host closed the connection]
<companion_cube>
:D
<companion_cube>
I have something based on acme-tiny + a small makefile, it's quite doable
<companion_cube>
but ofc it always takes time to setup properly
pierpa_ has joined #ocaml
dhil has quit [Ping timeout: 264 seconds]
muelleme has joined #ocaml
jnavila has joined #ocaml
Haudegen has quit [Remote host closed the connection]
kakadu_ has quit [Quit: Konversation terminated!]
troydm has quit [Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset]
troydm has joined #ocaml
Jesin has joined #ocaml
Haudegen has joined #ocaml
FreeBirdLjj has joined #ocaml
xuanrui has joined #ocaml
kakadu has joined #ocaml
Cale has joined #ocaml
<Cale>
Hi, I've been trying to nixify a build of a project that uses opam. I've been using/extending opam2nix (which converts the opam package descriptions into nix derivations) and am running into a situation while trying to build the base64 package, where it seems that ocamlfind knows about the bytes package, but jbuilder doesn't, and complains that it's missing. Any idea what I might try?
<Cale>
(I'm using the 4.06.1 compiler if it helps)
jnavila has quit [Ping timeout: 256 seconds]
argent_smith has quit [Read error: Connection reset by peer]
argent_smith has joined #ocaml
jnavila has joined #ocaml
Jesin has quit [Quit: Leaving]
navaja has joined #ocaml
spew has quit [Disconnected by services]
navaja is now known as spew
<octachron>
Cale, if it helps the bytes package is a compatibility package that is essentially empty on all OCaml version supported by jbuilder
<Cale>
octachron: I kinda noticed that... makes it slightly more annoying that jbuilder is complaining about it being missing :D
<Cale>
I suppose a more concrete question I could ask would be: where does jbuilder installed-libraries collect its list of packages from? It gives me a different (somewhat shorter) list from ocamlfind list
zmt01 has joined #ocaml
zmt01 has quit [Remote host closed the connection]
<Cale>
maybe I can just hack the jbuild file...
<Cale>
yeah, that seems to work... sed it is :D
zmt00 has quit [Ping timeout: 264 seconds]
jnavila has quit [Remote host closed the connection]
muelleme has quit [Ping timeout: 268 seconds]
<octachron>
Cale, normally jbuilder uses the same mechanism than ocamlfind for finding libraries, so the two outputs should agree
<Cale>
Yeah, I don't know what's going on
kino has joined #ocaml
<Cale>
It could just be something weird about the environment that opam2nix-packages is constructing. For now, sed -i -e 's/(libraries (bytes))//' src/jbuild is enough to get the thing to actually build, but perhaps I'll run into something where that kind of hackery is insufficient, and then I'll really need to sort out what's happening.
<Cale>
http://lpaste.net/364417 -- okay, looks like that time has come almost immediately. Here's some terminal logs showing the situation with ocaml-migrate-parsetree -- ocamlfind list shows all its dependencies are installed okay, but jbuilder doesn't see them.
<Cale>
Of course, the same cheesy hack doesn't work here, because we actually need the modules from the result package
Denommus has quit [Ping timeout: 265 seconds]
<Cale>
(annotated that paste with the result of ocamlfind printconf path which admittedly produces an unusual result, though it is correct, and the path to result is available there)
argent_smith1 has joined #ocaml
argent_smith has quit [Ping timeout: 240 seconds]
nk has quit [Remote host closed the connection]
hdon has quit [Ping timeout: 246 seconds]
snhmib has quit [Ping timeout: 256 seconds]
snhmib has joined #ocaml
muelleme has joined #ocaml
muelleme has quit [Ping timeout: 260 seconds]
hdon has joined #ocaml
gtrak_1 has quit [Ping timeout: 276 seconds]
sepp2k has quit [Quit: Leaving.]
snhmib has quit [Ping timeout: 255 seconds]
snhmib has joined #ocaml
Onemorenickname has quit [Read error: Connection reset by peer]
Haudegen has quit [Remote host closed the connection]
shinnya has joined #ocaml
tarptaeya has quit [Quit: Byeeeeeee!]
neubyi has joined #ocaml
isd has joined #ocaml
argent_smith1 has quit [Quit: Leaving.]
_andre has quit [Quit: leaving]
<kino>
How can I implement C's not operator? e.g. | 0 -> x with x <> 0 | x -> 0
<kino>
(With only nands)
<kino>
Nevermind, figured I could do it some other way.
<dinosaure>
( lnot ) ?
<kino>
But lnot 1 is -2, no?
<dinosaure>
ah yeah, nvm
<kino>
(In fact, that one was not relational, and could do it with anoter operator - cmov)
<kino>
But thanks for your input!
kakadu has quit [Remote host closed the connection]
al-damiri has quit [Quit: Connection closed for inactivity]