ChanServ changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.02.1 announcement at http://ocaml.org/releases/4.02.html | Public channel logs at http://irclog.whitequark.org/ocaml
rand000 has quit [Quit: leaving]
ghostpl_ has quit [Ping timeout: 255 seconds]
Guest28295 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ptc has joined #ocaml
ptc is now known as Guest18103
BitPuffin has joined #ocaml
AltGr has joined #ocaml
Simn has quit [Quit: Leaving]
`eeks has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
claudiuc has quit [Remote host closed the connection]
bjorkintosh has quit [Ping timeout: 272 seconds]
jbalint has quit [Ping timeout: 252 seconds]
travisbrady has quit [Quit: travisbrady]
`eeks has joined #ocaml
`eeks has quit [Client Quit]
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ontologiae_ has joined #ocaml
Guest18103 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
claudiuc has joined #ocaml
ontologiae_ has quit [Ping timeout: 245 seconds]
reem has quit [Remote host closed the connection]
ygrek has joined #ocaml
ghostpl_ has joined #ocaml
Nijikokun has joined #ocaml
Nijikokun has quit [Max SendQ exceeded]
Nijikokun has joined #ocaml
bytbox has quit [Remote host closed the connection]
ptc has joined #ocaml
ptc is now known as Guest97124
ghostpl_ has quit [Ping timeout: 250 seconds]
claudiuc has quit [Remote host closed the connection]
axiles has quit [Ping timeout: 250 seconds]
shinnya has quit [Ping timeout: 250 seconds]
reem has joined #ocaml
reem has quit [Remote host closed the connection]
reem has joined #ocaml
Guest97124 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
axiles has joined #ocaml
mfp has quit [Ping timeout: 246 seconds]
darkf has joined #ocaml
mfp has joined #ocaml
Haudegen has quit [Ping timeout: 246 seconds]
JuggleTux has joined #ocaml
bjorkintosh has joined #ocaml
reem has quit [Remote host closed the connection]
Haudegen has joined #ocaml
Denommus has joined #ocaml
jao has quit [Ping timeout: 272 seconds]
reem has joined #ocaml
travisbrady has joined #ocaml
_whitelogger has joined #ocaml
reem has quit [Remote host closed the connection]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Denommus has quit [Quit: going home]
reem has joined #ocaml
reem has quit [Remote host closed the connection]
yminsky has joined #ocaml
BitPuffin has quit [Ping timeout: 244 seconds]
reem has joined #ocaml
reem has quit [Remote host closed the connection]
yminsky has quit [Quit: yminsky]
travisbrady has quit [Quit: travisbrady]
reem has joined #ocaml
reem has quit [Remote host closed the connection]
ghostpl_ has joined #ocaml
reem has joined #ocaml
reem has quit [Remote host closed the connection]
nullcat has joined #ocaml
ghostpl_ has quit [Ping timeout: 264 seconds]
reem has joined #ocaml
bytbox has joined #ocaml
reem has quit [Remote host closed the connection]
hilquias has joined #ocaml
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
reem has joined #ocaml
reem has quit [Remote host closed the connection]
reem has joined #ocaml
ygrek has quit [Ping timeout: 255 seconds]
reem has quit [Remote host closed the connection]
nullcat has joined #ocaml
badkins has quit []
travisbrady has joined #ocaml
reem has joined #ocaml
keen__________80 has joined #ocaml
keen__________79 has quit [Ping timeout: 265 seconds]
reem has quit [Remote host closed the connection]
<Algebr> For numeric code, is there any way around the float_of_int/int_of_float constantly?
<whitequark> what are you trying to do?
Nijikokun has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Algebr> wanted to write a generic linear regression function
<Algebr> I guess it means that I have to ensure that the input data is only all ints or only all floats, its kind of annoying
travisbrady has quit [Quit: travisbrady]
reem has joined #ocaml
moei has quit [Read error: Connection reset by peer]
JuggleTux has quit [Quit: Lost terminal]
moei has joined #ocaml
reem has quit [Remote host closed the connection]
rgrinberg has quit [Ping timeout: 264 seconds]
rgrinberg has joined #ocaml
reem has joined #ocaml
reem has quit [Remote host closed the connection]
matason has joined #ocaml
reem has joined #ocaml
swgillespie has joined #ocaml
reem has quit [Remote host closed the connection]
ghostpl_ has joined #ocaml
ghostpl_ has quit [Ping timeout: 245 seconds]
psy_ has quit [Ping timeout: 272 seconds]
MrScout_ has quit [Ping timeout: 265 seconds]
reem has joined #ocaml
darkf_ has joined #ocaml
darkf has quit [Ping timeout: 264 seconds]
darkf_ is now known as darkf
keen__________80 has quit [Read error: Connection timed out]
keen__________80 has joined #ocaml
ygrek has joined #ocaml
Bhavya has joined #ocaml
reem has quit [Remote host closed the connection]
reem has joined #ocaml
reem has quit [Remote host closed the connection]
reem has joined #ocaml
reem has quit [Remote host closed the connection]
ski has quit [Ping timeout: 265 seconds]
rgrinberg has quit [Ping timeout: 264 seconds]
MrScout_ has joined #ocaml
<flux> algebr, well, you could write your code as a functor and parametrize it by the data type module it operates on
<flux> but in practice.. what use is a linear regression function working on integers?-o
reem has joined #ocaml
reem has quit [Remote host closed the connection]
reem has joined #ocaml
<Algebr> flux: touch on the integers part, but would it look like LinReg.Make(Int) or LinReg.Make(Float) ?
<Algebr> touche
AlexRussia has joined #ocaml
<Algebr> Make isn't a special keyword, just a convention right
ghostpl_ has joined #ocaml
MrScout_ has quit [Remote host closed the connection]
reem has quit [Remote host closed the connection]
ghostpl_ has quit [Ping timeout: 264 seconds]
reem has joined #ocaml
reem has quit [Remote host closed the connection]
<flux> yes, it would look like and yes, it would look like that
ski_ has joined #ocaml
antkong has quit [Quit: antkong]
reem has joined #ocaml
reem has quit [Remote host closed the connection]
rgrinberg has joined #ocaml
reem has joined #ocaml
ski_ is now known as ski
reem has quit [Remote host closed the connection]
rgrinberg has quit [Ping timeout: 244 seconds]
antkong has joined #ocaml
antkong has quit [Read error: Connection reset by peer]
reem has joined #ocaml
reem has quit [Remote host closed the connection]
reem has joined #ocaml
reem has quit [Remote host closed the connection]
yomimono has joined #ocaml
moei has quit [Read error: Connection reset by peer]
moei has joined #ocaml
reem has joined #ocaml
reem has quit [Remote host closed the connection]
MercurialAlchemi has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
matason has quit [Ping timeout: 246 seconds]
reem has joined #ocaml
badon has quit [Disconnected by services]
badon_ has joined #ocaml
badon_ is now known as badon
jneen is now known as jneen|zzz
reem has quit [Remote host closed the connection]
reem has joined #ocaml
dsheets has quit [Ping timeout: 264 seconds]
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ghostpl_ has joined #ocaml
mengu has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
slash^ has joined #ocaml
dsheets has joined #ocaml
reem has quit [Remote host closed the connection]
rgrinberg has joined #ocaml
matason has joined #ocaml
ghostpl_ has quit [Ping timeout: 245 seconds]
reem has joined #ocaml
rgrinberg has quit [Ping timeout: 256 seconds]
dav has joined #ocaml
reem has quit [Remote host closed the connection]
reem has joined #ocaml
Kakadu has joined #ocaml
dav__ has quit [Ping timeout: 265 seconds]
antkong has joined #ocaml
arj has joined #ocaml
reem has quit [Remote host closed the connection]
monod has joined #ocaml
dav has quit [Ping timeout: 245 seconds]
dav__ has joined #ocaml
reem has joined #ocaml
antkong has quit [Ping timeout: 244 seconds]
monod has quit [Quit: Sto andando via]
Fullma has quit [Ping timeout: 244 seconds]
dav__ has quit [Ping timeout: 245 seconds]
dav has joined #ocaml
reem has quit [Remote host closed the connection]
IbnFirnas has quit [Read error: Connection reset by peer]
dav has quit [Ping timeout: 252 seconds]
dav has joined #ocaml
Kakadu has left #ocaml [#ocaml]
IbnFirnas has joined #ocaml
reem has joined #ocaml
laughing-octo-sh has joined #ocaml
Simn has joined #ocaml
alkoma has quit [Ping timeout: 264 seconds]
lopex has quit [Quit: Connection closed for inactivity]
AlexRussia has quit [Ping timeout: 272 seconds]
mort___ has joined #ocaml
AlexRussia has joined #ocaml
laughing-octo-sh has quit [Ping timeout: 256 seconds]
rgrinberg has joined #ocaml
Fullma has joined #ocaml
Kakadu has joined #ocaml
Haudegen has quit [Ping timeout: 264 seconds]
rgrinberg has quit [Ping timeout: 272 seconds]
ghostpl_ has joined #ocaml
Haudegen has joined #ocaml
matason has quit [Ping timeout: 252 seconds]
zpe has joined #ocaml
lopex has joined #ocaml
ollehar has quit [Quit: ollehar]
dsheets has quit [Ping timeout: 246 seconds]
reem has quit [Remote host closed the connection]
mengu has quit [Remote host closed the connection]
larhat has joined #ocaml
ollehar has joined #ocaml
ghostpl_ has quit [Remote host closed the connection]
Haudegen has quit [Ping timeout: 265 seconds]
dsheets has joined #ocaml
ghostpl_ has joined #ocaml
AltGr has left #ocaml [#ocaml]
Haudegen has joined #ocaml
elfring has joined #ocaml
reem has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
reem has quit [Ping timeout: 256 seconds]
reem has joined #ocaml
struktured has quit [Ping timeout: 256 seconds]
reem has quit [Remote host closed the connection]
<MercurialAlchemi> flux: hmm
<MercurialAlchemi> isn't that the very OO web framework thingie?
<MercurialAlchemi> also, it's really quick to write 'fast' and 'concurrent', but it's more work to back up such claims with comprehensive benchmarks :)
<whitequark> "match Unix.fork () with" lol
<whitequark> it's garbage
<whitequark> like, pretty much every single decision
<mrvn> What's wrong with matching fork?
<whitequark> nothing wrong with matching
<whitequark> many things wrong with forking
<MercurialAlchemi> well, yes and no
<MercurialAlchemi> it depends when you fork
<whitequark> every request, of course
<MercurialAlchemi> yeah
<MercurialAlchemi> "lightweight and fast"
<MercurialAlchemi> :)
<mrvn> I can probably handle the whole request before fork() comes back.
<MercurialAlchemi> it doesn't seem to be using any async library either
<MercurialAlchemi> ah well
<MercurialAlchemi> let's say it's a proof of concept
<flux> how about if it used ocaml threads?-o
<mrvn> MercurialAlchemi: what async library do you want to use? libc/librt so you get 16 threads for IO?
<MercurialAlchemi> lwt?
<mrvn> MercurialAlchemi: that's non-blocking, not async
<whitequark> lwt is an async library, of course
<MercurialAlchemi> are you saying that lwt doesn't do asynchronous IO?
<mrvn> I'm saying it uses non-blocking stuff underneath
<MercurialAlchemi> I'm not talking about parallelism
<mrvn> and that's realy all you need for sockets.
rgrinberg has joined #ocaml
<flux> ocaml doesn't really have a great varietry of threading-related primitivies (ie. semaphores, queueing non-blocking queues, broadcast busses)
<flux> all that business happens on the monadic libraries
<whitequark> semaphores should probably just die
<flux> what, semaphores are great!
_andre has joined #ocaml
<whitequark> anyway there's ocaml-semaphore
<mrvn> since ocaml doesn't interrupt you everything is pretty much atomic.
badon has quit [Disconnected by services]
badon_ has joined #ocaml
<whitequark> wat?
<MercurialAlchemi> flux: ocaml doesn't have great IO anything out of the box, either
<whitequark> ocaml interrupts you every once in a while if you use threads
badon_ is now known as badon
<mrvn> whitequark: nope. Only on alloc.
<flux> this must be one of the most compact website on existence: http://ocaml-semaphore.forge.ocamlcore.org/
<whitequark> first, that's not guaranteed
<whitequark> second, you allocate a lot in ocaml anyway
<mrvn> whitequark: It's how the GC works. can't be changed.
<flux> that provides sysv semaphores, not semaphores you would typically use for inter-thread synchronization
<flux> well, or that's atleast what the interface looks like :)
moei has quit [Quit: Leaving...]
<whitequark> mrvn: bullshit. an implementation without GIL would not suffer from that, for example
<mrvn> whitequark: Point is that you can do "incr foo" and that's going to be atomic.
<flux> mrvn, have you tried that incr foo works also on the oc4mc branch?
rgrinberg has quit [Ping timeout: 255 seconds]
<mrvn> whitequark: you have to replace the GC for that. Teach it about register contents.
<flux> it is sort of annoying that it is almost safe, and then you have overhead of using mutexes to make it truly safe
<whitequark> mrvn: i'm well aware.
<whitequark> point is, this "atomicity" is not a guarantee that is provided by the language
<flux> isn't ocaml specified by its implementation?-)
<whitequark> by its manual, in my opinion
<whitequark> everything that's not in the manual is subject to change without notice anyway
etehtsea has joined #ocaml
etehtsea has quit [Max SendQ exceeded]
etehtsea has joined #ocaml
etehtsea has quit [Max SendQ exceeded]
<mrvn> It's like C. It has nothing to say about threads. That there actually is a thread module is more of an aftherthought thats completly undocumented behaviour.
<whitequark> that's complete bullshit
<mrvn> whitequark: then show me the place in the manual that declares a granteed behavour with threads.
<whitequark> search for "happens-before", for example
<whitequark> 22 matches in the N1548 pdf
<mrvn> mrvn@frosties:/usr/share/doc/ocaml/docs% rgrep "happens before" .
<mrvn> mrvn@frosties:/usr/share/doc/ocaml/docs%
<whitequark> uh, I was talking about C.
<mrvn> whitequark: doh. Yes, they added threading eventually. Majorly in c++ too.
<whitequark> if we're talking about ocaml, sure, there's http://caml.inria.fr/pub/docs/manual-ocaml/libthreads.html
<whitequark> it gives you some very specific guarantees, such as "Thread.create funct arg creates a new thread of control, in which the function application funct arg is executed concurrently with the other threads of the program."
<whitequark> and it does not give you other guarantees, such as atomicity.
<mrvn> which describe the thread module but not how or if that changes the semantic of anything else.
<mrvn> whitequark: that's what I said.
<whitequark> "That there actually is a thread module is more of an aftherthought thats completly undocumented behaviour.
<whitequark> "
<whitequark> no, it's not undocumented.
<mrvn> whitequark: you are misreading me. Yes, the Thread module is documented. The language though does not document it's semantic under the aspect of threads.
yomimono has quit [Ping timeout: 245 seconds]
<mrvn> i.e. weather "incr foo" will always be atomic or not.
<whitequark> um, yes
<mrvn> so we all agree. lets get lunch.
<adrien_znc> f00d!
antkong has joined #ocaml
mengu has joined #ocaml
seangrove has quit [Ping timeout: 240 seconds]
bjorkintosh has quit [Quit: Leaving]
rossberg has quit [Remote host closed the connection]
rossberg has joined #ocaml
avsm has joined #ocaml
pyon has left #ocaml ["work"]
Bhavya has quit [Quit: Leaving]
ontologiae_ has joined #ocaml
ygrek has quit [Ping timeout: 244 seconds]
Haudegen has quit [Ping timeout: 264 seconds]
matason has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
Haudegen has joined #ocaml
jao has quit [Ping timeout: 256 seconds]
matason has quit [Ping timeout: 246 seconds]
octachron has joined #ocaml
yomimono has joined #ocaml
rgrinberg has joined #ocaml
Haudegen has quit [Ping timeout: 265 seconds]
yomimono has quit [Ping timeout: 264 seconds]
rgrinberg has quit [Ping timeout: 246 seconds]
Haudegen has joined #ocaml
johnelse is now known as johnel_away
johnel_away is now known as johnelse
mcclurmc_ has quit [Ping timeout: 246 seconds]
johnelse is now known as johnel_away
johnel_away has quit [Remote host closed the connection]
TheLemonMan has joined #ocaml
Haudegen has quit [Ping timeout: 250 seconds]
hilquias has quit [Ping timeout: 272 seconds]
matason has joined #ocaml
`eeks has joined #ocaml
Haudegen has joined #ocaml
monod has joined #ocaml
bjorkintosh has joined #ocaml
Haudegen has quit [Ping timeout: 244 seconds]
slash^ has joined #ocaml
fedjo has joined #ocaml
mengu has quit [Ping timeout: 240 seconds]
Haudegen has joined #ocaml
Kakadu has quit [Ping timeout: 246 seconds]
Kakadu has joined #ocaml
oscar_toro has joined #ocaml
mengu has joined #ocaml
Haudegen has quit [Ping timeout: 255 seconds]
rgrinberg has joined #ocaml
Haudegen has joined #ocaml
BitPuffin has joined #ocaml
monod has quit [Quit: Sto andando via]
rgrinberg has quit [Ping timeout: 244 seconds]
travisbrady has joined #ocaml
shinnya has joined #ocaml
antkong has quit [Quit: antkong]
steffo has joined #ocaml
AlexRussia has quit [Ping timeout: 256 seconds]
travisbrady has quit [Quit: travisbrady]
AlexRussia has joined #ocaml
pyon has joined #ocaml
Fullma has quit [Ping timeout: 244 seconds]
dsheets has quit [Ping timeout: 256 seconds]
voglerr3 has joined #ocaml
voglerr2 has quit [Ping timeout: 245 seconds]
robink has quit [Ping timeout: 245 seconds]
wting has quit [Ping timeout: 245 seconds]
wting has joined #ocaml
robink has joined #ocaml
ggole has joined #ocaml
jprakash has joined #ocaml
moei has joined #ocaml
Haudegen has quit [Remote host closed the connection]
Haudegen has joined #ocaml
tane has joined #ocaml
badkins has joined #ocaml
travisbrady has joined #ocaml
rgrinberg has joined #ocaml
jprakash has quit [Ping timeout: 265 seconds]
rgrinberg has quit [Ping timeout: 256 seconds]
oscar_toro has quit [Quit: Lost terminal]
jbalint has joined #ocaml
jbalint has joined #ocaml
mcc has joined #ocaml
Haudegen has quit [Ping timeout: 252 seconds]
mengu has quit [Remote host closed the connection]
mort___ has left #ocaml [#ocaml]
igstan has joined #ocaml
Guest31356 has joined #ocaml
gasche has quit [Remote host closed the connection]
Haudegen has joined #ocaml
gasche has joined #ocaml
TheLemonMan has quit [Quit: leaving]
moei has quit [Ping timeout: 250 seconds]
moei has joined #ocaml
igstan has quit [Quit: igstan]
Haudegen has quit [Ping timeout: 246 seconds]
johnelse has joined #ocaml
testcocoon has quit [Quit: Coyote finally caught me]
mengu has joined #ocaml
lordkryss has joined #ocaml
<haesbaert> regarding ocaml, say I have two descriptors that I want to continually read from.
testcocoon has joined #ocaml
<flux> haesbaert, sounds like you want to use Unix.select or Lwt
<haesbaert> if I got this right I should do something like join (bind t1; bind t2)
<haesbaert> flux: sorry sorry, I meant " regarding lwt "
dsheets has joined #ocaml
<haesbaert> and then Lwt_main.run on the joined thread
Haudegen has joined #ocaml
<haesbaert> now, suppose t2 gets some input and runs, does the scheduler continue to wait on events on t2 ?
<haesbaert> from the docs, I'm guessing not, t2 terminates.
<haesbaert> is that correct ?
<haesbaert> something like: Lwt_main run Lwt.join [ Lwt.bind t1 ; Lwt.bind t2]
<haesbaert> what is the lifecycle of t1 and t2 ? In other words, after the first event of t2, is t2 "gone" ?
paolooo has joined #ocaml
mcclurmc has joined #ocaml
ollehar has quit [Quit: ollehar]
struktured has joined #ocaml
seangrove has joined #ocaml
<flux> hmm
<flux> I'm not really familiar with Lwt to say about that :)
<haesbaert> from some tests I run, it seems if t2 is Lwt_io.read_char, it just reads one char and terminates
<haesbaert> I wonder if I should recreate all lwts in my main loop everytime one finished
<haesbaert> *finishes
<tane> haesbaert, no
<tane> you have a function that reads a char from for example stdin, handles the input and calls itself recursively
<haesbaert> OHHHHHHHH
<haesbaert> that makes a lot more sense
<tane> if you use the lwt syntax extension it looks like usual code
<haesbaert> I keep thinking on it as events, like a poll/select
<tane> yeah
<tane> if you're familiar with an actor approach to concurrency, it's exactly like that
<tane> they usually hang in a loob
<tane> loop*
<tane> waiting for some input
shinnya has quit [Ping timeout: 252 seconds]
<haesbaert> then I just let the End_of_File go uncaught until the join ?
<haesbaert> I mean I catch it with Lwt.catch instead of Lwt.join
<tane> for example, or catch it in your loop and call "return_unit" instead of a recursive call
<tane> depends on what your interactions look like
<haesbaert> awesome, I think I got it
<haesbaert> thanks a lot
<tane> :)
darkf has quit [Quit: Leaving]
AlexRussia has quit [Ping timeout: 245 seconds]
AlexRussia has joined #ocaml
struktured has quit [Ping timeout: 265 seconds]
<mfp> hmm am I being silly? it looks to me like there's a race condition in ocaml-ssl which can cause it to choke on EINTR on reads/writes
<haesbaert> depends if SA_RESTART is set for the fd
<mfp> you can get the signal used to mark OCaml threads for preemption during SSL_read
* mfp checks
<haesbaert> then the syscall gets restarted and you never see the signal
rgrinberg has joined #ocaml
<mfp> haesbaert: AFAICS SA_RESTART is used nowhere in OCaml's runtime, lwt or ocaml-ssl
<mfp> shouldn't ocaml-ssl handle it anyway, by retrying instead of raising Unix_error? Or maybe it should be done higher, in e.g. Lwt_ssl and other callers?
mengu has quit [Remote host closed the connection]
arj has quit [Quit: Leaving.]
rgrinberg has quit [Ping timeout: 252 seconds]
<mfp> oh right, it's not even Unix_error _, it's Ssl.Read_error Error_syscall so you cannot handle it in the caller, it's got to be done by ocaml-ssl
<haesbaert> I'm not sure it should retry, libraries that retry on EINTR are evil since you can never get back from them with a signal
<haesbaert> can you reproduce the case ?
<mfp> then the error reporting would be in need of some changes so that you can address EINTR higher
<haesbaert> i.e send a signal while the applicatoin is blocked on a SSL_read
<mfp> Lwt_ssl uses non-blocking sockets so it's a bit hard :/
<haesbaert> AFAIC you can't get EINTR with nonblocking sockets
mcc has quit [Quit: This computer has gone to sleep]
<haesbaert> but that is some behaviour that might not be uniform across unixes
<mfp> actually, what I'm seeing is seemingly spurious Ssl.Read_error Ssl.Error_syscall and trying to figure out what could be doing that --- seems I'll have to patch ssl to get a look at errno
<tane> mfp, use "strace"
<haesbaert> you could try to look with fstat/strace
<mfp> yes, good idea
<Drup> hi mfp, still investigating the web stack I see :)
<mfp> Drup: not in ocsigen-server actually, but if I do find something it would also benefit from it :)
<Drup> in web stack, I meant the whole thing, ssl included :p
mcclurmc has quit [Remote host closed the connection]
dsheets_ has joined #ocaml
<mfp> Drup: btw. feel free to +1 https://github.com/savonet/ocaml-ssl/pull/15 :P
dsheets has quit [Ping timeout: 252 seconds]
<Drup> did you tried to email the liquidsoap people ?
octachron has quit [Quit: Leaving]
<mfp> I assumed smimram would be getting notifications from github... are there more liquidsoap people?
travisbrady has quit [Quit: travisbrady]
<Drup> I though so, yes
<Drup> in the website, it says they are 3.
mengu has joined #ocaml
mengu has joined #ocaml
mawuli has quit [Ping timeout: 265 seconds]
mcclurmc has joined #ocaml
mawuli has joined #ocaml
seangrove has quit [Ping timeout: 252 seconds]
mengu has quit []
The_Mad_Pirate has quit [Ping timeout: 252 seconds]
The_Mad_Pirate has joined #ocaml
seangrove has joined #ocaml
ghostpl_ has quit [Remote host closed the connection]
mcclurmc has quit [Remote host closed the connection]
ghostpl_ has joined #ocaml
struktured has joined #ocaml
Simn has quit [Quit: Leaving]
seangrove has quit [Remote host closed the connection]
zpe has quit [Remote host closed the connection]
jneen|zzz is now known as jneen
zpe has joined #ocaml
darnuria has quit [Remote host closed the connection]
darnuria has joined #ocaml
zpe has quit [Ping timeout: 244 seconds]
rgrinberg has joined #ocaml
matason has quit [Ping timeout: 272 seconds]
Algebr has quit [Remote host closed the connection]
badkins has quit []
ptc has joined #ocaml
ptc is now known as Guest6946
struktured has quit [Ping timeout: 265 seconds]
travisbrady has joined #ocaml
ghostpl_ has quit [Remote host closed the connection]
ygrek has joined #ocaml
jprakash has joined #ocaml
hilquias has joined #ocaml
struktured has joined #ocaml
mort___ has joined #ocaml
jao has joined #ocaml
jwatzman|work has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
johnelse is now known as johnel_away
johnel_away is now known as johnelse
struktured has quit [Read error: Connection reset by peer]
struktured has joined #ocaml
Rebelion has joined #ocaml
larhat has quit [Quit: Leaving.]
ygrek has quit [Ping timeout: 264 seconds]
Rebelion has quit [Ping timeout: 244 seconds]
Guest6946 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MercurialAlchemi has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
jwatzman2 has joined #ocaml
jwatzman|work has quit [Disconnected by services]
jwatzman2 is now known as jwatzman|work
jwatzman|work has quit [Changing host]
jwatzman|work has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 256 seconds]
Anarchos has joined #ocaml
badkins has joined #ocaml
monod has joined #ocaml
SomeDamnBody has joined #ocaml
<SomeDamnBody> Hey what's the >>= operator do
<SomeDamnBody> how do I find documentation on that
<SomeDamnBody> isn't it something that is defined by the language?
<Anarchos> SomeDamnBody logical shift ?
<SomeDamnBody> Anarchos, is that something that is overloaded?
<SomeDamnBody> I didn't think that ocaml had overloading...
<SomeDamnBody> I'm looking at Cmdline.parse () >>= start
<SomeDamnBody> where start is defined earlier in a let binding to be a fucntion
ptc has joined #ocaml
<Anarchos> maybe concatenation of input streams or channels ?... Did you google it ?
ptc is now known as Guest42551
<SomeDamnBody> Anarchos, yeah
<tane> SomeDamnBody, >>= is usually the infix name for the "bind" function of the corresponding monad
<SomeDamnBody> ergh
<SomeDamnBody> I'm not experienced with monads...
<SomeDamnBody> but what I was inferring was that
<SomeDamnBody> the Cmdline.parse () function's returned result was being fed into bound start
<tane> yes
<SomeDamnBody> thought so... it's kind of hard
<tane> look at the functions On_error.bind and On_error.(>>=)
<tane> they're identical
<SomeDamnBody> but I just am trying to figure out, from readbin.ml how to transform some bytes or a string into BIL
<tane> if you look at the type you may infer what they do
<SomeDamnBody> where is On_error?
<SomeDamnBody> oh! >>= is an infix operator for bind
<tane> line 2
MrScout has joined #ocaml
<SomeDamnBody> tane, it's Or_error
<tane> right :)
<SomeDamnBody> I read On_error
travisbrady has quit [Quit: travisbrady]
<tane> i wrote on_error, my mistake
<SomeDamnBody> all is well
<SomeDamnBody> Found it
<SomeDamnBody> Insn.bil
<SomeDamnBody> now I just need to figure out how to construct an Insn instance
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
ggole has quit []
avsm has quit [Quit: Leaving.]
monod has quit [Quit: Sto andando via]
Submarine has joined #ocaml
travisbrady has joined #ocaml
jleroux has joined #ocaml
Kakadu has quit [Quit: Page closed]
bjorkintosh has quit [Quit: Leaving]
nullcat has joined #ocaml
claudiuc has joined #ocaml
jleroux has quit [Ping timeout: 246 seconds]
mhi^ has joined #ocaml
dsheets_ has quit [Ping timeout: 245 seconds]
_whitelogger has joined #ocaml
travisbrady has quit [Quit: travisbrady]
ghostpl_ has joined #ocaml
travisbrady has joined #ocaml
oscar_toro has joined #ocaml
TheLemonMan has quit [Quit: leaving]
struktured has quit [Ping timeout: 255 seconds]
seangrove has joined #ocaml
<seangrove> I'm writing a function to recursively remove all files/directories (the equivalent of rm -r), but wondering if there's a built-in function in the Unix namespace, or something similar
<seangrove> Googling shows a bunch of custom functions
<kakadu> maybe 'fileutils' library?
<kakadu> I remmeber the one
<kakadu> It is remrkable because many functions from there are buggy
<seangrove> kakadu: Checking it out, thanks
<seangrove> And you're saying that fileutils has a lot of buggy functions?
<tane> haha
<kakadu> the one mentioned in this channel was
ontologiae_ has quit [Ping timeout: 252 seconds]
rgrinberg has quit [Ping timeout: 245 seconds]
struktured has joined #ocaml
jprakash has quit [Ping timeout: 256 seconds]
laughing-octo-sh has joined #ocaml
dsheets has joined #ocaml
axiles has joined #ocaml
johnelse is now known as johnel_away
johnel_away is now known as johnelse
mort___ has quit [Quit: Leaving.]
_andre has quit [Quit: leaving]
yomimono has joined #ocaml
MrScout has quit [Remote host closed the connection]
MrScout has joined #ocaml
nullcat has quit [Read error: Connection reset by peer]
jprakash has joined #ocaml
rgrinberg has joined #ocaml
MooseAndCaml has joined #ocaml
<MooseAndCaml> hi
rgrinberg has quit [Ping timeout: 256 seconds]
<MooseAndCaml> does anyone here work with functions that extend lists to include previous elemets?
<seangrove> Is there a preference for Sys.readdir vs Unix.readdir ?
<MooseAndCaml> Sorry, rather - Something like List.map , with (fun last_elt x -> ) ,,,
nullcat has joined #ocaml
<Drup> MooseAndCaml: you could write your own easily :)
<MooseAndCaml> for sure. I was wondering if there was an abstraction people used for combinations of N prev, N next, Nacc and index folds
netABCs has joined #ocaml
<Drup> for index fold, well, foldi
<Drup> not sure what you mean for the rest
<haesbaert> let opts = if not env.ipv4only then
<haesbaert> AI_FAMILY PF_INET6 :: opts else opts
<haesbaert> in
<haesbaert> is there a better idiom for this ?
<haesbaert> I'll have some others, it will look silly to do "else opts" for every line
<def`> make a function cons_if?
<haesbaert> ack, I was wondering if there wasn't something without making a func
<def`> cons_if b1 v1 @ cons_if b2 v2 @ opts
<haesbaert> @ = :: ?
<def`> (or @@ I don't remember which one is for applicatiln)
<def`> let (@@) f x = f x
<def`> there is a def like that in stdlib, I am not sure of the exact name
<haesbaert> lemese
<haesbaert> Catenate two lists. Same function as the infix operator @. Not tail-recursive (length of the first argument). The @ operator is not tail-recursive either.
<haesbaert> that one ?
<Drup> def`: @@ :p
myyst has joined #ocaml
mcclurmc has joined #ocaml
myst has quit [Ping timeout: 265 seconds]
antkong has joined #ocaml
AlexRussia has quit [Ping timeout: 255 seconds]
`eeks has quit [Quit: Textual IRC Client: www.textualapp.com]
bjorkintosh has joined #ocaml
badkins has quit []
whitequark has joined #ocaml
hilquias has quit [Ping timeout: 240 seconds]
oriba has joined #ocaml
<Leonidas> def`: @@, definitely
<Leonidas> my code is basically just @@ and |> with some other things thrown in occasionally
<Leonidas> (although I think @@ is a super-ugly name)
<mrvn> @^@
travisbrady has quit [Quit: travisbrady]
<mrvn> you can't set the stack pointer in C. You need at least some asm for that.
<mrvn> ups
myyst has quit [Ping timeout: 256 seconds]
myyst has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 252 seconds]
majoh has quit [Quit: bam bam bam bam]
badkins has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
antkong has quit [Ping timeout: 264 seconds]
Guest42551 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
badkins has quit [Remote host closed the connection]
rgrinberg has joined #ocaml
myyst has quit [Ping timeout: 265 seconds]
myyst has joined #ocaml
travisbrady has joined #ocaml
steffo has quit [Quit: steffo]
WraithM has quit [Quit: leaving]
ptc has joined #ocaml
ptc is now known as Guest29441
jprakash has quit [Ping timeout: 272 seconds]
Submarine has quit [Quit: Leaving]
kakadu has quit [Remote host closed the connection]
nullcat has quit [Read error: Connection reset by peer]
myyst has quit [Ping timeout: 265 seconds]
myyst has joined #ocaml
lnich has quit [Ping timeout: 246 seconds]
lnich has joined #ocaml
tane has quit [Quit: Verlassend]
matason has joined #ocaml
bytbox has quit [Remote host closed the connection]
AlexRussia has joined #ocaml
elfring has quit [Quit: Konversation terminated!]
nullcat has joined #ocaml
antkong has joined #ocaml
<SomeDamnBody> How do I unsalt an instances so that I can get the type I want
<SomeDamnBody> Error: This expression has type ('a, 'b) Insn.t
<SomeDamnBody> but an expression was expected of type ins
<SomeDamnBody> basically, Insn.t is of type insn
<SomeDamnBody> ... "expected of type insn**
<SomeDamnBody> how do I get that to match?
<S11001001> SomeDamnBody: is Insn.t abstract at the point of use?
<SomeDamnBody> abstract?
<SomeDamnBody> I don't think so
<SomeDamnBody> it gets passed as an argument
<SomeDamnBody> I'm trying to augment a particular function that was converting Insn into a string summary
<SomeDamnBody> into a different string encoding using sexp to be printed
<SomeDamnBody> so, I'm thinking... if it compiles the old way, with calls and all that to decode and use it or whatever... why does it fail on my use?
<SomeDamnBody> Is there some matching abstract invocation of the function that I'm using?
<SomeDamnBody> (is what I'm thinking, I know you probably wouldn't know)
<SomeDamnBody> because right now, I'm going over this library that I'm pretty unfamiliar with and it's really hard to make sense of everything because several functions are repeated numerous times
<SomeDamnBody> I opened up the library in toplevel and it shows it's type being appropriate
<SomeDamnBody> so idk why it is wrong here...
<S11001001> SomeDamnBody: in the Insn.mli file, is type t defined, or just listed as 'type t'?
<S11001001> SomeDamnBody: (the mli, rather than the ml)
<SomeDamnBody> it's actually declared as type t with bin_io, compare, sexp
nullcat has quit [Read error: Connection reset by peer]
<SomeDamnBody> S11001001,
<S11001001> SomeDamnBody: so I can't say for sure, but it is probably abstract then, and you aren't permitted to use that Insn.t ~ insn at this location.
<SomeDamnBody> the documentation generated is really misleading then
<SomeDamnBody> it says that the type of the function that i'm trying to use is:
<SomeDamnBody> t -> Bap_types.Std.bil
<S11001001> SomeDamnBody: start here for more information about this https://realworldocaml.org/v1/en/html/files-modules-and-programs.html#signatures-and-abstract-types
Simn has joined #ocaml
nullcat has joined #ocaml
<S11001001> SomeDamnBody: I'm not surprised; documentation is less trustworthy than the type system :)
<SomeDamnBody> yeah
mcclurmc_ has joined #ocaml
mcclurmc has quit [Ping timeout: 246 seconds]
MercurialAlchemi has quit [Ping timeout: 256 seconds]
<SomeDamnBody> S11001001, but then why does the top level get it right?
<S11001001> SomeDamnBody: not sure
matason has quit [Ping timeout: 252 seconds]
reem has joined #ocaml
<S11001001> SomeDamnBody: how are you opening it into the top level?
jprakash has joined #ocaml
reem has quit [Remote host closed the connection]
<SomeDamnBody> well there are lots of modules with that exact function name and supposed signature
<SomeDamnBody> I mean, bil is in like... several different modules
<nullcat> whitequark ping
<whitequark> pong
<SomeDamnBody> so i've been trying different ones
<SomeDamnBody> sorry, someone came by my apt
<nullcat> whitequark you just said that ctypes 0.4 is not released yet...but http://imgur.com/1IHdasv
<nullcat> that's...weird
<nullcat> yeah i saw that...
averell has quit [Remote host closed the connection]
<whitequark> `opam repository` ?
<nullcat> oh my bad
<nullcat> i added mirage-dev...
<S11001001> SomeDamnBody: I mean, what command are you issuing to the toplevel to load this module where you are able to see the type t's concrete definition?
<nullcat> thanks quark
<SomeDamnBody> S11001001, the toplevel I'm using is a custom version that has the libraries preloaded
<SomeDamnBody> Bap.Std.Insn.bil
<SomeDamnBody> which is exactly the function I tried to resolve when I placed that exact value in to transform the value
netABCs has quit [Ping timeout: 255 seconds]
mcclurmc_ has quit [Ping timeout: 272 seconds]
mcclurmc has joined #ocaml
<S11001001> SomeDamnBody: maybe your custom toplevel ignores signatures.
<SomeDamnBody> how could it do that?
<SomeDamnBody> ignores signatures?
<S11001001> SomeDamnBody: every time it sees a .mli or 'sig', just sort of whistle and look nonchalant
<SomeDamnBody> oh lol
<SomeDamnBody> so a mli restricts the amount of info it sees
Simn has quit [Read error: Connection reset by peer]
<SomeDamnBody> likely because the purpose in doing that was to increase modular
<SomeDamnBody> modularity, but then you have to know how to compose interfaces and instances so that you can make such as strategy useful
<SomeDamnBody> right?
<S11001001> SomeDamnBody: that's what happens when you #use "file.ml" for example
<S11001001> file.mli gets ignored
<SomeDamnBody> oh ok
<S11001001> SomeDamnBody: and yes, right.
reem has joined #ocaml
mjw56 has joined #ocaml
ghostpl_ has quit [Remote host closed the connection]
travisbrady has quit [Quit: travisbrady]
travisbrady has joined #ocaml
jwatzman|work has joined #ocaml
reem has quit [Remote host closed the connection]
<SomeDamnBody> does opening a specific other module before using a particular exposed edition of the function that I want alter the behavior?
badkins has joined #ocaml
<SomeDamnBody> S11001001, ^