swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
leafac has joined #ocaml
leafac has quit [Client Quit]
sh0t has quit [Ping timeout: 246 seconds]
leafac has joined #ocaml
leafac has quit [Client Quit]
MrScout has quit [Ping timeout: 256 seconds]
keen___________1 has quit [Read error: Connection reset by peer]
keen___________1 has joined #ocaml
kdef has quit [Quit: Leaving]
AltGr has joined #ocaml
darryn has joined #ocaml
jeffmo has quit [Quit: jeffmo]
<darryn>
Hello all!
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
BitPuffin|osx has joined #ocaml
Submarine has quit [Quit: Leaving]
<darryn>
what is the advantage of manually calling a recursive function?
SomeDamnBody has joined #ocaml
<SomeDamnBody>
I have a hashtable of functions
<SomeDamnBody>
when I do a lookup, how to I match a find instance with the type of the function
<SomeDamnBody>
I'm trying the following:
jwatzman|work has quit [Quit: jwatzman|work]
<SomeDamnBody>
let f = Hashtbl.create 20;; Hashtbl.add f "nana" print_endline;;let f = match Hashtbl.find f "nana" with | (String s -> unit) -> print_endline "worked! " ^ s;;
<SomeDamnBody>
Error: Syntax error: ')' expected, the highlighted '(' might be unmatched
<craptain-hochet>
what?
<craptain-hochet>
you can match types
<craptain-hochet>
you CAN'T
<craptain-hochet>
you added a function of type string -> unit, so you get either a function of type string -> unit or a Not_found exception is raised
<craptain-hochet>
let table = Hashtbl.create 20
<craptain-hochet>
let () = Hashtbl.add tbl "nana print_endline
<craptain-hochet>
let f = Hashtbl.find tbl "nana"
<craptain-hochet>
here, f == print_endline, no need to match anything
<SomeDamnBody>
I know that, I can match types, but I'm just not a regular ocaml user
<SomeDamnBody>
I know it sounds silly, I'll probably punch myself for this later, but whatever
<SomeDamnBody>
I know what f is
sh0t has joined #ocaml
<craptain-hochet>
you CAN'T match types* I mean
<SomeDamnBody>
I specifically, or just with this case?
<craptain-hochet>
in OCaml
<SomeDamnBody>
oh I guess it's expressions to instances or some pedantic specificity that you'll bring in
<craptain-hochet>
ah yep values
<SomeDamnBody>
but honestly, you always take a instance and then you deconstruct it to it's baser parts
<SomeDamnBody>
I know the example I gave makes me sound ignorant
<craptain-hochet>
but in your example you brought some "s -> unit" syntax which has no sense
<SomeDamnBody>
but the real use case is just to try and familiarize myself with how to deal with exceptions and
<craptain-hochet>
and there is no way to deconstruct a functional value
<craptain-hochet>
then
<SomeDamnBody>
I don't want to deconstruct it... I just want to identify the case when it is found
<craptain-hochet>
oh ok
<SomeDamnBody>
so, in my code I want to have it with a try statement
<craptain-hochet>
with ocaml 4.02:
<SomeDamnBody>
and then associate operations for each of the possibilities
<SomeDamnBody>
just like you would if the result were encoded in the return type *sigh*
<craptain-hochet>
match Hashtbl.find tbl "nana" with my_fun -> my_fun "worked!" | exception Not_found -> ()
<SomeDamnBody>
but why not with try?
<SomeDamnBody>
as in...
<craptain-hochet>
Because the extent of the try would usually be larger than just Hashtbl.find
<SomeDamnBody>
it's like if I use try, it expects the corresponding action of the with Not_found -> action
<SomeDamnBody>
to have the same type as the value in the table...
<SomeDamnBody>
I suppose that's to restrict the overall expression into having the same type
<craptain-hochet>
match _ with exception -> () allows finer-grained handling of expression, but otherwise it's fine
<craptain-hochet>
"try x with E -> f" is equivalent to "match x with x -> x | exception E -> f"
nullcat has joined #ocaml
<craptain-hochet>
but in the second case, you can act on x in the scope the branch that matched, while being outside of the exception handler
<SomeDamnBody>
where is the x -> x coming from there?
<SomeDamnBody>
how is that defined?
<craptain-hochet>
it's a pattern matching
<craptain-hochet>
you match x, you return x
<SomeDamnBody>
oh ok
<SomeDamnBody>
so like with | case -> do_something
<craptain-hochet>
yes
<SomeDamnBody>
sorry I interpreted that wrong
<SomeDamnBody>
alright thanks
<craptain-hochet>
np
<SomeDamnBody>
man I really like ocaml, but every time I start to use it I encounter cases where I am not familiar with stuff
<craptain-hochet>
that's ok, you don't need to know everything about the language to start playing with
shinnya has quit [Ping timeout: 245 seconds]
<Denommus>
OCaml is awesome, but I can't wait for implicit modules
swgillespie has joined #ocaml
tinhead has joined #ocaml
jabesed has quit [Ping timeout: 250 seconds]
swgillespie has quit [Client Quit]
SomeDamnBody has quit [Ping timeout: 258 seconds]
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
darryn has quit [Quit: leaving]
agarwal1975 has quit [Quit: Connection closed for inactivity]
tinhead has quit [Remote host closed the connection]
tinhead has joined #ocaml
manizzle has quit [Ping timeout: 255 seconds]
lordkryss has quit [Quit: Connection closed for inactivity]
tinhead has quit [Remote host closed the connection]
tmtwd has quit [Quit: Leaving]
obadz has quit [Ping timeout: 245 seconds]
obadz has joined #ocaml
darkf has joined #ocaml
tinhead has joined #ocaml
blandflakes has joined #ocaml
c74d is now known as Guest62930
Guest62930 has quit [Read error: Connection reset by peer]
c74d3 has joined #ocaml
c74d3 is now known as c74d
BitPuffin|osx has quit [Ping timeout: 246 seconds]
<bernardofpc>
zozozo> multiplying by 4 probably makes you loose some precision -> multiplying by 2**n never loses precision on normal floats
systmkor has quit [Quit: Leaving]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
tinhead has quit [Remote host closed the connection]
<Denommus>
I still don't quite get value restriction
<Denommus>
why isn't `let id = fun x -> x in id id` a value?
<Denommus>
ok, I need to go home
Denommus has quit [Quit: going home]
nullcat has joined #ocaml
badkins has quit []
nullcat has quit [Ping timeout: 256 seconds]
16WAA3OEF has joined #ocaml
idegen has quit [Quit: Leaving.]
ygrek has quit [Ping timeout: 256 seconds]
psy_ has quit [Ping timeout: 265 seconds]
sh0t has quit [Remote host closed the connection]
tinhead has joined #ocaml
tinhead has quit [Remote host closed the connection]
siddharthv_away is now known as siddharthv
The_Mad_Pirate has quit [Quit: Konversation terminated!]
<16WAA3OEF>
i really hope every opensource ocaml project can have as much as documentation as Daniel Bünzli's project
16WAA3OEF has quit [Quit: gone...]
nullcat has joined #ocaml
zaquest has joined #ocaml
nullcat is now known as nullcat__
tinhead has joined #ocaml
tinhead has joined #ocaml
tinhead has quit [Remote host closed the connection]
tinhead has joined #ocaml
tinhead has quit [Ping timeout: 265 seconds]
c74d has quit [Ping timeout: 272 seconds]
c74d3 has joined #ocaml
c74d3 is now known as c74d
drmem has quit [Ping timeout: 246 seconds]
drmem has joined #ocaml
MercurialAlchemi has joined #ocaml
tinhead has joined #ocaml
tinhead has quit [Remote host closed the connection]
<adrien>
I really hope Daniel Bünzli's projects can have as much windows support as every opensource ocaml project
* adrien
hates idols
swgillespie has joined #ocaml
swgillespie has quit [Max SendQ exceeded]
pii4 has quit [Ping timeout: 240 seconds]
swgillespie has joined #ocaml
pii4 has joined #ocaml
badon has quit [Disconnected by services]
badon_ has joined #ocaml
badon_ is now known as badon
themagician has quit [Ping timeout: 265 seconds]
kushal has joined #ocaml
Gama11 has joined #ocaml
kushal has quit [Ping timeout: 276 seconds]
monoprotic has quit [Ping timeout: 265 seconds]
sepp2k has quit [Quit: Leaving.]
Remyzorg has quit [Quit: WeeChat 1.1.1]
Remyzorg has joined #ocaml
sepp2k has joined #ocaml
matason has joined #ocaml
Haudegen has quit [Ping timeout: 244 seconds]
kushal has joined #ocaml
sepp2k has quit [Quit: Leaving.]
gabemc has quit [Ping timeout: 264 seconds]
tmtwd has joined #ocaml
Haudegen has joined #ocaml
ousado has quit [Ping timeout: 276 seconds]
nullcat__ has quit [Read error: Connection reset by peer]
thomasga has joined #ocaml
nullcat has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
thomasga has quit [Quit: Leaving.]
nullcat has quit [Read error: Connection reset by peer]
jonludlam has quit [Ping timeout: 272 seconds]
thomasga has joined #ocaml
thomasga has quit [Client Quit]
lordkryss has joined #ocaml
ingsoc has joined #ocaml
dinosaure has joined #ocaml
cml has joined #ocaml
nullcat has joined #ocaml
thomasga has joined #ocaml
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
A1977494 has joined #ocaml
A1977494 has left #ocaml [#ocaml]
amnn has joined #ocaml
<vbmithr_>
struktured: Thanks
<vbmithr_>
struktured: I found the solution of my problem, it did not need zarith at all
<vbmithr_>
float -> string -> cut at the '.', process the two parts
<vbmithr_>
I have a problem that might require objects
zpe has joined #ocaml
<vbmithr_>
How in OCaml, to deal with extensible records ?
<flux>
I suppose objects are safer if they apply.
<flux>
'extensible records' would probably be like type 'extension t = { foo : string; i : int; extension : 'extension }
<vbmithr_>
yeah but no
<vbmithr_>
I think this is precisely a use case for objects :)
<vbmithr_>
that's inheritance after all
<flux>
objects are also pretty cool
<flux>
in ocaml
<flux>
way under-appreciated IMO!
<flux>
but the thing is that they are soft of an advanced topic, compared to other oo-languages
<flux>
so expect trouble.. ;-)
<vbmithr_>
I just want to make a simple thing, have an extensible record
<vbmithr_>
I'm gonna try :)
obadz has quit [Quit: leaving]
obadz has joined #ocaml
jonludlam has joined #ocaml
<flux>
good luck!
<flux>
btw, it's not a bad idea to glance through the relevant chapter in the ocaml manual
<flux>
..in addition to perhaps other material on the internweb
milosn has quit [Ping timeout: 256 seconds]
milosn has joined #ocaml
thomasga has quit [Quit: Leaving.]
tinhead has joined #ocaml
Kakadu has joined #ocaml
keen___________2 has joined #ocaml
keen___________1 has quit [Ping timeout: 264 seconds]
<vbmithr_>
obviously
dsheets has quit [Ping timeout: 265 seconds]
tinhead has quit [Remote host closed the connection]
<vbmithr_>
I could do the same with first class modules probably
<vbmithr_>
But using modules as records sucks a bit
<flux>
imo first class modules are more pain than benefit, if objects are suitable
<vbmithr_>
yep
<vbmithr_>
I can just use normal records with optional fields :p
<vbmithr_>
I think I'm gonna go for that :)
<vbmithr_>
But that's not extensible, I have to think at all the fields from the start
<vbmithr_>
less interesting
s1n4 has joined #ocaml
TheLemonMan has joined #ocaml
<vbmithr_>
objects seems nice for this use case.
sdothum has joined #ocaml
<vbmithr_>
It works it seems
dsheets has joined #ocaml
tinhead has joined #ocaml
thomasga has joined #ocaml
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
<vbmithr_>
objects definitely address the case "I want extensible records"
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
thomasga has quit [Client Quit]
_andre has joined #ocaml
Haudegen has quit [Ping timeout: 256 seconds]
Hannibal_Smith has joined #ocaml
jgjl has joined #ocaml
octachron has joined #ocaml
Haudegen has joined #ocaml
<craptain-hochet>
vbmithr_: well no they don't, there is no "first-class extension" with objects
<craptain-hochet>
(you cannot extend a row type variable)
<Drup>
unfortunately :(
freling has joined #ocaml
dhil has joined #ocaml
<dinosaure>
0wWuX/CXwLRwL@1a
maufred has quit [Ping timeout: 245 seconds]
maufred has joined #ocaml
<dinosaure>
sorry :d
<theblatte>
just tell us where to use that password :p
<adrien_znc>
yeah, we need the account name
<dinosaure>
:d
<cmtptr>
that's no password
<cmtptr>
it's a SPACE STATION
<theblatte>
(o )
<apache2>
DAM DUM DAMMMM, cmtptr :)
<flux>
non-ocaml-related, but does someone recall the name of the tool that generated test input for a program, by using valgrind(?) to track how it branches?
<flux>
fuzzgrind!
AltGr has left #ocaml [#ocaml]
Denommus has joined #ocaml
octachron has quit [Ping timeout: 256 seconds]
tinhead has quit [Remote host closed the connection]
tinhead has joined #ocaml
tinhead has quit [Ping timeout: 240 seconds]
octachron has joined #ocaml
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jonludlam has quit [Ping timeout: 256 seconds]
octachron has quit [Ping timeout: 240 seconds]
jabesed has joined #ocaml
ggole has joined #ocaml
kushal has quit [Ping timeout: 252 seconds]
jonludlam has joined #ocaml
tmtwd has quit [Ping timeout: 272 seconds]
seanmcl has joined #ocaml
GIULIA has joined #ocaml
<GIULIA>
CIAO A TUTTI
<GIULIA>
!LISTA
<adrien_znc>
GIULIA: this is an english-speaking channel
<adrien_znc>
and please refrain from abusing caps
<GIULIA>
HELLO
<GIULIA>
!LIST
GIULIA has quit [Client Quit]
octachron has joined #ocaml
octachron has quit [Client Quit]
GIULIA has joined #ocaml
GIULIA has left #ocaml [#ocaml]
yomimono has joined #ocaml
idegen has joined #ocaml
<Denommus>
how to specify in oasis that my mly files should be preprocessed by menhir?
yomimono has quit [Ping timeout: 245 seconds]
tinhead has joined #ocaml
<Denommus>
found out
tinhead has quit [Ping timeout: 264 seconds]
jonludlam has quit [Ping timeout: 264 seconds]
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tmtwd has joined #ocaml
jgjl has joined #ocaml
klj has quit [Quit: ZZZzzz…]
<flux>
denommus, mind sharing for log grepping purposes?-)
jonludlam has joined #ocaml
<Denommus>
flux: just put `true: use_mehir` (without the backquotes) in the library section in _tags
<flux>
ok, I probably have used that but just not with oasis
badkins has joined #ocaml
kushal has joined #ocaml
<craptain-hochet>
Denommus: id will be a value after evaluation (of the application "id id")
<craptain-hochet>
hence it's not a syntactic value, value restrictions apply to what's not a syntactic value
<Denommus>
craptain-hochet: ah, thanks for the explanation
<Denommus>
craptain-hochet: I was thinking about something on the line of "the application of a function may result in side effects, which may be unsound for the type inference to assume polymorphism"
siddharthv is now known as siddharthv_away
<craptain-hochet>
that's the case
<craptain-hochet>
and syntactic values are guaranteed to be side effect free
kushal has quit [Ping timeout: 256 seconds]
jonludlam has quit [Ping timeout: 240 seconds]
yomimono has joined #ocaml
<Denommus>
Drup: ping
<tobiasBora>
I have a little question about Graphics : first is it only a C-binding or is it in "full Ocaml" ? Then can I use this basic module to write complexe modules, in order to create a Qt-like (of course wit
<tobiasBora>
*with less option, but is it possible in theory ?)
<tobiasBora>
or is it too slow to do that stuff ?
<companion_cube>
it's probably too slow
octachron has joined #ocaml
<tobiasBora>
companion_cube: So what could I use to do things like Qt/Gtk ?
<companion_cube>
well, gtk, I guess
<companion_cube>
there's a binding
<flux>
tobiasbora, you want to go low-level?
<tobiasBora>
flux: Yes I don't really like binding and I would like to try to go low-level.
<flux>
tobiasbora, well, the lowest level is to use the X unix domain socket interface
<flux>
is that the level you want to go?
<octachron>
tobiasBora: opengl + sdl (or another to obtain an opengl context) could "work"
<tobiasBora>
octachron: but they all are bindings right ?
<flux>
well, the only way to use opengl is via bindings
<flux>
for example in case of nvidia the libraries to use opengl are proprietary
<flux>
provided by NVIDIA, written in C
<flux>
you are unable to generate opengl commands without that library
<tobiasBora>
flux: The X unix domain socket interface is only for unix systems I guess ?
<tobiasBora>
Well why not using an opengl binding after all...
<flux>
tobiasbora, well trivially it works with TCP sockets as well, but it would of course work only with X servers
<octachron>
tobiasBora: opengl is an "interface" to the graphics driver, so you will need a way to speak to the kernel/drivers at some point
Hannibal_Smith has quit [Quit: Leaving]
<tobiasBora>
flux: And what kind of things can you do with that ? Is it pixel by pixel ? (no text for example) More "userfriendly" ? Or still less userfriendly ?
<flux>
but looking at the future, the best way to go about it is probably to use some OpenGL bindings (TGLSL is IIRC very, very thin) and some bindings to interact with the windowing system (TGLSL maybe comes with some)
<tobiasBora>
octachron: It's not the binding who do that ?
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<flux>
tobiasbora, you construct commands for the GPU by constructing arrays that containt the data and then calling some functions
<flux>
the library then copies your arrays to the GPU
agarwal1975 has joined #ocaml
<flux>
and puts some commands in there :)
A1977494 has joined #ocaml
<Denommus>
Drup: leave it. I already figured it out
<flux>
tobiasbora, pixel by pixel access by itself is way too slow in modern system
A1977494 has left #ocaml [#ocaml]
<flux>
and so is drawing a line by line. you tell it to draw 10000 polygons at once.
<tobiasBora>
flux: I see. And how hard would be do draw a polygon "hello world" ?
<flux>
tobiasbora, well, you would need a font
<flux>
if you don't want to use freetype bindings, it's going to be a big task to read, say, truetype
<flux>
if you already have a primitive font (pixel map) then it's probably relatively easy (and low-performing)
<flux>
reimplementing the graphics stack in pure OCaml would be quite a big job.
<tobiasBora>
flux: And what about if I just want to display a single square ? Would it be something like 20 lines or 200 ?
<flux>
maybe 100
<octachron>
tobiasBora: I would say 100-200 in modern opengl
<octachron>
the problem is that you need to setup a lot of things before starting drawing
<tobiasBora>
I understand
<tobiasBora>
I have to go... But as usual I'll be back !
badkins has quit [Read error: Connection reset by peer]
tinhead has quit [Ping timeout: 258 seconds]
freling has quit [Quit: Leaving.]
jabesed has quit [Ping timeout: 256 seconds]
jabesed has joined #ocaml
darkf has quit [Quit: Leaving]
octachron has quit [Quit: Leaving]
inf-groupoid is now known as pyon
zpe has quit [Remote host closed the connection]
badkins has joined #ocaml
wwilly has joined #ocaml
kdef has joined #ocaml
tinhead has joined #ocaml
moei has quit [Quit: Leaving...]
rgrinberg has joined #ocaml
pyon is now known as inf-gropeoid
inf-gropeoid has quit [Quit: I have irrefutable proof that D < 0. It follows trivially from 2D > 3D, which is obviously true.]
tinhead has quit [Ping timeout: 264 seconds]
The_Mad_Pirate has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
jwatzman|work has joined #ocaml
tane has joined #ocaml
shinnya has joined #ocaml
yomimono has quit [Ping timeout: 276 seconds]
bobry has joined #ocaml
klj has quit [Quit: bye...]
cml has quit [Ping timeout: 246 seconds]
gabemc has joined #ocaml
klj has joined #ocaml
slash^ has joined #ocaml
tnguyen has joined #ocaml
tnguyen has quit [Client Quit]
dsheets has quit [Ping timeout: 246 seconds]
gabemc has quit [Ping timeout: 245 seconds]
lordkryss has quit [Quit: Connection closed for inactivity]
jonludlam has quit [Ping timeout: 246 seconds]
MrScout has joined #ocaml
matason has quit []
matason has joined #ocaml
matason has quit [Client Quit]
hay207 has joined #ocaml
hay207 has quit [Client Quit]
hay207 has joined #ocaml
freling has joined #ocaml
ygrek has joined #ocaml
rossberg has quit [Ping timeout: 265 seconds]
AlexRussia has quit [Ping timeout: 256 seconds]
willy_ has joined #ocaml
wwilly has quit [Ping timeout: 276 seconds]
struk|work has joined #ocaml
<struk|work>
rgrinberg: ping
rossberg has joined #ocaml
hay207 has quit [Quit: Leaving]
hay207 has joined #ocaml
<vbmithr_>
Type declarations do not match:
<vbmithr_>
type 'a pair = 'a constraint 'a = [> `BTCUSD | `LTCBTC ]
<vbmithr_>
is not included in
<vbmithr_>
type 'a pair = 'a constraint 'a = [> `BTCUSD ]
<vbmithr_>
Any idea why this is the case ?
<vbmithr_>
Oh, Ok, I think I see
<rgrinberg>
struk|work: hi tehre
<rgrinberg>
vbmithr_: what do you think about raising when read_exactly tries to allocate a large buffer?
<struk|work>
rgrinberg: got a mac user, trying to setup up vim + ocaml merlin quickly, does vim-ocaml do just extra stuff like oasis / opam? or everything?
<rgrinberg>
that's always a bug but it could transform some undeseriable behavior into direct crashes
<struk|work>
rgrinberg: it's not working yet for him, trying to figure out why..
<rgrinberg>
struk|work: what do you mean by everything? and how are you setting him up
<struk|work>
rgrinberg: I installed opam and friends, merlin ocp-ident etc, but I just want to magically work in vim with minimal effort now
<rgrinberg>
struk|work: aye. I thought about providing vim-ocaml in opam and providing some simple instructions there
<rgrinberg>
is your friend using pathogen or something similar?
<struk|work>
rgrinberg: we installed vundle, looks like it worked..maybe
<rgrinberg>
if not then set runtimepath +=path/to/vim-ocaml shoud be the simplest
<rgrinberg>
ok if you have vundle, then it's the easiest
<companion_cube>
rgrinberg: what are you talking about?
<rgrinberg>
companion_cube: i'm talking about 2 things at once :P
<rgrinberg>
companion_cube: which one do you mean?
<companion_cube>
the IO thing :p
<rgrinberg>
struk|work: what happens when you run :PluginInstall
<rgrinberg>
companion_cube: cohttp has this undesirable behavior - it has a few calls that can possibly allocate a large buffer
<vbmithr_>
companion_cube: cohttp can be made to allocate an enormous buffer, yes
<rgrinberg>
there was an attempt to fix it but it introduced another bug (which vbmithr_ discovered recently)
<companion_cube>
oh I see
<vbmithr_>
rgrinberg: yeah, have to modify Chunk.read now
ggole has quit []
<vbmithr_>
and we should have read_into
<vbmithr_>
to read always in the same buf
<companion_cube>
buffering is hard :(
<rgrinberg>
vbmithr_: yep. But we can't do that refactoring just yet because lwt_stream can possibly have more than 1 chunk buffered
<vbmithr_>
ah
<rgrinberg>
vbmithr_: i do have a WIP that fixes this but it's not ready for a PR yet
<vbmithr_>
ok, awesome!
<vbmithr_>
thanks for taking care of cohttp
<rgrinberg>
vbmithr_: this particular bit requires an urgent fix though
nullcat_ has joined #ocaml
<struk|work>
rgrinberg: first time it ran, everything looked ok except for L9, which had a "!" next to it. vim-ocaml had a +. can try running again in a omment
<rgrinberg>
struk|work: what do you need l9 for?
<rgrinberg>
struk|work: what does $ tree ~/.vim say?
<struk|work>
I think it just was part of the exapmle config for vundle
<struk|work>
rgrinberg: hmm the mac guy disappeared, will continue this later. thanks :)
<struk|work>
rgrinberg: I saw vim-ocaml folder there though
<rgrinberg>
struk|work: then how do you know it's not working?
<rgrinberg>
struk|work: did you open some _oasis file and did not see the sweet sweet colors?
<struk|work>
rgrinberg: omnifunc, TypeOf, etc. don't work
<rgrinberg>
struk|work: that's merlin
<struk|work>
rgrinberg: yeah, that's kind of what I asking...why doesn't vim-ocaml go the whole way and setup merlin too?
<rgrinberg>
struk|work: because merlin is its own project with an external dependency :)
<struk|work>
rgrinberg: well if merlin is installed, why not inject into the vim session with standard merlin config? is that too invasive?
robink has quit [Ping timeout: 244 seconds]
<rgrinberg>
struk|work: there really isn't a "standard merlin config". it should just work out of the box IF all the dependencies are there and the path are set right
<struk|work>
rgrinberg: got it, ok. hmm wonder what is problem is then.. will find out when he returns. thanks for the help
<vbmithr_>
rgrinberg: I'm starting to understand a bit more this issue
robink_ has joined #ocaml
<rgrinberg>
struk|work: the other problem is that i run merlin from the source so i have it setup in a bit of a non standard way
<vbmithr_>
rgrinberg: I think this could be fixed with continuations
<vbmithr_>
rgrinberg: no, not continuation, just same technique as Fixed.read
<vbmithr_>
with a reference that indicate the state
<vbmithr_>
match !remaining with …
<rgrinberg>
vbmithr_: yeah, the problem is a bit easier in Fixed.read
<rgrinberg>
because you always know how much you have left
Haudegen has joined #ocaml
<vbmithr_>
rgrinberg: I'm writing a patch
<vbmithr_>
I'll PR this soon
<rgrinberg>
vbmithr_: thanks. let's see this :) Try and write a test too
<rgrinberg>
vbmithr_: i actually tried writing a test for this issue (large chunks being truncated but did not manage) to reproduce
<rgrinberg>
i'll push my test in a branch
<rgrinberg>
maybe you'll have better luck. We're not releasing without a test anyway
<Denommus>
what's a good mode for .mly files?
<Denommus>
tuareg itself?
freling has joined #ocaml
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<vbmithr_>
rgrinberg: why wasn't getting the btc page a good test ?
<Denommus>
the highlight seems right, but the indentation is broken
<rgrinberg>
vbmithr_: requires the internet to run
<vbmithr_>
rgrinberg: unless you mean, a unit test ?
<vbmithr_>
ah
seanmcl has joined #ocaml
seanmcl has quit [Remote host closed the connection]
seanmcl has joined #ocaml
BitPuffin has quit [Ping timeout: 250 seconds]
manizzle has joined #ocaml
bobry has quit [Quit: Connection closed for inactivity]
rgrinberg has quit [Ping timeout: 265 seconds]
Kakadu has quit [Quit: Page closed]
breadmonster has joined #ocaml
nullcat_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ingsoc has quit [Quit: Leaving.]
tinhead has joined #ocaml
tinhead has quit [Remote host closed the connection]
A19774941 has joined #ocaml
A19774941 has left #ocaml [#ocaml]
sepp2k has joined #ocaml
tinhead has joined #ocaml
tinhead has quit [Changing host]
tinhead has joined #ocaml
kdef has quit [Ping timeout: 255 seconds]
freling has quit [Quit: Leaving.]
jabesed has quit [Quit: Konversation terminated!]
jabesed has joined #ocaml
breadmonster has quit [Quit: Page closed]
jabesed has quit [Ping timeout: 265 seconds]
jabesed has joined #ocaml
<struk|work>
does out of the box vim on macs work with merlin? or do I need a version with some extensions?
Kakadu has joined #ocaml
<jyc>
struk|work: I'm not sure if the default installed vim works, but the vim in the Homebrew repos definitely works fine
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 246 seconds]
<craptain-hochet>
struk|work: if PATH is correct, you shouldn't have problem
tinhead has quit [Remote host closed the connection]
<struk|work>
yeah I figured it out..its "ocamlmerlin" vs "merlin" in the opam share dir
<struk|work>
doh
jonludlam has joined #ocaml
leafac has joined #ocaml
amnn has quit [Ping timeout: 255 seconds]
freling has joined #ocaml
amnn has joined #ocaml
<struk|work>
for some reason all works now except the syntax checker...hm
slash^ has quit [Read error: Connection reset by peer]
<struk|work>
had to install syntastic
Hannibal_Smith has joined #ocaml
rgrinberg has joined #ocaml
dsheets has joined #ocaml
jonludlam has quit [Ping timeout: 265 seconds]
rgrinberg1 has joined #ocaml
Anarchos has joined #ocaml
thomasga has joined #ocaml
leafac has quit [Quit: Leaving.]
rgrinberg has quit [Ping timeout: 245 seconds]
swgillespie has joined #ocaml
kdef has joined #ocaml
kdef has quit [Client Quit]
nullcat has joined #ocaml
Haudegen has quit [Ping timeout: 265 seconds]
leafac has joined #ocaml
<rgrinberg1>
struk|work: are you all good now?
<struk|work>
rgrinberg1: yeah but what a mess. it was way too difficult due to combiantion of my own stupidity and some outdated documentation and there isn't a one shot command to do it all
<struk|work>
I am going to automate the setup I think when I get a moment, or a find a project which does already
<rgrinberg1>
there is altgr's work with opam-user-setup
<rgrinberg1>
but some things don't make sense to install with opam e.g. syntastic
lobo has joined #ocaml
<vbmithr_>
rgrinberg1: look at my patch when you have time
<rgrinberg1>
vbmithr_: Yep. will take me a little longer as i have no idea how the old chunked reader worked :P
<struk|work>
wow pretty awesome..got one error about ocp-indent when I tested it but everything else worked
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MrScout_ has joined #ocaml
kdef has joined #ocaml
MrScout has quit [Ping timeout: 265 seconds]
hay207 has quit [Quit: Leaving]
rgrinberg2 has joined #ocaml
freling has quit [Quit: Leaving.]
rgrinberg1 has quit [Ping timeout: 265 seconds]
Haudegen has joined #ocaml
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nullcat_ has joined #ocaml
tinhead has joined #ocaml
tinhead has quit [Changing host]
tinhead has joined #ocaml
jeffmo has quit [Read error: Connection reset by peer]
jeffmo has joined #ocaml
jonludlam has joined #ocaml
<Leonidas>
struk|work: yes, I think that changed in Merlin 2.2 or something
<struk|work>
will guineau pig on some emacs users monday :)
<Leonidas>
what is the most popular way to do debug logging?
<Leonidas>
preferably something that will get compiled out by the preprocessor
willy__ has joined #ocaml
willy_ has quit [Ping timeout: 276 seconds]
swgillespie has joined #ocaml
<lobo>
Leonidas: just finished watching your lambdacon talk. very nice
<Leonidas>
lobo: thanks :-)
ncthom91 has joined #ocaml
ncthom91 has quit [Client Quit]
_andre has quit [Quit: leaving]
Hannibal_Smith has quit [Quit: Leaving]
MrScout_ has quit [Remote host closed the connection]
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MrScout has joined #ocaml
<nullcat_>
is Map implemented using AVL tree?
<nullcat_>
or ... red black tree?
MercurialAlchemi has quit [Ping timeout: 255 seconds]
<rgrinberg>
running eliom on mirage is a more epic quest
<rgrinberg>
this is like the first step towards it
<Drup>
struktured: why should it be ?
<Drup>
ocsigen was written much before mirage
MrScout has quit [Remote host closed the connection]
<Drup>
(and not well writen, if I might say)
<struktured>
I suppose I naively thought if it works in pure ocaml it would more or less work in mirage..but I know so little about mirage that this naive I imagine
<struktured>
oops, used naive twice..been a long day
<rgrinberg>
struktured: ocsigenserver and eliom are both kind of married to ocamlnet
gabemc has quit [Ping timeout: 276 seconds]
<Drup>
that's ... not really the issue
<rgrinberg>
and use unix everywhere
<Drup>
just getting rid of ocamlnet is easy
<rgrinberg>
Drup: simple, not easy
<Drup>
well, much easier and/or simpler than what we are doing now
<Drup>
(I did half of it last week end)
dsheets has quit [Ping timeout: 256 seconds]
tinhead has joined #ocaml
<struktured>
what about the other half?
<Drup>
not yet tried :)
tinhead has quit [Remote host closed the connection]
tinhead has joined #ocaml
<struktured>
fair enough.
<struktured>
sigh I have to do shell scripting now...oh the pain.
<struktured>
I had this situation where I wanted to automatically install aspcud, so I wrote a script in ocaml, but I can't get opam to install the dependencies I need to run the ascup install script without aspcud already installed. good ol' fashioned cycle
lobo has quit [Quit: leaving]
<struktured>
this whole numerical solver behind opam is fascinating, I'd like to studying it's internals one dyay
sepp2k has quit [Quit: Leaving.]
<struktured>
*day
tinhead has quit [Remote host closed the connection]
jonludlam has quit [Ping timeout: 245 seconds]
tinhead has joined #ocaml
ncthom91 has joined #ocaml
jeffmo has joined #ocaml
klj has joined #ocaml
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
sgeisenh has joined #ocaml
<sgeisenh>
Hello! I have been trying to learn OCaml by implementing a torrent client. I have experience in SML and Haskell, but I'm having trouble striking the right balance between functional and imperative styles. I got the ball rolling by writing a library to handle .torrent files, but I'm a bit overwhelmed with trying to tackle async or lwt to handle the network and file IO side of things. Any suggestions for getting started?
<struktured>
sgeisenh: have you read up on async or lwt yet?
<Leonidas>
when I do module BS = struct open Bitstring end;; I should be able to access all members of the Bitstring module via BS.member. But it doesn't work. Can anyone tell me why?
<Drup>
Leonidas: s/open/include/
<struktured>
^^ ++
<Leonidas>
Drup: thanks. I should look up the difference
<sgeisenh>
struktured: I have read through some of the documentation for both and checked out cohttp to deal with requests, but I'm still having trouble finding an entry point.
<Drup>
entry point ?
<Leonidas>
Drup: "The scope of the open stops at the end of the structure expression." <- I suppose this is what bit me
<Drup>
Leonidas: more importantly, open just bring in scope
<sgeisenh>
Drup: I don't know how to jump in and start coding.
<Drup>
"include M" includes all the declarations from the module M as if there were declared at top level
<Drup>
this is very different
ncthom91 has joined #ocaml
<struktured>
sgeisenh: do you understand monads? are you familiar with concurrency idioms in other languages ?
<Drup>
rgrinberg: do you have an opinion on that ? I'm not sure what to think about it
thomasga has quit [Quit: Leaving.]
<sgeisenh>
struktured: I'm mostly comfortable with monads. Most of the concurrent programming I've done has been in C or Java.
leafac has quit [Quit: Leaving.]
<rgrinberg>
Drup: i'm surprised how small the PR is
<rgrinberg>
Drup: it seems like it will help a lot on benchmarks
<rgrinberg>
which will lead to more adoption
<Drup>
I mean, variance influence typechecking, but this doesn't .. I don't see why it can't be recovered later on. There are no real abstract type anyway after a few IRs ...