zpe has quit [Read error: Connection reset by peer]
zpe has joined #ocaml
dmi3y has quit [Quit: dmi3y]
<Onemorenickname>
and with no plugin ?
dmi3y has joined #ocaml
<Drup>
either use packs (meh) or write the Tools module yourself
<Onemorenickname>
drup, I tried to write it myself, but when I "ocamlc tools/tools.ml work/work.ml", I got an unbound module error
<Drup>
... use a build system.
<Drup>
trust me, it's for your own sanity ;)
<Onemorenickname>
more complexity :'(
minn has joined #ocaml
AlexDenisov has joined #ocaml
<Drup>
actually, no, devising your own build system will be more complex.
octachron has joined #ocaml
<Onemorenickname>
Drup, what is the simplest build system out there for ocaml ? One where I can just give the path of the files, specify one "main", and get "a.out" ?
conrad4 has joined #ocaml
orbifx-m has joined #ocaml
<orbifx-m>
What is essentially the difference between struct and record?
<orbifx-m>
Other than a syruct'
<Drup>
Onemorenickname: both oasis and ocamlbuild do that
<orbifx-m>
Other than that maybe a struct could potentially execute code internally?
conrad4 has quit [Ping timeout: 260 seconds]
<Onemorenickname>
Drup, i tried with ocamlbuild but could not find an easy command to that (i had to set package in _tags and stuff like that)
<Onemorenickname>
I'll try oasis then
<Drup>
with ocamlbuild, you would just call "ocamlbuild -use-ocamlfind foo.native" (if foo.ml is the main)
<companion_cube>
-package somelib
minn has quit [Ping timeout: 260 seconds]
dhil has quit [Ping timeout: 260 seconds]
djellemah has quit [Ping timeout: 256 seconds]
infinity0 has quit [Ping timeout: 276 seconds]
<reynir>
debian unstable decided to remove opam in an update /o\
pippijn_ has joined #ocaml
AdmWiggin has joined #ocaml
<Onemorenickname>
well, i tried again ocamlbuild, but I only get unbound module errors, i.give.up for now
whisperedcigar has quit [Ping timeout: 245 seconds]
nathanielc_ has joined #ocaml
madroach has quit [*.net *.split]
emias has quit [*.net *.split]
Muzer has quit [*.net *.split]
AlexRussia has quit [*.net *.split]
srax has quit [*.net *.split]
nathanielc has quit [*.net *.split]
pippijn has quit [*.net *.split]
Khady has quit [*.net *.split]
rwmjones_hols has quit [*.net *.split]
def` has quit [*.net *.split]
tianon has quit [*.net *.split]
rwmjones has joined #ocaml
djellemah has joined #ocaml
Muzer has joined #ocaml
jao has quit [Ping timeout: 256 seconds]
silver has joined #ocaml
brunoro has joined #ocaml
TarV has quit [Quit: Leaving]
whisperedcigar has joined #ocaml
Khady has joined #ocaml
Khady has joined #ocaml
madroach has joined #ocaml
def` has joined #ocaml
agarwal1975 has joined #ocaml
<freehck>
Onemorenickname: all you need is not write a _tags file where include subdirectories and set package(...) for files.
djellemah has quit [Ping timeout: 256 seconds]
sh0t has quit [Ping timeout: 245 seconds]
whisperedcigar has quit [Ping timeout: 245 seconds]
<orbifx-m>
Can a record have a function value as a field type?
<Drup>
yes
minn has joined #ocaml
DavidGu has joined #ocaml
M-jimt has quit [Remote host closed the connection]
bugabinga[m] has quit [Remote host closed the connection]
timclassic has quit [Remote host closed the connection]
Guest23668[m] has quit [Read error: Connection reset by peer]
regnat[m] has quit [Read error: Connection reset by peer]
M-Illandan has quit [Write error: Connection reset by peer]
barkmadley[m] has quit [Read error: Connection reset by peer]
Bluddy[m] has quit [Remote host closed the connection]
diamaths[m] has quit [Write error: Connection reset by peer]
M-martinklepsch has quit [Read error: Connection reset by peer]
M-ErkkiSeppl has quit [Remote host closed the connection]
srenatus[m] has quit [Write error: Connection reset by peer]
M-pesterhazy has quit [Write error: Connection reset by peer]
regnt[m] has quit [Write error: Connection reset by peer]
lpw25[m] has quit [Write error: Broken pipe]
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sh0t has joined #ocaml
djellemah has joined #ocaml
whisperedcigar has joined #ocaml
AlexDenisov has joined #ocaml
minn has quit [Ping timeout: 250 seconds]
conrad4 has joined #ocaml
DavidGu has quit [Quit: DavidGu]
dhil has joined #ocaml
conrad4 has quit [Ping timeout: 244 seconds]
<orbifx-m>
Drup: does it require any strange syntax?
rgrinberg has joined #ocaml
<Drup>
not really
<Drup>
there is a slight priority issue on ";", so if you are using a lambda directly, you need to put parens around it
<Drup>
but that's all
DavidGu has joined #ocaml
jg_ has quit [Ping timeout: 256 seconds]
<orbifx-m>
Ok.. getting unbound type constructor
regnat[m] has joined #ocaml
jimt[m] has joined #ocaml
martinklepsch[m] has joined #ocaml
bugabinga[m] has joined #ocaml
tim[m] has joined #ocaml
srenatus[m] has joined #ocaml
Bluddy[m] has joined #ocaml
pesterhazy[m] has joined #ocaml
regnat_[m] has joined #ocaml
illandan[m] has joined #ocaml
plqa has quit [Quit: Page closed]
minn has joined #ocaml
djellemah has quit [Ping timeout: 245 seconds]
chris2 has quit [Ping timeout: 256 seconds]
<orbifx-m>
Works fine if I'm doing it without a functor
adi___ has quit [Ping timeout: 256 seconds]
adi___ has joined #ocaml
bitbckt has quit [Ping timeout: 256 seconds]
infinity0 has joined #ocaml
bitbckt has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
chris2 has joined #ocaml
Pepe_ has quit [Remote host closed the connection]
minn has quit [Ping timeout: 245 seconds]
letaris has joined #ocaml
noddy has joined #ocaml
dmi3y has quit [Quit: dmi3y]
yomimono has joined #ocaml
minn has joined #ocaml
srax has joined #ocaml
emias has joined #ocaml
AlexRussia has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 252 seconds]
whisperedcigar has quit [Ping timeout: 245 seconds]
dmi3y has joined #ocaml
dhil has quit [Ping timeout: 256 seconds]
minn has quit [Ping timeout: 244 seconds]
minn has joined #ocaml
nomicflux has joined #ocaml
minn has quit [Ping timeout: 245 seconds]
jmiven has quit [Quit: co'o]
jmiven has joined #ocaml
marsam has joined #ocaml
MercurialAlchemi has joined #ocaml
sh0t has quit [Remote host closed the connection]
jnavila has quit [Quit: It was time]
infinity0 has quit [Read error: Connection reset by peer]
infinity0 has joined #ocaml
ryanartecona has joined #ocaml
<dxtr>
How do you guys find compile-time errors? This type inference stuff drives me nuts
<haesbaert>
dxtr: are you using merlin ?
TarVanimelde has joined #ocaml
al-damiri has joined #ocaml
DavidGu has quit [Quit: DavidGu]
<dxtr>
I thought I was
veggie_ has joined #ocaml
<flux>
step 1) merlin 2) if it's not enough, annotate value types as you think they are
<dxtr>
Well it is using merlin-mode
<dxtr>
But it doesn't really report any errors or auto-completes for me
<dxtr>
okay nevermind
ryanartecona has quit [Quit: ryanartecona]
Pepe_ has joined #ocaml
Pepe_ has quit [Client Quit]
<flux>
C-c C-t in emacs tells the type of the expression under cursor
<flux>
that's the key ;)
<flux>
though merlin should also give errors
<dxtr>
It doesn't give me any errors :/
<dxtr>
oh lol
<dxtr>
Had to run C-c C-x
conrad4 has joined #ocaml
djellemah has joined #ocaml
<dxtr>
http://pastebin.com/t3PEvmLK <- I love the fact that it says that pattern matching is not exhaustive because it doesn't match 'Some _'
<dxtr>
When that's literally what I match
<theblatte>
dxtr: yeah, that branch is captured by the inner match just above :/
<TarVanimelde>
Put parentheses around the start and end of the inner match
<dxtr>
Why is it?
<theblatte>
you started a match, so each branch is attached to the closest match
conrad4 has quit [Ping timeout: 250 seconds]
AlexRussia has quit [Ping timeout: 268 seconds]
<dxtr>
/usr/bin/ld: /home/dxtr/.opam/4.03.0/lib/ocaml/libasmrun.a(startup_aux.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
<dxtr>
Uhm.. What the hell :p
<dxtr>
A lot of strange stuff have been happening since I switched to Debian
<dxtr>
Hmm, maybe I should recompile ocaml
Pepe_ has joined #ocaml
Pepe_ has quit [Client Quit]
fraggle-boate_ has joined #ocaml
fraggle-boate has quit [Ping timeout: 245 seconds]
Pepe_ has joined #ocaml
AlexRussia has joined #ocaml
jjkkkkk has joined #ocaml
pierpa has joined #ocaml
jjkkkkk has quit [Client Quit]
Pepe_ has quit [Client Quit]
Pepe_ has joined #ocaml
Pepe_ has quit [Client Quit]
Pepe_ has joined #ocaml
TarV has joined #ocaml
Pepe_ has quit [Client Quit]
TarVanimelde has quit [Ping timeout: 250 seconds]
Pepe_ has joined #ocaml
ryanartecona has joined #ocaml
tobiasBora has joined #ocaml
dmi3y has quit [Quit: dmi3y]
Algebr has joined #ocaml
dmi3y has joined #ocaml
<dxtr>
Hmm, strange
<average>
dxtr: did you.. copy your ~/.opam from your previous install?
<average>
dxtr: but.. like the compiler tells you, you can recompile with -fPIC
<dxtr>
average: No I did not actually
<dxtr>
I moved my old .opam
<average>
same
<dxtr>
So why didn't opam compile ocaml with -fPIC?
<average>
if you're using all your binary stuff in your old ~/.opam from your previous system, you have a problem
<dxtr>
Well I'm not :p
<average>
because there's symbols in there refering to libraries from your previous system
<average>
oh you're not
<average>
hm ok
<average>
well yeah, -fPIC but.. I feel like that should've been taken care of by the package maintainer for the libasmrun..
<average>
usually when these linker errors throw you off into a rabbit hole and then you have toread all the Makefiles generated and change stuff and it takes a lot of time
<dxtr>
Thing is that it wasn't just libasmrun
<dxtr>
It was a whole lot of different libraries
<average>
it was everything yeah
<dxtr>
Yeah
<average>
how new is 4.03 ?
<average>
also.. what's your gcc version..
<average>
anyhow, i'm saying you should aim for new gcc toolchain and new ocaml
<dxtr>
6.2.0
<average>
i see
<dxtr>
Running opam init again to see what happens
<average>
well.. I would actually look into the most recent version available that someone else was able to get working properly
<average>
for example.. the OCaml package maintainers for Debian
<average>
they have tons of experiencing building things, and if you poke at their stuff with a stick.. you might find out what versions of things to use and how they got things working
<average>
just my 2c
<dxtr>
Let's start with this first :p
kevinch has joined #ocaml
kevinch has quit [Client Quit]
<average>
dxtr: hm, but why not the packaged ocaml?
<average>
similarly, why not use packages from your distro for those libraries you need
<average>
those are all working since they've been tested by maintainers
jao has joined #ocaml
dhil has joined #ocaml
tane has joined #ocaml
average has quit [Ping timeout: 260 seconds]
average has joined #ocaml
minn has joined #ocaml
troydm has quit [Ping timeout: 250 seconds]
troydm has joined #ocaml
rand__ has joined #ocaml
johnf_ has quit [Remote host closed the connection]
AdmWiggin is now known as tianon
fedruantine has quit [Ping timeout: 252 seconds]
zpe has quit [Remote host closed the connection]
rgrinberg has quit [Ping timeout: 260 seconds]
flx has joined #ocaml
lopex has quit [Read error: Connection reset by peer]
mankyKitty has quit [Read error: Connection reset by peer]
<dxtr>
average: This assumes there are libraries for my distro for those libraries I need
yminsky has quit [Read error: Connection reset by peer]
sspi has quit [Read error: Connection reset by peer]
Guest71678 has quit [Read error: Connection reset by peer]
mrallen1 has quit [Write error: Connection reset by peer]
adelbertc has quit [Write error: Connection reset by peer]
bigs has quit [Write error: Connection reset by peer]
NhanH has quit [Write error: Connection reset by peer]
al-damiri has quit [Read error: Connection reset by peer]
mcspud has quit [Ping timeout: 256 seconds]
lopex has joined #ocaml
mankyKitty has joined #ocaml
djellemah has quit [Ping timeout: 252 seconds]
slash^ has joined #ocaml
mrallen1 has joined #ocaml
sspi has joined #ocaml
Muzer has quit [Ping timeout: 256 seconds]
cantstanya has quit [Ping timeout: 256 seconds]
jun has quit [Ping timeout: 256 seconds]
martinklepsch[m] has quit [Ping timeout: 256 seconds]
pesterhazy[m] has quit [Ping timeout: 256 seconds]
regnat_[m] has quit [Ping timeout: 256 seconds]
illandan[m] has quit [Ping timeout: 256 seconds]
regnat[m] has quit [Ping timeout: 256 seconds]
Bluddy[m] has quit [Ping timeout: 256 seconds]
srenatus[m] has quit [Ping timeout: 256 seconds]
bugabinga[m] has quit [Ping timeout: 256 seconds]
tim[m] has quit [Ping timeout: 256 seconds]
jimt[m] has quit [Ping timeout: 256 seconds]
dlat has quit [Ping timeout: 256 seconds]
yminsky has joined #ocaml
dlat has joined #ocaml
flux has quit [Remote host closed the connection]
adelbertc has joined #ocaml
flx is now known as flux
NhanH has joined #ocaml
Guest71678 has joined #ocaml
bigs has joined #ocaml
al-damiri has joined #ocaml
<average>
dxtr: I see. you can make some if there aren't any
kevinch has joined #ocaml
<dxtr>
err, this assumes there are packages for my distro*
<dxtr>
Yeah, making debian packages.. No thanks :)
jun has joined #ocaml
<average>
dxtr: rummaging through and turning over some stone in the debian package maintainers repos can provide a lot of interesting insight
<dxtr>
I generally avoid everything Debian
mcspud has joined #ocaml
<average>
it's ironic that you avoid everything debian, yet here you are using it
<dxtr>
Yeah, this is the exception :p My work laptop
cantstanya has joined #ocaml
<dxtr>
I had to use something that wasn't *BSD and I'm not touching Windows so Linux it is. And Debian was the first thing that came to my mind
<dxtr>
Well look at that. Now it works.
eh_eff has joined #ocaml
minn has quit [Quit: Leaving]
brunoro has quit [Ping timeout: 250 seconds]
Muzer has joined #ocaml
letaris has quit [Ping timeout: 250 seconds]
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbifx-m has quit [Quit: AtomicIRC: The nuclear option.]
octachron has quit [Quit: Page closed]
fantasticsid has joined #ocaml
nomicflux has quit [Quit: nomicflux]
djellemah has joined #ocaml
clog has quit [Ping timeout: 260 seconds]
kakadu has quit [Quit: Konversation terminated!]
djellemah has quit [Client Quit]
TarV has quit [Read error: Connection reset by peer]
conrad4 has joined #ocaml
Sorella has quit [Quit: Connection closed for inactivity]
kevinch has quit [Quit: Computer has gone to sleep.]
eh_eff has quit [Ping timeout: 260 seconds]
<malc_>
dxtr: impressive for a first attempt
<copy`>
dxtr: You can pass arguments like this: `String.concat ~sep:"/"`
malc_ has quit [Quit: ERC (IRC client for Emacs 25.0.50.2)]
<veggie_>
dxtr: yea fuck DRY. :) btw what is "+>"?
<dxtr>
copy`: Hmm, last time I tried that I think it complained so I gave up.. But I must've been drunk
<dxtr>
veggie_: Isn't that some monadic combinator mumbo jumbo for the Command module?
<dxtr>
I assumed it was a trick question
<veggie_>
i'm a noob too, was a genuine question
<veggie_>
i see
<dxtr>
Yeah, well, it's a combinator for the Command module :p
kevinch has joined #ocaml
<dxtr>
If you, for example, want to have multiple flags
<octachron>
dxtr, it might be nice to factorize the handling of the None case in the *_backlight functions
Sorella has joined #ocaml
<copy`>
dxtr: I think it's bad style to open many modules, especially Result might bring some unexpected things into scope
<dxtr>
copy`: Oh I thought I had to open Result if I wanted to use Ok and Error
<dxtr>
Well then
<dxtr>
I'm learning stuff :)
<rgrinberg>
dxtr: Ok/Error will be available if you just open Core.Std
<dxtr>
Yeah I noticed
<dxtr>
octachron: Also, yes, I was thinking the same thing
<dxtr>
But I couldn't quite come up with a good way to do it
djellemah has joined #ocaml
<dxtr>
All those functions basically look the same
<dxtr>
And inc/dec looks sort of the same too
veggie_ has quit [Ping timeout: 265 seconds]
<rgrinberg>
something like val modify_backlight : option device -> (int -> int) -> unit perhaps
brunoro has joined #ocaml
<octachron>
dxtr, a possibility might be to define "let with_backlight f device_option = match device_option with None -> … | Some x -> f x "
jg_ has joined #ocaml
dmi3y has quit [Quit: dmi3y]
brunoro has quit [Ping timeout: 268 seconds]
yomimono has quit [Ping timeout: 256 seconds]
<dxtr>
That's pretty smart
<dxtr>
What about those two pattern matches in inc_backlight and dec_backlight?
ryanartecona has joined #ocaml
minn has joined #ocaml
rgrinberg has quit [Ping timeout: 250 seconds]
<octachron>
dxtr, the "Ok x -> f x | Error msg -> print msg" ones?
<dxtr>
yeah
<dxtr>
guess I could do something similar there
veggie_ has joined #ocaml
<minn>
For some reason, OPAM installed OCaml without dynamic linking on Debian. To the best of my knowledge, dynamic linking should be supported. Is there any way to enable this without reinstalling or compiling re-compiling?
jao has quit [Ping timeout: 260 seconds]
<dxtr>
minn: The same thing happend for me, actually
<dxtr>
Just today
<dxtr>
Reinstalling ocaml worked for me
<minn>
Interesting. Thanks for the confirmation. Did you reinstall from OPAM or source?
<dxtr>
from opam
<minn>
Okay, I'll give that a try. Thanks
eh_eff has joined #ocaml
<dxtr>
Can I send infix functions as a parameter and do like '1 f 2'?
<flux>
dxtr, well, no. you can however pass infix function as a regular parameter function: foo ( + )
<flux>
why ( + ) instead of (+) you may ask. it's because (*) starts a comment, and it must be written as ( * ), therefore some people like to follow the same pattern for all operators.
<dxtr>
That's what I asked :P
<dxtr>
Right
<dxtr>
Oh yeah
<dxtr>
And then I'll do `f 1 2`
<flux>
yes
<dxtr>
Perfect
<flux>
you can also do: let foo ( +| ) a b = a +| b
<flux>
not sure if you want to, though ;)
<dxtr>
hehe
kevinch has quit [Quit: Computer has gone to sleep.]
<minn>
dxtr: Can I ask how to reinstalled OCaml from OPAM? opam init --comp doesn't seem to be recompiling ocaml and ocamlc.
<dxtr>
rm -rf ~/.opam && opam init --comp=4.03.0
<minn>
Oh, I didn't realize I needed to manually clean .opam
<flux>
- Lwt is now automatically tested on OS X, Cygwin, and Windows, in addition to Linux, with more platforms planned, - there are documentation improvements, - more test cases are being written, .. what's this, is this the most mature ocaml project?!
brunoro has joined #ocaml
tane has quit [Quit: Leaving]
brunoro has quit [Ping timeout: 245 seconds]
dhil has joined #ocaml
conrad4 has joined #ocaml
<aantron>
flux: unfortunately
conrad4 has quit [Ping timeout: 250 seconds]
dhil has quit [Ping timeout: 265 seconds]
marsam has quit [Remote host closed the connection]
<Leonidas>
aantron: thanks for maintaining lwt, much appreciated!
<Algebr>
aantron: a hero has arisen
<aantron>
thanks :) so yeah i hope to change those things in the near term, and maintain lwt as would be done in a larger language community, or in industry. then maybe write a blog post or three about what to do
<aantron>
lol
<aantron>
its just a major time sink and source of burnout
<aantron>
but anyway i have to do it now, as its very stressful to maintain lwt without for example CI on platforms that are not my computer :)
<aantron>
i mean, i have to do that first no matter what
<dxtr>
aantron: I have openbsd boxes available - both mips64 and amd64 :p
<aantron>
dxtr: probably good to test on openbsd. im not really sure what the best way is though. jenkins on those boxes? something else? i think travis does only linux and osx
<dxtr>
I have no idea
<aantron>
looking..
<aantron>
(but not really finding anything noteworthy besides jenkins)
MercurialAlchemi has quit [Ping timeout: 268 seconds]
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<aantron>
dxtr: if you want to contribute and set up jenkins on the box(es), that would be very useful. especially i think the mips machine
minn has quit [Ping timeout: 260 seconds]
octachron has quit [Quit: Leaving]
<Drup>
aantron: do you test in javascript and mirage yet :D
<Drup>
js_of_ocaml/bucklescript shouldn't be too hard, it's just a matter of selecting the tests that make sense
<aantron>
yes, i am guessing that it will be automatic during configuration
<aantron>
just didnt get around to it yet, and some of the other ci work took a surprisingly long time to do
<Drup>
yeah
<Drup>
for mirage, well, mirage people did a lot of CI work, so you can reuse that
<aantron>
well perhaps not automatic for js, as configure will detect the unix system, but yes it should still be easy to disable the suites that dont run in js
<aantron>
ok. havent looked at mirage at all yet.
<Drup>
flux: Lwt is obviously very mature, it has 6 badges :D
<aantron>
:D
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 250 seconds]
minn has joined #ocaml
tmtwd has joined #ocaml
silver_ has joined #ocaml
NingaLeaf has quit [Ping timeout: 260 seconds]
silver has quit [Ping timeout: 250 seconds]
agarwal1975 has quit [Quit: agarwal1975]
rgrinberg has joined #ocaml
rgrinberg has quit [Remote host closed the connection]
rgrinberg has joined #ocaml
<dxtr>
aantron: I have no idea how to set up jenkins :D
NingaLeaf has joined #ocaml
<aantron>
dxtr: well, i could do it, but i dont know if these boxes are accessible or what... anyway it's pretty easy usually. at least on ubuntu i remember more or less just installing it from apt (or a ppa?). dont know about openbsd. oh yeah, there is also the matter of security. somebody could write an interesting PR that harms the machines depending on how jenkins is set up, and i dont know how to restrict that on openbsd
<aantron>
perhaps someone with more experience can comment at some point..
<aantron>
Drup: do you know how the ocsigen build bots are set up on linux?
rand__ has quit [Quit: leaving]
jg_ has quit [Ping timeout: 244 seconds]
<dxtr>
aantron: Doesn't look like there's a jenkins package for mips64
<dxtr>
Oh yes I can see why
<dxtr>
Java :p
<aantron>
hmmmmm
<aantron>
yeah i was just reading about that too :p
<Drup>
aantron: jenkins + docker
kakadu has quit [Remote host closed the connection]
<aantron>
hmm docker on jenkins looks like it might be involved too
<aantron>
on openbsd*
smondet has quit [Ping timeout: 252 seconds]
<dxtr>
Considering there's no docker on openbsd :p