From ndmitchell at gmail.com Sat Dec 3 12:48:16 2005 From: ndmitchell at gmail.com (Neil Mitchell) Date: Sat Dec 3 12:50:14 2005 Subject: [Yhc] Sending patches In-Reply-To: <438AF0B2.4080805@cs.york.ac.uk> References: <404396ef0511280346n4b2cf0b4g6cd491f2f4a61491@mail.gmail.com> <438AF0B2.4080805@cs.york.ac.uk> Message-ID: <404396ef0512030948g4e50081dj20f633427d85f9e@mail.gmail.com> > a) The repo would always contain (mostly) working software > b) I wouldn't have to deal with quite so many patches ;-) In order to reduce the number of patches Tom has to deal with, if anyone wants to send a patch relating to the evaluator (yhe/gyhe) or the test suite (yht) please send it direct to me, and I'll apply and push it. Thanks Neil From miked at cs.york.ac.uk Mon Dec 5 10:12:20 2005 From: miked at cs.york.ac.uk (Mike Dodds) Date: Mon Dec 5 10:14:14 2005 Subject: [Yhc] Problems getting Yhc compiling on MacOS Message-ID: <439458D4.7000609@cs.york.ac.uk> I've been having trouble getting yhc (devel) to compile on MacOS. I'm using: ghc 6.4, and gcc 4.0.1 I'm getting the following message: [...] Skipping Package ( ./Package.hs, ./Package.o ) Skipping Phase ( ./Phase.hs, ./Phase.o ) Skipping Front ( ./Front.lhs, ./Front.o ) Skipping Compile ( ./Compile.lhs, ./Compile.o ) Skipping Make ( ./Make.lhs, ./Make.o ) Skipping Main ( Main.hs, Main.o ) Linking ... make -C src/cpphs-1.0 ghc --make cpphs.hs -o ../../inst/bin/cpphs IChasing modules from: cpphs.hs Skipping ParseLib ( ./ParseLib.hs, ./ParseLib.o ) Skipping HashDefine ( ./HashDefine.hs, ./HashDefine.o ) Skipping SymTab ( ./SymTab.hs, ./SymTab.o ) Skipping Position ( ./Position.hs, ./Position.o ) Skipping Tokenise ( ./Tokenise.hs, ./Tokenise.o ) Skipping ReadFirst ( ./ReadFirst.hs, ./ReadFirst.o ) Skipping CppIfdef ( ./CppIfdef.hs, ./CppIfdef.o ) Skipping MacroPass ( ./MacroPass.hs, ./MacroPass.o ) Skipping RunCpphs ( ./RunCpphs.hs, ./RunCpphs.o ) Skipping Main ( cpphs.hs, cpphs.o ) Linking ... make -C src/packages/yhc-base-1.0 export YHC_BASE_PATH=../../../inst ; ../../../inst/bin/yhc -d ../../../inst/lib/yhc/packages/yhc-base/1.0/ -i ../../../inst/lib/yhc/packages/yhc-base/1.0/ -c System/Exit.hs yhc: Error: File not found, Data.Ratio Looked in: ../../../inst/lib/yhc/packages/yhc-base/1.0 make[1]: *** [../../../inst/lib/yhc/packages/yhc-base/1.0//System/Exit.hi] Error 1 make: *** [yhc-base] Error 2 From shackell at cs.york.ac.uk Mon Dec 5 10:35:42 2005 From: shackell at cs.york.ac.uk (Thomas Shackell) Date: Mon Dec 5 10:47:21 2005 Subject: [Yhc] Problems getting Yhc compiling on MacOS In-Reply-To: <439458D4.7000609@cs.york.ac.uk> References: <439458D4.7000609@cs.york.ac.uk> Message-ID: <43945E4E.3080007@cs.york.ac.uk> This was fixed in my local copy but I forgot to push it :-) You'll need to pull the changes, then do rm -rf inst/lib/yhc/ then run make again. Tom Mike Dodds wrote: > I've been having trouble getting yhc (devel) to compile on MacOS. I'm > using: ghc 6.4, and gcc 4.0.1 > > I'm getting the following message: > > [...] > Skipping Package ( ./Package.hs, ./Package.o ) > Skipping Phase ( ./Phase.hs, ./Phase.o ) > Skipping Front ( ./Front.lhs, ./Front.o ) > Skipping Compile ( ./Compile.lhs, ./Compile.o ) > Skipping Make ( ./Make.lhs, ./Make.o ) > Skipping Main ( Main.hs, Main.o ) > Linking ... > make -C src/cpphs-1.0 > ghc --make cpphs.hs -o ../../inst/bin/cpphs > IChasing modules from: cpphs.hs > Skipping ParseLib ( ./ParseLib.hs, ./ParseLib.o ) > Skipping HashDefine ( ./HashDefine.hs, ./HashDefine.o ) > Skipping SymTab ( ./SymTab.hs, ./SymTab.o ) > Skipping Position ( ./Position.hs, ./Position.o ) > Skipping Tokenise ( ./Tokenise.hs, ./Tokenise.o ) > Skipping ReadFirst ( ./ReadFirst.hs, ./ReadFirst.o ) > Skipping CppIfdef ( ./CppIfdef.hs, ./CppIfdef.o ) > Skipping MacroPass ( ./MacroPass.hs, ./MacroPass.o ) > Skipping RunCpphs ( ./RunCpphs.hs, ./RunCpphs.o ) > Skipping Main ( cpphs.hs, cpphs.o ) > Linking ... > make -C src/packages/yhc-base-1.0 > export YHC_BASE_PATH=../../../inst ; ../../../inst/bin/yhc -d > ../../../inst/lib/yhc/packages/yhc-base/1.0/ -i > ../../../inst/lib/yhc/packages/yhc-base/1.0/ -c System/Exit.hs > yhc: Error: File not found, Data.Ratio > Looked in: > ../../../inst/lib/yhc/packages/yhc-base/1.0 > > make[1]: *** > [../../../inst/lib/yhc/packages/yhc-base/1.0//System/Exit.hi] Error 1 > make: *** [yhc-base] Error 2 > > _______________________________________________ > Yhc mailing list > Yhc@haskell.org > http://haskell.org/mailman/listinfo/yhc From Malcolm.Wallace at cs.york.ac.uk Tue Dec 6 15:27:14 2005 From: Malcolm.Wallace at cs.york.ac.uk (Malcolm Wallace) Date: Tue Dec 6 15:28:58 2005 Subject: [Yhc] can't build on MacOS? Message-ID: <20051206202714.395bb624.Malcolm.Wallace@cs.york.ac.uk> I'm having trouble getting started with building yhc on MacOS. The configure step does not get very far: $ ./configure --prefix=/sw checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for __gmpz_init in -lgmp... no configure: error: cannot find libgmp However, I do have libgmp installed, in /sw/lib, and my LD_LIBRARY_PATH variable points to that directory. Any ideas? Regards, Malcolm From miked at cs.york.ac.uk Tue Dec 6 18:27:59 2005 From: miked at cs.york.ac.uk (Mike Dodds) Date: Tue Dec 6 18:29:49 2005 Subject: [Yhc] can't build on MacOS? In-Reply-To: <20051206202714.395bb624.Malcolm.Wallace@cs.york.ac.uk> References: <20051206202714.395bb624.Malcolm.Wallace@cs.york.ac.uk> Message-ID: <43961E7F.5020805@cs.york.ac.uk> Malcolm Wallace wrote: > checking for __gmpz_init in -lgmp... no > configure: error: cannot find libgmp > > However, I do have libgmp installed, in /sw/lib, and my LD_LIBRARY_PATH > variable points to that directory. Any ideas? > Malcolm, I had the same problem with the darwinports version of libgmp. IIRC, I solved it by installing a hand-compiled version of libgmp into /usr/local. At least, I think that's what fixed it - I was messing around with various different things, and then it suddenly compiled. Mike. From ndmitchell at gmail.com Tue Dec 6 18:32:46 2005 From: ndmitchell at gmail.com (Neil Mitchell) Date: Tue Dec 6 18:34:38 2005 Subject: [Yhc] XML Bytecode specification Message-ID: <404396ef0512061532k62b75be5x6567f60ac1003862@mail.gmail.com> Hi, Since there are now several things with intimate knowledge of what the bytecode looks like (Documentation, Java, Haskell*2, C, Python at least) I thought I'd write an XML specification for the bytecode, along with generators in XSL to generate all of these bindings. This way if the bytecode does ever change, it will be less painful, and hopefully it will be a little bit less work for everyone anyway. Attached is a first version of this. To run an XML+XSL to generate a file, windows users should probably use msxsl (free download from MS) and Unix users can use Xalan, although I'm not sure if there is anything better. The generators including in this zip include: * Haskell - probably wrong, requires a library you certainly don't have, I'll flesh this out in the future for the Haskell bytecode library. * C - can generate bytecodes.h perfectly * Python - does what I got asked to do with it * Documentation - http://www.cs.york.ac.uk/~ndm/yhc/bytecodes.html * Java - not done. Brian: feel free to give me a spec and I'll write you a .xsl file for it. This .zip file will probably be added to the repo under src/compiler98/ByteCode/data tomorrow. Thanks Neil -------------- next part -------------- A non-text attachment was scrubbed... Name: data.zip Type: application/zip Size: 8621 bytes Desc: not available Url : http://www.haskell.org//pipermail/yhc/attachments/20051206/0d363cf4/data-0001.zip From shackell at cs.york.ac.uk Wed Dec 7 05:16:29 2005 From: shackell at cs.york.ac.uk (Thomas Shackell) Date: Wed Dec 7 05:22:26 2005 Subject: [Yhc] can't build on MacOS? In-Reply-To: <20051206202714.395bb624.Malcolm.Wallace@cs.york.ac.uk> References: <20051206202714.395bb624.Malcolm.Wallace@cs.york.ac.uk> Message-ID: <4396B67D.5000707@cs.york.ac.uk> Hi, the autoconf script uses AC_CHECK_LIB(gmp, __gmpz_init) which is the recommended way to check for GMP of versions >= 3 according to http://swox.com/gmp/manual/Autoconf.html Which version of libgmp do you have? and if you write a trivial program like: #include int main(){ mpz_t m; mpz_init(m); return 0; } does it compile with gcc -o delete-me -lgmp ? In any case, I've pushed a patch that will hopefully make it work for earlier versions of gmp. Let me know if it works :-) Cheers Tom Malcolm Wallace wrote: > I'm having trouble getting started with building yhc on MacOS. > The configure step does not get very far: > > $ ./configure --prefix=/sw > checking for gcc... gcc > checking for C compiler default output file name... a.out > checking whether the C compiler works... yes > checking whether we are cross compiling... no > checking for suffix of executables... > checking for suffix of object files... o > checking whether we are using the GNU C compiler... yes > checking whether gcc accepts -g... yes > checking for gcc option to accept ANSI C... none needed > checking for __gmpz_init in -lgmp... no > configure: error: cannot find libgmp > > However, I do have libgmp installed, in /sw/lib, and my LD_LIBRARY_PATH > variable points to that directory. Any ideas? > > Regards, > Malcolm > _______________________________________________ > Yhc mailing list > Yhc@haskell.org > http://haskell.org/mailman/listinfo/yhc From shackell at cs.york.ac.uk Wed Dec 7 05:24:39 2005 From: shackell at cs.york.ac.uk (Thomas Shackell) Date: Wed Dec 7 05:26:59 2005 Subject: [Yhc] can't build on MacOS? In-Reply-To: <20051206202714.395bb624.Malcolm.Wallace@cs.york.ac.uk> References: <20051206202714.395bb624.Malcolm.Wallace@cs.york.ac.uk> Message-ID: <4396B867.5060502@cs.york.ac.uk> ... Also of note is that LD_LIBRARY_PATH is the path where the OS looks when dynamically loading libraries at runtime (on dlopen to be precise). I suspect what you need to set is LIBRARY_PATH, since that's the variable gcc uses to decide where to look for libraries: http://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html cheers Tom Malcolm Wallace wrote: > I'm having trouble getting started with building yhc on MacOS. > The configure step does not get very far: > > $ ./configure --prefix=/sw > checking for gcc... gcc > checking for C compiler default output file name... a.out > checking whether the C compiler works... yes > checking whether we are cross compiling... no > checking for suffix of executables... > checking for suffix of object files... o > checking whether we are using the GNU C compiler... yes > checking whether gcc accepts -g... yes > checking for gcc option to accept ANSI C... none needed > checking for __gmpz_init in -lgmp... no > configure: error: cannot find libgmp > > However, I do have libgmp installed, in /sw/lib, and my LD_LIBRARY_PATH > variable points to that directory. Any ideas? > > Regards, > Malcolm > _______________________________________________ > Yhc mailing list > Yhc@haskell.org > http://haskell.org/mailman/listinfo/yhc From Malcolm.Wallace at cs.york.ac.uk Wed Dec 7 05:34:52 2005 From: Malcolm.Wallace at cs.york.ac.uk (Malcolm Wallace) Date: Wed Dec 7 05:37:04 2005 Subject: [Yhc] can't build on MacOS? In-Reply-To: <4396B67D.5000707@cs.york.ac.uk> References: <20051206202714.395bb624.Malcolm.Wallace@cs.york.ac.uk> <4396B67D.5000707@cs.york.ac.uk> Message-ID: <20051207103452.29063753.Malcolm.Wallace@cs.york.ac.uk> > Which version of libgmp do you have? libgmp.3.3.3.dylib > #include > int main(){ > mpz_t m; > mpz_init(m); > return 0; > } > > does it compile with > gcc -o delete-me -lgmp No. It seems that I need to add -I/sw/bin and -L/sw/lib for gcc to find the header file and link library (respectively). I did think that gcc would respect the LD_LIBRARY_PATH convention for finding the library archive, but it doesn't seem to do so on this machine. However, I'm not aware of any standard environment mechanism to extend the #include search path. Are there options I can give to autoconf to pass a set of gcc flags into all invocations? Regards, Malcolm From shackell at cs.york.ac.uk Wed Dec 7 05:42:52 2005 From: shackell at cs.york.ac.uk (Thomas Shackell) Date: Wed Dec 7 05:47:20 2005 Subject: [Yhc] can't build on MacOS? In-Reply-To: <20051207103452.29063753.Malcolm.Wallace@cs.york.ac.uk> References: <20051206202714.395bb624.Malcolm.Wallace@cs.york.ac.uk> <4396B67D.5000707@cs.york.ac.uk> <20051207103452.29063753.Malcolm.Wallace@cs.york.ac.uk> Message-ID: <4396BCAC.8030502@cs.york.ac.uk> Malcolm Wallace wrote: > No. It seems that I need to add -I/sw/bin and -L/sw/lib for gcc to > find the header file and link library (respectively). I did think > that gcc would respect the LD_LIBRARY_PATH convention for finding > the library archive, but it doesn't seem to do so on this machine. > However, I'm not aware of any standard environment mechanism to extend > the #include search path. Are there options I can give to autoconf > to pass a set of gcc flags into all invocations? LIBRARY_PATH and C_INCLUDE_PATH :-) Cheers Tom From Malcolm.Wallace at cs.york.ac.uk Wed Dec 7 05:57:13 2005 From: Malcolm.Wallace at cs.york.ac.uk (Malcolm Wallace) Date: Wed Dec 7 06:02:35 2005 Subject: [Yhc] can't build on MacOS? In-Reply-To: <4396BCAC.8030502@cs.york.ac.uk> References: <20051206202714.395bb624.Malcolm.Wallace@cs.york.ac.uk> <4396B67D.5000707@cs.york.ac.uk> <20051207103452.29063753.Malcolm.Wallace@cs.york.ac.uk> <4396BCAC.8030502@cs.york.ac.uk> Message-ID: <20051207105713.73203075.Malcolm.Wallace@cs.york.ac.uk> > > Are there options I can give to autoconf > > to pass a set of gcc flags into all invocations? > > LIBRARY_PATH and C_INCLUDE_PATH :-) Info now added to the wiki. Regards, Malcolm From Malcolm.Wallace at cs.york.ac.uk Wed Dec 7 06:06:55 2005 From: Malcolm.Wallace at cs.york.ac.uk (Malcolm Wallace) Date: Wed Dec 7 06:11:52 2005 Subject: [Yhc] can't build on MacOS? In-Reply-To: <20051206202714.395bb624.Malcolm.Wallace@cs.york.ac.uk> References: <20051206202714.395bb624.Malcolm.Wallace@cs.york.ac.uk> Message-ID: <20051207110655.2b39e341.Malcolm.Wallace@cs.york.ac.uk> OK, next problem. Configure works fine, and 'make' builds the compiler proper. But building the prelude fails with: make -C src/prelude ../../inst/bin/yhc -d ../../inst/prelude System.hs Warning: the environment variable YHC_BASE_PATH is not set Fail: user error (Can't open any of: NHC/FFI.hi /include/NHC/FFI.hi when trying to read NHC.FFI. ) Regards, Malcolm From shackell at cs.york.ac.uk Wed Dec 7 06:14:46 2005 From: shackell at cs.york.ac.uk (Thomas Shackell) Date: Wed Dec 7 06:16:51 2005 Subject: [Yhc] can't build on MacOS? In-Reply-To: <20051207110655.2b39e341.Malcolm.Wallace@cs.york.ac.uk> References: <20051206202714.395bb624.Malcolm.Wallace@cs.york.ac.uk> <20051207110655.2b39e341.Malcolm.Wallace@cs.york.ac.uk> Message-ID: <4396C426.9000703@cs.york.ac.uk> This is (almost certainly) simply because the stable repository is out of date :-) I'm guessing that that's what you're using. I've pulled the changes from the development one. Tom Malcolm Wallace wrote: > OK, next problem. Configure works fine, and 'make' builds the > compiler proper. But building the prelude fails with: > > make -C src/prelude > ../../inst/bin/yhc -d ../../inst/prelude System.hs > Warning: the environment variable YHC_BASE_PATH is not set > Fail: user error (Can't open any of: > NHC/FFI.hi > /include/NHC/FFI.hi > when trying to read NHC.FFI. > ) > > Regards, > Malcolm > _______________________________________________ > Yhc mailing list > Yhc@haskell.org > http://haskell.org/mailman/listinfo/yhc From shackell at cs.york.ac.uk Wed Dec 7 06:18:30 2005 From: shackell at cs.york.ac.uk (Thomas Shackell) Date: Wed Dec 7 06:21:58 2005 Subject: [Yhc] can't build on MacOS? In-Reply-To: <4396C426.9000703@cs.york.ac.uk> References: <20051206202714.395bb624.Malcolm.Wallace@cs.york.ac.uk> <20051207110655.2b39e341.Malcolm.Wallace@cs.york.ac.uk> <4396C426.9000703@cs.york.ac.uk> Message-ID: <4396C506.3010709@cs.york.ac.uk> Or at leaast I would if darcs wasn't hanging ... try using yhc-devel. Tom Thomas Shackell wrote: > This is (almost certainly) simply because the stable repository is out > of date :-) I'm guessing that that's what you're using. I've pulled the > changes from the development one. > > > Tom From Malcolm.Wallace at cs.york.ac.uk Wed Dec 7 08:17:15 2005 From: Malcolm.Wallace at cs.york.ac.uk (Malcolm Wallace) Date: Wed Dec 7 08:21:52 2005 Subject: [Yhc] can't build on MacOS? In-Reply-To: <4396C426.9000703@cs.york.ac.uk> References: <20051206202714.395bb624.Malcolm.Wallace@cs.york.ac.uk> <20051207110655.2b39e341.Malcolm.Wallace@cs.york.ac.uk> <4396C426.9000703@cs.york.ac.uk> Message-ID: <20051207131715.14049682.Malcolm.Wallace@cs.york.ac.uk> Thomas Shackell writes: > This is (almost certainly) simply because the stable repository is out > of date :-) I'm guessing that that's what you're using. I've pulled the > changes from the development one. A fresh 'darcs pull' found 169 new patches. :-) The build now appears to make the runtime system first. (I'm assuming that I can ignore warnings about the dependency files *.d not existing yet, because it then seems to create them immediately afterwards.) But now it falls over when attempting to build the compiler proper: make -C src/compiler98 ghc -cpp --make Main -o ../../inst/bin/yhc Chasing modules from: Main ./Make.lhs: Can't find module Data.Map Indeed, my installation of ghc-6.2.2 does not have a module Data.Map in the base package. Should autoconf have insisted on a version of ghc>=6.4? Is there anyway I can tell the config process to use an explicit ghc-6.4, rather than plain ghc? (I need to keep plain ghc as 6.2.2 for other projects.) Regards, Malcolm From asloane at ics.mq.edu.au Sun Dec 11 05:55:58 2005 From: asloane at ics.mq.edu.au (Tony Sloane) Date: Sun Dec 11 05:57:36 2005 Subject: [Yhc] Suitability of yhc for handheld Haskell In-Reply-To: <404396ef0511280223q5220a6ccneccbd98b11392cd@mail.gmail.com> References: <0EFB278D-5305-4162-AE11-20A62576D4B4@ics.mq.edu.au> <404396ef0511280223q5220a6ccneccbd98b11392cd@mail.gmail.com> Message-ID: <49D7C817-02A6-426F-A23F-CE86E4F64CCE@ics.mq.edu.au> Hi Neil, On 28/11/2005, at 9:23 PM, Neil Mitchell wrote: > Hi Tony, > > On the Haskell IRC [http://www.haskell.org/hawiki/HaskellIrcChannel] a > user named stepcut mentioned they were thinking about porting yhc to > PalmOS, and I think they did some initial work. Unfortunately I don't > have a real world address/name for them. > > From what I remember, the issues they mentioned to me were: > > * No support for a 64bit long at all > * Lack of GMP for PalmOS > * No real files These sounds familiar from my nhc runtime port work. My take on the first and second are that typical handheld apps are not likely to need these features (or can work around them) so a handheld runtime can omit them (at least at first). The third is possible using stream databases and I already have some code for the nhc runtime that may be usable in a yhc runtime port. >> So, my question to you is: Would you advise active use of the yhc >> code as a basis for our handheld work? Is it stable enough to be >> useful for this at this point? We can probably put up with >> deficiencies at the compiler end since we don't expect to write very >> large or complex programs in the near future but we need the runtime >> to be stable so we can be sure of the port. Or should we wait? Any >> other comments? > > The compiler is under active rewrite, and is not particularly stable - > but should be sufficient for what you need. The runtime is much more > stable - almost all of the changes in the last few weeks have been > minor and as a result of ports, to make it more cross platform. A port > should not require porting the compiler much, if at all - when the > compiler is self-compiling (only minor issues away from this, nothing > particularly hard) - it should run on top of the runtime. Ok, thanks. I'll definitely look into it and report back when I have something useful to say. > One thing in Yhc's favour is that the code is quite clean and > standards compliant, it was rewritten from the ground up quite > recently with the goal of portability in mind. Indeed, this is potentially a big advantage. Thanks, Tony > > Thanks > > Neil > From Malcolm.Wallace at cs.york.ac.uk Wed Dec 14 04:45:25 2005 From: Malcolm.Wallace at cs.york.ac.uk (Malcolm Wallace) Date: Wed Dec 14 04:56:33 2005 Subject: [Yhc] regression test suite? Message-ID: <20051214094525.42b18386.Malcolm.Wallace@cs.york.ac.uk> Does the regression test suite for yhc get run every night? I was just wondering if the nice graphical report at http://www-users.cs.york.ac.uk/~ndm/yhc/report.html was supposed to be updated automatically or not? Regards, Malcolm From ndmitchell at gmail.com Wed Dec 14 05:27:19 2005 From: ndmitchell at gmail.com (Neil Mitchell) Date: Wed Dec 14 05:28:45 2005 Subject: [Yhc] regression test suite? In-Reply-To: <20051214094525.42b18386.Malcolm.Wallace@cs.york.ac.uk> References: <20051214094525.42b18386.Malcolm.Wallace@cs.york.ac.uk> Message-ID: <404396ef0512140227n364a5fa9rcd091a8da4d65860@mail.gmail.com> Hi Malcolm, No, its not run every night. However, every time I suspect its been changed I give it a new run. I should probably set up a cron job to automatically generate the haddock documentation and test report every night, but its a bit beyond my ability. Thanks Neil On 12/14/05, Malcolm Wallace wrote: > Does the regression test suite for yhc get run every night? > I was just wondering if the nice graphical report at > http://www-users.cs.york.ac.uk/~ndm/yhc/report.html > was supposed to be updated automatically or not? > > Regards, > Malcolm > _______________________________________________ > Yhc mailing list > Yhc@haskell.org > http://haskell.org/mailman/listinfo/yhc > From andrewjwilkinson at gmail.com Wed Dec 14 05:32:32 2005 From: andrewjwilkinson at gmail.com (Andrew Wilkinson) Date: Wed Dec 14 05:33:55 2005 Subject: [Yhc] regression test suite? In-Reply-To: <404396ef0512140227n364a5fa9rcd091a8da4d65860@mail.gmail.com> References: <20051214094525.42b18386.Malcolm.Wallace@cs.york.ac.uk> <404396ef0512140227n364a5fa9rcd091a8da4d65860@mail.gmail.com> Message-ID: <71ff0e500512140232h3ebeacf8w2fe385f255ced404@mail.gmail.com> Come on Neil, setting up a cronjob is easy! When you (eventually) get into work I'll help you set one up :) I think having the test report generated every night would be very useful. Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.haskell.org//pipermail/yhc/attachments/20051214/c232836f/attachment.htm From ndmitchell at gmail.com Thu Dec 15 13:56:32 2005 From: ndmitchell at gmail.com (Neil Mitchell) Date: Thu Dec 15 13:57:54 2005 Subject: [Yhc] Compiling Message-ID: <404396ef0512151056s2df96bata6ebc2dfc2b7a@mail.gmail.com> Hi, I'm relatively new to Linux (I avoid it like the plague), so I tried building Yhc on Linux. The first thing I did was darcs get, all nice and easy, if not particularly fast. Next thing I did was type make, and got a strange error message. A few minutes later I realised that the reason is because configure has not been run. Is it possible to detect this case, and ideally just run configure for the user, or at the very least give a helpful and friendly message telling them exactly what they need to do? I was very impressed that yhc and yhi both built nice and easily, although the YHC_BASE_PATH issue threw up its head, and since I have no idea how to set an environment variable, at that point I have to give up. Sensible defaults would be really nice. It should also be documented somewhere on the wiki. Thanks Neil From miked at cs.york.ac.uk Sun Dec 18 16:32:11 2005 From: miked at cs.york.ac.uk (Mike Dodds) Date: Sun Dec 18 16:33:23 2005 Subject: [Yhc] "Data/Ratio" yhi error on macos X Message-ID: <43A5D55B.1010109@cs.york.ac.uk> Hi, Yhc / yhi compiles and installs on my system, but if you try to compile a simple Haskell program like this: main = putStrLn $ show (2+3) executing the bytecode file with yhi gives you this error: ERROR: couldn't find module named 'Data/Ratio' tried: Data/Ratio.hbc /Users/mike/Compile/yhc-devel/inst/lib/yhc/packages/yhc-base/1.0/Data/Ratio.hbc However, this program *will* compile and run correctly: main = putStrLn "hello, world!" This still happens if I get and compile fresh copy of yhc-devel from darcs, so I don't think my repo has been corrupted or anything. Mike. From miked at cs.york.ac.uk Sun Dec 18 16:39:23 2005 From: miked at cs.york.ac.uk (Mike Dodds) Date: Sun Dec 18 16:40:34 2005 Subject: [Yhc] "Data/Ratio" yhi error on macos X In-Reply-To: <43A5D55B.1010109@cs.york.ac.uk> References: <43A5D55B.1010109@cs.york.ac.uk> Message-ID: <43A5D70B.8050504@cs.york.ac.uk> Mike Dodds wrote: > ERROR: couldn't find module named 'Data/Ratio' > tried: > Data/Ratio.hbc > > /Users/mike/Compile/yhc-devel/inst/lib/yhc/packages/yhc-base/1.0/Data/Ratio.hbc > Just to clarify that a little bit, the file in question: /Users/mike/Compile/yhc-devel/inst/lib/yhc/packages/yhc-base/1.0/Data/Ratio.hbc ...really doesn't exist, which I suppose means it's a library bug. Mike. From ndmitchell at gmail.com Sun Dec 18 18:13:29 2005 From: ndmitchell at gmail.com (Neil Mitchell) Date: Sun Dec 18 18:14:42 2005 Subject: [Yhc] "Data/Ratio" yhi error on macos X In-Reply-To: <43A5D70B.8050504@cs.york.ac.uk> References: <43A5D55B.1010109@cs.york.ac.uk> <43A5D70B.8050504@cs.york.ac.uk> Message-ID: <404396ef0512181513x78a7eb7dw543e520b49a94630@mail.gmail.com> Hi Mike, On Windows it works fine. The library exists, but it maybe isn't being made by your makefile? The source is at yhc-devel\src\packages\yhc-base-1.0\Data, and make libraries or something should cause it get compiled and put in the appropriate place. Thanks Neil On 12/18/05, Mike Dodds wrote: > Mike Dodds wrote: > > ERROR: couldn't find module named 'Data/Ratio' > > tried: > > Data/Ratio.hbc > > > > /Users/mike/Compile/yhc-devel/inst/lib/yhc/packages/yhc-base/1.0/Data/Ratio.hbc > > > > Just to clarify that a little bit, the file in question: > > /Users/mike/Compile/yhc-devel/inst/lib/yhc/packages/yhc-base/1.0/Data/Ratio.hbc > > ...really doesn't exist, which I suppose means it's a library bug. > > Mike. > _______________________________________________ > Yhc mailing list > Yhc@haskell.org > http://haskell.org/mailman/listinfo/yhc > From ndmitchell at gmail.com Sun Dec 18 18:25:09 2005 From: ndmitchell at gmail.com (Neil Mitchell) Date: Sun Dec 18 18:26:18 2005 Subject: [Yhc] "Data/Ratio" yhi error on macos X In-Reply-To: <404396ef0512181513x78a7eb7dw543e520b49a94630@mail.gmail.com> References: <43A5D55B.1010109@cs.york.ac.uk> <43A5D70B.8050504@cs.york.ac.uk> <404396ef0512181513x78a7eb7dw543e520b49a94630@mail.gmail.com> Message-ID: <404396ef0512181525w113310d5i6c17310185983c6d@mail.gmail.com> Hi Mike, On Linux, looking at the yhc-devel\src\packages\yhc-base-1.0\Data directory shows Ratio.hi, but not Ratio.hbc. All other modules have both .hi and .hbc. I would blame yhc-devel\src\packages\yhc-base-1.0\Makefile, but its disasterously complex, so I guess Tom will have to figure out whats wrong and patch it. Thanks Neil > On Windows it works fine. The library exists, but it maybe isn't being > made by your makefile? > > The source is at yhc-devel\src\packages\yhc-base-1.0\Data, and make > libraries or something should cause it get compiled and put in the > appropriate place. > > Thanks > > Neil > > > On 12/18/05, Mike Dodds wrote: > > Mike Dodds wrote: > > > ERROR: couldn't find module named 'Data/Ratio' > > > tried: > > > Data/Ratio.hbc > > > > > > /Users/mike/Compile/yhc-devel/inst/lib/yhc/packages/yhc-base/1.0/Data/Ratio.hbc > > > > > > > Just to clarify that a little bit, the file in question: > > > > /Users/mike/Compile/yhc-devel/inst/lib/yhc/packages/yhc-base/1.0/Data/Ratio.hbc > > > > ...really doesn't exist, which I suppose means it's a library bug. > > > > Mike. > > _______________________________________________ > > Yhc mailing list > > Yhc@haskell.org > > http://haskell.org/mailman/listinfo/yhc > > > From miked at cs.york.ac.uk Mon Dec 19 06:26:10 2005 From: miked at cs.york.ac.uk (Mike Dodds) Date: Mon Dec 19 06:27:20 2005 Subject: [Yhc] "Data/Ratio" yhi error on macos X In-Reply-To: <404396ef0512181525w113310d5i6c17310185983c6d@mail.gmail.com> References: <43A5D55B.1010109@cs.york.ac.uk> <43A5D70B.8050504@cs.york.ac.uk> <404396ef0512181513x78a7eb7dw543e520b49a94630@mail.gmail.com> <404396ef0512181525w113310d5i6c17310185983c6d@mail.gmail.com> Message-ID: <43A698D2.60503@cs.york.ac.uk> Neil Mitchell wrote: > On Linux, looking at the yhc-devel\src\packages\yhc-base-1.0\Data > directory shows Ratio.hi, but not Ratio.hbc. All other modules have > both .hi and .hbc. > > I would blame yhc-devel\src\packages\yhc-base-1.0\Makefile, but its > disasterously complex, so I guess Tom will have to figure out whats > wrong and patch it. > It turns out that the problem is that: ./bootstrap/packages/yhc-base/1.0/Data/Ratio.hbc needs to be copied to: ./inst/lib/yhc/packages/yhc-base/1.0/Data It can be fixed by hand for the moment, but ideally the makefile should do this. I can't work out how to fix it so Tom will have to do it. Mike. From Malcolm.Wallace at cs.york.ac.uk Mon Dec 19 06:33:31 2005 From: Malcolm.Wallace at cs.york.ac.uk (Malcolm.Wallace@cs.york.ac.uk) Date: Mon Dec 19 06:40:22 2005 Subject: [Yhc] darcs patch: copy Data.Ratio bytecode file when bootstrapping Message-ID: Mon Dec 19 11:32:04 GMT 2005 Malcolm.Wallace@cs.york.ac.uk * copy Data.Ratio bytecode file when bootstrapping -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 7236 bytes Desc: A darcs patch for your repository! Url : http://www.haskell.org//pipermail/yhc/attachments/20051219/b4d79946/attachment.bin From ndmitchell at gmail.com Mon Dec 19 12:37:46 2005 From: ndmitchell at gmail.com (Neil Mitchell) Date: Mon Dec 19 12:38:54 2005 Subject: [Yhc] Compiling In-Reply-To: <404396ef0512151056s2df96bata6ebc2dfc2b7a@mail.gmail.com> References: <404396ef0512151056s2df96bata6ebc2dfc2b7a@mail.gmail.com> Message-ID: <404396ef0512190937k4fe46b6dx6ac3f878df4fabcd@mail.gmail.com> Hi, Attached is a patch for the not running configure problem. If they user hasn't run configure, then typing "make" gives: Makefile:1: Makefile.inc: No such file or directory Makefile:9: *** Please run configure first. Stop. I have no idea if this will break everything horribly :) Thanks Neil On 12/15/05, Neil Mitchell wrote: > Hi, > > I'm relatively new to Linux (I avoid it like the plague), so I tried > building Yhc on Linux. > > The first thing I did was darcs get, all nice and easy, if not > particularly fast. > > Next thing I did was type make, and got a strange error message. A few > minutes later I realised that the reason is because configure has not > been run. Is it possible to detect this case, and ideally just run > configure for the user, or at the very least give a helpful and > friendly message telling them exactly what they need to do? > > I was very impressed that yhc and yhi both built nice and easily, > although the YHC_BASE_PATH issue threw up its head, and since I have > no idea how to set an environment variable, at that point I have to > give up. Sensible defaults would be really nice. It should also be > documented somewhere on the wiki. > > Thanks > > Neil > -------------- next part -------------- A non-text attachment was scrubbed... Name: makefile.patch.gz Type: application/x-gzip Size: 2799 bytes Desc: not available Url : http://www.haskell.org//pipermail/yhc/attachments/20051219/e2876386/makefile.patch-0001.bin From jupdike at gmail.com Wed Dec 21 12:59:24 2005 From: jupdike at gmail.com (Jared Updike) Date: Wed Dec 21 13:00:24 2005 Subject: [Yhc] YHC build finished successfully, but install is not "fairly trivial" Message-ID: <8b108f950512210959x2f245416s187c69a120f5c6de@mail.gmail.com> Hello all, I just 'darcs got' the sources and compiled YHC on Linux (Ubuntu) last night. I got it to compile just fine with 'make' but on the install side of things I ran into a number of problems. I read on the wiki (YHC/Building) that > There currently isn't a 'make install', but it is fairly trivial: simply copy the contents of the > 'inst' directory into where everything should be installed. I didn't find this to be the case. I copied the 'inst' folder to '/usr/lib/yhc', but then (1) I had to set up an environment variable YHC_BASE_PATH to point there, (2) I had to symlink 'yhi' and 'yhc' to '/usr/bin'. That really wasn't that big of a deal. I ran YHC on a test Haskell script, called Main.hs: > module Main (main) where > > fac 0 = 1 > fac n | n > 0 = n * fac (n-1) > > main = print $ fac 30 and it succeeds. But, trying to run the .hbc file with yhi fails: -------- ERROR: couldn't find module named 'Data/Ratio' tried: Data/Ratio.hbc /usr/lib/yhc/lib/yhc/packages/yhc-base/1.0/Data/Ratio.hbc -------- In that directory, there exist a bunch of .hbc and .hi file pairs (Char, Array, List, Ix, Complex, Maybe, PackedString, _CharNumeric) , AND Ratio.hi, but no Ratio.hbc ..., (incidentally, /usr/lib/yhc/lib/yhc/packages/haskell98/1.0/Ratio.hbc DOES exist...) The question is, why does running my factorial program trigger a Data.Ratio error? I think it's an installation problem, and it's probably related to the fact that... ... I can't really get most of the test suite to run. (Here is a link to the error output stream of runtests.py: http://www.updike.org/~jared/here/err.txt (164kB)) This is not "fairly trivial", this is disheartening. What am I missing? I will update the wiki when I get it working, if I can get some help with the path and directory scheme, environment variables, and other black magic. Jared. P.S. I am still really excited about YHC! -- jupdike@gmail.com http://www.updike.org/~jared/ reverse ")-:" From jupdike at gmail.com Wed Dec 21 15:24:26 2005 From: jupdike at gmail.com (Jared Updike) Date: Wed Dec 21 15:25:26 2005 Subject: [Yhc] Re: YHC build finished successfully, but install is not "fairly trivial" In-Reply-To: <8b108f950512210959x2f245416s187c69a120f5c6de@mail.gmail.com> References: <8b108f950512210959x2f245416s187c69a120f5c6de@mail.gmail.com> Message-ID: <8b108f950512211224u7bb3af6ckd6abbd3ac5739c36@mail.gmail.com> I went over the archive at http://www.haskell.org/pipermail/yhc/2005-December.txt (for some reason my message didn't copy itself and I'm hoping yhc@haskell.org sends this to me correctly so sorry if this message is not really asking a question) and found the solution. It was as simply as copying src/yhc/bootstrap/packages/yhc-base/1.0/Data/Ratio.hbc to /usr/lib/yhc/lib/yhc/packages/yhc-base/1.0/Data/ I imagine this all has to do with the way that yhi loads more than just the Prelude before interpreting the hbc file? My guess is that YHI has two modes and that by default it is running in "hierarchical library mode" which is a superset of haskell-98 (but uses a different package), which means it includes more than just the Prelude to do any normal task? That also explains why yhc/lib/yhc/packages has yhc-base/ and haskell98/ with what looks like similar files with different file hierarchy (i.e h98 = flat, yhc-core = hierarchical). Cheers, Jared. On 12/21/05, Jared Updike wrote: > Hello all, > > I just 'darcs got' the sources and compiled YHC on Linux (Ubuntu) last > night. I got it to compile just fine with 'make' but on the install > side of things I ran into a number of problems. > > I read on the wiki (YHC/Building) that > > > There currently isn't a 'make install', but it is fairly trivial: simply copy the contents of the > > 'inst' directory into where everything should be installed. > > I didn't find this to be the case. I copied the 'inst' folder to > '/usr/lib/yhc', but then (1) I had to set up an environment variable > YHC_BASE_PATH to point there, (2) I had to symlink 'yhi' and 'yhc' to > '/usr/bin'. > > That really wasn't that big of a deal. I ran YHC on a test Haskell > script, called Main.hs: > > > module Main (main) where > > > > fac 0 = 1 > > fac n | n > 0 = n * fac (n-1) > > > > main = print $ fac 30 > > and it succeeds. But, trying to run the .hbc file with yhi fails: > -------- > ERROR: couldn't find module named 'Data/Ratio' > tried: > Data/Ratio.hbc > /usr/lib/yhc/lib/yhc/packages/yhc-base/1.0/Data/Ratio.hbc > -------- > In that directory, there exist a bunch of .hbc and .hi file pairs > (Char, Array, List, Ix, Complex, Maybe, PackedString, _CharNumeric) , > AND Ratio.hi, but no Ratio.hbc ..., > (incidentally, /usr/lib/yhc/lib/yhc/packages/haskell98/1.0/Ratio.hbc > DOES exist...) > > The question is, why does running my factorial program trigger a > Data.Ratio error? I think it's an installation problem, and it's > probably related to the fact that... > > ... I can't really get most of the test suite to run. (Here is a link > to the error output stream of runtests.py: > http://www.updike.org/~jared/here/err.txt (164kB)) > > This is not "fairly trivial", this is disheartening. What am I > missing? I will update the wiki when I get it working, if I can get > some help with the path and directory scheme, environment variables, > and other black magic. > > Jared. > > P.S. I am still really excited about YHC! > > -- > jupdike@gmail.com > http://www.updike.org/~jared/ > reverse ")-:" > -- jupdike@gmail.com http://www.updike.org/~jared/ reverse ")-:" From ndmitchell at gmail.com Thu Dec 22 08:12:57 2005 From: ndmitchell at gmail.com (Neil Mitchell) Date: Thu Dec 22 08:13:56 2005 Subject: [Yhc] YHC build finished successfully, but install is not "fairly trivial" In-Reply-To: <8b108f950512210959x2f245416s187c69a120f5c6de@mail.gmail.com> References: <8b108f950512210959x2f245416s187c69a120f5c6de@mail.gmail.com> Message-ID: <404396ef0512220512v7f174d6flbfdd13ad21408be1@mail.gmail.com> Hi Jared, > (1) I had to set up an environment variable > YHC_BASE_PATH to point there Yes, YHC_BASE_PATH is an ugly wart in the YHC compiler, we're going to do some work to try and remove it, or at least make it required less often. Ideally it should "guess" where your base path is, and YHC_BASE_PATH should only be for people who want to put it somewhere weird. YHC_BASE_PACKAGE should point at the inst directory. Its used so the compiler and runtime can find the Haskell packages. > The question is, why does running my factorial program trigger a > Data.Ratio error? Because you used numbers, that requires Data.Ratio. If your program had been putStrLn "hello world" then this wouldn't have happened. Its unfortunate that particular .hbc file is not copied by the makefile - thats a bug in the makefile! For now just manually copy the Ratio.hbc over. > ... I can't really get most of the test suite to run. (Here is a link > to the error output stream of runtests.py: > http://www.updike.org/~jared/here/err.txt (164kB)) The python script is now depreciated, in src/tester there is a new Haskell testing script. No one has yet run it from Unix, but its built on Windows. Your test report isn't that bad - the latest windows version gives this: http://www-users.cs.york.ac.uk/~ndm/yhc/report.html - you can see there are still quite a lot of failures. Most of those problems are pretty trivial - missing modules and other small things. We will probably have a good go at reducing the regression test errors to 0 in January sometime. btw, your emails both sent to the list successfully. With regards to your comments about flat vs heirarchical: The original flat module space is defined in the Haskell 98 report, and used by lots of Haskell programs. Since that time, Heirarchical modules were introduced which include lots of additional functionality. yhc-base is the standard modules for Yhc, and these do most of the work. The flat module structure is retained for compatability with programs using the Haskell98 module structure, most of these just import the appropriate heirarchical module and re-export stuff. > P.S. I am still really excited about YHC! Good :) I hope we can get you through these little glitches! If you have anymore questions just send an email off to us. Thanks Neil From jupdike at gmail.com Thu Dec 22 11:39:24 2005 From: jupdike at gmail.com (Jared Updike) Date: Thu Dec 22 11:40:22 2005 Subject: [Yhc] YHC build finished successfully, but install is not "fairly trivial" In-Reply-To: <404396ef0512220512v7f174d6flbfdd13ad21408be1@mail.gmail.com> References: <8b108f950512210959x2f245416s187c69a120f5c6de@mail.gmail.com> <404396ef0512220512v7f174d6flbfdd13ad21408be1@mail.gmail.com> Message-ID: <8b108f950512220839q2b3a1184t7341ce25bf537afd@mail.gmail.com> Great. Thanks for the response. I'm able to run programs with yhi now! Maybe I can help with testing on Unix (Linux), plus I have a Windows machine and MS VS so I will try compiling on Windows for good measure. BTW I added some notes to the YHC/Building wiki about YHC_BASE_PATH, copying Data/Ratio.hbc, and how things are in flux. Crazy Idea: ----------------- I have a slightly ambitious idea but I think it could really rock. I haven't worked through all the subtleties yet, but basically I would love to see Haskell deployable in //the most// widely portable platform ever: the browser. My crazy idea: port the YHC runtime to JavaScript! It's so crazy it just might work. I figure if people ported it to Python and Java, why not go for the gold and get it deployable on any machine! The truth is, I was thinking about how to compile Haskell to JavaScript for the last few weeks, and I was sort of intimidated at the idea of even starting hacking the GHC RTS or writing a GHC backend... but then I heard about YHC, and how it compiles to a clean, small bytecode with a carefully separated VM/RTS and now it's actually a possibility. It makes really small binaries (.HBC), it looks like: hundreds of bytes, in the size range of Python .PYC files. These could //definitely// be embedded into a webpage. I would really love to be able to write dynamic webpages in Haskell (totally natively, i.e. no combinator library or special embedded language, but in actual Haskell 98!), or be able to run a Haskell interpreter in a web browser for people to play with (e.g. on Haskell.org), to make the best interactive learning tool / tutorial---all without the website visitor having to download anything or even think about that! Cheers, Jared. -- jupdike@gmail.com http://www.updike.org/~jared/ reverse ")-:" From ndmitchell at gmail.com Thu Dec 22 13:17:05 2005 From: ndmitchell at gmail.com (Neil Mitchell) Date: Thu Dec 22 13:18:03 2005 Subject: [Yhc] YHC build finished successfully, but install is not "fairly trivial" In-Reply-To: <8b108f950512220839q2b3a1184t7341ce25bf537afd@mail.gmail.com> References: <8b108f950512210959x2f245416s187c69a120f5c6de@mail.gmail.com> <404396ef0512220512v7f174d6flbfdd13ad21408be1@mail.gmail.com> <8b108f950512220839q2b3a1184t7341ce25bf537afd@mail.gmail.com> Message-ID: <404396ef0512221017j3893e0fbqadf9e80a56e38c0e@mail.gmail.com> Hi Jared, > BTW I added some notes to the YHC/Building wiki about YHC_BASE_PATH, > copying Data/Ratio.hbc, and how things are in flux. Thanks! > Crazy Idea: > ----------------- > I have a slightly ambitious idea but I think it could really rock. I > haven't worked through all the subtleties yet, but basically I would > love to see Haskell deployable in //the most// widely portable > platform ever: the browser. My crazy idea: port the YHC runtime to > JavaScript! It's so crazy it just might work. I figure if people > ported it to Python and Java, why not go for the gold and get it > deployable on any machine! > > The truth is, I was thinking about how to compile Haskell to > JavaScript for the last few weeks, and I was sort of intimidated at > the idea of even starting hacking the GHC RTS or writing a GHC > backend... but then I heard about YHC, and how it compiles to a clean, > small bytecode with a carefully separated VM/RTS and now it's actually > a possibility. It makes really small binaries (.HBC), it looks like: > hundreds of bytes, in the size range of Python .PYC files. These could > //definitely// be embedded into a webpage. > > I would really love to be able to write dynamic webpages in Haskell > (totally natively, i.e. no combinator library or special embedded > language, but in actual Haskell 98!), or be able to run a Haskell > interpreter in a web browser for people to play with (e.g. on > Haskell.org), to make the best interactive learning tool / > tutorial---all without the website visitor having to download anything > or even think about that! Thats a cool idea! Also, because Yhc is written in Haskell and can be compiled to an HBC file, you could even run the compiler in the browser (although probably quite slowly). There is an interpreter being written in Python, and there is one written in Java, so they would probably be a better starting point than the C runtime. The Java one is on the web (http://www.brianweb.net/personal/blog/entry.php?id=18), but the python one is still in development. Documentation on various stuff is available at: http://www.haskell.org/hawiki/Yhc_2fRTS http://www-users.cs.york.ac.uk/~ndm/yhc/bytecodes.html You would probably want to write a hbc -> Javascript convertor in a language that wasn't Javascript, probably in Haskell. I recommend using: http://www.haskell.org//pipermail/yhc/2005-November/000004.html Then write a Javascript interpeter for the instructions. Thanks, and good luck - just ask any further questions. Neil From jupdike at gmail.com Thu Dec 22 14:09:02 2005 From: jupdike at gmail.com (Jared Updike) Date: Thu Dec 22 14:09:59 2005 Subject: [Yhc] YHC build finished successfully, but install is not "fairly trivial" In-Reply-To: <404396ef0512221017j3893e0fbqadf9e80a56e38c0e@mail.gmail.com> References: <8b108f950512210959x2f245416s187c69a120f5c6de@mail.gmail.com> <404396ef0512220512v7f174d6flbfdd13ad21408be1@mail.gmail.com> <8b108f950512220839q2b3a1184t7341ce25bf537afd@mail.gmail.com> <404396ef0512221017j3893e0fbqadf9e80a56e38c0e@mail.gmail.com> Message-ID: <8b108f950512221109k6d77f7bfie35b766184c23a2@mail.gmail.com> > Thats a cool idea! Also, because Yhc is written in Haskell and can be > compiled to an HBC file This is a *huge* plus! That is so wicked cool. Ha! I'm giddy! > you could even run the compiler in the > browser (although probably quite slowly). I was thinking that too, especially for teaching Haskell (online, interactive, no downloading anything!) > There is an interpreter being written in Python, and there is one > written in Java, so they would probably be a better starting point > than the C runtime. The Java one is on the web > (http://www.brianweb.net/personal/blog/entry.php?id=18), but the > python one is still in development. Do you know who is working on the Python interpreter? I could get in touch with them. I think Python is the most similar to JavaScript anyway (dynamic typing, everything an object). Plus I'm a lot more fluent in Python than Java (and of course I enjoy it more). But I bet both will help. > Documentation on various stuff is available at: > http://www.haskell.org/hawiki/Yhc_2fRTS > http://www-users.cs.york.ac.uk/~ndm/yhc/bytecodes.html Thanks for the refs! > You would probably want to write a hbc -> Javascript convertor I also thought this would be a good idea. Ultimately you want a program that takes an hbc file and gives you an HTML file that you plop on the web and just use (pointing to or embedding the RTS JavaScript core for you.) > in a language that wasn't Javascript Also smart. > probably in Haskell. Oh, that's a good idea, hadn't thought of that ;-) > I recommend > using: http://www.haskell.org//pipermail/yhc/2005-November/000004.html Definitely a great place to get started. Plus any improvements on my end can go back into this API. :-) > Then write a Javascript interpeter for the instructions. This is the hard part (I don't know anything about JavaScipt IDEs but I suspect debugging will be ... interesting). Maybe that's a good place to start out... looking for a good IDE for JavaScript. I wonder if Visual J# is a reasonable choice (already installed on my system) or is this a dangerous place to go... > Thanks, and good luck - just ask any further questions. Great. I probably will. Hopefully soon. Merry Christmas and Happy New Year, and thanks again for everything! Jared. -- jupdike@gmail.com http://www.updike.org/~jared/ reverse ")-:" From ndmitchell at gmail.com Thu Dec 22 15:25:18 2005 From: ndmitchell at gmail.com (Neil Mitchell) Date: Thu Dec 22 15:26:15 2005 Subject: [Yhc] YHC build finished successfully, but install is not "fairly trivial" In-Reply-To: <8b108f950512221109k6d77f7bfie35b766184c23a2@mail.gmail.com> References: <8b108f950512210959x2f245416s187c69a120f5c6de@mail.gmail.com> <404396ef0512220512v7f174d6flbfdd13ad21408be1@mail.gmail.com> <8b108f950512220839q2b3a1184t7341ce25bf537afd@mail.gmail.com> <404396ef0512221017j3893e0fbqadf9e80a56e38c0e@mail.gmail.com> <8b108f950512221109k6d77f7bfie35b766184c23a2@mail.gmail.com> Message-ID: <404396ef0512221225x6e4463e2t467619e818835022@mail.gmail.com> Hi Jared, > > There is an interpreter being written in Python, and there is one > > written in Java, so they would probably be a better starting point > > than the C runtime. The Java one is on the web > > (http://www.brianweb.net/personal/blog/entry.php?id=18), but the > > python one is still in development. > > Do you know who is working on the Python interpreter? I could get in > touch with them. I think Python is the most similar to JavaScript > anyway (dynamic typing, everything an object). Plus I'm a lot more > fluent in Python than Java (and of course I enjoy it more). But I bet > both will help. The person working on the Python one is Andrew Wilkinson, http://www-users.cs.york.ac.uk/~aw/ - he'll certainly have his python version in the darcs after new years, but if you email him he might be able to give you what he's got so far. > > You would probably want to write a hbc -> Javascript convertor > > I also thought this would be a good idea. Ultimately you want a > program that takes an hbc file and gives you an HTML file that you > plop on the web and just use (pointing to or embedding the RTS > JavaScript core for you.) Since Haskell compiles to modules, and each module is a separate .hbc file, you might want to have a single .js for each module and then an HTML file that just does