Re: [Haskell-cafe] Haddock GSOC project progress

2013-07-31 Thread Mats Rauhala
Is Data.Text as an extra dependency really that bad? Remember that you
are parsing comments, prose, human produced text, where Data.Text is way
more useful than ByteString.

-- 
Mats Rauhala
MasseR

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] ANN: Nomyx 0.1 beta, the game where you can change the rules

2013-02-27 Thread Mats Rauhala
The user id is not necessarily the problem, but rather that you can
impose as another user. For this, one solution is to keep track of a
unique (changing) user token in the cookies and use that for verifying
the user.

-- 
Mats Rauhala
MasseR


signature.asc
Description: Digital signature
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] New in haskell for old-timers?

2012-03-30 Thread Mats Rauhala
I ended up discussing in university with the person next to me about
Haskell. He's an old-timer who's even been to conferences, but it's a
long time since he's looked at Haskell. He asked me to write what's new
in Haskell, but I'm not too experienced myself.

I didn't realize asking how long it's been for him, but he mentioned
about new fronts in optimizing compilers and specifically mentioned a
compiler that could compile to legible C. I've been following Haskell
only for a couple of years, so my intuition tells me that he means
`-fvia-c`, and I mentioned to him that it's about to be deprecated and
replaced with the llvm back-end. I also mentioned hackage, but he hadn't
heard of it.

He mentioned that he'd like to use Haskell for his master's thesis, but
we got a interrupted when he said what it was about. Formal something or
other.

I trust you fellow Haskellers have better understanding of the time
frame, and can think of something interesting new features, libraries,
communities etc. that's since been emerged. I ask you to give me
something interesting to give him and reinstate his interest.

-- 
Mats Rauhala
MasseR


pgpz7LMhpsqUI.pgp
Description: PGP signature
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] New in haskell for old-timers?

2012-03-30 Thread Mats Rauhala
On 11:57 Fri 30 Mar , Brandon Allbery wrote:
 
 The legible C thing is probably jhc ( http://repetae.net/computer/jhc/ ).
  It's GHC's *illegible* registerized C that is being phased out; the
 slightly-more-legible ANSI C mode used for porting is staying, though.
 

Oh wow, I thought jhc was discontinued, but just checked the
repositories and mailing lists and it's alive and well. No idea where I
got the idea that it was discontinued. Going a little bit on tangent
here, but if I understood correctly, jhc is meant to do more
optimization. How does this compare to for example ghc?


-- 
Mats Rauhala
MasseR


pgpcc97i4vS4a.pgp
Description: PGP signature
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] ANNOUNCE: HaskellDB 2.0: Scrap your SQL strings

2012-02-21 Thread Mats Rauhala
You mentioned that haskelldb was the first library where you weren't
forced to break the abstraction. Do you have a solution to a situation
where you might want to retreive the last inserted id after an insert?

-- 
Mats Rauhala
MasseR


pgp8ofM61Yw5k.pgp
Description: PGP signature
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] podcast?

2012-02-21 Thread Mats Rauhala
On 09:05 Wed 15 Feb , serialhex wrote:
 Does anybody know of any good haskell/fp podcasts out there?  i dont know
 if my googling skillz are just failing me, but i can't seem to find
 anything.  thanks all!
 hex

Out of my head I can think of ThinkRelevance podcast at
http://thinkrelevance.com/blog/tags/podcast


pgpSaQMQOTtoX.pgp
Description: PGP signature
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] podcast?

2012-02-21 Thread Mats Rauhala
On 15:15 Tue 21 Feb , Christopher Done wrote:
 I recently thought it would be Pretty Cool to make an FP podcast, sort
 of a spoken Haskell Weekly News but covering all FP, blogs, packages,
 conferences, papers, standards, mailing lists, even stackoverflow,
 whatever's interesting in FP. We could use Gtalk or Mumble (both quite
 high quality audio) to conduct it and cut it up in audacity.

I for one would be an interested listener

-- 
Mats Rauhala
MasseR


pgpmnNX9qw0my.pgp
Description: PGP signature
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] HaskellDB DB Layout Description

2011-07-15 Thread Mats Rauhala
On 18:12 Sat 09 Jul , Tom Murphy wrote:
 Hi,
  I've found good explanations of the HaskellDB combinators, but I
 can't find good information about how to correctly define the database
 layout. Can anyone point me to a resource, or give a quick example?
 
 Thanks!
 Tom

Hello,

I wrote a bit lengthy introduction to haskelldb at
http://users.utu.fi/machra/posts/2011-07-15-haskelldb.html. Could you
check it out, and maybe comment whether it was helpful, or if something
is falsy/doesn't work for you?

-- 
Mats Rauhala
MasseR


pgpIJJ6WlM8Nn.pgp
Description: PGP signature
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] HaskellDB DB Layout Description

2011-07-10 Thread Mats Rauhala
On 18:12 Sat 09 Jul , Tom Murphy wrote:
 Hi,
  I've found good explanations of the HaskellDB combinators, but I
 can't find good information about how to correctly define the database
 layout. Can anyone point me to a resource, or give a quick example?
 
 Thanks!
 Tom
 
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe

I don't have any examples at hand, but I'll look through the api with
you.

There are three ways to create the dblayout interface, manually, through
dbinfo or through template haskell.

The vanilla way is to use the DBInfo(3) module to describe your database
layout. It can also be used to create the database schema, but as the
dbinfo language is very restricted, I don't recommend it.

DBInfo {
dbName DatabaseName
opts = DBOptions {
useBString = False
  , makeIdent = mkIdentPreserving }
tbls = [TInfo {tname = tablename
   cols = [CInfo {cname = columnname,
  descr = (IntT, False)}]
  }
   ]
  }

This would create a layout describing a database called DatabaseName
with one table tablename with one column columnname which is of type
int and can't be null. The mkIdentPreserving is an undocumented function
in (5)

The description then needs to be created into module files with
dbInfoToModuleFiles(4). This creates a root DatabaseName.hs file and
DatabaseName directory. The root file is uncompilable and can be safely
removed.

The fact that there is two stages for the compilation, makes it
difficult to compile. I believe this restriction is because haskelldb
was created when there was no template haskell. With template haskell
(2) you could do the following:

$(mkDbDirectTable tablename [(columnname, [t|Int|])]

I don't know how to specify whether the field can be null or not, but at
least this way you get your dblayout descriptions at compile time.



[1] http://hackage.haskell.org/package/haskelldb
[2] http://hackage.haskell.org/package/haskelldb-th
[3] 
http://hackage.haskell.org/packages/archive/haskelldb/2.1.1/doc/html/Database-HaskellDB-DBSpec-DBInfo.html
[4] 
http://hackage.haskell.org/packages/archive/haskelldb/2.1.1/doc/html/Database-HaskellDB-DBSpec-DBSpecToDBDirect.html
[5] 
http://hackage.haskell.org/packages/archive/haskelldb/2.1.1/doc/html/src/Database-HaskellDB-DBSpec-PPHelpers.html

-- 
Mats Rauhala
MasseR


pgp4JOTyhvDIn.pgp
Description: PGP signature
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Call for GUI examples - Functional Reactive Programming

2011-07-08 Thread Mats Rauhala
Before asking the stackoverflow question, I tried to create a gui with
three text fields, which would be reflected on the other side as labels.
The data the fields would represent was:

data Person = Person {
name :: String
,   age :: Int
,   location :: Maybe String
}

I believe this is a good example as this shows converting String - Int,
and handling values that might or might not exist.

-- 
Mats Rauhala
MasseR


pgpUhBLAHtHQa.pgp
Description: PGP signature
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Call for GUI examples - Functional Reactive Programming

2011-07-08 Thread Mats Rauhala
On 11:09 Fri 08 Jul , David Virebayre wrote:
 2011/7/8 Heinrich Apfelmus apfel...@quantentunnel.de:
 
  I want to hear!
  Just a description. :) You can also mention why you find it interesting etc.
 
 Well I have an old program sitting around. Anyway, it's very simple :
 
 The GUI has
 - a window with a menu bar, 2 directory selects (source and dest
 directories), 1 file select ( the 'patch file'), 1 textview to write
 logging information, and a 'Convert' button to start.
 - an about window that opens from a 'About...' menuitem
 - A status bar.
 
 The convert button stats an action that scans all applicable files in
 a source directory, converts them and writes them in a destination
 directory.
 
 The conversion itself is irrelevant to the topic, in my case it
 consists in searching for patterns in the file and replacing them,
 according to a list of changes read from a file, the 'patch file'.
 
 The progression is logged in the textview: file processed, strings
 replaced. In the status bar, a percentage bar grows.

This provides another interest. wxHaskell has file dialogs, which are
not events, but instead raw IO actions.

-- 
Mats Rauhala
MasseR


pgpuaYFsyvY39.pgp
Description: PGP signature
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Twidge and identi.ca

2011-06-08 Thread Mats Rauhala
Does twidge still support identi.ca? I was able to auth, but after that
every single command returns 'twidge: user error (Bad response: 404)'.
The commands work for twitter.

-- 
Mats Rauhala
MasseR


pgpU14ltgvUZK.pgp
Description: PGP signature
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Distributing Haskell GUI apps for Windows/MacOS?

2011-06-07 Thread Mats Rauhala
There is bamse [1], but it's last been updated in 2009, and has
build-failures for 6.10, 6.12 and 7.0. It has some dependency weirdness,
like wanting both base = 4 and  4.

I don't know how difficult it would be to upgrade it to modern haskell,
but I'm sure the changes would be appreciated.

[1] http://hackage.haskell.org/package/bamse

-- 
Mats Rauhala
MasseR


pgpbVRfuirO3s.pgp
Description: PGP signature
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Using cmake with haskell

2011-05-13 Thread Mats Rauhala
A little self-promotion, but I wrote this today:
http://users.utu.fi/machra//posts/2011-05-13-environment.html

A post about interfacing vim and cabal-dev.


pgpE2vFrpuUPH.pgp
Description: PGP signature
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Painless parallelization.

2011-04-19 Thread Mats Rauhala
You could look into par and pseq combinators and parallel strategies[1].
Real world haskell[2] has some examples on the usage.

1. http://hackage.haskell.org/package/parallel
2. 
http://book.realworldhaskell.org/read/concurrent-and-multicore-programming.html

-- 
Mats Rauhala


pgpeZ4z9l0SI6.pgp
Description: PGP signature
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haskell on-line judge for Programming Challenges / Contests ?

2011-04-14 Thread Mats Rauhala
http://codechef.com accepts Haskell entries.


pgpa3li6zz0gF.pgp
Description: PGP signature
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe