Blake Rain blake.r...@gmail.com writes:
Here is the one in C:
void multiplyM4 (float m1[4][4], float m2[4][4], float m3[4][4]) {
m1[0][0] = m2[0][0] * m3[0][0] + m2[0][1] * m3[1][0] + m2[0][2] * m3[2][0] +
m2[0][3] * m3[3][0];
m1[0][1] = m2[0][0] * m3[0][1] + m2[0][1] * m3[1][1] + m2[0][2]
Sorry, but last time I've checked, C did have loops, is that correct? And even
if you don't want loops, there is a preprocessor.
17.01.2011 10:45, Blake Rain пишет:
Dear Haskellers,
I thought I'd take some time to share something of my weekend with
you all. Not because of anything new,
Am Sonntag, den 16.01.2011, 14:48 -0800 schrieb gutti:
Looking at life u probably could save time, if u only would evaluate
code on cells, where the neighbors have changed status. So rather than
triggering them all centrally and each checks its neighbours, we could
use the concept:
- let
Oh yeah, it does. You're right. I haven't used it in so long that I
forgot about them! No need to be sorry.
Well, +2 for C, eh? :)
And I'd just make a mess if I used the preprocessor.
On Mon, 2011-01-17 at 11:23 +0300, Miguel Mitrofanov wrote:
Sorry, but last time I've checked, C did have
On Mon, 17 Jan 2011 07:45:04 +
Blake Rain blake.r...@gmail.com wrote:
So, after drinking some coffee and having a smoke, I started the
Haskell version:
[foldl (+) 0 $ zipWith (*) x y | x - m1, y - transpose m2]
I don't think this is correct; it's type is
(Num a) = [[a]] -
On Mon, 2011-01-17 at 10:13 +, Pedro Vasconcelos wrote:
On Mon, 17 Jan 2011 07:45:04 +
Blake Rain blake.r...@gmail.com wrote:
So, after drinking some coffee and having a smoke, I started the
Haskell version:
[foldl (+) 0 $ zipWith (*) x y | x - m1, y - transpose m2]
I
Dear all,
I am proudly announcing SiteBridge version 1.0.
Briefly about it, SiteBridge is a site bridging system that allows
developers to connect his/her locally developed app to an externally
accessible site. It's aimed to get rid of the pain of the fact that you are
still internally
Hello again,
I have another question for happstack users/experts:
I have a program with happstack-state and a web server with
happstack-server.
What I'd like is, whenever the MACID state is changed, that the web page is
refreshed for every clients
connected on the web server.
So I think the
On Mon, Jan 17, 2011 at 1:44 AM, Wolfgang Jeltsch
g9ks1...@acme.softbase.org wrote:
Am Sonntag, den 16.01.2011, 14:48 -0800 schrieb gutti:
Looking at life u probably could save time, if u only would evaluate
code on cells, where the neighbors have changed status. So rather than
triggering them
Rather than commenting on the code provided, here are the two biggest wins
I've had recently with Haskell. Both of these are part of a physical
modeling project.
1) uu-parsinglib - simple to use and automatic error correction. I really,
really enjoy working with this library, and how often can
-- My intension is that the PERSON class should *specify*
-- that a person has a constant id called p1
-- and that a person has a name that can be found from the id.
class PERSON a b where
p1 :: a
name :: a - b
-- My intension is that the instance should implement the PERSON class
instance
On Mon, 17 Jan 2011, Patrick Browne wrote:
-- My intension is that the PERSON class should *specify*
-- that a person has a constant id called p1
-- and that a person has a name that can be found from the id.
class PERSON a b where
p1 :: a
name :: a - b
-- My intension is that the instance
Blake Rain wrote:
Oh yeah, it does. You're right. I haven't used it in so long that I
forgot about them! No need to be sorry.
Well, +2 for C, eh? :)
And I'd just make a mess if I used the preprocessor.
C optimizer should also unroll loops.
___
Blake Rain wrote:
Determinant is a bit fiddly, but quite trivial. However it is
woefully slow at O(n!). I need to make use of LU decomposition
(in which the determinant is the sum of the diagonal values in
U).
product of diagonal values
Adjoint is even more of a fiddle, but
Ketil Malde wrote:
Blake Rain blake.r...@gmail.com writes:
Here is the one in C:
void multiplyM4 (float m1[4][4], float m2[4][4], float m3[4][4]) {
m1[0][0] = m2[0][0] * m3[0][0] + m2[0][1] * m3[1][0] + m2[0][2] * m3[2][0] +
m2[0][3] * m3[3][0];
m1[0][1] = m2[0][0] * m3[0][1] + m2[0][1] *
On Mon, Jan 17, 2011 at 12:50 PM, Henning Thielemann
lemm...@henning-thielemann.de wrote:
Blake Rain wrote:
Adjoint is even more of a fiddle, but actually a one-liner after
reusing bits of the determinant function (including the
determinant function).
Isn't Adjoint just
Henning,
The code is not intended to fit into a larger application.
I am trying to understand instance-implements-class relation.
My experiment consists of writing simple English sentences and then
seeing how they could be specified and implemented in Haskell.
I am sure that this simple
Henning Thielemann lemm...@henning-thielemann.de writes:
class PERSON a b where
p1 :: a
name :: a - b
A multi-parameter typeclass is a relation over types...
instance PERSON Int String where
p1 = 1
name p1 = john
^--note that this is just an unused paramter,
it is
On 17/01/2011 13:04, Ketil Malde wrote:
So other PERSONs would have different types, say:
I think the problem is there is just one constant p1 in the class and
there needs to be multiple constants in the implementation (one for each
person). It seems difficult to specify this using type classes
Patrick Browne patrick.bro...@dit.ie writes:
I think the problem is there is just one constant p1 in the class and
there needs to be multiple constants in the implementation (one for each
person). It seems difficult to specify this using type classes So, some
data declaration as you suggest
On Mon, 17 Jan 2011 10:38:30 +
Blake Rain blake.r...@gmail.com wrote:
So sorry, I meant:
mult :: (Num a) = [[a]] - [[a]] - [a]
mult m1 m2 = [foldl (+) 0 $ zipWith (*) x y | x - m1, y - transpose
m2]
Shouldn't the result of multiplying an (n,k)-matrix by an (k,m)-matrix
be an
On Sat, Jan 8, 2011 at 11:55 AM, Michael Snoyman mich...@snoyman.com wrote:
In general I think it would be a good thing to have solid, low-level bindings
to PostgreSQL.
Well, there is PostgreSQL and libpq on hackage:
http://hackage.haskell.org/package/libpq
Hi,
I'm pleased to announce the release of a Haskell binding to the
ANTLR LL(*) parser generator C runtime library.
The book on ANTLR is The Definitive ANTLR Reference: Building Domain-Specific
Languages
by Terence Parr:
http://www.pragprog.com/titles/tpantlr/the-definitive-antlr-reference
On Mon, Jan 17, 2011 at 4:49 PM, Leon Smith leon.p.sm...@gmail.com wrote:
On Sat, Jan 8, 2011 at 11:55 AM, Michael Snoyman mich...@snoyman.com wrote:
In general I think it would be a good thing to have solid, low-level
bindings to PostgreSQL.
Well, there is PostgreSQL and libpq on hackage:
Hello,
The problem is that clients are not 'connected' to the web server. The
way it works (more or less) is:
1. client connects to server and sends a Request
2. server sends a Response
3. connection is terminated.
So, once the page has been loaded there is no connection between the
A functional dependency seems to allow me to express my rather strange
requirement.
class Person i n | i - n where
pid :: i
name :: i - n
instance Person Int String where
pid = 1
name(1) = john
-- name(pid::Int) will produce john
Thanks for your help
Pat
On 17/01/2011
On Jan 16, 2011, at 9:26 PM, Tom Hawkins wrote:
I want to create a simple browser game using Haskell. It would be
nothing complicated: basic 2D graphics, limited sound, and minimal
network traffic.
What is the recommended medium? Flash or JavaScript+SVG?
I think your options are: flash or
Thanks a lot for your response Jeremy.
I can see a lot of site that does update infos without the user to have to
click refresh (I think Facebook does?).
Do they do polling?
I think this approach would be fine for me, my app if not very fast paced.
Then I don't need to add a event handler to
On Mon, 2011-01-17 at 18:25 +0100, Corentin Dupont wrote:
Thanks a lot for your response Jeremy.
I can see a lot of site that does update infos without the user to
have to click refresh (I think Facebook does?).
Do they do polling?
While I'm not familiar with Facebook, I'd guess that today,
Hello All,
I've recently had the opportunity to explain in prose what denotational
semantics are to a person unfamiliar with it. I was trying to get across the
concept of distilling the essence out of some problem domain. I wasn't able
to get the idea across so I'm looking for some simple ways to
On Mon, 17 Jan 2011 08:50:52 +0100, Max Bolingbroke
batterseapo...@hotmail.com wrote:
Hi,
I also wanted to build gitit on Windows and encountered the datetime
issue. I sent the maintainer (Eric Sessoms) a request to bump his
version bounds on the 22nd December, but haven't received a reply.
You probably want to bring up other forms of semantics.
Axiomatic semantics:
Makes no distinction between a phrase's meaning and the logical
formulas that describe it; its meaning is exactly what can be proven
about it in some logic.
Operational semantics:
The execution of the language is
Ah, many thanks. this looks about right. I'll go through it later
today and see if i have any questions about it.
-Yaakov
On Mon, Jan 17, 2011 at 06:22:34PM +1030, John Lask wrote:
see http://okmij.org/ftp/continuations/Continuations.html,
Zipper-based file server/OS, aka ZFS
where Oleg
On 11-01-17 01:55 PM, David Sankel wrote:
I've recently had the opportunity to explain in prose what denotational
semantics are to a person unfamiliar with it. I was trying to get across
the concept of distilling the essence out of some problem domain. I
wasn't able to get the idea across so I'm
Indeed, I tried with META HTTP-EQUIV=*Refresh* CONTENT=*n* ?
and it's unusable.
It make blink the page, ungrey the stop button for a second and make the
fields loose the focus
so it's impossible to type in.
I'll try with XMLHTTPRequest.
On Mon, Jan 17, 2011 at 6:30 PM, Chris Smith
Perhaps this might help:
I wrote a kind of logger monad that inserted messages with a context.
Behind was an algebraic data type, let's say LoggerState.
The API provided methods to add a message like this:
addError :: String - Logger ()
addError Fatal error occurred
addWarning Some warning
On Jan 17, 2011, at 2:19 PM, Corentin Dupont wrote:
Indeed, I tried with META HTTP-EQUIV=Refresh CONTENT=n ?
and it's unusable.
It make blink the page, ungrey the stop button for a second and
make the fields loose the focus
so it's impossible to type in.
I'll try with XMLHTTPRequest.
On 01/17/2011 10:07 AM, Michael Snoyman wrote:
On Mon, Jan 17, 2011 at 4:49 PM, Leon Smithleon.p.sm...@gmail.com wrote:
On Sat, Jan 8, 2011 at 11:55 AM, Michael Snoymanmich...@snoyman.com wrote:
In general I think it would be a good thing to have solid, low-level bindings
to PostgreSQL.
On Mon, Jan 17, 2011 at 10:52 PM, John Goerzen jgoer...@complete.org wrote:
On 01/17/2011 10:07 AM, Michael Snoyman wrote:
On Mon, Jan 17, 2011 at 4:49 PM, Leon Smithleon.p.sm...@gmail.com
wrote:
On Sat, Jan 8, 2011 at 11:55 AM, Michael Snoymanmich...@snoyman.com
wrote:
In general I
On Mon, Jan 17, 2011 at 12:55 PM, David Sankel cam...@gmail.com wrote:
Hello All,
I've recently had the opportunity to explain in prose what denotational
semantics are to a person unfamiliar with it. I was trying to get across the
concept of distilling the essence out of some problem domain.
I've already modified the dev versions of filestore and gitit so
they don't depend on datetime. This should solve the problem. I
expect to be releasing new versions of both before long.
John
+++ Max Bolingbroke [Jan 17 11 07:50 ]:
Hi,
I also wanted to build gitit on Windows and encountered
On 01/17/2011 03:16 PM, Michael Snoyman wrote:
I've brought up before my problem with the convertible package: it
encourages usage of partial functions. I would prefer two typeclasses,
one for guaranteed conversions and one for conversions which may fail.
In fact, that is precisely why
Erik de Castro Lopo wrote:
Hi all,
I tried sending mail to the haskell-llvm mailing list ( AT
projects.haskell.org) several days ago and today I received a bounce
message.
Looking into the issue a little further, I find that DNS has no MX
record for projects.haskell.org and
On Sun, Jan 16, 2011 at 8:26 PM, Tom Hawkins tomahawk...@gmail.com wrote:
I want to create a simple browser game using Haskell. It would be
nothing complicated: basic 2D graphics, limited sound, and minimal
network traffic.
What is the recommended medium? Flash or JavaScript+SVG?
Unity3D
I've recently had the opportunity to explain in prose what denotational
semantics are to a person unfamiliar with it. I was trying to get across
the concept of distilling the essence out of some problem domain. I
wasn't able to get the idea across so I'm looking for some simple ways
to explain
Thanks Tobias,
Without the associativity law, it would be very hard to determine the
current state of the monad.
Since the compiler, on desugaring do-blocks, will insert brackets, there
is no guarantee that the results are the same as for the brace-less and
sugar-free version of the code.
On Mon, Jan 17, 2011 at 11:38 PM, John Goerzen jgoer...@complete.org wrote:
On 01/17/2011 03:16 PM, Michael Snoyman wrote:
I've brought up before my problem with the convertible package: it
encourages usage of partial functions. I would prefer two typeclasses,
one for guaranteed conversions
Hi,
I was going through http://en.wikipedia.org/wiki/Monad_(category_theory) -
under Formal Definition I notice that monad is a Functor T:C - C
My question is - when we think of Maybe as a functor T:C - C should we
think that C here refers to Hakell types? As in,
(Int and Maybe Int are
Hello Cafe!
I have written some iteratee functions that I found to be very very
useful and I hope they will soon make it to the iteratee library.
However, I'd like to get some feedback first, particularly about the
error handling.
I'm sending this here rather than to iteratee mailing list at
49 matches
Mail list logo