ChanServ changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.00.1 http://bit.ly/UHeZyT | http://www.ocaml-lang.org
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
mcclurmc_away is now known as mcclurmc
emmanuelux has quit [Remote host closed the connection]
avsm has joined #ocaml
mcclurmc is now known as mcclurmc_away
milosn_ has joined #ocaml
milosn has quit [Ping timeout: 244 seconds]
arneis has quit [Ping timeout: 245 seconds]
<dsheets> using oasis+ocamlbuild, the stdout of "ocaml setup.ml -build" destroys/corrupts terminal buffer. has anyone else experienced this?
<_habnabit> dsheets, wow, what terminal are you using?
<dsheets> if i redirect stdout to a file, i can read the build log
<dsheets> _habnabit: Terminal.app :-(
<_habnabit> dsheets, it probably is checking isatty(stdout) then
<_habnabit> dsheets, eh, which version of OS X? no issues here
<dsheets> 10.6.8
<_habnabit> odd, same for me
<_habnabit> what's your $TERM?
<_habnabit> also, try doing `ocaml setup.ml -build | cat`
<dsheets> xterm-color
<_habnabit> hmm, same for me
<_habnabit> wonder if it's something specific to your ocaml/oasis/ocamlbuild
<_habnabit> what about if you do the pipe, though?
<_habnabit> also, how exactly does it "destroy/corrupt" the terminal buffer?
<dsheets> pipe works fine
<_habnabit> okay, then it's most definitely checking isatty(stdout)
<dsheets> deletes lines backwards
<_habnabit> could you take a screenshot before and after? i'm really curious
<dsheets> brb adium is crap
<_habnabit> for irc, yes
dsheets has quit [Quit: Leaving.]
dsheets has joined #ocaml
<dsheets> yeah, it sucks at managing the chat buffers… seems like it's linearly scanning them constantly or something stupid
<dsheets> ok, screencap
<dsheets> http://pbrd.co/Snyesf is before
<dsheets> http://pbrd.co/SnykQo is after
<dsheets> it appears as though every write to the terminal is preceded by some kind of control sequence that deletes previous lines
<dsheets> this is the only repo i've seen the problem with: https://github.com/dsheets/ocaml-abnf/tree/oasis
Neros has joined #ocaml
<dsheets> _habnabit: any ideas? |'m using |cat for now.
<_habnabit> sorry, something else is distracting me atm. will look later
<dsheets> oknp
xavierm02 has quit [Quit: Leaving]
avsm has quit [Quit: Leaving.]
rrolles has quit [Ping timeout: 244 seconds]
gnuvince has quit [Quit: Remember when men were men and regular expressions recognized regular languages?]
madroach has quit [Ping timeout: 244 seconds]
gnuvince has joined #ocaml
madroach has joined #ocaml
Neros has quit [Ping timeout: 260 seconds]
jamii has joined #ocaml
rrolles has joined #ocaml
jamii has quit [Ping timeout: 260 seconds]
gnuvince has quit [Quit: Remember when men were men and regular expressions recognized regular languages?]
gnuvince has joined #ocaml
mk270 has quit [Ping timeout: 255 seconds]
tautologico has quit [Quit: tautologico]
mk270 has joined #ocaml
BiDOrD_ has joined #ocaml
BiDOrD has quit [Ping timeout: 260 seconds]
andreypopp has joined #ocaml
nooy has left #ocaml []
andreypopp has quit [Quit: sleep]
andreypopp has joined #ocaml
andreypopp has quit [Quit: sleep]
Yoric has quit [Quit: Instantbird 1.3a1pre -- http://www.instantbird.com]
Yoric has joined #ocaml
andreypopp has joined #ocaml
ganjahtronic has joined #ocaml
andreypopp has quit [Quit: sleep]
Drakken has quit [Ping timeout: 245 seconds]
Drakken has joined #ocaml
cdidd has joined #ocaml
Yoric has quit [Ping timeout: 246 seconds]
jewel has joined #ocaml
andreypopp has joined #ocaml
jewel has quit [Ping timeout: 276 seconds]
<dsheets> is there a way to expose a record type that has fields that are only mutable internal to the module?
<dsheets> is the answer "use an object"?
<julm> # module M : sig type t = private { mutable x : int } end = struct type t = { mutable x : int } end;;
<julm> module M : sig type t = private { mutable x : int; } end
<julm> # let f t = t.M.x <- 0;;
<julm> Error: Cannot assign field M.x of the private type M.t
<dsheets> julm: wow, that's really cool. thanks! :-)
andreypopp has quit [Read error: Connection reset by peer]
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
CoverSlide has quit [Ping timeout: 260 seconds]
avsm has joined #ocaml
CoverSlide has joined #ocaml
andreypopp has joined #ocaml
Yoric has joined #ocaml
<f[x]> dsheets, that is ocamlbuild doing, regarding terminal stuff
* f[x] using gnome-terminal on linux
<dsheets> you see the same behavior? when i run the ocamlbuild command directly, i cannot repro
* f[x] always thought it was a feature.. not very pleasent though
<dsheets> but under oasis, badness
<f[x]> hm, indeed
<f[x]> without setup.ml it is ok
<f[x]> funny
<f[x]> never paid attention, just got used to it %)
<dsheets> dsheets : funny -> sad
<adrien> hmmm, what's the issue?
<adrien> "ocaml setup.ml -build"
<f[x]> I guess it qualifies for the bug report :)
<adrien> it tells you how it runs ocamlbuild
<dsheets> adrien: yes, it destroys buffer… to read the log, i have to "ocaml setup.ml -build | cat" like _habnabit suggested
<adrien> copy that, append "-classic-display"
<f[x]> the log is in _build/_log
<f[x]> running under strace doesn't reproduce this behaviour..!
<dsheets> adrien: no classic display in my setup.ml?
<f[x]> ha!
<f[x]> dsheets, do you use rlwrap?
<dsheets> oh blash
<f[x]> what happens with "$(which ocaml) setup.ml -build"?
<dsheets> blast! alias ocaml='rlwrap ocaml'
<dsheets> thanks, sorry :-(
<f[x]> me too
<f[x]> but how it explains?
<adrien> haha :P
<dsheets> f[x]: rlwrap ocaml setup.ml -build destroys the buffer because setup.ml is sending control codes to the term to stay small (and keeps deleting the present line). rlwrap on top of that does something silly with the output control codes… ?
<adrien> such ways of displaying have never worked correctly through pagers for me
rrolles has quit []
mcclurmc_away is now known as mcclurmc
fusillia has joined #ocaml
avsm has quit [Quit: Leaving.]
<f[x]> dsheets, looks like, rlwrap -t dumb helps
<dsheets> ooo
<dsheets> f[x]: cool, thanks
julm has quit [Quit: Coyote finally caught me]
avsm has joined #ocaml
Kakadu has joined #ocaml
avsm has quit [Client Quit]
GnomeStoleMyBike has joined #ocaml
milosn_ is now known as milosn
othiym23 has quit [Read error: Operation timed out]
Snark has joined #ocaml
ftrvxmtrx_ has joined #ocaml
othiym23 has joined #ocaml
sepp2k has joined #ocaml
* f[x] thanks himself too, -1 inconvenience
beginner42 has joined #ocaml
<beginner42> what is the github repo for this irc channel?
<Kakadu> beginner42: logs?
<beginner42> Kakadu: yes
<pippijn> is there one?
<pippijn> I hope not
<pippijn> wow..
<Kakadu> pippijn: MI5 and others are already departured to you
<pippijn> Kakadu: what do you know about finite automata?
<pippijn> Kakadu: do you know subset construction?
Progster has joined #ocaml
<Kakadu> no, sorry
<pippijn> NFA -> DFA?
<Kakadu> hmmm. I've studied that
<pippijn> good
Cyanure has joined #ocaml
_andre has joined #ocaml
<pippijn> Kakadu: can you take a look at this automaton: http://paste.xinu.at/YPM/
<Kakadu> I can
<pippijn> can you see what language this is supposed to accept?
<pippijn> 0 is the start state
<Kakadu> it seems to be determinated
<pippijn> it is a deterministic finite automaton, yes
<pippijn> what language does it accept?
<Kakadu> It will be very long RE
<Kakadu> How alphabet looks like? ['*'; '/'; 'A0'] ?
<pippijn> A0 is actually not part of the alphabet
<pippijn> it's the action performed when the automaton terminates
<Kakadu> than ['*'; '/']
<pippijn> [^'*' '/'] means "all characters except those 2
<pippijn> so the alphabet is the full character set
<Kakadu> ok
<Kakadu> ['*'; '/'; 'a'] for simplicity
<pippijn> ok
<pippijn> can you produce an example sentence for this automaton?
<Kakadu> yes
<Kakadu> this is /*a*/
<pippijn> right
<pippijn> wait
<Kakadu> Is it related somehow to your C++ parser?
<pippijn> I don't see that
<pippijn> ah yes
<pippijn> /*a*/ works
<pippijn> Kakadu: yes
<pippijn> but here is the problem:
<pippijn> it also accepts /*a*/a
<pippijn> eh, no
<pippijn> /*a*/a*/
<pippijn> this
<pippijn> http://paste.xinu.at/0rhUps/ocaml <- this is the regexp
mrm has joined #ocaml
<pippijn> the problem is state 11,4
<pippijn> in the NFA, state 11 accepts nothing
<pippijn> but in the DFA, the subset {11, 4} accepts everything accepted by 4
<pippijn> which is the full character set
<Kakadu> wait,wait
<Kakadu> 11,4 shoul be final
<Kakadu> I see double circle on it
<pippijn> yes
<pippijn> but final states can go back to non-final states
<Kakadu> Who have built this automaton?
<pippijn> my program built it from the regexp
<Kakadu> You have build NFA and than converted it to DFA?
<pippijn> yes
<Kakadu> is NFA OK?
<pippijn> I'm pretty sure it is
<pippijn> I can't draw it
mcclurmc is now known as mcclurmc_away
andreypopp has quit [Quit: sleep]
dwmw2_gone has quit [Ping timeout: 260 seconds]
dwmw2_gone has joined #ocaml
<Kakadu> pippijn: Do u use something like Tomphson algorithm?
<pippijn> I don't know
<pippijn> I made it up by myself from the theory
Progster has quit [Ping timeout: 256 seconds]
andreypopp has joined #ocaml
andreypopp has quit [Client Quit]
andreypopp has joined #ocaml
<Kakadu> what is associativity in [^ '*']| "*"* [^ '*' '/']
<Kakadu> ?
<pippijn> what do you mean?
<Kakadu> ([^ '*']| "*"*) [^ '*' '/']
<Kakadu> or
<Kakadu> [^ '*']| ("*"* [^ '*' '/'] )
* Kakadu is building NFA on a paper
madroach has quit [Quit: leaving]
<pippijn> the llatter
madroach has joined #ocaml
<pippijn> latter
madroach has quit [Client Quit]
madroach has joined #ocaml
ftrvxmtrx_ has quit [Quit: Leaving]
beginner42 has quit [Remote host closed the connection]
larhat has joined #ocaml
avsm has joined #ocaml
larhat has quit [Read error: Connection reset by peer]
madroach has quit [Ping timeout: 244 seconds]
larhat has joined #ocaml
madroach has joined #ocaml
toolslive has quit [Ping timeout: 244 seconds]
avsm has quit [Quit: Leaving.]
<Kakadu> OK
<Kakadu> so It is rather difficult to build NFA without epsilon rules
<pippijn> so use epsilon rules
<pippijn> I also use them
<Kakadu> It seems that Tomphson algotithm can help You to build DFA with epsilon rules
<Kakadu> And after tomphsonisation it should work OK
avsm has joined #ocaml
mcclurmc_away is now known as mcclurmc
andreypopp has quit [Quit: quit]
toolslive has joined #ocaml
<pippijn> looks better now
<pippijn> wait, it's still broken.. the DFA is not deterministic
<Kakadu> I can mnually build only NFA
<pippijn> Oops! Google Chrome could not find wstaw.org
avsm1 has joined #ocaml
<wieczyk> What are you trying to match by this automata?
<Kakadu> Use mozilla
<pippijn> Kakadu: it works now
<pippijn> maybe my DNS was broken
<wieczyk> % host wstaw.org
<wieczyk> wstaw.org has address 178.33.48.123
avsm has quit [Ping timeout: 252 seconds]
sivoais has quit [Read error: Connection reset by peer]
Progster has joined #ocaml
<pippijn> Kakadu: http://paste.xinu.at/WM4/
Neros has joined #ocaml
avsm1 has quit [Quit: Leaving.]
<Kakadu> it doesn't recognize /********a*/
<wieczyk> What language do you want to parse?
<Kakadu> wieczyk: C++ comments
<wieczyk> Hm
<wieczyk> states = { q_code, q_maybe_open, q_comment, q_maybe_close }
<wieczyk> Well, C++ comments are //, or /* ... */ or both?
<Kakadu> 2nd
<wieczyk> ok
<wieczyk> q_start = q_code
<wieczyk> ok again question
sivoais has joined #ocaml
<wieczyk> You are trying to detect is some string is a C++ comment?
<Kakadu> wieczyk: rule token = parse
<Kakadu> | "/*" ([^ '*']| "*"* [^ '*' '/'])* "*"+ "/" { token lexbuf }
<wieczyk> So "/* aaaa */" is correct word, but "sssdsa /* aaaaa */" is not/
<Kakadu> it seems so
<Kakadu> but pippijn knows better what he want
<wieczyk> states = { q_start1, q_command, q_maybe_close, q_closed, q_not_comment }
<wieczyk> states = { q_start, q_command, q_maybe_close, q_closed, q_not_comment }
<wieczyk> transitions:
<wieczyk> weh
<wieczyk> states = { q_start, q_maybe_open, q_command, q_maybe_close, q_closed, q_not_comment }
<wieczyk> This DFA is not complete ;]
<wieczyk> You should also add some state 'error' and add transitions
<wieczyk> but it is nothing important
<Kakadu> btw he wants to build it automatically
<wieczyk> Why we have transition "on q2 when '/' -> q2'
<wieczyk> ?
<wieczyk> also we have two transitions 'on q2 when * -> ...' it is not DFA ;/
<wieczyk> Ah automaticly
<wieczyk> We can do it in the easy way if we dont want to get minimal DFA.
<wieczyk> Because naive (exponential) translation from NFA do DFA is very easy.
<pippijn> wieczyk: minimisation is another step, but not really necessary
<pippijn> and minimisation seems rather complex
<pippijn> and I'd rather get something to work, first :)
<wieczyk> Do you now how to prove that for any NFA automata we can construct DFA?
<wieczyk> It is constructive proof with gives you exponential algorithm for translation :D
<Kakadu> wieczyk: yep, and this algo uses epsilon rules
<wieczyk> in DFA?
<Kakadu> yep
<wieczyk> DFA cannot have epsilon rules
<wieczyk> Deterministic-FA cannot have nondeterministic rules, due to this definition.
<Kakadu> than my algorithm is bad
<wieczyk> Think about this:
mcclurmc is now known as mcclurmc_away
<wieczyk> DFA = (Q, trans, q_start, F)
<wieczyk> Q - states
<wieczyk> trans : Q -> char -> Q
<wieczyk> q_start : Q
<wieczyk> F : subset of Q
<wieczyk> ehh
<wieczyk> We wanted to name NFA ;]
<wieczyk> NFA = (Q, trans, q_start, F)
<wieczyk> Q - states
<wieczyk> trans: Q -> char -> subset-of-Q
<Kakadu> trans Q -> char - > Q list
<wieczyk> ok, list
<wieczyk> I have assumed that epsilon rules from this NFA have been elimiated
<wieczyk> do you know how to eliminate epsilon rules from NFA?
<wieczyk> If it is easier for you we can define NFA which allows to epsilon-rules.
<wieczyk> trans: Q -> char option -> Q list
<Kakadu> I can do it manually but I don't remember algorithm
<wieczyk> but it is easier to speak about proof when epsilons are eliminated.
<wieczyk> OK
<wieczyk> Now we want to construct DFA which simulates this NFA.
<wieczyk> How we can do this? We need to track 'possible states' of this NFA
<wieczyk> state of DFA = Q list
<Kakadu> btw, you should better explain this to pippjin
<wieczyk> So who is interested in this proof?
<wieczyk> If any :D
<Kakadu> btw
<Kakadu> pippjin want to recognize regular expressions
<wieczyk> I think we can do easily naive translations: REGEXP -> NFA -> NFA-noeps -> DFA
<Kakadu> but some people says that languages which are recognizable by DFA without epsilon-rules is smaller than regular languages
<wieczyk> Impossible.
UncleVasya has joined #ocaml
emmanuelux has joined #ocaml
gnuvince has quit [Ping timeout: 252 seconds]
avsm has joined #ocaml
<pippijn> Kakadu: those people are provably wrong
<Kakadu> pippijn: I've realized that already
<pippijn> Kakadu: and you are wrong in writing my name
<Kakadu> pippijn: it is from Lord of The Rings?
<pippijn> no
<pippijn> it is from my name
<Kakadu> hm
<Kakadu> pippijn: Than you r from Lord of The Rings?!
mcclurmc_away is now known as mcclurmc
<wieczyk> :D
<Kakadu> pippijn: btw, IIRC you are QML hacker? Do you help people in #qt-qml?
avsm has quit [Quit: Leaving.]
chambart has joined #ocaml
avsm has joined #ocaml
cdidd has quit [Read error: Operation timed out]
<wieczyk> AHH
<wieczyk> What a pain
<wieczyk> I thouhjt that QML is something related to ML
<wieczyk> and I was hited by JavaScript
cdidd has joined #ocaml
<Kakadu> wieczyk: Yeah, related. Both L mean Language
<wieczyk> hehee
emmanuelux has quit [Quit: emmanuelux]
<wieczyk> and boht are parseable
<wieczyk> both*
<Kakadu> wieczyk: and maybe even grammar classes are similiar
xavierm02 has joined #ocaml
<wieczyk> hehe
<pippijn> Kakadu: not really
<pippijn> I played with it
<Kakadu> Me too
<Kakadu> we should rewrite OCamlBrowser in QML and close a question about Qt bindings
ontologiae has joined #ocaml
emmanuelux has joined #ocaml
UncleVasya is now known as SorryForMyEnglis
SorryForMyEnglis is now known as UncleVasya
avsm has quit [Quit: Leaving.]
ontologiae has quit [Ping timeout: 264 seconds]
Yoric has quit [Ping timeout: 252 seconds]
ontologiae has joined #ocaml
avsm has joined #ocaml
travisbrady has joined #ocaml
mcclurmc is now known as mcclurmc_away
<wieczyk> Kakadu: nice idea
<wieczyk> Kakadu: but i would like to have ocamlbrowser for terminal ;]
<Kakadu> wieczyk: I really thing that ocamlbrowser is used only by me
<Kakadu> think*
ontologiae has quit [Ping timeout: 240 seconds]
<flux> :)
<wieczyk> :D
<hcarty> Kakadu: Me too!
<flux> I wish emacs has better mli browser
<hcarty> I use it often, particularly with new libraries
<pippijn> this is my NFA
<Kakadu> hcarty: We need a man who asks `WTF is ocamlbrowser?` :)
<wieczyk> heheh
<wieczyk> good point ;]
<wieczyk> pippijn: I can write DFA by hand for this language.
<pippijn> sure
<pippijn> me too
<pippijn> but that's not the point
<wieczyk> So what are you trying to achieve
<wieczyk> this image is effect of your program?
<pippijn> yes
<wieczyk> mhmh
<flux> I actually have a version of that algorithm as well
<flux> but I don't remember if it works, and in any case, I imagine it would be compleetely useless for comparison :)
<flux> 840 lines :-o
Yoric has joined #ocaml
<pippijn> flux: what does that include?
<pippijn> RE -> NFA?
<flux> DFA module, NFA module, RE module, conversion from RE to NFA and NFA to DFA
<flux> actually it does NFA -> GNFA at some point as well, so GNFA module
<flux> I don't even remember what GNFA is :) (other than somehow 'generalized' nfa)
ontologiae has joined #ocaml
<Kakadu> Heh, it seems i've created qocamlbrowser GUI. It's time to code in OCaml
paolooo has joined #ocaml
ontologiae has quit [Read error: Connection reset by peer]
mcclurmc_away is now known as mcclurmc
<pippijn> I get this DFA: http://paste.xinu.at/SvBL/
<pippijn> and that is wrong
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
gnuvince has joined #ocaml
gal_bolle has joined #ocaml
mcclurmc is now known as mcclurmc_away
avsm has quit [Quit: Leaving.]
jamii has joined #ocaml
mrm has quit [Ping timeout: 268 seconds]
travisbrady has quit [Quit: travisbrady]
travisbrady has joined #ocaml
contempt has quit [Ping timeout: 272 seconds]
TechCel has joined #ocaml
Progster has quit [Ping timeout: 252 seconds]
chambart has quit [Ping timeout: 246 seconds]
contempt has joined #ocaml
Kakadu has quit [Quit: Konversation terminated!]
tac has joined #ocaml
ontologiae has joined #ocaml
<pippijn> http://paste.xinu.at/NRf3/ <- it's correct, now
UncleVasya has left #ocaml []
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
jewel has joined #ocaml
Submarine has quit [Client Quit]
itewsh has joined #ocaml
larhat has quit [Quit: Leaving.]
Kakadu has joined #ocaml
<thelema> pippijn: there are irc logs of this channel at http://tunes.org/~nef/logs/ocaml/
<adrien> actually
adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.00.1 http://bit.ly/UHeZyT | http://www.ocaml-lang.org | Public logs at http://tunes.org/~nef/logs/ocaml/
<pippijn> adrien: that's good
hkBst has quit [Quit: Konversation terminated!]
thelema has quit [Ping timeout: 255 seconds]
fusillia has quit [Ping timeout: 260 seconds]
sepp2k has quit [Ping timeout: 260 seconds]
ontologiae has quit [Ping timeout: 246 seconds]
answer_42 has joined #ocaml
ontologiae has joined #ocaml
sepp2k has joined #ocaml
itewsh has quit [Quit: o/]
Kakadu has quit [Ping timeout: 264 seconds]
paolooo has quit [Quit: Page closed]
Kakadu has joined #ocaml
chambart has joined #ocaml
gnuvince has quit [Ping timeout: 255 seconds]
gnuvince has joined #ocaml
travisbrady has quit [Quit: travisbrady]
tane has joined #ocaml
sepp2k has quit [Read error: Connection reset by peer]
sepp2k has joined #ocaml
GnomeStoleMyBike has quit [Ping timeout: 240 seconds]
bddn has left #ocaml []
emmanuelux has quit [Quit: emmanuelux]
travisbrady has joined #ocaml
Ptivalien is now known as Ptival
chambart has quit [Ping timeout: 246 seconds]
emmanuelux has joined #ocaml
smondet has joined #ocaml
<Kakadu> Isn't it strange?
<Kakadu> # #load "/usr/lib/ocaml/compiler-libs/utils/config.cmo";;
<Kakadu> # module C = Config;;
<Kakadu> Error: Unbound module Config
<smondet> Kakadu: you may need the "#directory" thing also
<smondet> (to get the .cmi)
emmanuelux has quit [Client Quit]
<Kakadu> wow
<Kakadu> smondet: thanks
chambart has joined #ocaml
gnuvince has quit [Ping timeout: 240 seconds]
gnuvince has joined #ocaml
tac has quit [Ping timeout: 245 seconds]
iago has joined #ocaml
ulfdoz has joined #ocaml
Cyanure has quit [Remote host closed the connection]
emmanuelux has joined #ocaml
gnuvince has quit [Ping timeout: 260 seconds]
ganjahtronic has quit [Ping timeout: 260 seconds]
_andre has quit [Quit: leaving]
gal_bolle has quit [Read error: Connection reset by peer]
ontologiae has quit [Ping timeout: 255 seconds]
<wieczyk> When new Ocaml?
<adrien> 4.00.1 was a few weeks ago
<hcarty> wieczyk: ocamlbrew it! opam it! GODI it! All the cool parties are happening in 4.00.1 land!
* adrien still hasn't had time to move from 3.12.1
<adrien> I _want_ runtime type information however, that'd make me switch no matter I'm busy otherwise
Snark has quit [Quit: Quitte]
* Kakadu has strange feeling that he's doing the same error again. Same feeling like déjà vu.
<wieczyk> Yes, I also use 3.12
<wieczyk> but I am wating for namespaces
iago has quit [Ping timeout: 252 seconds]
larhat has joined #ocaml
larhat1 has joined #ocaml
<pippijn> can the ocaml toplevel print stack traces?
<pippijn> I want to get a backtrace in a script
<hcarty> pippijn: Not without a patch
<pippijn> ok
<hcarty> pippijn: Can you convert the offending script to work with ocamlscript? That would give you a compiled, backtraceable result.
<pippijn> I just compiled it directly
<pippijn> I don't need it, I was just wondering
larhat has quit [Ping timeout: 252 seconds]
GnomeStoleMyBike has joined #ocaml
<travisbrady> anyone else seen this error when trying to start utop (installed via ocamlbrew)? "Fatal error: exception UChar.Out_of_range"
<wieczyk> When do you prefer Hashtbl rather than Map ?
<pippijn> wieczyk: whenever it's faster and you need the speed and you want to use an imperative data structure
<_habnabit> wieczyk, Map requires a bunch of comparisons for every lookup
<hcarty> travisbrady: I haven't. What steps did you take?
<travisbrady> I should say this is ubuntu running via vagrant/virtualbox
<travisbrady> I installed ocamlbrew successfully on the 2nd try. the first time it failed because I didn't have m4
<wieczyk> < is polimorphic
<travisbrady> hcarty: looked over the log and everything was clean
answer_42 has quit [Quit: WeeChat 0.3.9]
Neros has quit [Read error: Connection reset by peer]
<hcarty> travisbrady: I'm not sure what would cause that issue. Do you have other OCaml installations in your path? Did you source ocamlbrew.bashrc?
<hcarty> travisbrady: That error may be coming from Camomile. I'm not sure what would cause it though.
<travisbrady> I have an ocamlbrew install on my actual hardware-based machine. and I did source the bashrc
<hcarty> Do you get the same error on your physical-machine install?
<hcarty> Is the VM a 32 or 64 bit Ubuntu?
<hcarty> I don't know if that matters, but I guess it could affect something in Camomile or utop.
<travisbrady> hcarty: no, the physical install works perfectly so far.
sivoais has quit [Remote host closed the connection]
<hcarty> It looks like this is an exception from Camomile. Maybe somehow due to encoding/locale settings.
sivoais has joined #ocaml
<travisbrady> 64 bit Ubuntu yes
<hcarty> It's a text encoding issue. I'm not sure what would trigger it though.
<hcarty> travisbrady: I have a working ocamlbrew install also under a 64bit Ubuntu VM. No issues with utop.
<hcarty> LANG=en_US.UTF-8 in the environment
<hcarty> Same for all LC_* environment variables
<travisbrady> I've got the same LANG
<travisbrady> hmmm, but for LC_ALL I have just "en_US"
<hcarty> My LC_ALL is blank
<hcarty> Don't know if that matters here, but I imagine it could.
<travisbrady> Huzzah!
<travisbrady> "LC_ALL=en_US.UTF-8 utop" works
<hcarty> Excellent!
<travisbrady> Strange how that works. I remember having a Camomile issue with an install like 3 years ago.
gnuvince has joined #ocaml
thelema has joined #ocaml
naquad has joined #ocaml
TechCel has quit [Ping timeout: 260 seconds]
Kakadu has quit [Quit: Konversation terminated!]
cdidd has quit [Read error: Connection reset by peer]
<travisbrady> I'm getting "make inconsistent assumptions over interface Mutex" when trying to #require "redis" in the toplevel
<travisbrady> anyone know how to resolve that?
<thelema> make clean
<thelema> travisbrady: that error means that there's two modules A and B that depend on Mutex
<thelema> travisbrady: but they depend on different versions of Mutex, maybe two different Mutex modules.
<travisbrady> Ahh, ok.
<travisbrady> I'm attempting to install this Redis client lib (https://github.com/mrnumber/ocaml-redis) via the instructions in the README but nothing about that is mentioned
<travisbrady> it seems this lib uses and maybe conflicts w/ Batteries
<thelema> more likely both just need to be recompiled from scratch, thus the 'make clean' response
<pippijn> ./dfa < testsuite/huge.ii 0.20s user 0.02s system 90% cpu 0.239 total
<pippijn> it's about 10 times as fast as ocamllex
<pippijn> a little more than 10 times
<pippijn> ocamllex: %%% lexing took 2.525081s
<thelema> pippijn: okay, but now add the needed features
<pippijn> thelema: like what?
<thelema> tracking token locations
<pippijn> already have that
<pippijn> I'm using Lexing.lexbuf
<thelema> ok, maybe send a patch to mantis to improve ocamllex
<pippijn> it's written in C
<pippijn> this one is in ocaml
<pippijn> it's not table based
<thelema> mutually recursive functions?
<pippijn> yes
<thelema> how's the compile time?
<pippijn> ./re2ml.native testsuite/re2ml/t0008.mll 0.10s user 0.03s system 88% cpu 0.144 total
<pippijn> ocamllex testsuite/re2ml/t0008.mll 0.07s user 0.02s system 83% cpu 0.105 total
<thelema> not generating the .ml, compiling all the recursive functions
<pippijn> ah
<thelema> iirc, there's some quadratic behavior in the compiler (or worse) for long recursion
<pippijn> ocamlopt dfa.ml -o dfa 1.85s user 0.07s system 98% cpu 1.949 total
<pippijn> ocamlopt testsuite/re2ml/t0008.ml 0.17s user 0.05s system 86% cpu 0.259 total
<travisbrady> thelema: how do you mean compiled separately?
<pippijn> yes, much slower than the tables
<pippijn> thelema: I don't think there is very deep mutual recursion
<pippijn> for most automata
<pippijn> I didn't implement DFA minimisation, yet
<pippijn> but I suspect it won't help much
<pippijn> just a little
<pippijn> both in run time and compile time
travisbrady has quit [Quit: travisbrady]
<pippijn> right now the only thing that I know of that is not implemented in my generator are sub-matches
<pippijn> or bindings of any kind
<pippijn> ['a'-'z']+ as id { ... }
<pippijn> this is not in, yet
Reventlov has quit [Quit: leaving]
Yoric has quit [Ping timeout: 252 seconds]
<Ptival> anyone knows why this http://paste.awesom.eu/bak would produce an ELF executable and not a bytecode file?
Progster has joined #ocaml
chambart has quit [Ping timeout: 246 seconds]
ontologiae has joined #ocaml
jamii has quit [Ping timeout: 252 seconds]
xavierm02 has quit [Quit: Leaving]
ftrvxmtrx has quit [Quit: Leaving]
Cyanure has joined #ocaml
ansx_ has quit [Read error: Operation timed out]
ansx has joined #ocaml
arneis has joined #ocaml
<pippijn> this code: http://paste.xinu.at/0EP/ is so much slower than this code: http://paste.xinu.at/p5nna/ in my use case, that the entire algorithm becomes 1.2 times as slow
<pippijn> also, making a list and then iterating over it is much (2 times) faster than passing a closure and iterating directly