Hi folks,
I just installed the May 2006 release of Hugs. When I use the
command-line version, the '$$' symbol to reference the last expression
works fine. It does not work in WinHugs, but yields 'ERROR - Syntax
error in expression (unexpected symbol $$)'. I typed ':set' to verify
the '-r$$'
Hi all,
Anybody know of some good Haskell libraries providing:
an SMTP client,
an HTTP client,
or a Telnet client?
There's a significant amount to these protocols, over and above the
socket layer.
Thanks,
Lyle Kopnicky
___
Haskell-Cafe
Hi folks,
I'm working on a project for which the solution is highly
parallelizable. I've been writing it so far for GHC as a single-threaded
app. I'd like to be able to split the job into multiple pieces, and
spawn different system threads for each piece, so they will run on
separate CPUs.
Hi folks,
I wrote a program that uses some of the Data.ByteString libraries. I'm
using GHC 6.4.1 and FPS 0.7.
The program compiles and works just fine. But when I try to profile it,
by compiling with -prof, I get:
Failed to load interface for `Data.ByteString.Lazy':
Could not
Donald Bruce Stewart wrote:
Probably you didn't build fps with profiling as well? You can rebuild
fps with:
runhaskell Setup.hs configure -p
as the first step.
-- Don
Thanks, I'll try it. Does that mean when I want to optimize my program,
I'll need to rebuild fps without profiling?
Donald Bruce Stewart wrote:
You're cabal version is too old then. Try updating either Cabal or GHC.
-- Don
It's the latest version (6.4.1) packaged for Ubuntu. I'll have to
download and install a newer version manually. Unfortunately, the
download site seems to be down again :(
Hi folks,
I'm competing in a contest at work, and we're allowed to use whatever
language we want. I decided this was my chance to prove to people that
Haskell was up to the challenge. Unfortunately, I ran into performance
problems. Since the contest ends this Friday, I've decided to switch to
Hi folks,
I am running GHC 6.4.1 on my Linux box at work, which is the latest
packaged version for Ubuntu Dapper Drake. (They have a 6.4.2 package for
Edgy, but I don't know how to install that. The Synaptic Package Manager
seems to only want to install packages specifically labeled for
Lemmih wrote:
Do you have some test input online?
I've attached some (very short) input files. Sorry I can't provide more
- they're proprietary databases. I know that means you can't actually
test the performance, but can only give me advice. At least you can run
the program on them, and
Robert Dockins wrote:
Humm... well, double nested loops seems like the wrong approach.
It may be. I had hoped it would be fast enough that way.
Also, if you
are using GHC, it's hashtable implementation has farily well-known
performance problems. If all you care about is exact matching, then
Bertram Felgenhauer wrote:
Lyle Kopnicky wrote:
[snip]
listRecords :: AbsString s = TextTable s - IO [TextRecord s]
listRecords (TextTable fields _ records) = do
keyRecs - HT.toList records
return $ map (fromList . zip fields . elems . snd) keyRecs
Doing
Hi folks,
It turns out Haskell is vindicated. It's my algorithm that was slow. As
Robert Dockins pointed out, the double nested loop is just going to take
a long time.
As evidence, it turns out my C++ version is just as slow as the Haskell
version.
So, I'm going to go back to Haskell, but
Ketil Malde wrote:
Do you really need that to search for movie titles? At any rate, an
exact-match finite-map implementation is a good start - to get good
performance, you probably will need to use some kind of index to
reduce the amount of data to search exhaustively (all-against-all).
For
Max Vasin wrote:
Lyle I have no idea how it decides where to go. Right now ghc
Lyle 6.4.1 is in /usr/local/bin/ghc. After I 'make install', will it
Lyle be ghc 6.5? I don't want to screw up the installed package so it
Lyle can't be updated later.
It should be :-)
It should be screwed up? Or
Hi folks,
I tried to build edison-1.2.0.1-sources with the command 'make system'
but got:
*** Exception: Line 10: Unknown field 'hs-source-dirs'
I am using GHC 6.4.1. Any idea how to fix this?
Thanks,
Lyle
___
Haskell-Cafe mailing list
Robert Dockins wrote:
On Tuesday 03 October 2006 22:00, Lyle Kopnicky wrote:
Hi folks,
I tried to build edison-1.2.0.1-sources with the command 'make system'
but got:
*** Exception: Line 10: Unknown field 'hs-source-dirs'
I am using GHC 6.4.1. Any idea how to fix
Robert Dockins wrote:
On Tuesday 03 October 2006 22:58, Lyle Kopnicky wrote:
Robert Dockins wrote:
On Tuesday 03 October 2006 22:00, Lyle Kopnicky wrote:
Hi folks,
I tried to build edison-1.2.0.1-sources with the command 'make system'
but got
Robert Dockins wrote:
On Wednesday 04 October 2006 16:16, Lyle Kopnicky wrote:
Robert Dockins wrote:
Whats the output of
ghc-pkg -l
?
[EMAIL PROTECTED]:~$ ghc-pkg -l
/usr/local/lib/ghc-6.5.20060924/package.conf:
Cabal-1.1.4, base-2.0, (ghc
Robert Dockins wrote:
On Thursday 05 October 2006 16:51, Lyle Kopnicky wrote:
Robert Dockins wrote:
mtl is the Monad Transformer Library. It's a part of the standard libraries
in 6.4.x. There's been a good deal of chatter recently about reducing the
set of libraries
Hi folks,
I noticed that in Template Haskell, you can only have one level of
splicing or quasi-quoting. E.g., you can't write:
$(zipN ($(sel 2 3) (zip level,3,( ['a'..'Z'] [1..] (words now
is the time)
Because you can't have a splice inside a splice. But wouldn't it be
handy to use
The code below is using way more RAM than it should. It seems to only
take so long when I build the 'programs' list - the actual
reading/parsing is fast. For a 5MB input file, it's using 50MB of RAM!
Any idea how to combat this?
Thanks,
Lyle
{-# OPTIONS_GHC -fglasgow-exts #-}
--
Taral wrote:
On 12/11/06, Nia Rium [EMAIL PROTECTED] wrote:
In my humble opinion, in this context, GUI doesn't mean a library to
implement a GUI application. It rather means an interpreter/compiler
that
provides graphical interface.
Windows users can use Visual Haskell...
It's still in an
Hi folks,
I'm using Parsec to parse a stream of tokens. The token primitive takes,
among other arguments, a function to print tokens. However, this
function is not always applied. Try the code below:
-
import Text.ParserCombinators.Parsec
import
I figured it out, but it's not pretty. The problem is that the eof
parser had no awareness of the showTok function. To fix the problem, I
had to replace eof with its definition in terms of notFollowedBy, then
replace notFollowedBy with its definition in terms of try and
unexpected. Then, I
stefan kersten wrote:
hi,
what's the difference between the vector [1] and uvector [2] packages?
should one of those preferred over the other?
thanks,
sk
[1] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/vector-0.1
[2]
Don Stewart wrote:
Yes, we have long been discussing a generic Stream library to which
the various sequence structures can be translated to and from. Already
it is useful to say, stream bytestrings into uvectors and out to lists.
Isn't there already such a thing?
If I am running GHC on 64-bit Windows, do I have a choice of building a
32-bit or 64-bit app? On a cursory glance through the command-line options,
I didn't find anything.
- Lyle
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Hi folks,
I just installed GHC 6.10.4 on Ubuntu 9.04 32-bit, and then tried to install
the Haskell Platform from source. It built quite a bit of stuff, with many
warnings but no errors, and then finally died with the error below.
To install editline, I need cabal, which is of course why I
I mean editline, not readline.
On Fri, Sep 11, 2009 at 11:46 AM, Lyle Kopnicky li...@qseep.net wrote:
Hi folks,
I just installed GHC 6.10.4 on Ubuntu 9.04 32-bit, and then tried to
install the Haskell Platform from source. It built quite a bit of stuff,
with many warnings but no errors
On Fri, Sep 11, 2009 at 12:01 PM, Judah Jacobson
judah.jacob...@gmail.comwrote:
The above editline requirement is for the editline C library, not the
Haskell bindings:
http://www.thrysoee.dk/editline
My guess is that you need to install a recent version of the
libedit-dev package.
After
OK, I was able to build the Haskell Platform on Ubuntu 9.04 with GHC 6.10.4.
But when I try to install it, I get an error:
Registering haskell-platform-2009.2.0.2...
Reading package info from dist/inplace-pkg-config ... done.
Writing new package config file... done.
}...
install_pkg ${pkg}
cd ..
fi
On Fri, Sep 11, 2009 at 1:04 PM, Lyle Kopnicky li...@qseep.net wrote:
OK, I was able to build the Haskell Platform on Ubuntu 9.04 with GHC
6.10.4. But when I try to install it, I get an error:
Registering haskell-platform-2009.2.0.2...
Reading package info from
Hi folks,
I had some code using the oldtime package, and want to convert it to use the
time package.
One of the things I need to do is calculate the number of seconds since
midnight. The easy part is getting a TimeDiff result:
utc - getCurrentTime
tz - getCurrentTimeZone
let td =
are a bit hard to follow. Especially confusing is
the conversions. I'm thinking of making a multiparameter Coercible class,
with a coerce function, to help address that.
- Lyle
On Wed, Nov 12, 2008 at 9:43 AM, Philip Weaver [EMAIL PROTECTED]wrote:
2008/11/12 Lyle Kopnicky [EMAIL PROTECTED]
Hi
Hi folks,
I'm using System.IO.getLine to read input in my program. I've compiled it on
Windows Vista with ghc-6.10.1. I've noticed that if I press Ctrl+C while the
program is waiting for input, it will get stuck. No keypresses can get me
out of the program - I have to kill the shell. I've tried
secondsSinceMidnight = do
zonedTime - getZonedTime
return $ floor $ toRational $ timeOfDayToTime $ localTimeOfDay $
zonedTimeToLocalTime zonedTime
On Thu, Nov 13, 2008 at 2:29 AM, Jon Fairbairn
[EMAIL PROTECTED]wrote:
Lyle Kopnicky [EMAIL PROTECTED] writes:
I had some code using the oldtime
I'm trying to migrate code from using the old Text.Regex to the new
Text.Regex.Base. But, I'm getting type errors. I can't even create a regex.
Looking at the docs, it seems like this should print bcd:
import Data.Array
import Text.Regex.Base
import Text.Regex.Posix
rx = makeRegex a(.*)A
Just
:
Hello,
Does this help?
http://www.serpentine.com/blog/2007/02/27/a-haskell-regular-expression-tutorial/
j.
At Tue, 23 Dec 2008 11:21:41 -0800,
Lyle Kopnicky wrote:
[1 multipart/alternative (7bit)]
[1.1 text/plain; ISO-8859-1 (7bit)]
I'm trying to migrate code from using the old
daniel.is.fisc...@web.dewrote:
Am Dienstag, 23. Dezember 2008 21:09 schrieb Lyle Kopnicky:
Yes, sort of. It enables me to get some simple examples working with
(=~).
But I still don't know how to get makeRegex to work. You need it to
specify
options like case insensitivity, or to use functions
be something
like a two-liner...
A one-liner:
main = interact (show . length . lines)
- Lyle Kopnicky
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe
, but need only be done once the
program is ready for distribution.
If anyone knows of existing solutions in either of these areas, please
inform us.
- Lyle Kopnicky
Duncan Coutts wrote:
On Wed, 2004-05-05 at 16:24, Andrei de A. Formiga wrote:
I'm finding wxHaskell very nice
Henning Thielemann wrote:
On Wed, 11 Aug 2004, Lyle Kopnicky wrote:
Here's my version:
combs [] = []
combs [n] = [[i] | i - [0..n]]
combs (n:r) = let combsr = combs r in [i:cr | i - [0..n], cr - combsr]
Since there is one zero combination, it should be
combs [] = [[]]
Ah, yes. I
Even shorter:
c=mapM(\k-[0..k])
- Lyle
Fritz Ruehr wrote:
Well, as far as that goes, we can shave off a little bit (around 7%)
this way:
combs = mapM (\k-[0..k])
(As a bonus, it's even a bit more cryptic/symbolic, in the fine
tradition of APL one-liner character-shavings.)
But who's
Notwithstanding module Y, I don't think you should infer in module X
that g::Int (or, rather, Int-Int). Since f is defined in a type class,
it should be polymorphic, and so should g. When you apply g to a type,
it will check to see what instances are available, and match only if Int
is the
.
Simon
| -Original Message-
| From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Lyle
| Kopnicky
| Sent: 12 August 2004 20:23
| To: Haskell Cafe
| Subject: [Haskell-cafe] Hiding functions
|
| Hi all,
|
| I'm working on a program that uses my own brand of exceptions, and I
Alistair,
I'm throwing my own exceptions in my own monad, not the IO one. But
thanks for pointing me to the stuff about dynamic types. I'm going to
be creative and pick some new names.
- Lyle
Bayley, Alistair wrote:
What is wrong with creating your own catch and throw with different names?
' to take the arguments the other way around.
Unfortunately, it can't be partially applied.
Any ideas, or is it just not feasible to work this class into the library?
Thanks,
Lyle Kopnicky
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http
Shan wrote:
On 2004-08-31T09:55:10-0700, Lyle Kopnicky wrote:
Sorry, I don't think I made myself clear. I'm not defining PI, it's the
standard type binding operator, like lambda is the variable binding
operator. Maybe I could write it as 'II' so it looks more like a
capital pi. It's
I think there are so few such opportunities that it would not overwhelm
the list. I should also point out that you can post such openings at
http://www.haskell.org/jobs.html by sending an e-mail to
[EMAIL PROTECTED] and [EMAIL PROTECTED]
Regards,
Lyle
Jochen L. Leidner wrote:
Finally, would
Hi folks,
I'm getting ready to release a piece of software. Unfortunately due to a bug
in GHC 6.10 on Windows it does not handle Ctrl+C properly. Since the bug has
been fixed (thank you Simon Marlow), I figured I'd download a 6.11 build (I
grabbed the 2009-01-29 version).
Unfortunately, my
if there's something wrong with the package, or I don't have
something set up right to build it on Windows.
On Sat, Jan 31, 2009 at 10:13 PM, Antoine Latter aslat...@gmail.com wrote:
2009/1/31 Lyle Kopnicky li...@qseep.net:
Hi folks,
I'm getting ready to release a piece of software
or Cygwin to complete this build. Here you can
find instructions regarding MSYS (and also GLUT, but you can ignore that
part):
http://www.haskell.org/pipermail/haskell-cafe/2007-September/031535.html
All best
Christopher Skrzętnicki
2009/2/1 Lyle Kopnicky li...@qseep.net
I tried building
Looks like a lot of fun!
http://www.haskellchamber.com/page6.html
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Hi folks,
I've got an application to release. I'm releasing the source, but I also
wanted to release binary versions for people that don't have GHC. I
developed on Windows, so making a Windows executable was simple. I also have
access to an Ubuntu Linux box, on which I can easily build and test
Thanks folks for your replies.
I did learn, from your e-mails and from the cabal documentation (example 9
on page
http://www.haskell.org/cabal/release/cabal-latest/doc/users-guide/builders.htm),
how to build a tarball with an executable and LICENSE file, via cabal copy.
It would have been nice to
I am pleased to announce the initial release of Vintage BASIC, an
interpreter for microcomputer-era BASIC. Fully unit-tested, it faithfully
implements the common elements of the language. On the web site, you can
find 102 games from the classic book BASIC Computer Games, all of which run
Thanks, folks. I have decided for now just to release a tarball with an
executable and some docs, that can be expanded where the user deems
appropriate. I'll try a static link if people are having problems with it.
- Lyle
___
Haskell-Cafe mailing list
On Fri, Mar 13, 2009 at 1:31 AM, Wolfgang Jeltsch
jelt...@informatik.tu-cottbus.de wrote:
When running the executable, nothing happens. The executable should show a
usage message instead. Where are the BASIC programs? I think, you have to
grab them from the source. They should be installed,
I've posted a new version, 1.0.1, that has a usage message if you run it
with no arguments.
There is a package for Windows now (not just a binary) as well as Linux.
Both packages include documentation and example programs.
Thanks for pointing that out!
On Fri, Mar 13, 2009 at 1:31 AM, Wolfgang
Hi folks,
Since the time package is not included in ghc-6.10.2, I installed it via
cabal. Then I tried to configure my project, and it says that the dependency
is missing. Mysterious. Can anyone explain?
l...@lwk-desktop:~/devel/vintage-basic$ ghc-pkg list
Hi folks,
I'm having trouble reading the TemplateHaskell docs and trying to do
something that seems like it should be simple. In MetaML, there is a 'lift'
function which does exactly what I want to do. Here's an example function:
let double n = [| 2 * $( litE (integerL n) ) |]
This works as
OK, I figured it out.
The class is Language.Haskell.TH.Syntax.Lift. The function is
Language.Haskell.TH.Syntax.lift. And I can rewrite my function as:
let double n = [| 2 * n |]
I wish this were explained in the TemplateHaskell documentation.
- Lyle
On Tue, Apr 14, 2009 at 2:51 PM, Lyle
Hi folks,
In GHC 7.6.3, the base Data.HashTable is deprecated, so I installed the
hashtables package. In order to work on your datatype, you need an instance
of Data.Hashable.Hashable.
So I went to the Data.Hashable page and looked up examples on how to derive
a Hashable instance for my
Ah, thanks, folks!
I'll just implement my own hashing by generating a string and calling the
hash function on that. That's what I was doing in the old version of my
code, anyway.
It's just that in the core Data.HashTable, you had to provide a hash
function, so the point where I used the hash
I chose not to introduce another dependency. I just implemented the hash
function by delegating to the Show instance of the nested type:
data ValType = FloatType | IntType | StringType
deriving (Show,Eq)
data VarName = VarName ValType String
deriving (Show,Eq)
instance Hashable VarName
Here's another way to do it:
data ValType = FloatType | IntType | StringType
deriving (Show,Eq)
instance Hashable ValType where
hash FloatType = 0
hash IntType = 1
hash StringType = 2
data VarName = VarName ValType String
deriving (Show,Eq)
instance Hashable VarName where
66 matches
Mail list logo