adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | Current MOOC: https://huit.re/ocamlmooc | OCaml 4.04.0 release notes: http://ocaml.org/releases/4.04.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
<ocaml783> hey guys im a student and have an ocaml homework im offering 20$ per hours of help on skype. I am not asking for you to do my work just for someone who knows how to code in Ocaml to help me understand.
<mengu> ocaml783:
<mengu> ask your questions here
<mengu> and show people that you try
<ocaml783> i have more then 30 hours on it and it's a very small assignement. I have asked questions here. I dont want someone to do it for me i want someone to explain the things i dont understand...I really hope i didnt come off as someone who wants to pay for it to be done
gallais has quit [Ping timeout: 258 seconds]
fre2 has quit [Ping timeout: 268 seconds]
fre2 has joined #ocaml
gallais has joined #ocaml
handlex has joined #ocaml
fre3 has joined #ocaml
fre2 has quit [Ping timeout: 240 seconds]
fre3 has quit [Ping timeout: 240 seconds]
handlex has quit [Quit: handlex]
fre2 has joined #ocaml
sepp2k has quit [Ping timeout: 268 seconds]
ocaml783 has quit [Ping timeout: 260 seconds]
<lyxia> ocaml783: this channel is free...
fre3 has joined #ocaml
fre2 has quit [Ping timeout: 260 seconds]
al-damiri has quit [Quit: Connection closed for inactivity]
fre2 has joined #ocaml
fre3 has quit [Ping timeout: 240 seconds]
fre2 has quit [Ping timeout: 240 seconds]
minn has joined #ocaml
FreeBirdLjj has joined #ocaml
jerme_ has left #ocaml [#ocaml]
mfp_ has quit [Ping timeout: 260 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
silver has quit [Quit: rakede]
orbifx has joined #ocaml
orbifx has quit [Ping timeout: 240 seconds]
sh0t has quit [Remote host closed the connection]
mengu has quit [Remote host closed the connection]
agarwal1975 has joined #ocaml
shinnya has quit [Ping timeout: 264 seconds]
agarwal1975 has quit [Quit: agarwal1975]
minn has quit [Ping timeout: 260 seconds]
FreeBird_ has joined #ocaml
wtetzner has quit [Remote host closed the connection]
FreeBirdLjj has quit [Ping timeout: 260 seconds]
wtetzner has joined #ocaml
copy` has quit [Quit: Connection closed for inactivity]
wtetzner has quit [Remote host closed the connection]
minn has joined #ocaml
spew has quit [Ping timeout: 240 seconds]
BitPuffin|osx has quit [Ping timeout: 246 seconds]
ygrek has quit [Ping timeout: 240 seconds]
FreeBird_ has quit [Remote host closed the connection]
minn has quit [Ping timeout: 240 seconds]
d0nn1e has quit [Ping timeout: 246 seconds]
d0nn1e has joined #ocaml
ygrek has joined #ocaml
djellemah has quit [Ping timeout: 240 seconds]
AlexDenisov has joined #ocaml
FreeBirdLjj has joined #ocaml
MercurialAlchemi has joined #ocaml
djellemah has joined #ocaml
minn has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
MercurialAlchemi has quit [Ping timeout: 240 seconds]
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 246 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 256 seconds]
FreeBird_ has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
FreeBird_ has joined #ocaml
FreeBird_ has quit [Read error: Connection reset by peer]
FreeBirdLjj has quit [Ping timeout: 264 seconds]
FreeBird_ has joined #ocaml
MercurialAlchemi has joined #ocaml
FreeBird_ has quit [Remote host closed the connection]
Simn has joined #ocaml
apache3 has joined #ocaml
apache3_ has quit [Remote host closed the connection]
alfredo has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 258 seconds]
jnavila has joined #ocaml
newbie84 has joined #ocaml
newbie84 has quit [Client Quit]
newbie88 has joined #ocaml
newbie88 is now known as lolisa
FreeBirdLjj has joined #ocaml
so has quit [Ping timeout: 240 seconds]
so has joined #ocaml
alfredo has quit [Ping timeout: 260 seconds]
Onemorenickname has joined #ocaml
orbitz has quit [Ping timeout: 240 seconds]
FreeBird_ has joined #ocaml
FreeBir__ has joined #ocaml
olle has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 246 seconds]
AltGr has joined #ocaml
FreeBird_ has quit [Ping timeout: 260 seconds]
FreeBirdLjj has joined #ocaml
orbitz has joined #ocaml
FreeBir__ has quit [Ping timeout: 240 seconds]
fre2 has joined #ocaml
<companion_cube> I wonder how anyone can survive without the `with_resource` pattern :-/
_y has quit [Ping timeout: 256 seconds]
Fistine has quit [Ping timeout: 268 seconds]
tobiasBora has quit [Ping timeout: 255 seconds]
FreeBirdLjj has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #ocaml
fre2 has quit [Ping timeout: 240 seconds]
AlexDenisov has joined #ocaml
larhat has joined #ocaml
mfp_ has joined #ocaml
zpe has joined #ocaml
orbifx has joined #ocaml
freusque has quit [Quit: WeeChat 1.7]
zpe has quit [Remote host closed the connection]
freusque has joined #ocaml
zpe has joined #ocaml
olle has quit [Quit: olle]
_y has joined #ocaml
Fistine has joined #ocaml
larhat has quit [Quit: Leaving.]
larhat has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jnavila has quit [Quit: It was time]
AlexDenisov has joined #ocaml
olle has joined #ocaml
AlexDenisov has quit [Client Quit]
AlexDenisov has joined #ocaml
AlexDenisov has quit [Client Quit]
AlexDenisov has joined #ocaml
AlexDenisov has quit [Client Quit]
AlexDenisov has joined #ocaml
AlexDenisov has quit [Client Quit]
tobiasBora has joined #ocaml
dmoerner has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
jnavila has joined #ocaml
<Onemorenickname> companion_cube, simple, i don't do IO :D
freusque has quit [Quit: WeeChat 1.7]
<Onemorenickname> well
<Onemorenickname> I'm using a hashtbl on arrays
<Onemorenickname> but it fails miserably : when the array is modified, I can't access it anymore
zpe has quit [Remote host closed the connection]
freusque has joined #ocaml
zpe has joined #ocaml
<Onemorenickname> and that's perfectly normal
kakadu has joined #ocaml
ygrek has quit [Ping timeout: 260 seconds]
freusque has quit [Quit: WeeChat 1.7]
freusque has joined #ocaml
<companion_cube> indeed it is
maattdd_ has joined #ocaml
pitastrudl has quit [Remote host closed the connection]
silver has joined #ocaml
dhil has joined #ocaml
pitastrudl has joined #ocaml
olle has quit [Ping timeout: 240 seconds]
dmoerner has joined #ocaml
dhil has quit [Ping timeout: 260 seconds]
govg has quit [Ping timeout: 258 seconds]
govg has joined #ocaml
dhil has joined #ocaml
_andre has joined #ocaml
<kakadu> Folks, do you know which GNU/linux is running on travis for opam-repository?
<orbifx> is there a zip function in ocaml?
<flux> List.combine, though it requires lists to be the same length (and doesn't truncate to the shorter like I think haskell does)
<orbifx> thanks flux
balod has quit [Remote host closed the connection]
balod has joined #ocaml
<orbifx> wait sorry, i'm after a function which applies elements of one to the other
larhat has quit [Quit: Leaving.]
shinnya has joined #ocaml
<companion_cube> List.map2 (fun f x -> f x)
<orbifx> ok thanks :)
<orbifx> im going to do it with iter2 cause there isn't anything to return
<companion_cube> be careful that the lengths must match
<orbifx> yeah thanks
snowcrshd has joined #ocaml
minn has quit [Quit: Leaving]
frefity has quit [Ping timeout: 260 seconds]
snhmib has joined #ocaml
Fistine has quit [Ping timeout: 246 seconds]
AlexDenisov has joined #ocaml
Fistine has joined #ocaml
dch_ has joined #ocaml
_y has quit [Ping timeout: 260 seconds]
_y has joined #ocaml
frefity has joined #ocaml
dhil has quit [Ping timeout: 264 seconds]
sepp2k has joined #ocaml
ajhager2 has joined #ocaml
ajhager has quit [Ping timeout: 260 seconds]
freusque has quit [Ping timeout: 256 seconds]
larhat has joined #ocaml
malc_ has joined #ocaml
Algebr has joined #ocaml
frefity has quit [Ping timeout: 240 seconds]
<n4323> ll;;
Algebr has quit [Remote host closed the connection]
Xadnem has joined #ocaml
<Xadnem> Hello friends, I want to declare a type with a polimorphic list like: Dim of `a [], but the compiler return me an error. Do you know how to do it please ?
<cheater> you're using the wrong apostrophe
<cheater> use 'a
<cheater> not `a
rcsole has joined #ocaml
frefity has joined #ocaml
<Xadnem> cheater: thank you for your help. I have tryed the following: type m = Dim of 'a [] . The compiler still returning error. What is wrong?
<Drup> Xadnem: it's 'a list
<Drup> not 'a []
<cheater> right
<cheater> i haven't even looked that far
<cheater> :)
agarwal1975 has joined #ocaml
octachron has joined #ocaml
<Xadnem> Drup: if I write: type m = Dim of 'a list;; , the compiler return: Unbound type parameter 'a.
<thizanne> Xadnem: you need to provde 'a as a parameter of your type
<thizanne> so type 'a m = Dim of 'a list
<thizanne> thus `Dim [1; 2; 3]` will have the type `int m`
<thizanne> if you explicitly want to remove this parameter from your type m, you need a gadt, and you actually don't want that
kolko has quit [Ping timeout: 260 seconds]
<Xadnem> thizanne: Thank you very much. I undertand it now.
cokanut has joined #ocaml
zpe has quit [Remote host closed the connection]
<cokanut> Beginner question. How do I run an imperative command before a match that returns a value. Here's the gist: https://gist.github.com/anonymous/383401985a28695f4183e1714103bb2f
zpe has joined #ocaml
agarwal1975 has quit [Quit: agarwal1975]
agarwal1975 has joined #ocaml
dch_ has quit [Ping timeout: 256 seconds]
<thizanne> cokanut: put ; between the instruction and the match
<thizanne> otherwise it thinks the whole match is the second parameter of printf
<cokanut> thizanne: ah, thanks! i'll try that.
zpe has quit [Ping timeout: 256 seconds]
snowcrshd_ has joined #ocaml
snowcrshd has quit [Ping timeout: 240 seconds]
<cokanut> thizanne: that worked! :) but if i wanted to use all the setup variables, say "let a = 1 in let b = a + 1 in print_int b", in the return value, is that possible? aka: "let a = 1 in let b = a + 1 in print_int b in b+10" ?
<cokanut> so I want to return a value from a function, but, I want to run an imperative statement in-between
kolko has joined #ocaml
<flux> print_int b; b + 10
<zozozo> or "in let () = print_int b in b + 10"
<cokanut> zozozo: that's nice and cool! flux: putting a semicolon worked again. so what is the general rule w.r.t semicolons? does it tell ocaml that this here is an imperative statement and it ends here? then how does the variables i defined above is in scope for the return value?
BitPuffin|osx has joined #ocaml
<flux> cokanut, consider ; an operator in this context
<flux> cokanut, let a ; b = let () = a in b
<zozozo> flux: without -strict-sequence it's more like "let _ = a in b"
<flux> so much like let a = 4 in let b = 5 in a + b you can do the same with a ; b
<cokanut> flux: zozozo: i don't think i really understood it, but now I know to look in the direction of semicolons and I'll figure it out. https://ocaml.org/learn/tutorials/structure_of_ocaml_programs.html this looks good - it talks about semicolons to sequence statements and look at them as operators. i'm going to dig in. thanks a lot to both of you!!
freusque has joined #ocaml
dhil has joined #ocaml
jbrown has joined #ocaml
<Onemorenickname> by setting a global address int hashtbl, a type "'a indexed = 'a * int" and prefix operators "!*", "!&", "!!", I can finally write C-style code in ocaml
<Onemorenickname> i hope nobody ever reads my code
<zozozo> Onemorenickname: why so much hatred ? :p
jabroney has joined #ocaml
jbrown has quit [Quit: Leaving]
<thizanne> you should do a PR for authorizing postfix partial application of operators in the syntax, so we can at last define and use x++ like real 2017 programming languages
<Onemorenickname> thizanne, thank you for understanding me
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
dhil has quit [Ping timeout: 260 seconds]
spew has joined #ocaml
agarwal1975 has quit [Quit: agarwal1975]
agarwal1975 has joined #ocaml
sh0t has joined #ocaml
kolko_ has joined #ocaml
kolko has quit [Ping timeout: 260 seconds]
MercurialAlchemi has quit [Ping timeout: 260 seconds]
alfredo has joined #ocaml
dhil has joined #ocaml
dhil has quit [Remote host closed the connection]
spew has quit [Ping timeout: 240 seconds]
Xadnem has quit [Quit: leaving]
spew has joined #ocaml
al-damiri has joined #ocaml
dhil has joined #ocaml
lolisa has quit [Quit: KVIrc 4.9.1 Aria http://www.kvirc.net/]
cokanut has quit [Ping timeout: 264 seconds]
nicoo has quit [Ping timeout: 240 seconds]
BitPuffin|osx has quit [Remote host closed the connection]
BitPuffin|osx has joined #ocaml
spew has quit [Ping timeout: 256 seconds]
nicoo has joined #ocaml
zpe has joined #ocaml
kolko_ has quit [Ping timeout: 258 seconds]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
MercurialAlchemi has joined #ocaml
zpe has quit [Ping timeout: 264 seconds]
kolko has joined #ocaml
thewickedaxe has joined #ocaml
thewickedaxe has left #ocaml [#ocaml]
thewickedaxe has joined #ocaml
thewickedaxe has left #ocaml [#ocaml]
ciniglio` has quit [Ping timeout: 246 seconds]
shinnya has quit [Ping timeout: 260 seconds]
eimantas has joined #ocaml
alfredo has quit [Quit: Textual IRC Client: www.textualapp.com]
<kakadu> flux: Hey. Have you found some free time for QML ?
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
pullphinger has joined #ocaml
copy` has joined #ocaml
wtetzner has joined #ocaml
handlex has joined #ocaml
ciniglio has joined #ocaml
ryanartecona has joined #ocaml
handlex has quit [Quit: handlex]
<flux> yes, but I've been doing C++/QML...
jnavila has quit [Quit: It was time]
<flux> I imagine it's going to be easier to target Windows and Android with this approach, as well :/
ansiwen_ is now known as ansiwen
silver has quit [Read error: Connection reset by peer]
slash^ has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eimantas has quit [Quit: WeeChat 1.5]
rcsole has quit [Ping timeout: 258 seconds]
thecheshirecat has joined #ocaml
larhat has quit [Quit: Leaving.]
d0nn1e has quit [Ping timeout: 240 seconds]
<thecheshirecat> Hi everybody, I'm trying to implement this : https://sebfisch.github.io/haskell-regexp/regexp-play.pdf
<thecheshirecat> in OCAML, but I don't understand how to do "parts"
freechips has quit [Ping timeout: 260 seconds]
d0nn1e has joined #ocaml
<thecheshirecat> it should split a list into n factors, and return a list with every "splitten list" in it. Something like that : [a,b,c] -input-> parts -output->[[[];[a;b;c]];[[a][b][c]];[[a];[b;c]] ...]
zpe has joined #ocaml
<thecheshirecat> I have already done split, like that :
<thecheshirecat> but i used two arguments, and here, I don't know how many parameters I will have :(
spew has joined #ocaml
tane has joined #ocaml
<average> I want to see some love from the OCaml community
orbifx has quit [Ping timeout: 268 seconds]
<gallais> thecheshirecat: do you know how to desugar list comprehensions in Haskell? Because once you've done that, the code is basically the same
marsam has joined #ocaml
vramana1 has joined #ocaml
vramana has quit [Ping timeout: 258 seconds]
vramana1 is now known as vramana
freusque has quit [Quit: WeeChat 1.7]
al-damiri has quit [Quit: Connection closed for inactivity]
slash^ has quit [Remote host closed the connection]
<thecheshirecat> no, i had never worked on Haskell
<thecheshirecat> thank you very much :) let me try to understand
kakadu has quit [Quit: Konversation terminated!]
slash^ has joined #ocaml
<thecheshirecat> (wow)
freechips has joined #ocaml
maattdd_ has quit [Ping timeout: 260 seconds]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
<Onemorenickname> average, what do you... mean ?
<Onemorenickname> (haha, average, mean)
<Onemorenickname> (thanks)
<chelfi> xD
<average> Onemorenickname: yes, you're clever
<average> Onemorenickname: I mean like more love
<chelfi> ♥
dhil has quit [Ping timeout: 256 seconds]
dhil has joined #ocaml
zpe has quit [Ping timeout: 268 seconds]
john51 has quit [Remote host closed the connection]
dch_ has joined #ocaml
john51 has joined #ocaml
tane has quit [Ping timeout: 256 seconds]
dch_ has quit [Quit: ZZ]
dch_ has joined #ocaml
rcsole has joined #ocaml
<average> chelfi got it right
maattdd_ has joined #ocaml
tane has joined #ocaml
orbifx has joined #ocaml
larhat has joined #ocaml
maattdd has quit [Ping timeout: 240 seconds]
<Onemorenickname> are there any used programming languages where there are well-formatted programs where you can have an unbalance of "(" and ")" ?
<flux> wasn't there a lisp that allowed to close all open parens with ]
ygrek has joined #ocaml
<Onemorenickname> ngh
maattdd_ has quit [Quit: WeeChat 1.7]
maattdd has joined #ocaml
<Onemorenickname> yay, i have my dynamic earley parser, with post-hooks (for derivations) and pre-hooks (for look-aheads)
<flux> DEFINEQ((FACTORIAL (LAMBDA (N) (COND [(ZEROP N) 1] (T (TIMES N (FACTORIAL (SUB1 N]
<Onemorenickname> this is so bad
<Onemorenickname> still, thanks for the pointer
<flux> why were you asking?-)
zpe has joined #ocaml
<Onemorenickname> flux, for very bad reasons
<Onemorenickname> to see if I could parse an other language in the language without escaping anything
<Onemorenickname> if the target language balances the parenthesis, i can
<Onemorenickname> but if it does not, and you showed me an example where it's reasonable that it does not, then I can't
<flux> what do you mean "without escaping"?
<flux> I mean you need to detect strings, character literals and comments as well
<Onemorenickname> yep, but that's done from the grammar of that language
<Onemorenickname> the grammar of that language is not aware of the top one though
rcsole has quit [Ping timeout: 240 seconds]
<Onemorenickname> (and there can not be comments of the parent language in a child-language construction)
<Onemorenickname> basically, i want to be able to write normal code, and then put it between parenthesis, and do some things with that code
<Onemorenickname> type-checking it, generating some new stuff, pretty-printing it, whatever
<Onemorenickname> code-as-data, but for any code
mengu has joined #ocaml
<Drup> Onemorenickname: there are weird regexs with several kind of parens that don't have to nest
<Drup> like: (foo [bar) baz]
<Onemorenickname> Drup, i don't know these regexes, any pointer ?
<Drup> hum, I don't really remember
<Onemorenickname> ha ha, i'm so used to nesting that this line really messes with my intern-parsing
<Drup> (arguably, you could specify text formatting like that, but nobody is that masochist)
<Onemorenickname> i remember people wanting to parse html with regexes though
<flux> nah, I use regexps all the time, a͘n̈́d̥ ͈Iͅ ́d߬őn̰'̊tͫ ͒h̤a̸v̏e᷆ ́a͊n̾y͚ ̈t͘rͥo͈ūbͤl̰e͚ ͅw̘i᷄t̤h̊ ̲t߫h͈a゚t̓
kakadu has joined #ocaml
govg has quit [Ping timeout: 240 seconds]
marsam has quit [Read error: Connection reset by peer]
after___ has joined #ocaml
<after___> hi
<mengu> hi after___
<after___> hello
jabroney has quit [Quit: Leaving.]
ryanartecona has quit [Quit: ryanartecona]
govg has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 268 seconds]
larhat has quit [Read error: Connection reset by peer]
larhat has joined #ocaml
larhat1 has joined #ocaml
larhat has quit [Read error: Connection reset by peer]
larhat has joined #ocaml
dch_ has quit [Remote host closed the connection]
<Onemorenickname> by the way Drup
<Onemorenickname> i read this many times, but still
larhat1 has quit [Ping timeout: 258 seconds]
<Onemorenickname> is there anything showing the power of regex + recursion / wtvr pcre-things-existing ?
dch_ has joined #ocaml
skunkwerks has joined #ocaml
dch_ has quit [Remote host closed the connection]
<Drup> You mean, a classification of the power of pcre with relation to chomsky's hierarchy ?
<Onemorenickname> for instance
<Onemorenickname> because if you allow recursion, you can parse html
<Onemorenickname> well, with mutual recursion, you get html
<Onemorenickname> with simple recursion, you only get the "body" part
moei has quit [Quit: Leaving...]
jnavila has joined #ocaml
<Onemorenickname> so there is mutual recursion
malc_ has quit [Remote host closed the connection]
Denommus has joined #ocaml
fre2 has joined #ocaml
Denommus` has joined #ocaml
TheLemonMan has joined #ocaml
AlexDenisov has joined #ocaml
Denommus has quit [Ping timeout: 264 seconds]
Denommus` is now known as Denommus
skunkwerks has quit [Remote host closed the connection]
skunkwerks has joined #ocaml
slash^ has quit [Remote host closed the connection]
AlexDeni_ has joined #ocaml
AlexDenisov has quit [Ping timeout: 264 seconds]
Fistine has quit [Ping timeout: 258 seconds]
Fistine has joined #ocaml
wtetzner has quit [Remote host closed the connection]
dhil has quit [Ping timeout: 268 seconds]
skunkwerks has quit [Read error: Connection reset by peer]
skunkwerks has joined #ocaml
gasche has left #ocaml ["ERC (IRC client for Emacs 24.5.1)"]
jao has joined #ocaml
jnavila has quit [Ping timeout: 240 seconds]
snowcrshd_ has quit [Ping timeout: 240 seconds]
jnavila has joined #ocaml
_andre has quit [Quit: leaving]
skunkwerks has quit [Ping timeout: 258 seconds]
dch_ has joined #ocaml
dch_ has quit [Changing host]
dch_ has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 240 seconds]
ryanartecona has joined #ocaml
_y has quit [Ping timeout: 240 seconds]
_y has joined #ocaml
tobiasBora has quit [Ping timeout: 260 seconds]
thewickedaxe has joined #ocaml
rand__ has joined #ocaml
silver_ has joined #ocaml
tobiasBora has joined #ocaml
octachron has quit [Quit: Leaving]
tane has quit [Quit: Leaving]
thecheshirecat has quit [Ping timeout: 260 seconds]
AlexDeni_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pullphinger has quit []
spew has quit [Ping timeout: 264 seconds]
Simn has quit [Quit: Leaving]
jnavila has quit [Remote host closed the connection]
AltGr has left #ocaml [#ocaml]
shinnya has joined #ocaml
moei has joined #ocaml
moei has joined #ocaml
jabroney has joined #ocaml
dch_ has quit [Quit: ZZ]
rand__ has quit [Quit: leaving]
newbie has joined #ocaml
newbie is now known as lolisa
Denommus has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
larhat has quit [Quit: Leaving.]
spew has joined #ocaml
fre2 has quit [Ping timeout: 260 seconds]
kakadu has quit [Remote host closed the connection]
<freechips> hey guys is anyone online?
<lyxia> I'm also here
<freechips> ive got a function with some matchings, that id like to extend in the context of another function
<freechips> nice
vramana has quit [Quit: vramana]
<freechips> so basically i have f1 = "a"->1 | "b"->2 | ...
<lyxia> let f2 = function "c" -> 3 | x -> f1 x
<freechips> and id like to have f2 = (f1 + "c"->3)
<freechips> lyxia does that solution incur into some nasty recursions?
<freechips> well not recursions but you get what i mean
<freechips> is the application of the function O(1)?
<lyxia> I don't get what you mean.
<freechips> like if i do this trick 100 times, will it have to keep calling other functions
<freechips> f1 = "a"->1, f2 = "b"->2 | f1 x, f3="c"->3|f2 x .... f100
<freechips> when i reach f100 and i call f100 "a"
<freechips> what happens?
<freechips> does it immediatly return 1
<freechips> or does it call f99, then f98, then f97 ...
<_y> the second
<freechips> thats ugly
<_y> but that could be optimized with inlining (now that that flambda is out there)
<freechips> its still "tail recursion like" as far as i can tell
<freechips> how?
spew has quit [Ping timeout: 264 seconds]
<lyxia> I hope it is optimized
<_y> well i’m not 100% sure of what i said, as you said optimizing the tail calls could already remove all the overhead
<freechips> yes but as far as my understanding of tail recursion is (and it is shallow), it only solves the stack issue
<freechips> so i get one stack frame during the whole f100->f99...f1 thing
<freechips> instead of like 100 frames
<freechips> but still it will traverse all the function calls
<freechips> unless ocaml optimizes it by itself
Khady_ has joined #ocaml
Khady has quit [Ping timeout: 260 seconds]
maattdd_ has joined #ocaml
maattdd has quit [Ping timeout: 240 seconds]
nicooo has joined #ocaml
nicoo has quit [Ping timeout: 240 seconds]
nicooo is now known as nicoo
<_y> so what you want is inlining
<_y> right ?
<freechips> yes id say
<freechips> at least out of curiosity, if it's too burdensome of a syntax i'll drop it
<lyxia> freechips: I wonder what letter you would associate to fn for n > 26...
<freechips> easy
<freechips> _ -> failwith "goodbye world"
<freechips> this is purposedly a function with a fixed "dictionary"
orbifx has quit [Ping timeout: 258 seconds]
<freechips> it is only defined for single values, or it is undefined
ryanartecona has quit [Quit: ryanartecona]
troydm has quit [Ping timeout: 240 seconds]
thewickedaxe has quit [Ping timeout: 240 seconds]
thewickedaxe has joined #ocaml
wtetzner has joined #ocaml
agarwal1975 has quit [Quit: agarwal1975]
Onemorenickname has quit [Read error: Connection reset by peer]
sh0t has quit [Remote host closed the connection]