<adrien>
and now I'm wondering if people doing cross-compilers were running 32bit archs and targetting 32bit archs too...
Yoric has joined #ocaml
mrpantoufle has joined #ocaml
ttamttam has quit [Quit: ttamttam]
ttamttam has joined #ocaml
ulfdoz has joined #ocaml
osa1 has joined #ocaml
mrpantoufle has quit [Ping timeout: 264 seconds]
mrpantoufle has joined #ocaml
Yoric has quit [Ping timeout: 256 seconds]
mrpantoufle has quit [Ping timeout: 264 seconds]
ahokaomaeha has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
mrpantoufle has joined #ocaml
mrpantoufle has quit [Ping timeout: 252 seconds]
cdidd has joined #ocaml
mrpantoufle has joined #ocaml
ahokaomaeha has joined #ocaml
answer_42 has joined #ocaml
ollehar has quit [Ping timeout: 248 seconds]
ollehar has joined #ocaml
mrpantoufle has quit [Ping timeout: 252 seconds]
mrpantoufle has joined #ocaml
leoncamel has joined #ocaml
|jbrown| has joined #ocaml
jbrown has quit [Ping timeout: 264 seconds]
Anarchos has joined #ocaml
Anarchos has quit [Ping timeout: 248 seconds]
ollehar has quit [Ping timeout: 240 seconds]
Anarchos has joined #ocaml
q66 has joined #ocaml
ocp has joined #ocaml
Yoric has joined #ocaml
ocp has quit [Ping timeout: 252 seconds]
leoncamel has quit [Ping timeout: 256 seconds]
Yoric has quit [Ping timeout: 252 seconds]
ahokaomaeha has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
ahokaomaeha has joined #ocaml
ontologiae has joined #ocaml
mcclurmc has joined #ocaml
Yoric has joined #ocaml
ahokaomaeha has quit [Ping timeout: 255 seconds]
leoncamel has joined #ocaml
Kakadu has quit []
ontologiae has quit [Ping timeout: 260 seconds]
chambart has quit [Ping timeout: 256 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
ottbot has quit [Ping timeout: 256 seconds]
leoncamel has quit [Ping timeout: 252 seconds]
Tobu has quit [Ping timeout: 245 seconds]
Yoric has quit [Remote host closed the connection]
Yoric has joined #ocaml
Tobu has joined #ocaml
Simgate has quit [Quit: Quit]
ahokaomaeha has joined #ocaml
ahokaomaeha is now known as Guest31528
darkf has quit [Quit: Leaving]
<adrien>
it woooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooorks! \o/
ulfdoz has quit [Read error: Operation timed out]
gnuvince has joined #ocaml
UncleVasya has joined #ocaml
<zorun>
:)
<zorun>
adrien: still working on your cross-compiler
<zorun>
?
Guest31528 has quit [Ping timeout: 256 seconds]
<adrien>
no, I'm done :D
ollehar has joined #ocaml
<invariant>
adrien, from where to where?
<invariant>
adrien, from heaven to hell, IIRC.
gnuvince has quit [Ping timeout: 248 seconds]
<invariant>
adrien, but which heaven and which hells, I don't recall.
gnuvince has joined #ocaml
bholst_ is now known as bholst
<adrien>
I'm definitely not on the road to hell right now :-)
<adrien>
I think I started working on cross-compiler support almost 2 months ago
<adrien>
although cloning an 15-yo SVN repo with git-svn definitely feels like hell
ulfdoz has joined #ocaml
gnuvince has quit [Remote host closed the connection]
osa1_ has joined #ocaml
osa1 has quit [Read error: Connection reset by peer]
Simgate has joined #ocaml
emmanuelux has joined #ocaml
ottbot has joined #ocaml
Simgate has quit [Quit: Quit]
pango has quit [Remote host closed the connection]
sysopfb has joined #ocaml
tane has joined #ocaml
pango has joined #ocaml
sysop_fb has quit [Ping timeout: 252 seconds]
trep has joined #ocaml
sysopfb has quit [Ping timeout: 255 seconds]
sysop_fb has joined #ocaml
trep has quit [Ping timeout: 256 seconds]
sysopfb has joined #ocaml
sysop_fb has quit [Ping timeout: 252 seconds]
Simgate has joined #ocaml
answer_42 has quit [Write error: Connection reset by peer]
osa1_ has quit [Ping timeout: 252 seconds]
osa1__ has joined #ocaml
<orbitz>
avsm: you around?
notk0 has joined #ocaml
<notk0>
hello
<notk0>
is it true that you can use ocaml to program GUIs?
<orbitz>
sure
<orbitz>
I'm not aware of a language you can't use for that
<notk0>
orbitz: would it be possible to write a GUI interface to track an IP address in OCaml?
<orbitz>
obviously
<notk0>
orbitz: could you point me on how I could achieve that
<orbitz>
for writing gui's your best bet is probably lablgtk
<orbitz>
i don't know anythign about tracking Ip addresses
<notk0>
gtk is linux only no?
<notk0>
I mean it's mostly linux is not really true multi-platform
<orbitz>
gtk works on windows, I don't know if lablgtk does
<notk0>
well it seems that due to ocaml lack of popularity compared to other languages it lacks libraries, last time I worked with Ocaml I used some curl bindings and it didn't even have documentation
<orbitz>
it can be a problem, sure
<notk0>
that among other things is keeping me from using ocaml more often
<orbitz>
notk0: ok
<notk0>
the other thing is lack of experience and knowledge in ocaml of course
<notk0>
at my university we mostly study java, in 5 years of university we had basically multiple courses per semester using Java, and only 3 I think that we had to program in Ocaml
<orbitz>
ok
<notk0>
orbitz: do you program a lot in OCaml?
<orbitz>
only personal projects
<notk0>
well I wish to program personal projects in ocaml as well, but I rarely program personal stuff due to lack of initiative/motivation and I instinctively don't choose Ocaml as my language
<orbitz>
ok
<orbitz>
well, seems like you've got some soul searching to do or something
<notk0>
orbitz: well when I get some free time, have studies to do and stuff
<notk0>
orbitz: can you tell me how I should start such a soul searching?
<orbitz>
no. if you don't want to program in ocaml, don't program in ocaml. if you want to prgoram in ocaml, program in ocaml.
<notk0>
it's more of a change of way of life, to manage my time properly, and try to program in my free time
<notk0>
I play videogames or browse the web instead of programming
<orbitz>
take a class on time management then
<notk0>
orbitz: but how do you motivate yourself to do it? find the thrill etc?
<orbitz>
i sit down and do it
<notk0>
I see
<notk0>
well I guess I should try and do that
<orbitz>
you can try starting simple than a cross platform gui tool
<notk0>
I had this idea to re-write stuff I did years ago in another language say Ocaml, to see how much I improved
yacks has quit [Quit: Leaving]
<orbitz>
notk0: so do it?
<notk0>
orbitz: I will try
<orbitz>
notk0: I just find a problem i have and solve it in ocaml
<orbitz>
that way i'm killing two brids with the same stone
<notk0>
I see
chambart has joined #ocaml
UncleVasya has quit [Ping timeout: 260 seconds]
ahokaomaeha has joined #ocaml
notk0 has quit [Remote host closed the connection]
Cyanure has joined #ocaml
sysopfb is now known as sysop_fb
Anarchos has joined #ocaml
Simgate has quit [Quit: Quit]
Snark has quit [Quit: Quitte]
ahokaomaeha has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
ahokaomaeha has joined #ocaml
Anarchos has quit [Remote host closed the connection]
<orbitz>
What are my options if I want to do a bunch of nasty c-like bit manipulations on integers?
<adrien>
Pervasives, Int32, Int64, Nativeint ?
<orbitz>
I really need a nice unsigned integer type
<|jbrown|>
I noticed a "uint" opam package, not checked it out though
<orbitz>
For example, in Int32, shifting -4 left gives me -2, but I want to shift the signed bit with it
<invariant>
Isn't doing such manipulations from OCaml really slow?
<|jbrown|>
ssh! Heh.
<invariant>
I am seeing at least a factor 10 slowdown in the socalled innerloops.
<invariant>
I looked only at ocaml-uint.
<invariant>
I think such types need compiler support.
<|jbrown|>
yeah
<invariant>
|jbrown|, and currently there isn't, right?
<|jbrown|>
I guess not. I'm not even sure if the bundled Int32, etc. have compiler support
<invariant>
At that point you can better build an interpreter :)
<|jbrown|>
(might be terrible misinformation, don't take my word for it :-))
<orbitz>
invariant: might be, but i'm dealing with a network protocol so not so concerned with it right now relative to I/O
<adrien>
you can do it in C
<invariant>
adrien, what?
<|jbrown|>
the compiler does appear to know about int32, so that was misinformation. Apologies!
<orbitz>
I'm not sure how Int32 and Int64 are implemented, a boxed type I imagine?
<|jbrown|>
yes, normally, but it looks like the compiler can unbox them at least in some cases
<adrien>
the compiler knows int32 and int64 which are signed and boxed
<adrien>
you don't need compiler support for such things: just use C
ttamttam has left #ocaml []
<orbitz>
that's seems to be what uint does
<invariant>
adrien, let's say you have a networking protocol and you need to do things really fast, then it means your whole system needs to be written in C.
<invariant>
I guess this is why LinearML kind of systems are needed.
<adrien>
the compiler supports int32/64 so that you can write 1l, 1L, 1n (nativeint) and because the compiler itself needs them afaiu
<adrien>
invariant: if you want fast bit-fiddling, yeah, go C or ASM
<adrien>
but everything else can be in ocaml
<|jbrown|>
I suggest using Uint*, and if it's not fast enough, adding support for unsigned types to the compiler :-).
<adrien>
good luck on that :P
<|jbrown|>
heh
<invariant>
Why are there no unsafe unsigned types in the compiler?
<invariant>
Because everyone wants to keep it safe?
<|jbrown|>
as long as you're only adding, subtracting & doing bit-ops, you can probably get away with Int32, I guess.
<adrien>
not that it would be rejected but because it'd be a lot of work
<|jbrown|>
there's shift_right_logical of course
<adrien>
invariant: what would that bring compared to a library in C
<adrien>
?
<invariant>
adrien, the problem with a library in C is that you would have to do the network parsing bits in C too.
<adrien>
why
<adrien>
?
<invariant>
adrien, in short, a substantial part of the system is going to be C.
<thizanne>
|jbrown|: there is no shift_left_logical apparently
<adrien>
no, no, no
<adrien>
open ocaml's int64.ml
<invariant>
adrien, before you know it, you will hear: why not do everything in C?
<|jbrown|>
thizanne: there's no need for it.
<adrien>
in stdlib/
<thizanne>
apparently orbitz needs it
<adrien>
go look at it: it proves it doesn't have to be like what you're saying
<|jbrown|>
thizanne: there isn't in C either -- there's only one kind of left shift.
<thizanne>
yes but in C it works the way orbit wants
<|jbrown|>
I think he typo'd left for right.
<invariant>
adrien, what int64 is that? Is that the same kind you get in C?
<adrien>
invariant: unsigned, boxed
<adrien>
ocaml-4.00.1/stdlib/int64.ml
<thizanne>
|jbrown|: shift_left (-1) 1 gives you -2
<thizanne>
oh wait
<|jbrown|>
of course it does :-).
<thizanne>
forget it, i'm just stupid :=
<invariant>
adrien, I think we were talking about unboxed ones.
<thizanne>
:)
<adrien>
you won't have unboxed ones in ocaml
<thizanne>
I definitely need sleep.
<invariant>
adrien, GHC has them. Why can't OCaml?
<orbitz>
adrien: int64 is signed, unboxed ,i thought
<invariant>
In a strict language, I also don't see the point of the boxes for native types.
<orbitz>
invariant: the gc requires it AFAIK
<invariant>
orbitz, that's only for user defined types.
<orbitz>
invariant: no it isn't
<adrien>
"There are some restrictions on the use of primitive types, the main one being that you can't pass a primitive value to a polymorphic function or store one in a polymorphic data type."
<pippijn>
the GC requires it by design, not by definition
<adrien>
Performance notice: values of type int64 occupy more memory space than
<adrien>
values of type int , and arithmetic operations on int64 are generally
<adrien>
slower than those on int . Use int64 only when the application