adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml MOOC http://1149.fr/ocaml-mooc | OCaml 4.02.3 announced http://ocaml.org/releases/4.02.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
slicefd has quit [Quit: WeeChat 1.4]
<pierpa`> the Graphics module is supposed to work on windows?
pierpa` is now known as pierpa
<pierpa> because, resize_windows has no effect
<pierpa> *resize_window
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
Kakadu has quit [Remote host closed the connection]
mj12` has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
mj12` has joined #ocaml
Guest91418 is now known as lopex
seangrove has quit [Ping timeout: 252 seconds]
seangrove has joined #ocaml
madroach has quit [Ping timeout: 248 seconds]
madroach has joined #ocaml
so has joined #ocaml
mal`` has quit [Quit: Leaving]
lokien_ has quit [Quit: Connection closed for inactivity]
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
dksong has joined #ocaml
mal`` has joined #ocaml
dksong has quit [Ping timeout: 272 seconds]
nicooo has joined #ocaml
nicoo has quit [Ping timeout: 248 seconds]
hanshenrik has quit [Ping timeout: 256 seconds]
hanshenrik has joined #ocaml
jeffmo has quit [Quit: jeffmo]
Emmanuel` has quit [Quit: Konversation terminated!]
FreeBirdLjj has joined #ocaml
exm has joined #ocaml
<Algebr`> Drup: Using Lwt_io.lines_of_file and it sometimes throws an exception of End_of_file and sometimes doesn't even though the file is unchanged. Not sure how to debug this
seangrove has quit [Ping timeout: 272 seconds]
igoroliveira has quit [Quit: Connection closed for inactivity]
ygrek has quit [Ping timeout: 256 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
<Algebr`> ah, nvm, found it, didn't realize that End_of_file is raised for more than just readling from files but in general terms of reading.
struk|desk|away is now known as struk|desk
shinnya has quit [Ping timeout: 276 seconds]
luzie has joined #ocaml
struk|desk has quit [Remote host closed the connection]
dksong has joined #ocaml
hanshenrik_ has joined #ocaml
dksong has quit [Ping timeout: 265 seconds]
hanshenrik has quit [Ping timeout: 252 seconds]
chris2 has quit [Ping timeout: 240 seconds]
chris2 has joined #ocaml
kushal has joined #ocaml
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hanshenrik__ has joined #ocaml
aantron has joined #ocaml
hanshenrik_ has quit [Ping timeout: 276 seconds]
_whitelogger_ has quit [Remote host closed the connection]
_whitelogger has joined #ocaml
darkf has quit [Ping timeout: 240 seconds]
darkf has joined #ocaml
darkf has joined #ocaml
darkf has quit [Changing host]
darkf_ has joined #ocaml
emias has quit [Ping timeout: 248 seconds]
darkf has quit [Ping timeout: 260 seconds]
emias has joined #ocaml
xaimus has quit [Ping timeout: 256 seconds]
riveter has quit [Quit: ZNC - http://znc.in]
xaimus has joined #ocaml
MercurialAlchemi has joined #ocaml
axiles has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 250 seconds]
badon has quit [Ping timeout: 256 seconds]
darkf_ has quit [Ping timeout: 240 seconds]
darkf has joined #ocaml
MercurialAlchemi has joined #ocaml
riveter has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 256 seconds]
xaimus has quit [Ping timeout: 240 seconds]
xaimus has joined #ocaml
freehck has joined #ocaml
nicooo has quit [Remote host closed the connection]
nicooo has joined #ocaml
Algebr` has quit [Ping timeout: 240 seconds]
kushal has quit [Ping timeout: 240 seconds]
MercurialAlchemi has joined #ocaml
kushal has joined #ocaml
silver has joined #ocaml
jave has quit [Quit: ZNC - http://znc.in]
jave has joined #ocaml
orbifx-m has quit [Ping timeout: 248 seconds]
wolfcore has quit [Ping timeout: 248 seconds]
badon has joined #ocaml
pierpa has quit [Ping timeout: 265 seconds]
dksong has joined #ocaml
wolfcore has joined #ocaml
nicooo has quit [Ping timeout: 248 seconds]
dksong has quit [Ping timeout: 240 seconds]
nicooo has joined #ocaml
antkong_ has quit [Quit: antkong_]
Simn has joined #ocaml
Haudegen has quit [Ping timeout: 248 seconds]
Mercuria1Alchemi has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 252 seconds]
orbifx-m has joined #ocaml
copy` has quit [Quit: Connection closed for inactivity]
sepp2k has joined #ocaml
Haudegen has joined #ocaml
sfri has quit [Remote host closed the connection]
orbifx-m has quit [Quit: AtomicIRC: The nuclear option.]
Maxdamantus has quit [Ping timeout: 256 seconds]
abbiya has joined #ocaml
sfri has joined #ocaml
abbiya has quit [Quit: Leaving]
abbiya has joined #ocaml
Maxdamantus has joined #ocaml
yegods has joined #ocaml
warp has joined #ocaml
Sorella has quit [Quit: Connection closed for inactivity]
julien_t has joined #ocaml
l1x has quit [Quit: Updating details, brb]
l1x has joined #ocaml
dksong has joined #ocaml
Algebr has joined #ocaml
dksong has quit [Ping timeout: 272 seconds]
nopf has quit [Remote host closed the connection]
ggole has joined #ocaml
pgiarrusso has joined #ocaml
vpm has quit [Ping timeout: 248 seconds]
jwatzman|work has joined #ocaml
elfring has joined #ocaml
lukky513 has quit [*.net *.split]
SHODAN has quit [*.net *.split]
djellemah has quit [*.net *.split]
patronus has quit [*.net *.split]
sternenseemann has quit [*.net *.split]
zaquest has quit [*.net *.split]
jeroud has quit [*.net *.split]
k1000 has quit [*.net *.split]
mattg has quit [*.net *.split]
myst|fon has quit [*.net *.split]
rbocquet has quit [*.net *.split]
jerith has quit [*.net *.split]
segmond has quit [*.net *.split]
thizanne has quit [*.net *.split]
sz0 has quit [*.net *.split]
Ankhers has quit [*.net *.split]
pootler_ has quit [*.net *.split]
rom1504 has quit [*.net *.split]
seako has quit [*.net *.split]
parataxis has quit [*.net *.split]
rwmjones has quit [*.net *.split]
dmbaturin has quit [*.net *.split]
ggherdov_ has quit [*.net *.split]
kalzz has quit [*.net *.split]
MorTal1ty has quit [*.net *.split]
wirrbel has quit [*.net *.split]
Quintasan has quit [*.net *.split]
hnrgrgr has quit [*.net *.split]
ohama has quit [*.net *.split]
mahem1 has quit [*.net *.split]
xerael has quit [*.net *.split]
mattrepl has quit [*.net *.split]
jkni has quit [*.net *.split]
Pepe_ has quit [*.net *.split]
eagleflo has quit [*.net *.split]
cojy has quit [*.net *.split]
sternenseemann has joined #ocaml
Quintasan has joined #ocaml
Quintasan has joined #ocaml
Quintasan has quit [Changing host]
thizanne has joined #ocaml
patronus has joined #ocaml
rbocquet has joined #ocaml
hnrgrgr has joined #ocaml
eagleflo has joined #ocaml
SHODAN has joined #ocaml
mahem1 has joined #ocaml
dmbaturin has joined #ocaml
k1000 has joined #ocaml
zaquest has joined #ocaml
jerith has joined #ocaml
mattrepl has joined #ocaml
wirrbel has joined #ocaml
segmond has joined #ocaml
git-commit has joined #ocaml
rwmjones has joined #ocaml
rom1504 has joined #ocaml
ohama has joined #ocaml
Pepe_ has joined #ocaml
Ankhers has joined #ocaml
djellemah has joined #ocaml
kalzz has joined #ocaml
warp has quit [Max SendQ exceeded]
lukky513 has joined #ocaml
warp has joined #ocaml
dksong has joined #ocaml
jyc has quit [Ping timeout: 250 seconds]
so has quit [Ping timeout: 250 seconds]
_andre has joined #ocaml
srcerer has quit [Ping timeout: 272 seconds]
jyc has joined #ocaml
cojy has joined #ocaml
mattg has joined #ocaml
sz0 has joined #ocaml
parataxis has joined #ocaml
myst|fon has joined #ocaml
_whitelogger has joined #ocaml
sfri has joined #ocaml
keteim has joined #ocaml
wirrbel has joined #ocaml
pootler_ has joined #ocaml
jkni has joined #ocaml
rwmjones has quit [*.net *.split]
zaquest has quit [*.net *.split]
pgiarrusso has quit [*.net *.split]
sgnb has quit [*.net *.split]
jbrown has quit [*.net *.split]
exm has quit [*.net *.split]
gustav___ has quit [*.net *.split]
bitemyapp has quit [*.net *.split]
tokik has quit [*.net *.split]
theblatte has quit [*.net *.split]
companion_cube has quit [*.net *.split]
slicefd has joined #ocaml
rwmjones has joined #ocaml
gustav___ has joined #ocaml
exm has joined #ocaml
bitemyapp has joined #ocaml
companion_cube has joined #ocaml
theblatte has joined #ocaml
tokik has joined #ocaml
zaquest has joined #ocaml
pgiarrusso has joined #ocaml
sgnb has joined #ocaml
jbrown has joined #ocaml
kushal has quit [Quit: Leaving]
ggherdov_ has joined #ocaml
jeroud has joined #ocaml
Kakadu has joined #ocaml
MorTal1ty has joined #ocaml
Algebr has quit [Ping timeout: 240 seconds]
dksong has quit [Quit: Leaving.]
yawnt has joined #ocaml
seako has joined #ocaml
yegods has quit []
<flux> you wrote that? nice!
tane has joined #ocaml
<companion_cube> this chan is quiet today
<flux> no it's not, there are tons of nick changes
<yawnt> flux: sorry, i crashed
<yawnt> were you referring to ocaml-mruby?
<flux> yes
<yawnt> yeah
<yawnt> i'm writing the bindings
<flux> yawnt, is GC causing you any issues?-)
rand__ has joined #ocaml
<yawnt> not so far, no
<flux> too bad perl4caml isn't in opam, it worked great the little I used it a couple years back
tane has quit [Client Quit]
<yawnt> mruby is designed to be embeddable, so i'd be surprised if it did
<yawnt> it has been embedded in other GC languages (ie: Go)
<yawnt> flux: i was actually looking for a Scheme to embed, never quite found the right one tho
<yawnt> they all seem to have.. weird C APIs
<flux> yawnt, did you look at rep?
<yawnt> nop, link?
<profan> yawnt: the amount of macros in scheme implementations is often a stopping block
* profan has tried the same thing with guile
<flux> profan, why is that a stopping block? aren't the macros implemented for you, all you need to implement is the mechanism :)
nopf has joined #ocaml
<profan> you can't "call" macros :P
<profan> they're part of the C "API"
<profan> so when you cross ffi boundaries into other languages, it's awful
<profan> you need to duplicate those parts
<yawnt> ohwell
<yawnt> my plan is to combine the bindings from ocaml-mruby with the ones to XCB
<yawnt> and write a small window manager that is programmable in ruby
<yawnt> we'll see how that plays out
<profan> sounds neat
* profan currently coming to terms with dypgen's syntax
<yawnt> yeah should be cool
<yawnt> i needed to find a project to learn ocaml, this is as good as any
Asmadeus_ is now known as Asmadeus
Simn has quit [Ping timeout: 252 seconds]
orbifx has joined #ocaml
zaquest has quit [*.net *.split]
exm has quit [*.net *.split]
Quintasan has quit [*.net *.split]
myst|fon has quit [*.net *.split]
sz0 has quit [*.net *.split]
k1000 has quit [*.net *.split]
dmbaturin has quit [*.net *.split]
kalzz has quit [*.net *.split]
rbocquet has quit [*.net *.split]
mattrepl has quit [*.net *.split]
jwatzman|work has quit [*.net *.split]
l1x has quit [*.net *.split]
Mercuria1Alchemi has quit [*.net *.split]
chenglou has quit [*.net *.split]
S11001001 has quit [*.net *.split]
Asmadeus has quit [*.net *.split]
oskarth has quit [*.net *.split]
tvaalen has quit [*.net *.split]
rfv has quit [*.net *.split]
dch has quit [*.net *.split]
emmanueloga has quit [*.net *.split]
w1gz has quit [*.net *.split]
rks` has quit [*.net *.split]
smondet has quit [*.net *.split]
vbmithr has quit [*.net *.split]
TheAuGingembre has quit [*.net *.split]
jun has quit [*.net *.split]
tumdum has quit [*.net *.split]
ousado has quit [*.net *.split]
iosys has quit [*.net *.split]
sheijk has quit [*.net *.split]
apache2 has quit [*.net *.split]
cdidd has quit [*.net *.split]
tristero has quit [*.net *.split]
alpen has quit [*.net *.split]
cschneid has quit [*.net *.split]
Leonidas has quit [*.net *.split]
dmiller has quit [*.net *.split]
clockish has quit [*.net *.split]
dinosaure has quit [*.net *.split]
_habnabit has quit [*.net *.split]
averell has quit [*.net *.split]
noplamodo_ has quit [*.net *.split]
maufred_ has quit [*.net *.split]
Riviera has quit [*.net *.split]
boegel has quit [*.net *.split]
jimt has quit [*.net *.split]
Nahra has quit [*.net *.split]
ahf has quit [*.net *.split]
adrien_znc has quit [*.net *.split]
flux has quit [*.net *.split]
rks` has joined #ocaml
smondet has joined #ocaml
sheijk has joined #ocaml
vbmithr has joined #ocaml
Quintasan has joined #ocaml
exm has joined #ocaml
Quintasan has quit [Changing host]
Quintasan has joined #ocaml
jimt has joined #ocaml
tumdum has joined #ocaml
rbocquet has joined #ocaml
tumdum has quit [Changing host]
tumdum has joined #ocaml
flux has joined #ocaml
mattrepl has joined #ocaml
maufred has joined #ocaml
ousado has joined #ocaml
apache2 has joined #ocaml
TheAuGingembre has joined #ocaml
k1000 has joined #ocaml
cdidd has joined #ocaml
zaquest has joined #ocaml
ahf has joined #ocaml
Nahra has joined #ocaml
tvaalen has joined #ocaml
cschneid has joined #ocaml
iosys has joined #ocaml
_habnabit has joined #ocaml
jwatzman|work has joined #ocaml
adrien_znc has joined #ocaml
tristero has joined #ocaml
w1gz has joined #ocaml
boegel has joined #ocaml
dmbaturin has joined #ocaml
jun has joined #ocaml
dmbaturin is now known as Guest21079
clockish has joined #ocaml
kalzz has joined #ocaml
MercurialAlchemi has joined #ocaml
dinosaure has joined #ocaml
tvaalen has quit [Changing host]
tvaalen has joined #ocaml
dmiller has joined #ocaml
so has joined #ocaml
jyc has quit [Ping timeout: 250 seconds]
orbifx has quit [*.net *.split]
noplamodo has joined #ocaml
alpen has joined #ocaml
jyc has joined #ocaml
Leonidas has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
orbifx has joined #ocaml
rfv has joined #ocaml
sz0 has joined #ocaml
Asmadeus has joined #ocaml
l1x has joined #ocaml
dch has joined #ocaml
chenglou has joined #ocaml
lokien has joined #ocaml
myst|fon has joined #ocaml
lokien has quit [*.net *.split]
rfv has quit [*.net *.split]
alpen has quit [*.net *.split]
dinosaure has quit [*.net *.split]
_habnabit has quit [*.net *.split]
ahf has quit [*.net *.split]
Nahra has quit [*.net *.split]
k1000 has quit [*.net *.split]
apache2 has quit [*.net *.split]
TheAuGingembre has quit [*.net *.split]
rand__ has quit [*.net *.split]
jeroud has quit [*.net *.split]
pootler_ has quit [*.net *.split]
sepp2k has quit [*.net *.split]
FreeBirdLjj has quit [*.net *.split]
rossberg has quit [*.net *.split]
parataxis has quit [*.net *.split]
cartwright has quit [*.net *.split]
oldmanistan_ has quit [*.net *.split]
wagle has quit [*.net *.split]
igitoor has quit [*.net *.split]
mietek has quit [*.net *.split]
jpdeplaix has quit [*.net *.split]
srax has quit [*.net *.split]
dexterph has quit [*.net *.split]
msch has quit [*.net *.split]
StatelessCat has quit [*.net *.split]
icicled has quit [*.net *.split]
cnu- has quit [*.net *.split]
dinosaure has joined #ocaml
apache2 has joined #ocaml
igitoor has joined #ocaml
Nahra has joined #ocaml
icicled has joined #ocaml
TheAuGingembre has joined #ocaml
k1000 has joined #ocaml
jpdeplaix has joined #ocaml
srax has joined #ocaml
rand__ has joined #ocaml
wagle has joined #ocaml
rossberg has joined #ocaml
lokien has joined #ocaml
FreeBirdLjj has joined #ocaml
mietek has joined #ocaml
_habnabit has joined #ocaml
ahf has joined #ocaml
cartwright has joined #ocaml
sepp2k has joined #ocaml
cnu- has joined #ocaml
StatelessCat has joined #ocaml
S11001001 has joined #ocaml
alpen has joined #ocaml
lukky513 has quit [Ping timeout: 272 seconds]
jyc has quit [Ping timeout: 257 seconds]
<orbifx> Hello all
oskarth has joined #ocaml
<lokien> hello orbifx
jyc has joined #ocaml
lukky513 has joined #ocaml
<Kakadu> рун
<Kakadu> hey
msch has joined #ocaml
oldmanistan_ has joined #ocaml
pootler_ has joined #ocaml
igitoor has joined #ocaml
igitoor has quit [Changing host]
<lokien> when I compile to .native on ubuntu, will my programs work on windows?
<Kakadu> nononononono
parataxis has joined #ocaml
<orbifx> lokien: no. Native means it's made for the platform & cpu. Maybe with bytecode
rfv has joined #ocaml
<orbifx> Kakadu: I mean to ask you, is there is support for adding context properties or with QmlPropertyMap?
<lokien> orbifx: so.. VMs?
<elfring> How much do you care about a risk for stack overflows if a function implementation seems to express endless recursion?
kushal has joined #ocaml
<orbifx> lokien: VMs? OCaml can generate bytecode, which has virtual machine if that is what you mean.
<Kakadu> man tailrecursion
emmanueloga has joined #ocaml
jeroud has joined #ocaml
<lokien> orbifx: boot up few virtual machines with windows and compile on them
<orbifx> lokien: if you care to do that. Sounds very involved. But might a straight forward way if you want to generate binaries for winblows
<def`> lokien: wine works reasonably well for me :)
<Kakadu> orbifx: It doesn't support this. I haven't seen this class before but it should be easy implementable
<lokien> hm, I'm on windows now, since ubuntu decided to screw up my internet connection. I'll try compilation here
<elfring> Kakadu: What are the circumstances that a (OCaml) compiler will convert a recursive tail function call into a while loop?
<orbifx> lokien: never done it, but see if ocamlopt has cross-compilation features
<orbifx> Kakadu: it would be really nice way of passing values between ocaml and qml, without having to subclass.
<Kakadu> elfring: I beleive it is guaranteed but I can't show you a proof now
<def`> elfring: OCaml has general tail calls, the call just as to be in tail position, it doesn't matter that it is tail recursion.
<lokien> orbifx: google shows nothing. so I guess it doesn't
<orbifx> lokien: I'll have a quick look too
<orbifx> with duckduckgo :D
<lokien> orbifx: "how to build an ocaml cross compiler" - stack overflow :D
<orbifx> yeah
<lokien> no opam for windows? fml
<elfring> Kakadu: Is it generally safer to express a function implementation in the way so that no additional source code transformation is needed?
<lokien> orbifx: why is everything from 2010? or 2005? :(
<orbifx> lokien:
<orbifx> probably things haven't changed much in the field.
<orbifx> There are more things out there, I won't spam you more.
<orbifx> But also know that cygwin provides ocaml on windows.
<lokien> oh, thanks!
darkf_ has joined #ocaml
<lokien> cygwin is awful, but I'll try it
<elfring> Do you care for algorithms which will only need limited stack storage?
<def`> Kakadu: it is guaranteed, with a limitation on the arity depending on the backend (always tail-call on bytecode, 21 arguments on x86)
<orbifx> lokien: it's the only way to get a unix-y system, as far as I know.
<lokien> orbifx: I'll try to get a unixy system from my ubuntu :D
<orbifx> way better ;)
<elfring> orbifx: What is the status of your evolving (background) processes for the vehicle application?
<orbifx> Rumour has it that all winblows machines will cease to work soon.
<orbifx> elfring: pretty good. If I find why my thread crashes :D
<orbifx> probably something silly I've done.
<lokien> orbifx: new CPUs will only work with win10 :(
darkf has quit [Ping timeout: 260 seconds]
octachron has joined #ocaml
<elfring> orbifx: How does a "thread" crash when you are dealing with processes?
lokien has quit [Read error: Connection reset by peer]
<orbifx> elfring: you are really fast with the questions... :P
Algebr has joined #ocaml
<elfring> orbifx: I am curious when I got enough information so that I can help also with a few answers.
Algebr is now known as Guest11111
MercurialAlchemi has quit [*.net *.split]
sgnb has quit [*.net *.split]
slicefd has quit [*.net *.split]
_andre has quit [*.net *.split]
Pepe_ has quit [*.net *.split]
silver has quit [*.net *.split]
ski has quit [*.net *.split]
Johann has quit [*.net *.split]
seliopou has quit [*.net *.split]
pippijn has quit [*.net *.split]
fds has quit [*.net *.split]
low-profile has quit [*.net *.split]
tianon has quit [*.net *.split]
Lasher` has quit [*.net *.split]
tianon has joined #ocaml
pippijn has joined #ocaml
Lasher` has joined #ocaml
MercurialAlchemi has joined #ocaml
sgnb has joined #ocaml
_andre has joined #ocaml
fds has joined #ocaml
slicefd has joined #ocaml
silver has joined #ocaml
seliopou has joined #ocaml
Pepe_ has joined #ocaml
kushal has quit [Ping timeout: 250 seconds]
low-profile has joined #ocaml
Johann has joined #ocaml
<orbifx> that's good elfring but it might be hard for people to keep up :P
Simn has joined #ocaml
<orbifx> is GDB debugging support for native programs there yet?
andreypopp_ has quit [Ping timeout: 260 seconds]
<orbifx> ok got it, it's working
ski has joined #ocaml
<def`> not yet
andreypopp_ has joined #ocaml
<orbifx> def`: not supported yet? It seems to be working for me
<def`> orbifx: ah. yes, you have stack unwindling support and locations
<def`> -l
Pepe_ has quit [*.net *.split]
_andre has quit [*.net *.split]
octachron has quit [*.net *.split]
lukky513 has quit [*.net *.split]
cdidd has quit [*.net *.split]
ousado has quit [*.net *.split]
maufred has quit [*.net *.split]
exm has quit [*.net *.split]
nopf has quit [*.net *.split]
gustav___ has quit [*.net *.split]
thizanne has quit [*.net *.split]
ohama has quit [*.net *.split]
SHODAN has quit [*.net *.split]
jlarocco has quit [*.net *.split]
tobiasBora has quit [*.net *.split]
AlexRussia has quit [*.net *.split]
MasseR has quit [*.net *.split]
johnelse has quit [*.net *.split]
Guest29407 has quit [*.net *.split]
stomp_ has quit [*.net *.split]
haesbaert has quit [*.net *.split]
jlouis has quit [*.net *.split]
inr has quit [*.net *.split]
orbitz has quit [*.net *.split]
darius93 has quit [*.net *.split]
__rlp has quit [*.net *.split]
fold3 has quit [*.net *.split]
Intensity has quit [*.net *.split]
Drup has quit [*.net *.split]
profan has quit [*.net *.split]
def` has quit [*.net *.split]
osheeta has quit [*.net *.split]
maufred has joined #ocaml
kandu has joined #ocaml
Pepe_ has joined #ocaml
thizanne has joined #ocaml
johnelse has joined #ocaml
Drup has joined #ocaml
__rlp has joined #ocaml
SHODAN has joined #ocaml
jlarocco has joined #ocaml
inr has joined #ocaml
nopf has joined #ocaml
lukky513 has joined #ocaml
kandu is now known as Guest2299
exm has joined #ocaml
johnelse is now known as Guest43501
MasseR has joined #ocaml
AlexRussia has joined #ocaml
ohama has joined #ocaml
octachron has joined #ocaml
cdidd has joined #ocaml
osheeta has joined #ocaml
darius93 has joined #ocaml
fold3 has joined #ocaml
tobiasBora has joined #ocaml
slicefd has quit [Quit: WeeChat 1.4]
octachron has quit [Client Quit]
mstevens has joined #ocaml
ousado has joined #ocaml
<mstevens> the book arrived hooray
<elfring> orbifx: Do you reuse any other software which was designed for parallel computing? http://projects.camlcity.org/projects/dl/ocamlnet-4.0.4/doc/html-main/Intro.html#ch_comp
Sim_n has joined #ocaml
gustav___ has joined #ocaml
haesbaert has joined #ocaml
_andre has joined #ocaml
stomp has joined #ocaml
Simn has quit [Ping timeout: 264 seconds]
ousado has quit [*.net *.split]
silver has quit [*.net *.split]
sepp2k has quit [*.net *.split]
srax has quit [*.net *.split]
Guest21079 has quit [*.net *.split]
jimt has quit [*.net *.split]
rks` has quit [*.net *.split]
vbmithr has quit [*.net *.split]
sheijk has quit [*.net *.split]
smondet has quit [*.net *.split]
patronus has quit [*.net *.split]
git-commit has quit [*.net *.split]
sternenseemann has quit [*.net *.split]
Maxdamantus has quit [*.net *.split]
Haudegen has quit [*.net *.split]
lyxia has quit [*.net *.split]
swistak35 has quit [*.net *.split]
musha68k has quit [*.net *.split]
_2can has quit [*.net *.split]
Fleurety has quit [*.net *.split]
zxqdms has quit [*.net *.split]
relrod has quit [*.net *.split]
asm89 has quit [*.net *.split]
zapu has quit [*.net *.split]
hbar_ has quit [*.net *.split]
petercommand has quit [*.net *.split]
vodkaInferno has quit [*.net *.split]
mrvn has quit [*.net *.split]
tizoc has quit [*.net *.split]
julienXX has quit [*.net *.split]
pdewacht_ has quit [*.net *.split]
nzyuzin_ has quit [*.net *.split]
phrst has quit [*.net *.split]
nullcatxxx_ has quit [*.net *.split]
c-c has quit [*.net *.split]
mfp has quit [*.net *.split]
phrst has joined #ocaml
c-c has joined #ocaml
sternenseemann has joined #ocaml
relrod_ has joined #ocaml
git-commit has joined #ocaml
relrod_ has quit [Changing host]
relrod_ has joined #ocaml
patronus has joined #ocaml
vodkaInferno has joined #ocaml
dmbaturin has joined #ocaml
zxqdms has joined #ocaml
srax has joined #ocaml
swistak35 has joined #ocaml
musha68k has joined #ocaml
Maxdamantus has joined #ocaml
silver has joined #ocaml
nzyuzin has joined #ocaml
nullcatxxx_ has joined #ocaml
c-c is now known as Guest72522
zapu has joined #ocaml
julienXX has joined #ocaml
sheijk has joined #ocaml
_2can has joined #ocaml
vbmithr has joined #ocaml
ousado has joined #ocaml
tizoc has joined #ocaml
dmbaturin is now known as Guest23500
sepp2k has joined #ocaml
mrvn has joined #ocaml
Haudegen has joined #ocaml
lyxia has joined #ocaml
hbar_ has joined #ocaml
Fleurety has joined #ocaml
asm89 has joined #ocaml
def` has joined #ocaml
myst|fon has quit [Ping timeout: 246 seconds]
stephe has quit [Ping timeout: 246 seconds]
jyc has quit [Ping timeout: 250 seconds]
cojy has quit [Ping timeout: 260 seconds]
sspi has quit [Ping timeout: 260 seconds]
yminsky has quit [Ping timeout: 260 seconds]
profan has joined #ocaml
smondet has joined #ocaml
jlouis has joined #ocaml
orbitz has joined #ocaml
Intensity has joined #ocaml
myst|fon has joined #ocaml
Intensity has quit [Max SendQ exceeded]
rks` has joined #ocaml
Intensity has joined #ocaml
pdewacht has joined #ocaml
jimt has joined #ocaml
stephe has joined #ocaml
chris2 has quit [Ping timeout: 250 seconds]
jyc has joined #ocaml
dhil has joined #ocaml
cojy has joined #ocaml
Haudegen has quit [Ping timeout: 268 seconds]
sspi has joined #ocaml
<orbifx> elfring: I'm reusing the Unix library.
kushal has joined #ocaml
yminsky has joined #ocaml
Guest11111 has quit [Ping timeout: 260 seconds]
<companion_cube> mstevens: which book? :)
chris2 has joined #ocaml
Riviera has joined #ocaml
<mstevens> companion_cube: Real World Ocaml
<elfring> def`: Do you perform any special checks for unbounded recursion even if a programming language like OCaml provides good support for tail calls?
Sim_n is now known as Simn
<orbifx> 2
<orbifx> Kakadu: are you about?
<companion_cube> mstevens: cool!
<mstevens> companion_cube: I started trying to read Practical Ocaml, but I'm not finding it good
<elfring> orbifx: Can the Unix library (alone) by OCaml be insufficient for your vehicle application? How do you think about the reuse of modules like Netmcore and Netcamlbox?
<mstevens> companion_cube: but I've read some of RWO online and it looked promising enough to buy
<mstevens> Also, I have a more general question, why *doesn't* steve yegge like ocaml?
<orbifx> elfring: so far it's sufficient.
<orbifx> mstevens: who is steve yegge?
octachron has joined #ocaml
<mstevens> orbifx: he's a dude who wrote some interesting tech blogs a while ago
_whitelogger has joined #ocaml
thizanne has joined #ocaml
cthuluh has joined #ocaml
danieli has joined #ocaml
djellemah has joined #ocaml
fluter has joined #ocaml
<Kakadu> orbifx: I'm here
stux|RC-only has joined #ocaml
<mstevens> companion_cube: I was thinking https://sites.google.com/site/steveyegge2/more-ocaml
<orbifx> elfring: No I haven't made a library
<orbifx> companion_cube: it seems to be a philosophy and without being an expert in the field, I think I agree with the view that it's better to just fork.
Guest2299 is now known as kandu
<mstevens> best I can find is a complaint that ocaml doesn't have a generic print function
lpaste has joined #ocaml
<elfring> orbifx: Are there any special constraints for your selection of appropriate software libraries?
<companion_cube> looks like a post that praises OCaml
<mstevens> companion_cube: note the bit at the top "ocaml has some fairly fundamental problems..."
jyc has quit [Ping timeout: 264 seconds]
<orbifx> elfring: yeah, get my work done :P
<mstevens> and, on further googling, his entire complaint seems to be the inability to print arbitrary objects
martintrojer has joined #ocaml
<orbifx> Kakadu: My call to a method is killing the program. I'm checking if it's some instation issue. I've not use Obj.magic before.
<companion_cube> heh
rand__ has quit [Quit: leaving]
<companion_cube> ppx_deriving.show to the rescue!
<companion_cube> (it's so awesome for, say, tests!)
freehck has quit [Remote host closed the connection]
<Kakadu> orbifx: Is your code based on my latest threads example?
tg has joined #ocaml
jyc has joined #ocaml
Haudegen has joined #ocaml
sepp2k has quit [Ping timeout: 255 seconds]
Leonidas_ has joined #ocaml
flx has joined #ocaml
bacam has joined #ocaml
AlexRussia has quit [*.net *.split]
sgnb has quit [*.net *.split]
emmanueloga has quit [*.net *.split]
oskarth has quit [*.net *.split]
alpen has quit [*.net *.split]
mietek has quit [*.net *.split]
_habnabit has quit [*.net *.split]
jpdeplaix has quit [*.net *.split]
TheAuGingembre has quit [*.net *.split]
chenglou has quit [*.net *.split]
Leonidas has quit [*.net *.split]
boegel has quit [*.net *.split]
jwatzman|work has quit [*.net *.split]
tristero has quit [*.net *.split]
flux has quit [*.net *.split]
cschneid has quit [*.net *.split]
MorTal1ty has quit [*.net *.split]
companion_cube has quit [*.net *.split]
mattg has quit [*.net *.split]
ggherdov_ has quit [*.net *.split]
Ankhers has quit [*.net *.split]
segmond has quit [*.net *.split]
mahem1 has quit [*.net *.split]
hnrgrgr has quit [*.net *.split]
ggole has quit [*.net *.split]
hanshenrik__ has quit [*.net *.split]
luigy_ has quit [*.net *.split]
lopex has quit [*.net *.split]
mehdi___ has quit [*.net *.split]
reynir has quit [*.net *.split]
bobthenameless has quit [*.net *.split]
rpip has quit [*.net *.split]
Madars has quit [*.net *.split]
sigjuice has quit [*.net *.split]
polaron has quit [*.net *.split]
Mandus has quit [*.net *.split]
theolaurent has joined #ocaml
cschneid_ has joined #ocaml
edwin has quit [*.net *.split]
Ravana has quit [*.net *.split]
cross has quit [*.net *.split]
Snark has quit [*.net *.split]
Khady has quit [*.net *.split]
jwatzman2 has joined #ocaml
flx is now known as flux
<orbifx> Kakadu: yeah
Mandus has joined #ocaml
reynir1 has joined #ocaml
edwin2 has joined #ocaml
companion_cube has joined #ocaml
alpen- has joined #ocaml
bobthenameless has joined #ocaml
<orbifx> Man the splits are mental
mietek_ has joined #ocaml
hanshenrik__ has joined #ocaml
hnrgrgr has joined #ocaml
ggole has joined #ocaml
mietek_ has quit [Changing host]
mietek_ has joined #ocaml
mahem1 has joined #ocaml
cross has joined #ocaml
segmond has joined #ocaml
<orbifx> Kakadu: I'm on xmpp too.
habnabit has joined #ocaml
jpdeplaix has joined #ocaml
polaron has joined #ocaml
edwin2 is now known as edwin
butts_butts has joined #ocaml
mehdi_ has joined #ocaml
Khady has joined #ocaml
Khady has quit [Changing host]
Khady has joined #ocaml
boegel has joined #ocaml
reynir1 is now known as reynir
tristero has joined #ocaml
Ravana has joined #ocaml
sigjuice has joined #ocaml
AlexRussia has joined #ocaml
<butts_butts> I'm trying to get Ocaml working on Windows, so followed the guide here: http://protz.github.io/ocaml-installer/
Madars has joined #ocaml
<butts_butts> All went smoothly enough. Went to install ocamlfind, just using opam install ocamlfind
<butts_butts> And I get an error saying:
<butts_butts> # Reason: dllunix.so: dynamic loading not supported on this platform.
<butts_butts> Anyone know what I might be missing..?
rpip has joined #ocaml
<orbifx> butts_butts: Linux :)
<butts_butts> haa
<butts_butts> Sure :P
<butts_butts> But the whole process does work with the Cygwin OCaml build and all that right
<companion_cube> sorry, I only have tried through: cygwin (which contains OCaml); then install opam from sources; then opam swich to 4.02.3
<orbifx> butts_butts: I see the article says to use cygwin. Did you install the OCaml packages from cygwin?
Ankhers has joined #ocaml
<butts_butts> Yup
<butts_butts> Followed that article
luigy has joined #ocaml
jyc has quit [Ping timeout: 264 seconds]
<elfring> companion_cube: Would you like to clarify safety checks around unbounded recursion because of special tail calls?
<orbifx> butts_butts: cause I don't know how old that article is. I have mine installed and i used the packages that came with cygwin
<butts_butts> Hmm
<butts_butts> So you're able to install ocamlfind?
<orbifx> I must have.. don't remember what I did now. I rarely use my winblows machine.
<orbifx> based on your error
jyc has joined #ocaml
abbiya has quit [Quit: Leaving]
Snark has joined #ocaml
dhil has quit [Ping timeout: 244 seconds]
<orbifx> ... abort that thought. Looking into it.
<butts_butts> ok :)
<Kakadu> orbifx: can you check that main () is executed before your crash happens?
<companion_cube> elfring: hu. unbounded recursion is useful for loops (servers, etc.) so what do you mean?
<butts_butts> Huh, weirdly if I try to execute ocamlfind from cygwin, it seems to already be there.
strmpnk has joined #ocaml
stephe has joined #ocaml
<butts_butts> Does the opam installer check for the existence of executables before installing?
<butts_butts> Guess not
<elfring> companion_cube: Does the OCaml compiler transform source code which contains unbounded recursion into an other control flow structure?
NhanH has joined #ocaml
<companion_cube> if it's a tailcall, then yes
<orbifx> butts_butts: yeah, it probably doesn't. And I said I'm pretty sure my setup is based on just cygwin. i don't have access to that machine.
Mandus has quit [Remote host closed the connection]
<orbifx> Kakadu: my main function? pretty sure. But As I said I need to double check the instantiation. Maybe I missed something.
<elfring> companion_cube: Where is this kind of source code transformation documented for tail calls?
dhil has joined #ocaml
Mandus has joined #ocaml
<companion_cube> in the manual
<elfring> orbifx: Is the discussed "main function" part of free software?
Leonidas_ is now known as Leonidas
caw has joined #ocaml
<orbifx> the example one? It was referred yesterday on a link
octachron has quit [Ping timeout: 250 seconds]
S11001001 has joined #ocaml
<Kakadu> maybe better name is 'initializer'
<elfring> companion_cube: Which paragraph should I read again in the manual?
Guest23500 has quit [Quit: When two people dream the same dream, it's multicast dream routing.]
octachron has joined #ocaml
<elfring> orbifx: Is the discussed vehicle application another evolving free software?
<companion_cube> elfring: ask google for 'tail recursion'
<orbifx> elfring: unfortunately no
seako has quit [Remote host closed the connection]
yminsky has quit [Remote host closed the connection]
stephe has quit [Remote host closed the connection]
caw has quit [Remote host closed the connection]
BitPuffin has joined #ocaml
lokien has joined #ocaml
dmbaturin has joined #ocaml
chenglou has joined #ocaml
<elfring> companion_cube: Do you refer to the software optimisation possibility of "tail call elimination"?
sepp2k has joined #ocaml
ggherdov_ has joined #ocaml
kushal has quit [Quit: Leaving]
Janni has joined #ocaml
antkong_ has joined #ocaml
bacam has quit [Quit: leaving]
bacam has joined #ocaml
<Janni> Hello. I'm an Ocaml newbie and I have a question concerning initial values in an class/object definition. I'm a bit unsure about how to initialise the values, because there are the values I have to assign anyway, there are initialisers, and I can use class parameters (is that the right name?).
Guest11111 has joined #ocaml
<dmbaturin> Janni: If you are an ocaml newbie, you probably should not be using objects. :)
Kakadu has quit [*.net *.split]
t4nk597 has quit [*.net *.split]
<Janni> So, I'm just wondering, are there guidelines like "never use class parameters for that!" or "use an initialiser if..." or "never use complex expressions for the predefined values"...
<dmbaturin> They are a special case, for when OOP is really the best thing to do.
mattg has joined #ocaml
<def`> what dmbaturin said, however prefer expressions over initializers
<ggole> Janni: you can use let bindings just before the object ... end in order to do calculations prior to construction of the object, or use initializers which run after construction.
<companion_cube> elfring: yes
foolishmonkey has joined #ocaml
<dmbaturin> Janni: The default ways to enforce encapsulation in people's minds is abstract types (and closures), and the default way to generalize is parametric polymorphism and functors.
<Janni> As a Haskeller I'm probably a bit too eager to use structural inheritance once again. :-)
iZsh has quit [Quit: ZNC - http://znc.in]
<Janni> (I mean after not having had it with Haskell...)
NingaLeaf has quit [Read error: Connection reset by peer]
iZsh has joined #ocaml
<elfring> Janni: How helpful do you find an article like "https://ocaml.org/learn/tutorials/objects.html" for your questions?
lokien has quit [Remote host closed the connection]
<Drup> Janni: well, you have structure inheritance without objects
<Drup> with modules :3
<elfring> companion_cube: I m still unsure if the OCaml compiler will "optimise" unbounded recursion away. How much does "tail call elimination" matter in such an use case?
<companion_cube> please read the manual -_-
<companion_cube> let rec foo () = ...... ; foo () will be converted into a while loop or something similar, that's it
<companion_cube> it's not about unbounded recursion but tail recursion
<elfring> companion_cube: Is it occasionally nicer to express such a while loop directly in a function implementation?
<companion_cube> probably...?
* mstevens read some more of RWO, looks very promising
hanshenrik_ has joined #ocaml
lokien_ has joined #ocaml
<elfring> companion_cube: Is it just a coding style preference about using tail recursion or a while loop?
<octachron> companion_cube, to be fair, the manual does not describe tail recursion at all :(
darkf_ has quit [Read error: Connection reset by peer]
darkf_ has joined #ocaml
hanshenrik__ has quit [Ping timeout: 244 seconds]
<octachron> elfring, is it just a coding style preference to not just write down the right Turing machine for every program?
jeffmo has joined #ocaml
<def`> \o/
kushal has joined #ocaml
darkf_ has quit [Quit: Leaving]
Guest11111 has quit [Ping timeout: 268 seconds]
<companion_cube> are the slides from yesterday's OUPs online?
mj12` has quit [*.net *.split]
regnat has quit [*.net *.split]
Kakadu has joined #ocaml
antkong_ has quit [Ping timeout: 255 seconds]
mj12` has joined #ocaml
lopex has joined #ocaml
oskarth has joined #ocaml
jeroud has quit [Ping timeout: 268 seconds]
regnat has joined #ocaml
butts_butts has quit [Ping timeout: 268 seconds]
jeroud has joined #ocaml
stephe has joined #ocaml
copy` has joined #ocaml
dksong has joined #ocaml
emmanueloga has joined #ocaml
alpen- has quit [Ping timeout: 268 seconds]
copy` has quit [Read error: Connection reset by peer]
nuuit has joined #ocaml
copy` has joined #ocaml
alpen has joined #ocaml
strmpnk has quit [Read error: Connection reset by peer]
strmpnk has joined #ocaml
jwatzman2 is now known as jwatzman|work
jwatzman|work has joined #ocaml
jwatzman|work has quit [Changing host]
yminsky has joined #ocaml
caw has joined #ocaml
butts_butts has joined #ocaml
myst|fon has quit [Read error: Connection reset by peer]
myst|fon has joined #ocaml
seako has joined #ocaml
octachron has quit [Ping timeout: 250 seconds]
th5 has joined #ocaml
stephe has quit [K-Lined]
seako has quit [K-Lined]
caw has quit [K-Lined]
oskarth has quit [K-Lined]
Sorella has joined #ocaml
habnabit has quit [Ping timeout: 240 seconds]
MorTal1ty has joined #ocaml
stephe has joined #ocaml
Guest11111 has joined #ocaml
oldmanistan_ has quit [Ping timeout: 268 seconds]
oldmanistan_ has joined #ocaml
jeffmo has quit [Quit: jeffmo]
exm has left #ocaml [#ocaml]
tane has joined #ocaml
larhat has joined #ocaml
_habnabit has joined #ocaml
<Janni> I'm not planning on asking these kinds of questions too often, but could someone give me an elegant translation of "any p xs" from Haskell? Laziness is not an issue here.
<Janni> any :: (a -> Bool) -> [a] -> Bool
<Drup> List.exists
<flux> translation to what?
<flux> oh, right, to ocaml standard lib :)
<Drup> Janni: don't worry about asking, it's fine
dksong has quit [Quit: Leaving.]
<Janni> Thanks. I should have found it with http://ocamloscope.herokuapp.com/
<flux> yep. the type would be: ('a -> bool) -> 'a list -> bool
<Janni> But I was looking for "bool list -> bool" which didn't yield anything useful.
<companion_cube> grr, ocamlscope annoys me, it's so unmaintained
butts_butts has quit [Ping timeout: 268 seconds]
MercurialAlchemi has quit [Ping timeout: 240 seconds]
<flux> elfring, often times you want to pass new data to the new round, and while cannot do that. to do that with while you would need to use references. but they are shun :)
oldmanistan_ has quit [Ping timeout: 268 seconds]
oldmanistan_ has joined #ocaml
FreeBird_ has joined #ocaml
Guest11111 has quit [Ping timeout: 268 seconds]
pierpa has joined #ocaml
FreeBird_ has quit [Remote host closed the connection]
FreeBirdLjj has quit [Ping timeout: 265 seconds]
jwatzman|work has quit [Read error: Connection reset by peer]
jwatzman|work has joined #ocaml
Riviera has quit [Quit: Reconnecting]
vpm has joined #ocaml
Riviera has joined #ocaml
butts_butts has joined #ocaml
S11001001 has quit [Read error: Connection reset by peer]
S11001001 has joined #ocaml
hanshenrik_ is now known as hanshenrik
larhat has quit [Quit: Leaving.]
nicooo has quit [Remote host closed the connection]
nicooo has joined #ocaml
dhil has quit [Ping timeout: 250 seconds]
Guest38 has joined #ocaml
hcarty has joined #ocaml
lokien has joined #ocaml
Anarchos has joined #ocaml
butts_butts has quit [Remote host closed the connection]
butts_butts has joined #ocaml
nicholasf has joined #ocaml
<lokien> do we have any string size limit?
octachron has joined #ocaml
<flux> we do, on 32-bit platforms it's only 16 megabytes. on 64-bit platforms.. it's a lot more
<flux> Sys.max_string_length tells you the limit
<flux> on my system it's 144115188075855863
<lokien> that's in megabytes?
<yawnt> mm
<yawnt> why would merlin complain about unbound module X in Emacs
<yawnt> if I have PKG X in my .merlin?
<hcarty> lokien: It's in bytes
<hcarty> yawnt: The package may not be installed. Or the findlib package name may not match the module name, depending on the library.
butts_butts_ has joined #ocaml
<yawnt> hcarty: a restart fixed it
<yawnt> weird
<lokien> hcarty: so.. 134217728 GB? sweet!
butts_butts has quit [Ping timeout: 240 seconds]
<Janni> Is there syntax for ad-hoc inheritance? That is if c and d are classes: let o = new c inherit d method f = ...
pierpa has quit [Read error: Connection reset by peer]
<Janni> So that I can make instances of virtual classes with their own implementation of the methods?
pierpa has joined #ocaml
<lokien> Janni: why do you want to do oop so badly, if you're a haskeller? :D
nicholasf has quit []
<Janni> I'm working on a little pet project (a small game with different kinds of moving objects), and OOP just suggests itself. But I concede that I possibly should be using OCaml's module system instead...
<lokien> I'd personally only use oop with gui stuff (buttons etc). you can program your game functionally (or imperatively)
MercurialAlchemi has joined #ocaml
<ggole> Janni: close, let o = object inherit d method f = .. end
AlexRussia has quit [Quit: WeeChat 1.4-dev]
Guest11111 has joined #ocaml
slash^ has joined #ocaml
AlexRussia has joined #ocaml
<Janni> ggole: Thanks!
seako has joined #ocaml
Guest43501 is now known as johnelse
caw has joined #ocaml
oskarth has joined #ocaml
aantron has joined #ocaml
<Janni> How do I express in a signature: a type of object which inherits class c and d?
<lokien> why can't I use snd with ~f label, with List.map function?
<Janni> OK, I just discovered constraint clauses
<aantron> lokien: are you using jane street core or the standard library?
<lokien> aantron: core
<aantron> what is your expression and what is the error message?
<ggole> Janni: you can use inherit in type signatures
<aantron> looks like you dont have core's List in scope
<lokien> hm, let's see
<ggole> (Although I don't think that works for object types, just for class types.)
<aantron> did you do open Core.Std?
<lokien> aantron: duh, I had reloaded utop to see max string length :D
<lokien> thanks :D
<aantron> :)
<lokien> how do we name a function which returns a bool? in clojure, I'd end it with a question mark
seangrove has joined #ocaml
<lokien> like: contains?
<aantron> sometimes is, like is_open, sometimes contains
octachron has quit [Quit: Leaving]
<lokien> no question marks?
nuuit has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
<aantron> those arent valid in identifiers
nuuit has joined #ocaml
<lokien> sweet :D
<Janni> How do I best coerce xs of type "a list" to a "b list"?
<asmanur_> what do you mean coerce ?
<aantron> does the subtype relation apply between 'a and 'b?
<Janni> Yes.
relrod_ is now known as relrod
Guest11111 has quit [Ping timeout: 248 seconds]
<ggole> (xs :> b list)
<Janni> Hmm. I thought I had tried that.
<Janni> It was the obvious thing. Thanks anyway!
<lokien> how to find if every thing in a list is the same?
<lokien> find out* [1;2;3] -> false ; [1;1;1] -> true
<lokien> something with fold_left?
<ggole> function [] -> true | x::xs -> List.for_all ((=) x) xs
<lokien> I thought it was a better way. thank you :D
jeffmo has joined #ocaml
<Janni> Sorry to bother you with Haskell but: \xs -> and $ zipWith (==) xs (tail xs)
<Janni> I'm not fluent enough in Ocaml to translate that on the fly.
<Janni> (and it's not necessarily better :-)
<lokien> ggole: it doesn't work though, type error. (I'm using core)
<lokien> Janni: I don't think we have zipWith here
shinnya has joined #ocaml
Anarchos has quit [Quit: Page closed]
Guest11111 has joined #ocaml
<ggole> zipWith = List.map2
<lokien> ohh, right
dhil has joined #ocaml
<ggole> And the OCaml version of that won't do the right thing anyway, since it will strictly evaluate tail xs and die for empty lists.
<lokien> :^(
<lokien> so it's true ocaml is dying
dexterph has joined #ocaml
orbifx has quit [Quit: WeeChat 1.4]
dhil has quit [Ping timeout: 248 seconds]
<hcarty> lokien: ? ggole's response should do what you want, minus whatever changes are required to match Core's API
warp has quit [Quit: /!\ Session Terminated. https://i.imgur.com/vyxw0mB.gif]
<Janni> I think I asked that earlier already: What's the type of an objects that inherits classes c and d?
<hcarty> lokien: You probably need to add a ~f label to the function. Core changes the signature of a lot of functions vs the stdlib
<hcarty> lokien: Or swap the position of xs and the function
<lokien> hcarty: oh, sure. it works now! I couldn't wrap my mind around these errors, thanks
<Janni> I know that such a type expression must exist because if c's set of methods is {f} and d's set of methods is {g}, then I could write something like <f; g>, right?
<ggole> There's no object type shortcut like that, only a class type shortcut
<seangrove> Does merlin autocomplete work for things like let% ?
<Janni> ggole: What would be the class type shortcut?
<Janni> inherit ... inherit ...?
<ggole> Yeah
<ggole> So you might write in a signature class foo : object inherit foo end
lokien_ has quit [Quit: Connection closed for inactivity]
<Janni> So, if I want to work with a list of type 'a objects that inherit from c and d, do I need to first declare "class e = object inherit c inherit d"?
<Drup> seangrove: no
<seangrove> Oh man, trying out https://github.com/mirage/ocaml-magic-mime - anything under the mirage banner is usually nerve-wrecking to try, and this hasn't been touched in a year
<seangrove> Drup: And that's because it's camlp4?
<ggole> You need a class (or a class type) if you want to refer to the type explicitly (which you might, because of the occasional need for coercions)
<Drup> seangrove: it's not camlp4, it's ppx, so no
<Drup> it's just because there is no real index of the %thingy available ..
<seangrove> Drup: Ah, ok. I thought I read that merlin could handle ppx extensions automatically, and thought that would include everything
<seangrove> Is there a name for the class of stuff it can't autocomplete?
<Drup> well, ppx syntax extensions are ... not really in the language
<seangrove> Heh, ok, so it can't handle any ppx syntax extensions?
<seangrove> That's easy enough, just trying to get a rough approximation so I know when my setup is broken, and when to keep digging
<smondet> seangrove: usually if the ppx creates functions after one compilation pass, if merlin sees the `.cmi` files, the generated code is available for completion
<Drup> seangrove: I'm not sure what you are trying to say
reynir has quit [Ping timeout: 268 seconds]
<companion_cube> I'd hope a mime library written in OCaml would be called 'madam mime' https://www.youtube.com/watch?v=zANV9XNwfE4
mfp has joined #ocaml
reynir has joined #ocaml
flux has quit [Remote host closed the connection]
flux has joined #ocaml
sigjuice has quit [Ping timeout: 240 seconds]
mietek_ has quit [Ping timeout: 240 seconds]
sspi has quit [Ping timeout: 240 seconds]
cojy has quit [Ping timeout: 240 seconds]
NhanH has quit [Ping timeout: 240 seconds]
l1x has quit [Ping timeout: 240 seconds]
oldmanistan_ has quit [Read error: Connection reset by peer]
msch has quit [Ping timeout: 240 seconds]
oskarth has quit [Read error: Connection reset by peer]
pootler_ has quit [Read error: Connection reset by peer]
sz0 has quit [Read error: Connection reset by peer]
al-maisan has quit [Ping timeout: 240 seconds]
boegel has quit [Remote host closed the connection]
mehdi_ has quit [Quit: No Ping reply in 180 seconds.]
alpen has quit [Ping timeout: 240 seconds]
rpip has quit [Ping timeout: 240 seconds]
cschneid_ has quit [Ping timeout: 240 seconds]
zozozo has quit [Ping timeout: 240 seconds]
Asmadeus has quit [Ping timeout: 240 seconds]
mietek_ has joined #ocaml
bitbckt has quit [Ping timeout: 240 seconds]
igitoor has quit [Ping timeout: 240 seconds]
edwin has quit [Ping timeout: 240 seconds]
dexterph has quit [Ping timeout: 240 seconds]
mehdi_ has joined #ocaml
boegel has joined #ocaml
msch has joined #ocaml
sigjuice has joined #ocaml
NhanH has joined #ocaml
Quintasan has left #ocaml [#ocaml]
l1x has joined #ocaml
pootler_ has joined #ocaml
cschneid_ has joined #ocaml
al-maisan has joined #ocaml
zozozo has joined #ocaml
edwin has joined #ocaml
sspi has joined #ocaml
bitbckt has joined #ocaml
igitoor has joined #ocaml
alpen has joined #ocaml
cojy has joined #ocaml
rpip has joined #ocaml
sz0 has joined #ocaml
oldmanistan_ has joined #ocaml
Asmadeus has joined #ocaml
igitoor has joined #ocaml
igitoor has quit [Changing host]
oskarth has joined #ocaml
antkong has joined #ocaml
exm has joined #ocaml
shinnya has quit [Ping timeout: 250 seconds]
Guest11111 has quit [Ping timeout: 244 seconds]
<Kakadu> I'm in strange doubts: can I call a C function `value asdf(value _,..................)` from another function with similiar signature?
<lokien> can I include many let .. in .. bindings? let x y = 2 1 in .. ?
<aantron> lokien: let x = 2 and y = 1 in ...
<aantron> Kakadu: are you asking whether a C function can call another C function?
<lokien> aantron: thanks :)
<aantron> lokien: also let x, y = 2, 1 in ...
<aantron> this is matching a tuple pattern against a tuple
<Kakadu> aantron: I'm asking can CAMLlocalN and CAMLreturn in this function create some problems?
<Kakadu> function*
<Kakadu> functions*
<aantron> ok, so you mean calling one entry point from another.. i dont readily know. perhaps someone else can say. in any case, you can move your implementation to a third function, or use https://github.com/ocamllabs/ocaml-ctypes
malc_ has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
<elfring> Is it possible to determine if a specific OCaml compiler version supports the technique "tail call elimination"? https://www.quora.com/What-is-tail-recursion-Why-is-it-so-bad
<companion_cube> all of them
<jyc> you can always write a tail recursive function and see if it stack overflows :)
<aantron> i believe all variants of ML support tail call elimination as a basic feature
<aantron> in fact the Quora answer says so
<aantron> (for OCaml in particular)
demonimin has joined #ocaml
<zozozo> small remark: functional languages without tail call optimization would be weird....
<companion_cube> ^
<lokien> zozozo: *ekhem* clojure *ekhem*
alexst has joined #ocaml
<aantron> => clojure is weird :)
<Drup> (And it's not guaranteed in rust ...)
<lokien> is it bad that my tic tac toe game seems monolithic? it's only 86 lines so far :^(
<aantron> "seems monolithic"?
<lokien> code is tangled a bit :D
<zozozo> lokien: ideally, the interface part should be separated from the logic part I'd say
<lokien> zozozo: it's a cli game which I'm making to teach myself ocaml
<zozozo> nice
<companion_cube> rust isn't really functional
<elfring> aantron: How do you think about the wording "In other languages like OCaml, the compiler gives you the same promise …" in the referenced article? Where should I find this "promise" for "proper tail calls" (or "tail call elimination") in the provided documentation explicitly?
julien_t has quit [Ping timeout: 250 seconds]
<mstevens> companion_cube: I don't disagree, but it has some interesting functional-inspired aspects
<companion_cube> agreed
<foolishmonkey> lokien, did you implement AI?
<lokien> foolishmonkey: it's a social game, you have to invite someone to your house to play it
<lokien> :^)
<foolishmonkey> lokien, :D
<foolishmonkey> code a four in a row, it's a more interesting gme
<foolishmonkey> and the code is more complex
<lokien> foolishmonkey: I'll be doing cli battleships when I'm done with that
<foolishmonkey> for battleships you need network or a safe way to prohibit cheating
<foolishmonkey> that's not easy tasks
<lokien> foolishmonkey: who said I'm a sane person
<foolishmonkey> You chose your nick
madroach has quit [Quit: leaving]
lokien has left #ocaml ["Leaving"]
insane_person has joined #ocaml
<insane_person> hello
mfp has quit [Remote host closed the connection]
ygrek has joined #ocaml
mfp has joined #ocaml
<insane_person> foolishmonkey: I don't know how to translate loop/recur though :(
<foolishmonkey> to translate loop/recur?
Janni has quit [Quit: Bye]
ggole has quit []
<insane_person> foolishmonkey: clojure thing for recursion. https://clojuredocs.org/clojure.core/loop
Haudegen has quit [Ping timeout: 264 seconds]
antkong___ has joined #ocaml
<insane_person> that example is straightforward : https://clojuredocs.org/clojure.core/loop#example-542692d4c026201cdc326ff6
antkong has quit [Ping timeout: 250 seconds]
antkong___ is now known as antkong
hcarty has quit [Ping timeout: 248 seconds]
<insane_person> can I create initial bindings in a recursive function?
Kakadu has quit [Quit: Page closed]
kushal has quit [Quit: Leaving]
<pierpa> not as nicely as in clojure/scheme unfortunately
<insane_person> can someone guide me on priv? I don't want to spam here that much
<insane_person> only main function left!
antkong has quit [Ping timeout: 248 seconds]
<pierpa> there's no problem talking in public. It's not like the channel is flooded
hcarty has joined #ocaml
<insane_person> hm, okay. prepare for very bad style then
antkong_ has joined #ocaml
<insane_person> I'm starting to write "game" function now, everything besides that works as it should
<insane_person> I tried to match only i, board i, doing _ stuff, nothing works
<aantron> elfring: i don't recall where in OCaml, let me take a look and see if i can find it
alexst has quit [Ping timeout: 250 seconds]
mietek_ is now known as mietek
hcarty has quit [Ping timeout: 250 seconds]
mietek has quit [Changing host]
mietek has joined #ocaml
mietek has joined #ocaml
antkong_ has quit [Client Quit]
Haudegen has joined #ocaml
kushal has joined #ocaml
cat5e has quit [Ping timeout: 244 seconds]
<aantron> ive only been able to find implicit references, such as the option -annot refers to tail calls, and library functions such as those in List refer to tail recursion, which they wouldnt if the compiler wasn't performing the optimization
<pierpa> the only way of writing long running programs would be by using 'while', if there were no proper tail calls
<aantron> pierpa: the question is whether the manual explicitly promises that the compilers will perform it
<elfring> aantron: Are there chances to make the support for this special technique any more explicit?
<pierpa> the only way of writing turing-complete programs, actually
<pierpa> yes, I understand :)
<aantron> ok :)
<pierpa> elfring, it's not a special technique. It's a normal one
<aantron> elfring: i suppose someone could request to patch the docs. that the OCaml compilers do this optimization is currently part of the surrounding lore and culture of ML, perhaps it's such a basic assumption that it didnt occur to put it in an obvious place in the manual :)
<companion_cube> it is in the manual, I think
<companion_cube> everyone knows that OCaml performs TCE, in any c ase, and that it plays a central role
Haudegen has quit [Ping timeout: 265 seconds]
<pierpa> on the other hand, I suppose the manual does not mention the runtime stack
<pierpa> so, there's no reason to believe that something that is never mentioned will overflow
<mstevens> for scheme, the language spec explicitly says thou must support efficient tail recursion
<aantron> same for SML iirc
<pierpa> yes, but ocaml has not a definition as formal as scheme and sml
<pierpa> *does not have a ...
<insane_person> guys? anybody? :(
<pierpa> insane, I see some problems in your game function
<pierpa> but I got distracted along the way :)
<insane_person> pierpa: I see them too, but I can't fix em
exm has left #ocaml [#ocaml]
<pierpa> first, matching on board is superfluous
<pierpa> and on i, is weird
<pierpa> I'd just use a couple of ifs
<insane_person> hm, that's because I didn't know how to do x, o, x, o
<insane_person> so I used i. and when it's odd, o moves, when it's even, x moves
<insane_person> (or the other way, I don't really remember)
<pierpa> you have a match on i wnd the only distinguishing is in when guards
<aantron> elfring: here is the best reference i found: at the bottom of http://caml.inria.fr/pub/docs/manual-ocaml/debugger.html#sec351
alexst has joined #ocaml
<aantron> "Exceptions: A function application followed by a function return is replaced by the compiler by a jump (tail-call optimization). In this case, no event is put after the function application."
<aantron> i believe that strictly speaking this can be argued to apply only to ocamlc
<insane_person> pierpa: do we have anything like "case"?
<insane_person> or switch?
<mstevens> insane_person: just as a learner this is all pretty interesting to read
<insane_person> mstevens: we can talk about it when I'm done
<mstevens> insane_person: personally I feel like you want some types
<pierpa> insane_person: yes, match
<pierpa> match i mod 2 with 0 -> even case | 1 -> odd case
<insane_person> pierpa: so why doesn't it work?! :D
<insane_person> mstevens: later :v
<pierpa> does not work in which way
<insane_person> pierpa: in a way I was doing it. now I'll try your match
<elfring> Do any other technical writers care about to mention the discussed details at more "prominent" places in the documentation (than besides the debugger description)?
<aantron> elfring: i think it should be mentioned prominently, since it's very important to using OCaml effectively
<pierpa> your prompt function boils down to: while true do o_moves board; x_moves board done
<aantron> not to mention properly understanding the meaning of "this function is tail-recursive" in the library docs, without a prior background in FP
<insane_person> mstevens: eh, screw it, I need some types
djellemah_ has joined #ocaml
<pierpa> the language reference is not a manual for learning CS, though
<aantron> but nothing you learn in CS implies that OCaml does support tail recursion, or does not support it
<aantron> tail call optimization*
<aantron> though it does hint that it should, if OCaml is sane :)
<pierpa> then someone will asks that the manual should explain floating point arithmetic
hcarty has joined #ocaml
<pierpa> -s
mstevens has quit [Quit: leaving]
<aantron> well if OCaml had a mysterious type "real" like SML does, it might be worth pointing out that it's a floating-point number
<aantron> i dont think we are saying that the reference should explain what TCE is, just that OCaml does perform it
<pierpa> ok, maybe a line somewhere whould be present :)
<pierpa> *should
dhil has joined #ocaml
BitPuffin has quit [Read error: Connection reset by peer]
<pierpa> and maybe there is, just we couldn't find it :)
<aantron> pierpa: perhaps, but i did a case-insensitive grep for "tail" in the manual, and the statement in the debugger chapter is the most explicit reference i could find
<yawnt> companion_cube: ping
Haudegen has joined #ocaml
alexst_ has joined #ocaml
<pierpa> btw, does the manual explain that ocaml uses applicative order evaluation?
<aantron> i.e. call-by-value?
<pierpa> yes
<pierpa> no, sorry
<pierpa> eager evaluation
<pierpa> in contrast to normal order, as in Haskell, for example
<aantron> ah
<pierpa> I don't thing this is mentioned anywhere in the manual :)
<pierpa> *think
alexst has quit [Ping timeout: 248 seconds]
<aantron> i couldnt find references with a brief search for call, value, applicative, or eager
<pierpa> :)
_andre has quit [Quit: leaving]
<companion_cube> yawnt: ?
Soni has joined #ocaml
<aantron> there is a description of call-by-value here, http://caml.inria.fr/pub/docs/manual-ocaml/expr.html#sec120, but i havent seen any discussions for other constructs that would rule out normal order evaluation. i havent been thorough or done any non-trivial reasoning, however
<insane_person> when they were saying ocaml is a "language for smart people", I thought they were exaggerating :(
<Drup> I would rather say that it doesn't hide the complexity behind void*
<Drup> But apparently, it's a point that is highly contentious :D
<insane_person> see you in two years, when I'll write my first working program in it :D
<aantron> the empty source file compiles to a working program :)
* insane_person tries that
<insane_person> second *
<pierpa> lol
pflanze has joined #ocaml
<insane_person> and how do I use all these types? this is madness!
<aantron> i guess let also is described as eager. most likely if you read all the sections here http://caml.inria.fr/pub/docs/manual-ocaml/expr.html you can reason that ocaml uses applicative order evaluation pervasively. of course, it's not as easy to deal with as just a one-line claim somewhere in the manual
<yawnt> companion_cube: uhm, dunno, i was having an issue with MyOCamlbuildBase being unbound
<pierpa> Yes, agreed. Actually the function application section explains it. So I was wrong
<yawnt> and google brought up something you said on IRC on the very same repo
<pierpa> aantron ^
<yawnt> but looks like I fixed it, no idea how :)
<pflanze> Hello. Is there a way to specify source location information in OCaml source code? (like #line and #file in C and hopefully a column specification)
<hcarty> pflanze: __LINE__ and several others
<pflanze> (Or is there a better format to use when targetting Ocaml from a compiler? Currently not writing the compiler in Ocaml though.)
<pflanze> Thanks, checking
<hcarty> pflanze: Unless I misunderstood what you're asking... if you mean cpp-style location hints then I'm not sure.
<pflanze> Yes, I'm talking about those.
<aantron> e.g. #12 "foo"
Kakadu has joined #ocaml
lordf has joined #ocaml
<insane_person> do you write your .mli by hand? if I have something.inferred.mli and something.mli, which one compiler will use?
<yawnt> anyone has experience with Cstubs and OASIS?
<yawnt> the whole process looks.. daunting :P
<aantron> something.mli, corresponding to something.ml
<aantron> i write my .mlis by hand, but having the compiler infer it can be a starting point
<aantron> but i usually want to constrain the .ml file so much that i dont want the inferred .mli anyway
<pflanze> aantron, thanks!
<insane_person> aantron: do I have to put every function in .mli file?
<aantron> no, just ones you want to be able to use outside the module
<aantron> in fact, thats one of the major reasons to use .mli in the first place
Janni_ has joined #ocaml
<Janni> Hello.
<aantron> hi
<insane_person> aantron: what if I don't want to use them in other modules, but want my custom types?
<Janni> I'm currently experimenting with OCaml's system. I've been getting the error "The instance variable self cannot be accessed from the definition of another instance variable" when using self#f() on the right hand side of a class value...
<Janni> I suppose there's a good reason why this is not possible?
<aantron> insane_person: not sure what you mean. you want to declare types somewhere? they can (and will have to be) declared in the .ml file. what do you want the .mli file for?
<aantron> or you just want a separate module containing only types?
<insane_person> aantron: so.. if I write type something = string, it'll affect all strings in my functions?
<aantron> no, but what do you mean by "affect"?
<aantron> if you write type something = string, you will just be able to use "something" as a fancy synonym for "string" in your types
<aantron> unless you make something abstract using a signature, then code outside the module won't know that "soemthing" is a string
<aantron> "know"
<insane_person> hrm, previously I had a function of type string -> string. after I declare that type, it'll have type of something -> something?
<insane_person> automatically?
<aantron> no
<aantron> you have to change it to something -> something
<insane_person> how?
<aantron> ah
<insane_person> :D
<aantron> you are not using type ascriptions
<aantron> so yes it will have types string -> string, something -> something, something -> string, and string -> something, and so on for all synonyms of string
<aantron> because at that point "something" is simply the same thing as "string"
<insane_person> how can I change that function to have type of something -> something and not accept regular strings?
<aantron> what exactly do you want it to accept?
darkf has joined #ocaml
<Janni> Concrete example: In a class definition I'd like to say: val thread = return self#someLoop. So I'd like to store the thread objects of that class run as a value. So I can easily kill the thread from various points. I can work around the error, but it seems awkward.
<aantron> if you want the strings to have been validated somehow, you could use a module with an abstract type, where "something" is known to be a "string" internally, but is opaque to the "outside world"
<aantron> then the only way to construct the "something" will be to validate a string
<insane_person> aantron: ugh >:C
<insane_person> but thank you
<aantron> but are you sure "something" should be a string?
<insane_person> hm, maybe I'll explain it again, I think I wasn't clear enough earlier
zoobab has quit [Ping timeout: 248 seconds]
<insane_person> I have a function, with type string -> string. I want to create custom type(type something = string), so that function will only accept strings of that type
<insane_person> but not other strings
<insane_person> function "regular string" would throw a type error
<aantron> right, we understood each other. i believe an abstract type is how you do that
<aantron> i am just asking whether you really need "something" to be a string in your implementation, because if not, you might not have to resort to abstract types to distinguish it from string
zoobab has joined #ocaml
<insane_person> I.. have to print it later, so it has to be a string, I think
<aantron> not if you can convert it to string.. after all, you can print ints that way
<aantron> (for example)
<insane_person> show me two approaches if you can
<aantron> i need to know what "something" actually is supposed to represent, thats why im asking
<aantron> Janni: i hope someone with more experience with the object system can help you.
<elfring> Janni: Has a variable name like "thread" got a remarkable risk for further confusion around the desired clarification od affected implementation details?
<Janni> My current solution: val multable thread = return () initializer thread <- someLoop() (*which uses #self*)
<insane_person> aantron: field in a tic tac toe board
<Janni> elfring: Hmm. This is not about the name of the variable. I named it differently in the actual code.
<aantron> a location in a field? use int * int, or something like that, depending on your representation
<aantron> a value in a field? a variant like Empty | X | O
<insane_person> aantron: https://bpaste.net/show/d3ca472b1635
<insane_person> look at first_board
<insane_person> that's the board
<aantron> the current state of the game? type value = Empty | X | O type state = value array
<elfring> Janni: Which task would you like to connect with your "thread"?
<aantron> yeah, this could instead be
<aantron> [| Empty; Empty; Empty; Empty; Empty; Empty; Empty; Empty; Empty;
<aantron> |]
<aantron> as one representation
<insane_person> I'd have problems with accessing/extracting values then
<aantron> how so?
<Janni> elfring: It's a small simulation game, so it's a thread that implements the behaviour of a farm animal. Need more details? ;-)
<aantron> you just need to be able to compute string location -> index
<aantron> but if you want, you can also store a map of string location -> state
<aantron> so you'd use a (string, value) Hashtbl.t
<aantron> your locations would still be strings in this case, but at least we would have turned your state cells into a variant instead of strings
<aantron> i guess thats not really different from List.assoc right now, except for the usage of the variant type "value"
Simn has quit [Quit: Leaving]
<insane_person> aantron: sorry, my head had imploded
<aantron> insane_person: why do you want different types for some functions anyway?
<elfring> Janni: It will help to add some information incrementally. I guess that some software developers appreciate to talk about nice animals and farming occasionally. ;-)
<insane_person> aantron: because some guy on irc said types would be nice.
<aantron> types are (incredibly useful) tool but if you dont have a need to use them, don't. if you have a goal like "i want this function to accept only a set of certain 'valid' values", then you need types
<aantron> i mean "i want to code this functon as if it only accepts..."
<aantron> in practice, that kind of assumption is very useful, and you will want to use it all the time, so you will want to use types
<aantron> but if you dont need it now for this program, dont use them now. people will say your program is bad, and indeed it is quite unidiomatic
<aantron> but its much easier to learn how to use types in general and ocaml types in particular once you feel a strong need for them
<insane_person> aantron: that program pasted on bpaste, or that one I'm trying to create with types?
<aantron> i got the impression that you are trying to modify the pasted program to use types
<insane_person> yeah
<aantron> or i should say, to use types more appropriately
<insane_person> but which one is unidiomatic and bad
<aantron> the pasted one
<aantron> im not saying its "bad", its definitely not idiomatic though
<aantron> insane_person: are you familiar with enumeration types or variant types?
<insane_person> aantron: yeah
<insane_person> familiar = I know what they are
<aantron> good, so when would you use such a thing?
<insane_person> when.. I need it?
<aantron> hehe, when is that?
<insane_person> when I want my function to only accept some kinds of data, but refuse to take other data?
<insane_person> or when I want to encapsulate data for safety
<insane_person> no?
<aantron> more like when you want the surrounding language to forbid calling your function, except with values from a certain small set of values
<aantron> so thats why i am saying to replace your "-" "x" and "o" with a variant type
<aantron> that would be "idiomatic" ocaml
<insane_person> hm, right
<aantron> if this type is called "value"
<aantron> then you will need to write two functions, string -> value, and value -> string
<insane_person> I had used python/clojure for too much
<insane_person> aantron: how would they look like?
slash^ has quit [Read error: Connection reset by peer]
<insane_person> something like | X -> "x" ?
<aantron> the "implciit" reason the first function is needed is because ocaml is telling you "you need to validate arbitrary input"
<aantron> yes
<insane_person> oh, duh
<insane_person> it's beautiful
<aantron> and the reason the second function is needed is because ocaml sucks at converting variants to string, unless you use typeconv or some other library :)
<aantron> but that ocaml forces you to write the first function is a very good thing
<aantron> the first one will just be like "... = function | "x" -> X | "o" -> O | "-" -> Empty" (if you need that last case)
<aantron> i gtg for an hour or so, but we can continue this discussion later if you want, if someone else doesnt jump in :)
<insane_person> no "deriving show"? that's sad
<aantron> yes, there is ppx_deriving
<insane_person> kay, have fun. and thanks :)
<aantron> its a library
<aantron> enjoy
Soni is now known as cat5e
kushal has quit [Quit: Leaving]
Haudegen has quit [Ping timeout: 276 seconds]
danieli has joined #ocaml
danieli has quit [Changing host]
seangrove has quit [Ping timeout: 240 seconds]
MercurialAlchemi has quit [Ping timeout: 248 seconds]
ollehar has joined #ocaml
<Janni> What's the best way to do something n times? Or replicate an element n times : int -> 'a -> ['a]
<companion_cube> use an alternative stdlib, or write the function yourself (which is easy)
MercurialAlchemi has joined #ocaml
<icicled> is there an option in utop to turn off the bar with the time, command #, and counter?
<companion_cube> #utop_prompt_simple;;
<companion_cube> or #utop_prompt_dummy;;
<companion_cube> but the # will remain, as in the toplevel
<icicled> thanks, that helps! it's a lot clearer now
<icicled> the bar is distracting
<insane_person> can the bar get even fancier?
<hcarty> insane_person: utop gives you that power
<hcarty> Use it wisely
<insane_person> hcarty: I want fancier bar! with combo counter and explosions!
<insane_person> seriously, I loved that in atom
Haudegen has joined #ocaml
djellemah_ has quit [Ping timeout: 240 seconds]
yomimono has joined #ocaml
<wirrbel> I want to use a file in utop /ocaml
<wirrbel> typically I used ##use "mymod.ml"
<wirrbel> sorry, s/##/#
<wirrbel> anyway, now I use another file in that module, myothermod.ml
<companion_cube> I'm starting to grok the choice of your pseudo, insane_person ;)
<wirrbel> which gives me an error "Error: Reference to undefined global `Myothermod`"
<insane_person> companion_cube: it's in today's log
copy` has quit [Quit: Connection closed for inactivity]
<hcarty> wirrbel: #mod_use "myothermode.ml";;
<wirrbel> thank hcarty
<wirrbel> now I can load it as a module, but now I get a type error although ocamlfind compiles it nicely
<wirrbel> hmm
<wirrbel> ah, got it
malc_ has quit [Quit: leaving]
elfring has quit [Quit: Konversation terminated!]
tane has quit [Ping timeout: 248 seconds]
yomimono has quit [Quit: Leaving]
copy` has joined #ocaml
raphaelss has joined #ocaml
<insane_person> aantron: hey, shh
dhil has quit [Ping timeout: 240 seconds]
dexterph has joined #ocaml
nadirvardar has joined #ocaml
<aantron> insane_person: hi
aantron has quit [Remote host closed the connection]
<companion_cube> pfff, incremental contains half the dependencies on planet JST
MercurialAlchemi has quit [Ping timeout: 250 seconds]
<insane_person> aand he's gone :(
Algebr has joined #ocaml
<icicled> could someone please point out what I'm doing wrong in this curl example - it always times out w/o writing the email data I've specified: http://sprunge.us/cPhX
<icicled> output: http://sprunge.us/IfZP
<icicled> adding a print stmt to email_data shows that the function is called repeatedly till the timeout occurs
<edwin> you probably have to return an empty string at some point to stop it
hanshenrik_ has joined #ocaml
aantron has joined #ocaml
<icicled> oh
<edwin> I think its meant for streaming transfer
nadirvardar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<edwin> you give it chunks of data each time
<edwin> not the whole thing at once
<icicled> ah I missed that
<edwin> val set_readfunction : t -> (int -> string) -> unit (** [readfunction n] should return string of length at most [n], otherwise transfer will be aborted (as if with exception) *)
<edwin> also n is the max size
<aantron> insane_person: aand he's back
nadirvardar has joined #ocaml
<insane_person> aantron: oh hai :D
<insane_person> aantron: but I already forgot what I wanted to say to you :D
hanshenrik has quit [Ping timeout: 240 seconds]
<icicled> edwin: thanks - I wish the ocamldoc was a bit clearer
<aantron> alright, np :)
<edwin> for C bindings it sometimes helps to consult the original C lib's docs (when there are any)
<icicled> yea, I'm going to have to pay closer attention to that
<insane_person> aantron: but you can talk to me, since I'm a dummy and like to learn
<insane_person> (if you have time)
hcarty has quit [Quit: WeeChat 1.4]
<aantron> sure, but prompt me, in pm if you like
alexst_ has quit [Quit: leaving]
aantron has left #ocaml ["Leaving..."]
aantron has joined #ocaml
foolishmonkey has quit [Quit: Leaving]
raphaelss has quit [Ping timeout: 250 seconds]
foolishmonkey has joined #ocaml
th5 has quit [Quit: Textual IRC Client: www.textualapp.com]
JacobEdelman_ has joined #ocaml
pgiarrusso_ has joined #ocaml
pgiarrusso has quit [Ping timeout: 248 seconds]
pgiarrusso_ is now known as pgiarrusso
idegen has joined #ocaml
manizzle has joined #ocaml
nadirvardar has quit [Quit: Textual IRC Client: www.textualapp.com]
pgiarrusso has quit [Quit: pgiarrusso]
pgiarrusso has joined #ocaml
butts_butts_ has quit [Ping timeout: 240 seconds]
insane_person has quit [Quit: Leaving]
antkong_ has joined #ocaml
pgiarrusso has quit [Quit: pgiarrusso]
pgiarrusso has joined #ocaml
orbifx has joined #ocaml
<orbifx> map greet everyone
lordf has quit [Ping timeout: 240 seconds]
ollehar has quit [Quit: ollehar]
<aantron> - : unit list
<companion_cube> Lwt_list.iter_p greet everyone
<companion_cube> for concurrent greetings
ril has joined #ocaml
<aantron> - : unit Lwt.t
<orbifx> :P
<orbifx> irc server might consider it flooding :P
<companion_cube> Lwt_list.iter_p (fun person -> Lwt_pool.acquire pool_of_5 (fun () -> greet person)) everyone
sepp2k has quit [Quit: Leaving.]
<orbifx> better :P
Guest12385 has joined #ocaml
ousado has quit [Ping timeout: 248 seconds]
Guest12385 has quit [Quit: ZNC 1.6.2 - http://znc.in]
aantron has quit [Remote host closed the connection]
seangrove has joined #ocaml
pgiarrusso has quit [Quit: pgiarrusso]
<seangrove> Hey all, it seems that there's no pure-ocaml implementation of bcrypt/scrypt (ocaml-safepass seems very nice on top of it) - I suppose this means that unikernel/jsoo use is out of the question?
<Drup> At this point of the conversation, I want to point out that salting on the client is a stupid idea
<seangrove> Drup: Heh, absolutely fair. I'm thinking of target envs for my blog post though
<seangrove> e.g. nodejs, xen images, standard ocaml binary, etc.
<Drup> (And afaik, no, that's why everyone uses cryptokit)
<Drup> It's not an issue for unikernel, though
<seangrove> Drup: Oh, how so?
<orbifx> seangrove: have you checked if this function exists in an unlikely library?
<seangrove> orbifx: I haven't, good question
<Drup> seangrove: nocrypto works on xen
<orbifx> I remember finding some crypto functions stashed away in an inconspicuous
<orbifx> library
<Drup> It's not incomspicuous, it's called "nocrypto" :D
<seangrove> Drup: I see the mention of nocrypto here, yes http://lists.xenproject.org/archives/html/mirageos-devel/2016-01/msg00041.html
<seangrove> Great, glad to see it - thanks!
<Drup> orbifx: that's still a binding
<orbifx> or sorry, are you looking for ocaml implementation?
<orbifx> pure-ocaml, I see
<Drup> seangrove: in general, you can cross compile C stuff to xen, but it needs a bit of effort, so it's not instantly available.
<Drup> (like, there is zarith and zarith-xen ...)
<orbifx> seangrove: Isn't a unikernel compiled on a different host machine?
<orbifx> cause what I'm getting at, is that as Drup says, might be best to compile from an existing library. Writing security related code like this would require auditing, which I'm sure existing libraries have received in abundance.
<seangrove> orbifx: Definitely - but it's a similar challenge to that of e.g. openssl
<orbifx> similar challenge?
<orbifx> in what context?
<seangrove> Drup: Had no idea that cross compiling stuff was an option, will hold that in the back of my mind, thanks