Ricky Barefield | 1 Mar 11:39 2007
Picon

RE: Core

Hi,

Thanks for the help, I've downloaded darcs etc and it builds fine.

Unfortunately I'm still getting the same error message,

"Error: ...\Yhc\Core\Binary.hs(8:14-8:15) Found {end-of-group} but
expected one of <string> <char> <rational> <integer> ( [ <varid> <conid>
_case_ _if_ _do_ _let_ \ ` <varop> <conop> ~ _"

I'm not sure how to add those paths to the include path, so I've just
moved the folders from \libraries\general and src\libraries\core to
\packages\yhc-base\1.0 which means yhc finds the libraries.

Again any help would be much appreciated,

Ricky

-----Original Message-----
From: Neil Mitchell [mailto:ndmitchell <at> gmail.com] 
Sent: 28 February 2007 23:40
To: Ricky Barefield
Cc: yhc <at> haskell.org
Subject: Re: [Yhc] Core

Hi

> Firstly so I can work with it I need to use the `Core' data type which
> seems to be in `Yhc.Core', I realised this isn't part of the windows
> snapshot of YHC so I found the files within
(Continue reading)

Neil Mitchell | 1 Mar 11:43 2007
Picon

Re: Core

Hi Ricky,

Ah, I see what the error is. In general I use Yhc to compile programs
for Yhc Core, but use GHC/Hugs for developing of Yhc.Core tools. Yhc
obviously isn't capable of compiling Yhc.Core at the moment - it
should be but it appears that DrIFT for GhcBinary isn't compatible
with Yhc. Should be easy to fix, but since we were going to move to
Data.Binary I'm not sure there is much point.

Thanks

Neil

> "Error: ...\Yhc\Core\Binary.hs(8:14-8:15) Found {end-of-group} but
> expected one of <string> <char> <rational> <integer> ( [ <varid> <conid>
> _case_ _if_ _do_ _let_ \ ` <varop> <conop> ~ _"
>
> I'm not sure how to add those paths to the include path, so I've just
> moved the folders from \libraries\general and src\libraries\core to
> \packages\yhc-base\1.0 which means yhc finds the libraries.
>
> Again any help would be much appreciated,
>
> Ricky
>
> -----Original Message-----
> From: Neil Mitchell [mailto:ndmitchell <at> gmail.com]
> Sent: 28 February 2007 23:40
> To: Ricky Barefield
> Cc: yhc <at> haskell.org
(Continue reading)

Tom Shackell | 1 Mar 11:49 2007
Picon

Re: What constitutes an 'evaluated node'?

Hi Stefan,

 > Some of the bytecodes, eg INT_SWITCH, require the node they are
 > applied to, to be 'evaluated'.  EVAL takes a node and returns an
 > equivalent evaluated node.  However in the current implementation
 > (Yhi) EVAL has the side-effect of making any other reference to the
 > original node become evaluated.

This is a definite 'feature', in fact it's entirely integral to the 
correct handling of lazy evaluation. Remember that in Haskell no 
computation is actually performed unless it is needed in order to 
produce an output. Thus for example

   const x y = y

   f = const (...really expensive...) 3

because const doesn't need the value of x in order to give a result the 
'really expensive' computation isn't needed and is thus never performed.

Similarly Haskell avoids doing the same computation twice

   f = g x x x x
     where
     x = ... some really expensive computation ...

   g a b c d = a + b + c + d

Here although x is passed to g 4 times (and g will only evaluate x when 
it needs to), the really expensive computation will only be done once.
(Continue reading)

Stefan O'Rear | 1 Mar 16:12 2007
Picon
Picon

Re: What constitutes an 'evaluated node'?

On Thu, Mar 01, 2007 at 10:49:14AM +0000, Tom Shackell wrote:
> Hi Stefan,
> 
> > Some of the bytecodes, eg INT_SWITCH, require the node they are
> > applied to, to be 'evaluated'.  EVAL takes a node and returns an
> > equivalent evaluated node.  However in the current implementation
> > (Yhi) EVAL has the side-effect of making any other reference to the
> > original node become evaluated.
> 
> This is a definite 'feature', in fact it's entirely integral to the 
> correct handling of lazy evaluation. Remember that in Haskell no 
> computation is actually performed unless it is needed in order to 
> produce an output. Thus for example
> 
>   const x y = y
> 
>   f = const (...really expensive...) 3
> 
> because const doesn't need the value of x in order to give a result the 
> 'really expensive' computation isn't needed and is thus never performed.
> 
> Similarly Haskell avoids doing the same computation twice
> 
>   f = g x x x x
>     where
>     x = ... some really expensive computation ...
> 
>   g a b c d = a + b + c + d
> 
> Here although x is passed to g 4 times (and g will only evaluate x when 
(Continue reading)

Neil Mitchell | 1 Mar 17:55 2007
Picon

Fwd: Re: Yhc port to Mindstorms

Hi,

Tobias Muehlberg and I have just given the aforementioned talk.  The
abstract is at the bottom of this email, and the slides are available
at:

  http://www.cs.york.ac.uk/plasma/talkrelated/318.pdf

> I'm keen to get more details of this.  Did it use Yhc?  Where does
> Lava come in?  (We were thinking of using some form of FRP, as in
> Frob or Yampa.)  -- P

My approach was just to add a C backend to Lava, in which circuits get
turned into C.  Lava alone is not great for control systems, but Koen
Claessen and Gordon Pace have defined an Esterel-like language
(amongst other languages), called Flash, on top of Lava.  Essentially,
if you write an interepreter/semantics for your own custom language in
Lava, then you get a compiler from that language to VHDL (and now C)
for free.  See Koen's thesis for more details:

  http://www.cs.chalmers.se/~koen/pubs/phd01-thesis.ps

    (in particular chapter 6, and perhaps chapter 5)

The seperation of Lava and languages like Flash reminds me of the
pure/monadic divide when programming in Haskell, e.g. Lava (pure)
functions can be called from Flash (impure) programs, and Flash
programs can be turned into Lava functions by "running" them.

The Lava homepage is:
(Continue reading)

Alfonso Acosta | 1 Mar 18:04 2007
Picon

Re: Fwd: Re: Yhc port to Mindstorms

On 3/1/07, Neil Mitchell <ndm <at> cs.york.ac.uk> wrote:

> The seperation of Lava and languages like Flash reminds me of the
> Lava (pure)
> functions can be called from Flash (impure) programs

Lava is not pure, as it uses observable sharing and thus internal side effects.
Dimitry Golubovsky | 2 Mar 15:42 2007
Picon

What constitutes an 'evaluated node'?

Hi,

I'm hoping that some followup to Stefan's question will be posted
here. I have a similar question to answer with my Javascript code
generator. In Javascript, it is very easy to update the "original"
node after evaluation because references to an object referencing such
node are passed around, and updating of some property value via such
reference automatically updates the original node itself.

If it is more appropriate to limit update propagation, special
measures need to be taken (such as cloning a node object instead of
passing a reference), and it is better to be learned now.

--

-- 
Dimitry Golubovsky

Anywhere on the Web
Dimitry Golubovsky | 2 Mar 15:48 2007
Picon

Followup to "evaluated node" question

Hi,

Sorry, it looks like there was a followup (seen in mail-archive, but
not in the pipermail archive at haskell.org which shows the latest
message on Feb 28).

--

-- 
Dimitry Golubovsky

Anywhere on the Web
Neil Mitchell | 2 Mar 23:54 2007
Picon

Re: Problems installing YHC on Windows XP

Hi Bryan,

> I'm interested in fiddling with YHC, maybe helping out from time to
> time whenever I get free time, so I tried to install it from darcs
> today. Everything went well (got the source from darcs, downloaded
> SCons) until I did the configure script (error below). The scons
> output tells me that it can't find a C compiler. I have one on this
> computer via MinGW (which has executables named "gcc.exe" and
> "cpp.exe"). Not knowing SCons, I still took a shot in the dark at the
> configure script, changing the 'env' line to:
> env = Environment(ENV=os.environ, CPPPATH=["#.", "C:\\MinGW\\bin\\"])
> but that didn't work, either.
>
> Should I go with an entirely different compiler? I don't remember why
> I installed that one, but I'm not sure I even used it, so I'm not even
> sure if it works.

We don't support the gcc from MingW, in fact we don't support GCC on
Windows at all. We only support Visual Studio.

All is not lost though, if you do:
> scons build yhc
> scons build libraries

Then download a snapshot from
http://www.cs.york.ac.uk/fp/yhc/snapshot/ and extra yhi.exe into
inst\bin, you'll have a working Yhc installation built mainly from
source, and can hack the Haskell side of Yhc easily enough. I develop
Yhc using this setup on some machines.

(Continue reading)

Stefan O'Rear | 3 Mar 05:17 2007
Picon
Picon

Inconsistency in documentation of .hbc format

http://www.haskell.org/haskellwiki/Yhc/RTS/hbc does not list the
calling convention and type signature fields for ExtObj.  (ndm
recommended I tell the list; this was discovered while writing the
bytecode parser for ayhi.)

Stefan

Gmane