talzeus has quit [Remote host closed the connection]
mfp has quit [Ping timeout: 246 seconds]
csakatoku has joined #ocaml
ygrek_ has joined #ocaml
BitPuffin has quit [Ping timeout: 248 seconds]
csakatok_ has joined #ocaml
csakatoku has quit [Ping timeout: 252 seconds]
csakatok_ has quit [Remote host closed the connection]
csakatoku has joined #ocaml
csakatoku has quit [Remote host closed the connection]
csakatoku has joined #ocaml
talzeus has joined #ocaml
nikki93 has joined #ocaml
skchrko has quit [Quit: Leaving]
The_third_man has quit [Read error: Operation timed out]
The_third_man has joined #ocaml
tristero has joined #ocaml
zpe has joined #ocaml
cricri_ has joined #ocaml
zpe has quit [Ping timeout: 248 seconds]
cricri has quit [Ping timeout: 272 seconds]
manizzle has quit [Read error: Operation timed out]
ygrek_ has quit [Ping timeout: 264 seconds]
cricri has joined #ocaml
cricri_ has quit [Ping timeout: 246 seconds]
boogie has quit [Remote host closed the connection]
cricri_ has joined #ocaml
cricri has quit [Ping timeout: 245 seconds]
yminsky has joined #ocaml
mj has joined #ocaml
mj is now known as mj__
t0yv0 has quit [Ping timeout: 250 seconds]
ygrek_ has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest1067
yminsky has quit [Quit: yminsky]
strobegen has joined #ocaml
Guest1067 has quit [Remote host closed the connection]
csakatoku has quit [Remote host closed the connection]
yminsky has joined #ocaml
csakatoku has joined #ocaml
mildfate has joined #ocaml
<mildfate>
I've just installed tuareg and modified my .emacs file to point to the installation. When I attempt to enable "tuareg" mode via Meta-x utop, I get Symbol's function definition is void: split-string-and-unquote. Could someone hold my hand through this or forward me to hand-holding documentation for tuareg usage?
<Drup>
mildfate: utop ≠ tuareg
<mildfate>
utop is an ocaml toplevel wrapper and tuareg is an emacs extension, right?
<Drup>
mildfate: to enable the tuareg mod, just do M-x "tuareg-mode"
<Drup>
yes
<mildfate>
[No match]
<Drup>
then you didn't install it properly
<mildfate>
but at the bottom of my current buffer I see "Tuareg Abbrev------"
<Drup>
hum, then it's ok
<mildfate>
so I think I'm in tuareg-mode
<Drup>
don't know why you got the "no match message"
<Drup>
"no match" message*
<mildfate>
I just don't know how to use it (the no match message was because I type with quotes)
<Drup>
mildfate: tuareg is (mainly) a mode to edit ocaml files
csakatoku has quit [Ping timeout: 272 seconds]
<mildfate>
and then evaluate them while writing?
<Drup>
you can use it to run some stuff in a top level integrated with emacs, but that's not the main point.
<mildfate>
ok
<mildfate>
what's the main point?
<Drup>
well, editing ocaml code ! x)
mcclurmc has quit [Remote host closed the connection]
<Drup>
coloration, indentation, some useful tool in relation to compiler stuff, access to documentation, all that
<mildfate>
ok, I get that, I just don't know how to make it work. The most I've found is this tuareg-mode cheat sheet http://www.ocamlpro.com/files/tuareg-mode.pdf and even though I attempt to use the commands (like C-x C-e) it doesn't work.
Simn has quit [Read error: Connection reset by peer]
manizzle has joined #ocaml
manizzle has quit [Max SendQ exceeded]
manizzle has joined #ocaml
Xenasis has quit [Remote host closed the connection]
yezariaely has joined #ocaml
manizzle has quit [Ping timeout: 246 seconds]
nikki93 has quit [Remote host closed the connection]
ggole has quit []
manizzle has joined #ocaml
chambart has quit [Ping timeout: 252 seconds]
cricri has joined #ocaml
cricri__ has quit [Ping timeout: 240 seconds]
cesar_ has joined #ocaml
cesar_ is now known as Guest73
Guest73 has quit [Ping timeout: 252 seconds]
kyrylo has joined #ocaml
dsheets_ has joined #ocaml
cricri_ has joined #ocaml
ollehar has joined #ocaml
Neros has quit [Ping timeout: 252 seconds]
bjorkintosh has joined #ocaml
cricri has quit [Ping timeout: 272 seconds]
manud_ has joined #ocaml
_5kg has quit [Ping timeout: 241 seconds]
nikki93 has joined #ocaml
_5kg has joined #ocaml
chambart has joined #ocaml
_andre has quit [Quit: leaving]
jonludlam has joined #ocaml
zzz_` has joined #ocaml
zzz_ has quit [Remote host closed the connection]
BitPuffin has joined #ocaml
baz_ has joined #ocaml
pkrnj has joined #ocaml
cricri has joined #ocaml
cricri_ has quit [Ping timeout: 265 seconds]
kyrylo has quit [Quit: WeeChat 0.4.2]
tulloch has joined #ocaml
nikki93 has quit [Remote host closed the connection]
gour has quit [Quit: WeeChat 0.4.2]
rand000 has quit [Quit: leaving]
tulloch_ has joined #ocaml
rand000 has joined #ocaml
tulloch has quit [Ping timeout: 246 seconds]
rand000 has quit [Client Quit]
baz_ has quit [Remote host closed the connection]
tulloch has joined #ocaml
_van has joined #ocaml
_van has quit [Client Quit]
_van has joined #ocaml
tulloch_ has quit [Ping timeout: 245 seconds]
_van has quit [Client Quit]
nikki93 has joined #ocaml
nikki93 has quit [Remote host closed the connection]
_van has joined #ocaml
_van has quit [Client Quit]
cesar_ has joined #ocaml
_van has joined #ocaml
cesar_ is now known as Guest17296
Kakadu has quit []
Guest17296 has quit [Ping timeout: 265 seconds]
avsm has joined #ocaml
AltGr has left #ocaml []
_van has quit [Ping timeout: 245 seconds]
yminsky has joined #ocaml
darkf has joined #ocaml
kyrylo has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
yminsky has quit [Quit: yminsky]
nikki93 has joined #ocaml
ulfdoz has quit [Ping timeout: 272 seconds]
WraithM_ has joined #ocaml
w0rm_x has quit [Ping timeout: 248 seconds]
w0rm_x has joined #ocaml
strobegen has quit [Quit: Leaving.]
mcclurmc has joined #ocaml
yezariaely has quit [Quit: Leaving.]
CissWit has quit [Read error: Connection reset by peer]
bacam has quit [Ping timeout: 248 seconds]
w0rm_x has left #ocaml []
bacam has joined #ocaml
Xenasis has joined #ocaml
chambart has quit [Ping timeout: 252 seconds]
avsm has quit [Quit: Leaving.]
cricri has quit [Ping timeout: 248 seconds]
cricri has joined #ocaml
everyonemines has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest31155
tane has quit [Quit: Verlassend]
nikki93 has quit [Remote host closed the connection]
Guest31155 has quit [Ping timeout: 245 seconds]
bacam has quit [Ping timeout: 246 seconds]
_van has joined #ocaml
bacam has joined #ocaml
_van` has joined #ocaml
_van has quit [Ping timeout: 272 seconds]
WraithM_ has quit [Ping timeout: 245 seconds]
adrien_o1w has joined #ocaml
adrien_oww has quit [Ping timeout: 246 seconds]
ollehar has quit [Ping timeout: 240 seconds]
tulloch has quit [Ping timeout: 264 seconds]
tulloch has joined #ocaml
Neros has joined #ocaml
_van` has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
bji has joined #ocaml
<bji>
hello, ocaml n00b here
<bji>
trying to understand a wall of source code that is staring me in the face
<bji>
if I have something like this
<bji>
let rename_local_vars com e =
<bji>
what is the stratey for figuring out what a 'com' or an 'e' is?
<bji>
I cannot find any kind of type declarations that give me any insight into the type or purpose of this these arguments
<bji>
and I cannot figure out how I could possibly know
<bji>
I search through the code for invocations of 'rename_local_vars' but no type declarations in there either
<Drup>
you aren't going to find type declarations =)
<bji>
I am led on a wild goose chase hunting this thing down and never finding where it is defined or described, only endless layers of calls that never give any clue
<bji>
so how in the world am I ever to get any clue about what it is
<Drup>
it depends
<Drup>
you don't now any ocaml ?
<Drup>
know*
<bji>
do I have to read and understand the entirety of an OCaML program in order to be able to understand even a small part of it?
<bji>
not really
<Drup>
well, there is several solution
<bji>
but I find that most programming languages can at least express their intent to the uninformed, but experienced, reader
<bji>
ocaml is the first one I've run up against where that doesn't seem to be true ..
<Drup>
1) it's documented
<Drup>
bji: it's completly true
<Drup>
but you are not experienced
<Drup>
(in ocaml, at least)
<bji>
I meant experienced in programming languages in general
<bji>
anyway
<Drup>
that doesn't mean anything
<bji>
it does for 99% of languages
<bji>
anyway
<bji>
not here to berate ocaml
<bji>
I just want to understand what approach I should take to understand this code
<Drup>
you can use several tools to help you
kyrylo has quit [Quit: WeeChat 0.4.2]
<Drup>
I will advice you to install merlin first
<bji>
I want to understand how someone who is experienced in ocaml would reason about the 'type' if there is such a thing of an argument
<bji>
also this is the haxe compiler source code, so there is basically no comments
<technomancy>
bji: just type rename_local_vars into the toplevel
<bji>
I am not typing anything, read only buffer here
<technomancy>
that's not a good way to read code
<bji>
how can I tell what a thing is and what I can do with it, when it appears as a function 'argument'?
<Drup>
bji: may I ask why you are trying to understand a code in a langage you have no clue how it's working ?
<technomancy>
bji: by examining the signature
<bji>
because I have to fix an issue?
<bji>
ah - where do I find the signature?
<Drup>
ok
<Drup>
bji: it's infered by the compiler
<technomancy>
bji: by typing it into the top-level after it's been compiled
<bji>
it seems like a fairly simple thing to fix - a local variable is getting a name that I don't like for complex reasons - and this code generates that name
kyrylo has joined #ocaml
<bji>
sorry so I asked, how do I examine a signature?
<bji>
that is the only way?
<bji>
there is no source code I can read that will clue me in?
<technomancy>
you can also get the compiler to spit out a .mli file
<Drup>
sure there is a source code, you have it already
<bji>
I have one of those
<Drup>
oh, you are looking at a .mli
<bji>
Drup: I was replying to the suggestion that I run a compiler command to inspect the type
<technomancy>
but the whole point of inference is so you don't have to spoon-feed the compiler with types
<bji>
no I'm not looking at the mli, but I believe I have one
<Drup>
bji: then go lookt at it
<bji>
one man's spoon-feed is another man's self documenting code :)
<Drup>
there is no such thing as "self-documenting code"
<bji>
there's no such thing as spoon-feeding a compiler either ...
<bji>
anyway, I don't seem to have an mli, I have a cmi but it is binary
<Drup>
bji: can you point me to the code ?
<bji>
Sure, it's filters.ml in the haxe compiler source code
<bji>
my goal is to find some piece of context that I can apply in lines 684 and 687
<bji>
I can tell, even though Id on't know ocaml, that this code is looping, trying to find a generated variable name that doesn't conflict with any of the other generated variable names it has generated
<bji>
I want it to include some piece of context in the name that it chooses that is 'local' to this scope
<bji>
i.e. the scope of the Haxe function for which it is generating the variable
<bji>
But I cannot tell how to extract the context of what it is doing from the com and e arguments to this function
<bji>
The reason for all of this is that Haxe generates local variables that have names that are allocated from a global pool, so one function may get a variable _g10 and another function will get _g11 and _g12, etc
<bji>
But I want the names to be unique-ified within the function in which the local variable being generated is located
<Drup>
give me a sec, fetching sutff
<bji>
Because otherwise, different compilation of the same file including fewer or more other files may get different variable names, as they are all allocated from a global context that changes depending upon the set of files being compiled
<bji>
OK I'll give a sec
<bji>
thank you for your help
<Drup>
in the meantime, install merlin for you favorite editor
<bji>
OK merlin.el on the way
mcclurmc has quit [Remote host closed the connection]