What is the effect of doing an open of Core.Std (I don't need async for the moment)?<br><br>Does it override the standard prelude and the standard library?<br><br>On Thursday, November 8, 2012 3:12:06 PM UTC+9, Malcolm wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Core.Std and Async.Std are designed to be opened.
<br>
<br>Francois <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="ClvUK3SJsbYJ">francois.b...@gmail.<wbr>com</a>> writes:
<br>
<br>> On Thursday, November 8, 2012 1:42:41 AM UTC+9, Anil Madhavapeddy wrote:
<br>>>
<br>>> You should also add "#camlp4o" so that toplevel syntax extensions work too.
<br>>>
<br>>
<br>> In the future, I think only the one from janestreet to do automatic
<br>> translations to/from s-expressions interests me.
<br>> I prefer to read standard OCaml code usually.
<br>>
<br>>
<br>>>
<br>>> I'd really recommend using 'utop' (installable via OPAM) instead of the
<br>>> default toplevel. It doesn't require the extra -I that the default toplevel
<br>>> needs, and has a really nice interactive interpreter.
<br>>>
<br>>
<br>> I have to read about it.
<br>> I'm conservative about using new things (I'm an isolated OCaml developper,
<br>> no one nearby to help me in case
<br>> I mess with something, that's why I'm so active on mailing lists).
<br>>
<br>>
<br>>>
<br>>> My full .ocamlinit with utop is:
<br>>>
<br>>> #use "topfind"
<br>>> #camlp4o
<br>>> #thread
<br>>> #require "core.top";;
<br>>> #require "async";;
<br>>> open Core.Std
<br>>> open Async.Std
<br>>>
<br>>
<br>> Thanks for sharing this.
<br>> I'm very worried about the open directives
<br>> and try to never use them so I don't think
<br>> it would fit me for the moment.
<br>>
<br>> Best regards,
<br>> Francois.
<br>>
<br>>
<br>>
<br>>>
<br>>> -anil
<br>>>
<br>>> On 7 Nov 2012, at 05:33, Francois Berenger <<a>francois.ber...@gmail.com</a><<wbr>javascript:>>
<br>>> wrote:
<br>>>
<br>>> Thanks a lot.
<br>>>
<br>>> So, the whole recipe in my case was:
<br>>>
<br>>> ocaml -I $OCAML_TOPLEVEL_PATH
<br>>> #thread;;
<br>>> #require "core.top";;
<br>>> #require "async";;
<br>>>
<br>>> Regards,
<br>>> F.
<br>>>
<br>>> On Wednesday, November 7, 2012 12:09:15 PM UTC+9, Sebastien Mondet wrote:
<br>>>>
<br>>>>
<br>>>>
<br>>>> I think that one is the
<br>>>> #thread;;
<br>>>> thing
<br>>>>
<br>>>>
<br>>>>
<br>>>>
<br>>>> On Tue, Nov 6, 2012 at 10:06 PM, Francois Berenger <
<br>>>> <a>francois.ber...@gmail.com</a>> wrote:
<br>>>>
<br>>>>> Thanks! That fixes the problem partially.
<br>>>>>
<br>>>>> Now, I get:
<br>>>>>
<br>>>>> # #require "core.top";;
<br>>>>> # #require "core.top";;stem/lib/core/<wbr>core.cma: loaded
<br>>>>> Error: Reference to undefined global `Condition'
<br>>>>> # #require "core";;
<br>>>>> # #require "core";;m/system/lib/core/<wbr>core.cma: loaded
<br>>>>> Error: Reference to undefined global `Condition'
<br>>>>> # #require "async";;
<br>>>>> # #require "async";;/system/lib/core/<wbr>core.cma: loaded
<br>>>>> Error: Reference to undefined global `Condition'
<br>>>>>
<br>>>>> Any hint?
<br>>>>>
<br>>>>>
<br>>>>> On Wednesday, November 7, 2012 11:54:47 AM UTC+9, Sebastien Mondet wrote:
<br>>>>>
<br>>>>>>
<br>>>>>> I'm not sure if this is your problem, but there was something with the
<br>>>>>> toplevel (comming with the system compiler) not knowing about opam
<br>>>>>> packages.
<br>>>>>> I have to launch:
<br>>>>>>
<br>>>>>> ocaml -I $OCAML_TOPLEVEL_PATH
<br>>>>>>
<br>>>>>> (the variable OCAML_TOPLEVEL_PATH is set by eval `opam config -env`)
<br>>>>>>
<br>>>>>>
<br>>>>>> On Tue, Nov 6, 2012 at 9:37 PM, Francois Berenger <francois.ber...@**
<br>>>>>> <a href="http://gmail.com" target="_blank">gmail.com</a>> wrote:
<br>>>>>>
<br>>>>>>> Apparently, ocamlfind knows where these libraries are:
<br>>>>>>>
<br>>>>>>> $ ocamlfind -query core
<br>>>>>>> /home/berenger/.opam/system/**<wbr>lib/core
<br>>>>>>> $ ocamlfind -query async
<br>>>>>>> /home/berenger/.opam/system/**<wbr>lib/async
<br>>>>>>> $ ocamlfind -query async_extra
<br>>>>>>> /home/berenger/.opam/system/**<wbr>lib/async_extra
<br>>>>>>>
<br>>>>>>>
<br>>>>>>> On Wednesday, November 7, 2012 11:32:43 AM UTC+9, Francois Berenger
<br>>>>>>> wrote:
<br>>>>>>>>
<br>>>>>>>> Hello,
<br>>>>>>>>
<br>>>>>>>> I'd like to play with core in my toplevel.
<br>>>>>>>>
<br>>>>>>>> Is there a recipe?
<br>>>>>>>>
<br>>>>>>>> I have installed everything with OPAM:
<br>>>>>>>> $ opam list | egrep "core|async"
<br>>>>>>>> async 108.07.01 Monadic concurrency library
<br>>>>>>>> async_core 108.07.01 Monadic concurrency library
<br>>>>>>>> async_extra 108.07.01 Monadic concurrency library
<br>>>>>>>> async_unix 108.07.01 Monadic concurrency library
<br>>>>>>>> core 108.07.01 Industrial strength alternative to
<br>>>>>>>> OCaml's standard library
<br>>>>>>>> core_extended -- Extra components that are not as
<br>>>>>>>> closely vetted or as stable as Core
<br>>>>>>>>
<br>>>>>>>> In my toplevel, I type
<br>>>>>>>> #use "topfind";;
<br>>>>>>>> #list;;
<br>>>>>>>>
<br>>>>>>>> Nothing about core or async shows up.
<br>>>>>>>> While parmap is there, for example.
<br>>>>>>>>
<br>>>>>>>> Is this normal?
<br>>>>>>>>
<br>>>>>>>> I guess there is some configuration file of findlib to tweak
<br>>>>>>>> somewhere.
<br>>>>>>>>
<br>>>>>>>> Regards,
<br>>>>>>>> F.
<br>>>>>>>>
<br>>>>>>>>
<br>>>>>>
<br>>>>
<br>>>
<br></blockquote>