<pippijn>
companion_cube: I can't use implicits :(
<pippijn>
they are in 4.02.0, and I need .1
reem has quit [Remote host closed the connection]
reem has joined #ocaml
<whitequark>
rebase
milosn has quit [Ping timeout: 264 seconds]
rgrinberg has joined #ocaml
claudiuc has quit [Remote host closed the connection]
struktured has joined #ocaml
milosn has joined #ocaml
thomasga has joined #ocaml
Pepe__ is now known as Pepe_
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
jave has quit [Ping timeout: 264 seconds]
darkf has joined #ocaml
jave has joined #ocaml
waneck_ has quit [Read error: No route to host]
rgrinberg has quit [Quit: Leaving.]
thomasga has quit [Quit: Leaving.]
reem has quit [Remote host closed the connection]
rgrinberg has joined #ocaml
AlexRussia has joined #ocaml
chinglish has joined #ocaml
chouser has quit [Ping timeout: 240 seconds]
Guest17984 is now known as kandu
ygrek has quit [Ping timeout: 265 seconds]
chouser has joined #ocaml
jabesed has quit [Ping timeout: 256 seconds]
bytbox has joined #ocaml
lordkryss has quit [Quit: Connection closed for inactivity]
bytbox has quit [Remote host closed the connection]
hellome has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
badkins has quit []
manizzle has quit [Ping timeout: 265 seconds]
ygrek has joined #ocaml
tropico has joined #ocaml
<tropico>
Error: No implementations provided for the following modules: Big_int referenced from int64_overflow.cmx
<tropico>
how can this be true? Big_int is in the standard lib
<whitequark>
-package num
<tropico>
oh, wow i can't believe i missed that. thank you!
anger-issues is now known as pyon
tropico has quit [Quit: Leaving...]
antkong has joined #ocaml
enitiz has quit [Ping timeout: 264 seconds]
zwer has quit [Ping timeout: 250 seconds]
zwer_n has joined #ocaml
antkong has quit [Ping timeout: 264 seconds]
kapil__ has joined #ocaml
nullcat has joined #ocaml
<nullcat>
Hi guys. I want to build a instrumentation table to provide detailed trace of a function. The example is here: https://gist.github.com/anonymous/d62f9686fd74c07dc854 The input function is pretty simple and straight forward because they are used for online practicing website of a class. I guess maybe I can use ppx to do some macro to collect info but I am not sure. Does anyone have some suggestion? Thanks
ygrek has quit [Ping timeout: 276 seconds]
<whitequark>
yep ppx would work
<nullcat>
I have a vague idea which is: first put the target function in a function which maintains an instrumentation table used to collect info, then I modify the function to insert code to get the value i want to record and put it into the table.
<nullcat>
but where to insert the code is a problem and I am not good at ppx so I am still confused
<whitequark>
try to write this without ppx at first
<nullcat>
i see what you meant. I guess I can first choose an simple function, print its ast. and write the inserted code and examine its ast. Then, i can have a basic idea about where I should and how I can do the macro?
<whitequark>
yes
<nullcat>
and I guess that's basically how we first want to do before starting to write ppx?
<whitequark>
yes
chouser has quit [Ping timeout: 265 seconds]
zwer_n is now known as zwer
rgrinberg has quit [Quit: Leaving.]
burgobianco has quit [Excess Flood]
burgobianco has joined #ocaml
dlat has quit [Ping timeout: 272 seconds]
pyon has quit [Read error: Connection reset by peer]
rgrinberg has joined #ocaml
Stany has quit [Read error: No route to host]
MotorMe has joined #ocaml
MotorMe has quit [Remote host closed the connection]
<nullcat>
whitequark but it seems that I cannot know the type of an identifier from parsetree
pyon has joined #ocaml
<nullcat>
but i am not sure if that matters
chinglish has quit [Quit: Nettalk6 - www.ntalk.de]
<whitequark>
yes you can't
<whitequark>
... it's a bit complicated
Tamae has joined #ocaml
<whitequark>
you need to run the typechecker and then extract the information back
<nullcat>
how can i get a typed ast?
<nullcat>
or how can i run typecheker and extract the info back?
<whitequark>
look into ocaml sources :]
<nullcat>
what do you mean...?
<whitequark>
exactly what i said
<whitequark>
look into ocaml sources and see how ocamlc invokes the typechecker
<whitequark>
or toplevel, maybe, would be simpler
<nullcat>
i see. and there is no available tools to simply do that right?
<whitequark>
toploop.ml:248
<whitequark>
it's already simple enough
<whitequark>
then, after you get back typedtree, you can map it using TypedtreeMap
<whitequark>
and get back to Parsetree using Untypeast
<nullcat>
thank you quark-san. gonna study on it
<whitequark>
though now that I look closely at it, you might be better off copying the contents of TypedtreeIter and modifying that
<whitequark>
the source of
<whitequark>
TypedtreeMap and *Iter don't really map very well to what you want to do
<camlspotter>
default branch constains ppx directory which implements ppx with type-checker
rgrinberg has quit [Quit: Leaving.]
yaewa has joined #ocaml
AlexRussia has quit [Ping timeout: 240 seconds]
<camlspotter>
But I think ppx is not a good approach to what you want to do...
moei has quit [Ping timeout: 264 seconds]
<rks`>
is it ever?
ebzzry has quit [Remote host closed the connection]
<camlspotter>
It seems to me that loading compiled cmt files to get typed ast is simpler
AlexRussia has joined #ocaml
dsheets has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
thorsten` has quit [Ping timeout: 246 seconds]
Kakadu has joined #ocaml
thorsten` has joined #ocaml
stomp has quit [Ping timeout: 264 seconds]
thorsten` has quit [Ping timeout: 264 seconds]
oriba has joined #ocaml
vanila has joined #ocaml
davine has joined #ocaml
stomp has joined #ocaml
thorsten` has joined #ocaml
axiles has quit [Remote host closed the connection]
huza has joined #ocaml
avsm has quit [Quit: Leaving.]
asmanur_ has quit [Quit: quit]
asmanur has joined #ocaml
enitiz has joined #ocaml
antegallya has joined #ocaml
araujo has quit [Ping timeout: 246 seconds]
rand000 has joined #ocaml
araujo has joined #ocaml
araujo has quit [Changing host]
araujo has joined #ocaml
oscar_toro has joined #ocaml
oriba has quit [Quit: oriba]
huza has quit [Quit: WeeChat 0.3.8]
camlspotter has quit [Remote host closed the connection]
yminsky has joined #ocaml
milosn has quit [Ping timeout: 276 seconds]
enitiz has quit [Remote host closed the connection]
enitiz has joined #ocaml
enitiz has quit [Read error: Connection reset by peer]
reem has quit [Remote host closed the connection]
enitiz has joined #ocaml
antegallya has quit [Quit: Leaving.]
antegallya has joined #ocaml
yaewa has quit [Quit: Leaving...]
moei has joined #ocaml
<MercurialAlchemi>
whitequark: that's what I have...
<MercurialAlchemi>
I've switched to finalize for now
badkins has joined #ocaml
bytbox has joined #ocaml
BitPuffin has joined #ocaml
keen__________49 has quit [Read error: Connection reset by peer]
keen__________50 has joined #ocaml
milosn has joined #ocaml
jabesed has joined #ocaml
yminsky has quit [Quit: yminsky]
davine has quit [Ping timeout: 245 seconds]
rand000 has quit [Quit: leaving]
tanguy` has quit [Ping timeout: 255 seconds]
yminsky has joined #ocaml
_5kg has quit [Ping timeout: 256 seconds]
_5kg has joined #ocaml
jabesed has quit [Ping timeout: 264 seconds]
yminsky has quit [Quit: yminsky]
yminsky has joined #ocaml
milosn has quit [Ping timeout: 265 seconds]
yminsky has quit [Client Quit]
ygrek has joined #ocaml
Quintasan has joined #ocaml
<Quintasan>
Hi, am I correct in understanding that given 'let rec f2 g h = g h' calling 'f2((<)2) ((>)0)' will not work because g is expecting an int and is receiving h as an argument?
<Quintasan>
which is in fact another function
etehtsea has quit [Ping timeout: 264 seconds]
mal`` has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<whitequark>
yeah
<whitequark>
look at the type of f2.
testcocoon has quit [Quit: Coyote finally caught me]
darkf has quit [Quit: Leaving]
testcocoon has joined #ocaml
mal`` has joined #ocaml
chaptastic has joined #ocaml
tanguy` has joined #ocaml
Anarchos has joined #ocaml
axiles has joined #ocaml
thomasga has joined #ocaml
jao has quit [Ping timeout: 246 seconds]
milosn has joined #ocaml
mal`` has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
antegallya has quit [Ping timeout: 264 seconds]
jabesed has joined #ocaml
mal`` has joined #ocaml
bytbox has quit [Ping timeout: 264 seconds]
tanguy` has quit [Ping timeout: 264 seconds]
ggole has joined #ocaml
chinglish has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
mal`` has quit [Ping timeout: 252 seconds]
antkong has joined #ocaml
thomasga has quit [Quit: Leaving.]
bytbox has joined #ocaml
kapil__ has quit [Quit: Connection closed for inactivity]
ente has quit [Quit: upgrade, see you tomorrow]
rgrinberg has joined #ocaml
waneck has joined #ocaml
lordkryss has quit [Quit: Connection closed for inactivity]
mcclurmc_ has joined #ocaml
mcclurmc has quit [Ping timeout: 272 seconds]
rgrinberg has quit [Quit: Leaving.]
struktured has quit [Ping timeout: 265 seconds]
camlspotter has joined #ocaml
rgrinberg has joined #ocaml
ygrek has quit [Ping timeout: 255 seconds]
mort___ has joined #ocaml
antegallya has joined #ocaml
yminsky has joined #ocaml
yminsky has quit [Client Quit]
mort___ has quit [Ping timeout: 272 seconds]
camlspotter has quit [Ping timeout: 245 seconds]
mal`` has joined #ocaml
UberLambda has joined #ocaml
<UberLambda>
Anyone using LLVM here? I'm trying to compile the Kaleidoscope tutorial but it seems outdated
hellofunk has quit [Ping timeout: 276 seconds]
rgrinberg has quit [Quit: Leaving.]
waneck_ has joined #ocaml
waneck has quit [Ping timeout: 264 seconds]
antkong has quit [Ping timeout: 276 seconds]
Submarine has joined #ocaml
Submarine has joined #ocaml
antegallya has quit [Ping timeout: 244 seconds]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
lordkryss has joined #ocaml
<whitequark>
*sigh*
<whitequark>
yes, yes it is
* whitequark
pokes Drup
<UberLambda>
ugh
<Drup>
whitequark: pokes back about whitequark reading and completing the new version
<aubergines>
nop, it tells you how to extract comments from the code
<aubergines>
but I found a workaround
<aubergines>
calling a function called COMMENT("text") whenever I want to insert one
<aubergines>
ugly but effective
oriba has joined #ocaml
Haudegen has quit [Ping timeout: 276 seconds]
Haudegen has joined #ocaml
ggole has quit []
iago has quit [Ping timeout: 276 seconds]
mcclurmc has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
mcclurmc_ has quit [Ping timeout: 245 seconds]
chinglish has quit [Ping timeout: 264 seconds]
chinglish has joined #ocaml
MisaMisa has joined #ocaml
skinkitten has quit [Ping timeout: 240 seconds]
rgrinberg has joined #ocaml
chaptastic has quit []
skinkitten has joined #ocaml
sinelaw has quit [Ping timeout: 264 seconds]
sinelaw has joined #ocaml
nullcat has joined #ocaml
<nullcat>
whitequark do you know where i can find some example about using TypedTreeMap?
rgrinberg has quit [Quit: Leaving.]
<whitequark>
look at the source.
<nullcat>
thanks...
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chinglish has quit [Quit: Nettalk6 - www.ntalk.de]
MisaMisa has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
iago has joined #ocaml
MisaMisa has joined #ocaml
skinkitten has quit [Ping timeout: 265 seconds]
iago has quit [Ping timeout: 255 seconds]
sgoblin has joined #ocaml
tanguy` has joined #ocaml
<sgoblin>
Why does opam not put ocamlfind on the path (using ubuntu utopic in docker)?
slash^ has quit [Read error: Connection reset by peer]
goraci has joined #ocaml
<goraci>
hi there - let x = 1 in let y = x+1 -> syntax error so how to assign result of expression to var ?
skinkitten has joined #ocaml
<aubergines>
goraci: ... in let y = x+1 in y?
<goraci>
)) sounds reasonable
<goraci>
foo unbound
<goraci>
ups y unbound
<aubergines>
let x = exp1 in exp2 -> x is only bounded inside exp2, what are you trying to do?
<bernardofpc>
goraci: a let extression must have an "in" after
<bernardofpc>
if you have two lets, that's two expressions, you need two "in"s
<goraci>
ok
<goraci>
let ab =
<goraci>
let a = 'a'
<goraci>
let b = 'B' in Char.lowercase b
<goraci>
in a ::[b]
<goraci>
trying this example
<flux>
goraci, let has two forms. there is the top-level form: let a = b. that is a definition of a, not an expression. then there is the expression form: let a = b in c, which is probably what you want to use here
<goraci>
and suddenly stuck (
<flux>
there you are usign let a = b -form in the second line
<bernardofpc>
the first "let a = 'a'" does not have an in after
<flux>
but it is not a top-level statement but inside an expression
<flux>
so you must write it: let ab = let a = 'a' in let b = 'B' in ..
<goraci>
ah
<bernardofpc>
(yeah, top-level let is a hack, it could have had another keyword for that )
<flux>
and then it depends on if 'let ab' is a top-level statement or not
<goraci>
what is top-level
jabesed has quit [Ping timeout: 272 seconds]
<bernardofpc>
hum
<bernardofpc>
"global variable"
<flux>
when you start ocaml 'shell', you are in the top-level
<goraci>
ah ok
<flux>
or at the top of the program, that's top-level
<flux>
but when you are inside an expression, it's not top-level
<goraci>
local variable or something ok
<flux>
or as bernardofpc suggests: when it makes sense to define 'global' variables, you are at top-level
<goraci>
top-level let -> var ))?
<flux>
I don't get that..
<flux>
but let's think of an example. let's say you want to define a new function in your program. that's top-level.
<flux>
but you cannot create another new globally named function while defining that function
<goraci>
(yeah, top-level let is a hack, it could have had another keyword for that )
<flux>
because you cannot have such top-level definitions inside expressions, and functions are expressions
<goraci>
keyword - var )
jabesed has joined #ocaml
<goraci>
ok i get it
<flux>
yeah I suppose it could be called 'var', or I think a more preferable name would be 'val'
<goraci>
need some practice of course
<goraci>
ocaml can redefine itself ?
<goraci>
so it can redefined then
<goraci>
can be*
<flux>
well, there are syntax extensions, or preprocessors, that can technically achieve that
<flux>
and then new versions of ocaml could introduce that
<flux>
but I think in the grand scheme of things people don't think it's worth the trouble of breaking compatibility
<flux>
you learn it once and then you know it :-)
<goraci>
yea only source of confusion for novices )
<flux>
in any case, good luck with your ventures :-)
sinelaw has quit [Ping timeout: 244 seconds]
<goraci>
# let ac =
oscar_toro has quit [Remote host closed the connection]
<goraci>
# let a='a' in
<goraci>
# let c='C' in Char.lowercase c
<goraci>
File "", line 4, characters 9-10:
<goraci>
# in a::[c];;
<goraci>
Error: Unbound value c
enitiz has joined #ocaml
<goraci>
that's crazy )
<goraci>
flux : still an error )
<flux>
your code is better parsed as: let ac = (let a = 'a' in (let c = 'c' in (Char.lowercase c))) in (a::[c])
<flux>
so maybe you can see why 'c' is not defined on line 4
<flux>
so in the fourth line you only have binding 'ac' available, and its value is the lowercase letter c
<goraci>
ok need some () then
<flux>
well, no
<flux>
or you can try, but you will find that they will do no good :-)
<flux>
btw, a paste site would be better for pasting multi-line fragments of code, such as bpaste.net or pastebin.com
<goraci>
well it's some convulted example i guess
<goraci>
no one uses that kind of nested structs ?
<flux>
everybody uses them :)
<flux>
what do you think the third line with let c=.. does?
<goraci>
it bounds c in .... expression
<flux>
ok, so after that line, c has the value of..?
<goraci>
it's local to expr
<goraci>
so it's unbound
<flux>
well, it's unbound after the 'in' word in the next line
<flux>
but what I was getting at that it first binds value 'C' to c
<flux>
then it evaluates Char.lowercase c, that produces the value 'c'
<flux>
and that's the whole expression. "let c = 'C' in Char.lowercase c" will have the value 'c'
<goraci>
so we have to wrap it
<goraci>
?
<flux>
what do you hope the Char.lowercase c to achieve? where should the value go to?
<goraci>
i don't know actually
<goraci>
so i tried at first to bound the result of expr to something
<flux>
but I'll be getting some sleep at this point
<flux>
good luck :)
<goraci>
ok thanks
Submarine has quit [Remote host closed the connection]
UberLambda has quit [Quit: Leaving the Matrix]
rgrinberg has joined #ocaml
pyon has quit [Ping timeout: 245 seconds]
hilquias` has joined #ocaml
oscar_toro has joined #ocaml
hilquias has quit [Ping timeout: 276 seconds]
Tekk_ has quit [Ping timeout: 264 seconds]
pyon has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MisaMisa has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mort___ has joined #ocaml
struktured has joined #ocaml
tanguy` has quit [Ping timeout: 245 seconds]
Tekk_ has joined #ocaml
struktured has quit [Ping timeout: 244 seconds]
chouser has joined #ocaml
natrium1970 has joined #ocaml
antkong has joined #ocaml
mort___ has quit [Quit: Leaving.]
<natrium1970>
whitequark: I have a question for you. (Someone else could answer, but it’s about some things you talked about in this channel a while back.)
<whitequark>
yeah?
<natrium1970>
It’s about using the LLVM backend for code generations for OCaml. It looks like you went back and forth on the the prospect of making it work. Sorry if I’m mis-stating anything. I’m assembling this from old logs. What is the current status and your assessment about this?
<whitequark>
it's possible, but not profitable right now
<whitequark>
philip reames' work on gc has a chance of making it profitable in the future
<whitequark>
regardless, i got bored and am not interested in that project anymore
<natrium1970>
Sorry if my question sounded overly direct, but you seemed the logical person to ask about it.
<whitequark>
sure
<natrium1970>
The current code generator seems to do pretty well, but sometimes I wish there were an easy way to compile OCaml to assembly, tweak the assembly code, and re-assembler it. On OS X, it’s not entirely clear what incantation to use to re-assemble it.
<whitequark>
ocamlopt -v
<whitequark>
or rather -verbose
<whitequark>
then do the same
antkong has quit [Ping timeout: 272 seconds]
aubergines has quit [Ping timeout: 276 seconds]
MercurialAlchemi has quit [Ping timeout: 244 seconds]
<natrium1970>
I got that: http://pastebin.com/Q7MuNLHN. I’m guessing that the file /var/…/camlasme66855.s is the assembly language version of my .ml file. In the second file, though, I’m not sure where /var/…/camlstartup5c6456.s comes from.
goraci has quit [Quit: Leaving]
malc_ has joined #ocaml
sgoblin has left #ocaml [#ocaml]
reem has joined #ocaml
oriba has quit [Quit: oriba]
<imslavko>
does anyone use typerex? Is it alive? I can't find any sources anywhere, it is like it was wiped from earth's face
MisaMisa has joined #ocaml
fds has quit [Ping timeout: 264 seconds]
fds has joined #ocaml
companion_square has joined #ocaml
companion_cube has quit [Ping timeout: 264 seconds]
<Tekk_>
imslavko: if it's wiped from the face of the earth then it's probably dead :)
<imslavko>
Tekk_ that was what I thought, although I wanted to check with #ocaml :)
<imslavko>
what do people use for dev environment?
Quintasan has quit [Ping timeout: 264 seconds]
<imslavko>
I looked at typerex screenshots, it looked so cool. I have no idea how to setup my emacs to have all these completions and features
Quintasan has joined #ocaml
Quintasan has joined #ocaml
<Drup>
imslavko: whatever editor you want + merlin + ocp-indent
<imslavko>
Drup: I have merlin in my emacs, but the statusbar says it is DEAD
<imslavko>
so I suspect something is wrong, as I don't see any compeletion, nor type checking on save :)
tane has quit [Quit: Verlassend]
<Drup>
indeed, it's probably not doing its work
badkins has quit [Remote host closed the connection]
badkins has joined #ocaml
<Drup>
whitequark: about the LLVM tutorial, I told you several time that I did a first version but 1) the backend is broken and I don't know the code emission interface of LLVM as well as you do 2) I couldn't get it to be build by llvm's build system.
<Drup>
and it needs review
<Drup>
and I stopped working on it since I asked you that, since I want a working thing before even trying to write a sensible tutorial