terrorjack has quit [Read error: Connection reset by peer]
mbuf has joined #ocaml
<cemerick>
to follow up on my previous question, I'm sort of convinced now that there _isn't_ any way to access tyxml content after it's constructed :-/
<cemerick>
I got around the problem in the one corner I was in by using lambdasoup as an intermediary, but now I'm thinking I might just use it for everything from here on out
<companion_cube>
there's mostly a printer I think
gravicappa has joined #ocaml
[itchyjunk] has joined #ocaml
[itchyjunk] has quit [Remote host closed the connection]
zebrag has quit [Remote host closed the connection]
<Drup>
cemerick: yeah, tyxml is not made to deconstruct HTML. What's the actual use case ?
Franciman has joined #ocaml
<Franciman>
Hello, I am learning ocaml, coming from haskell. I have a question about boxing
<Franciman>
in haskell everything is boxed by default, as far as I understand
<Franciman>
for example Int is a pointer to an integer on the heap
<Franciman>
does ocaml do the same?
<Franciman>
IIUC haskell's reason for boxing is that it helps with laziness
<Armael>
integers (of type int) are not boxed in ocaml, everything else is
<d_bot_>
<ggole> There are a bunch of things that are represented by immediates
<d_bot_>
<ggole> `int`, `bool`, `char`, constructors without arguments
<Franciman>
great, thanks. I am trying to write an interpreter for lambda calculus and optimize it as much as I can (for no real reason, just as a hobby :D)
<Armael>
right, indeed, there are a few other immediate types
<Franciman>
but I am not really good at understanding haskell's model. So instead of actually learning how to understand it, I said how about I try ocaml and hope it is easier? lol
<Franciman>
haskell's computational model*
<d_bot_>
<ggole> Optimising strict programs is a bit easier, yeah
<d_bot_>
<ggole> (Mostly.)
Tuplanolla has joined #ocaml
Haudegen has joined #ocaml
<Leonidas>
with dune when I have a `(run foo)` stanza and it generates me a `foo.ml` how can I then move it to somewhere else? I always get "no rule found for foo.ml"
<Franciman>
Do you use ocp-indent for your daily coding?
<hackinghorn>
if I need to avoid loops, what other options do I have?
<hackinghorn>
recursion, tho, anything else
<hackinghorn>
tail call can make it as fast as loop
<d_bot_>
<ggole> Built in bulk operations as in APL
bartholin has quit [Ping timeout: 252 seconds]
bartholin has joined #ocaml
<cemerick>
Drup: yesterday, it was pulling out RDFa. Tomorrow, it'll be some other microformat access, or grabbing demarcated summaries or pull-quotes from blog posts, or...
[itchyjunk] has joined #ocaml
<cemerick>
Whatever the merits of a typed html representation, it being "write-only" is a novel limitation IME vs. other html libraries
<d_bot_>
<joseph> ```ocaml
<d_bot_>
<joseph> let open struct
<d_bot_>
<joseph> type x = int
<d_bot_>
<joseph> end in
<d_bot_>
<joseph> ...
<d_bot_>
<joseph> ```
<d_bot_>
<joseph> is this the way to create a local type alias?
<d_bot_>
<joseph> as in, the only way to move a type alias in a function is to have it defined in a local potentially anonymous module?
bartholin has quit [Quit: Leaving]
Debate2021 has joined #ocaml
Debate2021 has left #ocaml [#ocaml]
cedric has quit [Quit: Konversation terminated!]
<d_bot_>
<ggole> @joseph yes, although there might be other approaches depending on what you want to do
Serpent7776 has quit [Read error: Connection reset by peer]
Serpent7776 has joined #ocaml
<d_bot_>
<octachron> You could also do something akin to `let _ : (int as 'nat) list = [] in ([]: 'nat list)`
<Franciman>
I am enjoying ocaml so far
<Franciman>
I like the distinction between dune and opam
<hackinghorn>
what does it mean?
<hackinghorn>
I use dune and opam
<mclovin>
I guess it means they're not a single tool as cargo
<Franciman>
it's mostly good, @darrenldl, but I find it a bit hard sometimes
<Franciman>
there is cabal, there is stack
<Franciman>
but as far as I understand the problem there is with the resolution of dependencies versions
<Franciman>
now cabal solved some of the dependency hell issues, but stack has support for stackage, a sort of distro with fixed versions of each available package
<Franciman>
the problem of cabal currently is that there are like 0 people working on it right now. Hopefully it'll get better with the haskell foundation involvement
<Franciman>
is there a way to tell dune to run the executable created?
<Franciman>
Or do I need to manually run ./_build/default/name.exe
<Franciman>
?
<mclovin>
dune exec pathtofile.exe
<Franciman>
o gosh
<Franciman>
loving it thanks
<Franciman>
oh wait I still need to specify the path
<cemerick>
Franciman: I landed in OCaml for similar reasons; appreciated much of haskell, but was unable (despite IMO unreasonable efforts) to get reasonable performance out of a couple of effectful operations that sat at the root of a key algorithm. OCaml having a simple `ref` for such things when necessary, but otherwise very pure stuff everywhere else was perfect
average has quit [Quit: Connection closed for inactivity]
average has joined #ocaml
bartholin has quit [Ping timeout: 252 seconds]
spip has joined #ocaml
bartholin has joined #ocaml
mro has joined #ocaml
mro has quit [Client Quit]
rond_ has joined #ocaml
wilfred has joined #ocaml
rond_ has quit [Quit: Client closed]
Serpent7776 has quit [Quit: leaving]
zebrag has joined #ocaml
<d_bot_>
<Shon> You can also just give the name of the executable as specified by the name field in the executable stanza.
<d_bot_>
<Shon> At least, this has worked on my projects recently.
bartholin has quit [Quit: Leaving]
olle has quit [Ping timeout: 252 seconds]
wilfred has quit [Quit: Connection closed for inactivity]