jimmyrcom_ has quit [Remote host closed the connection]
jimmyrcom_ has joined #ocaml
mengu has quit [Remote host closed the connection]
mbuf has quit [Ping timeout: 248 seconds]
mbuf has joined #ocaml
_whitelogger has joined #ocaml
samrat has quit [Ping timeout: 260 seconds]
xuanrui has quit [Quit: Leaving]
jlam__ has quit [Ping timeout: 248 seconds]
enterprisey has joined #ocaml
samrat has joined #ocaml
ziyourenxiang has quit [Ping timeout: 240 seconds]
alexelcu has quit [Remote host closed the connection]
alexelcu has joined #ocaml
Associat0r has quit [Ping timeout: 260 seconds]
mbuf has quit [Ping timeout: 248 seconds]
jlouis has quit [Remote host closed the connection]
ahf has quit [Quit: Bye.]
ahf has joined #ocaml
FreeBirdLjj has joined #ocaml
_whitelogger has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
jsoo has joined #ocaml
jimmyrcom_ has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
jsoo has quit [Client Quit]
kerrhau has quit [Ping timeout: 240 seconds]
eh_eff has joined #ocaml
eh_eff has quit [Ping timeout: 240 seconds]
sz0 has joined #ocaml
syamaoka has joined #ocaml
cbot_ has joined #ocaml
cbot has quit [Ping timeout: 240 seconds]
ziyourenxiang has joined #ocaml
mengu has joined #ocaml
govg has joined #ocaml
cbot_ has quit [Ping timeout: 248 seconds]
mengu has quit [Ping timeout: 240 seconds]
_whitelogger has joined #ocaml
tane has joined #ocaml
enterprisey has quit [Read error: Connection reset by peer]
DanielRichman has quit [Ping timeout: 240 seconds]
DanielRichman has joined #ocaml
eh_eff has joined #ocaml
eh_eff has quit [Ping timeout: 246 seconds]
peterpp has joined #ocaml
argent_smith has joined #ocaml
sz0 has quit [Quit: Connection closed for inactivity]
KeyJoo has joined #ocaml
mfp__ has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 246 seconds]
Spriithy has joined #ocaml
<Spriithy>
Hey
<Spriithy>
I have just started using ocaml and I'm wondering how come can I not pattern match strings just like lists (as in Haskell)
<Spriithy>
as in `let s = match s with 'x'::_ -> ...`
<tane>
Spriithy, in haskell, the basic string is a list of characters, in ocaml that's not the case
<Spriithy>
So how do I match the begining characters of a string (or more recently bytes from what I have heard) ?
<Spriithy>
I have tried looking for string specific matching operators without success
<tane>
"hello".[0] == 'h'
<tane>
you can index strings with .[-]
<Spriithy>
Okay! and the "rest" of the string ? "hello".[1:] ?
<Spriithy>
something like that ?
fraggle_ has quit [Read error: Connection reset by peer]
<tane>
Spriithy, some sub-string function from the string module
<tane>
or you convert your string to a list of chars, if that suits your needs
<tane>
then it behaves like in haskell
<Spriithy>
Yeha I have tried that
<Spriithy>
but can't figure out if there is a builtin way
<Spriithy>
I've explored the String / Bytes module with no luck
<tane>
yeah
<Spriithy>
Maybe using `map`
<tane>
I use the containers library for these things, it will provide a String.to_list function
<tane>
otherwise craft it yourself, yeah
<Spriithy>
do module name collides somehow ? i.e. Core String and Containers String
<tane>
if you open Containers, yeah, but you can just use CCString
<Spriithy>
is that another package ?
fraggle_ has joined #ocaml
<tane>
it's a module from the containers package
sam_ has quit [Ping timeout: 260 seconds]
argent_smith has quit [Quit: Leaving.]
<Spriithy>
Well, made myself an accumulator based to_list func
<Spriithy>
seems decent
ayxih has joined #ocaml
<zozozo>
Spriithy: if you want something like "hello".[1:], there is container's CCString.Sub that allows you to handle string slices
samrat has quit [Ping timeout: 240 seconds]
rand__ has joined #ocaml
FreeBirdLjj has joined #ocaml
tane has quit [Quit: Leaving]
FreeBirdLjj has quit [Ping timeout: 260 seconds]
ShalokShalom_ has joined #ocaml
ShalokShalom has quit [Ping timeout: 240 seconds]
_whitelogger has joined #ocaml
peterpp has quit [Quit: Ex-Chat]
mengu has joined #ocaml
mengu has quit [Ping timeout: 240 seconds]
jao has joined #ocaml
dakk has quit [Ping timeout: 260 seconds]
soultadu has joined #ocaml
soultadu has quit [Client Quit]
sillyotter has joined #ocaml
sillyotter has quit [Client Quit]
dejanr_home has joined #ocaml
dejanr has quit [Ping timeout: 255 seconds]
jao has quit [Ping timeout: 246 seconds]
dejanr_home has quit []
dejanr has joined #ocaml
_whitelogger has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
samrat has joined #ocaml
ShalokShalom_ is now known as ShalokShalom
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
Spriithy has quit [Ping timeout: 260 seconds]
samrat has quit [Ping timeout: 260 seconds]
Associat0r has joined #ocaml
Associat0r has quit [Changing host]
Associat0r has joined #ocaml
dakk has joined #ocaml
FreeBirdLjj has joined #ocaml
sam_ has joined #ocaml
eh_eff has joined #ocaml
eh_eff has quit [Ping timeout: 255 seconds]
copy_ has joined #ocaml
samrat has joined #ocaml
argent_smith has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
samrat has quit [Ping timeout: 240 seconds]
samrat has joined #ocaml
<rand__>
Anyone knows how is 'opam switch create' is supposed to be used in opam-2.0.0~beta3 when wanting to install switch from locally pulled git repo?
<rand__>
I get
<rand__>
"[ERROR] No compiler matching '4.02.2+local-git-master' found"