<Drup>
rgrinberg: also, I think you could already do that with "type t = private int"
<Drup>
(not sure, need to check)
<sgeisenh>
struktured: I guess I'll just try to start writing code. Hopefully everything will become clear before I dig too deep of a hole! Thanks for your help.
<struktured>
sgeisenh: think of monads as concurent computations ran eventually on queue
<rgrinberg>
struktured: that's almost as bad as monads being burritos :P
<struktured>
lol
<sgeisenh>
monad metaphors are the worst
<sgeisenh>
I'll figure it out. Thanks again.
<rgrinberg>
sgeisenh: me and companion_cube wrote a bencode parsing lib in ocaml
<rgrinberg>
might be useful
<rgrinberg>
sgeisenh: you can also try your hand at libtorrent bindings
<rgrinberg>
but where's the fun in that :P
<rgrinberg>
sgeisenh: finally, RWO has a good introduction to async and monadic concurrency in general
<struktured>
interesting, I would need to hit from my datacenters possibly
<struktured>
but will look into that. solaris is sort of a nice to have..but would be pretty sweet win
<struktured>
I have other problems besides aspcud anyhow w/solaris
<rgrinberg>
struktured: a word of wisdom though (from someone not particularly wise)
<rgrinberg>
you want to lock the versions of all dependencies for devs
<struktured>
oh yeah..of course
<rgrinberg>
so you might not want them running off with the solver
<struktured>
my boss will get rigid on versioning eventually, just not really there yet.
<struktured>
I just want ocaml to work easily at this point on almost any arch
<rgrinberg>
struktured: it could be possible to setup your own solver form on linux probably btw
<rgrinberg>
sounds like a pain though
<struktured>
yeah
<rgrinberg>
struktured: but then again people who use solaris like self inflicting it ;)
<struktured>
eh I'm in good shape, got a magic script which installs ocaml with no root priveledges (with a couple rare exceptions) on redhat,ubuntu,and macos
<struktured>
requires almost nothing beyond regular unix. I bet its close to working on cygwin too
<struktured>
and seems like opam-user-setup covers the editor situation...almost. gaps seem to be requiring vim plugin, having syntastic installed, maybe some other stuff I forgot about
<struktured>
and I also have a away to auto pin repos and auto install a set of packages, so can reprofile a box with no trouble. Time to invade ocaml into my datacenters :)
<rgrinberg>
struktured: fighting the good fight :P
MercurialAlchemi has joined #ocaml
<struktured>
I always threw most of this stuff onto github today, but I gotta clean it up still before I advertise it.
<struktured>
hopefully I can get back do doing more data engineering or analysis soon, not ocaml infra
<struktured>
*to doing
* rgrinberg
will be laughing once struktured is forced to write oracle bindings or similar shit
<struktured>
cool..so then I just have to search for the oracle include dir (seems to be all over the place, unfortunately), and that's it more or less.
<struktured>
I seem to be following him already
<struktured>
I guess he didn't take the hint
hay207 has joined #ocaml
ski has joined #ocaml
<hay207>
hi guys, what is "val" that is used in modules for example?
<struktured>
a value definition, which can be a function and often is
<struktured>
"val add : int -> int -> int" defines a function in the module signature called "add" which takes 2 ints and returns another int
<struktured>
val x : int defines a value of type int as part of the modular signature
<hay207>
ok
<hay207>
thanks
freling has joined #ocaml
A1977494 has joined #ocaml
A1977494 has left #ocaml [#ocaml]
rom1504 has quit [Remote host closed the connection]
willy_ has left #ocaml ["Leaving"]
ygrek has joined #ocaml
gabemc has quit [Ping timeout: 252 seconds]
inr has quit [Ping timeout: 272 seconds]
ygrek has quit [Ping timeout: 264 seconds]
A1977494 has joined #ocaml
fraggle-boate_ has joined #ocaml
A1977494 has quit [Quit: Leaving.]
fraggle-boate has quit [Ping timeout: 264 seconds]
Gama11 has joined #ocaml
rom1504 has joined #ocaml
tane has joined #ocaml
freling1 has joined #ocaml
freling has quit [Read error: Connection reset by peer]
freling1 has quit [Client Quit]
rgrinberg has quit [Ping timeout: 252 seconds]
Cyanure has joined #ocaml
ggole has joined #ocaml
fraggle-boate__ has joined #ocaml
Snark has quit [Quit: leaving]
Snark has joined #ocaml
fraggle-boate_ has quit [Ping timeout: 264 seconds]
psy_ has quit [Ping timeout: 264 seconds]
psy_ has joined #ocaml
<reynir>
what's not working?
<reynir>
oh I was scrolled up
nullcat_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
milosn has quit [Quit: leaving]
shinnya has joined #ocaml
rgrinberg has joined #ocaml
mort___ has quit [Ping timeout: 244 seconds]
postulance is now known as postulonce
TheLemonMan has joined #ocaml
sdothum has joined #ocaml
rgrinberg has quit [Ping timeout: 265 seconds]
jbrown has quit [Remote host closed the connection]
jabesed has joined #ocaml
everyonemines has joined #ocaml
Haudegen has quit [Ping timeout: 246 seconds]
everyonemines has quit [Ping timeout: 265 seconds]
everyonemines has joined #ocaml
jbrown has joined #ocaml
jbrown has quit [Remote host closed the connection]
inr has joined #ocaml
Haudegen has joined #ocaml
shinnya has quit [Ping timeout: 272 seconds]
jbrown has joined #ocaml
Cyanure has quit [Read error: Connection reset by peer]
djellemah has joined #ocaml
Cyanure has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 255 seconds]
rand000 has joined #ocaml
<hay207>
hi guys, can i type "val" into my code,
<hay207>
when i do, it fails to execute
<ggole>
val goes in signatures. Elsewhere it isn't acceptable.
<ggole>
Well, and objects.
Anarchos has joined #ocaml
<dmbaturin>
hay207: Where did you want to use it?
rgrinberg has joined #ocaml
<hay207>
i'm learning
<hay207>
the language, for just one program that i love :)
<ggole>
hay207: are you trying to use it to ascribe types?
<hay207>
i'm learning it's use,
<dmbaturin>
module type Foo = sig val hello : unit -> unit end ;;
<dmbaturin>
module Foo : Foo = struct let hello () = print_endline "hello" end ;;
<dmbaturin>
hay207: Also, which program?
rgrinberg has quit [Ping timeout: 276 seconds]
<hay207>
don't say i'm advertising the program
<hay207>
freetennis.sourceforge.net
octachron has joined #ocaml
<reynir>
never heard of it
<dmbaturin>
Looks like it indeed could use some modules. :)
<dmbaturin>
$ wc -l ./freetennis.ml
<dmbaturin>
9033 ./freetennis.ml
idegen has joined #ocaml
<cmtptr>
omfg that main function
Algebr has joined #ocaml
<Algebr>
Is there a way to use something like ldd (or otool since I'm on OSX) on .cmo?
<craptain-hochet>
ocamlobjinfo?
<Algebr>
okay, never heard of that
<Algebr>
but is there a way to know what dlls a .cmo depends on?
Anarchos has quit [Remote host closed the connection]
BitPuffin|osx has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 258 seconds]
Anarchos has joined #ocaml
idegen has quit [Quit: Leaving.]
badon has quit [Ping timeout: 258 seconds]
leafac has joined #ocaml
ygrek has joined #ocaml
badon has joined #ocaml
shinnya has joined #ocaml
milosn has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
psy_ has quit [Ping timeout: 272 seconds]
Algebr has quit [Remote host closed the connection]
everyonemines has quit [Quit: everyonemines]
t4nk739 has joined #ocaml
kang- has joined #ocaml
<kang->
hi
t4nk739 has quit [Client Quit]
kang- has quit [Quit: Using Circe, the loveliest of all IRC clients]
michael_lee has joined #ocaml
octachron has quit [Quit: Leaving]
freling has joined #ocaml
amnn has quit [Ping timeout: 240 seconds]
amnn has joined #ocaml
michael_lee has quit [Quit: Ex-Chat]
fraggle_ has quit [Read error: Connection reset by peer]
jeffmo has joined #ocaml
jeffmo has quit [Client Quit]
leafac has quit [Ping timeout: 240 seconds]
jeffmo has joined #ocaml
fraggle_ has joined #ocaml
rgrinberg has joined #ocaml
darkf has quit [Quit: Leaving]
rgrinberg has quit [Ping timeout: 252 seconds]
freling has quit [Quit: Leaving.]
hay207 has quit [Ping timeout: 264 seconds]
psy_ has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
struktured has quit [Ping timeout: 265 seconds]
Hannibal_Smith has joined #ocaml
Cyanure has quit [Ping timeout: 252 seconds]
leafac has joined #ocaml
dsabanin has joined #ocaml
fraggle_laptop has joined #ocaml
rgrinberg has joined #ocaml
<dsabanin>
salut to the smart ones! :)
Cyanure has joined #ocaml
struktured has joined #ocaml
bjorkintosh has quit [Read error: Connection reset by peer]
<zozozo>
say I define a type 'a foo = { x : 'a }, and bar = { x: int }, I'd like to think a 'bar' and an 'int foo' will have the same representation in memory, but is is the case ? furthermore, if I have some opaque type id (which is actually an int, but not publicly), would a valueof type bar and one of type 'id foo' have the same representation in memory or not ?
<ggole>
zozozo: in general, no. For most types, yes.
<ggole>
Arrays and records where every field is a (concrete) float have a specialised rerepsenation.
<ggole>
Records with polymorphic fields where those fields happen to be a float don't have this representation.
<ggole>
As for abstract types, abstractness has no effect on representation. There's no wrapper: all the hiding happens at the type level.
<zozozo>
ok, thx
<zozozo>
in the end it does not chaneg much, but now I can shuffle some type definitions
<ggole>
Are you worried about the performance hit of introducing indirections?
<zozozo>
I was
rgrinberg has quit [Ping timeout: 240 seconds]
<dsabanin>
I too have a question. Trying to get into OCaml. I have this function: let upload_files ?(port=21) ~host ~files = printf "Uploading %s to %s:%d\n" files host port;; When I executed it like upload_files ~host:"localhost" ~files:"a,b,c";; I don't see the output, but rather get a partially applied function: ?port:int -> unit = <fun>
<dsabanin>
what am I doing wrong
<dsabanin>
I'm going through Real World OCaml book and it doesn't mention anything tricky about optional arguments
<ggole>
Oh, that's an annoying wrinkle
<ggole>
In short, you fix it by adding a () argument at the end
<dsabanin>
for some reason that didn't work: upload_files ~host:"localhost" ~files:"a,b,c" ()
<dsabanin>
Error: The function applied to this argument has type ?port:int -> unit This argument cannot be applied without label
<dsabanin>
thanks for the link, I'll go read
<ggole>
let upload_files ?(port=21) ~host ~files () = printf "Uploading %s to %s:%d\n" files host port;;
<dsabanin>
:)
<ggole>
And then upload_files ~host:"localhost" ~files:"a,b,c" ();;
<dsabanin>
ahh
<ggole>
Basically you need one non-labelled, non-optional argument after the optional arguments
<dsabanin>
got it, thank you!
<dsabanin>
that helped :)
<ggole>
I regularly forget this and run into it :/
rand000 has quit [Quit: leaving]
Hannibal_Smith has quit [Ping timeout: 246 seconds]
Algebr has joined #ocaml
<struktured>
anyone know how to opam pin a tag? with a branch I do opam pin add -k git project git@github.com:user/project#name_of_branch and it works fine
<Drup>
exactly the same way.
<struktured>
hmm not working for me...let me double check
<struktured>
ah yes I'm an idiot. spelled something wrong. thanks. I think in the past I had a different problem where both a tag and branch existed of the same name, which opam pinning (rightly) rejects
leafac has quit [Quit: Leaving.]
leafac has joined #ocaml
rgrinberg has quit [Ping timeout: 264 seconds]
<zozozo>
if I have type t = privat int, and I compare two values of type t using Pervasives.compare, will the compiler call the int comparison, or the polymorphic comparison ?
<ggole>
int, I think
<ggole>
While fully abstract types will use the polymorphic compare (eg, you can change the implementation without recompiling)
jgjl has joined #ocaml
<ggole>
Yep. (Just checked.)
<zozozo>
thanks
Hannibal_Smith has joined #ocaml
A1977494 has joined #ocaml
A1977494 has left #ocaml [#ocaml]
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
leafac has quit [Quit: Leaving.]
amnn has joined #ocaml
Anarchos has joined #ocaml
rgrinberg has joined #ocaml
robink_ has quit [Ping timeout: 248 seconds]
robink_ has joined #ocaml
BitPuffin|osx has quit [Ping timeout: 265 seconds]
Hannibal_Smith has quit [Quit: Leaving]
Hannibal_Smith has joined #ocaml
tinhead has joined #ocaml
Algebr has quit [Ping timeout: 255 seconds]
Submarine has joined #ocaml
Submarine has joined #ocaml
Haudegen has quit [Ping timeout: 244 seconds]
manizzle has quit [Ping timeout: 240 seconds]
zaquest has quit [Read error: Connection reset by peer]
thomasga has joined #ocaml
tinhead has quit [Remote host closed the connection]
tinhead has joined #ocaml
tinhead has quit [Changing host]
tinhead has joined #ocaml
jeffmo has quit [Quit: jeffmo]
lobo has joined #ocaml
tinhead has quit [Remote host closed the connection]
yomimono has joined #ocaml
Hannibal_Smith has quit [Quit: Leaving]
Haudegen has joined #ocaml
Hannibal_Smith has joined #ocaml
zaquest has joined #ocaml
defun_ has joined #ocaml
struktured has quit [Ping timeout: 255 seconds]
yomimono has quit [Ping timeout: 252 seconds]
struktured has joined #ocaml
robink_ is now known as robink
thomasga has quit [Quit: Leaving.]
defun_ has quit [Remote host closed the connection]
leafac has joined #ocaml
rgrinberg has quit [Ping timeout: 255 seconds]
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hay207 has joined #ocaml
dsabanin has quit [Quit: Leaving...]
struktured has quit [Ping timeout: 256 seconds]
thomasga has joined #ocaml
thomasga has quit [Client Quit]
dsabanin has joined #ocaml
hay207 has quit [Ping timeout: 252 seconds]
struktured has joined #ocaml
dsabanin has quit [Client Quit]
hay207 has joined #ocaml
tmtwd has quit [Ping timeout: 256 seconds]
bjorkintosh has joined #ocaml
fraggle_laptop has quit [Ping timeout: 276 seconds]
Haudegen has quit [Ping timeout: 264 seconds]
bjorkintosh has quit [Quit: Leaving]
Hannibal_Smith has quit [Quit: Leaving]
hsuh_ has quit [Ping timeout: 252 seconds]
hsuh has joined #ocaml
nullcat has joined #ocaml
rgrinberg has joined #ocaml
milosn has quit [Ping timeout: 265 seconds]
rgrinberg has quit [Ping timeout: 265 seconds]
Haudegen has joined #ocaml
jgjl has joined #ocaml
milosn has joined #ocaml
BitPuffin|osx has joined #ocaml
struktured has quit [Ping timeout: 256 seconds]
rgrinberg has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
jeffmo has joined #ocaml
ggole has quit []
<rgrinberg>
vbmithr_: i should show you my WIP for making cohttp allocate less :P
thomasga has joined #ocaml
<rgrinberg>
vbmithr_: i tried to do 0 copy but from what i can tell, the only way to do 0 copy reading in async is using read_one_chunk_at_a_time
<rgrinberg>
vbmithr_: which unfortunately seems too damn awkward
<vbmithr_>
You just add a "-i" option to this line, and this will produce the .mli file corresponding to lib/bittrex.ml instead of generating lib/bittrex.cmo
<hay207>
yes, the result is displayed, but no mli file generated
<zozozo>
hay207: juste pipe the result into the .mli file
<hay207>
ok thanks
gargaml has quit [Quit: WeeChat 1.2]
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ollehar has joined #ocaml
dsabanin has joined #ocaml
dsabanin has quit [Quit: Leaving...]
swgillespie has joined #ocaml
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jgjl has joined #ocaml
hay207 has quit [Quit: Leaving]
jonludlam has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
idegen has joined #ocaml
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tane has quit [Quit: Verlassend]
amnn has joined #ocaml
bjorkintosh has joined #ocaml
Algebr has joined #ocaml
dsabanin has joined #ocaml
<Algebr>
I have a situation where I can compile and link a package correctly when creating an executable for either ocamlc or ocamlopt but I get a DL load error when trying to use my package through utop's #require. I suspect I wrote something wrong in the META file. Do I have to do something special in a META file to say use this dynamic library? I'm already using linkopts
badon_ has joined #ocaml
badon has quit [Disconnected by services]
badon_ is now known as badon
<craptain-hochet>
you're loading a cma, not a cmo right ?
<Algebr>
hmm, I might have messed that up, will try now
<Algebr>
hmm, I don't actually get a cma during compliation.