Re: [Haskell-cafe] Re: [Haskell-beginners] Just how unsafe is unsafe

2009-02-06 Thread Alberto G. Corona
method and some others that I do not remember now. I would like to know if this is due to some general cause or if it is library specific. 2009/2/6 Roel van Dijk vandijk.r...@gmail.com On Fri, Feb 6, 2009 at 5:22 PM, Alberto G. Corona agocor...@gmail.com wrote: then Data.List.head

[Haskell-cafe] HDBC-ODBC, bindCol

2009-01-28 Thread G?uenther Schmidt
Hi John, I've just been going through the HDBC-ODBC code wondering if I could find the spot that needs changing so that Doubles work properly with MS-Access. Could you please tell me, if I understand this correctly? The bindCol function does not actually look at the particular value type,

[Haskell-cafe] bug in System.Mem.StableName

2009-01-26 Thread Alberto G. Corona
Sometimes the StableName library gives different values for the samr function: Sometines gives two alternate values. I checked it in ghc-6.10.1 under windows and in ghc-6.8.2 under Linux: This is an example Prelude System.Mem.StableName.hashStableName.System.IO.Unsafe.unsafePerformIO $

Fwd: [Haskell-cafe] Haskell Web Framework

2009-01-25 Thread Alberto G. Corona
Sorry, I forgot to forward it to the list: -- Forwarded message -- From: Alberto G. Corona agocor...@gmail.com Date: 2009/1/25 Subject: Re: [Haskell-cafe] Haskell Web Framework To: Donnie Jones don...@darthik.com hi, I´m working in a web application rather than a web framework

[Haskell-cafe] unboxed, functional ATS language beats C++

2009-01-24 Thread Alberto G. Corona
Language Shootout: ATS is the new top gunslinger. Beats C++http://shootout.alioth.debian.org/u64q/benchmark.php?test=alllang=all http://www.reddit.com/r/programming/comments/72hmw/language_shootout_ats_is_the_new_top_gunslinger/ ...Many people somehow think that ATS is fast because of its

Fwd: [Haskell-cafe] runghc Setup.hs doitall

2009-01-19 Thread Alberto G. Corona
...@worc.ox.ac.uk On Mon, 2009-01-19 at 01:36 +0100, Alberto G. Corona wrote: The problem with Windows can be solved once and for all when CygWIN will be considered for Windows instead of MinGW. Is that possible? The standard Windows build of GHC does not use Cygwin. So all the programs built with GHC

Re: [Haskell-cafe] runghc Setup.hs doitall

2009-01-19 Thread Alberto G. Corona
C:\Documents and Settings\Administratorcabal install plugins Resolving dependencies... cabal: dependencies conflict: ghc-6.10.1 requires Cabal ==1.6.0.1 however Cabal-1.6.0.1 was excluded because plugins-1.3.1 requires Cabal ==1.4.* 2009/1/19 Alberto G. Corona agocor...@gmail.com I finally

[Haskell-cafe] plugins can not be installed in ghc 6.10.1

2009-01-19 Thread Alberto G. Corona
Do really pluigins needs Cabal (=1.4 1.5) ??? C:\Documents and Settings\Administratorcabal install plugins Resolving dependencies... cabal: dependencies conflict: ghc-6.10.1 requires Cabal ==1.6.0.1 however Cabal-1.6.0.1 was excluded because plugins-1.3.1 requires Cabal ==1.4.*

Re: [Haskell-cafe] Factoring into type classes

2009-01-19 Thread Alberto G. Corona
This is one of the shortcomings of haskell not to mention other programming languages. Mathemathicist would find it very annoying. Instead of instance Monoid Integer where mappend = (+) mempty = 0 instance Monoid Integer where mappend = (*) mempty = 1 which is not legal and the

[Haskell-cafe] runghc Setup.hs doitall

2009-01-17 Thread Alberto G. Corona
Hi guys: I don´t know how difficult really is, but it seens that it could be done because all the necessary elements are there (except perhaps the mapping package name-hackage url): Why hasn´t been done yet Is unknown to me. It would be very useful and a big save of time to have a cabal commad

Re: [Haskell-cafe] Monads aren't evil? I think they are.

2009-01-14 Thread Alberto G. Corona
The question of imperative versus pure declarative coding has brought to my mind some may be off-topic speculations. (so please don´t read it if you have no time to waste): I´m interested in the misterious relation bentween mathematics, algoritms and reality (see

Re: [Haskell-cafe] Re: Monads aren't evil

2009-01-11 Thread Alberto G. Corona
As a physicist, I think that programming, like any design in general, is all about making as little use of brain resources as possible at the time of solving problems and to transmit the solution to others. This is the reason why it is pervasive in all kinds of engineering the concepts of

[Haskell-cafe] ANNOUNCE: Data.TCache 0.5.5

2009-01-09 Thread Alberto G. Corona
The main addition of this versión is the capablity to safely handle transact, and serialize to permanent storage many datatypes simultaneously in the same piece of code and incrementally. Just register each new datatype (with registerType :: Type). So it is not necessary to glue all types in

Re: [Haskell-cafe] Problems Installing Takusen with Sqlite Backend

2008-12-23 Thread GŸuenther Schmidt
Thanks Alistair, inspiration had stuck me meanwhile and that's exactly what I did. Günther Bayley, Alistair schrieb: From: haskell-cafe-boun...@haskell.org [mailto:haskell-cafe-boun...@haskell.org] On Behalf Of Günther Schmidt what does it take to install Takusen on Win32 with Sqlite

Re: [Haskell-cafe] Re: Threads with high CPU usage

2008-12-22 Thread GŸuenther Schmidt
John Goerzen schrieb: Günther Schmidt wrote: Hi, I am not yet 100% certain that the unsafe calls are indeed the cause of the problem, eventhough I strongly suspect there are. I can tell you more once I have managed to rewrite all unsafe calls into safe once, reinstall HDBC.Sqlite3 and

Re: [Haskell-cafe] Re: Threads with high CPU usage

2008-12-22 Thread GŸuenther Schmidt
Hi Duncan, are you saying then that the db-code is what's blocking the UI? Günther Duncan Coutts schrieb: On Mon, 2008-12-22 at 22:55 +0100, Günther Schmidt wrote: Hi, I put in on hpaste: http://hpaste.org/13264 slightly simplified Ok, that works fine when the action is

Fwd: Fwd: [Haskell-cafe] Haskell as a religion

2008-12-19 Thread Alberto G. Corona
-- Forwarded message -- From: Alberto G. Corona agocor...@gmail.com Date: 2008/12/19 Subject: Re: Fwd: [Haskell-cafe] Haskell as a religion To: Dan Piponi dpip...@gmail.com As far as I know, const only protect from updates that the compiler can detect at compilation time

Fwd: [Haskell-cafe] Haskell as a religion

2008-12-18 Thread Alberto G. Corona
But many features need other features. For example, the option to use referential transparency will be common in future languages for multicore programming purposes. This creates the problem of separating side-effect-free code from side-effect code. For this purpose, a strong type system at

[Haskell-cafe] problems configuring hs-plugins 1.3.1 in windows

2008-12-11 Thread Alberto G. Corona
I have problems compiling plugins 1.3.1 in windows at the configure phase configure: error C compiler cannot create executables I use ghc 6.8.2 I know that plugins is nor much tested under windows but I´m trying anyway. I think that this problem is very common also in Linux. I tried to find

[Haskell-cafe] Re: problems with hs-plugins load-eval (possible bug)

2008-12-11 Thread Alberto G. Corona
of the executable. I suppose that this is because the ghc library. 2008/12/9 Alberto G. Corona agocor...@gmail.com The duplicate definition error appears when I compile Main.hs and execute it. But when I run it with runghc the behaviour is different. It works well: runghc Main.hs 3 Any idea

[Haskell-cafe] Re: problems with hs-plugins load-eval (possible bug)

2008-12-09 Thread Alberto G. Corona
The duplicate definition error appears when I compile Main.hs and execute it. But when I run it with runghc the behaviour is different. It works well: runghc Main.hs 3 Any idea? is this a bug of hs-plugins? it is just something expected?? 2008/12/6 Alberto G. Corona [EMAIL PROTECTED] I have

[Haskell-cafe] Fwd: problems with hs-plugins load-eval

2008-12-06 Thread Alberto G. Corona
I have a web server which load server extensions. these extensions eval-uate configuration files that contains code (user-editable workflow descriptions). The problem is that I need common definitions for the extensions and for the configurration files. This is not permitted by ha-plugins. The

Re: [Haskell-cafe] implementing python-style dictionary in Haskell

2008-11-18 Thread Alberto G. Corona
this to haskell-cafe again. Alberto G. Corona wrote: Not so much memory, because data is referentially transparent, the new Map can point to whole subtrees of the old map that stay the same. is similar than when a new list is created by prefixing a new element from a old list ys= x:xs. ys

Fwd: [Haskell-cafe] implementing python-style dictionary in Haskell

2008-11-18 Thread Alberto G. Corona
sorry, Dons, -- Forwarded message -- From: Alberto G. Corona [EMAIL PROTECTED] Date: 2008/11/18 Subject: Re: [Haskell-cafe] implementing python-style dictionary in Haskell To: Don Stewart [EMAIL PROTECTED] By the way byteStrings are wonderful, but, it isn´t true

[Haskell-cafe] abstract extensible types?

2008-11-12 Thread Alberto G. Corona
Is there any abstract container that permits the addition of new types of data? I know how to simulate the extension of Algebraic datatypes, but this does not permit the addition of data with new types in the same container and recover them in a type-safe way. Did I reinvent the Weel? I found

[Haskell-cafe] announce: Workflow-0.1

2008-11-11 Thread Alberto G. Corona
of type (a- m a) usually m=IO f x =\x'- g x' = \x''-... z by prefixing the user with the method step: step f x = \x'- step g x' = \x''-... This means that a workflow can be described with the familiar do notation. In principle, there is no other limitation on the syntax but the restriction (a - m

Re: [Haskell-cafe] pure programs

2008-11-05 Thread Alberto G. Corona
A performance improvement could be the caching of responses based on computation costs and number of accesses. This functionality can be implemented a general module that may be used to wrap any pure program if needed. This is something that only pure programs can ever do. And the haskell type

Fwd: [Haskell-cafe] Re: [Haskell] ANNOUNCE: RefSerialize-0.2.1

2008-11-03 Thread Alberto G. Corona
I forgot to cc to haskell-cafe: -- Forwarded message -- From: Alberto G. Corona [EMAIL PROTECTED] Date: 2008/11/2 Subject: Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: RefSerialize-0.2.1 To: Bulat Ziganshin [EMAIL PROTECTED] * SerTH is a binary serialization library for Haskell

[Haskell-cafe] Re: [Haskell] ANNOUNCE: RefSerialize-0.2.1

2008-11-03 Thread Alberto G. Corona
actualized to 0.2.3 due to some errors in the cabal description. Sorry, some needed module was not exported. 2008/11/2 Alberto G. Corona [EMAIL PROTECTED] I uploadad RefSerializehttp://hackage.haskell.org/cgi-bin/hackage-scripts/package/RefSerialize to Hackage . Read, Show

[Haskell-cafe] huge single file syncronization

2008-11-03 Thread Alberto G. Corona
I need to backup my ubuntu-VMWare image frequently (5 GBits) . I need to know if exist such a utility (in haskell or not) for single file syncronization. I don´t want to reinvent te weel, but I think that it is a few lines of Haskell using the Diff package or something similar.

[Haskell-cafe] Re: [Haskell] ANNOUNCE: RefSerialize-0.2.1

2008-11-02 Thread Alberto G. Corona
I uploadad RefSerializehttp://hackage.haskell.org/cgi-bin/hackage-scripts/package/RefSerialize to Hackage . Read, Show and Data.Binary do not check for repeated references to the same data address. As a result, the data is serialized multiple times when serialized. This is a waste of space in

[Haskell-cafe] number of references to a variable

2008-11-01 Thread Alberto G. Corona
Is there a way to know the number of memory references for a variable?. The runtime must know it but i do not know if this available for the program trough any low level trick Thanks ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Fwd: [Haskell-cafe] ANNOUNCE: Data.TCache 0.5.1

2008-10-29 Thread Alberto G. Corona
-- Forwarded message -- From: Alberto G. Corona [EMAIL PROTECTED] Date: 2008/10/29 Subject: Re: [Haskell-cafe] ANNOUNCE: Data.TCache 0.5.1 To: Joachim Breitner [EMAIL PROTECTED] I developed it in 2006. At this time I think that Happs did not used STM. I do not know Happs.State

[Haskell-cafe] ANNOUNCE: Data.TCache 0.5.1

2008-10-28 Thread Alberto G. Corona
I uploaded TCache to hackage.org. Data.Tcache is a transactional cache with configurable persistence. It tries to simulate Hibernate for Java or Rails for Ruby. The main difference is that transactions are done in memory trough STM. There are transactional cache implementations for some J2EE

[Haskell-cafe] duplicate instance declarations. Why?

2008-10-24 Thread Alberto G. Corona
with: {-# OPTIONS -fglasgow-exts -fallow-undecidable-instances #-} class A a class R a class S a instance R a = A a instance S a = A a -- GHC gives *Duplicate instance declarations* * instance R a = A a * * instance S a = A a * ** *Why?*

Re: [Haskell-cafe] Fwd: enhancing type classes with properties

2008-10-23 Thread Alberto G. Corona
-time) instantiate a new class as Num and how to test the axioms for the new class. All of then is something like a sophisticated assert mechanism, but , I think, much more flexible and elegant. 2008/10/22 Alberto G. Corona [EMAIL PROTECTED] I guess that the namespace thing is not necesary. Maybe

Re: [Haskell-cafe] Fwd: enhancing type classes with properties

2008-10-23 Thread Alberto G. Corona
Also in my weblog: http://haskell-web.blogspot.com/2008/10/axioms-properties-for-haskell-classes.html 2008/10/23 Alberto G. Corona [EMAIL PROTECTED] It seems that some of the goals are not so hard. here I publised my progress. http://docs.google.com/Doc?id=dd5rm7qq_165rshp74gfpli=1 I show

[Haskell-cafe] Fwd: enhancing type classes with properties

2008-10-22 Thread Alberto G. Corona
I´m just thinking aloud, but, because incorporating deeper mathematics concepts has proven to be the best solution for better and more flexible programming languages with fewer errors, I wonder if raising the type classes incorporating axioms can solve additional problems. At first sight it does:

[Haskell-cafe] Re: Haskell-Cafe Digest, Vol 46, Issue 118

2008-10-16 Thread Alberto G. Corona
Personally, I'm loving the whole concept of this puppy: GHC.Prim.*reallyUnsafePtrEquality# I have absolutely no idea what it does, but it must be something really unsafe! ;-)i I really need reallyUnsafePtrEquality# ! . I need it in inside GHC.Exts if GHC.Prim is being removed. Please!..

[Haskell-cafe] Existential Data Types

2008-07-04 Thread Richard G.
Hello I've been doing some stuff with existential data types and came across a curious pattern. If anyone has thoughts, comments, or feedback, it would be appreciated. --- I'm trying to port and extend the Be messaging scheme to Haskell for use in distributed, heterogenous environments.

[Haskell-cafe] Re: Haskell custom search engine

2006-11-15 Thread Alberto G. Corona
By the way, Ihave developped the coreof asearch engine completely in Haskell. It can index arbitrary objects (including files, of course) has definitions for filters, with predefined filters for plain text, HTML/XML and ageneral filter for Haskell data types It has basic search capabilities: it

[Haskell-cafe] Newbie: safe program termination in Windows

2006-06-12 Thread Alberto G. Corona
Hi, I have a program that handle cached data. I don´t find the way to store the data when the program is killed by other program. There is nothing similar to signal in the Windows implementation and no exception appears to trigger when the program is killed by a service handler or by the Task

[Haskell-cafe] transactional cache

2006-05-16 Thread Alberto G. Corona
To: Alberto G. Corona [EMAIL PROTECTED] Cc: haskell-cafe@haskell.org Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO-8859-1; format=flowed On 5/13/06, Alberto G. Corona [EMAIL PROTECTED] wrote: notglobal = newIORef True main = do a - notglobal b - notglobal Thanks

[Haskell-cafe] RE: transactional cache

2006-05-12 Thread Alberto G. Corona
] Content-Type: text/plain; charset=us-ascii Alberto G. Corona [EMAIL PROTECTED] writes: stmcache= newTVar 0 I will explain what this doesn't with an analogy. import Data.IORef notglobal = newIORef True main = do a - notglobal b - notglobal writeIORef a False x

[Haskell-cafe] Re: Haskell-Cafe Digest, Vol 33, Issue 9

2006-05-11 Thread Alberto G. Corona
Hi, I´m trying to make a searchable transactional cache using STM. The whole idea is to use indexed TVar variables using a FiniteMap. another TVar holds the finitemap . This last TVar has to be a global variable. I found that when handled as global, a TVar does not keep the state. For example:

RE: [Haskell-cafe] Type classes

2006-03-20 Thread Geest, G. van den
Title: RE: [Haskell-cafe] Type classes I suppose you want to define compareEntries like this: compareEntries (Entry x) (Entry y) = compareEntries x y An option is to just implement it the following way (Haskell98!): class DatabaseEntry e where entryLabel :: e - String formatEntry :: e

RE: [Haskell-cafe] how would this be done? type classes? existentialtypes?

2006-03-16 Thread Geest, G. van den
Title: RE: [Haskell-cafe] how would this be done? type classes? existentialtypes? Try using a GADT: data Rs where Rs :: Resource a = a - Rs class Resource a where resourceName :: a - String instance Resource String where resourceName x = String instance Resource Int where

Re: On Eq, was Re: [Haskell-cafe] When to use fancy types [Re: NumberTheory library]

2005-05-15 Thread Peter G. Hancock
Lennart Augustsson wrote (on Sat, 14 May 2005 at 16:01): Why would a constructivist think that all functions are continuous? It makes no sense. How would you define a non-continuous function (on reals, say) without (something like) definition by undecidable cases? Formal systems

Re: [Haskell-cafe] Joy Combinators (Occurs check: infinite type)

2005-03-09 Thread Peter G. Hancock
Greg Buchholz wrote (on Wed, 09 Mar 2005 at 20:08): Can anyone recommend a nice dependently typed language to play with? Cayenne, Epigram, other? http://www.cs.chalmers.se/~catarina/agda/ See also the sexy IDE alfa: http://www.cs.chalmers.se/~hallgren/Alfa/ Peter Hancock

Re: [Haskell-cafe] State Monad

2005-03-03 Thread Sam G.
before I get your mail. Mark Carroll wrote: On Thu, 3 Mar 2005, Sam G. wrote: I need a Monad to represent an internal stack. I mean I've got a lot of functions which operates on lists and I would not like to pass the list as an argument everytime. Could you help me writing this monad? To start

[Haskell-cafe] State Monad

2005-03-02 Thread Sam G.
I need a Monad to represent an internal stack. I mean I've got a lot of functions which operates on lists and I would not like to pass the list as an argument everytime. Could you help me writing this monad? To start, I just need a + function which will return the sum of the 2 toppest elements

Re: [Haskell-cafe] Point-free style

2005-02-14 Thread Peter G. Hancock
Lennart Augustsson wrote (on Mon, 14 Feb 2005 at 14:55): Any definition can be made point free if you have a complete combinator base at your disposal, e.g., S and K. Haskell has K (called const), but lacks S. S could be defined as spread f g x = f x (g x

Re: [Haskell-cafe] Haskell programs in C

2005-01-25 Thread Peter G. Hancock
Ben Rudiak-Gould wrote (on Tue, 25 Jan 2005 at 14:49): Mark Carroll wrote: Wasn't there someone mentioning here a little while ago some project where they strip most of System.* from the libraries and get something that might be suitable for embedded applications? What was

Re: [Haskell-cafe] The difference between ($) and application

2004-12-15 Thread Peter G. Hancock
Jon Cast wrote (on Tue, 14 Dec 2004 at 22:02): No. All that is needed for ($) to work is impredicativity (or, more precisely, for the foralls in ($)'s type to be impredicative). That is something that could easily be implemented in a compiler. I'm not clear on why it

Re: [Haskell-cafe] closed classes

2004-08-09 Thread Peter G. Hancock
At the moment I'm only thinking of parameter-less kind declarations but one could easily imagine kind parameters, and soon we'll have kind polymorphism but one step at a time. Any thoughts? Apologies if it's widely known, but a system with kind polymorphism was first considered by

Re: [Haskell-cafe] Toy application advice wanted

2004-05-07 Thread Peter G. Hancock
Sound on linux tends to center around the jack sound architecture. This is a demon for connecting audio and midi gadgets as it were by jack-leads. From a brief look, it seems very callback oriented. It seems to be highly thought of by knowledgable audio types, and the bee's knees for low

Re: Another typing question

2003-08-06 Thread Peter G. Hancock
Samuel E Moelius, wrote (on Wed, 06 Aug 2003 at 15:35): On Wednesday, August 6, 2003, at 06:15 AM, C T McBride wrote: This is why most sensible dependent type theories have a hierarchy of universes behind the scenes. You can think of * in Haskell as the lowest universe,

Explicit function call

2003-03-12 Thread Pavel G. Zhbanov
Hello, How can I make an explicit function call in a do sequence? Ex: ... do let a = myFunc ... b = myFunc ... c = Something else return c ... As I understand myFunc will not be executed, but I need it... Please, help. -- Pavel Zhbanov

Global variables?

2003-01-30 Thread Pavel G. Zhbanov
Hello, Is it even possible to make a global variable in Haskell? If yes, how? Thanks. -- Zhbanov Pavel ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

new to haskell-not working for some reason

2002-09-25 Thread G?????? ??sµ?d??
I am new to haskell. I am trying to do some excersise but i can't make anything work :( This is my code.I replaced spaces with underscores ( _ ) Thanks for any suggestions or correctrions import IO import System import List import Maybe import Char import Numeric type Name=String type Room=Int

Re: layout problem

2002-09-19 Thread G?????? ??sµ?d??
_|_(c=='a'||_c=='b'||_c=='c'||_c=='d'||_c=='e'||_c=='f' ||_c=='g'||_c=='h'||_c=='i'||__c=='j'||_c=='k'||_c=='l'||_c=='m'||_c=='n' ||_c=='o'||_c=='p'||_c=='q'||_c=='r'||_c=='s'||_c=='t'||_c=='u'||_c=='v' ||_c=='w'||_c=='x'||_c=='y'||_c=='z'||c=='A'||_c=='B'||_c=='C'||_c=='D' ||_c=='E'||_c=='F

Re: converting capital letters into small letters

2002-07-27 Thread Peter G. Hancock
Andy Moran wrote (on Fri, 26 Jul 2002 at 16:52): As for removing vowels, instead of proposing a solution, I choose to dispute that the problem needs solving and claim victory. Removing vowels from identifiers can be very important if you are writing in certain assemblers from the

Re: Writing a counter function

2002-06-30 Thread Peter G. Hancock
lmichele wrote (on Sun, 30 Jun 2002 at 09:26): By the way, what's the purpose of this coding? (this is the type of question: ok, I have a hammer, now, for what kind of nail it is useful?) I would guess that something like the asked-for counter could be useful if one is allocating

Re: partial application

2002-03-18 Thread Peter G. Hancock
Apropos of section notation, don't forget flip, alias the C combinator. It allows you to express partial applications to the next argument but one is in operator section notation. We can express (usually horribly) any affine lambda-abstraction with flip, (.), id and const. Peter Hancock

<    1   2   3   4