lapinou changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | http://www.ocaml.org | OCaml 4.01.0 announce at http://bit.ly/1851A3R | Public logs at http://tunes.org/~nef/logs/ocaml/
q66 has quit [Quit: Leaving]
thomasga has quit [Quit: Leaving.]
avsm has joined #ocaml
thomasga has joined #ocaml
thomasga has quit [Client Quit]
avsm has quit [Ping timeout: 240 seconds]
Hannibal_Smith has quit [Quit: Sto andando via]
maattdd has quit [Ping timeout: 240 seconds]
lostcuaz has joined #ocaml
araujo has quit [Ping timeout: 240 seconds]
RMacy has joined #ocaml
<ousado> heh, have you seen hack?
jwatzman|wor has quit [Quit: jwatzman|wor]
NoNNaN has quit [Remote host closed the connection]
NoNNaN has joined #ocaml
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
RMacy is now known as RMacy|Away
RMacy|Away has quit []
RMacy has joined #ocaml
RMacy has quit [Client Quit]
RMacy has joined #ocaml
ikaros has quit [Quit: Ex-Chat]
divyanshu has joined #ocaml
avsm has joined #ocaml
avsm has quit [Ping timeout: 252 seconds]
<ollehar> anyone used model checking?
Axord has quit [Ping timeout: 255 seconds]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
Axord has joined #ocaml
zzing has quit [Quit: Textual IRC Client: www.textualapp.com]
divyanshu has quit [Ping timeout: 240 seconds]
divyanshu has joined #ocaml
claudiuc_ has quit [Remote host closed the connection]
divyanshu has quit [Ping timeout: 240 seconds]
divyanshu has joined #ocaml
lostcuaz has joined #ocaml
tulloch has joined #ocaml
nikki93 has joined #ocaml
araujo has joined #ocaml
manizzle has quit [Read error: Operation timed out]
nikki93 has quit [Remote host closed the connection]
ygrek has joined #ocaml
tulloch has quit [Ping timeout: 240 seconds]
yacks has joined #ocaml
NoNNaN has quit [Remote host closed the connection]
NoNNaN has joined #ocaml
NoNNaN has quit [Ping timeout: 265 seconds]
ollehar has quit [Ping timeout: 252 seconds]
shinnya has quit [Ping timeout: 252 seconds]
divyanshu has quit [Quit: Computer has gone to sleep.]
divyanshu has joined #ocaml
divyanshu has quit [Client Quit]
tulloch has joined #ocaml
tulloch has quit [Ping timeout: 245 seconds]
ollehar has joined #ocaml
avsm has joined #ocaml
divyanshu has joined #ocaml
RMacy has quit []
nikki93 has joined #ocaml
avsm has quit [Ping timeout: 246 seconds]
divyanshu has quit [Quit: Computer has gone to sleep.]
ontologiae has quit [Ping timeout: 240 seconds]
divyanshu has joined #ocaml
fernand has joined #ocaml
fernand has left #ocaml []
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
siddharthv_away is now known as siddharthv
nikki93 has quit [Remote host closed the connection]
paolooo has joined #ocaml
nikki93 has joined #ocaml
ollehar has quit [Ping timeout: 252 seconds]
ollehar has joined #ocaml
Vinnipeg has joined #ocaml
paolooo has quit [Ping timeout: 245 seconds]
ggole has joined #ocaml
avsm has joined #ocaml
michel_mno_afk is now known as michel_mno
avsm has quit [Ping timeout: 265 seconds]
paolooo has joined #ocaml
ygrek has quit [Ping timeout: 246 seconds]
Vinnipeg has quit [Remote host closed the connection]
nikki93 has quit [Remote host closed the connection]
avsm has joined #ocaml
ygrek has joined #ocaml
avsm has quit [Read error: Operation timed out]
axiles has joined #ocaml
paolooo has quit [Ping timeout: 245 seconds]
jao has quit [Ping timeout: 252 seconds]
ollehar has quit [Ping timeout: 252 seconds]
elfring has joined #ocaml
darkf has quit [Ping timeout: 255 seconds]
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
darkf has joined #ocaml
nikki93 has joined #ocaml
nikki93 has quit [Ping timeout: 265 seconds]
rand000 has joined #ocaml
yacks has quit [Ping timeout: 240 seconds]
Qrntz has quit [Ping timeout: 252 seconds]
jonludlam has quit [Remote host closed the connection]
yacks has joined #ocaml
`jpi has joined #ocaml
<`jpi> compiled and installed ocaml from tag 4.01.0
<`jpi> doesn't install ocamlbuild.cmx
<`jpi> anybody knows why?
<wwilly_> bonjour
<adrien_oww> `jpi: did you run "make opt"?
<adrien_oww> make opt.opt too?
<adrien_oww> basically: how did you build?
<`jpi> yes
<`jpi> make world.opt
<`jpi> then tried make world && make opt && make opt.opt
<`jpi> both didn't work
<`jpi> what is ocalbuildlight btw?
<adrien_oww> nothing, keep that out of your mind
<adrien_oww> it doesn't exist
<adrien_oww> it's a hole in space-time
<`jpi> hah
<`jpi> any ideas where i should look ?
avsm has joined #ocaml
<adrien_oww> just checked, I have it installed
<adrien_oww> under usr/lib64/ocaml/ocamlbuild/ocamlbuild.cmx
Kakadu has joined #ocaml
avsm has quit [Ping timeout: 240 seconds]
AltGr has joined #ocaml
<`jpi> i don't even have that file in buildd tree
ggole has quit [Ping timeout: 240 seconds]
<adrien_oww> on 4.01.0?
Axord has left #ocaml []
<`jpi> yes
<adrien_oww> can you show a full build log?
<`jpi> you mean whole output of world.opt?
<`jpi> my question is how is that file generated?
<adrien_oww> it should always be built
<`jpi> now i know, why so few people use this language
avsm has joined #ocaml
<adrien_oww> I've done hundreds (yes, hundreds) of builds and I really expect this file to always be there
<adrien_oww> which is why a build log with configure + make world.opt would be valuable
<`jpi> sure; please stand by
ggole has joined #ocaml
<elfring> I have adjusted an OCaml source file. It can be compiled without errors in one variant. (The executable file can also be run in a way that fits to some of my expectations.)
<elfring> But if I move two function implementatios from around the beginning to the file end, I wonder about the following error message.
<elfring> /usr/bin/ocamlopt.opt -unsafe -I ocamlextra -I ocollection -c common.ml
<elfring> File "common.ml", line 6234, characters 7-15:
<elfring> Error: This expression has type char but an expression was expected of type unit
<Kakadu> elfring: How this functions are called?
<elfring> Would you like to know the concrete function names?
maattdd has joined #ocaml
<Kakadu> yep
<Kakadu> The problem is in OCaml new function definitions hide previously declared ones
<Kakadu> So If you change order of declarations some types can change
<`jpi> ftp://devpts.org/ocaml.build
<`jpi> adrien_oww: ^
<Kakadu> elfring: maybe you override some names frm Pervasives module?
aurynj has quit [Quit: Leaving]
<`jpi> adrien_oww: there are these files ocamlbuildlight.*
<`jpi> again what is ocamlbuildlight?
mika1 has joined #ocaml
<elfring> Kakadu: I hoped that I chose function names which are reasonably unique in this use case. Would you like to look at an update suggestion for an open issue like "Support for file names with special characters"?
<adrien_oww> `jpi: it's something built for building parts of the compiler
<`jpi> yeah renamed those files to ocamlbuild.*
<`jpi> wtf
<`jpi> >:(
<`jpi> now it works
<`jpi> flux: i am yet to learn occaml
<`jpi> setting up the toolchain
<`jpi> wasted an hour
<adrien_oww> hmm
<adrien_oww> did you "make -jX"?
<`jpi> No
<`jpi> anyways now i installed batteries
Simn has joined #ocaml
<`jpi> will have fun; but i sincerely hope the released versions to be in a state that would be usable
`jpi has left #ocaml []
zpe has joined #ocaml
jonludlam has joined #ocaml
ikaros has joined #ocaml
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
tulloch has joined #ocaml
dsheets has joined #ocaml
divyanshu has quit [Quit: Computer has gone to sleep.]
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
nikki93 has joined #ocaml
nikki93 has quit [Read error: Operation timed out]
shinnya has joined #ocaml
q66 has joined #ocaml
divyanshu has joined #ocaml
divyanshu has quit [Quit: Computer has gone to sleep.]
hnrgrgr_ is now known as hnrgrgr
avsm has quit [Quit: Leaving.]
<elfring> Would you like to share any experiences in potentially interesting run time differences between variants for character replacement (which uses the module "Buffer") and the function "Str.global_substitute"?
<companion_cube> good question, I tend to avoid Str as much as possible
<flux> I agree with cc. Str has hidden internal state, which can be disatrous in multi-threaded programs.
<whitequark> moreover, Str just has a horrible interface in general.
<companion_cube> or even in any other program that uses Str on more than one input
rand000 has quit [Ping timeout: 240 seconds]
<flux> companion_cube, well yes, but even the functions in Str that appear safe, aren't in multithreaded environment
<companion_cube> indeed
<flux> I think it was Str.split that caused me very surprising problems
<companion_cube> I'm not sure many OCaml programmers use threads though
<flux> well, if a program now doesn't use thread it could use threads later on
<flux> at that point it's no fun to remove references to Str
<flux> better start with Pcre from the get-go :)
<companion_cube> heh
<flux> the worst thing is that you provide a library that uses str beneath the surface, now the caller has no idea it's broken
* adrien_oww hits companion_cube on the head with a stick
* companion_cube frowns at adrien_oww
* adrien_oww hits companion_cube some more
<flux> talking about threads, has someone followed the multicore-approaches currently going on?
<flux> I'm planning to double the cpu-usage of my program and it already uses 70% :)
<companion_cube> some work is going on at ocamllabs, last time I checked
<companion_cube> but no idea about progres
<companion_cube> +s
<dsheets> i think there are some patches to clean up assumptions about gc
<flux> I need to check out if the cairo bindings release the ocaml lock, because that's where I use a lot of time..
<flux> if they can do release it or can be modified to release it, it would probably work for me
<dsheets> specifically, marshal/unmarshal has some optimizations
<dsheets> there's also a Unix patchset to release the lock during syscalls
<dsheets> should be in 4.02
<flux> oh, it didn't do that yet?
<flux> nice that it's now there then
<dsheets> not all of them
<flux> I hope Unix.select would be one that releases it :)
<dsheets> there are a lot of syscalls that "shouldn't" block but can under weird circumstances
<dsheets> or, really, just nfs or fuse mounts
<dsheets> poll can block if the FS is out to lunch
ollehar has joined #ocaml
avsm has joined #ocaml
<flux> well, everybody needs to eat sometime
<dsheets> ok but other people want to use rcs so r
<dsheets> FS should release the lock and then we can make progress
<dsheets> I've got a number of unix header bindings in ctypes which do release the lock to accomplish a FUSE server and FS client in a single multi-threaded LWT executable
<flux> nice
<flux> I feel there aren't enough ocaml-based fule filesystems :)
<dsheets> well, the bindings were a bit crap. we're gonna have a boatload in the next year
<flux> there was this one fuse-based meta-filesystem that provided logical operators for organizing data, but it sadly was a very bad demo for ocaml, as it was very crashy
<dsheets> linky?
<flux> no doubt the problem was in the various C bindings it used
<dsheets> oh, right, i have the papers about this in my queue
<flux> retrieving metadata from some media files felt like a weak point
<flux> I would love organizing some of my data that way
<flux> but I would definitely need a fallback, say, a web-based interface as well..
<dsheets> funny that you mention that...
<flux> and command line tools. ls -l $(lfs-find 'pattern')
nikki93 has joined #ocaml
<dsheets> yus. this system is on the drawing board
<flux> on your drawing board?
<dsheets> yes
Simn has quit [Ping timeout: 246 seconds]
<dsheets> the short term is FUSE protocol tapping
<dsheets> just come to sweden in september
<flux> what's in sweden at september?
<flux> hmph, gothenburg is on the opposite side of sweden ;)
<flux> but apparently there are direct fligts from Tampere
nikki93 has quit [Ping timeout: 240 seconds]
<flux> 250 EUR there and back
_andre has joined #ocaml
divyanshu has joined #ocaml
divyanshu has quit [Client Quit]
Simn has joined #ocaml
divyanshu has joined #ocaml
divyanshu has quit [Client Quit]
divyanshu has joined #ocaml
divyanshu has quit [Quit: Computer has gone to sleep.]
divyanshu has joined #ocaml
avsm has quit [Quit: Leaving.]
thomasga has joined #ocaml
<Drup> dsheets: is luca's work used for this new set of changes ?
<Drup> flux: it's more expansive than to come from france =')
<dsheets> Drup, luca's?
avsm has joined #ocaml
<Drup> worked on multi-runtime at ocamlpro a last year
<Drup> -a
<dsheets> I don't know. I just know the GC prep work has been done.
<Drup> ok
divyanshu has quit [Quit: Computer has gone to sleep.]
<dsheets> Drup, perhaps mail stedolan who is working on it
divyanshu has joined #ocaml
<Drup> I'm pretty sure he's aware of luca's work anyway, I'm just curious :)
<Drup> My curiosity will be satisfied soon enough :p
NoNNaN has joined #ocaml
<nicoo> flux: Why use Pcre over regular REs (yes, I know that redundant) ? ocaml-re, especially, has a rather nice API
nikki93 has joined #ocaml
<hcarty> nicoo: Both are nice. I've found ocaml-re's Re_glob particularly convenient.
<nicoo> Yup :)
nikki93 has quit [Ping timeout: 240 seconds]
rand000 has joined #ocaml
Dongyancai has left #ocaml []
ontologiae has joined #ocaml
siddharthv is now known as siddharthv_away
divyanshu has quit [Quit: Computer has gone to sleep.]
thomasga has quit [Quit: Leaving.]
talzeus_ has quit [Read error: Connection reset by peer]
yacks has quit [Ping timeout: 246 seconds]
avsm has quit [Quit: Leaving.]
rand000 has quit [Ping timeout: 252 seconds]
yacks has joined #ocaml
<gasche> Drup: short answer: no
<gasche> Luca's work is not used
<gasche> OCamllabs wanted to do things differently with thread-local state instead of a threaded state variable
<gasche> (which they argue is more efficient and less invasive, at the cost of not actually making the runtime reentrant)
<Drup> ::
<Drup> :/*
<Drup> it's a shame, it's mostly functional
<adrien_oww> tls isn't available everywhere though
AltGr has left #ocaml []
<adrien_oww> it has its cost and it's not available on some crap "mobile" OS
<adrien_oww> OSes maybe too
<adrien_oww> otoh, on Windows RT in RT mode, you don't get threads at all so...
AltGr has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
<flux> nicoo, well, I guess pcre is much older
ollehar has quit [Read error: Operation timed out]
<flux> but maybe I'll try that some day :)
<hcarty> flux: I've used and continue to use both in different projects. I generally use re in new projects since it eliminates a non-OCaml dependency.
<flux> so it performes worse?-)
<hcarty> ocaml-re even provides a (very small) Pcre compatibility module to draw you in!
<flux> though pure ocaml is always nice.
<hcarty> flux: :-) Not in my experience. None of my current regex use in OCaml is particularly significant in the overall runtime cost.
<flux> it would be a bigger benefit if pcre for ocaml wasn't very mature.
<hcarty> According to the ocaml-re docs it usually as fast or faster than pcre
<hcarty> Yes, the maturity of (PCRE and the OCaml bindings) is a large part of why I haven't moved existing projects over
<hcarty> Also, named matches are nice to have. I don't think ocaml-re supports them.
<Drup> flux: ocaml-re is faster because you don't *have* to use pcre. normal regular expressions are naturally more efficient than pcres
avsm has joined #ocaml
<flux> hmm, I think ocaml-re could provide even actual benefit if it allowed to suspend/restore the matching state
<flux> for matching bigger strings than your current available data happens to be
<flux> it seems nicer if you need to programmatically generate regexps
nikki93 has joined #ocaml
<flux> such a suspend/restore would probably be completely unfeasible to do with pcre, but maybe even trivial with some CPS or OCaml?
<gasche> flux: send a patch!
<gasche> it should be possible without even any CPS
<flux> cool, core's opensls bindings are written using ctypes
avsm has quit [Ping timeout: 245 seconds]
<flux> gasche, well, if I find myself needing online regular expression matching, I'm sure to keep ocaml-re in my mind ;)
WraithM has quit [Ping timeout: 240 seconds]
<flux> so the return value of some executes would be .. -> (results * resume)
<ggole> Hmm, if you didn't have to distinguish pointers and integers with a tag bit, you could represent lists very compactly using pointer tagging
<ggole> I wonder if the unpacking cost would be too high
thomasga has joined #ocaml
ollehar has joined #ocaml
mort___ has joined #ocaml
<gasche> ggole: think of all the interesting things your brain could do if you were not obsessed with constant-factor gains of more compact memory representations
<gasche> (like... design better syntax^Wtype systems!)
NoNNaN has quit [Remote host closed the connection]
<ggole> I don't know enough about type systems to contribute to the field
thomasga has quit [Ping timeout: 265 seconds]
<ggole> Tasteless perf hacking, maybe
divyanshu has joined #ocaml
Leonidas has left #ocaml []
<companion_cube> is it me or is the channel more active this days?
<Drup> A little bit
<Drup> we gain ~30 people in the last few days
<companion_cube> wait for the 1B facebook users to join
<Drup> :D
<ggole> Facebook use OCaml a bit, I hear
<Drup> more than a bit, actually
<Drup> they use it for all their static analysis tools, afaik
<adrien_oww> companion_cube: it's you
<companion_cube> aww
<adrien_oww> not I
<nicoo> flux: It is indeed much nicer than string manipulation for generating regexps. Also, you can match online : https://github.com/ocaml/ocaml-re/blob/master/lib/re.mli#L37
<ousado> facebook has written hack in ocaml
<ousado> their "programming language of the future" :)
<adrien_oww> it can be a migration path
<ousado> sure it is
<Drup> ousado: well, it's basically a big static analyser for php :p
<ousado> hum, well, there are types now
<ousado> I'd call that a different language
<Drup> optional types
<ousado> in different modes, there's strict mode, even
<Drup> sure
<companion_cube> that's like an extension of php that makes it slightly less insane
<Drup> that's a superset of php with type annotations, which is compatible we all php code => static analysis with annotations on php :p
darkf has quit [Quit: Leaving]
demonimin has joined #ocaml
<ousado> yeah, whatever, I couldn't be further from denying the heritage, ugliness, half-assedness of it.
<companion_cube> Drup: that doesn't mean it's not a significant improvement on php in practice
<ousado> and yet another 21ist century langauge without ADTs
<ousado> 21st
<companion_cube> it's pretty impressive that rust got that right
<Drup> companion_cube: absolutly
avsm has joined #ocaml
<Drup> rust is an academic language done by industry people :3
thomasga has joined #ocaml
<companion_cube> which sounds good
<companion_cube> php is a toy language used as an industrial language :D
<nicoo> companion_cube: Modern toy languages are even higher-quality, on average :þ
* companion_cube coughs
<companion_cube> right, go isn't a toy language
<companion_cube> (hmm ok, it's still better than php)
<nicoo> companion_cube: Go is less awful than PHP
<nicoo> :D
<companion_cube> but not much
<ggole> Even javascript didn't choose its standard library names according to strlen
ygrek has joined #ocaml
<hcarty> Keep in mind that for many people, PHP = programming. If Hack nudges them in a positive direction that they wouldn't have been aware of otherwise then that's a good thing.
<freling> I'm impressed by their engineering effort to fix PHP
<companion_cube> hcarty: you mean that for many people, programming = PHP? :s
<freling> PHP compiler to C++, then a PHP VM, and now a language for that VM
avsm has quit [Quit: Leaving.]
<hcarty> companion_cube: Both? :-)
aurynj has joined #ocaml
<companion_cube> awwww
<hcarty> It works in both directions and isn't meant to be disparaging (sp?) in either.
<hcarty> It's thankfully possible to think that a language is badly designed without thinking the same about people using the language.
<companion_cube> up to a certain point where you can start questioning their sanity ^^
<ggole> Lerdorf has always been the first to admit that he isn't a language designer
troydm has quit [Ping timeout: 252 seconds]
<companion_cube> he even admitted not being interested in good design :)
<companion_cube> just wants "something that works" iirc
nikki93 has quit [Remote host closed the connection]
avsm has joined #ocaml
mort___ has quit [Quit: Leaving.]
mort___ has joined #ocaml
RMacy has joined #ocaml
<hcarty> companion_cube: Do you want to move your split batteries implementation to have *_opt versions of functions rather than BatFoo.Exceptionless modules?
<companion_cube> I don't know whether people would like it
<companion_cube> actually a voting system for batteries would be pretty interesting to have
troydm has joined #ocaml
<companion_cube> but I'm afraid that if I do that, my branch will never be merged ^^
<hcarty> companion_cube: I often want Sys.getenv to return a string option value. I'll submit a pull request at some point but want to structure it appropriately.
<companion_cube> it sounds right to me, indeed
<hcarty> My vote goes for _opt suffixes. The maintenance load should be less.
<companion_cube> exceptions don't appear in signatures, and merlin is my primary source of documentation nowadays ^^
<companion_cube> indeed, less code duplication
<hcarty> companion_cube: Indeed!
<companion_cube> can gasche tell us his opinion?
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
<hcarty> Thanks to merlin I can neglect my browser while coding
<adrien_oww> I think I'd prefer to have both in the same module and be able to chose easily depending on the context
<hcarty> adrien_oww: Agreed.
<companion_cube> adrien_oww: you mean, val foo and val foo_opt in the same place?
<companion_cube> me too
<Drup> (same here)
<adrien_oww> or foo and foo_exn
<companion_cube> that would break compatibility
<companion_cube> (I agree it's better though)
avsm has quit [Quit: Leaving.]
thomasga has quit [Quit: Leaving.]
<ygrek> foo and foo_exn is way better
<companion_cube> but it's not compatible with the stdlib
<companion_cube> (which is a goal of batteries)
<companion_cube> I wouldn't mind using Map.find_opt most of the time, it's still better than wrapping the exception by hand
<adrien_oww> companion_cube: you could easily provide a module inside each module that does the renaming
<adrien_oww> like BatFooO (I agree it's a bit ugly but if you open, it's only once)
<adrien_oww> I mean, have both BatFoo and BatFooO
<adrien_oww> BatFoo being the default
<companion_cube> adrien_oww: it's what's done currently (batExceptionless)
<companion_cube> but it leads to a lot of duplicated code
<companion_cube> if we change the API that comes from the stdlib, we could as well change the fold signatures, etc.
<companion_cube> and write Core ;)
<adrien_oww> :P
<adrien_oww> true
<adrien_oww> well, make a first release with most of the ideas, and think about the details later on
<companion_cube> the details, such as whether to break the stdlib compatibility or not? :D
<companion_cube> I'd rather just add foo_opt when needed
<hcarty> Starting out with foo, foo_opt/foo_res as appropriate is a step in the right direction
RMacy has quit []
thomasga has joined #ocaml
yacks has quit [Ping timeout: 240 seconds]
thomasga has quit [Client Quit]
thomasga has joined #ocaml
<elfring> Can any check implementation be reused for the determination if a name will be a valid OCaml module identifier?
<companion_cube> I'm not sure I understand what you want
<companion_cube> valid module identifiers are like identifiers, but must start with a capital letter, roughly
avsm has joined #ocaml
<Drup> elfring: could you reformulate that in english ? :s
<elfring> Specific rules are applied for OCaml module identifiers. Would you like to check the validity of a chosen name also in other situations than by OCaml compiler implementations?
<Drup> you are asking what are the rules for a module identifier to be correct ?
<Drup> then it's quite simple : ascii starting by a capital letter.
<def-lkb> [A-Z][A-Za-z0-9_']*
<adrien_oww> éàèç :D
<Drup> right, less than ascii
tulloch has quit [Ping timeout: 252 seconds]
<adrien_oww> maybe not for modules though
<Drup> no accent in identifier :)
<adrien_oww> I have to say I don't often try to put accents in my code :P
<Drup> me neither
<Drup> but you can put ' in the middle
<Drup> which is .. weird
<def-lkb> useful as a delimiter when generating mangled names
<elfring> The documentation mentions lexical conventions. I find that it would be nice if a wordling like "The current implementation also recognizes as letters all accented characters ..." could be mapped to a character class which might be reused in regular expressions.
<def-lkb> also useful if you want to write readable code (literally). Don't_you
<companion_cube> 'a T'a.T'b.T'c M.'a
<Drup> elfring: it doesn't accept accented characters. def-lkb gave you the exact regexp, and it's in the documentation
<companion_cube> quite a readable type
<companion_cube> ('a,'b) T'a.T'b.T'c M'a.t, rather
<Drup> huum
jlarocco has quit [Ping timeout: 240 seconds]
<Drup> I didn't know that module types could have any starting letter
jlarocco has joined #ocaml
<ggole> Huh, that's... odd
mmachenry has joined #ocaml
tulloch has joined #ocaml
<elfring> def-lkb,Drup: I find your try for a regular expression incomplete because I read the documentation in the way that "letters" belong to a bigger character class in the context of "capitalized identifiers" (for module names).
<elfring> But: "... This feature is deprecated and should be avoided for future compatibility."
<Drup> Don't encode your source files in ISO 8859-1 or you will be crucified :3
<ggole> "The current implementation accepts identifiers up to 16000000 characters in length" omg not enough
avsm has quit [Quit: Leaving.]
nikki93 has joined #ocaml
<ousado> is that max_string_length?
mika1 has quit [Quit: Leaving.]
mort___ has quit [Ping timeout: 240 seconds]
lostcuaz has joined #ocaml
<elfring> Does any module provide strings which correspond to the discussed naming rules for the reuse in regular expressions?
<ggole> I'm very disappointed: a file with an identifier 16000001 chars long compiles just fine.
<ousado> ggole: 64 bit system?
<ggole> No, 32
<ousado> hm, try 16777216 maybe
<ousado> as you're doing useful things anyway :D
avsm has joined #ocaml
<ggole> Fatal error: exception Failure("Lexing.lex_refill: cannot grow buffer")
<ggole> Failure success!
<ousado> \o/
WraithM has joined #ocaml
shinnya has quit [Ping timeout: 252 seconds]
ontologiae has quit [Ping timeout: 240 seconds]
<ggole> That doesn't seem to be a tight bound, though... hmm.
<ggole> The largest successful length would seem to be 16777206
<whitequark> ggole: russian translation for strerror value for ESUCCESS in glibc is the equivalent of "Victory"
<whitequark> leads to fun results like "Cannot open file: Victory"
<ousado> lol
<whitequark> it's been at least eight years and it's *still there*
<ousado> it's awesome
<ggole> Heh, that's a nice twist on the good old "error: success"
_andre has quit [Read error: No route to host]
<whitequark> yep
<ggole> (errno: not even once)
<whitequark> another fun thing: ifconfig. "UP" is translated as "UPWARDS"
<whitequark> "UPWARDS BROADCAST MULTICAST"
* whitequark giggles
<ggole> Nontechnical translator, perhaps?
<ggole> Or they were SETI fans
<whitequark> I'm really not sure how nontechnical you have to be to translate "success" as "victory" in computing context
<whitequark> I mean, that looks like either a deliberate prank (not a bad one), or a truly horrifying level of incompetence
<ggole> Yeah. UP is easily misunderstood though.
<whitequark> yeah. and "DOWN" is not translated at all
tobiasBora has joined #ocaml
<whitequark> I think I used ru_RU locale for about a month in my entire life. it's just incomprehensible in general, regardless of OS or application.
<ggole> Mmm, english is definitely the path of least resistance
<ousado> in german pirated windows versions repeatedly remind you that "Windows is not original software"
_andre has joined #ocaml
tane has joined #ocaml
tobiasBora has quit [Quit: Konversation terminated!]
tobiasBora has joined #ocaml
tobiasBora has quit [Client Quit]
tobiasBora has joined #ocaml
<def-lkb> elfring: I checked in the ocaml lexer implementation, it's the same regex as the one I gave you
<def-lkb> then, there is a second rule for deprecated latin1 characters emitting a warning
<def-lkb> I can't help you more (src/lexer.mll /UIDENT)
WraithM has quit [Ping timeout: 240 seconds]
<elfring> Thanks for your feedback. - Are any more software developers interested to convert a few naming patterns into reusable regular expressions?
<def-lkb> What would be the purpose?
<def-lkb> You will find most regex related to ocaml names in the lexer.mll file, by definition :)
Kakadu has quit [Quit: Page closed]
<elfring> Some character classes were standardised: http://www.regular-expressions.info/refcharclass.html
mmachenry has quit [Quit: Leaving.]
<elfring> Would it be nice if OCaml specific character classes do not need to be explicitly repeated in own source code?
<Drup> why do you want this in your source code ?
<Drup> if you want an ocaml front end, use compiler-libs
<Drup> afair, the parser is available in it
<elfring> I am looking for extensions around popular (OCaml) character classes.
<rks2> why?
<elfring> Why were some character classes standardised at all? Does it make corresponding software development a bit safer eventually?
<Drup> safer ?
<ousado> eventually?
cdruzac has joined #ocaml
<def-lkb> having formal definitions for lexemes might make shell script safer, but it's a bit farstretched for ocaml
<elfring> I would like to say "eventually" because deviations from "a standard" exist as usual also in the software devopment area for regular expressions, don' t they?
avsm has quit [Quit: Leaving.]
<ggole> Standards only exist so that people can deviate from them.
ontologiae has joined #ocaml
jonludlam has quit [Remote host closed the connection]
pminten has joined #ocaml
ddosia has joined #ocaml
maattdd has quit [Ping timeout: 240 seconds]
jwatzman|work has joined #ocaml
<gasche> I just googled "Cannot open file: Victory"
<gasche> the only hit is a message by whitequark_ on #ruby last January
nikki93 has quit [Remote host closed the connection]
<whitequark> gasche: that's because it's in russian
<whitequark> try "невозможно открыть файл: победа"
zarul has quit [Ping timeout: 240 seconds]
<whitequark> hm, no, that doesn't work. hang on
elfring has quit [Quit: Konversation terminated!]
zarul has joined #ocaml
tobiasBora has quit [Ping timeout: 246 seconds]
<def-lkb> Even in french, "Succès" doesn't make a lot of sense in this context.
nikki93 has joined #ocaml
<def-lkb> I see "Une erreur a été recontrée : succès" from time to time.
mmachenry has joined #ocaml
tlockney_away is now known as tlockney
<whitequark> def-lkb: gasche: fun fact: you need to scroll only one message down to get the correct translation
claudiuc has joined #ocaml
Kakadu has joined #ocaml
nikki93 has quit [Remote host closed the connection]
ivan\ has quit [Ping timeout: 240 seconds]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
ivan\ has joined #ocaml
mmachenry has quit [Quit: Leaving.]
avsm has joined #ocaml
sheijk has joined #ocaml
claudiuc_ has joined #ocaml
malo has joined #ocaml
avsm has quit [Ping timeout: 240 seconds]
jlarocco has quit [Quit: Leaving]
claudiuc has quit [Ping timeout: 240 seconds]
jlarocco has joined #ocaml
thomasga has quit [Ping timeout: 245 seconds]
WraithM has joined #ocaml
ontologiae has quit [Ping timeout: 240 seconds]
ikaros has quit [Read error: Connection reset by peer]
ikaros has joined #ocaml
mmachenry has joined #ocaml
mort___ has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
<nicoo> def-lkb: Probably a program which used errno to display an error string
nikki93 has joined #ocaml
<def-lkb> nicoo: likely :), still surprising
<nicoo> and has gone in the error-handling path when it shouldn't (like malloc(0) returning NULL, for instance)
zpe has quit [Ping timeout: 265 seconds]
<adrien> or has called something that set errno again
nlucaroni has joined #ocaml
ygrek has quit [Quit: ygrek]
Hannibal_Smith has joined #ocaml
Anarchos has joined #ocaml
nikki93 has quit [Remote host closed the connection]
Anarchos has quit [Read error: Connection reset by peer]
pminten has quit [Remote host closed the connection]
nikki93 has joined #ocaml
<nicoo> adrien: Also, but saving errno; ss value is usually the first thing you do
<nicoo> errno's*
<adrien> do I? :D
<adrien> nicoo: I use %m anyway :D
nikki93 has quit [Remote host closed the connection]
maattdd has joined #ocaml
nikki93 has joined #ocaml
ontologiae has joined #ocaml
mort___ has quit [Ping timeout: 240 seconds]
AltGr has left #ocaml []
nikki93 has quit [Remote host closed the connection]
michel_mno is now known as michel_mno_afk
sheijk has quit [Ping timeout: 245 seconds]
jlarocco has quit [Quit: Leaving]
ulfdoz has joined #ocaml
claudiuc has joined #ocaml
claudiuc_ has quit [Ping timeout: 265 seconds]
claudiuc has quit [Remote host closed the connection]
Anarchos has joined #ocaml
nlucaroni has quit [Quit: leaving]
CissWit has joined #ocaml
tautologico has joined #ocaml
Roin has joined #ocaml
nikki93 has joined #ocaml
ggole has quit []
thomasga has joined #ocaml
ollehar has quit [Read error: Operation timed out]
zpe has joined #ocaml
divyanshu has quit [Quit: Computer has gone to sleep.]
ollehar has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
Anarchos has quit [Ping timeout: 246 seconds]
mmachenry has quit [Write error: Broken pipe]
kakadu_ has joined #ocaml
Kakadu has quit [Write error: Broken pipe]
dsheets has quit [Read error: Operation timed out]
claudiuc has joined #ocaml
nikki93 has quit [Remote host closed the connection]
claudiuc_ has joined #ocaml
Anarchos has joined #ocaml
Anarchos has quit [Client Quit]
rand000 has joined #ocaml
claudiuc has quit [Ping timeout: 269 seconds]
Anarchos has joined #ocaml
RMacy has joined #ocaml
ollehar1 has joined #ocaml
elfring has joined #ocaml
dsheets has joined #ocaml
sheijk has joined #ocaml
<ddosia> at this moment I still can not distinguish language features from some tricky libraries. Like "lazy" thing...
_andre has quit [Quit: leaving]
michael_lee has joined #ocaml
<adrien> lazy is bolted into the compiler so...
michael_lee has quit [Read error: Connection reset by peer]
jonludlam has joined #ocaml
<Anarchos> where is the svn source of findlib ?
nikki93 has joined #ocaml
ulfdoz has quit [Ping timeout: 241 seconds]
<ddosia> I found this example in RWO hard to understand, could someone clarify me: let make_rec f_norec = let rec f x = f_norec f x in f;;
<ddosia> this is supposed to make recursive function from not recursive, but I can not understand how
<companion_cube> f_norec takes as first arguments its recursive version
<companion_cube> let rec f x = f_norec f x in f;;
<companion_cube> ↑ this builds the recursive version "f" of "f_norec"
<ddosia> you can find full example here, btw https://realworldocaml.org/v1/en/html/imperative-programming-1.html
<ddosia> grep memoization
<companion_cube> I know this pattern
<companion_cube> the idea is that f can perform more things than just calling f_norec, indeed
<ddosia> could you give an usage example?
<ddosia> an^W
Arsenik has joined #ocaml
tulloch has quit [Read error: Connection reset by peer]
<companion_cube> ddosia: well, if "f" puts its return values into a hashtable
<companion_cube> you get memoization
<ddosia> yes
<ddosia> the memoisation examples suppose to remember return of each function call
<companion_cube> you could also log what happens
<ddosia> as I understood the problem is that when call is recursive, it is not memoised
<ddosia> but why, i cant uderstand
<sheijk> ddosia: if f does the recursive call on itself directly you can't hook into it. while if it recurses by calling the explicit parameter you can hook into each of its calls by passing the modified function as argument
<gasche> let fac_derec fac = function 0 -> 1 | n -> n * fac (n - 1);;
<gasche> let make_rec f_norec = let rec f x = f_norec f x in f;;
<gasche> let fac = make_rec fac_derec;;
<companion_cube> \o gasche
RMacy is now known as RMacy|Away
RMacy|Away has quit []
nikki93 has quit [Remote host closed the connection]
nikki93 has joined #ocaml
ikaros has quit [Quit: Ex-Chat]
RMacy has joined #ocaml
<ddosia> gasche: seems that I am one step closer to understand this :)
<ddosia> Although fac_derec is not recursive, inside it is call fac
<ddosia> and if we pass fac_derec as arg to itself it will became recursive
<ddosia> and make_rec does this
<ddosia> so as I understand this pattern only applicable to ocaml b/c of this "rec" restriction (when we can't hook to following recursive calls)?
<ddosia> otherwise it is not useful
<companion_cube> it's useful because you can write a combinators that does the memoization for you
<companion_cube> and then you use it to write a function that is easily memoized
NoNNaN has joined #ocaml
ddosia has quit [Ping timeout: 252 seconds]
ddosia has joined #ocaml
ulfdoz has joined #ocaml
sheijk has quit [Ping timeout: 240 seconds]
elfring has quit [Quit: ChatZilla 0.9.90.1 [Firefox 28.0/20140314220517]]
axiles has quit [Remote host closed the connection]
<gasche> there are many interesting use cases for open recursion
<gasche> some of them being mentioned in Jacques Garrigue's "Code Reuse through Polymorphic Variants"
shinnya has joined #ocaml
RMacy has quit []
maattdd has quit [Ping timeout: 252 seconds]
tane has quit [Quit: Verlassend]
Hannibal_Smith has quit [Quit: Sto andando via]
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
oriba has joined #ocaml
sheijk has joined #ocaml
kakadu_ has quit [Quit: Konversation terminated!]
oriba has quit [Quit: Verlassend]
oriba has joined #ocaml
tlockney is now known as tlockney_away
tlockney_away is now known as tlockney
nikki93 has quit [Remote host closed the connection]
NaCl has quit [Quit: leaving]
NaCl has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20131020]: i've been blurred!]
tnguyen has quit [Ping timeout: 265 seconds]
ulfdoz has quit [Ping timeout: 265 seconds]
ddosia has quit [Ping timeout: 240 seconds]
ollehar has quit [Ping timeout: 245 seconds]
darkf has joined #ocaml
ikaros has joined #ocaml
tnguyen has joined #ocaml
jonludlam has quit [Quit: Leaving]
tlockney is now known as tlockney_away
rand000 has quit [Quit: leaving]
thomasga has quit [Quit: Leaving.]
Roin has quit [Quit: Verlassend]
q66 has quit [Quit: Leaving]