<sagotch>
moving a function from a "let rec ... and..." to a "let ...;; let rec .... solved a type issue
<sagotch>
first part of my code says:
<sagotch>
File "src/pprint.ml", line 15, characters 33-47: Error: This expression has type bool -> string but an expression was expected of type string * TypeTo.tomlEntrie -> string Type bool is not compatible with type string * TypeTo.tomlEntrie
<sagotch>
does someone see any reason why including the string_of_list function in mutually recursive declarations broke my function?
<rom1504_>
what's @@ ?
<rom1504_>
never needed that
<sagotch>
it has been included in ocaml 4
zpe has quit [Ping timeout: 252 seconds]
<sagotch>
allow you "not to put all parenthese"
jonludlam has joined #ocaml
nikki93 has quit [Remote host closed the connection]
<sagotch>
f @@ a @@ b c is f (a (b c))
<rom1504_>
ok
<rom1504_>
what's line 15 ?
<rom1504_>
(in your paste bin it's an empty line)
avsm has joined #ocaml
avsm has quit [Client Quit]
<rom1504_>
string_of_bool is also new in ocaml 4 ?
<rom1504_>
(had to do if b then "true" else "false" before)
<flux>
basically a value that is either unset or set, and it can be set once to a value. it can have callbacks. it can be waited upon synchronously. it can be mapped. a bunch of them can be waited at the same time (not included in that version)
<rom1504_>
sagotch: it seems like it can't guess right the type of string_of_list
<sagotch>
ligne 15 is actually l17 in pastebin
<rom1504_>
hard to say more precisely without being able to actually test to compile (and change things to see what happen)
<rom1504_>
yeah i figured that
<sagotch>
and no idea for string_of_bool, I just tried it
<rom1504_>
it somehow things l is a list of string * TypeTo.tomlEntrie
<sagotch>
but I can not figure out why moving it outside of the mutually recursive declaration solve the type problem
nikki93 has joined #ocaml
<rom1504>
yeah I don't know either, it shouldn't do that
<rom1504>
(I can't compile, I have ocaml 3.12 :\)
<bernardofpc>
adrien: I got something in the toplevel, I was wondering if it was possible to display de UI (and click, interact, ...) while on the toplevel and then perhaps include another element and (somehow) have it updated without re-creating everything
nikki93 has quit [Remote host closed the connection]
kyrylo has joined #ocaml
<bernardofpc>
</Weekend lag>
<adrien>
I was away anyway :P
<adrien>
you need to keep track of the elements one way or the other
<adrien>
maybe you can do it with gtk: children of widgets and their children and...
<adrien>
but that's quite tedious; having ocaml values is nicer
<adrien>
another way is to use something glade-based
<bernardofpc>
glade is going to give me the static UI only
<bernardofpc>
(the functions have to be coded elsewhere)
<bernardofpc>
I was wondering (hoping?) that somehow I could add some callback to a button (for example) on the toplevel, and if I'm unhappy with it, remove and bind another
<adrien>
yeah, sure, as long as you can still access the button
<bernardofpc>
while having the UI "run" inside the toplevel, so that I can see the behaviour of the button when I click it
<adrien>
is your issue that you can't interact with the toplevel while the UI is running?
<bernardofpc>
yeah
<adrien>
you need to enable threading support
<adrien>
hold on
<bernardofpc>
ok
<adrien>
# #use "topfind";;
<adrien>
# #thread;;
<adrien>
# #require "lablgtk2.auto-init";;
<adrien>
that should do it
<adrien>
findlib <3
so has joined #ocaml
ccasin has joined #ocaml
<bernardofpc>
okey, I'll try
thomasga has joined #ocaml
<bernardofpc>
adrien: should I lounch it with GMain.Main.main () ?
zhumatthew has joined #ocaml
<bernardofpc>
or should I use Thread.$magic_command GMain.Main.main () ?
<bernardofpc>
(and it's not Thread.create, this makes even Ctrl-C resposeless :/)
avsm has joined #ocaml
<Drup>
bernardofpc: afaik, it's handle by the "auto-init" subpackage already
kyrylo has quit [Ping timeout: 252 seconds]
<bernardofpc>
with utop-1.10 (Ocaml 4.01.0) GMain.Main.main () ;; will not give me back the prompt
<bernardofpc>
(I used adrien's order of commands)
<adrien>
bernardofpc: neither!
<adrien>
well
<adrien>
GtkThread.main
<adrien>
(details are in the README or on the website)
tlockney has quit [Excess Flood]
tlockney has joined #ocaml
Kakadu has quit [Quit: Konversation terminated!]
ulfdoz has quit [Ping timeout: 248 seconds]
ulfdoz has joined #ocaml
zhumatthew has quit [Quit: zhumatthew]
nikki93 has joined #ocaml
<seliopou>
avsm i took your advice and picked up an opam directory with the jane street libs in it
<seliopou>
worked like a charm
<avsm>
seliopou: yep just forwarded to opam-devel (cced nate as i dont have your email)
zpe has joined #ocaml
<avsm>
seliopou: we should be able to generate PPAs from any set of OPAM packages pretty easily. I think that's worth integrating onto Launchpad, so I'll take a look when I get a chance
nikki93 has quit [Remote host closed the connection]
FreeArtMan has joined #ocaml
<seliopou>
cool! yeah that'd be awesome
<avsm>
the SUSE open build service is kind of amazing (builds debs and rpms for the most obscure architectures), but the UI is opaque :-/
<seliopou>
avsm: that's pretty much the defining characteristic of a build system
<Drup>
arj: I'm not going to answer the question (because, honestly, I don't know) but do you *have* to use ncurse, or would you use another terminal "graphical" library ?
dinosaure1 has joined #ocaml
<arj>
sure, any lib would be fine. I only know curses, to be honest. What lib would you suggest?
<arj>
Drup
NaCl_ has quit [Ping timeout: 245 seconds]
Nahra has quit [Ping timeout: 245 seconds]
pedagand_ has quit [Ping timeout: 245 seconds]
inr has quit [Ping timeout: 245 seconds]
Ptival has quit [Ping timeout: 245 seconds]
rgrinberg1 has quit [Ping timeout: 245 seconds]
rs0 has quit [Ping timeout: 245 seconds]
dinosaure has quit [Ping timeout: 245 seconds]
cdidd has joined #ocaml
thorsten` has quit [Ping timeout: 245 seconds]
def-lkb has quit [Ping timeout: 245 seconds]
rossberg has quit [Ping timeout: 245 seconds]
bernardofpc has quit [Ping timeout: 245 seconds]
BiDOrD_ has quit [Ping timeout: 245 seconds]
amiller_ has quit [Ping timeout: 245 seconds]
cthuluh has quit [Ping timeout: 245 seconds]
ousado has quit [Ping timeout: 245 seconds]
gustav has quit [Ping timeout: 245 seconds]
rks has quit [Ping timeout: 245 seconds]
hyPiRion has quit [Ping timeout: 245 seconds]
14WAB1M3F has quit [Ping timeout: 245 seconds]
willy_ has quit [Ping timeout: 245 seconds]
bjorkintosh has quit [Ping timeout: 245 seconds]
zarul has quit [Ping timeout: 245 seconds]
jlouis has quit [Ping timeout: 245 seconds]
<Drup>
lambdaTerm is really nice
axiles has quit [Quit: Quitte]
bjorkintosh has joined #ocaml
<Drup>
I tried to use ncurses too, because that's the first one I encountered, and it's just too crappy. LambdaTerm is nicer in every aspect
rossberg has joined #ocaml
rossberg has quit [Changing host]
rossberg has joined #ocaml
gustav has joined #ocaml
zarul has joined #ocaml
<arj>
Drup: well then, thanks for the hint!
Thooms has quit [Quit: WeeChat 0.3.8]
rks_ has quit [Ping timeout: 248 seconds]
hyPiRion has joined #ocaml
rgrinberg1 has joined #ocaml
inr has joined #ocaml
<Drup>
no problem, I can relate, I struggled with ncurse for a while too =')