<dmbaturin>
whitequark: What is the reason deriving is >4.02 only?
<whitequark>
dmbaturin: it uses 4.02 facilities for extending the syntax
<dmbaturin>
The camlp4 or ocaml itself?
<whitequark>
ocaml itself.
<dmbaturin>
Can 4.02 be installed via opam?
<whitequark>
yes, it's released
<whitequark>
opam switch 4.02.0
<dmbaturin>
opam installed 4.01 for me, which barely makes sense because I already had 4.01 from the repos.
<whitequark>
well, you asked it to!
<whitequark>
by default, opam uses the system compiler. you don't have to switch if you want to keep it
<dmbaturin>
I didn't, I just didn't ask otherwise. :)
<whitequark>
or `opam switch system`
<whitequark>
anyway, 4.02 was released fairly recently. try `opam update`
<dmbaturin>
Hhm.
<dmbaturin>
/home/dmbaturin/.opam/4.01.0/bin/ocamlopt: a /home/dmbaturin/.opam/4.01.0/bin/ocamlrun script executable (binary data)
<dmbaturin>
What does it mean by "ocamlrun script executable"?
<whitequark>
`less /home/dmbaturin/.opam/4.01.0/bin/ocamlopt`. you'll see
<dmbaturin>
I see binary data.
<whitequark>
and the first line?
<dmbaturin>
ocamlrun shebang. I mean, how do I find out what it really does? :)
<whitequark>
what do you mean by "what it really does"?
<whitequark>
it works essentially as a shell script, except instead of program text, there is bytecode
<dmbaturin>
Well, find out what the script does. Does it run the system compiler, search for compilers and starts appropriate version etc.?
<dmbaturin>
Other than using strace on it.
<whitequark>
huh? it's a regular ocaml bytecode executable.
<whitequark>
no different than what you would install via your package manager, sans its location
<dmbaturin>
>by default, opam uses the system compiler; I thought you mean it uses the system compiler and files in ~/.opam/4.01 are not the compiler executables in this case.
<whitequark>
no, ~/.opam/4.01.0 indicates that you installed a non-system compiler
<whitequark>
otherwise, ocamlc would be in /usr/bin/ocamlc, and package binaries would be in ~/.opam/system/bin
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
ygrek_ has joined #ocaml
zpe has quit [Ping timeout: 246 seconds]
<dmbaturin>
I still have the compiler installed from packages, so it's kind of confusing.
jpdeplaix has quit [Ping timeout: 260 seconds]
Hannibal_Smith has joined #ocaml
Simn has joined #ocaml
cago has joined #ocaml
ollehar has joined #ocaml
sagotch has joined #ocaml
aubergines has joined #ocaml
thomasga has joined #ocaml
ontologiae has joined #ocaml
NoNNaN has joined #ocaml
Kakadu has joined #ocaml
ygu_ is now known as ygu
ygu has quit [Changing host]
ygu has joined #ocaml
NoNNaN has quit [Remote host closed the connection]
zpe has joined #ocaml
fraggle-boate has quit [Ping timeout: 272 seconds]
cago has quit [Ping timeout: 260 seconds]
bezirg has joined #ocaml
ontologiae has quit [Ping timeout: 260 seconds]
acieroid` is now known as acieroid
octachron has joined #ocaml
fraggle-boate has joined #ocaml
NoNNaN has joined #ocaml
ontologiae has joined #ocaml
thomasga has quit [Quit: Leaving.]
tane has joined #ocaml
ygrek_ has quit [Ping timeout: 272 seconds]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
NoNNaN has quit [Remote host closed the connection]
jpdeplaix has joined #ocaml
zpe has quit [Ping timeout: 260 seconds]
thomasga has joined #ocaml
<sagotch>
Is there way to group without naming and expression with Str module? (e.g. "Hello\\( world!\\)?", but without " world!" being binded to \\1)
<adrien_oww>
I don't think so
<adrien_oww>
also, why?
<tane>
no (?: ... ) ?
<sagotch>
I just want to match an optional group inside a named group, without adding an identifier
rand000 has joined #ocaml
<adrien_oww>
but what is the issue in doing so?
parametaortho has joined #ocaml
divyanshu has joined #ocaml
<sagotch>
One reason would be that use of \\n in regexp is limited to 0-9, so you may not want to add useless named groups.
<sagotch>
use of \x (x : int)*
hhugo has joined #ocaml
thomasga has quit [Quit: Leaving.]
AltGr has joined #ocaml
willy_ has quit [Remote host closed the connection]
divyanshu has quit [Quit: Computer has gone to sleep.]
rand000 has quit [Ping timeout: 272 seconds]
divyanshu has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
samrat has joined #ocaml
englishm has joined #ocaml
BitPuffin has quit [Ping timeout: 272 seconds]
thomasga has joined #ocaml
ygrek_ has joined #ocaml
zpe has joined #ocaml
divyanshu has quit [Quit: Computer has gone to sleep.]
<dmbaturin>
What is the standard way to rename the executable after building in ocamlbuild?
divyanshu has joined #ocaml
divyanshu has quit [Client Quit]
divyanshu has joined #ocaml
divyanshu has quit [Client Quit]
<MercurialAlchemi>
sagotch: usually you'd do that with ?:, I don't know if it's supported though
tane has quit [Quit: Verlassend]
<MercurialAlchemi>
dmbaturin: use oasis? :)
ontologiae has quit [Ping timeout: 255 seconds]
thomasga has quit [Quit: Leaving.]
<whitequark>
dmbaturin: there is none.
<whitequark>
for simplicity, you could make a symlink
octachron has quit [Ping timeout: 245 seconds]
dsheets has joined #ocaml
englishm has quit [Remote host closed the connection]
englishm has quit [Remote host closed the connection]
octachron has joined #ocaml
siddharthv is now known as siddharthv_away
emias has quit [Quit: Bye]
emias has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
thomasga has joined #ocaml
msaegesser has joined #ocaml
darkf has quit [Quit: Leaving]
sepp2k has joined #ocaml
BitPuffin has quit [Ping timeout: 272 seconds]
BitPuffin has joined #ocaml
msaegesser has quit [Ping timeout: 245 seconds]
<Drup>
AltGr, thomasga: would it be possible, in an opam repository, to have just urls to git repository and let the opam file in the git repository be picked up ?
<thomasga>
I don't think so
<thomasga>
opam is looking for opam files to know which packages are in the repo
<thomasga>
(so you can have abitrary prefixes)
<Drup>
yeah, that was my understanding
<thomasga>
(packages/XXXXX/NAME.VERSION/opam)
<Drup>
but it means that, for eliom for exemple, we duplicate opam files
<Drup>
and obviously, one of them goes out of sync
<thomasga>
I see ...
<thomasga>
worth reporting that workflow on the issue tracker
<Drup>
well, I'm not sure it's actually a good one, we're going to deprecate this repository in favor of pinning
<thomasga>
having an opam file for a git tracked package is not always a good thing
<thomasga>
well, pinning are harder to share
<thomasga>
(we did the same thing for mirage at one point, but we are going back to a dev repo)
<Drup>
yes, but we shared this repository because the eliom release was far behing the dev version. If we are a bit better at doing releases, we won't need it :p
tane has joined #ocaml
msaegesser has joined #ocaml
<thomasga>
yea … same problem here :-)
rgrinberg has joined #ocaml
<Drup>
but yes, you are right, it might be interesting in general, will open a ticket
<AltGr>
maybe you could just share an export file containing just the pins :)
<AltGr>
just an idea
<thomasga>
can we `opam import <uri>` ?
<AltGr>
nope, but why not
<AltGr>
problem with import is that it's non-trivial to undo
<thomasga>
yea …
<dsheets>
what about remotes that are actually export files to be imported?
<AltGr>
maybe a solution would be a special opam-admin that auto-syncs opam files
<Drup>
AltGr: that's a fix that rely on automation on the repo side, it doesn't really fix the underlying issue
<Drup>
it means putting hooks everywhere, it's not really satisfying :/
<AltGr>
dunno, I'm not sure there is an issue to fix on the opam side really. Anyway, how to best share a dev environment is worth thinking about
msaegesser has quit [Ping timeout: 260 seconds]
ggole has joined #ocaml
<Drup>
AltGr: Not sure what we (you :D) are going to do with it, but at least there is an issue to track it :p
<AltGr>
thanks
msaegesser has joined #ocaml
jc1 has joined #ocaml
beginner has joined #ocaml
<beginner>
is there a way to get the string representation of bin prot encoded values?
<Drup>
dsheets: do you still plan on working on some sort of htmlm ?
<dsheets>
Drup, which way? i have some uncommitted processor that will mangle XML into HTML
manizzle has joined #ocaml
<dsheets>
also, i have a tool which works over web sites <https://github.com/dsheets/webmaster> that uses Xmlm and falls back to Nethtml and would like to use an HTML mangler
<Drup>
basically, I would like a proper parser and a modular streaming printer for tyxml, and if someone did the whole entity handling for me, I'm not gonna complain :)
<dsheets>
Drup, i have a lot of the components in various libraries already. see https://github.com/dsheets/htmlmu for the mangler (i forgot!)
<Drup>
hence the question : did you have already such thing.
<dsheets>
Drup, i have the mangler which is primarily what we want for authoring
<dsheets>
for parsing random web garbage, the closest is Nethtml
<dsheets>
it seems that you want the mangler and maybe some support functions for parsing literal char entities into UTF-8 (to be remade into entities by xmlm)
<dsheets>
Also, I don't have anything that handles comments which is sad
gasche has quit [Ping timeout: 260 seconds]
<dsheets>
so... maybe that helps you?
gasche has joined #ocaml
<Drup>
the mangler simply transforms <foo /> in <foo></foo>, right ?
bezirg has quit [Quit: Leaving.]
bezirg has joined #ocaml
ollehar has joined #ocaml
WraithM has quit [Ping timeout: 255 seconds]
<dsheets>
Drup, https://github.com/dsheets/htmlmu/blob/master/lib/htmlmu.ml for everything except the void element set which can't be translated. also, there are html entities to be translated to xml entities, xml namespaces to be added, the HTML5 doctype, and mathml and svg namespaces to be added among other things
<dsheets>
the goal is to get a full xhtml5 -> polyglot function
philtom has quit [Ping timeout: 260 seconds]
<Drup>
right
<dsheets>
Drup, anyway, i'm interested in what you find out and decide... keep me informed if you would
<dsheets>
for now, i have to cycle home and eat dinner, ttyl
<Drup>
(we have these thingies somewhere in tyxml, I never actually touched them because this norm horrifies me everytime I look at it :D)
yacks has quit [Ping timeout: 272 seconds]
dsheets has quit [Ping timeout: 272 seconds]
oriba has joined #ocaml
Kakadu has joined #ocaml
keen__ has joined #ocaml
keen_ has quit [Ping timeout: 272 seconds]
mort___ has joined #ocaml
malo has quit [Remote host closed the connection]
malo has joined #ocaml
Nahra` has joined #ocaml
ollehar has quit [Ping timeout: 260 seconds]
badkins has joined #ocaml
hhugo has joined #ocaml
troutwine_away is now known as troutwine
MercurialAlchemi has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
thegp has joined #ocaml
araujo has joined #ocaml
araujo has joined #ocaml
oriba has quit [Quit: oriba]
WraithM has joined #ocaml
philtom has joined #ocaml
thegp has left #ocaml [#ocaml]
Nahra has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
Nahra` has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
Nahra has joined #ocaml
ollehar has joined #ocaml
claudiuc_ has joined #ocaml
claudiuc has quit [Read error: Connection reset by peer]
claudiuc_ has quit [Read error: Connection reset by peer]
claudiuc has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
Anarchos has joined #ocaml
bezirg has quit [Ping timeout: 260 seconds]
claudiuc has quit [Remote host closed the connection]
claudiuc has joined #ocaml
morphles has quit [Ping timeout: 240 seconds]
troutwine is now known as troutwine_away
claudiuc has quit [Remote host closed the connection]
claudiuc has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
troutwine_away is now known as troutwine
rgrinberg has joined #ocaml
bezirg has joined #ocaml
srcerer has joined #ocaml
ollehar has quit [Ping timeout: 255 seconds]
rgrinberg has quit [Quit: Leaving.]
srcerer has quit [Client Quit]
rgrinberg has joined #ocaml
srcerer has joined #ocaml
fold has joined #ocaml
axiles has quit [Remote host closed the connection]
jwatzman|work has joined #ocaml
avi__ has quit [Ping timeout: 245 seconds]
claudiuc has quit [Remote host closed the connection]
claudiuc has joined #ocaml
thomasga has joined #ocaml
thomasga1 has joined #ocaml
Hannibal_Smith has quit [Quit: Sto andando via]
thomasga has quit [Ping timeout: 246 seconds]
oscar_toro has joined #ocaml
fold has quit [Ping timeout: 272 seconds]
rand000 has quit [Quit: leaving]
badkins has quit []
fold has joined #ocaml
<Denommus>
if I can have a tuple value without parentheses, why do I need them for tuple types? Is there any reasoning, or is just the way it is?
<mrvn>
precedence
Kakadu has quit [Quit: Konversation terminated!]
NoNNaN has joined #ocaml
<mrvn>
either (a * b) list or a * (b list) needs ()
<Denommus>
I'm talking about a tuple of type, not a type of tuples
<mrvn>
as in?
<Drup>
(a,b) thingy ?
<Drup>
it's not really tuple, it's more like type that takes multiple arguments
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
<mrvn>
which has (a, b) thingy and a, (b thingy). only one can be without ()
<Denommus>
it's a tuple of types
<Denommus>
well, does 'a, ('b thingy) make sense?
<Denommus>
but ok, ok, I take it
<mrvn>
('a, ('b thingy)) thingymabob
claudiuc has quit [Remote host closed the connection]
claudiuc has joined #ocaml
fold has quit [Ping timeout: 272 seconds]
hhugo has quit [Quit: Leaving.]
sepp2k has quit [Quit: Konversation terminated!]
rgrinberg has quit [Quit: Leaving.]
badkins has joined #ocaml
alinab has quit [Quit: leaving]
<badkins>
I'm considering learning OCaml, and I'm curious how much of some of my existing ML books might apply. I picked up "ML for the Working Programmer", "Elements of ML Programming", "The Little MLer", Okasaki's book when learning Standard ML
q66 has quit [Read error: Connection reset by peer]
q66 has joined #ocaml
<Drup>
probably pretty much all of it
<badkins>
cool - good to hear :)
<mrvn>
it's more about what is missing from it then what doesn't apply
fold has joined #ocaml
alinab has joined #ocaml
<badkins>
I was hoping that was the case. I'll probably start with Real World OCaml, but I may use my existing ones also as a supplement.
alinab has quit [Client Quit]
englishm has quit [Remote host closed the connection]
englishm has joined #ocaml
<Drup>
(okasaki's is always good anyway, for algorithmic purposes :p)
<badkins>
On another note, I installed ocaml on osx via: brew install ocaml --without-x11 since I'm not planning on any gui stuff for a while. That worked fine, but brew install opam failed with: objective-caml: Unsatisfied dependency: XQuartz 0.0.0
<badkins>
is XQuartz required for opam ? That seems odd.
MercurialAlchemi has quit [Ping timeout: 260 seconds]
<Drup>
I don't even know what XQuartz is, so, probably not :p
<badkins>
I'm patient :) Just knowing it's a focus give me a higher comfort level in investing in learning the lang now.
<Drup>
anil is not part of the core team and doesn't decide what goes into the compiler =)
johnnydiabetic has quit [Ping timeout: 245 seconds]
<Drup>
(even if I'm pretty sure his opinion is not without weight :p)
<mrvn>
badkins: it is rather easy to implement parts of cpu intensive algorithms in C and run them with the runtime lock released. That way you can utilize all cores which each thread only occasionally swithing to ocaml.
<mrvn>
or split the work into multiple processes from the start
<badkins>
yeah, I'm used to having to use multiple procs for parallelism now, but I'm hoping to be able to have better support directly in ocaml - a year or two would be fine, but if it's going to be stalled indefinitely, I would be sad
<Drup>
("rather easy" *cough* *cough*)
<Drup>
badkins: I don't think it's going to be stalled indefinitely
<mrvn>
I don't think it will ever work too well without the user organizing the alogirhtms for it properly.
<adrien>
the current multicore runtime effort seems to have started things well
<badkins>
I fooled around with Haskell quite a bit, but ultimately decided that ocaml is probably a better fit for my needs. I hadn't actually gotten around to exploring the concurrency/parallelism aspect of Haskell, but it does seem to have decent support at this point.
<badkins>
My first impression of opam is excellent - everything is installing w/o any hiccups.
<mrvn>
I also think we need 3 runtime flavours: 1) single core like now, 2) a few cores (say <= 8) and 3) massive multicore
bezirg has quit [Ping timeout: 272 seconds]
<mrvn>
you can use different tricks with a strictly limited number of cores.
bezirg has joined #ocaml
<mrvn>
adrien: does the current effort use a strictly per core minor heap?
<nicoo>
mrvn: When your CPU-intensive part does heavy-weight symbolic manipulation, you don't really want to write it in C :(
<nicoo>
mrvn: IIRC, yes
<mrvn>
nicoo: true
<badkins>
Cool - *everything* recommended by RWO installed fine. utop is a different kind of repl :)
<nicoo>
badkins: utop is a super-fancy repl, yes :)
<mrvn>
It would be cool if one had hardware support for this. Trap when writing a thread local address into a global memory segment.
<nicoo>
badkins: About RWO, you should keep in mind that it doesn't always distinguishes between what is standard OCaml and what is Core (Jane Street's ecosystem, with syntax extensions and so on), IIRC.
<mrvn>
nicoo: why would you ever not use core? :)))
<badkins>
Yeah, I know. At this point, I don't mind a highly opinionated guide though. I can plumb the differences later I suppose.
<companion_cube>
nicoo: in rust, soooon
<nicoo>
mrvn: mprotect-ing the global memory wouldn't be as efficient, but if the share heap doesn't contain too much mutable stuff, it should be workable :)
<badkins>
Jane Street was an influence in my decision to learn OCaml. I've messed with enough languages now to know that the difference between practice and theory is often much greater in practice than in theory :) The number of years and lines of code at Jane Street is an important data point to me, so I'm willing to give their ecosystem a shot initially.
<badkins>
But I'm also open to suggestions re: good things to keep in mind as a newbie getting started.
<nicoo>
'kay :)
* badkins
is now wondering if there is something about core he should understand :)
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
ygrek_ has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
zpe has quit [Ping timeout: 260 seconds]
mort___ has quit [Quit: Leaving.]
bezirg has quit [Ping timeout: 260 seconds]
jwatzman|work has quit [Quit: jwatzman|work]
msaegesser has quit [Ping timeout: 255 seconds]
BitPuffin has quit [Ping timeout: 245 seconds]
milosn has quit [Ping timeout: 240 seconds]
WraithM has quit [Ping timeout: 260 seconds]
<dmbaturin>
https://bpaste.net/show/b63213ac06c7 I'm trying to add a rule for (* *) comments to the lexer. Why this doesn't work with (* characters inside quoted strings, if it's supposed to enter an exclusive state when a quote is found?
<dmbaturin>
Or it does and I should look into the parser instead?
oscar_toro has quit [Ping timeout: 245 seconds]
milosn has joined #ocaml
<Drup>
what the error when you put "(*" ?
<dmbaturin>
Ok, after improving the error messages I see it's actually a parse error, not lexing error.
<dmbaturin>
So apparently it works, how do I get lex to ignore that token though?
<Drup>
afaict, it's correct
bezirg has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
sad0ur has quit [Ping timeout: 246 seconds]
<dmbaturin>
Drup: Oh, wait, reverted to the original state and redid the test file. For "(* some text*)" I get "string not terminated" exception now.
<dmbaturin>
Which comes from read_string state.
<Denommus>
adrien: because I want to experiment with FRP for GUI
darkf has joined #ocaml
johnnydiabetic has joined #ocaml
zpe has joined #ocaml
madroach has quit [Ping timeout: 250 seconds]
madroach has joined #ocaml
ygrek_ has quit [Ping timeout: 245 seconds]
<dmbaturin>
Interesting that '#' [^ '\n']+ '\n' { token lexbuf } works just fine.
NoNNaN has quit [Remote host closed the connection]
NoNNaN has joined #ocaml
BitPuffin has joined #ocaml
claudiuc has quit [Read error: Connection reset by peer]
claudiuc has joined #ocaml
mcclurmc_ has quit [Remote host closed the connection]
claudiuc has quit [Read error: Connection reset by peer]
bezirg has quit [Ping timeout: 272 seconds]
claudiuc has joined #ocaml
BitPuffin has quit [Ping timeout: 260 seconds]
claudiuc has quit [Remote host closed the connection]