Leonidas changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 4.13.0 released: https://ocaml.org/releases/4.13.0.html | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
Tuplanolla has quit [Quit: Leaving.]
hendursaga has quit [Quit: hendursaga]
hendursaga has joined #ocaml
Haudegen has quit [Ping timeout: 252 seconds]
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]
average has joined #ocaml
williewillus has joined #ocaml
williewillus has quit [Quit: The Lounge - https://thelounge.chat]
williewillus has joined #ocaml
kurfen has joined #ocaml
kurfen has quit [Client Quit]
kurfen has joined #ocaml
kurfen has quit [Client Quit]
kurfen has joined #ocaml
kurfen has quit [Client Quit]
kurfen has joined #ocaml
kurfen has quit [Client Quit]
kurfen has joined #ocaml
hendursa1 has joined #ocaml
bartholin has joined #ocaml
mbuf has quit [Quit: Leaving]
hendursaga has quit [Ping timeout: 276 seconds]
xiongxin has joined #ocaml
olle has joined #ocaml
Serpent7776 has joined #ocaml
hackinghorn has joined #ocaml
<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?
kurfen has quit [Quit: WeeChat 2.3]
kurfen has joined #ocaml
<d_bot_> <undu> @leonidas that's similar situation to generating bindings, see this rule with the `targets` stanza https://github.com/xapi-project/ocaml-unix-errno/blob/master/lib_gen/dune#L15-L19
<Leonidas> Franciman: no, only ocamlformat
<d_bot_> <undu> Sorry, I meant to highlight the following rule https://github.com/xapi-project/ocaml-unix-errno/blob/master/lib_gen/dune#L20-24
<Franciman> thanks Leonidas
<Leonidas> undu: the problem is that my rule generates an .ml file and no matter what dune tries to compile it
<Leonidas> which then fails for some fun reason
<Leonidas> actually it is really fun, looks like I found an dune bug
<d_bot_> <undu> You may have a library rule that uses all the modules in a directory, that will use foo.ml when building the library
hendursa1 has quit [Ping timeout: 276 seconds]
<Leonidas> this should probably not happen, a second run of `dune` being fine all of a sudden.
hendursa1 has joined #ocaml
cedric has joined #ocaml
bartholin has quit [Ping timeout: 252 seconds]
<Leonidas> undu: you're right, using `(modules :standard \ my_generated_one)` solved it!
bartholin has joined #ocaml
sagax has quit [Ping timeout: 264 seconds]
kurfen has quit [Quit: WeeChat 2.3]
kurfen has joined #ocaml
kurfen has quit [Client Quit]
kurfen has joined #ocaml
kurfen has quit [Client Quit]
kurfen has joined #ocaml
<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
<d_bot_> <Et7f3> https://github.com/OCamlPro/drom 🙈
xiongxin has quit [Ping timeout: 252 seconds]
xiongxin has joined #ocaml
<Franciman> yes
hackinghorn has quit [Ping timeout: 252 seconds]
<d_bot_> <darrenldl> Franciman: oh huh, any particular reason why?
<Franciman> mostly because I found the interfaces easier
<Franciman> at least for now :)
<d_bot_> <darrenldl> whats the haskell landscape like?
<olle> :|
<olle> o0
xiongxin has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
bartholin has joined #ocaml
wwilly has joined #ocaml
hendursa1 has quit [Quit: hendursa1]
hendursaga has joined #ocaml
<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
<Franciman> I thought it could find it alone
<mclovin> if you have src/main.ml
<mclovin> you can do
<mclovin> dune exec src/main.exe
<Franciman> ya
<Franciman> yay
<Franciman> ty
bartholin has quit [Ping timeout: 252 seconds]
bartholin has joined #ocaml
spip has quit [Quit: Konversation terminated!]
williewillus has left #ocaml [The Lounge - https://thelounge.chat]
terrorjack has joined #ocaml
gravicappa has quit [Ping timeout: 252 seconds]
kurfen has quit [Ping timeout: 252 seconds]
kurfen has joined #ocaml
<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]
Techcable has quit [Quit: ZNC - https://znc.in]
Techcable has joined #ocaml