boogie has quit [Remote host closed the connection]
Drup has quit [Quit: Leaving.]
<pippijn>
wmeyer: hi
zRecursive has joined #ocaml
palomer has quit [Remote host closed the connection]
boogie has joined #ocaml
zpe has joined #ocaml
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
ygrek has joined #ocaml
zpe has quit [Remote host closed the connection]
boogie has quit [Remote host closed the connection]
q66 has quit [Quit: Leaving]
talzeus has joined #ocaml
oriba has quit [Quit: oriba]
boogie has joined #ocaml
boogie has quit [Ping timeout: 240 seconds]
zpe has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
ihm1 has joined #ocaml
zRecursive has left #ocaml []
derek_c has joined #ocaml
ihm1 has quit [Quit: ihm1]
ihm1 has joined #ocaml
boogie has joined #ocaml
<rgrinberg>
is there an easy way to advance the Lexing buffer n bytes?
ihm1 has quit [Quit: ihm1]
boogie has quit [Ping timeout: 245 seconds]
ousado has quit [Ping timeout: 245 seconds]
ben_zen has quit [Quit: sleeeeeep]
yacks has quit [Quit: Leaving]
ihm1 has joined #ocaml
boogie has joined #ocaml
boogie has quit [Ping timeout: 264 seconds]
Snark has joined #ocaml
zRecursive has joined #ocaml
boogie has joined #ocaml
tvn has joined #ocaml
tvn is now known as Guest72592
ggole has joined #ocaml
derek_c has quit [Quit: leaving]
talzeus has quit [Remote host closed the connection]
walter has quit [Quit: This computer has gone to sleep]
boogie has quit [Remote host closed the connection]
ontologiae has joined #ocaml
ygrek has quit [Ping timeout: 264 seconds]
milosn_ has joined #ocaml
milosn has quit [Ping timeout: 264 seconds]
yezariaely has joined #ocaml
Simn has joined #ocaml
boogie has joined #ocaml
Neros has quit [Ping timeout: 246 seconds]
boogie has quit [Ping timeout: 248 seconds]
<adrien>
morning
ttamttam has joined #ocaml
shinnya has quit [Ping timeout: 276 seconds]
<zRecursive>
afternoon
<pippijn>
morning
gour has joined #ocaml
ggole has quit [Ping timeout: 276 seconds]
skchrko has quit [Quit: Leaving]
ihm1 has quit [Quit: ihm1]
ygrek has joined #ocaml
ggole has joined #ocaml
djcoin has joined #ocaml
ontologiae has quit [Ping timeout: 245 seconds]
zarul has joined #ocaml
Neros has joined #ocaml
Guest72592 has quit [Remote host closed the connection]
Yoric has joined #ocaml
boogie has joined #ocaml
zRecursive has quit [Remote host closed the connection]
boogie has quit [Ping timeout: 245 seconds]
djcoin has quit [Quit: WeeChat 0.4.0]
djcoin has joined #ocaml
thomasga has joined #ocaml
ontologiae has joined #ocaml
ontologiae_ has joined #ocaml
talzeus has joined #ocaml
mika1 has joined #ocaml
ontologiae has quit [Ping timeout: 245 seconds]
cago has joined #ocaml
zarul has quit [Remote host closed the connection]
skchrko has joined #ocaml
ttamttam has quit [Quit: ttamttam]
<rwmjones>
is it possible to define a function which acts like this:
<rwmjones>
let lines = sh_lines "echo %s; echo %s; echo %s" "a" "b" "c"
<rwmjones>
(returning lines = ["a"; "b"; "c"])
<rwmjones>
basically is it possible to define a printf-like function that returns anything other than unit?
<companion_cube>
there is Printf.sprintf
<mrvn>
rwmjones: it's called Printf.printf
<rwmjones>
I can't work out how to write such a function ...
<rwmjones>
sure, but I want to write my own function (using ksprintf)
<companion_cube>
kbprintf too
<companion_cube>
(buffers are cool)
<rwmjones>
none of those actually answer the question
mfp has quit [Ping timeout: 240 seconds]
<mrvn>
then you need to look at the format module.
<rwmjones>
Format? that's completely different
<mrvn>
rwmjones: The answere to your question is: yes
<rwmjones>
great .. how?
<companion_cube>
I'm not sure I see the problem actually
<mrvn>
sorry, not the Format modules, just the Printf.format thing
<companion_cube>
let lines x y z = sh_lines (Printf.sprintf "echo %s %s %s" x y z) for instance
<rwmjones>
I want to write a printf-like function (my own, not one in stdlib) which returns a string list
<rwmjones>
I can write functions that return unit by doing, eg: let sh fs = ksprintf do_sh fs
<companion_cube>
oh, you want a generic version?
<rwmjones>
but I can't work out how to write function that return non unit
<companion_cube>
then k*printf should wokr
<rwmjones>
so how?!
<mrvn>
rwmjones: if it returns something then Scanf is a better example
<companion_cube>
let f buf x = Printf.kbprintf (fun b -> Buffer.length b) buf "%d " x ;; <--- this returns an int, for instance
<companion_cube>
val f : Buffer.t -> int -> int = <fun>
sgnb has quit [Remote host closed the connection]
<rwmjones>
that's not a generic function
<mrvn>
companion_cube: what does it return? The number of chars printed?
Kakadu has joined #ocaml
<ygrek>
rwmjones, let printfn fmt = Printf.ksprintf print_endline fmt
<rwmjones>
ygrek: that returns unit
Neros has quit [Ping timeout: 240 seconds]
<ygrek>
because of print_endline
<ygrek>
insert sh_lines and enjoy
<ygrek>
btw, do you accept patches for bitstring
<ygrek>
?
<yezariaely>
can I somehow write a comparison on the first element of a two tuples point-free?
<gasche>
yezariaely: given the right library support, yes you can
<rwmjones>
ygrek: sure, just email them to me
<ygrek>
(=) $$ fst
sgnb has joined #ocaml
<ygrek>
rwmjones, ok
boogie has joined #ocaml
<ygrek>
mrvn, I am thinking of changing the buffer type in extunix
<yezariaely>
ygrek: where is $$ defined?
<ygrek>
actually I want to remove it completely and use ('a,'b,'c) array1 everywhere so that concrete representation is not force on the user
<ygrek>
mrvn, what do you think about it?
<yezariaely>
gasche: I use batteries ;-)
<ygrek>
yezariaely, let ($$) f g = fun x y -> f (g x) (g y)
<yezariaely>
ygrek: ok, so this is not predefined as it seems. thanks
<rwmjones>
ygrek: thanks! I think I was overthinking the problem; as you say it just works when I return the string list from the inner function ...
boogie has quit [Ping timeout: 240 seconds]
<mrvn>
ygrek: That makes extracting strings problematic and offsets ambigious.
yezariaely has quit [Quit: Leaving.]
<mrvn>
ygrek: I guess the read/write functions could take any array1. But the endian functions only make sense with a byte array.
<ygrek>
agreed on read/write
<ygrek>
for endiannes - still we have int/char ambiguity
<ygrek>
not ambiguity but forced choice
darkf has quit [Read error: Connection reset by peer]
darkf has joined #ocaml
<ygrek>
actually, we could just state that endian functions treat passed bigarray exactly as byte array
<ygrek>
no matter how one interprets it
<ygrek>
wouldn't it be useful?
<mrvn>
ygrek: that is more of an abstract type. You shouldn't need to mix usage of through the endian modules and direct access.
<ygrek>
makes sense
<ygrek>
still I would suggest changing buffer from int bigarray to char bigarray for get_/set_ functions
<mrvn>
oehm, it isn't char?
<ygrek>
it is of (int,int8_elem) kind
<companion_cube>
mrvn: yes
<ygrek>
so representation is identical to char but ocaml type is int %)
<companion_cube>
rwmjones: you can write polymorphic functions like this
<mrvn>
ygrek: right. Because I thought of it as a byte array and not char array.
troydm has quit [Quit: What is hope? That all of your wishes and all of your dreams come true? (C) Rau Le Creuset]
<ggole>
I don't think there's any difference in representation between char and int anyway.
<companion_cube>
+12
<companion_cube>
-2
<mrvn>
ygrek: The buffer type for me is abstract. I only interact with it through the extunix functions. So I don't care if it is char or int. But changing it would break existing code. What is the benefit?
<ygrek>
mrvn, making it more polymorphic will not break 99% of code
<ygrek>
some users want to use it for char bigarray
<ygrek>
and it looks reasonable
<mrvn>
ygrek: can you make it all polymorphic without it causing segfaults?
chrisdotcode has quit [Ping timeout: 240 seconds]
<ygrek>
I think for endian functions making it polymorhic as ('a,int8_element,'c) bigarray is fine
<ygrek>
mrvn, I think yes, except of layout needs index handling
<mrvn>
ygrek: that sounds fine indeed. Then the offset and size are sane.
<ygrek>
fortran_layout starts from 1
<ygrek>
so fixing to c_layout for now :)
<mrvn>
yep, the layout part you have to patch into the C functions
<ygrek>
will not patch unless someone requests
<mrvn>
I think the number of ocaml + fortran users is verry small
ocp has joined #ocaml
<ygrek>
ok, so it is ('a,'b,c_layout) for read/write and ('a,int8_elem,c_layout) for endian
<mrvn>
ygrek: sounds good.
<mrvn>
have you checked out ocaml 4.1 yet?
Yoric has quit [Ping timeout: 246 seconds]
<ygrek>
yes, I am doing a release soon to account for it
zRecursive has joined #ocaml
<mrvn>
ygrek: I think some of my patches finally got included.
<ygrek>
it was a rather lovely iteration
Xuerian has joined #ocaml
ttamttam has joined #ocaml
troydm has joined #ocaml
skchrko_ has joined #ocaml
zRecursive has left #ocaml []
skchrko has quit [Ping timeout: 260 seconds]
boogie has joined #ocaml
boogie has quit [Ping timeout: 276 seconds]
dsheets has quit [Read error: Operation timed out]
Neros has joined #ocaml
Neros has quit [Ping timeout: 240 seconds]
wmeyer` has joined #ocaml
wmeyer has quit [Ping timeout: 264 seconds]
Yoric has joined #ocaml
wmeyer`` has joined #ocaml
zpe has joined #ocaml
wmeyer` has quit [Ping timeout: 260 seconds]
mfp has joined #ocaml
<gour>
what are main 'selling points' of 4.1 release?
<gasche>
overall, it's a polishing release after the ambitious changes of 4.00, and before other ambitious changes in 4.01 or 4.02
<gasche>
(I meant 4.02 or 4.03, of course)
talzeus has quit [Remote host closed the connection]
<gour>
hmm...i'm confused a bit...4.01 = 4.1 or?
<ygrek>
btw, gasche, I find the new changelog format harder to read
<ygrek>
not sure about a better way though
<adrien_oww>
"4.01"
<adrien_oww>
just a format thing
<ygrek>
e.g. contributor name on the same line and/or html format with lighter colors
<gour>
adrien_oww: ok. never encountered something like that ;)
<gasche>
going for lunch now
<gasche>
but ygrek I'm open to suggestion
<gasche>
(but "on the same line" doesn't work with 80-columns restriction)
<gasche>
maybe right-aligning the author attribution
<gasche>
(and obviously we don't have colors in an ASCII file)
<ygrek>
80-column... ohhh, don't make me started
<ygrek>
right aligning is a nice idea
<adrien_oww>
never tell gallium people they can go over 80 columns
<adrien_oww>
they already do it a lot :D
<Kakadu>
gour: hi!
<gour>
hiya Kakadu
<Kakadu>
Can you say something lablqt-related?
zpe has quit [Remote host closed the connection]
* Kakadu
have tried to built it in Windows but it is more difficult than I thought
<adrien_oww>
bwahahahahahahah
<adrien_oww>
sorry :D
<gour>
Kakadu: i'm trying to build wxOCaml in order to compare with lablqt, but, so far, i can say that wxOcaml looks promising by requring from user to just write: open wxWidgets...otoh, i'm not quite familiar with QtQuick and not sure whether is good-enough for the desktop feature-wise...however, if we consider that (labl)gtk's support for multi-platform is not thrilling and eliminating Tk, there are not many
<gour>
choices...except if adrien_oww won't produce EFL :-D
<Kakadu>
Well, it's impossible for QtQuick to do something like "open Lablqt"
<gour>
another, general, concern is how is writing multi-platform app feasible today cocnerning win8 restrictions and freedom on Mac OS?
<Kakadu>
gour: Or in last message your was politely saying that you dislike QtQuick approach for GUI programming?
dsheets has joined #ocaml
<gour>
Kakadu: you gave up on QtGUI?
<Kakadu>
It's very difficult to generate good bindings for it
<Kakadu>
for example if We use QAbstractItemMOdel
<gour>
Kakadu: not at all, i'm simply not familiar with it, although i do like such approach...i liked e.g. python's kivy which is cool...have you seen it'
malo has joined #ocaml
<Kakadu>
ind we use QModelIndex there we need to create QModelIndexes by specific method of QAbstractItemModel and not with constructor of QModelIndex
<gour>
i'm also for clearing the repo to become more clear what is expected from end-user to write...here i'm thinking about C++ stubs
<Kakadu>
gour: I have removed generated files yesterday
<mrvn>
Kakadu: so QAbstractItemModel needs to be a functor that creates a local QModelIndex module
<adrien_oww>
hmmmmmmmmmmmmmmmmmmmmm
<adrien_oww>
(that was an expression of doubt about the possibility of mapping what I guess is a virtual class to functors)
<mrvn>
Kakadu: I think that QModelIndex stuff is a mess in QT. Total mess, esspecially with the ItemWidget classes.
gnuvince has quit [Remote host closed the connection]
<Kakadu>
mrvn: In QtQuick model/views it seems more logical
<gour>
btw, today i read that IUP got utf-8 support, but, afaik, there is no specific Mac support
<mrvn>
haven't lookt at that yet.
<Kakadu>
Anyway, QtWidgets are deprecated and to create new binding code today for them seems rather strange
<gour>
EFL, being C, looks as interesting option as well
<adrien_oww>
typical EFL involves writing a separate theme file though
<gour>
Kakadu: my concern for Kivy, was/is that it's more for touch and mobiles...similar suspicions for QtQuick?
<adrien_oww>
(which is better imho)
<gour>
adrien_oww: i also like they list freebsd as supported platform, while, afaik, there is no qt5 port available yet
<Kakadu>
gour: initially QtQuick was for mobile devices but in 5.1 have added desktop widgets which should looks native for Mac and Linux
<gour>
Kakadu: yeah, it looks i'm little bit behind 'cause i was spending time in shopping adequate language first :-)
Neros has joined #ocaml
<gour>
when we have language now, the fact that there are ncurses brings peace :P
q66 has joined #ocaml
<whitequark>
wait, how are QtWidgets deprecated?
<whitequark>
do they tell us to write everything in JS now? :/
<Kakadu>
whitequark: only GUI
<whitequark>
yeah screw that
<mrvn>
I wouldn't mind a reimplementation of QT in ocaml.
<Xuerian>
Jumping in a bit late here, Win8 restrictions? On desktop apps, or are you targeting metro?
<gour>
Xuerian: yeah, i was thinking about metro
<Xuerian>
Ah, right.
<gour>
not at all familiar with newer Windows...only have XP under vbox, but read some time ago that making open-source app for windows is troublesome
<whitequark>
Kakadu: I don't think QtWidgets are deprecated, though
<gour>
similar with Mac's stores etc. so just wonder if one should just write for linux/bsd and interested users run that
<whitequark>
I can't see any info on that.
<gour>
i'm, in general, not very fond of JS stuff
<Xuerian>
gour: From what I can tell most of it is either A, platform specific libraries, or B, trying to get a app in the Windows Store, which I don't understand why you would try to do if your users also use linux/bsd
<gour>
killing desktop for stupid mobile touch-enabled games...computing is going astray
<gour>
Xuerian: well, i'm considering to write open-source app on linux/bsd, but, if possible, provide ability to use it under Win/Mac
<gour>
i can only test it on xp atm, without access to Mac
<gour>
Xuerian: what is the future of open-source apps for Win/Mac, in general?
<Xuerian>
Then don't worry about Metro at all, just write a desktop app. For which qt, wxwidgets, whatever all will work fine, more or less like on XP - just pay attention to permissions so you can run limited properly. (Most of that has to do with data storage locations if I'm nost mistaken)
<gour>
*desktop apps
<Kakadu>
> New user interfaces such as the Windows 8 Metro UI are not things we could simply add to our existing QWidget infrastructure. Adding support for the kind of animations used in these user interfaces is extremely difficult using QWidgets, as they were designed for the mostly static user interfaces that predominated until a couple of years ago.
<gour>
Xuerian: ok, more clear now. ta...now just to find proper ocaml bindings :-)
<Xuerian>
The amount of misconception about Windows 8 always impresses me =\
<gour>
one never knows with M$ :-)
<gour>
another good reason that i gave up idea to use F# ;)
ousado has joined #ocaml
<adrien_oww>
Metro has several constraints, including restrictions on the APIs that are usable
weie has quit [Quit: Leaving...]
<gour>
there is also not free VS capable to write apps for it?
<adrien_oww>
what?
q66 has quit [Read error: Connection reset by peer]
<adrien_oww>
labltk has been extracted from trunk 10 days ago
<pippijn>
that's nice
zpe has quit [Ping timeout: 245 seconds]
<pippijn>
adrien_oww: are more parts going to be extracted?
<adrien_oww>
yes
<adrien_oww>
when...
contempt has quit [Ping timeout: 245 seconds]
contempt has joined #ocaml
<pippijn>
adrien_oww: what parts?
<pippijn>
adrien_oww: ocamlbuild?
<pippijn>
adrien_oww: camlp4?
<pippijn>
I would be in favour of having things split as much as makes sense
<adrien_oww>
same here but things might take a looong time
<pippijn>
why?
<adrien_oww>
because? :D
Neros has joined #ocaml
zarul has joined #ocaml
beckerb has joined #ocaml
zpe has joined #ocaml
Drup has joined #ocaml
<pippijn>
adrien_oww: is it much work?
<adrien_oww>
depends how much you want to break things
<adrien_oww>
(for others I mean)
<pippijn>
hm
<pippijn>
right
zpe has quit [Ping timeout: 245 seconds]
gour has quit [Disconnected by services]
gour_ has joined #ocaml
talzeus has quit [Remote host closed the connection]
Drup has quit [Ping timeout: 245 seconds]
<gasche>
adrien_oww, pippijn: we may very well get ocamlbuild out before the next release, but I'm personally full with other things to do right now so September is definitely not the right month for me
hto has joined #ocaml
<adrien_oww>
hmmmmmmmmmmm
<adrien_oww>
well
<adrien_oww>
sure if it's "mv ocamlbuild $somewhere_else"
<adrien_oww>
apart from that, I find it doubtful it'll work unless next release is in a looooong time
<adrien_oww>
(and I'd much prefer to see a version out with cross-compilation support before that)
<gasche>
I would tend to agree
<adrien_oww>
and that means moving camlp4 out first
zpe has joined #ocaml
<adrien_oww>
which, in itself, would deserve a new release probably
tane has joined #ocaml
<gour_>
adrien_oww: labltk (from forge9 does not build with 3.12.1 either
gour_ is now known as gour
<adrien_oww>
hmmm, no
<adrien_oww>
I would expect it to build with ocaml trunk
zpe has quit [Ping timeout: 245 seconds]
<adrien_oww>
you should use the labltk that is in otherlibs/labltk inside the compiler distrbution
<gour>
that one should build with 4.01?
<adrien_oww>
ocaml 4.01 -> labltk from ocaml 4.01
<adrien_oww>
ocaml 3.12 -> labltk from ocaml 3.12
<gour>
ok
<adrien_oww>
ocaml trunk -> labltk from the forge
<gour>
ocaml trunk is 4.02.0dev+trunk in opam?
<adrien_oww>
no idea
<adrien_oww>
if you use trunk and it breaks, as often said, you get to keep the pieces
<jpdeplaix>
gour: yes
<gour>
jpdeplaix: ta...trying that now
boogie has joined #ocaml
<gour>
that works
<gour>
the look is not thrilling, but code is quite straightforward
mika1 has quit [Quit: Leaving.]
<adrien_oww>
actually, with tk, I've been having a few issues
<adrien_oww>
notably with right-click menus disappearing as soon as I release the button
<gour>
hmm
<gour>
however, afaict, that's not ttk, and probably gtk looks much better, at least on linux
<gour>
this experiments, at least, give me some insight into opam which is nice tool
cago has left #ocaml []
<jpdeplaix>
gildor: is there a way to give extra arguments to ocamlbuild through oasis ? Like the -plugin-tags
smondet has joined #ocaml
walter|r has joined #ocaml
walter has quit [Read error: Connection reset by peer]
bitbckt has quit [Ping timeout: 240 seconds]
ocp has quit [Ping timeout: 240 seconds]
<gour>
is ocaml community conitnue to push so many build systems like oasis, ocamlbuild, ocp-build..?
<pippijn>
yep
<pippijn>
everybody needs their own build system
beckerb has quit [Ping timeout: 240 seconds]
rossberg has quit [Ping timeout: 240 seconds]
gereedy has quit [Ping timeout: 240 seconds]
<jpdeplaix>
gour: please notice that oasis and ocamlbuild are complementary
zpe has joined #ocaml
beckerb has joined #ocaml
<pippijn>
jane street jenga
<pippijn>
pippijn obuild
<gour>
jpdeplaix: so one can't function without the other?
<gour>
but ocp-build is stand-alone, right?
<pippijn>
ocamlbuild can function without oasis
<pippijn>
but not vice versa
<jpdeplaix>
gasche: quick answer :D
<gour>
huh...
<pippijn>
oasis builds on top of ocamlbuild
<pippijn>
jenga seems good
<gour>
jenga? i haven't heard about that one...
<pippijn>
build systems seem to always suck
<pippijn>
either they force you into their structure
boogie has quit [Remote host closed the connection]
ihm1 has joined #ocaml
shinnya has joined #ocaml
Yoric has quit [Ping timeout: 264 seconds]
zpe has joined #ocaml
tane has quit [Quit: Verlassend]
es917 has joined #ocaml
zpe has quit [Ping timeout: 246 seconds]
ygrek has quit [Ping timeout: 245 seconds]
gereedy has joined #ocaml
boogie has joined #ocaml
skchrko_ has quit [Quit: Leaving]
romain_b has quit [Quit: Page closed]
ihm1 has quit [Quit: ihm1]
Kakadu has quit []
zpe has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
zpe has joined #ocaml
thomasga has joined #ocaml
thomasga1 has quit [Read error: Connection reset by peer]
bitbckt has joined #ocaml
iZsh has quit [Excess Flood]
iZsh has joined #ocaml
dsheets has quit [Ping timeout: 240 seconds]
mathieui has quit [Quit: WeeChat 0.4.0-rc2]
Kakadu has joined #ocaml
bobzhang1988 has joined #ocaml
paolooo has joined #ocaml
zpe has quit [Remote host closed the connection]
ontologiae_ has joined #ocaml
mathieui has joined #ocaml
paolooo has quit [Quit: Page closed]
dsheets has joined #ocaml
yacks has joined #ocaml
zarul has quit [Read error: Connection reset by peer]
zarul has joined #ocaml
<fds>
What's with all the option types in Core? Maybe I don't know how to deal with them properly, but it really seems to make using lists awkward.
<Kakadu>
What is with them?
<ggole>
They don't care for exceptions.
<ggole>
There's sometimes a _exn version of the function if you prefer that.
paolooo has joined #ocaml
<fds>
Kakadu: For example, List.hd is 'a list -> 'a option
<Kakadu>
fds: It's okay type signature for me
<fds>
Well, I'd be happier with 'a list -> 'a
<Kakadu>
fds: hd_exn exists too
<ggole>
That's pretty silly: if you were going to match, surely you'd just match on the list.
<fds>
I suppose there probably is a good match idiom to do what I want to do, but I don't know it.
<ggole>
And what is that?
paolooo has quit [Client Quit]
skunkwerks is now known as dch
<fds>
So, I have a list of strings (read from a file) and I want to put the data into separate lists. Basically, the three lines should be put into variables a,b,c, then the next n (not fixed) lines should be put into d, and the final line into e.
<fds>
(I'll probably ask again in a minute about converting a list like "1 -1 3" into the list [1; -1; 3].)
<fds>
s/list/string/1
<fds>
Hm, actually, breaking the list up like that is probably easier than I thought.
<fds>
I don't need to state the n anywhere, right? Just pattern match "from the end" as well.
* fds
is quite new to this.
<ggole>
match lines with a::b::c::rest -> let middle, last = split_last rest in ... | _ -> failwith "not enough lines"
<ggole>
And then write split_last.
zarul has quit [Read error: Connection reset by peer]
zarul has joined #ocaml
<ggole>
let split_last xs = let rec loop acc = function | [] -> failwith "empty list" | [x] -> List.rev acc, x | x::xs -> loop (x::acc) xs in loop [] xs
<fds>
Hm, let me digest this. :-)
dsheets has quit [Ping timeout: 245 seconds]
jayprich has joined #ocaml
ocp has joined #ocaml
dsheets has joined #ocaml
ben_zen has quit [Ping timeout: 264 seconds]
malo has quit [Quit: Leaving]
ollehar has joined #ocaml
beckerb has quit [Ping timeout: 246 seconds]
<fds>
ggole: Okay, that works perfectly! Thanks.
zarul has quit [Ping timeout: 245 seconds]
zarul has joined #ocaml
tane has joined #ocaml
zpe has joined #ocaml
Yoric has joined #ocaml
darkf has joined #ocaml
zpe has quit [Ping timeout: 264 seconds]
ocp has quit [Ping timeout: 245 seconds]
wmeyer`` has quit [Ping timeout: 260 seconds]
Yoric has quit [Ping timeout: 260 seconds]
ocp has joined #ocaml
thomasga has quit [Ping timeout: 245 seconds]
thomasga has joined #ocaml
ihm1 has joined #ocaml
oriba has joined #ocaml
Snark has quit [Quit: leaving]
Yoric has joined #ocaml
dch is now known as skunkwerks
gour has quit [Quit: WeeChat 0.4.1]
thomasga has quit [Quit: Leaving.]
bobzhang1988 has quit [Ping timeout: 264 seconds]
tani has joined #ocaml
tane has quit [Ping timeout: 245 seconds]
boogie has quit [Remote host closed the connection]