al-damiri has quit [Quit: Connection closed for inactivity]
pierpal has joined #ocaml
pierpal has quit [Ping timeout: 260 seconds]
pierpal has joined #ocaml
kvda has joined #ocaml
kvda has quit [Client Quit]
kvda has joined #ocaml
clog has quit [Quit: ^C]
clog has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
clog has quit [Quit: ^C]
clog has joined #ocaml
Haudegen has quit [Remote host closed the connection]
clog has quit [Quit: ^C]
jao has quit [Ping timeout: 260 seconds]
kvda has joined #ocaml
Drat is now known as Drup
regnat[m] has quit [*.net *.split]
regnat[m] has joined #ocaml
kvda has quit [Client Quit]
kvda has joined #ocaml
clog has joined #ocaml
clog has quit [Client Quit]
clog has joined #ocaml
clog has quit [Client Quit]
clog has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
clog has quit [Quit: ^C]
kvda has joined #ocaml
kvda has quit [Client Quit]
clog has joined #ocaml
pierpa has quit [Quit: Page closed]
theaspiringhacke has quit [*.net *.split]
flux[m] has quit [*.net *.split]
bjs has quit [*.net *.split]
bjs has joined #ocaml
flux[m] has joined #ocaml
theaspiringhacke has joined #ocaml
malina has joined #ocaml
tormen has joined #ocaml
Guest97673 has joined #ocaml
tormen_ has quit [Ping timeout: 260 seconds]
Guest97673 has quit [Remote host closed the connection]
jimt has quit [Quit: WeeChat 1.9.1]
jimt has joined #ocaml
Haudegen has joined #ocaml
malina has quit [Quit: Throwing apples of Montserrat]
jimt has quit [*.net *.split]
bjs has quit [*.net *.split]
Haudegen has quit [*.net *.split]
tormen has quit [*.net *.split]
regnat[m] has quit [*.net *.split]
theaspiringhacke has quit [*.net *.split]
chindy has quit [*.net *.split]
lynn_ has quit [*.net *.split]
tobiasBora has quit [*.net *.split]
ohama has quit [*.net *.split]
dinosaure has quit [*.net *.split]
discord has quit [*.net *.split]
bronsen has quit [*.net *.split]
Drup has quit [*.net *.split]
jerith has quit [*.net *.split]
lopex has quit [*.net *.split]
strmpnk has quit [*.net *.split]
rwmjones has quit [*.net *.split]
c4rc4s has quit [*.net *.split]
wagle has quit [*.net *.split]
asm89 has quit [*.net *.split]
jeroud has quit [*.net *.split]
webshinra has quit [*.net *.split]
chelfi has quit [*.net *.split]
quarters has quit [*.net *.split]
flux[m] has quit [*.net *.split]
DanielRichman has quit [*.net *.split]
Jesin has quit [*.net *.split]
bacam has quit [*.net *.split]
Haudegen[m] has quit [*.net *.split]
bglm[m] has quit [*.net *.split]
Ankhers has quit [*.net *.split]
gjaldon__ has quit [*.net *.split]
haesbaert has quit [*.net *.split]
Khady has quit [*.net *.split]
cthuluh has quit [*.net *.split]
rseymour has quit [*.net *.split]
jave has quit [*.net *.split]
copy` has quit [*.net *.split]
jimt[m] has quit [*.net *.split]
ahf has quit [*.net *.split]
maker has quit [*.net *.split]
catern has quit [*.net *.split]
nore has quit [*.net *.split]
kandu has quit [*.net *.split]
xaimus has quit [*.net *.split]
awal has quit [*.net *.split]
vodkaInferno has quit [*.net *.split]
pistachio has quit [*.net *.split]
ZirconiumX has quit [*.net *.split]
nopf has quit [*.net *.split]
jacobian has quit [*.net *.split]
rks` has quit [*.net *.split]
cbarrett has quit [*.net *.split]
Leonidas has quit [*.net *.split]
dedgrant has quit [*.net *.split]
Grommet has quit [*.net *.split]
andrewalker has quit [*.net *.split]
jgkamat has quit [*.net *.split]
henrytill has quit [*.net *.split]
jmiven has quit [*.net *.split]
TC01 has quit [*.net *.split]
picolino has quit [*.net *.split]
orbitz has quit [*.net *.split]
cods has quit [*.net *.split]
ehirdoy has quit [*.net *.split]
dejanr has quit [*.net *.split]
xvilka has quit [*.net *.split]
Madars has quit [*.net *.split]
infinity0_ has quit [*.net *.split]
stux|RC has quit [*.net *.split]
hnrgrgr has quit [*.net *.split]
theglass has quit [*.net *.split]
magicbit has quit [*.net *.split]
inr has quit [*.net *.split]
dmiles has quit [*.net *.split]
dmbaturin has quit [*.net *.split]
def` has quit [*.net *.split]
octachron has quit [*.net *.split]
runciter has quit [*.net *.split]
apache2 has quit [*.net *.split]
aggelos_ has quit [*.net *.split]
Soni has quit [*.net *.split]
kit_ty_kate has quit [*.net *.split]
ia0 has quit [*.net *.split]
averell has quit [*.net *.split]
theblatte has quit [*.net *.split]
wildsebastian has quit [*.net *.split]
Asmadeus has quit [*.net *.split]
dxtr has quit [*.net *.split]
pippijn has quit [*.net *.split]
lobo has quit [*.net *.split]
so has quit [*.net *.split]
h11[m] has quit [*.net *.split]
yetanotherion[m] has quit [*.net *.split]
smondet[m] has quit [*.net *.split]
Bluddy[m] has quit [*.net *.split]
Orbifx[m] has quit [*.net *.split]
peddie[m]1 has quit [*.net *.split]
reynir has quit [*.net *.split]
nullifidian has quit [*.net *.split]
fredcy has quit [*.net *.split]
jun has quit [*.net *.split]
spectrumgomas[m] has quit [*.net *.split]
shw has quit [*.net *.split]
iZsh has quit [*.net *.split]
rgr[m] has quit [*.net *.split]
Multiocracy[m] has quit [*.net *.split]
remix2000[m] has quit [*.net *.split]
ejpcmac has quit [*.net *.split]
banjiewen has quit [*.net *.split]
jrslepak has quit [*.net *.split]
mcspud has quit [*.net *.split]
ianconnolly has quit [*.net *.split]
robmyers has quit [*.net *.split]
cschneid has quit [*.net *.split]
gonz_ has quit [*.net *.split]
jyc has quit [*.net *.split]
nicoo has quit [*.net *.split]
ibnfirnas has quit [*.net *.split]
leah2 has quit [*.net *.split]
johnelse has quit [*.net *.split]
keep_learning has quit [*.net *.split]
sagax has quit [*.net *.split]
pitastrudl has quit [*.net *.split]
ruffy_ has quit [*.net *.split]
hannes has quit [*.net *.split]
tizoc has quit [*.net *.split]
tsani has quit [*.net *.split]
CcxWrk has quit [*.net *.split]
rixed has quit [*.net *.split]
sonologico has quit [*.net *.split]
eagleflo has quit [*.net *.split]
sheijk_ has quit [*.net *.split]
gtrak has quit [*.net *.split]
jack5638 has quit [*.net *.split]
troydm has quit [*.net *.split]
mfp has quit [*.net *.split]
xa0 has quit [*.net *.split]
gikiam has quit [*.net *.split]
sgnb` has quit [*.net *.split]
kalio has quit [*.net *.split]
HDurer[m] has quit [*.net *.split]
mattg_ has quit [*.net *.split]
caw_________ has quit [*.net *.split]
Fardale has quit [*.net *.split]
vinoski has quit [*.net *.split]
adrien has quit [*.net *.split]
adi_____ has quit [*.net *.split]
chenglou has quit [*.net *.split]
sspi__ has quit [*.net *.split]
clog has quit [*.net *.split]
ski has quit [*.net *.split]
|jbrown| has quit [*.net *.split]
groovy2shoes has quit [*.net *.split]
raduom has quit [*.net *.split]
ocabot_ has quit [*.net *.split]
tg has quit [*.net *.split]
igitoor has quit [*.net *.split]
madroach has quit [*.net *.split]
wickedshell has quit [*.net *.split]
terrorjack has quit [*.net *.split]
ec has quit [*.net *.split]
Niamkik has quit [*.net *.split]
rom1504 has quit [*.net *.split]
Robdor has quit [*.net *.split]
stephe has quit [*.net *.split]
Wojciech_K has quit [*.net *.split]
artart78 has quit [*.net *.split]
alphor has quit [*.net *.split]
profan has quit [*.net *.split]
zozozo has quit [*.net *.split]
riveter has quit [*.net *.split]
TallerGhostWalt has quit [*.net *.split]
caseypme[m] has quit [*.net *.split]
isaachodes[m] has quit [*.net *.split]
Walter[m] has quit [*.net *.split]
drsmkl[m] has quit [*.net *.split]
sven[m] has quit [*.net *.split]
srenatus[m] has quit [*.net *.split]
rjungemann has quit [*.net *.split]
clockish has quit [*.net *.split]
Ulrar has quit [*.net *.split]
equalunique[m] has quit [*.net *.split]
dl3br[m] has quit [*.net *.split]
aspiwack[m] has quit [*.net *.split]
companion_cube has quit [*.net *.split]
mrallen1 has quit [*.net *.split]
cojy has quit [*.net *.split]
monad_cat has quit [*.net *.split]
rfv has quit [*.net *.split]
breitenj has quit [*.net *.split]
mjvoge02 has quit [*.net *.split]
jmct has quit [*.net *.split]
Armael has quit [*.net *.split]
diginet has quit [*.net *.split]
stux|RC-only has quit [*.net *.split]
thizanne has quit [*.net *.split]
lukky513 has quit [*.net *.split]
pierpal has quit [*.net *.split]
Geekingfrog has quit [*.net *.split]
cross_ has quit [*.net *.split]
dogui has quit [*.net *.split]
Cypi_ has quit [*.net *.split]
moei has quit [*.net *.split]
tianon has quit [*.net *.split]
_andre has quit [*.net *.split]
dx has quit [*.net *.split]
gargawel has quit [*.net *.split]
tokenrov1 has quit [*.net *.split]
Exagone313 has quit [*.net *.split]
lyxia has quit [*.net *.split]
lix has quit [*.net *.split]
sveit has quit [*.net *.split]
cow-orker has quit [*.net *.split]
Guest50286 has quit [*.net *.split]
mathsm has quit [*.net *.split]
richi235 has quit [*.net *.split]
noplamodo has quit [*.net *.split]
srax has quit [*.net *.split]
thegameg has quit [*.net *.split]
_whitelogger has joined #ocaml
Madars is now known as Guest77842
Leonidas has quit [Changing host]
Leonidas has joined #ocaml
nore is now known as Guest36045
ahf has joined #ocaml
awal is now known as Guest98929
infinity0 has quit [Changing host]
infinity0 has joined #ocaml
Guest55937 has joined #ocaml
Guest55937 has quit [Changing host]
ahf has quit [Changing host]
ahf has joined #ocaml
jgkamat has joined #ocaml
runciter has joined #ocaml
kvda has joined #ocaml
andrewalker has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chindy has quit [*.net *.split]
lynn_ has quit [*.net *.split]
tobiasBora has quit [*.net *.split]
ohama has quit [*.net *.split]
discord has quit [*.net *.split]
dinosaure has quit [*.net *.split]
bronsen has quit [*.net *.split]
Drup has quit [*.net *.split]
jerith has quit [*.net *.split]
lopex has quit [*.net *.split]
strmpnk has quit [*.net *.split]
rwmjones has quit [*.net *.split]
wagle has quit [*.net *.split]
c4rc4s has quit [*.net *.split]
asm89 has quit [*.net *.split]
jeroud has quit [*.net *.split]
webshinra has quit [*.net *.split]
chelfi has quit [*.net *.split]
quarters has quit [*.net *.split]
flux[m] has quit [*.net *.split]
DanielRichman has quit [*.net *.split]
Jesin has quit [*.net *.split]
bacam has quit [*.net *.split]
Haudegen[m] has quit [*.net *.split]
bglm[m] has quit [*.net *.split]
Ankhers has quit [*.net *.split]
gjaldon__ has quit [*.net *.split]
haesbaert has quit [*.net *.split]
Khady has quit [*.net *.split]
cthuluh has quit [*.net *.split]
rseymour has quit [*.net *.split]
jave has quit [*.net *.split]
copy` has quit [*.net *.split]
jimt[m] has quit [*.net *.split]
lynn_ has joined #ocaml
tobiasBora has joined #ocaml
chindy has joined #ocaml
ohama has joined #ocaml
dinosaure has joined #ocaml
discord has joined #ocaml
lopex has joined #ocaml
strmpnk has joined #ocaml
bronsen has joined #ocaml
Drup has joined #ocaml
jerith has joined #ocaml
wagle has joined #ocaml
rwmjones has joined #ocaml
c4rc4s has joined #ocaml
quarters has joined #ocaml
webshinra has joined #ocaml
chelfi has joined #ocaml
jeroud has joined #ocaml
asm89 has joined #ocaml
copy` has joined #ocaml
jimt[m] has joined #ocaml
Haudegen[m] has joined #ocaml
Ankhers has joined #ocaml
bglm[m] has joined #ocaml
cthuluh has joined #ocaml
bacam has joined #ocaml
rseymour has joined #ocaml
Jesin has joined #ocaml
Khady has joined #ocaml
haesbaert has joined #ocaml
flux[m] has joined #ocaml
gjaldon__ has joined #ocaml
DanielRichman has joined #ocaml
jave has joined #ocaml
mfp has quit [Ping timeout: 255 seconds]
kvda has joined #ocaml
_whitelogger has joined #ocaml
|jbrown| has quit [Ping timeout: 265 seconds]
_whitelogger has joined #ocaml
roygbiv has joined #ocaml
<ec>
discord: yah; they work fine from other OCaml code — it’s only referencing them from JS-side, i.e. their runtime repr, that is so jankyweird
roygbiv has quit [Quit: ™]
Guest98929 is now known as awal
_whitelogger has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
tarptaeya has joined #ocaml
ski has quit [Ping timeout: 265 seconds]
WolfPack has joined #ocaml
jmiven has quit [Quit: co'o]
jmiven has joined #ocaml
Guest78852 has joined #ocaml
sagotch has joined #ocaml
kvda has quit [Read error: Connection reset by peer]
reynir` has quit [Quit: leaving]
Guest78852 has quit [Ping timeout: 252 seconds]
TheLemonMan has joined #ocaml
ozzymcduff has joined #ocaml
cods has quit [Changing host]
cods has joined #ocaml
jaar has joined #ocaml
Bronsa has joined #ocaml
cods has quit [Changing host]
cods has joined #ocaml
mfp has joined #ocaml
AltGr has joined #ocaml
sveit has quit [Quit: Bye]
bartholin has joined #ocaml
bezirg has joined #ocaml
WolfPack has quit [Ping timeout: 264 seconds]
bezirg has quit [Remote host closed the connection]
bezirg has joined #ocaml
bezirg has quit [Ping timeout: 252 seconds]
kakadu has joined #ocaml
gtrak has quit [Ping timeout: 255 seconds]
gtrak has joined #ocaml
andries18 has joined #ocaml
andries18 has quit [Remote host closed the connection]
WolfPack has joined #ocaml
sagotch has quit [Quit: Leaving.]
bezirg has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
WolfPack has quit [Ping timeout: 244 seconds]
sshine has joined #ocaml
<sshine>
hi. I'm toying around on exercism.io's ocaml track, and I am failing to compile the "space age" assignment: I'm handed out a space_age.mli with a 'type planet = Mercury | ...' and a 'val age_on : planet -> int -> float', and I assume that I'm supposed to make a file space_age.ml with a 'let age_on planet secs = ...', but when typing 'jbuilder runtest', it gives me: File "space_age.ml", line 5, characters 4-9
<sshine>
: Error: Unbound constructor Earth
unyu has quit [Quit: The end of the world is nigh. Bring as much popcorn as you can!]
<discord>
<Christophe> You also need the type declaration in the ml file
<sshine>
Christophe: the 'type planet = ...' or the 'val age_on : ...'?
<discord>
<Christophe> type planet = ...
<sshine>
Christophe: How does one generally avoid this repetition?
bezirg has quit [Ping timeout: 268 seconds]
Rosslaew has joined #ocaml
<discord>
<Christophe> Honestly I am unaware of a way to avoid it but I'd love to hear one 😃
<ZirconiumX>
I don't think you can
<discord>
<Christophe> The thing is that the type declaration in the mli does not need to fit exactly the .ml version, it can add stuff to hide some of the type's inner workings
<discord>
<Christophe> But then it could make sense to not repeat a type definition in the .ml file if it's the same, but I suppose it's a case that is not that common in the end ?
<ZirconiumX>
Essentially the .ml type can be a superset of the interface, but not a subset, and it has to be compatible with the interface
<ZirconiumX>
So you can't reorder fields
Bronsa has quit [Ping timeout: 264 seconds]
<sshine>
ZirconiumX, can the .mli contain just 'type planet' and that's it?
<ZirconiumX>
Yes
<flux[m]>
there's a trick to avoid this: put the types you want to expose to users in an .mli file without a corresponding .ml, and include that both from the exposed api and implementation
freyr69 has joined #ocaml
<discord>
<Christophe> It can but then it means that you cannot use the constructors Earth, Venus etc. outside of that very .ml file
<flux[m]>
(this=repetition.) but I guess there are cases where that's not possible, ie. if you want to use recursion among types included and not included
<ZirconiumX>
Yeah, it greatly limits your capabilities with that type
<discord>
<Christophe> if in the .mli you just write type planet it makes it an abstract type
<flux[m]>
btw, there's also ie. type t = private Foo of int, that will limit it so that values of type t can only be deconstructed by outside units but not constructed
<discord>
<Christophe> I'm sure you'll learn more on that later 😉
<discord>
<Christophe> Nice trick flux, i'll remember that 😃
<sshine>
is there a way to get type error hints in emacs using tuareg-mode?
<discord>
<Christophe> I guess what you want is Merlin
<sshine>
ok.
<sshine>
I just tried 'caml-mode' and it didn't seem to have syntax highlighting. I'll try Merlin next.
<discord>
<Christophe> I am unsure about type errors, but I believe it's there, someone correct me if I'm wrong
<sshine>
'M-x package-install merlin' wasn't successful. I'll look at it later.
<flux[m]>
merlin and ocp-indent is where it's at
<flux[m]>
merlin is mostly-ocaml but comes with an emacs module. use opam to install it.
<discord>
<Perry> Okay, so what you want is tuareg mode.
<discord>
<Perry> merlin and ocp-indent are things you plug in to it.
sagotch has joined #ocaml
<discord>
<Perry> There are instructions online on all three repositories.
<flux[m]>
..though I guess you need to manually adjust things a bit to load it etc during emacs init
<sshine>
ok.
<discord>
<Perry> ocaml-mode is really really old.
<discord>
<Perry> tuareg+merlin is kind of amazing in what it will do for you. It will flag errors as you type for example.
<ZirconiumX>
Meanwhile, as a Vim user...
<discord>
<Perry> you can use merlin as a vim user.
<discord>
<Perry> there are instructions.
<ZirconiumX>
Syntastic's merlin mode is a little clumsy
<discord>
<Perry> Then fix it or use Emacs. 😃
<discord>
<Christophe> I'm choosing the second 😄
<ZirconiumX>
I don't feel like waiting ten seconds whenever I launch an editor for Spacemacs to check for updates
<ZirconiumX>
And plain Emacs is painful for me to use
<flux[m]>
normal emacs newbie mistake, my emacs session is 9 days old :)
<ZirconiumX>
Then I might as well use Sublime if I'm going to wait ten seconds for it to launch
<flux[m]>
..and at home I can add one month to that
<ZirconiumX>
My computer does not stay on for months at a time
<flux[m]>
emacs has a server mode where emacs can just open new frames instead of creating a new process. bonus: you get to share buffer contents
<sshine>
neither does mine. my emacs has run for quite long on my job's dev server, though. I export it graphically via ssh.
<sshine>
I fire up vim if I know my edit will be very short, though, because I really don't like waiting for emacs to start. ;)
<sshine>
ahhh, merlin is nice!
<discord>
<Perry> I don't wait ten seconds when my Emacs starts up.
<discord>
<Christophe> ZirconiumX: you can launch emacs, get your coffee, and code after 😛
<discord>
<Perry> If you don't want to wait for ten seconds, then don't set up your emacs to do that.
<discord>
<Christophe> (did M-x package-install exist 10 years ago ? Or did our teacher forget to tell us about it ?)
<reynir>
it did not
<discord>
<Perry> the package system is pretty new, but it might be as much as a decade old.
<reynir>
I think it's less than 5 years old
<discord>
<Perry> I don't think it's that young. I think things like MELPA are definitely young though.
<discord>
<Perry> Still, you don't need to check if packages are up to date on emacs start. you can just turn that off. it causes no harm to check (say) once a month.
Bronsa has joined #ocaml
pierpal has quit [Quit: Poof]
unyu has joined #ocaml
pierpal has joined #ocaml
bezirg has joined #ocaml
thomas_scrace has joined #ocaml
ski has joined #ocaml
leastbit has joined #ocaml
xvilka has quit [Changing host]
xvilka has joined #ocaml
<xvilka>
ZirconiumX: try Neovim, it is faster with Syntastic
Haudegen has quit [Remote host closed the connection]
<ZirconiumX>
It's not performance, it's UI
<xvilka>
ZirconiumX: not sure what you expect then, hm
<ZirconiumX>
I don't care about the performance (it's basically instant to me), but taking up half the screen with errors is not really helpful
<xvilka>
ah
<ZirconiumX>
Plain Vim is fast enough in this case
<xvilka>
what I really want and miss for OCaml in [Neo]Vim - semantic highlight
<discord>
<Perry> ZirconiumX: I think the big advantage of Emacs is that elisp, as bad as it is, is a real language. You could always use evil so you continue to use vi keystrokes.
<discord>
<Christophe> I've tried evil, I don't like that it kind of changes too much of emacs, when you look for documentation online and all, it does not match, it's a bit annoying
<xvilka>
Being a bit controversial, but I heard Visual Studio Code is also behaving well with OCaml
<xvilka>
if you don't want to go into the deep swamps of Vim and Emacs world
<Drup>
I can confirm that vscode is very good with merlin
Rosslaew has quit [Ping timeout: 264 seconds]
<Drup>
My students last year spontanously started to use it (because urk emacs) and it was very easy to use for them, and still has all the merlin goodies
<discord>
<Christophe> Where are you teaching btw Drup ?
<Drup>
That was in Univ Paris 7
|jbrown| has joined #ocaml
<bartholin>
Reminder to force your students to use emacs instead of Visual Studio because proprietary software is literally malware
<Drup>
bartholin: vscode is foss.
<bartholin>
oh?
<Drup>
I'm not talking about the huge windows IDE here.
sgnb` has quit [Remote host closed the connection]
<discord>
<Christophe> Visual Studio Code
<discord>
<Christophe> it's different from Visual Studio 😃
<xvilka>
it is basically chromium + some javascript
<xvilka>
everything is open to its roots
<discord>
<Christophe> It's decent but not for me, too much mouse 😃
<xvilka>
well, in fact you can setup vim-like config with VSCode
<discord>
<Christophe> Yeah I know, there was still stuff though that was just not the same, not easily reachable 😃
spew has joined #ocaml
<discord>
<Perry> I hate Electron apps, but other than that, it isn't horrid.
<Drup>
It's not for me either, but there is value in a an accessible text editor with good language support that is not a bloated clickfest. Forcing students to use emacs/vim will just demoralize them
<xvilka>
Totally agree with hating Electron, it is the worst invention of humanity
<sshine>
if you're iterating two lists at the same time, do you have to write 'match (xs, ys) with ...'? are the parenthesis optional, by the way?
<xvilka>
but since it is here, at least something good we can take from its existence
bezirg has quit [Remote host closed the connection]
<Drup>
xvilka: electron is lightweight compared to eclipse.
bezirg has joined #ocaml
<Drup>
sshine: yes, and yes the parens are optionals
<octachron>
sshine, note that List.iter2 exists
<sshine>
octachron, well, this is like a zipWith but with a different base case for uneven lists.
<discord>
<thangngoc89> Location.t in compiler-libs
<discord>
<thangngoc89> yeah. any toplevel directives 😃
<Armael>
I know what a location is
<octachron>
Armael, the location of '#load "a.cma";;', whic is useful if you parsed it with use_file
<sshine>
can I fold across the characters of a string? it seems that 'explode' was removed because it's inefficient, but String.iter looks imperative.
<Armael>
um
<Armael>
ah, I see
<Armael>
if you parse from a file but in toplevel mode
<Drup>
Yeah, that's what #use do
<Armael>
uh
keep_learning has quit [Quit: Ping timeout (120 seconds)]
<Armael>
yes ok, I thought you were referring to the location of #use itself
<Armael>
which is local to the directive so not very interesting
<Armael>
s/directive/phrase/
<discord>
<thangngoc89> oh. I'm referencing to the location of #use itself
<discord>
<thangngoc89> I need to know the correct location to display the result of directive (things like #help, #show )
<discord>
<thangngoc89> I have a hack right now, but it isn't very accurate
<octachron>
Armael, it is also useful if you are doing some editing on the text input after the parsing
<Armael>
sure
tarptaeya has quit [Quit: Konversation terminated!]
<sshine>
I can see that Set has 'fold'; pity String dopesn't.
<sshine>
s/dope/doe/
Haudegen has joined #ocaml
freyr69 has quit [Remote host closed the connection]
<companion_cube>
use a stdlib extension/alternative
<sshine>
there is Char.lowercase, but is there something like isLowercase?
<sshine>
oh, this is also a call for batteries included.
<companion_cube>
that's a possibility
<discord>
<rgrinberg> Obligatory reminder to avoid batteries. Use containers if you want something stdlib like
<Drup>
That's a bit strong ^^'
<sshine>
oh
<discord>
<rgrinberg> Maybe. But I think wishy washy advice doesn't help newcomers
<sshine>
rgrinberg: your reminder is appreciated then, although I thought "batteries" was endorsed.
<companion_cube>
then you can say stuff like "containers is developed by a modern handsome young man, whereas batteries is a nice but dusty old-school lib" ;-)
<companion_cube>
I'll see myself out
<discord>
<rgrinberg> This is exactly why I give recommendations upfront rather than insisting on giving a choice
<discord>
<thangngoc89> sshine: for isLowercase of a char, it's just a pattern match away
<discord>
<rgrinberg> Containers is far better maintained, designed, and modern than batteries.
<sshine>
thangngoc89: Haskell's isLowercase is Unicode-compatible and isn't "just" a pattern match away.
<discord>
<thangngoc89> let isLowercase = function | 'a'..'z' | _ -> false
<discord>
<thangngoc89> sshine: stdlib is admittedly lacking !
<sshine>
thangngoc89: that, there, isn't even ISO-8859-compatible, which the deprecated Char.lowercase is.
<discord>
<rgrinberg> You will need to use one of the unicode libs for a proper lowercasing then. Camomile or dbunzli's collection of libs should work
<sshine>
rgrinberg: when I install containers with opam, I also get a uchar, but I see that it's more of a base unicode class than a swiss army knife.
<companion_cube>
indeed, it's a common type `Uchar.t` that modern unicode libraries should understand
<discord>
<rgrinberg> uchar is present in the stdlib since 4.03
<companion_cube>
and containers supports 4.02 :)
<discord>
<rgrinberg> which nobody apart from the bucklescript ghetto still uses 😃
<sshine>
where in containers is there an is_lowercase function again?
<discord>
<rgrinberg> the kind of is_lowercase function you're looking for requires a unicode library
<Drup>
And also not using Char to begin with :p
<discord>
<rgrinberg> neither containers nor base provide this
<Drup>
More precisely, Uucp.Case.is_lower
<Drup>
(from the uucp package)
bezirg has quit [Remote host closed the connection]
<sshine>
is uucp the preferred unicode package?
<xvilka>
but why next? Isn't 4.07 already released?
<sshine>
Drup, thanks.
<discord>
<rgrinberg> sshine: there's no consensus about handling unicode in OCaml yet, but I think that uucp is a good choice
<Drup>
I disagree, there is a consensus: use the uu* packages
<Drup>
there are a bit split into various parts, so you have to have an idea of what you want, but they cover pretty much everything
<companion_cube>
rgrinberg: I don't know, people don't always use the shiny new versions
<companion_cube>
remember that debian shipped for a long time with 4.01
<discord>
<rgrinberg> IMO, the set of people who insist on using their distribution's OCaml and those who insist on using the latest version of containers do not overlap
<discord>
<rgrinberg> it simply makes no sense to chase the latest and greatest libraries while working with a completely outdated version of the language
<companion_cube>
guess so. still I'll support 4.02 because it's easy
<discord>
<rgrinberg> Just so you know, debian's going to bump their OCaml to 4.05
<discord>
<rgrinberg> and Jeremie is getting annoyed with supporting 4.02 in dune 😛
<companion_cube>
oh. is it that bad?
<companion_cube>
(I suppose you'll bump to 4.03)
ozzymcduff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
|jbrown| has quit [Ping timeout: 272 seconds]
Denommus has joined #ocaml
<discord>
<rgrinberg> yeah, likely.
<discord>
<rgrinberg> in dune there's actually a reason to support older versions of OCaml. It helps people bootstrap their system starting from outdated version
<sshine>
does ocaml have a syntax for lambdas with multiple arguments?
<Armael>
fun x y z -> ... ?
<companion_cube>
sshine: `fun x y z -> …`
<sshine>
thanks!
<discord>
<rgrinberg> I was also going to type the same lambda
<companion_cube>
rgrinberg: also when you're writin such an important foundation for the ecosystem, it's good to give users some fleixibility
<discord>
<rgrinberg> with the same argument names T_T
<companion_cube>
`fun w t f -> …`
<sshine>
rgrinberg: with '...' or '…' at the end? :P
<discord>
<rgrinberg> and even parens: (fun x y z -> ...)
<discord>
<rgrinberg> which explains my slowness
<discord>
<rgrinberg> companion_cube: yeah, i'm not opposed to backwards compat when it makes sense.
<sshine>
can I do full pattern matching for 'x' in 'let f x = ...', or must I always use 'match x with ...'?
<companion_cube>
let f = function …
<companion_cube>
but it only works for the last argument
<sshine>
since my function has two arguments, can I do 'let f x = function ...'?
<sshine>
companion_cube, and was that a 'no' to my question?
<zozozo>
sshine: you can do let f (x, y) = .., in order to pattern match a tuple as argument, you can also do let f x = function y -> ... to have a function with 2 arguments
neatonk has joined #ocaml
leastbit has joined #ocaml
leastbit has quit [Excess Flood]
FreeBirdLjj has joined #ocaml
<sshine>
zozozo, but can I pattern match a sum-type in the function argument?
<zozozo>
well, you can, but the pattern-matching will often be incomplete
<zozozo>
sshine: for instance, given type t = A of int | B of float, you can technically do let f (A i) = i, but trying to call f (B 5.) will raise a runtime error because the pattern-matching is incomplete
<sshine>
so I can't have multiple patterns, like SML's fun f (Some x) = ... | f None = ...
<zozozo>
on the other hand, if the sum type has only one constructor, it works quite well
<sshine>
I think it's called a sum type when there's more than one constructor.
<zozozo>
sshine: indeed, to do that you must have an explicit pattern-matching (either using match of function)
<sshine>
ok, thanks.
<dmbaturin>
sshine: let f x = function Some x -> ... | None -> ..
<ZirconiumX>
You mean let f = function ...
<dmbaturin>
Yes, sorry.
<dmbaturin>
I never use that syntax, not a fan.
quipa has joined #ocaml
sagotch has quit [Quit: Leaving.]
Haudegen has quit [Read error: Connection reset by peer]
jaar has quit [Quit: Leaving]
thomas_scrace has quit [Ping timeout: 272 seconds]
zz_ka6sox has joined #ocaml
zz_ka6sox has quit [Remote host closed the connection]
Bronsa has quit [Ping timeout: 252 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
|jbrown| has joined #ocaml
AltGr has left #ocaml [#ocaml]
FreeBirdLjj has joined #ocaml
quipa has quit [Quit: Leaving]
bezirg has joined #ocaml
orbifx has joined #ocaml
Jesin has quit [Quit: Leaving]
bezirg has quit [Remote host closed the connection]
Jesin has joined #ocaml
Haudegen has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
|jbrown| has quit [Ping timeout: 264 seconds]
Jesin has quit [Quit: Leaving]
|jbrown| has joined #ocaml
WolfPack has joined #ocaml
kakadu has quit [Remote host closed the connection]
jnavila has joined #ocaml
WolfPack has quit [Quit: Konversation terminated!]
Rosslaew_ has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
malina has joined #ocaml
malina has quit [Remote host closed the connection]
kakadu has joined #ocaml
cbarrett has quit []
cbarrett has joined #ocaml
bezirg has joined #ocaml
malina has joined #ocaml
Denommus` has joined #ocaml
Denommus has quit [Ping timeout: 272 seconds]
spew has quit [Quit: going home]
malina has quit [Quit: Throwing apples of Montserrat]
orbifx has quit [Ping timeout: 252 seconds]
tane has joined #ocaml
pierpa has joined #ocaml
roygbiv has joined #ocaml
jao has joined #ocaml
bezirg has quit [Remote host closed the connection]
orbifx has joined #ocaml
Rosslaew_ has quit [Ping timeout: 264 seconds]
orbifx has quit [Ping timeout: 252 seconds]
bartholin has quit [Remote host closed the connection]
_andre has quit [Quit: leaving]
Denommus` has quit [Read error: Connection reset by peer]
tormen has quit [Quit: Lost terminal]
xa0 has quit [Remote host closed the connection]
tormen has joined #ocaml
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
orbifx has joined #ocaml
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
roygbiv has quit [Quit: ™]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
neatonk has quit [Ping timeout: 252 seconds]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
orbifx has quit [Ping timeout: 252 seconds]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
jnavila has quit [Ping timeout: 252 seconds]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
tane has quit [Quit: Leaving]
gtrak has quit [Ping timeout: 252 seconds]
gtrak has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
|jbrown| has quit [Ping timeout: 264 seconds]
_y has joined #ocaml
<_y>
hello! i started using ocamldoc, but the syntax for doc-comments is both inaesthetic and annoying to handle from Vim
<_y>
is there a way to make ocamldoc understand eg. (** first line\n ** second line\n **) just as (** first line\n second line\n*) ?
<_y>
ie. ignore extra stars at the beginning of lines and in the closing delimiter
kakadu has quit [Remote host closed the connection]
<_y>
there is the option -stars, but it only removes one star (which is enough for the closing delimiter, but not for the middle line prefix) (plus, i fail to give this option to ocamldoc through oasis)
<_y>
well i may deal with it (my main issue is Vim editing, which is really broken when there is nothing to prefix the middle lines but whitespaces; at least with -stars I can put a star)
<_y>
but still i need to figure out how to say -stars to ocamldoc from _oasis
caltelt has joined #ocaml
<_y>
and if there was a way to have more pleasant comments, starting with **, i wouldn’t say no ^^