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
Snark_ has quit [Ping timeout: 272 seconds]
fraggle-boate has joined #ocaml
Snark has joined #ocaml
chouser has quit [Ping timeout: 264 seconds]
osa1 has joined #ocaml
IbnFirnas has joined #ocaml
AltGr has joined #ocaml
reem has quit [Remote host closed the connection]
skinkitten has quit [Quit: Leaving]
chouser has joined #ocaml
Thooms has quit [Ping timeout: 265 seconds]
endiruna has quit [Ping timeout: 265 seconds]
Simn has quit [Quit: Leaving]
Sorella has joined #ocaml
reem has joined #ocaml
ivan\ has quit [Remote host closed the connection]
ivan\ has joined #ocaml
BitPuffin has quit [Ping timeout: 265 seconds]
moei has quit [Ping timeout: 244 seconds]
moei has joined #ocaml
vpm has quit [Remote host closed the connection]
rand000 has quit [Quit: leaving]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jao has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
vanila has quit [Quit: Leaving]
pyon-k has quit [Quit: restart]
chouser has quit [Ping timeout: 240 seconds]
pyon has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
Hannibal_Smith has quit [Quit: Leaving]
uucico has joined #ocaml
jabesed has quit [Ping timeout: 272 seconds]
lambdahands has joined #ocaml
IbnFirnas has quit [Ping timeout: 244 seconds]
shinnya_ has quit [Ping timeout: 255 seconds]
claudiuc has quit [Remote host closed the connection]
<Tekk_> can you not use a module type's .t in things? To use the RWOC example can you make a list of ID.t
<Tekk_> I'm getting errors about the module being unbound
<Tekk_> hm
<Tekk_> seems like you can't in my case..
<Drup> that would be weird
<Drup> complete example ?
<Tekk_> actually I'm not sure if modules would work here at all. sec.
<Tekk_> nope, okay
<Tekk_> Drup: I was trying to use module types as a sort of interface
<Tekk_> so module type T's T.t would accept the .t of any module of type T
<Tekk_> and go to the types correctly
<Drup> show me some code that you would like to work please.
<Tekk_> and then be able to do like Entity.texture player_instance and have it go to Player.texture player_instnace
<Tekk_> instance*
<Tekk_> I could definitely do it with objects but this seemed more interesting
<Drup> just do Player.texture instead
<Tekk_> yeah
<Tekk_> that works for now
<Drup> Entity is a type, not a module, call the module instead
<Drup> (well, a module type)
<Tekk_> mhm
<Tekk_> but what when I have more entity types than player?
<Tekk_> in the case of the list at least
<Tekk_> I can probably assume that callers know the module of the type they want :P
<Tekk_> basically how do I express the last line in a way that works.
<Drup> I see
<Tekk_> I suppose that I could construct a polymorphic variant for it..
<Tekk_> right?
<Tekk_> and that'd preseve extensibility
<Drup> so, there are several possibilities, but in your place, I would just do a sum type. Maybe an open type if you want the extensibility
<Drup> you can also do an object, ofc. Since you want inheritance, it's a sane choice.
<Tekk_> mhm
bytbox has joined #ocaml
<Drup> but with object, you will have no upcasting.
<Drup> only downcasting
<Tekk_> this isn't permanent code, it'll be replaced once I figure out what I want later, so a sum type probably works
<Tekk_> Drup: I think that #type would be sufficient in that case wouldn't it?
<Tekk_> (half-remembering the syntax there, whatever "anything that is a superset of this object's methods" is)
<Drup> sort of, but that's not my point
bytbox has quit [Remote host closed the connection]
<Drup> no upcasting means that you can't figure out if the entity you just get from a list is a player or something else
<Tekk_> hm
<Tekk_> yeah, that would throw events off a bit :p
<Tekk_> thanks Drup
<Drup> Tekk_: did you read the blog posts about doing an entity system in ocaml ?
<Drup> well, it's about a game engine in general, in fact
chinglish has joined #ocaml
<Tekk_> Drup: yep
<Tekk_> talked to the guy too :)
<Tekk_> the one at cranial burnout?
<Drup> yes
BitPuffin has joined #ocaml
<Tekk_> yeah
<Tekk_> we've talked for a bit, that's the direction I'm going in eventually
<Tekk_> but this is just a small thing to test out my bindings atm
IbnFirnas has joined #ocaml
q66 has quit [Quit: Leaving]
psy_ has quit [Quit: Leaving]
darkf has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
eyyub has quit [Ping timeout: 276 seconds]
rgrinberg has joined #ocaml
laalko has joined #ocaml
<laalko> What's the preferred lib for fetching a file over http?
ivan\ has quit [Read error: Connection reset by peer]
ivan\ has joined #ocaml
<uucico> is there a way to get the current stack trace programmatically? try raise x with x -> Printexc.get_backtrace () is almost what i want, except that it doesn't trace up to the top of the stack..
kapil__ has joined #ocaml
<Drup> laalko: cohttp or ocurl, I would guess
yminsky has joined #ocaml
<whitequark> uucico: Printexc.get_callstack
<laalko> ... thanks Ubuntu for having three different libcurls...
<uucico> whitequark: thanks! should have read the whole Printexc module description..
jao has quit [Ping timeout: 245 seconds]
manizzle has quit [Ping timeout: 245 seconds]
ygrek_ has joined #ocaml
chouser has joined #ocaml
BitPuffin has quit [Ping timeout: 276 seconds]
rossberg has quit [Ping timeout: 245 seconds]
fraggle-boate has quit [Read error: No route to host]
yminsky has quit [Quit: yminsky]
uucico has quit [Ping timeout: 246 seconds]
rossberg has joined #ocaml
swgillespie has joined #ocaml
osa1 has quit [Ping timeout: 272 seconds]
destrius has joined #ocaml
yminsky has joined #ocaml
fraggle-boate has joined #ocaml
siddharthv_away is now known as siddharthv
IbnFirnas has quit [Read error: Connection reset by peer]
lordkryss has quit [Quit: Connection closed for inactivity]
osa1 has joined #ocaml
pyon is now known as pyon-k
psy_ has joined #ocaml
psy_ has quit [Max SendQ exceeded]
rgrinberg has quit [Quit: Leaving.]
psy_ has joined #ocaml
rgrinberg has joined #ocaml
yminsky has quit [Quit: yminsky]
reem has quit [Remote host closed the connection]
reem has joined #ocaml
AlexRussia has quit [Ping timeout: 245 seconds]
AlexRussia has joined #ocaml
osa1 has quit [Ping timeout: 265 seconds]
IbnFirnas has joined #ocaml
erider has joined #ocaml
erider has quit [Ping timeout: 245 seconds]
ivan\ has quit [Remote host closed the connection]
ivan\ has joined #ocaml
badkins has quit []
enitiz has quit [Ping timeout: 256 seconds]
reem has quit [Remote host closed the connection]
sivoais has quit [Ping timeout: 264 seconds]
moei has quit [Read error: Connection reset by peer]
sivoais has joined #ocaml
moei has joined #ocaml
enitiz has joined #ocaml
lambdahands has quit [Quit: leaving]
hcarty has quit [Ping timeout: 264 seconds]
MrScout has joined #ocaml
hcarty has joined #ocaml
MrScout has quit [Read error: Connection reset by peer]
MrScout has joined #ocaml
kapil__ has quit [Quit: Connection closed for inactivity]
chouser has quit [Ping timeout: 245 seconds]
enitiz has quit [Ping timeout: 276 seconds]
reem has joined #ocaml
igitoor has quit [Ping timeout: 276 seconds]
igitoor has joined #ocaml
igitoor has joined #ocaml
igitoor has quit [Changing host]
kapil__ has joined #ocaml
laalko has quit [Quit: Leaving]
ygrek_ has quit [Ping timeout: 256 seconds]
MrScout has quit [Ping timeout: 246 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
swgillespie has joined #ocaml
MrScout_ has joined #ocaml
MrScout_ has quit [Ping timeout: 252 seconds]
IbnFirnas has quit [Ping timeout: 244 seconds]
AlexRussia has quit [Ping timeout: 264 seconds]
contempt has quit [Remote host closed the connection]
AlexRussia has joined #ocaml
contempt has joined #ocaml
IbnFirnas has joined #ocaml
osa1 has joined #ocaml
MrScout_ has joined #ocaml
willy__ has joined #ocaml
MrScout_ has quit [Ping timeout: 256 seconds]
willy_ has quit [Ping timeout: 264 seconds]
ivan\ has quit [Read error: Connection reset by peer]
ivan\ has joined #ocaml
Submarine has quit [Remote host closed the connection]
osa1 has quit [Ping timeout: 265 seconds]
larhat has joined #ocaml
chinglish has quit [Quit: Nettalk6 - www.ntalk.de]
MercurialAlchemi has joined #ocaml
Kakadu has joined #ocaml
yaewa has joined #ocaml
moei has quit [Ping timeout: 240 seconds]
Haudegen has quit [Ping timeout: 246 seconds]
larhat has quit [Quit: Leaving.]
IbnFirnas has quit [Ping timeout: 244 seconds]
nopf has joined #ocaml
ggole has joined #ocaml
alkoma has joined #ocaml
Haudegen has joined #ocaml
regnat has quit [Ping timeout: 265 seconds]
regnat has joined #ocaml
ygrek_ has joined #ocaml
endiruna has joined #ocaml
hekmek has joined #ocaml
hekmek has quit [Read error: Connection reset by peer]
matason has joined #ocaml
waneck has quit [Ping timeout: 245 seconds]
IbnFirnas has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rgrinberg has quit [Quit: Leaving.]
fraggle-boate has quit [Ping timeout: 264 seconds]
psy_ has quit [Quit: Leaving]
rgrinberg has joined #ocaml
dsheets has joined #ocaml
fraggle-boate has joined #ocaml
alkoma has quit [Ping timeout: 255 seconds]
maufred has quit [Remote host closed the connection]
ivan\ has quit [Read error: Connection reset by peer]
ivan\ has joined #ocaml
lordkryss has joined #ocaml
Simn has joined #ocaml
ggole has quit [Ping timeout: 264 seconds]
maufred has joined #ocaml
endiruna has quit [Ping timeout: 265 seconds]
jneen is now known as jneen|zzz
blech___ has joined #ocaml
blech__ has quit [Ping timeout: 245 seconds]
ollehar has joined #ocaml
larhat has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
skinkitten has joined #ocaml
ingsoc has joined #ocaml
IbnFirnas has quit [Ping timeout: 244 seconds]
<MercurialAlchemi> companion_cube: I'm looking at the lwt actor module in containers
keen__________45 has joined #ocaml
<MercurialAlchemi> it looks intriguing
<MercurialAlchemi> are you planning on doing more with it?
<MercurialAlchemi> (though IMHO it would be better as a standalone lib in this case)
keen__________44 has quit [Ping timeout: 264 seconds]
rock_neurotiko has joined #ocaml
rock_neurotiko has quit [Read error: Connection reset by peer]
<companion_cube> MercurialAlchemi: well it's quite experimental atm
<companion_cube> if you have suggestions I'd be glad to hear them ;)
<MercurialAlchemi> I'll have to try out it if I get to do something distributed, I'll let you know :)
<MercurialAlchemi> also, I was wondering how much CCLinq is relevant considering the existence of sequence
<companion_cube> it has some convenient things when you're doing joins or similar things, but yeah, Sequence is fine most of the time
jonludlam has joined #ocaml
psy_ has joined #ocaml
_andre has joined #ocaml
whitequark has quit [Ping timeout: 272 seconds]
whitequark has joined #ocaml
bytbox has joined #ocaml
mehdi__ has quit [Remote host closed the connection]
yomimono has joined #ocaml
mehdi_ has joined #ocaml
<ingsoc> I now have ocamlbuild working and I can generate .native and .byte, I am a little surprised at the size of the generated files though
mort___ has joined #ocaml
<ingsoc> byte code is 58mb for a hello world program, this is when using Core.Std
<rks`_> ingsoc: are you using core?
<ingsoc> yeah
<rks`_> yes
<MercurialAlchemi> ingsoc: oh, core
<rks`_> well, it's a sad thing
<MercurialAlchemi> it's not a bug, it's a feature
<ingsoc> :)
<rks`_> but that should change in a release or two
<ingsoc> ok
<ingsoc> the native is around 8mb
<ingsoc> which is fine
<rks`_> (it's a side effect of using "packed modules")
<ingsoc> is there any reason to0 go byte code ?
<MercurialAlchemi> ocamldebug
<rks`_> (but they should get rid of that in a release or two)
<MercurialAlchemi> also, compilation is faster
<ingsoc> is this just if you have a platform you can't compile to native on but have a an ocaml VM
<companion_cube> or js_of_ocaml
<ingsoc> ocamldebug ok so if you need to do some real debugging (as in step debugging ?) I would need to compile to .byte and use ocamldebug
<ingsoc> ?
<whitequark> backtraces are generally more precise in bytecode
<rks`_> ingsoc: or you could compile to native code and use gdb
<ingsoc> tbh I have hnot had a fun time with getting up and running with ocaml, it is not the language per se but the hassle with all the tooling the concepts and multitude of different file extensions .ml, .mli, cmo cmi etc
<rks`_> (but there's no dwarf generation, once again that will probably come in a release or two)
<ingsoc> do people drive things like ocamlbuild with a makefile ?
<companion_cube> yep, a target all: ocamlbuild -use-ocamlfind -package foo bar.native
<ingsoc> i mean is it common to have a makefile to drive the different ocaml tooling
<whitequark> rks`_: there is dwarf generation
<companion_cube> I think it's common
<whitequark> only for line numbers and such though
<whitequark> and no, it will not be easily improved
<MercurialAlchemi> ingsoc: I'd say so
<whitequark> nor there are plans to do so
<rks`_> whitequark: well, mark shinwell is working on proper dwarf generation
<rks`_> and the results are impressive
<whitequark> oh? okay, great then
jgjl has joined #ocaml
<MercurialAlchemi> (especially considering how many OCaml developers seem to be on Windows systems...)
<whitequark> I don't understand how is he going to teach gdb the ocaml object model
<ingsoc> well anyway, thankfully I am getting somewhere now and can move on from just typing one liners in the utop
<rks`_> haha
<whitequark> and how to tell it about ocaml types
<rks`_> well, it reads cmts
IbnFirnas has joined #ocaml
<ingsoc> the ide i am using does not seem to be opam friendly either and doesn't seem to use ocamlfind to resolve stuff
<MercurialAlchemi> ingsoc: you can always load your .mls in utop, you know :)
<ingsoc> I understand ocaml community is not large like java/c#/python etc. so I kinda expected a few sticking points
willy__ has quit [Read error: Connection reset by peer]
Cypi has quit []
<MercurialAlchemi> we have a large choice of sharpened sticks for your pleasure
<companion_cube> which 'ide' are you using?
<rks`_> ( whitequark https://github.com/mshinwell/gdb )
<ingsoc> companion_cube: well i use eclipse for erlang and python and a few other things and I like the project management stuff and file search replace (etc. etc.) so i searched for a plugin, there was ODT and OcalIDE, the latter seemed to have been updated more recently. the thing is its configuration for the tools defaults to the system /usr/ not an opam installed one
<ingsoc> luckily there was a mature plugin for erlang for eclipse but most erlangers use emacs/vim which i was hoping i could avoid learning as it is just another hindrence to getting productive
<ingsoc> seems emacs/vim is the favourite here too
<whitequark> rks`_: whoa, that looks really nice
<MercurialAlchemi> well, I'm afraid most ocamler are emacs/vim people too
<rks`_> ingsoc: I think someone was working on a modern eclipse binding
<MercurialAlchemi> learning vim is always useful
AlexRussia has quit [Ping timeout: 264 seconds]
<rks`_> ingsoc: https://github.com/nbros that guy
<rks`_> ah well, he never did it apparently
<rks`_> that's sad)
Cypi has joined #ocaml
<MercurialAlchemi> rks`_: so we'd get useful debugging info in gdb?
<MercurialAlchemi> awesome
AlexRussia has joined #ocaml
<ingsoc> MercurialAlchemi: oh I am not averse to learning new stuff ;), it is just that i have been in permanent learning mode over the last 2 years coming from an operations background intitally I have taught myself web dev erlang python and switched from windows to linux (cos of the tooling issue on windows) all in the last 2 years so kinda burnt out
<ingsoc> :P
<rks`_> MercurialAlchemi: yeah
<ingsoc> i wanted a high performance counterpart to those other languages and well java just seemd verbose and after erlang I kinda liked the functional way of programming better than imperative
<ingsoc> I also don't really care about .net anymore as I have swallowed the linux pill
<MercurialAlchemi> Java doesn't just "seem" verbose :)
<MercurialAlchemi> but I have to say that it's difficult to do Linux work while avoiding vim
<ingsoc> well anyway my gut feeling is vim will be easier to get started (if i go down the vim or emacs route) but I want to make sure that vim and ocaml are definite bed fellows
<MercurialAlchemi> you're eventually going to have to remote into a server where the only editor available will be vim
<rks`_> ingsoc: they are
<MercurialAlchemi> oh, they are
<companion_cube> vim + ocaml + merlin = awesome
<ingsoc> are they both equally supported by the community ?
<MercurialAlchemi> it's like an IDE (well, mostly) without the hassle
<rks`_> (you have screenshots on that page)
<MercurialAlchemi> (and without the debugger)
<ingsoc> well, judging from the fact any time i mention ocalide on here everyone says "ocalide who ?" i may have an easier time just learning vim and merlin etc. at least I can get help :)
<MercurialAlchemi> (or project-wide renaming or function extraction, but that's not a big deal in fascist language like OCaml)
<ingsoc> and this channel has been very tolerant and friendly to my noobness so thanks
<ingsoc> :D
<rks`_> MercurialAlchemi: project-wide renaming might come some day (with limitations)
<ingsoc> does ocaml have any features to connect to a running vm
<ingsoc> running code
<ingsoc> on a live system
<ingsoc> via utop or something like that ?
<ingsoc> if anyone has used erlang before I am talking something like the erlang remote shell
<rks`_> :')
<rks`_> not that I know of
<ingsoc> i think clojure now has tooling for this kind of feature now
<ingsoc> I kinda messed around with that before coming to ocaml
<rks`_> but then, there is no "running vm"
<ingsoc> even in byte-code ?
<ingsoc> ok
<ingsoc> well i need to read more
<flux> hmm.. I wonder if one could easilyish have a mirage xen host running only ocaml toplevel behind ssh :)
<companion_cube> any way to change the default solver of opam?
<MercurialAlchemi> change it how?
<companion_cube> I have a solver which uses aspcud "in da cloud" (my distro doesn't provide it)
<companion_cube> but it's getting tiresome to type --solver=cudf_remote_proxy
<flux> shell alias?-)
<MercurialAlchemi> exactly what I was going to say
<MercurialAlchemi> you can also set OPAMEXTERNALSOLVER apprently
<MercurialAlchemi> what distribution is it that doesn't have aspcud, out of curiosity?
<companion_cube> fedora
<MercurialAlchemi> (I should really send a feature suggestion to Microsoft: "please refuse to save any document called 'screenshot.docx' and direct the user to Paint instead")
<companion_cube> :D
Haudegen has quit [Ping timeout: 264 seconds]
<def`> rks`_: even without vm, if you have type info it's reasonably easy to plug into a running bytecode instance, and a bit more tricky but not impossible to connect to a native instance
<flux> mercurialalchemi, sounds like a job for Clippy
<def`> it's worth exploring what that would enable :)
<ingsoc> I am using ubuntu
<ingsoc> options for vim packages are...
<ingsoc> * vim
<ingsoc> * vim-gnome
<ingsoc> * vim-tiny
<ingsoc> * vim-athena
<ingsoc> * vim-gtk
<ingsoc> * vim-nox
Haudegen has joined #ocaml
<ingsoc> is vim available as terminal and windowed
<MercurialAlchemi> ingsoc: if you're comfortable with the terminal, vim-nox, otherwise vim-gnome
<MercurialAlchemi> (also has the terminal version)
<MercurialAlchemi> vim-nox is the terminal-only version
ivan\ has quit [Read error: Connection reset by peer]
<ingsoc> MercurialAlchemi: I am comfortable with terminal but makes sense to just install both as disk space no worry
ivan\ has joined #ocaml
<ingsoc> i mean
<ingsoc> vim-gnome
<MercurialAlchemi> sure
<MercurialAlchemi> (I find gvim to be pretty crap and never use it)
<def`> (+1)
<MercurialAlchemi> on the other hand I work in a terminal all the time, except for FF/Skype and occasionally Dolphin
<MercurialAlchemi> the vim mod of Kate is pretty neat, but that's not going to help with OCaml tooling
<ingsoc> MercurialAlchemi: oldskooler showing your age maybe ?
<ingsoc> :)
<MercurialAlchemi> well...
<MercurialAlchemi> I do have a beard
hellofunk has quit [Remote host closed the connection]
<ingsoc> I'm growing one, I just got a long way to go until it is McCarthy/Ritchie style lol
<ingsoc> OK, I am determined to put my IDE woes behind me today...
<MercurialAlchemi> :)
rand000 has joined #ocaml
ygrek_ has quit [Ping timeout: 256 seconds]
rand000 has quit [Read error: Connection reset by peer]
rand000 has joined #ocaml
<rks`_> def`: i'm not saying it's impossible
<rks`_> it's just that at the moment, there's no easy way
<rks`_> it erlang it's easy
<rks`_> you just do
<rks`_> $ erl -someflag my_targ
<rks`_> and done.
<def`> rks`_: yep, I was just considering the eventually of making such a tool :P
<def`> (but I never used erlang… I should probably give it a try, this aspect looks well done, which is rare enough in this industry to spend some time on the matter :P)
<MercurialAlchemi> Java has great tooling too
<ingsoc> def`: the erlang runtime is awesome (hyperbole intended)
<ingsoc> and you have to nuke it to make it die
<def`> ingsoc: yep, I am especially interested by the monitoring aspect
<ingsoc> and once you get your head around the concurrency it just makes alternatives look pathetic
<def`> the same can be said of monadic concurrency library
<ingsoc> ocaml the language itself looks to my albeit untrained more elegant and also I like the type inference static typing
<rks`_> yeah ingsoc, erlang's model is nice, but you'll get used to lwt/async really quicly
<ingsoc> (i like the idea of it as never seen it before)
<rks`_> def`: ok :)
<ingsoc> it is also obviously faster (hence my interest) as I just cannot cope with dealing with c/c++
<MercurialAlchemi> rks`_: never used Erlang but I wouldn't say lwt has the same scope
<ollehar> lwt/async is not parallel, though, right?
<rks`_> it's not
<rks`_> well
<rks`_> :)
<MercurialAlchemi> it's also not designed for multiple machines
<rks`_> MercurialAlchemi: it's just that you're often fine with what lwt offers
<def`> ollehar: it has no shared memory model, but the same apply to erlang
<MercurialAlchemi> oh, I'm fine with what lwt offers :)
<ingsoc> the error detection and recovery is superb and very different to anything else I have seen. I guess typical erlang has potentially more problems than a typical ocaml program (I have kinda found myself defining types using the erlang type preprocessor - dialyzer) but you can get away with poorer code in erlang due to supervision trees
<def`> (and this is a limitation of ocaml runtime, nothing inherent to monadic concurrency, although cooperative threading makes things easier)
<MercurialAlchemi> rks`_: I'd say that you could build something Erlang-like on top of lwt
<ingsoc> I wouyld be glad to offer any help with erlang in exchange for some ocaml mentoring
<ingsoc> :P
<ollehar> also, documentation of lwt sucks
<MercurialAlchemi> (well, for certain properties of erlang, you're not going to get soft real-time anytime soon)
<ingsoc> docco seems to be proportional to the community size
<rks`_> ingsoc: i'm sure people will be happy to help you with any problem you might have
<rks`_> without requiring you to help them use erlang
<def`> eingsoc: this is more of a problem in ocaml, lwt get it pretty bad in my experience, async with its monitors and some discipline is better, but it looks inferior to erlang
<ingsoc> for my use case, I see erlang as the controlling concurrency hub and coordination language
<MercurialAlchemi> rks`_: yes, "tell us why you want to use an IDE and we'll explain why you don't need it" kind of help :)
<def`> ollehar: that's subjective, I found lwt doc much better than the average java doc (including std lib)
dario_ has joined #ocaml
<ingsoc> which farms out requests to things like python (massive library scope) and hopefully ocaml (performance and robustness of code)
<def`> (but the api and semantics suck, and show some "legacy")
<def`> looks like a reasonable design (*troll* except for the python part)
<MercurialAlchemi> ollehar: well, you should look at Python's Twisted doc :)
<ollehar> def`: really? how hard is it to find a tutorial in java compared to lwt?
<def`> I never talked about tutorial
<ollehar> ocaml is saved by its great and active community, though. like irc and stackoverflow.
<ollehar> def`: no, because you're not a noob like me
<def`> I understood doc as reference, sorry
<def`> of course, java has much more tutorials, can compete on that :)
<ollehar> reference literature is not useful for learning.
<def`> can't*
<def`> but low quality tutorials makes you learn wrong things, which is better only on really short term
AltGr has left #ocaml [#ocaml]
<def`> (there is so much things about java that's its hard to find what is good)
<rks`_> MercurialAlchemi: :D
<rks`_> ollehar: i'd consider RWO to be a really good tutorial
Simn has quit [Ping timeout: 276 seconds]
<rks`_> (yes yes, I know, it's presenting async, not lwt)
<ingsoc> so is lwt/async more like node/twisted programming ?
<ingsoc> (callback based asyncio)
Simn has joined #ocaml
<dario_> ingsoc: Lwt/Async does not rely on callbacks
<dario_> It's similar to node/twisted only in the sense you can do async IO easily
<dario_> However, the Lwt/Async model (based on monads) is much better
<dario_> Callbacks are a PITA...
<ingsoc> that was the await stuff that as added to later versions of .net/c#
lpw25 has joined #ocaml
<ingsoc> so your code looks more sequential rather than callbacks all over the place
<rks`_> looks like it yes
<rks`_> (but I never used it, I just glanced at your link)
<dario_> ingsoc: yes, when using Lwt/Async, the code looks very sequential
<ingsoc> yeah i never used it as by the time that came out I had moved on
<rks`_> ingsoc: if you're learning by reading RWO, you should continue
<rks`_> there's a chapter dedicated to async
<ingsoc> ok.
<dario_> ingsoc: If you learn Async via RWO you can then easily learn LWT also
<dario_> It seems LWT is more popular in the OCaml community...
<dario_> ...though Async is also a fine library.
AlexRussia has quit [Ping timeout: 265 seconds]
<dario_> (It's mostly a matter of historical contingency which determines who uses which)
regnat has quit [Ping timeout: 265 seconds]
<ingsoc> RWO seems to take a while to even begin talking about modules and compiling code and from what I can gather there is a fair bit more involved and a lot more options you have to actually run code compared to a lot of other environments
<ingsoc> (with ocaml)
<dario_> ingsoc: it depends
<ingsoc> this has been a source of my initial confusion that along with setting up an IDE
<dario_> If your program is simple, you can run it the same way you would run a shell script
<ingsoc> my first program to test ocaml is one to connect to my erlang REST service and pull some data in JSON or msgpack and then log it to a text file as csv
<ingsoc> jsut seems a reasonable test to get a feel for it
<ingsoc> or write as an xml doc
<dario_> Which libraries are you using?
<ingsoc> so it is networking http serialisation lib support and some IO
<ingsoc> no idea yet
<dario_> For HTTP, you have OCamlnet, cohttp, Ocsigenserver...
<ingsoc> just setting up vuim and merlin after abandoning ocalide (eclipse plugin)
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<dario_> I wouldn't worry too much with the IDE stuff right now...
<dario_> Just fire up VIM and write your code...
<ingsoc> I think cohttp was referenced in RWO as a lib to install
<ingsoc> yeah
regnat has joined #ocaml
<dario_> Cohttp is a good choice for HTTP
<dario_> For JSON, there's Yojson
<dario_> For CSV there's ocaml-csv
<dario_> (all these libraries are available via OPAM)
<ingsoc> dario_: thanks, I will report back
<dario_> ingsoc: you're welcome. Good luck!
IbnFirnas has quit [Read error: Connection reset by peer]
octachron has joined #ocaml
AlexRussia has joined #ocaml
vanila has joined #ocaml
<ingsoc> ok vim...
<ingsoc> I installed this...
<ingsoc> then this
<ingsoc> .vimrc looks like this...
<ingsoc> and i did...
<ingsoc> opam install merlin
<ingsoc> including adding the required stuff to .vimrc
<ingsoc> i ran this in gvim...
<ingsoc> :execute "helptags " . substitute(system('opam config var share'),'\n$','','''') . "/merlin/vim/doc"
<ingsoc> does this need to be done everytime ?
<ingsoc> looks like i need this
<dario_> You can put those commands into .vimrc
<ingsoc> sorry for spamming
<dario_> ingsoc: it's okay; we've all been beginners at one point...
<ingsoc> (never used vim in my life)
<ingsoc> :)
<dario_> Well, if you're not familiar with VIM, use whichever editor you're more comfortable with
jgjl has joined #ocaml
<def`> ingsoc: no need to run this every time, it's just for indexing doc in vim
<dario_> For simple beginner programs, syntax highlighting is pretty much the only IDE feature I recommend
<def`> (if this was needed everytime, it would be better to put it in vimrc)
<dario_> The more advanced IDE features start getting useful once your programs get more complex
<dario_> Question: is anyone here using ZMQ with LWT?
<dario_> hcarty: are you there?
<dario_> I'm trying to replicate the shared queue example: http://zguide.zeromq.org/page:all#header-40
<dario_> ZMQ.Proxy does not play nicely with LWT's event loop, right?
jonludlam has quit [Ping timeout: 272 seconds]
Thooms has joined #ocaml
<dario_> Moreover, doing it manually requires using ZMQ.Poll, which I presume also doesn't work well with LWT.
<dario_> So, has anyone tried something similar with ZMQ and LWT?
jonludlam has joined #ocaml
<ollehar> rks`_: yeah, RWO seems great.
<ollehar> much needed book.
Denommus has quit [Ping timeout: 272 seconds]
IbnFirnas has joined #ocaml
<ingsoc> rks`_:, MercurialAlchemi: OK, I have vim installed and merlin working (from what I can gather) and I have code completion. The problem is it doesn't seem to work in gvim, any ideas why this would be ? is it a case of the environment vars or something like that not known to the gui client ?
siddharthv is now known as siddharthv_away
siddharthv_away is now known as siddharthv
esden has quit [Remote host closed the connection]
<ingsoc> also, is there a way to chage keybindings for things, lol, maybe i just need a vim cheat sheet
<ingsoc> also workflow would be a 2 terminals open ?, one with the vim editor and another with utop running and them both having the working directory where my project files are ?
<ingsoc> then having a makefile to drive ocamlbuild etc.
<ingsoc> ?
AlexRussia has quit [Ping timeout: 252 seconds]
<rks`_> I have no idea why it wouldn't work in gvim
<ingsoc> grrrr
<ingsoc> : /
<rks`_> oh
<rks`_> I just tried and I have a lot of errors
<rks`_> (pathing problem apparently)
<ingsoc> yeah can't find a load of stuff
<rks`_> yep, same problem here
<def`> env var yes ?!
<rks`_> (nevermind me, I had another problem)
<rks`_> yep, no problem here sorry
Thooms has quit [Ping timeout: 240 seconds]
<ingsoc> def`: what do you mean
<def`> ingsoc: launch gvim from console
<MercurialAlchemi> ingsoc: hmm
cdidd_ has quit [Remote host closed the connection]
AlexRussia has joined #ocaml
<MercurialAlchemi> when launching vim from the console in a directory with a .merlin, it seems to work
<ingsoc> MercurialAlchemi: sorry i was launching from the gui (ALT+F2 ubuntu) I am guessing that the environment isn't set up the same ?
<rks`_> yes
<MercurialAlchemi> ingsoc: well, the process probably uses ~ as directory in this case
<rks`_> (that's what def` meant by "env var")
<rks`_> MercurialAlchemi: that shouldn't be a problem, merlin locates the .merlin file relative to the file you are editing
<rks`_> I'm guessing the problem was: merlin wasn't in PATH
<ingsoc> ok, i now have a dir with a .merlin, and a _tags file (for ocaml build0 and a Makefile driving the build of the top level module (entry point) and I am happy
<ingsoc> thaks for all your help
<ingsoc> now i just need to work out how to operate VIM
<ingsoc> lol
<ingsoc> Iwonder if there is an eclipse mode or i should just bite the bullet and learn the keybindings
<ingsoc> it is a bit cryptic thp
<MercurialAlchemi> well
cdidd has joined #ocaml
<rks`_> ingsoc: you can edit the bindings, you could also use emacs if the feels more natural
<ingsoc> never used emacs in my life so maybe i would be in same position
<rks`_> as for an emacs plugin, as I said someone started rewriting one using merlin, but then disappeared
<MercurialAlchemi> there is definitely an issue with the env vars in gvim, it doesn't have the opam environment
<rks`_> if you want to try to write one, def` and I would be happy to help you with the merlin' side of things
<MercurialAlchemi> and then you want to type ':cd $YOUR_PROJECT' in vim
<MercurialAlchemi> ingsoc: emacs is not modal like vim
<MercurialAlchemi> that's a huge difference
mk270 has quit [Ping timeout: 264 seconds]
<ingsoc> I was under the impression VIM might be the easiest to approach as a noob
<MercurialAlchemi> hmm
ivan\ has quit [Read error: Connection reset by peer]
ivan\ has joined #ocaml
<MercurialAlchemi> well, it doesn't have emacs' flexibility, but it still has around 25 years of features built in it
<MercurialAlchemi> but you don't need to learn everything at once, or even everything at all
<MercurialAlchemi> you do need to get used to the notion that there is a mode for changing the text, another for moving around, and another for giving commands
<MercurialAlchemi> which is not something you find in other editors
<MercurialAlchemi> there are plenty of good vim tutorials on the web, though, on top of the built-in one
<ingsoc> OK, is there a "getting started with emacs for ocaml" tutorial you could recommend and I will compare experiences
<ingsoc> and then choose
<rks`_> well, the merlin wiki has a page for emacs too
cdidd has quit [Remote host closed the connection]
Thooms has joined #ocaml
ggole has joined #ocaml
Thooms has quit [Read error: Connection reset by peer]
<ingsoc> rks`_: thanks, will try later.
<ingsoc> on saving of a file i see the merlin reports errors which is cool but is there a way to get a description of the error ?
cdidd has joined #ocaml
<MercurialAlchemi> ingsoc: if your cursor is on the line of the error, it will show the error message
<MercurialAlchemi> (it can be problematic for multi-line error messages though)
rand000 has quit [Quit: leaving]
<ingsoc> MercurialAlchemi: ahh, I am using gvim now. it seems you hover the mouse pointer over the margin and a popup appears witht he error message
<ingsoc> cool
<ingsoc> :)
<MercurialAlchemi> ok
<ingsoc> maybe vim is not so bad.
<MercurialAlchemi> also, :Errors gives a list of errors
<ingsoc> and it seems i can open multiple files in the same window
<ingsoc> (split window)
<MercurialAlchemi> oh, yes
<companion_cube> oh, nice
<MercurialAlchemi> it has tabs too
<companion_cube> having the error on hoover is neat
* companion_cube suddenly considering using gvim instead of vim
<MercurialAlchemi> ew, but you'd have to use the mouse for that
<MercurialAlchemi> gross
<MercurialAlchemi> unless you have a trackpoint
<companion_cube> I have a proper mouse here
enitiz has joined #ocaml
<MercurialAlchemi> trackpoint > mouse
<ingsoc> companion_cube: he has a beard remember
<ingsoc> :)
<ingsoc> is there a way to get git integration ?
<MercurialAlchemi> I have an addiction problem, both with vim shortcuts and with trackpoints
<MercurialAlchemi> at least Lenovo trackpoints
<MercurialAlchemi> rks`_: is it good?
<MercurialAlchemi> I use tig a lot
<companion_cube> ingsoc: I suggest you use vundle to manage vim plugins
<companion_cube> and yes, vim-fugitive + gitgutter are nice
<MercurialAlchemi> companion_cube: he is already using pathogen
* MercurialAlchemi checks out vim-gutter
<ingsoc> i have a module with a basic function defined
<ingsoc> I have started utop in the dir it exists
<ingsoc> how do use the function in utop ? do i have to define an .mli or something ?
<ingsoc> ocamlbuild seems to auto cre4ate everything needed if one doesn't exist already
<ingsoc> (when buildingg) but just wondered waht is required in utop if i only have .ml file)
<rks`_> MercurialAlchemi: I use tig as well, never used fugitive
<rks`_> it's supposed to be quite good though
<MercurialAlchemi> vim-gutter is nice
<MercurialAlchemi> doesn't play too well with solarized-dark per default though
<ingsoc> do i need to compile .ml to something to use it as a module from within utop ?
<MercurialAlchemi> ingsoc: #load "path_to_yourfile.ml";;
<MercurialAlchemi> no, #use, sorry
<companion_cube> the killer feature of fugitive, to me, is :Gvdiff <revision>
<companion_cube> vertical diff with the same file (or another) at any point of history
<MercurialAlchemi> mm
<MercurialAlchemi> yeah, sounds interesting
<companion_cube> in short, many git commands reflected in vim
<companion_cube> open buffers on old versions, blame, etc.
<ingsoc> is there a way to initialise module availability to utop for a specific project (some kind of init file in the project directory that is read by utop)
<ingsoc> where I can list modules
<companion_cube> .ocamlinit file
<companion_cube> you can put #directory, #load and #install_printers in it
Thooms has joined #ocaml
enitiz has quit [Ping timeout: 276 seconds]
<MercurialAlchemi> companion_cube: I'm sold
<ingsoc> companion_cube: can you have a per project .ocamlinit and if so is this just overlaid on top of the ~/.ocamlinit ?
<MercurialAlchemi> ok, ocaml-gitgutter is seriously nice, I see a lot less time spent on git add -p in my future
<MercurialAlchemi> er, vim-gitgutter
<rks`_> do you have a link to that?
<rks`_> ok found it
<MercurialAlchemi> this was the "2 minutes productivity"
<ingsoc> #use "<filename>.ml";; brings all defined bindings in the file into the utop namespace
<ingsoc> so Hello.x;; doesn't work
<ingsoc> but...
<ingsoc> x;; does
<MercurialAlchemi> ingsoc: ah, yes
<ingsoc> how do you use a module referencing it with the module name prefix
<rks`_> #usemod or something
<ingsoc> i need to check that git plugin too, wow I think i am getting somewhere
jgjl has quit [Quit: Textual IRC Client: www.textualapp.com]
<rks`_> #mod_use
<rks`_> (takes an ml file as argument)
<ingsoc> isn't this an extremely common thing to do
<ingsoc> poke around your code in the REPL ?
<ingsoc> ahem i mean toplevel
<ingsoc> :)
<MercurialAlchemi> come here to talk about ocaml, stay here to learn about vim plugins
<companion_cube> ingsoc: I tend to have a .ocamlinit for every nontrivial project
<ingsoc> companion_cube: ok so if i missed it, are you saying you can have a per project .ocamlinit and this overlays over the .ocamlinit in the home dir ?
yomimono has quit [Ping timeout: 255 seconds]
<companion_cube> it doesn't overlay sadly
<ingsoc> grrr
<companion_cube> you might be able to #use ~/.ocamlinit though
<ingsoc> ok
dario_ has quit [Remote host closed the connection]
<ingsoc> so a new project generally has a cp ~/.ocamlinit proj_dir/.ocamlinit
<ingsoc> then add per project stuff
dario has joined #ocaml
<ingsoc> companion_cube: thanks for the info, seems to be working fine now (Mod.binding)
<ingsoc> is there no way to run OS commands from utop
<ingsoc> ls etc.
Sim_n has joined #ocaml
<companion_cube> not a convenient way (I mean, not easier than just calling the corresponding ocaml function)
<ingsoc> ok once again thanks for all your help #ocaml, can't believe I am using VIM finally lol, I think my beard just grew a bit
<MercurialAlchemi> oh, you have macros in utop
<MercurialAlchemi> cool
<ingsoc> looks like today is a tooling voyage of discovery
<ingsoc> :)
shinnya has joined #ocaml
Simn has quit [Ping timeout: 276 seconds]
IbnFirnas has quit [Read error: Connection reset by peer]
psy_ has quit [Ping timeout: 272 seconds]
leowzukw has joined #ocaml
yomimono has joined #ocaml
mort___1 has joined #ocaml
mort___ has quit [Ping timeout: 265 seconds]
mort___1 has quit [Ping timeout: 252 seconds]
yomimono has quit [Ping timeout: 264 seconds]
chouser has joined #ocaml
jabesed has joined #ocaml
ygrek_ has joined #ocaml
<companion_cube> ingsoc: be careful not to let your beard get trapped in doors because of its length
<ingsoc> companion_cube: looks like utop doesn't expand "~"
<companion_cube> yes, I noticed :/
<ingsoc> absolute path will allow you to reference base .ocamlinit
<companion_cube> I don't know how to do it properly, guess I'll stick to copying ~/.ocamlinit into subprojects
<ingsoc> grrrr
_5kg has quit [Ping timeout: 255 seconds]
<ingsoc> yeah same here
<ingsoc> :P
<ingsoc> :)
<companion_cube> vim my/project/.ocamlinit
<companion_cube> :r ~/.ocamlinit
<companion_cube> ;)
_5kg has joined #ocaml
AlexRussia has quit [Ping timeout: 276 seconds]
* ggole expanded it manually
<ingsoc> which is fine if you work with people with the same username on all workstations :P
<companion_cube> or you end up stealing their ~/.ocamlinit
<ingsoc> ha ha yeah
yomimono has joined #ocaml
Thooms has quit [Ping timeout: 265 seconds]
IbnFirnas has joined #ocaml
AlexRussia has joined #ocaml
AlexRussia has joined #ocaml
AlexRussia has quit [Changing host]
Denommus has joined #ocaml
psy_ has joined #ocaml
<ingsoc> I wonder how many people who come from the "one command and you're done" dev environment get put off when arriving in ocaml land due to frustration getting set up with a proper dev environment. I kinda had similar problems getting started with erlang so I kind of already expected things to be not completely straightforward coming to ocaml. If you compare this to say, a c#/.net user of visual studio on windows which is simply run setup.exe.
<ingsoc> there wasa big discussion on the erlang mailing list about obstacles to getting started and a lot of the old timers were like "meh, who cares, if they can't be bothered to get down n dirty who needs em"
<ingsoc> (not saying it is like that here) but just an observation
<ingsoc> maybe most people on here are already quite hardcore devs/linux/vim/emacs enthusiasts
<ollehar> ocaml is an academic language
<ollehar> so
<tokenrove> it's tricky. languages like ocaml and erlang accumulate a lot of different ways of doing things, and it takes a lot of work to produce that streamlined, here's-how-you-do-it workflow.
<tokenrove> you might come to those environments and think things are way behind, but in the erlang world, stuff like rebar has massively improved things, and having recently come back to ocaml, i can say that it's way, waaay more convenient now than it was circa 2002.
<tokenrove> and the improvement seems to have some momentum. so now's a good time to hop on the wagon. ;-)
ddosia has joined #ocaml
<ingsoc> tokenrove: oh yeah, I totally agree, erlang has improved massively but still has a way to go. I remember when I first discovered it I kinda left it for a while as I was told OTP needs to be used for production apps and it just seemed like a complete mystery, this was before the books covered it in any depth or user friendly way
<ingsoc> it seems to be the way, the language wasn't the major problem it was all the tooling and fframeworks
osa1 has joined #ocaml
<ingsoc> tokenrove: so basically what you are saying is, "you don't know how lucky you are, back in the olden days things really were bad !" :)
ivan\ has quit [Read error: Connection reset by peer]
ivan\ has joined #ocaml
<tokenrove> ingsoc: hah.
<MercurialAlchemi> ocaml.org's "learn" page could easily have a page about tooling
<MercurialAlchemi> er, a section, not a page
<ingsoc> maybe I will blog something like the pragmatic starter page like, forget the standard toplevel use utop, start off the bat with OPAM, quick start ocamlbuild and sample Makefile, and quick start basic guide to get reasonable VIM or Emacs up and running with template .ocamlinit. obviously tastes vary but for a total noob to all these tools they will not care about all that they just want a reasonable environment set up in the least pain possib
<ingsoc> use Core from the get go etc. (although this is discussed in RWO, but it would be good to put all this on a single crib sheet
<rks`_> aren't the posts on https://opam.ocaml.org/blog/ good enough?
<rks`_> (the ones about editors and utop)
<rks`_> as for compiling, I thought RWO would mention it.
<chouser> so, I just started using ocaml for a little side project about a week ago. I'm well over half done with my project, am making steady progress, and I've never heard of utop, opam, ocamlbuild, or .ocamlinit.
<chouser> I've heard people mention Core, but I'm not sure what it is.
<ingsoc> rks`_: possibly, i will check them out. I spose there is info out there. Maybe it was how I was approaching it as I thought the ocalide thing would work out then got frustrated and probably didn't start off in the most structured way. I may just document the process for my own reference anyway then if I am around and someone seems to be in similar position to me then I can at least give them a copy and see if they can provide feedback on w
<tokenrove> ingsoc: i think that's a good idea. one of the best ways to help reduce that friction is to disseminate information about the current preferred solutions.
<chouser> I had some small trouble beating my Makefile into a workable state, and I'm sure it's insufficient for a medium or large project, but I saw there was a stoke Makefile I could use for something larger than this.
<tokenrove> ingsoc: the other thing is that blog posts show people considering a language that there is traction there. so i wouldn't worry about it duplicating some other source of that information.
<chouser> My trouble had mainly to do with the various ways to use "ocaml" "ocamlc" and "ocamlopt", and the purpose of all the different .ocx. ocax, etc. files. But I limped along not knowing the difference between bytecode and native files for a while.
<ingsoc> chouser: I am no doubt that approach has worked great for you and I am not saying it is impossible to start off. I guess I was coming with the intention of starting off with the current community best practices or tooling from the get go, this may not be the best way to start off for some people I guess everyones expectations and requirements are different
<ingsoc> I am not doubting*
<tokenrove> chouser: i find oasis and ocamlbuild useful, as i too originally had hand-written makefiles, then the ocaml makefile that's out there, then omake. i would hope a new user wouldn't have to go through all that any more.
<ingsoc> chouser: this is exactly what ocamlbuild solves
<ingsoc> the mystery of compilation
<ingsoc> well it hides the magic
<ingsoc> so you can focus on dev
<ingsoc> then you can dig under the covers when you need to
<chouser> does it do dependency resolution across multiple source files?
<ingsoc> like i said it depends on how you want to approach things
<tokenrove> on one project i used cook (a make replacement). i always meant to publish my cook recipes for ocaml, but there's no need now.
<rks`_> ingsoc: ok :) (i'm not discoureaging you from writing somethnig, I was just curious)
<tokenrove> chouser: ocamlbuild deals with dependencies correctly
dario has quit [Remote host closed the connection]
<chouser> interesting. So I probably would have been/would be better off with ocamlbuild, but I didn't even know it existed.
<ingsoc> chouser: chouser: exactly
<chouser> I mean, my problem was not that I was frustrated while trying to use it, but that I wasn't trying to use it.
<ingsoc> even ROC only mentions it but only covers basic info on compiling in chapter 4 then there is another chapter about it at the end of the book (not read it yet)
<tokenrove> chouser: i assume you are at least using ocamldep to generate dependency information and then including that output in your makefile?
<ingsoc> RWO*
<tokenrove> the thing i always hated about that was the build directory littered with ocamldep output, and the pain if you get those rules wrong
<companion_cube> this is a thing ocamlbuild does well: put all the geenrated stuff in _build/
<ingsoc> chouser: ^
<ingsoc> this gives aa taste
<ingsoc> you just reference your entry module (one with let () = )
<ingsoc> and put a suffix of mod.native/byte
<ingsoc> and it does its magic afaict
<chouser> tokenrove: nope, never heard of ocamldep, though if my project were any larger I would have gone looking for such a thing.
bytbox has quit [Remote host closed the connection]
hellofunk has joined #ocaml
<chouser> ingsoc: interesting, thanks.
<tokenrove> chouser: oh man. yeah, managing the dependencies manually is just a nightmare. you need to at least use ocamldep, but i recommend just skipping straight to ocamlbuild unless you need to integrate with other make rules.
<ingsoc> info is out there it seems but you have to know about keywords to google for
<ingsoc> maybe just needs ocollating to a more digestible format
<ingsoc> will write something up and link to a gist
shinnya has quit [Ping timeout: 245 seconds]
<tokenrove> definitely
<chouser> yeah, I just have a list of my 5 source files in the "right order" in my makefile. Definitely only acceptable for a small project.
<ingsoc> chouser: are you still editing in a basic text editor then running a compile and then looking at line number referenced for errors then going back into your editor to modify the rinse repeat ?
* chouser blushes
<ingsoc> cos that is not productive imho, unless you have the memory of rain man and never make mistakes
<chouser> My basic text editor is emacs. Does that give me any cred?
<tokenrove> this is why it's good for people to publish their workflows, and for them to be linked widely.
<ingsoc> well it is fine if it is configured correctly :P
<tokenrove> chouser: are you using merlin and tuareg mode?
<ingsoc> I just started using VIM about 2 hours ago
<ingsoc> and have code completion and error reporting within the editor
<ingsoc> when saving
shinnya has joined #ocaml
<ingsoc> but had to ask around
<chouser> I think I installed tuareg mode, but I'm not sure I'm using it well, or maybe at all. Though something in my ocaml buffers makes emacs sorta lock up sometimes, and I have to ^G to keep typing.
mort___ has joined #ocaml
<ingsoc> I had major pain with ocalide (eclipse plugin) before that because it seems (afaict) that it is not geared up for using OPAM installed runtime and libs
BitPuffin has joined #ocaml
<tokenrove> this is also a great thing about irc, though; it's another channel by which to discover different ways people do things.
<ingsoc> wasted ALOT of time
<tokenrove> chouser: merlin is awesome. you should give it a try if you have the time.
eikke_ is now known as eikke
eikke has quit [Changing host]
eikke has joined #ocaml
* ingsoc agrees that merlin is cool
<ingsoc> chouser: do you use utop ?
<ingsoc> as your toplevel REPL
<chouser> no. rlwrap ocaml
<chouser> lately in an emacs shell buffer
<chouser> for some perspective, I'm really "just visiting" OCaml. I don't intend to "move in".
<chouser> So I'd like to capture what I learn about the build process in the Makefile, so looking into ocamlbuild may be worthwhile.
<ingsoc> chouser: oh, ok, and btw I wasn't criticising you, I was just offering some info i just gained today to maybe at least make you think about what is available
<chouser> And if there's something easy I can do so that my cursor is sent to the location of the compile error, that might also be worth while.
<tokenrove> are you building with M-x compile?
<chouser> But I'm not going to spend days customizing my development environment right now, because I don't think I'll be around long enough for that to pay off.
<chouser> ingsoc: no offense taken at all.
<companion_cube> be careful chouser, you might get to like the language
<chouser> everyone here has been absolutely friendly and quite helpful.
<chouser> companion_cube: fair enough!
<ingsoc> this channel has actually spurred me on to stick with it as the help has been superb and with no flaming (even when I clearly was being noobish)
<chouser> Though I'm afraid I've been ruined by lisp. I sure do miss my macros.
<ingsoc> :)
<tokenrove> you should check out https://ocaml.org/learn/tutorials/compiling_with_gnu_make.html but at the very least, add calling ocamldep and including its output to your makefile
<chouser> tokenrove: ok, thanks.
<ingsoc> chouser: i think there is a preprocessor for ocaml where you can introduce new syntax (i think)
<ingsoc> probably not as straightforward as lisp macros
<ingsoc> but there's a manhole there to do things like it
<chouser> ingsoc: I've seen mention of it, such as for monad syntax support, right?
milosn_ has joined #ocaml
<tokenrove> chouser: i'm also a lisp person, so i hear you on macros. ml does have a lot to offer, though. btw, C-x ` will bring you to the next error if you compile with M-x compile.
<ingsoc> (I may be talking rubbish here though) someone clarify or deny
<ingsoc> :)
<tokenrove> there are a variety of ways to extend ocaml's syntax, but they're a far cry from macros as lisp sees them
<ingsoc> fair enough
<tokenrove> they're more like erlang's parse transforms
<ingsoc> btw macros scare me a bit, I am not sure I would like to support a codebase where the author went macro crazy
<ingsoc> it would be hard to know what the hell is going on
<companion_cube> chouser: sad that we have to choose between good macros and good typing :/
<chouser> companion_cube: yep. I still hope that someday that will change.
rgrinberg has joined #ocaml
<tokenrove> ingsoc: good tooling helps. the same is true of c++ and a codebase where operator overloading has been abused.
<chouser> companion_cube: Have you looked at all at clojure's core.typed or Typed Racket?
<pippijn> I've decided that fancy gadt-based packet formats are not worth it
<companion_cube> chouser: I heard about core.typed, but if the whole ecosystem doesn't use types you're screwed :s
<pippijn> at the end, I get a (tuple, (list, (structured, (like, this))))
<chouser> ingsoc: There is indeed danger there, but I'm not sure it's more dangerous than high-order functions. Have you seen some of those multi-level combinators? Good judgement is always required.
<companion_cube> but there's progress indeed
leowzukw has quit [Ping timeout: 246 seconds]
<tokenrove> sbcl also basically has what those people are calling gradual typing, but there are other problems with that ecosystem.
<companion_cube> scala has macros too, afaik
<pippijn> and then I need to translate that to a useful record, anyway
<pippijn> companion_cube: scala macros are awesome
<pippijn> I want those in ocaml
leowzukw has joined #ocaml
<ingsoc> chouser: yeah, there are many ways to shoot yourself in the foot. I guess you just have to be pragmatic and hope you can spot when things are getting out of hand. I guess these things are hard earned lessons through experience. I am still a relative newcomer to development so I am sure I will fall into the same traps of others
cdidd has quit [Remote host closed the connection]
<ingsoc> chouser: are you from Common Lisp or clojure ?
<ingsoc> I played with clojure for a bit and I definitely intend to learn it in future, ironically it has a SUPERB eclipse plugin (counterclockwise)
<ingsoc> : / :)
<chouser> ingsoc: Clojure
<chouser> I learned Common Lisp a little first, but it never "stuck"
<ingsoc> chouser: i have heard great things about clojure from people using it
<ingsoc> if I had to use the Java VM i would deffo jump in
<chouser> I get to use it at work. It's a very practical language, with a lot of tools to help you manage whatever kinds of complexity the real world throws at you, all while providing a small, clean (immutable, functional) base.
cdidd has joined #ocaml
<chouser> I do wish it had a kind of gradual static typing that I'm not sure exists in any language (so maybe my wish is nonsensical). But being a lisp, there's some chance such a thing could be added later, so I continue to hope. :-)
<chouser> OCaml's mix of highly inferred static typing plus lack of extremism on the subject of immutability is quite interesting.
badkins has joined #ocaml
<chouser> Do experienced users find that type errors the compiler finds at one place in the code are often fixed by a change in a completely different place in the code?
<ingsoc> I learned enough c/c++ to be dangerous, then dabbled with java/.net then found python and thought wow this is liberating not having to pander to the compiler all the time. Then I built a more substantial program (using erlang this time) and found I really liked functional programming but I started thinking there are some aspects of static typing that would help in a lot of areas of my code. This led me to ocaml where (hopefully) you get the
<chouser> ingsoc: cut off at "you get the..."
<ingsoc> you get the static typing without most of the downsides
<ingsoc> (type inference)
enitiz has joined #ocaml
enitiz has quit [Read error: Connection reset by peer]
milosn has quit [Remote host closed the connection]
milosn_ has quit [Remote host closed the connection]
milosn has joined #ocaml
zwer_h is now known as zwer
IbnFirnas has quit [Read error: Connection reset by peer]
Sim_n is now known as Simn
<companion_cube> ingsoc: interesting trajectory
rgrinberg1 has joined #ocaml
<ingsoc> companion_cube: this has been over approx 2.5 years since I left my day job to write some software (and learn to program properly - whatever that means)
<ingsoc> I went from writing a multi-threaded networking server (and all the horrors that entails) then I switched to using asynchronous callback based programming, then to a user space cooperative green thread library to then the nirvana of concurrency that is erlang. it was a fun ride shame I never got my product finished
<ingsoc> :D
darkf has quit [Quit: Leaving]
<ingsoc> companion_cube: what do you use ocaml for
<companion_cube> academics stuff: computational logic, symbolic computations (theorem proving)
<blech___> ingsoc, that preprocessor does exist. Look at camlp4
<blech___> chouser, yeah, finding the solution in a seemingly unrelated part of the code is pretty common. It's likely that a type was inferred incorrectly based on some weird use elsewhere so when you try to use it correctly you'll run into errors
<chouser> blech___: Right. Interesting. I think that may be a inescapable consequence of ubiquitous inference.
struktured has quit [Ping timeout: 245 seconds]
<blech___> sooo worth it, though
<chouser> Do experienced OCamlers use defensive type declarations?
<blech___> I'm middling at best but for me? Not so much. I can see the use for it when you're concerned about the inference engine and it's good for enforcing the type and also contributes to the idea of self-documenting code
<chouser> ok. Interesting, thanks.
<blech___> but most of the time my logic is if the type inference engine isn't getting it right it's because I'm writing bad code
<blech___> so I leave it out almost as a training exercise
<def`> chouser: not really defensive, but I like first putting some types before putting the actual values
<def`> that is, I model the space of my values using types, then I define the interface with those types, and after that I implement
paradoja has joined #ocaml
octachron has quit [Quit: Leaving]
<blech___> Does ocaml have a strong convention for documentation? I'm thinking of things like python's triple quoted strings.
paradoja has left #ocaml [#ocaml]
chinglish has joined #ocaml
<MercurialAlchemi> blech___: I think a very common convention is the "two lines readme and that's it" :(
<chouser> def`: ah, sure. I can see how that would help avoid the distant-error problem. It also sounds like an approach I've heard advocated by haskell and idris users.
<companion_cube> chouser: what do you mean exactly by "defensive type declaration"?
<def`> chouser: yep, as usual it's not a silver bullet, it depends on the kind of work you do, but I am quite pleased with it ;)
<chouser> companion_cube: oh, like sprinkling in type annotations on function args or return values, even when they could be inferred
<MercurialAlchemi> writing type declarations helps when reading the code
<companion_cube> well, many people write .mli files for this precise reason
thomasga has joined #ocaml
<companion_cube> o/ thomasga
<MercurialAlchemi> on the other hand, if you have to sync the type declarations in your .ml with your .mli, it's a bit much
<def`> bonne fête \o/
* chouser reads about .mli
<thomasga> gné?
uris77 has joined #ocaml
ollehar has quit [Ping timeout: 256 seconds]
rand000 has joined #ocaml
ebzzry has quit [Remote host closed the connection]
ivan\ has quit [Read error: Connection reset by peer]
ivan\ has joined #ocaml
Tamae has quit [Ping timeout: 246 seconds]
Tamae has joined #ocaml
IbnFirnas has joined #ocaml
dario has joined #ocaml
avsm has joined #ocaml
leowzukw_ has joined #ocaml
leowzukw has quit [Ping timeout: 272 seconds]
jneen|zzz is now known as jneen
Sim_n has joined #ocaml
<ingsoc> is there a way to set up vim for reasonable indentation spacing
<ingsoc> possibly intelligent
<ingsoc> what is the style guide ? tab-> spaces ?
<ingsoc> currently tab width is 9 : /
Simn has quit [Ping timeout: 276 seconds]
Thooms has joined #ocaml
<companion_cube> I don't know if there's a real standard, but 2 spaces seems common
<rks`_> ingsoc: now would be good time to read the link I gave you earlier.
<rks`_> (the post on opam.ocaml.org/blog)
<ingsoc> ok
destrius has quit [Quit: Leaving.]
leowzukw_ has quit [Ping timeout: 272 seconds]
ygrek_ has quit [Ping timeout: 256 seconds]
<MercurialAlchemi> ingsoc: ocp-indent is your friend
<ingsoc> yeah just following this
<MercurialAlchemi> otherwise, tabs are a bad idea whatever the language (unless you're in a Makefile, obviously)
<MercurialAlchemi> 'set et', 'set sw=2', 'set tabstop=2' in your .vimrc will give you 2 spaces when you press tab for everything
<rks`_> why are tabs a bad idea MercurialAlchemi ?
<MercurialAlchemi> 'au Filetype ocaml $command' lets you have settings specific to ocaml files
<MercurialAlchemi> rks`_: because nobody uses the same width to represent them
aluuu has joined #ocaml
<MercurialAlchemi> "oh, but it's aligned properly in *my* editor" is not a version of "oh, but it works on my machine" I want to deal with when doing code review :)
<ingsoc> i guess it is the problem when people mix tabs and spaces in the same file
<ingsoc> then things go bad so maybe just standardise on spaces ?
<MercurialAlchemi> ingsoc: that's people who haven't done enough Python
mort___ has quit [Ping timeout: 272 seconds]
<ingsoc> on this page...
<ingsoc> http://www.typerex.org/ocp-indent.htmlTo configure for VIM they say run...
<ingsoc> echo 'autocmd FileType ocaml source '"$(opam config var prefix)"'/share/typerex/ocp-indent/ocp-indent.vim' >>~/.vimrc
<ingsoc> failed for me
<ingsoc> when starting vim i got errors
<ingsoc> :execute ":source " . "/home/hickin/.opam/4.01.0/share/vim/syntax/ocp-indent.vim" this seems to do something
<companion_cube> http://ocaml.xelpaste.net/pC6z#L21 today, an explanation of why GADTs are awesome, through an IO monad!
<companion_cube> yay!
avsm has quit [Quit: Leaving.]
<Drup> MercurialAlchemi: my vote goes to "tabs for indentation, space for alignements"
<Drup> but consistency is better, and no tooling supports that for OCaml, so ocp-indent and all-space is the right way.
* MercurialAlchemi read "run drup" instead of "run dup"
<ingsoc> def`: so this is to configure what is installed by "opam install ocp-indent"
<ingsoc> ?
<ingsoc> and what does this do...
<ingsoc> set rtp+=</path/to/ocp-indent-vim>
<ingsoc> is this to be ran at the command line
<MercurialAlchemi> ingsoc: stick it in your .vimrc
<Drup> I'm not I'm slightly late to the party
leowzukw has joined #ocaml
<Drup> and apparently, there are several vimers around right now, the vim part needs review :D
badkins has quit []
<def`> ingsoc: ocp-indent-vim does the same job as ocp-indent.vim, but with slightly better integration (notably, indentations integrate better with undo buffer)
<def`> 'undo-ring'
<ingsoc> Drup: would this conflict with what I have entered manually in my .vimrc file already ?
<ingsoc> it says it writes into the respective editors config file
<def`> ingsoc: use either ocp-indent.vim or ocp-indent-vim, otherwise, one will be chosen quite arbitrarily
ollehar has joined #ocaml
<def`> and no, this doesn't conflict
ollehar has quit [Client Quit]
<rks`_> MercurialAlchemi: that's only a problem if you mixed tabs and spaces
lpw25 has quit [Ping timeout: 245 seconds]
<rks`_> which is only ever done by emacs users
slash^ has joined #ocaml
<rks`_> but otherwise using tabs for indentation seems reasonable.
<Drup> except it's not consistent with most other ocaml users, which is quite bad.
<mrvn> I indent too often to have tabs be workable
<ingsoc> after installing/configuring ocp-indent-vim
<ingsoc> let x y = "if i press return here then the next line is spaced up to being directly under the "=" sign
oriba has joined #ocaml
<ingsoc> is that correct ?
<mrvn> ingsoc: so what's the point of pressing return?
<def`> ingsoc: yep
<Drup> is it ?
<mrvn> rks`_: the emacs default of replacing 8 spaces with a tab on indent is horrible. Luckily it's just a few clicks to change that.
<Drup> the indentation should be 2 spaces for the next line
<def`> directly under
<def`> ahhh, yep not correct
<ingsoc> seems it is not installed then and I am using the default of 8 spaces
<rks`_> mrvn: unluckily, very many people dont change that.
<ingsoc> it just so happened the expression made it so it alighned with the "=" lol
<mrvn> I hope someone will fix the tuareg mode to know about GADTs at some point.
<mrvn> let f : type a . a foo -> a = function .... breaks the indentation completly.
<def`> ingsoc: type :set indentexpr?
struk|work has quit [Quit: Page closed]
<Drup> mrvn: use ocp-indent.
<rks`_> (I second Drup)
<def`> ingsoc: and tell us what vim answers :p
Haudegen has quit [Ping timeout: 240 seconds]
<ingsoc> def`: indentexpr=GetOcamlIndent()
vpm has joined #ocaml
<def`> ingsoc: then your setup is somehow incorrect
<def`> with ocp-indent-vim, it should be indentexpr=ocpindent#OcpIndentLine()
Haudegen has joined #ocaml
enitiz has joined #ocaml
yomimono has quit [Ping timeout: 272 seconds]
Hannibal_Smith has joined #ocaml
enitiz has quit [Max SendQ exceeded]
uris77 has quit [Quit: leaving]
WraithM has joined #ocaml
<ingsoc> def`: ok I did "opam install ocp-indent"
<ingsoc> then i added the following as described by the opam installation...
<ingsoc> """
<ingsoc> :execute ":source " . "/home/hickin/.opam/4.01.0/share/vim/syntax/ocp-indent.vim"
<ingsoc> """
enitiz has joined #ocaml
matason has quit [Quit: leaving]
swgillespie has joined #ocaml
<ingsoc> I have since tried creating a ".ocp-indent" file in the root of my project as described at
<def`> it's up to you, I suggested using ocp-indent-vim
<ingsoc> ok
<def`> to do so, just "opam install ocp-indent " and adding the cloned repository to vim rtp
swgillespie has quit [Client Quit]
nicoo has quit [Remote host closed the connection]
<ingsoc> set rtp+=</path/to/ocp-indent-vim> ?
<def`> yep, where the path is where you cloned the repositor
<ingsoc> so i just run that at the command line or add it to .vimrc ?
<def`> you add it to .vimrc
<ingsoc> ok
<def`> you know the unix variable PATH? rtp is exactly the same, but for vim extensions
nicoo has joined #ocaml
reem has quit [Remote host closed the connection]
enitiz has quit [Ping timeout: 252 seconds]
q66 has joined #ocaml
jwatzman|work has joined #ocaml
ivan\ has quit [Read error: Connection reset by peer]
ivan\ has joined #ocaml
ivan\ has quit [Changing host]
ivan\ has joined #ocaml
IbnFirnas has quit [Read error: Connection reset by peer]
chinglish has quit [Quit: Nettalk6 - www.ntalk.de]
badkins has joined #ocaml
dsheets has quit [Ping timeout: 264 seconds]
struk|work has joined #ocaml
enitiz has joined #ocaml
ggole has quit []
jonludlam has quit [Ping timeout: 246 seconds]
enitiz has quit [Ping timeout: 246 seconds]
<ingsoc> this is what I have in my ~/.vimrc relating to ocp...
<ingsoc> :execute ":source " . "/home/<user>/.opam/4.01.0/share/vim/syntax/ocp-indent.vim"
<ingsoc> set rtp+=/home/<user>/dev/ocaml_tools/ocp-indent-vim
<ingsoc> :set indentexpr? = indentexpr=GetOcamlIndent()
<ingsoc> def`: ^ in case I am misunderstanding (more than likely)
<ingsoc> hopefully this is the last piece of the puzzle
<ingsoc> it doesn't help that I know hardly anything about VIM or its config at this time
<def`> remove the :execute ":source" …
<def`> and the indentexpr line shouldn't be in your .vimrc
<def`> only set rtp+=…
<mrvn> ingsoc: and that is good
<mrvn> echo ":q!" >>.exrc
<ingsoc> def`: sorry, i i was showing that "set indentexpr? is still equal to indentexpr=GetOcamlIndent() from within VIM
<def`> ingsoc: I assume you restarted vim inbetween :/ ?
<ingsoc> def`: yeah, :(
Anarchos has joined #ocaml
<def`> what's the content of :scriptnames ?
bytbox has joined #ocaml
enitiz has joined #ocaml
<ingsoc> ~/dev/ocaml_tools/ocp-indent-vim/indent/ocaml.vim
<ingsoc> is the last entry so seems it knows something about it
rgrinberg1 has quit [Remote host closed the connection]
_andre has quit [Quit: leaving]
araujo has quit [Read error: Connection reset by peer]
araujo has joined #ocaml
rgrinberg has quit [Ping timeout: 246 seconds]
IbnFirnas has joined #ocaml
ivan\ has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
reem has joined #ocaml
lpw25 has joined #ocaml
tnguyen1 has quit [Remote host closed the connection]
thomasga has quit [Quit: Leaving.]
leowzukw has quit [Quit: Lost terminal]
Hannibal_Smith has quit [Ping timeout: 265 seconds]
Hannibal_Smith has joined #ocaml
Submarine has joined #ocaml
osa1 has quit [Quit: Konversation terminated!]
osa1 has joined #ocaml
reem has quit [Remote host closed the connection]
osa1 has quit [Client Quit]
osa1 has joined #ocaml
reem has joined #ocaml
Thooms has quit [Quit: WeeChat 1.0.1]
nojb has joined #ocaml
aluuu has quit [Ping timeout: 245 seconds]
nojb has left #ocaml [#ocaml]
nojb has joined #ocaml
rgrinberg has joined #ocaml
osa1 has quit [Remote host closed the connection]
Rebelion has quit [Ping timeout: 265 seconds]
enitiz has quit [Ping timeout: 265 seconds]
<dario> Anyone using ZMQ and LWT?
ivan\ has joined #ocaml
<companion_cube> not me, sorry
<dario> I'm trying to replicate the extended REQ-REP example from the ZMQ guide: http://zguide.zeromq.org/page:all#header-40
<dario> I presume ZMQ.Proxy won't work with LWT's event loop, right?
Rebelion has joined #ocaml
<dario> (If anyone has experience with ZMQ+Async, the problem is similar)
<Drup> dario: you know there is a lwt-zmq interface ?
<dario> Drup: Yes, that's what I'm using
<Drup> ok
<dario> And it's fine for the very simple examples
<Drup> (can't help more, sorry :D)
<dario> That's okay, Drup... :-)
<dario> I wonder if hcarty or whitequark are around...
lordkryss has quit [Quit: Connection closed for inactivity]
rwmjones is now known as rwmjones_afk
<whitequark> yeah?
Hannibal_Smith has quit [Quit: Leaving]
Submarine has quit [Ping timeout: 265 seconds]
<dario> whitequark: have you ever tried something like the extended REQ-REP example from the ZMQ guide using LWT+ZMQ: http://zguide.zeromq.org/page:all#header-40
Rebelion has quit [Ping timeout: 245 seconds]
<dario> I presume the most convenient solution (using ZMQ.Proxy) won't work with LWT's event loop, right?
<whitequark> why not?
MrScout has joined #ocaml
<dario> Well, since ZMQ.Proxy implements an event loop of its own, I presumed there could be problems...
<dario> ...but I guess I should try it anyway...
malc_ has joined #ocaml
nojb has quit [Quit: nojb]
avsm has joined #ocaml
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
<dario> whitequark: no, it does not work
<whitequark> run it in a different thread
ski has quit [Read error: Connection reset by peer]
<dario> By thread you mean a system thread, right?
dsheets has joined #ocaml
<whitequark> yes
<dario> I'll try...
MrScout has quit [Remote host closed the connection]
jgjl has joined #ocaml
reem has quit [Remote host closed the connection]
<ingsoc> ok i give up
<ingsoc> so close but no cigar
rand000 has quit [Ping timeout: 276 seconds]
WraithM has quit [Quit: leaving]
rand000 has joined #ocaml
<ingsoc> everything working except any sane tab/formatting etc.
<Drup> ingsoc: you tried the thing I linked ?
Rebelion has joined #ocaml
<dario> whitequark: it works! Thanks for your help...
lordkryss has joined #ocaml
<ingsoc> ?
<Drup> yes
<ingsoc> opam install user-setup
<ingsoc> [ERROR] No package named user-setup found.
<dario> ingsoc: Which OPAM version are you running?
<ingsoc> 1.4.2
<ingsoc> i think
<dario> Are you sure?
<ingsoc> 1.2.0
<Drup> 1.4.2 doesn't exist :D
<dario> Ah!
<ingsoc> sorry, i tried installing ocp-indent it was burnt into my retinas
<Drup> ingsoc: "opam pin add user-setup https://github.com/OCamlPro/opam-user-setup.git" then install.
<dario> I was wondering if ingsoc was one of those time-travellers that lurk in IRC...
manizzle has joined #ocaml
<ingsoc> user-setup is not available because your system doesn't comply with ocaml-version >= "4.02".
<dario> ingsoc: install OCaml 4.02.1
<dario> Run "opam switch 4.02.1"
jgjl_ has joined #ocaml
<ingsoc> and this is because unfortunately i run ubuntu 32bit and i couldn't get anything higher than 4.01.0 working
<ingsoc> this was my first hurdle from last week
<ingsoc> so maybe this is a dead end ?
<ingsoc> :(
<dario> ingsoc: any strong reason why you're running 32-bit Ubuntu?
<ingsoc> :'(
<dario> (Say, you have a 32-bit CPU)
Thooms has joined #ocaml
<Drup> 4.02 doesn't run on 32 bits ? really ?
jgjl has quit [Ping timeout: 264 seconds]
<ingsoc> dario: historical, i used to be a windows guy, i decided to dual boot with ubuntu, at the time canonical recommended 32bit for reasons that elude me now
<ingsoc> i installed it and the rest is history,
<dario> Btw, just last week I installed 4.02 on a 32-bit machine (ARM) and it was fine...
* MercurialAlchemi is trying to teach OCaml to his 9-yo daughter
<ingsoc> i am gonna move to 64bit at some point
<dario> ingsoc: can you try installing 4.02 again? (run "opam switch 4.02.1")
<ingsoc> but i will be buying a new machine to run it and haven't got round to it yet
<ingsoc> ok
<Drup> MercurialAlchemi: as long as you give her a LOGO library, it will work :D
<dario> In any case, OCaml very much prefers 64-bit systems...
<MercurialAlchemi> Drup: LOGO?
* fds began programming with Logo.
<ingsoc> dario: i found that out last week
<ingsoc> : /
manizzle has quit [Client Quit]
<Drup> the logo graphical model is *great* for beginners
<MercurialAlchemi> oh, dear me, this looks old
manizzle has joined #ocaml
<fds> I was about 13 though, I think.
<MercurialAlchemi> well, we've started with a simple "game" where characters from her favourite show battle each other
<dario> I took part in the IOI in 94, and there were some people competing with LOGO...
<MercurialAlchemi> "daddy, what's a random number?"
<Drup> MercurialAlchemi: it's like the brainfuck of graphical libraries
<dario> The other accepted languages were Turbo C and Turbo Pascal...
<Drup> MercurialAlchemi: note that I'm talking about the turtle model, not the programming language itself :p
<dario> ingsoc: I have to leave. Do try getting 4.02 installed on your 32-bit system, and consider upgrading to 64-bits ASAP!
<ingsoc> dario: ok 4.02.1 appears to work now
<dario> ingsoc: great! Good luck with the rest. Time to prepare dinner...
dario has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
Sim_n is now known as Simn
IbnFirnas has quit [Read error: Connection reset by peer]
<MercurialAlchemi> Drup: :)
<Drup> ( I might have done turtle oriented graphics in OCaml https://github.com/Drup/LILiS )
unix_beard has quit [Ping timeout: 245 seconds]
<ingsoc> is there any way of moving over/copy/export config of installed packages in an ocaml version to another in opam
<ingsoc> opam switch <newer_ver> is literally a fresh ocaml
<Drup> ingsoc: opam switch export/import
<MercurialAlchemi> Drup: I'm not sure she is ready for L-systems yet
<MercurialAlchemi> or me, for that matter :)
<Drup> ahah, probably not
* MercurialAlchemi reads some more about L-systems
<MercurialAlchemi> it looks fascinating (litterally)
WraithM has joined #ocaml
<Drup> I must say I have a certain passion for them
<Drup> no use whatsoever, though =')
<ingsoc> i am trying a opam switch reinstall <my_version>. dunno if installs ever get in a bad shape
<ingsoc> but last ditch attempt at getting indent working
slash^ has quit [Read error: Connection reset by peer]
<MercurialAlchemi> it's not immediately obvious how you control the shape you get from the grammar, though
<MercurialAlchemi> Drup: I could imagine using that to generate props in a game, for instance
<MercurialAlchemi> if I made games :)
<Drup> MercurialAlchemi: oh, sure
<Drup> I know Civ IV used to generate city with a custom made Lsystem engine
<Drup> but it was poorly documented, never managed to hack it
<MercurialAlchemi> right
zwer_b has joined #ocaml
<Drup> but I mean, afaik, nobody uses lilis and I don't have uses myself :D
<Drup> MercurialAlchemi: you can develop an intuition of what is going to be the result quite quickly, in fact
<MercurialAlchemi> ok
zwer has quit [Ping timeout: 250 seconds]
<MercurialAlchemi> (at least I'll have learned something cool today)
BitPuffin has quit [Ping timeout: 265 seconds]
yaewa has quit [Quit: Leaving...]
moei has joined #ocaml
unix_beard has joined #ocaml
bugabinga has quit [Remote host closed the connection]
<nicoo> Drup: I sometimes use LiLiS to displa nice images :)
<nicoo> display*
tane has joined #ocaml
<companion_cube> lilis was useful as a source of benchmarks for iterators ;)
uris77 has joined #ocaml
<Drup> nicoo: real story : My sister used lilis for one of her art projects
<nicoo> \o/
<nicoo> Drup: Can you show us pictures of the result ?
<companion_cube> quite useful in the end, Drup, then
<Drup> nicco : https://drup.github.io/LILiS/dev/spin_it.svg that, but it was printed in a slightly more interesting way and since I have no artistic fiber whatsoever, I'm not trying to explain anything about it :D
<nicoo> companion_cube: Given that there are other L-systems engines, and that Drup spent quite some time on it ?
<nicoo> Drup: Fancy
<nicoo> Also, there is a difference between having an artistic fiber and having an art-critic fiber :þ
<nicoo> Though I'm reminded that Nouveau did some very stupid (but pretty!) stuff on the screen while I was talking to an artist, so she filmed it ^^
IbnFirnas has joined #ocaml
<Drup> nicoo: It's Art Nouveau !
<Drup> :D
* Drup jumps outside of the room.
<nicoo> <3
<nicoo> Drup: No, come back
<nicoo> The pun was really good \o/
mort___ has joined #ocaml
Tekk_ has quit [Remote host closed the connection]
ivan\ has quit [Read error: Connection reset by peer]
ivan\ has joined #ocaml
<companion_cube> :)
Tekk_ has joined #ocaml
<tokenrove> MercurialAlchemi: you might find shape grammars to be an interesting alternative to l-systems. i have some pieces of an implementation of the cga shape grammar in ocaml i wrote last year that i need to release.
jgjl_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Drup> hum, shape grammar, don't know those ones
mort___ has quit [Quit: Leaving.]
<Drup> it seems included in parametric Lsystems
mengu has joined #ocaml
mengu has joined #ocaml
<tokenrove> there are many, ill-defined forms of shape grammars. i presented one of the cga shape papers at papers we love a few months ago, and there is a collection of some related links here: http://www.cipht.net/2014/11/29/pwl-followup.html (the link to http://peterwonka.net/Publications/publications.html is the most important thing)
Thooms has quit [Ping timeout: 276 seconds]
enitiz has joined #ocaml
Thooms has joined #ocaml
<tokenrove> yep, that's a later one, and in some ways more practical because they simplify some aspects of the grammar and how it's interpreted.
<tokenrove> but there are improvements on those techniques, and there are some aspects of the approach proposed in that paper that are kind of hacky
<Drup> tokenrove: I don't understand the "split rule" part
<tokenrove> see the earlier papers on split grammars, e.g. Instant Architecture from 2003 iirc
<Drup> (for now, I don't see how it's more than Lsystem + well chosen primitives for 3D stuff)
<tokenrove> the ways grammars are intepreted are extremely constrained, and there's this whole matrix-grammar-like LOD stuff. they talk about how it's not an L-system in a couple of the papers.
<tokenrove> their assertion is basically that L-systems are good for generative stuff, like plants, while shape grammars are good for constrained, highly-regular stuff, like buildings.
<Drup> that's how they are used originally, but that's not constrained in the system
avsm has quit [Quit: Leaving.]
malc_ has quit [Quit: leaving]
<tokenrove> apparently the primary difference is that shape grammar rule application is sequential, while L-system rule application is in parallel.
<tokenrove> i should say that the term "shape grammar" is actually pretty ill-defined as there have been many different interpretation rules since the 70s
manu3000 has left #ocaml [#ocaml]
rwmjones_afk is now known as rwmjones
<Drup> by "sequential" you mean "like a CFG" then ?
<Drup> then indeed, it's not a L system at all :p
<Drup> "Therefore,CGA Shapeis a se-quential grammar (similar to Chomsky grammars)."
<Drup> right.
<Drup> so, yes, it's a fancy extension of CFG with special purpose things for 3D volumes, ok
vanila has quit [Quit: Leaving]
manud has joined #ocaml
<Drup> tokenrove: didn't know there was a community working on this kind of grammars, though, it's interesting
<tokenrove> yes, i don't mean to take anything away from L-systems at all, just wanted to point out an interesting and not-so-widely-known family of related techniques
<Drup> yep, it's quite interesting
<tokenrove> i will let you know when i make a first release of my implementation of CGA shape in ocaml.
<Drup> tbh, it's mostly the "grammar-y thingy to do graphical stuff" that I like, so it's equally interesting to me, I just wanted to understand precisely why they needed a new tool :p
<Drup> tokenrove: is it/going to be public ?
mengu has quit [Remote host closed the connection]
Leonidas has quit [Ping timeout: 265 seconds]
Leonidas has joined #ocaml
Nahra``` has quit [Read error: Connection reset by peer]
<tokenrove> Drup: definitely will be open source. it's just stuck under a stack of other hobby projects i'm trying to finish and release this year right now.
<Drup> I know the feeling :D
gperetin has quit [Ping timeout: 272 seconds]
struk|work has quit [Ping timeout: 246 seconds]
gperetin has joined #ocaml
<Drup> tokenrove: I'm curious about the engine
nopf has quit [Ping timeout: 246 seconds]
mort___ has joined #ocaml
vpm has quit [Ping timeout: 264 seconds]
Submarine has quit [Ping timeout: 255 seconds]
waneck has joined #ocaml
ingsoc has quit [Quit: Leaving.]
jgjl has joined #ocaml
nopf has joined #ocaml
vpm has joined #ocaml
Hannibal_Smith has joined #ocaml
ivan\ has quit [Remote host closed the connection]
ivan\ has joined #ocaml
jgjl has quit [Quit: Textual IRC Client: www.textualapp.com]
rand000 has quit [Quit: leaving]
nopf has quit [Ping timeout: 244 seconds]
vpm has quit [Ping timeout: 264 seconds]
bytbox has quit [Remote host closed the connection]
mengu has joined #ocaml
mengu has joined #ocaml
mengu has quit [Changing host]
nopf has joined #ocaml
vpm has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
bugabinga has joined #ocaml
bugabinga has quit [Remote host closed the connection]
jonludlam has joined #ocaml
bugabinga has joined #ocaml
enitiz has quit [Ping timeout: 265 seconds]
mort___ has quit [Quit: Leaving.]
badkins has quit []
MrScout_ has joined #ocaml
enitiz has joined #ocaml
esden has joined #ocaml
MrScout_ has quit [Read error: Connection reset by peer]
MercurialAlchemi has quit [Ping timeout: 264 seconds]
MrScout_ has joined #ocaml
Kakadu has quit [Remote host closed the connection]
struktured has joined #ocaml
MrScout_ has quit [Ping timeout: 265 seconds]
hellofunk has quit [Ping timeout: 246 seconds]
tane has quit [Quit: Verlassend]
claudiuc has joined #ocaml
claudiuc has quit [Remote host closed the connection]
claudiuc has joined #ocaml
lpw25 has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
dsheets has quit [Ping timeout: 245 seconds]
ivan\ has quit [Remote host closed the connection]
dsheets has joined #ocaml
ivan\ has joined #ocaml
ivan\ has quit [Changing host]
ivan\ has joined #ocaml
rks`_ is now known as rks`
mengu has quit []
uris77 has quit [Quit: leaving]
Hannibal_Smith has quit [Quit: Leaving]
enitiz has quit [Ping timeout: 265 seconds]
WraithM has quit [Quit: leaving]
<smondet> hi opam is able to display messages afterinstallation (like https://github.com/ocaml/opam-repository/blob/master/packages/merlin/merlin.2.1.1/opam)
Thooms has quit [Quit: WeeChat 1.0.1]
<smondet> anyone know if it is possible to install a message in case of build error?
<smondet> s/install/display/
jonludlam has quit [Ping timeout: 246 seconds]
araujo has quit [Ping timeout: 252 seconds]
badkins has joined #ocaml
dsheets has quit [Ping timeout: 272 seconds]
oriba has quit [Quit: oriba]