mjonsson has quit [Read error: Operation timed out]
mjonsson has joined #ocaml
fraggle_ has quit [Read error: Connection reset by peer]
rimmjob has joined #ocaml
<rimmjob>
is ocaml a good first ml it learn?
<rimmjob>
*to
fraggle_ has joined #ocaml
<NaCl>
do you have an interest in SML and F#?
sebz has joined #ocaml
<rimmjob>
F# not really, and i dont really know enough about SML to say
<rimmjob>
most of my experience is with python, java (for school) and scheme
<NaCl>
There is more stuff written with OCaml than either of them, IIRC
jaar has quit [Ping timeout: 260 seconds]
joewilliams_away is now known as joewilliams
mjonsson has quit [Remote host closed the connection]
oriba has left #ocaml []
<rimmjob>
why dont more people use ocaml?
<rimmjob>
its fast, has a well thought out object system that plays well with fp, and has a consistent, concise and elegant syntax that is kind of like c
<rimmjob>
thats like everything
surikator has quit [Quit: Computer is sleeping. I'm probably not.]
Skolem has joined #ocaml
Skolem has quit [Quit: Skolem]
junsuijin has quit [Ping timeout: 260 seconds]
bzzbzz has quit [Quit: leaving]
sebz has quit [Quit: Computer has gone to sleep.]
sebz has joined #ocaml
Reaganomicon has quit [Read error: Connection reset by peer]
Skolem has joined #ocaml
Skolem has quit [Quit: Skolem]
Skolem has joined #ocaml
joewilliams is now known as joewilliams_away
ftrvxmtrx has joined #ocaml
Skolem has quit [Quit: Skolem]
sebz has quit [Quit: Computer has gone to sleep.]
sebz has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
Skolem has joined #ocaml
Skolem has quit [Client Quit]
arubin has quit [Quit: arubin]
<flux>
rimmjob, well, it's functional, so that's automatically out from the mainstream languages ;)
<flux>
also some people complain about its syntax, don't know what for, though
Skolem has joined #ocaml
edwin has joined #ocaml
dnolen has quit [Quit: dnolen]
sebz has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
Tianon has quit [Ping timeout: 260 seconds]
sebz has joined #ocaml
sebz has quit [Client Quit]
sebz has joined #ocaml
sebz has quit [Client Quit]
<adrien>
because "it's not C-like", which is really stupid
<adrien>
it _looks_ different
<adrien>
damn, DimitryKada left hours ago and I won't be able to tell him anything, so if someone could forward that to him when he gets back
<adrien>
lablgtk doesn't let people create their own signals and that already gets everyone quite far; however, being able to create Qt slots (gtk callbacks pretty much) is really needed; I'd really go for the route which means having the least amount of work to do
<adrien>
also, lablgtk provides "glib-like signal/callback functions", and I've absolutely never used them; and I don't know if anyone ever used them actually
<flux>
:)
sebz has joined #ocaml
sebz has quit [Ping timeout: 276 seconds]
sebz has joined #ocaml
<adrien>
edwin: I forgot to mention that while I think FRP can help for development, I can't make any guarantee currently: it might as well be a complete failure (in my case?) ;-)
<edwin>
adrien: important is that we experiment with new ideas
<adrien>
yes, I completely agree; lablgtk-react is "oh, I finally get FRP. OK, how do I use _actually_ it in a GUI program now?"
<adrien>
currently, my lablgtk branch and lablgtk-react give you 'a React.event-s for all signals handled in lablgtk
<adrien>
what I'm trying to do with lablgtk-react is to make functions around that that are useful and easy to use
<edwin>
adrien: I'd imagine FRP would work like this in a GUI: all controls that generate events generate React events, those React events are then used in the application to create a dataflow to React signals, which are bound to changing output controls
<adrien>
actually, I'm after ideas for things I should try to do and provide but that mostly amount to modelizing graphical applications: the one I've had mostly in mind was a browser so far, meaning type "'a" organized in a kind of list, with one element focused
<adrien>
edwin: that's how I'm doing it currently
<edwin>
adrien: actually I think this could be used to model a webapp as well
<edwin>
but its more complicated there as you need to model both client side (js/ajax code), and pure serverside actions
<adrien>
it's true it's mostly about modelling having several elements in a single program
<edwin>
for GUIs one problem might be that certain inputs change how your UI looks like
<edwin>
for example you select some radio
<edwin>
and you have to populate a combobox with different elements then
<edwin>
or is that more easily modeled as N comboboxes on top of each-other, out of which only one is visible at a time?
<edwin>
(if the data is static)
<edwin>
another problem might be if changing some input controls, change some other control that would reinterpret the output. Think about zooming in/out of a map
<edwin>
if you zoom in on the map, you change the map contrl
<edwin>
which changes how the mouse clicks are interpreterd
<edwin>
I think React should be able to handle these situations without going into inf loop?
<adrien>
what I have settled for currently is that all react events for a single "model" go through a single function which I apply React.E.fold on (meaning you have access to the current state, the signal, and have to return a new state)
<edwin>
sounds good
<adrien>
and then, the events are sent again to the various graphical elements of the model
<edwin>
and I get to decide how to group my controls into models?
<adrien>
yes, completely
<edwin>
what if I need the state of other models in computing some model?
<edwin>
like a hierararchy of models
<adrien>
you add couples of (source, sink) at a time, and you can do that however you want
<adrien>
it's a couple being there's a unique identifier going on and sinks are going to want to know if their matching source sent the message they're receiving or not
<adrien>
(but nothing prevents you from passing a never sources and a sink that does nothing)
<edwin>
how about enabling/disabling controls? is that part of the state that I can modify?
<adrien>
if you need the state of other models, you would probably make a bigger model
<adrien>
that's something I haven't really been able to experiment with
<adrien>
I get the feeling that what I've currently done is going to be OK but I need to try with an actual example and write the corresponding code before I can say for sure
<edwin>
btw what is the listview_test supposed to do?
<edwin>
I see a list, and a menu, but clicking does nothing
<adrien>
crash :P
<adrien>
j/k
<adrien>
it's a listview which is using a zipper for the storage
sebz has quit [Quit: Computer has gone to sleep.]
<adrien>
it's not frp stuff but it should work
<adrien>
on the other hand, I'm not sure it will help in anything but trivial applications
<adrien>
it's nice to have a good data structure and it helps, but quite quickly, you get back to the issues there are currently
<adrien>
using FRP is going to force you to get a complete model of your application and I think I would only advise it for projects that don't only need to display elements
<adrien>
in this exact case, I would probably avoid it
<adrien>
however, if you add multiplayer or something like that, it can become worth it
<adrien>
because, I think you can do this example with frp/lablgtk-react but it might be going for a harder route
<adrien>
pretty much, if you can model it, you can do it with frp
<adrien>
DimitryKakadu: lablgtk doesn't let people create their own signals and that already gets everyone quite far; however, being able to create Qt slots (gtk callbacks pretty much) is really needed; I'd really go for the route which means having the least amount of work to do
<adrien>
in answer to some question you had yesterday about moc
<adrien>
and, also, lablgtk provides "glib-like signal/callback functions", and I've absolutely never used them; and I don't know if anyone ever used them actually
<adrien>
DimitryKakadu: I guess that "value" is not a declared type: do you include the caml headers?
<DimitryKakadu>
flux: I can't see any suprising expansions.....
<adrien>
DimitryKakadu: don't you need a ';' after the class declaration?
<DimitryKakadu>
adrien: ))))))))))))))))))))))))
<DimitryKakadu>
facepalm
<DimitryKakadu>
thanks
<adrien>
;-)
<adrien>
did the mistake more than once =)
<adrien>
and there are a few things with worse error messages than ocaml, first being g++/C++
<adrien>
(actually ocaml got a bit better)
<DimitryKakadu>
I think I will not do this mistake writing on C++, but this code is autogenerated and generator is written in OCaml and many printfs makes just-in-time-in-my-mind compilation difficult
<adrien>
oh...
sebz has quit [Quit: Computer has gone to sleep.]
<adrien>
that really makes many mistakes possible
<adrien>
DimitryKakadu: use xstrp4
<adrien>
and preferably hcarty's updated version
surikator has joined #ocaml
<edwin>
hmm is lwt_io.write buggy? apparently it only writes something if I call it twice
<edwin>
I tried flushing and closing, and with only one write it writes nothing
<edwin>
ah no, I'm doing it wrong, it works :D
<adrien>
:P
<adrien>
were you doing something wrong in particular?
<edwin>
yeah I was sending only 20 bytes instead of 24
<edwin>
so no wonder only 20 reached the other side
<adrien>
heap will only shrink (and therefore give memory back to the OS) upon heap compaction
<adrien>
so far so good
<adrien>
except that... I'm using lablgtk2 and I can't safely compact the heap
<adrien>
"When you create/load a huge image, the computer memory may not be sufficient to contain all the data. (For example, this may happen if you are working with a scanned image of A4, 720dpi, 24bit fullcolor, even if you have up to 128Mb of memory!)" ; camlimages feels old
<adrien>
bedtime, I need to cry alone on my "bed"
ftrvxmtrx has quit [Quit: Leaving]
<adrien>
hmmm, "If you need it, you may use compaction through Gc.compact where it is safe (timeouts, other threads...)"
Amorphous has quit [Read error: Operation timed out]
<adrien>
so, this is supposed to work: ignore (Glib.Timeout.add ~ms:0 ~callback:(fun () -> Gc.compact (); false));
<adrien>
and it compacts and hasn't segfaulted yet
<adrien>
it doesn't happen immediately however
surikator has quit [Read error: Connection reset by peer]
surikator has joined #ocaml
Skolem has joined #ocaml
Amorphous has joined #ocaml
dnolen has joined #ocaml
arubin has joined #ocaml
arubin has quit [Client Quit]
arubin has joined #ocaml
dnolen has quit [Remote host closed the connection]
lopex has quit []
dnolen has joined #ocaml
ulfdoz_ has joined #ocaml
ulfdoz has quit [Read error: Operation timed out]
ulfdoz_ is now known as ulfdoz
Skolem has quit [Quit: Skolem]
surikator has quit [Quit: Computer is sleeping. I'm probably not.]