One thing I forgot to make clear in the announcement is that the
language is still highly experimental, and some obvious things, such as
complex numbers, are currently missing. So this first release should
probably not be used for real applications.
However, while I don't know how autotuning
On Wed, Nov 4, 2009 at 10:34 AM, Richard O'Keefe o...@cs.otago.ac.nz wrote:
(4) It comes with its own IDE. I don't think it can do anything much that
Haskell tools can't do, but if you don't like looking for things, it's
a help.
And a well-integrated GUI toolkit. If it weren't for the
The code executed by uniqueness types is somehow similar to the internal
code executed in a state monad (or in the case of IO, the IO monad). The
main difference is that the pairs of results (state, value) are explicitly
written in Clean by the programmer and the type sytem assures that the
Hi,
Is it possible to somehow make a StorableVector of a StorableVector via
store-record or something?
If yes, could some one please provide me with some hint?
I need a very fast and efficient array of a large number of $ arrays of *Int
*s.
And the storableVector seems to be extremely nice.
On Tue, 2009-11-03 at 18:12 -0800, brian wrote:
Really, arrays in Haskell are the most @#!$! confusing thing in the
world.
There's a bunch of different array structures.
I can't tell which one works best, and all I want to do is x[i] = value.
I thought uvector was the answer, you know,
Duncan Coutts duncan.cou...@googlemail.com writes:
The boxed [array types] can be used with any element type (eg an array of
records) while unboxed ones work with simple primitive types like ints,
floats etc. The difference is about memory layout and therefore
performance
...and of
Hello,
2009/11/4 Alberto G. Corona agocor...@gmail.com:
The code executed by uniqueness types is somehow similar to the internal
code executed in a state monad (or in the case of IO, the IO monad). The
main difference is that the pairs of results (state, value) are explicitly
written in
I am having the similar problem when running TCP server application on windows
XP. The server can only reads once from the handle of socket, then any
operation on the handle will cause error because it is already finalized. It
seems a platform issues but I have no idea about it.
Date: Tue,
Louis Wasserman wrote:
+1 on Control.Monad.Omega. In point of fact, your diagN function is simply
diagN = runOmega . mapM Omega
You'll find it an interesting exercise to grok the source of
Control.Monad.Omega, obviously, but essentially, you're replacing
concatMap with a fair (diagonal)
Brian wrote:
However if I had to guess, it seems to me that you want to read the
data into
a list and then find some ST function which can initialize an
array using a list (maybe ?)
It is the other way around. I want to avoit lists. I would like to read the
array elements from a file, and
Jason Dusek wrote:
How do you read in the IOUArray? By parsing a character string
or do you treat the file as binary numbers or ... ?
I always pare the file. Parsing the file has the advantage of alowing me to
have files of any format. In general, in homeworks, TA generate files using
Hello Don,
http://shootout.alioth.debian.org/u64q/benchmark.php?test=alllang=ghclang2=cleanbox=1
http://shootout.alioth.debian.org/u64q/benchmark.php?test=alllang=ghclang2=ocamlbox=1
The Haskell compiler isn't the bottleneck. Use it when performance matters. I
do.
Don, shootout times may
On Tue, Nov 03, 2009 at 12:30:48PM -0800, Ryan Ingram wrote:
] prtSol i n1 arr
]| i 1 = return ()
]| otherwise = do
] b - readArray arr (i, n1)
] putStr ((show b)++ )
] prtSol (i-1) n1 arr
Which is just
prtSol i n1 arr = unless (i 1) $ do
I believe this does what you want:
diagN :: [[a]] - [[a]]
diagN = diagN' 0
diagN' :: Integer - [[a]] - [[a]]
diagN' i xss = case r of
[] - []
_ - r ++ diagN' (i + 1) xss
where r = diagN_i i xss
diagN_i :: Integer - [[a]] - [[a]]
diagN_i 0 [] = [[]]
diagN_i _ [] = []
diagN_i _
I'm pleased to announce that version 0.2 of the language-python
package is now available on hackage:
http://hackage.haskell.org/package/language-python
language-python provides lexical analysis and parsing for Python.
Major features of this release:
- Support for versions 2.x and 3.x of
On Tue, 3 Nov 2009 12:47:40 -0800
Gregory == Gregory Crosswhite wrote:
Gregory The problem with Leo is that although there are rarely
Gregory performance problems when navigating and editing the outline,
Gregory the text pane can be very slow at times when using the
Gregory Tk-based GUI ---
Bulat Ziganshin bulat.zigans...@gmail.com writes:
http://shootout.alioth.debian.org/u64q/benchmark.php?test=alllang=ghclang2=cleanbox=1
http://shootout.alioth.debian.org/u64q/benchmark.php?test=alllang=ghclang2=ocamlbox=1
The Haskell compiler isn't the bottleneck. Use it when performance
Artyom.
I know what uniqueness means. What I meant is that the context in which
uniqueness is used, for imperative sequences:
(y, s')= proc1 s x
(z, s'')= proc2 s' y
.
is essentially the same sequence as if we rewrite an state monad to make the
state explicit. When the state is the world
Hello Ketil,
Wednesday, November 4, 2009, 4:31:20 PM, you wrote:
Well, it clearly demonstrates that it is possible to write fast code in
Haskell.
my measures says that by psending 3x more time than for C you can
optimize haskell code to be only 3x slower than C one
succinct and correct
Fellow Haskelleers,
I'm pleased to announce the release of haskell-src-exts-1.3.0!
* On hackage: http://hackage.haskell.org/package/haskell-src-exts
* Via cabal: cabal install haskell-src-exts
* Darcs repo: http://code.haskell.org/haskell-src-exts
Version 1.3.0 is a new major release, following
Michael,
Here is how I do it.
module Main where
import Text.Regex.Posix.ByteString
import Data.Maybe
import qualified Data.ByteString.Char8 as S
text = S.pack 11\n abcd \n22
p = S.pack 11\n(.*)\n22
main :: IO ()
main =
do { (Right pat) - compile compExtended execBlank p
;
Sjoerd Visscher wrote:
I believe this does what you want:
code
The attached code should be more efficient, since it doesn't use integer
indices.
Note that this is just a 'level' monad: the list is stratified into levels, when
combining two levels, the level of the result is the sum of the
On Nov 4, 2009, at 3:21 PM, Twan van Laarhoven wrote:
I looked on hackage but I was surprised that I couldn't find this
simple monad. The package level-monad does look very similar, only
it uses a different list type for the representation.
indeed, level-monad works as well:
import
Wow, this looks like a bug to me. If it's not a bug, then it's horribly
unintuitive.
I extended your example in an effort to figure out what was going on.
Apparently weak pointers loath live IORefs:
import Data.IORef
import Data.Maybe
import System.Mem
import System.Mem.Weak
import Control.Monad
Luke Palmer wrote:
I believe you can get what you want using the diagonal function from
Control.Monad.Omega.
product xs ys = [ [ (x,y) | y - ys ] | x - xs ]
diag2 xs ys = diagonal (product xs ys)
I think if you separate taking the cartesian product and flattening
it, like this, you might
Brilliant !
This release promptly fixes an annoying bug I was about to report with
the pretty printing (not exact) of infix function declarations like
instance Applicative (Either e) where
pure = Right
Right f * Right x = Right (f x)
Left e * _ = Left e
_ * Left e = Left
I personally don´t care about raw performance. Haskell is in the top of the
list of language performance. It has all the ingredients for
improving performance in the coming years: A core language, clear execution
strategy, analysis and parsing, transformations based on math rules. So my
code will
On 4 Nov 2009, at 13:36, Alberto G. Corona wrote:
Artyom.
I know what uniqueness means. What I meant is that the context in
which uniqueness is used, for imperative sequences:
(y, s')= proc1 s x
(z, s'')= proc2 s' y
.
is essentially the same sequence as if we rewrite an state monad
On Tue, Nov 3, 2009 at 10:44 PM, Ben Lippmeier ben.lippme...@anu.edu.auwrote:
David Leimbach wrote:
I have to admit, the first time I hit the wiki page for DDC I said to
myself Self, this sounds crazy complicated. Then I read part of the PDF
(your thesis I believe) about Region Types on the
On Wed, Nov 4, 2009 at 7:11 AM, Edsko de Vries edskodevr...@gmail.comwrote:
On 4 Nov 2009, at 13:36, Alberto G. Corona wrote:
Artyom.
I know what uniqueness means. What I meant is that the context in which
uniqueness is used, for imperative sequences:
(y, s')= proc1 s x
(z, s'')= proc2
Multi-line regular expressions are indeed powerful. Rob Pike has a good
paper on it available at:
http://doc.cat-v.org/bell_labs/structural_regexps/se.pdfhttp://code.google.com/p/sregex/
http://code.google.com/p/sregex/Explains how line-based regular
expressions are limiting etc.
The Sam and
Hello Alberto,
Wednesday, November 4, 2009, 5:58:31 PM, you wrote:
I personally don´t care about raw performance.
me too. actually, i write time-critical parts of my app in c++
Haskell is in the
top of the list of language performance.
this list is meaningless, as i said before
It has
Hi List,
this is rather trivial, but maybe someone else finds these useful:
darcs get http://code.haskell.org/~daniels/haskell-snippets/
Especially the LANGUAGE ones have saved me quite some typing :) Additions
welcome.
Usage: If not already installed, get YASnippet:
2009/11/4 Daniel Schüssler anotheraddr...@gmx.de:
Hi List,
this is rather trivial, but maybe someone else finds these useful:
darcs get http://code.haskell.org/~daniels/haskell-snippets/
Especially the LANGUAGE ones have saved me quite some typing :) Additions
welcome.
Usage: If not
Bulat Ziganshin bulat.zigans...@gmail.com writes:
Well, it clearly demonstrates that it is possible to write fast code
in Haskell.
my measures says that by psending 3x more time than for C you can
optimize haskell code to be only 3x slower than C one
Right¹, the interesting thing is not how
(I take it you accidently wrote to fa.haskell, which is just a mirror of -cafe
and -beginners, so I'm cc-ing the Café with a full quote.)
Masayuki Takagi:
I'm writing fluid simulation programs with SPH(Smoothed particle
hydrodynamics) in Haskell and C++. (The purpose that I write in two
Hello Ketil,
Wednesday, November 4, 2009, 7:43:38 PM, you wrote:
Right?, the interesting thing is not how fast I can get with N times the
effort, but if I can get fast enough with 1/N.
it depends entirely on how fast you need. so it's again changing the
topic - while i say that haskell is
Hello Kalman,
Wednesday, November 4, 2009, 7:53:49 PM, you wrote:
I've not looked at the code, but you'll want ghc to do better optimizations
than -O. -O2 is what you should use in general. Also, number-crunching often
profits from -fexcess-precision.
also, floating-point number crunching
I'm not sure I follow you? The compiler can't reorder the two updates
or do them in parallel (IO is not a commutative monad). You might tell
the compiler this explicitly, but then are you writing lower and lower
level code, further removed from the functional paradigm.
Edsko
On 4 Nov
On Wed, Nov 4, 2009 at 7:03 AM, Bernie Pope florbit...@gmail.com wrote:
I'm pleased to announce that version 0.2 of the language-python
package is now available on hackage:
http://hackage.haskell.org/package/language-python
language-python provides lexical analysis and parsing for Python.
2009/11/4 Bernie Pope florbit...@gmail.com:
Main shortcomings of this release:
- Support for Unicode is limited (waiting on Unicode support in Alex).
There was an announcement a while back on this list from Jean-Philippe
Bernardy about successfully adding Unicode support to Alex.
The code by Twan can be reduced to this:
diagN = concat . foldr f [[[]]]
f :: [a] - [[[a]]] - [[[a]]]
f xs ys = foldr (g ys) [] xs
g :: [[[a]]] - a - [[[a]]] - [[[a]]]
g ys x xs = merge (map (map (x:)) ys) ([] : xs)
merge :: [[a]] - [[a]] - [[a]]
merge [] ys = ys
merge xs [] = xs
merge (x:xs)
Hi Deniz,
Cool stuff, I will probably be using this!
thanks :)
In my opinion, the naming convention is a bit inconsistent. Extension
snippets all begin with -x but imports begin with imp. I'd prefer
seeing import snippets begin with -i and use names easier to
remember, e.g. instead of
bulat.ziganshin:
oh, can we stop saying about shootout? if you want to see speed of
pure haskell code, look at papers about fast arrays/strings - their
authors have measured that lazy lists are hundreds times slower than
idiomatic C code. is use of lazy lists counted as mistake too and
paper
Haskellers,
I present to you fdo-notify, a client library for FreeDesktop.org's
Desktop Notifications protocol. This is the DBUS protocol served by
NotifyOSD and other notifications systems, which allows a wide variety
of applications to present notifications to the user in a uniform way.
The
this is rather trivial, but maybe someone else finds these useful:
darcs get http://code.haskell.org/~daniels/haskell-snippets/
Since Emacs already comes bundled with several template systems
(at least skeleton.el and tempo.el, where the first seems to be
marginally more canonical), I think it
2009/11/4 Stefan Monnier monn...@iro.umontreal.ca:
this is rather trivial, but maybe someone else finds these useful:
darcs get http://code.haskell.org/~daniels/haskell-snippets/
Since Emacs already comes bundled with several template systems
(at least skeleton.el and tempo.el, where the
On Wed, Nov 4, 2009 at 12:53 AM, Emil Axelsson e...@chalmers.se wrote:
I don't see why you shouldn't
I don't know
I'll take that as an unqualified yes. Shawty snappin'!
Warren
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Hi,
I am writing a little IPC system to make Haskell values and functions
remotely invokable.
To do so, I need (or so I believe) to make my objects accessible via a
generic interface as in:
class AFun f where
afun :: Data a = f - ([Dynamic] - a)
So my generic object is something that takes
On Nov 4, 2009, at 9:56 PM, Martin DeMello wrote [about Clean]:
And a well-integrated GUI toolkit. If it weren't for the Windows bias
I'd have definitely taken the time to learn the language.
The GUI toolkit was originally available on the Mac.
But now, ah, now!
The Object I/O Library 1.2 is
The problem lies in the definition of your class:
class AFun f where
afun :: Data a = f - ([Dynamic] - a)
You are saying that afun can return any type a that the user wants
as long as it is an instance of Data, whereas here
instance Data v = AFun v where
afun f [] = f
afun _ _ = error
2009/11/4 Philippos Apolinarius phi50...@yahoo.ca
Jason Dusek wrote:
How do you read in the IOUArray? By parsing a character
string or do you treat the file as binary numbers or ... ?
I always pare the file. Parsing the file has the advantage of
alowing me to have files of any format.
Am Mittwoch 04 November 2009 22:03:09 schrieb Pasqualino Titto Assini:
Hi,
I am writing a little IPC system to make Haskell values and functions
remotely invokable.
To do so, I need (or so I believe) to make my objects accessible via a
generic interface as in:
class AFun f where
afun
Hi!
My students have the task to program an interactive chatbot. We have
run into a problem that I can't solve either:
When we read the user's input through
t - getLine
it is not possible to delete typos before hitting enter and thereby
sending the input off to the system (at least in
On 05/11/2009, at 04:01, Bulat Ziganshin wrote:
oh, can we stop saying about shootout? if you want to see speed of
pure haskell code, look at papers about fast arrays/strings - their
authors have measured that lazy lists are hundreds times slower than
idiomatic C code. is use of lazy lists
The library at
http://hackage.haskell.org/package/readline
might solve your problem.
Cheers,
Greg
On Nov 4, 2009, at 2:21 PM, Torsten Otto wrote:
Hi!
My students have the task to program an interactive chatbot. We have
run into a problem that I can't solve either:
When we read
On Wed, Nov 4, 2009 at 2:21 PM, Torsten Otto t-otto-n...@gmx.de wrote:
Hi!
My students have the task to program an interactive chatbot. We have run
into a problem that I can't solve either:
When we read the user's input through
t - getLine
it is not possible to delete typos before
Hi,
I want to write a program that will take an AST and a cost vector that
represents a cost for each operation and produce a simplified version of the
tree based on cost reduction.
Can any one give me some ideas ?
Thanks
___
Haskell-Cafe mailing
On Wed, Nov 4, 2009 at 2:21 PM, Torsten Otto t-otto-n...@gmx.de wrote:
Hi!
My students have the task to program an interactive chatbot. We have run
into a problem that I can't solve either:
When we read the user's input through
t - getLine
it is not possible to delete typos before
2009/11/5 Tom Tobin korp...@korpios.com:
On Wed, Nov 4, 2009 at 7:03 AM, Bernie Pope florbit...@gmail.com wrote:
I'm pleased to announce that version 0.2 of the language-python
package is now available on hackage:
http://hackage.haskell.org/package/language-python
language-python provides
2009/11/5 Deniz Dogan deniz.a.m.do...@gmail.com:
2009/11/4 Bernie Pope florbit...@gmail.com:
Main shortcomings of this release:
- Support for Unicode is limited (waiting on Unicode support in Alex).
There was an announcement a while back on this list from Jean-Philippe
Bernardy about
On Wed, Nov 4, 2009 at 3:14 PM, Jason Dagit da...@codersbase.com wrote:
On Wed, Nov 4, 2009 at 2:21 PM, Torsten Otto t-otto-n...@gmx.de wrote:
Hi!
My students have the task to program an interactive chatbot. We have run
into a problem that I can't solve either:
When we read the user's
2009/11/04 Jason Dusek jason.du...@gmail.com:
...you parse the file I imagine you in face...
in face - in fact
Sorry.
--
Jason Dusek
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Hi,
I'm trying to characterise some strict monads to work with a particular
lambda-calculus evaluator, as an alternative to CPS monad.
In the thread Stupid question #852: Strict monad the implementation of
some strict monads (and pseudo-monads, not meeting the identity laws) is
discussed. It's
Hello, -Cafe,
I'm looking for an interesting topic to hack on in my thesis.
The thesis should be rather theoretical/abstract (writing a mail
client in Haskell is not, for example), dealing with FP or related
fields. I've had a few (blurry) ideas, ranging from investigating
(possibilities for)
Oops, I clicked reply instead of reply to all. Duplicating the
message below.
I suppose this means someone is going to get two copies of this. Sorry someone!
On Thu, Nov 5, 2009 at 12:56 AM, Ben Millwood hask...@benmachine.co.uk wrote:
On Wed, Nov 4, 2009 at 10:21 PM, Torsten Otto
66 matches
Mail list logo