://www.haskell.org/mailman/listinfo/haskell-cafe
--
Chris Wong, fixpoint conjurer
e: lambda.fa...@gmail.com
w: http://lfairy.github.io/
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
+ y
If you remove the right-hand side of memoized_fib, you get:
memoized_fib = ...
This looks like a constant. So the value (map fib [0..] !!) is memoized.
If you change that line to
memoized_fib x = map fib [0..] !! x
GHC no longer memoizes it, and it runs much more slowly.
--
Chris
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
--
Chris Wong, fixpoint conjurer
e: lambda.fa...@gmail.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
--
Chris Wong, fixpoint conjurer
e: lambda.fa...@gmail.com
w: http://lfairy.github.io
types A which have the kind Gender, I can give you
a Person with that type. The Alive declaration and deriving clause
can be fixed in a similar way.
Also, to enable the forall syntax, you need to add
{-# LANGUAGE ExplicitForAll #-}
at the top of the file.
Chris
--
Chris Wong, fixpoint
wrote:
Can you show me the code that triggers that behavior?
It is basically
Just connection - connect
forever $ do
(x,y) - getGyroMovement
runRobotWithConnection (moveBy x y) connection
--
Chris Wong, fixpoint conjurer
e: lambda.fa...@gmail.com
w: http://lfairy.github.io
, Niklas Hambüchen m...@nh2.me wrote:
Awesome, that works very well, and it even made my program run faster /
with less CPU.
The reset functionality is useful, but I think optional is better. Did
you remove it entirely or is it still available?
On Tue 14 May 2013 08:25:04 SGT, Chris Wong wrote
On Thu, May 9, 2013 at 1:36 PM, Chris Wong
chrisyco+haskell-c...@gmail.com wrote:
On Thu, May 9, 2013 at 4:47 AM, Niklas Hambüchen m...@nh2.me wrote:
Hi,
I just started using your library to move my cursor.
Is it possible that it ignores negative values in moveBy?
In other words, I can
impossible for
me to Ctrl-C my program: Only c is sent all the time, me pressing
Ctrl seems to be reset with the next robot event.
Can you show me the code that triggers that behavior?
--
Chris Wong, fixpoint conjurer
e: lambda.fa...@gmail.com
w: http://lfairy.github.io
at some point?
Not sure -- I have no idea how screen capturing works in X11. Calling
gnome-screenshot should probably cover most use cases.
Chris
--
Chris Wong, fixpoint conjurer
e: lambda.fa...@gmail.com
w: http://lfairy.github.io/
___
Haskell-Cafe
://github.com/lfairy/robot/tree/master/examples
Happy hacking!
Chris
--
Chris Wong, fixpoint conjurer
e: lambda.fa...@gmail.com
w: http://lfairy.github.io/
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell
either, because then I have to give it a constructor, which
doesn't fit with what I want the type to do.
--
frigidcode.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
--
Chris Wong
On Thu, Feb 28, 2013 at 1:26 PM, Brandon Allbery allber...@gmail.com wrote:
On Wed, Feb 27, 2013 at 8:37 AM, Corentin Dupont corentin.dup...@gmail.com
wrote:
Hi Chris,
Thanks!
That's true for the user number. What should I do? Encrypt it?
It's not that you have a user number, or even that
Hello everybody!
I am very happy to announce the beta release [1] of Nomyx, the only game
where You can change the rules.
I just gave it a go -- it looks fun :)
However, I've spotted a security hole. The current user number is
stored in the URL -- if I change that number, I can masquerade as
Hi Petr,
Congratulations -- you've just implemented a Moore machine! [1]
I posted something very much like this just last year [2]. It's a very
common pattern in Haskell, forming the basis of coroutines and
iteratees and many other things.
Edward Kmett includes it in his machines package [3].
Hi Petr,
On Sun, Dec 9, 2012 at 7:59 AM, Petr P petr@gmail.com wrote:
The class is defined as
class (Monoid w, Monad m) = MonadWriter w m | m - w where
...
What is the reason for the Monoid constrait? It seems superfluous to me. I
recompiled the whole package without it, with no
Hello José,
So, I have a typeclass Action which defines method run:
class Action a where
run :: a - Int
(snipped)
Now, I want to parse either A or B from a String.
I was thinking about something like this...
parseAction :: (Action a, Read a) = String - a
parseAction str
| (A
Hello!
On Thu, Oct 18, 2012 at 6:59 AM, Petr P petr@gmail.com wrote:
Hi,
(this is a literate Haskell post.)
lately I was playing with the Writer monad and it seems to me that it
is too tightly coupled with monoids. Currently, MonadWriter makes the
following assumptions:
(1) The
On Tue, Oct 2, 2012 at 3:23 PM, Conrad Parker con...@metadecks.org wrote:
Nice, it builds and runs fine for me. Perhaps you could include a few
more example commandlines to get started? Running without arguments
(as the README.mkd suggests) just prints the help text.
Thanks for pointing that
Hello all
Some of you in the audience may have read Dave Keenan's paper, [To
Dissect a Mockingbird][]. A subset of that may have wondered if it was
possible to generate those pretty pictures programmatically. For that
subset, I can answer to you -- yes, yes you can.
[To Dissect a Mockingbird]:
On Mon, Sep 3, 2012 at 3:15 PM, Richard Wallace
rwall...@thewallacepack.net wrote:
I like the approach so far. But hellno itself seems to have several
dependencies itself. So installing with cabal pulls these in as
fixed libraries (text, mtl, transformers, and parsec). Any
plans to make
On Wed, Aug 22, 2012 at 7:16 PM, yi huang yi.codepla...@gmail.com wrote:
I have a `newtype Yun a = Yun { unYun :: ReaderT YunEnv (ResourceT IO) a }`
, and i need to define an instance of `MonadBaseControl IO` for it.
Newtype instance deriving don't work here. I guess the answer is simple, i
On Mon, Jun 4, 2012 at 1:16 PM, Jens Petersen
j...@community.haskell.org wrote:
Congratulations on the release!
Equally surprising to me is that the number of slashes
also seems to affect the CSS presentation of the website
in Chrome.
// seems to give the Summer theme,
whereas / gives the
On Mon, Jun 4, 2012 at 1:16 PM, Jens Petersen
j...@community.haskell.org wrote:
Congratulations on the release!
Equally surprising to me is that the number of slashes
also seems to affect the CSS presentation of the website
in Chrome.
// seems to give the Summer theme,
whereas / gives the
On Fri, Jun 1, 2012 at 6:23 AM, C K Kashyap ckkash...@gmail.com wrote:
Hi folks,
I have the opportunity to make a presentation to folks (developers and
managers) in my organization about Haskell - and why it's important - and
why it's the only way forward. I request you to share your
Sorry for the delayed response -- I've had exams the past few days.
On Sun, May 27, 2012 at 8:21 PM, Eugene Kirpichov ekirpic...@gmail.com wrote:
A lot of people have done this :) eg from me: google up a fairly recent
thread from me about processing streams and perhaps the keyword timeplot
Hello all
I just came up with a way of executing multiple folds in a single
pass. In short, we can write code like this:
average = foldLeft $ (/) $ sumF * lengthF
and it will only traverse the input list once.
The code is at: https://gist.github.com/2802644
My question is: has anyone done
Rustom:
O well... If the noob trap is one error playing it safe is probably another
so here goes with me saying things that I (probably) know nothing about:
1. cabal was a beautiful system 10 years ago. Now its being forcibly scaled
up 2 (3?) orders of magnitude and is creaking at the seams
On Sat, May 12, 2012 at 12:41 AM, Gregg Lebovitz glebov...@gmail.com wrote:
I would find it useful to pull all this information together into a single
document that discusses all the performance issues in one place and shares
the real life experience is dealing with each issue. I see this as a
On Sat, Apr 7, 2012 at 2:02 AM, Dominic Steinitz
idontgetoutm...@googlemail.com wrote:
Hi,
I'm trying to install REPA but getting the following. Do I just install
base? Or is it more complicated than that?
Thanks, Dominic.
I think the easiest solution is to just use an older version of
On Tue, Mar 27, 2012 at 11:03 AM, Antoine Latter aslat...@gmail.com wrote:
On Mon, Mar 26, 2012 at 4:25 PM, Ting Lei tin...@hotmail.com wrote:
Hi Antoine and Tobias (and everyone else),
Thanks a lot for your answers. They are really helpful
Can you please show me how to use the (Eq m)
On Tue, Mar 13, 2012 at 12:24 PM, Chris Smith cdsm...@gmail.com wrote:
On Mon, Mar 12, 2012 at 3:14 PM, Kevin Clees k.cl...@web.de wrote:
Now my function looks like this:
tmp:: [(Int, Int)] - Int - (Int, Int)
tmp [] y = (0,0)
tmp xs y = xs !! (y-1)
Just a warning that this will still crash
Hello
On Tue, Feb 21, 2012 at 8:32 PM, Manoj Chaudhari manoj...@gmail.com wrote:
Hi,
We are looking for senior technical resources with skills in
Haskell/Functional programming.
Experience : 6 to 20 years,
Job Location : Pune (India).
Out of curiosity, what will the job involve?
Also, it
Hello Matias
On Wed, Feb 22, 2012 at 4:02 PM, Matias Hernandez mhern...@gmail.com wrote:
Hi Alberto.
Do we need cygwin to install your compiled package?
I don't believe you do. If memory doesn't fail me, the Haskell
Platform includes a compiler (MinGW), but not a shell (MSYS).
This page
Sorry, accidentally clicked Reply rather than Reply to all. Here's
the message I sent:
-- Forwarded message --
From: Chris Wong chrisyco+haskell-c...@gmail.com
Date: Fri, Feb 3, 2012 at 7:44 PM
Subject: Re: [Haskell-cafe] Contributing to http-conduit
To: Myles C. Maxfield
On Mon, Jan 30, 2012 at 10:13 AM, Marc Weber marco-owe...@gmx.de wrote:
A lot of work has been gone into GHC and its libraries.
However for some use cases C is still preferred, for obvious speed
reasons - because optimizing an Haskell application can take much time.
As much as any other
I like let (hd, _ : tl) = break prd lst in...
Oh, wait. That won't always work. :(
second (drop 1) . break prd list?
:)
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Fri, Dec 30, 2011 at 2:53 PM, Steve Horne
sh006d3...@blueyonder.co.uk wrote:
I've been for functions like GetMessage, TranslateMessage and
DispatchMessage in the Haskell Platform Win32 library - the usual message
loop stuff - and not finding them. Hoogle says no results found.
Is this
On Fri, Dec 30, 2011 at 4:47 PM, David Thomas davidleotho...@gmail.com wrote:
Is there any particular reason IO functions in the standard libraries aren't
grouped into type-classes?
I'm guessing it's to stop the report from getting too complicated. If
you want an IO abstraction, you can try
On Fri, Dec 30, 2011 at 1:24 PM, Daniel Fischer
daniel.is.fisc...@googlemail.com wrote:
On Thursday 29 December 2011, 23:52:46, Omari Norman wrote:
[...]
'fail' doesn't properly belong in the Monad class, it was added for the
purpose of dealing with pattern-match failures, but most monads
On Thu, Dec 29, 2011 at 2:45 PM, Antoine Latter aslat...@gmail.com wrote:
[...]
When GHC opens files for reading, it asks windows to disallow write
access to the file. I'm guessing that Framemaker has the file open for
writing, so GHC can't get that permission.
In fact, this is required
One thing that concerns me is the use of capital letters to distinguish type
and class names and constructors from values. If I was doing it over I
would use a typographical distinction like italics for types, bold for
classes. That way we could have a constructor named ∅, a function named
On Wed, Dec 21, 2011 at 10:53 AM, Matthew Farkas-Dyck
strake...@gmail.com wrote:
With GHC 7.0.3:
$ cat test.hs
class ℝ a where {
test :: a;
};
(∈) :: Eq a = a - [a] - Bool;
x ∈ (y:ys) = x == y || x ∈ ys;
main = putStrLn Two of three ain't bad (^_~);
$ runhaskell test.hs
Two of three
On Sat, Dec 17, 2011 at 12:27 PM, KC kc1...@gmail.com wrote:
... with the same functionality.
Thus, your program would be a moving target to hackers.
Would this be challenging with ghc?
Although it's possible, I doubt this would do anything. Most exploits
are just programmer mistakes;
On Thu, Dec 15, 2011 at 9:13 PM, Gregory Crosswhite
gcrosswh...@gmail.com wrote:
First of all, it sounds like we all agree that the documentation for
Alternative needs to be improved; that alone would clear a lot of the
confusion up.
I wonder if fully documenting the Haskell base library is a
Okay, so how about the following as a user narrative for some and many?
...
I was in the middle of writing my own version of Applicative when I
stumbled on this intense debate. Here's what I wrote for the
documentation:
class (Applicative f, Monoid f) = Alternative f where
-- | Keep
46 matches
Mail list logo