<Drakken>
The compiler seems to be monomorphizing a polymorphic function arg based on the type of another function arg, but the second arg is optional and I want to pass a function with a different type for the optional arg.
<Drakken>
The problem is that the type checker already locked the first function into a specific type based on the default value of the second arg.
<_habnabit>
Drakken, right. that's not something that can be generalized
<_habnabit>
Drakken, where's your function?
<Drakken>
it's a sort function. I'm trying to allow an optional key argument that defaults identity.
<Drakken>
*to* identity.
<_habnabit>
yeah, you can't generalize that
<Drakken>
oh drat!
Tobu has quit [Ping timeout: 260 seconds]
pr_ has quit [Read error: Connection reset by peer]
pr has joined #ocaml
otk has joined #ocaml
cdidd has joined #ocaml
otk_ has quit [Ping timeout: 252 seconds]
Tobu has joined #ocaml
ulfdoz has joined #ocaml
cyphase has quit [Ping timeout: 260 seconds]
bobry has quit [Ping timeout: 240 seconds]
pr has quit [Ping timeout: 240 seconds]
joewilliams has quit [Ping timeout: 252 seconds]
lopex has quit [Ping timeout: 276 seconds]
Schadenfreude has quit [Ping timeout: 244 seconds]
pr has joined #ocaml
Schadenfreude has joined #ocaml
lopex has joined #ocaml
everyonemines has joined #ocaml
joewilliams has joined #ocaml
bobry has joined #ocaml
ulfdoz has quit [Ping timeout: 260 seconds]
everyonemines has quit [Quit: Leaving.]
EmmanuelOga has quit [Ping timeout: 244 seconds]
<dsheets1>
Is there an easy way to determine which primitives are used by which modules?
pango is now known as pangoafk
NihilistDandy has joined #ocaml
Submarine has joined #ocaml
twittard has quit [Remote host closed the connection]
twittard has joined #ocaml
cyphase has joined #ocaml
drewbert has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
<drewbert>
Hi, I'm trying to do some basing file parsing with yojson, but I don't get as far as the library. I'm new to ocaml. I open a file with let inc = open_in "filename" in print_string (input_line inc); but I keep getting "input_value: bad object"
<drewbert>
The file exists and I have permissions to read it.
<_habnabit>
wow, that's a new one on me
<_habnabit>
what's your exact code, and how are you running it
<drewbert>
_habnabit: I'm playing around with the CLI and things are working as expected, it must be something to do with the project at large
<drewbert>
I'm so bad at this. =(
cago has joined #ocaml
<_habnabit>
well, where's your code
Drup has joined #ocaml
<drewbert>
I got it, it's the use of input_value. I guess I need to use some other function to read the contents of the file. Instructor misled me -_-
ocp has joined #ocaml
mcclurmc has quit [Excess Flood]
mcclurmc has joined #ocaml
thomasga has joined #ocaml
Submarine has quit [Ping timeout: 276 seconds]
Kakadu has joined #ocaml
djcoin has joined #ocaml
MaskRay has quit [Ping timeout: 276 seconds]
MaskRay_ has joined #ocaml
edwin has joined #ocaml
ikaros has joined #ocaml
<adrien>
drewbert: input_value is precisely what you're trying to avoid by using yojson =)
<adrien>
(since it's actually the binary and type-unsafe serialization code from Marshal)
<drewbert>
adrien: Good insight. Thank you.
<djcoin>
Does anyone really think ocaml can make himself a relevant programming language for the web ? (server side and client side javascript generation ?)
<djcoin>
Trolling is not my goal. But I'm really wondering what could beat out Node.js in fact :/
<djcoin>
(+ you dont need such raw speed on server side as you will rarely do heavy computation)
<NihilistDandy>
Does anyone think that programming for the web qualifies as relevant?~
Cyanure has joined #ocaml
ftrvxmtrx has joined #ocaml
<NihilistDandy>
On a less sarcastic note, it's not especially appropriate to compare a general-purpose programming language and an abstraction specifically designed for certain classes of web application and say "well, look, this one's better"
<djcoin>
NihilistDandy: I totally agree. But Web is a big piece of the cake. And seeing project as ocsigen and js_of_ocaml, makes me wonder
<adrien>
something like ocsigen and cduce have managed to specialize quite well for web stuff
<NihilistDandy>
Ultimately the worth of a code generator comes down to how clever and adaptable it is. I'm not a long-time OCaml user (Haskell 4 lyfe), but pretty solid functional foundations and the option of OOP makes it an intriguing platform
<NihilistDandy>
*make
<NihilistDandy>
But really there's only so much you can generalize something like that before it's just an isomorphic DSL :D
drewbert has quit [Quit: Leaving.]
zzz_ has quit [Read error: Operation timed out]
zzz_ has joined #ocaml
_andre has joined #ocaml
ikaros has quit [Quit: Ex-Chat]
eikke has joined #ocaml
RonnieDk has joined #ocaml
emmanuelux has joined #ocaml
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
roha has joined #ocaml
RonnieDk has quit [Remote host closed the connection]
avsm has joined #ocaml
iago has joined #ocaml
roha has quit [Ping timeout: 252 seconds]
eikke has quit [*.net *.split]
willb has quit [*.net *.split]
Drakken has quit [*.net *.split]
thizanne has quit [*.net *.split]
dsheets1 has quit [*.net *.split]
sgnb` has quit [*.net *.split]
ski has quit [*.net *.split]
wagle has quit [*.net *.split]
rby has quit [*.net *.split]
rwmjones has quit [*.net *.split]
ppilatus has quit [*.net *.split]
TaXules has quit [*.net *.split]
tomprince has quit [*.net *.split]
wut__ has quit [*.net *.split]
haelix_ has quit [*.net *.split]
snarkyboojum has quit [*.net *.split]
zzz_ has quit [*.net *.split]
Drup has quit [*.net *.split]
cyphase has quit [*.net *.split]
twittard has quit [*.net *.split]
bobry has quit [*.net *.split]
lopex has quit [*.net *.split]
Obfuscate has quit [*.net *.split]
chambart has quit [*.net *.split]
brendan has quit [*.net *.split]
r126f has quit [*.net *.split]
pheredhel has quit [*.net *.split]
deavid has quit [*.net *.split]
braibant has quit [*.net *.split]
hsuh has quit [*.net *.split]
Nass has quit [*.net *.split]
hcarty has quit [*.net *.split]
Cyanure has quit [*.net *.split]
cago has quit [*.net *.split]
pr has quit [*.net *.split]
svenl has quit [*.net *.split]
simbhar has quit [*.net *.split]
testcocoon has quit [*.net *.split]
yroeht has quit [*.net *.split]
Kakadu has quit [*.net *.split]
avsm has quit [*.net *.split]
thomasga has quit [*.net *.split]
ocp has quit [*.net *.split]
hnrgrgr has quit [*.net *.split]
avsm has joined #ocaml
eikke has joined #ocaml
zzz_ has joined #ocaml
Cyanure has joined #ocaml
Kakadu has joined #ocaml
thomasga has joined #ocaml
ocp has joined #ocaml
Drup has joined #ocaml
cago has joined #ocaml
cyphase has joined #ocaml
twittard has joined #ocaml
bobry has joined #ocaml
lopex has joined #ocaml
pr has joined #ocaml
dsheets1 has joined #ocaml
Obfuscate has joined #ocaml
sgnb` has joined #ocaml
chambart has joined #ocaml
willb has joined #ocaml
ski has joined #ocaml
svenl has joined #ocaml
brendan has joined #ocaml
simbhar has joined #ocaml
Drakken has joined #ocaml
r126f has joined #ocaml
thizanne has joined #ocaml
pheredhel has joined #ocaml
wagle has joined #ocaml
rby has joined #ocaml
deavid has joined #ocaml
rwmjones has joined #ocaml
ppilatus has joined #ocaml
TaXules has joined #ocaml
hnrgrgr has joined #ocaml
hsuh has joined #ocaml
braibant has joined #ocaml
snarkyboojum has joined #ocaml
haelix_ has joined #ocaml
wut__ has joined #ocaml
tomprince has joined #ocaml
hcarty has joined #ocaml
Nass has joined #ocaml
testcocoon has joined #ocaml
yroeht has joined #ocaml
joewilliams has quit [Remote host closed the connection]
lopex has quit [Remote host closed the connection]
iago is now known as Guest24165
thelema_ has joined #ocaml
thelema has quit [Read error: Operation timed out]
ousado has quit [Remote host closed the connection]
* adrien
has one implementation too; need to better check for bugs (it's quite different and I add metadata on the cursor to give a O(1) length operation)
<otk>
nice
<otk>
ive just been reading around trees and found it via ltu
<otk>
surprisingly, it copy pastes straight to F# too
<adrien>
:-)
<adrien>
and now, code the "find" function
<adrien>
the dumb one would look left and then right
joewilliams has quit [Ping timeout: 276 seconds]
bobry has quit [Ping timeout: 276 seconds]
<otk>
heh
<otk>
find would be fun
<otk>
tricky to make efficient
<otk>
(i would imagine)
<adrien>
another possibility is to look one element to the left and then one to the right, one to the left, one to the right, and alternate
lopex has quit [Ping timeout: 272 seconds]
<otk>
ah
Schadenfreude has quit [Ping timeout: 248 seconds]
<adrien>
but best would be to look one element to the left, then one to the right, 2 to the left, 2 to the right, 4 to the left, 4 to the right, then 8, 16, 32, ...
<otk>
or you could 'catch a scent' and follow an edge? heh
pr has quit [Ping timeout: 245 seconds]
<adrien>
it "should" be better, with absolutely no numbers behind that idea =)
<otk>
interesting
<adrien>
(the idea is that you avoid moving to elements that are too far apart in memory/cache)
<otk>
ah
<otk>
small steps
<otk>
it makes sense
<adrien>
my current find function alternates every element
<adrien>
I'm not sure I want to try coding the other behaviour :P
<otk>
it would be cool to apply some learning algorithm to the search hehe
joewilliams has joined #ocaml
letrec has joined #ocaml
pr has joined #ocaml
pr has quit [Changing host]
pr has joined #ocaml
Schadenfreude has joined #ocaml
silver has quit [Quit: I put on my robe and wizard hat]
bobry has joined #ocaml
djcoin has quit [Read error: Operation timed out]
djcoin has joined #ocaml
djcoin has quit [Client Quit]
djcoin has joined #ocaml
probst has joined #ocaml
<jave>
I get errors like "Error: No implementations provided for the following modules:Bi_util referenced from /usr/lib64/ocaml/biniou/bi_io.cmx" while trying to add a dependency to an ocaml application.
EmmanuelOga has joined #ocaml
thomasga has quit [Quit: Leaving.]
ocp has quit [Ping timeout: 244 seconds]
fraggle_ has quit [Remote host closed the connection]
fraggle_ has joined #ocaml
<f[x]>
do you link in cmxa?
Tobu has quit [Ping timeout: 272 seconds]
Nihilist_ has joined #ocaml
NihilistDandy has quit [Disconnected by services]
Nihilist_ is now known as NihilistDandy
Tobu has joined #ocaml
lopex has joined #ocaml
Guest24165 has quit [Quit: Leaving]
iago has joined #ocaml
Jeanne-Kamikaze has joined #ocaml
Submarine has quit [Ping timeout: 260 seconds]
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
metasyntax|work has quit [Quit: WeeChat [quit]]
joewilliams has quit [Ping timeout: 252 seconds]
bobry has quit [Ping timeout: 260 seconds]
pr has quit [Ping timeout: 245 seconds]
Schadenfreude has quit [Ping timeout: 245 seconds]
lopex has quit [Ping timeout: 240 seconds]
pr has joined #ocaml
pr has quit [Changing host]
pr has joined #ocaml
Cyanure has quit [Remote host closed the connection]
Schadenfreude has joined #ocaml
Kakadu has quit [Quit: Page closed]
lopex has joined #ocaml
Cyanure has joined #ocaml
drewbert has joined #ocaml
cdidd has quit [Ping timeout: 252 seconds]
cdidd has joined #ocaml
iago has quit [Ping timeout: 240 seconds]
drewbert has quit [Quit: Leaving.]
oriba has joined #ocaml
roha has quit [Ping timeout: 260 seconds]
drewbert has joined #ocaml
fpz has joined #ocaml
Submarine has quit [Ping timeout: 248 seconds]
iago has joined #ocaml
roha has joined #ocaml
fpz has left #ocaml []
Ori_B has joined #ocaml
Ori_B has quit [Client Quit]
ftrvxmtrx has quit [Quit: Leaving]
<rwmjones>
grrr camlp4
<rwmjones>
how do you reserve a keyword?
<rwmjones>
I mean, keywords are normally reserved by magic when you use EXTEND
Ori_B has joined #ocaml
<rwmjones>
but how do you reserve one explicitly if you're writing a custom parser?
iago has quit [Ping timeout: 260 seconds]
Ori_B has quit [Client Quit]
<thelema_>
rwmjones: keywords are in the lexer, no?
mcclurmc has quit [Excess Flood]
mcclurmc has joined #ocaml
thelema has joined #ocaml
thelema_ has quit [Ping timeout: 260 seconds]
letrec has quit [Ping timeout: 265 seconds]
bobry has joined #ocaml
wagle has quit [Read error: Operation timed out]
wagle has joined #ocaml
mcclurmc has quit [Ping timeout: 248 seconds]
sgnb` has quit [Ping timeout: 248 seconds]
haelix_ has quit [Ping timeout: 248 seconds]
haelix has joined #ocaml
mcclurmc has joined #ocaml
ppilatus has quit [Ping timeout: 248 seconds]
ppilatus has joined #ocaml
MaskRay_ has quit [Quit: leaving]
ulfdoz has joined #ocaml
Tobu has quit [Ping timeout: 272 seconds]
iago has joined #ocaml
<rwmjones>
thelema: I got around this by adding them to EXTEND, but yeah I'm sure keywords are in the lexer, just not sure how to add new ones
<thelema>
I guess you could look at what's generated from teh EXTEND sugar and use that underlying mechanism to do what you want
<thelema>
but if it's already solved, leave it solved.
roha has quit [Ping timeout: 244 seconds]
roha has joined #ocaml
avsm has quit [Quit: Leaving.]
emmanuelux has quit [Read error: Connection reset by peer]
drewbert has quit [Quit: Leaving.]
drewbert has joined #ocaml
sgnb` has joined #ocaml
cago has quit [Quit: Leaving.]
sgnb` is now known as sgnb
roha has quit [Ping timeout: 240 seconds]
* rwmjones
works out how to "lift" an OCaml expression in camlp4
* rwmjones
is pleased
<djcoin>
:)
<djcoin>
Really have to dig ocaml in my free time
avsm has joined #ocaml
Cyanure has quit [Remote host closed the connection]
leoncame` has joined #ocaml
ikaros has joined #ocaml
ulfdoz_ has joined #ocaml
joewilliams has joined #ocaml
ulfdoz has quit [Ping timeout: 260 seconds]
ulfdoz_ is now known as ulfdoz
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
EmmanuelOga has quit [Ping timeout: 240 seconds]
Tobu has joined #ocaml
iago has quit [Ping timeout: 276 seconds]
iago has joined #ocaml
emmanuelux has joined #ocaml
emmanuelux has quit [Remote host closed the connection]
emmanuelux has joined #ocaml
avsm has quit [Quit: Leaving.]
iago has quit [Quit: Leaving]
djcoin has quit [Quit: WeeChat 0.3.2]
mrkronecker has joined #ocaml
ftrvxmtrx has joined #ocaml
eikke has quit [Ping timeout: 240 seconds]
eikke has joined #ocaml
sgnb` has joined #ocaml
NihilistDandy has quit [Read error: Connection reset by peer]
<mrkronecker>
Error: This expression has type < decr : 'a; incr : 'b; value : 'c; .. >//but an expression was expected of type 'd // Self type cannot escape its class
<mrkronecker>
?
<mrkronecker>
I've obviously made some horrendous mistake.
sgnb has quit [Ping timeout: 244 seconds]
<mrkronecker>
Specifically:
<mrkronecker>
File "./counter.ml", line 4, characters 36-42:
avsm has joined #ocaml
Drakken has quit [Ping timeout: 240 seconds]
<mrkronecker>
I'm a mathematician attempting functional programming. Please forgive my code :(
Drakken has joined #ocaml
thelema_ has joined #ocaml
Submarine has joined #ocaml
willb has joined #ocaml
rby_ has joined #ocaml
svenl_ has joined #ocaml
Tobu has quit [Remote host closed the connection]
Tobu has joined #ocaml
testcoco` has joined #ocaml
emmanuelux has quit [Remote host closed the connection]
ulfdoz has quit [*.net *.split]
ikaros has quit [*.net *.split]
thelema has quit [*.net *.split]
fraggle_ has quit [*.net *.split]
svenl has quit [*.net *.split]
simbhar has quit [*.net *.split]
testcocoon has quit [*.net *.split]
yroeht has quit [*.net *.split]
thizanne has quit [*.net *.split]
dsheets1 has quit [*.net *.split]
ski has quit [*.net *.split]
rby has quit [*.net *.split]
rwmjones has quit [*.net *.split]
TaXules has quit [*.net *.split]
tomprince has quit [*.net *.split]
wut__ has quit [*.net *.split]
snarkyboojum has quit [*.net *.split]
Schadenfreude has quit [*.net *.split]
ousado has quit [*.net *.split]
zzz_ has quit [*.net *.split]
Drup has quit [*.net *.split]
cyphase has quit [*.net *.split]
twittard has quit [*.net *.split]
Obfuscate has quit [*.net *.split]
chambart has quit [*.net *.split]
brendan has quit [*.net *.split]
r126f has quit [*.net *.split]
pheredhel has quit [*.net *.split]
deavid has quit [*.net *.split]
braibant has quit [*.net *.split]
hsuh has quit [*.net *.split]
Nass has quit [*.net *.split]
hcarty has quit [*.net *.split]
avsm has quit [*.net *.split]
hnrgrgr has quit [*.net *.split]
tomprince has joined #ocaml
dsheets has joined #ocaml
ulfdoz has joined #ocaml
wut has joined #ocaml
NihilistDandy has joined #ocaml
avsm has joined #ocaml
Schadenfreude has joined #ocaml
ousado has joined #ocaml
zzz_ has joined #ocaml
Drup has joined #ocaml
cyphase has joined #ocaml
twittard has joined #ocaml
Obfuscate has joined #ocaml
chambart has joined #ocaml
ski has joined #ocaml
brendan has joined #ocaml
r126f has joined #ocaml
thizanne has joined #ocaml
pheredhel has joined #ocaml
deavid has joined #ocaml
rwmjones has joined #ocaml
TaXules has joined #ocaml
hnrgrgr has joined #ocaml
hsuh has joined #ocaml
braibant has joined #ocaml
snarkyboojum has joined #ocaml
hcarty has joined #ocaml
Nass has joined #ocaml
snarkyboojum has quit [Ping timeout: 248 seconds]
emmanuelux has joined #ocaml
snarkyboojum has joined #ocaml
ikaros has joined #ocaml
simbhar has joined #ocaml
fraggle_ has joined #ocaml
yroeht has joined #ocaml
companion_square has joined #ocaml
companion_cube has quit [Disconnected by services]
companion_square is now known as companion_cube
_andre has quit [*.net *.split]
lusory has quit [*.net *.split]
malouin_ has quit [*.net *.split]
malouin has joined #ocaml
Drup has quit [Quit: Leaving.]
Drup has joined #ocaml
twittard has quit [Quit: twittard]
Drup has quit [Client Quit]
Drup has joined #ocaml
_andre has joined #ocaml
lusory has joined #ocaml
djcoin has joined #ocaml
Jeanne-Kamikaze has quit [Quit: Did you hear that ?]
mcclurmc_ has joined #ocaml
tlockney_ has joined #ocaml
thomasga has joined #ocaml
mcclurmc has quit [*.net *.split]
tlockney has quit [*.net *.split]
pangoafk is now known as pango
thomasga has quit [Client Quit]
asdfhjkl has joined #ocaml
Jeanne-Kamikaze has joined #ocaml
avsm has quit [Quit: Leaving.]
twittard has joined #ocaml
twittard has quit [Client Quit]
emmanuelux has quit [Remote host closed the connection]
thieusoai has joined #ocaml
emmanuelux has joined #ocaml
thieusoai has quit [Max SendQ exceeded]
thieusoai has joined #ocaml
drewbert has quit [Quit: Leaving.]
spearalot has joined #ocaml
emmanuelux has quit [Remote host closed the connection]
emmanuelux has joined #ocaml
iago has joined #ocaml
ivan\ has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
jamii has joined #ocaml
ivan\ has joined #ocaml
<jamii>
Does anyone know how to make this Make rule work?