[Haskell-cafe] Does anyone maintain trac.haskell.org?

2011-12-08 Thread Justin Bailey
The community Trac hosting server isn't sending email, which Trac requires. I've submitted several tickets to supp...@community.haskell.org but gotten no response. Does anyone maintain that server anymore? Justin ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Hoopl: Combining CheckingFuelMonad with State?

2011-06-27 Thread Justin Bailey
, Antoine Latter aslat...@gmail.com wrote: Hi Justin, this message might be better on the haskell-cafe list (or the excellent beginers list!). When you tried to write the get/put implementations, what problems were you running into? Antoine On Sat, Jun 25, 2011 at 7:50 AM, Justin Bailey

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

2010-10-11 Thread Justin Bailey
No immediate plans but thanks for pointing that out - I hadn't seen it yet. Similar functionality exists in the haskelldb-th package, without the special type operators. On Fri, Oct 8, 2010 at 5:19 PM, Bas van Dijk v.dijk@gmail.com wrote: Great work! I think I'm going to use it. Any plan

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

2010-10-11 Thread Justin Bailey
On Mon, Oct 11, 2010 at 7:56 AM, Christopher Done chrisd...@googlemail.com wrote: Hey that's cool, I hadn't seen that. This'll reduce my code significantly, especially mkFieldWithName. Cheers! I'm not sure if it supports the parameterization of records that you detailed in your post - let me

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

2010-10-08 Thread Justin Bailey
What is it? The HaskellDB library lets you generate SQL queries without writing any actual SQL. Unlike other query generating libraries, you choose the abstraction level. Queries can be built out of independent fragments, just like your programs. Leave hand-written, string-based, SQL

Re: [Haskell-cafe] DSL in Haskell

2009-11-16 Thread Justin Bailey
You can find teh BASIC module on hackage: http://hackage.haskell.org/package/BASIC Download .tar.gz file and you can see the source. On Mon, Nov 16, 2009 at 3:16 AM, CK Kashyap ck_kash...@yahoo.com wrote: Thanks Don, I read the PDF. I was not able to figure out how to get the BASIC module.

Re: [Haskell-cafe] Using HaskellDB on Tables that contain same column names

2009-11-02 Thread Justin Bailey
I'd recommend sending HaskellDB questions to the haskelldb users mailing list. You do need to subscribe first. Now to your question: On Sat, Oct 31, 2009 at 2:38 AM, R. Emre Başar r...@cs.bilgi.edu.tr wrote: Hi all, project (Server.name s!Server.name #         Vendor.name v!Vendor.name #    

Re: [Haskell-cafe] debugtracehelpers Re: traceM and traceShowM

2009-10-20 Thread Justin Bailey
These woudl be much more useful if they flushed the output handle after each message. Then you know your trace messages will be displayed/written to a file. On Mon, Oct 19, 2009 at 1:51 PM, Thomas Hartman tphya...@gmail.com wrote: I have this and a couple other handy functions in

Re: [Haskell-cafe] Market Place for Haskell development teams?

2009-09-30 Thread Justin Bailey
On Wed, Sep 30, 2009 at 7:54 AM, Robert Wills wrwi...@gmail.com wrote: fwiw I found it difficult getting a Haskell installation onto Windows.  Packages that would 'cabal install' just fine on Linux were much more of a pain on Windows.  Eventually, I actually found it easiest to cross compile

Re: [Haskell-cafe] Debugging Haskell code

2009-09-29 Thread Justin Bailey
On Sun, Sep 27, 2009 at 12:50 PM, Paul Moore p.f.mo...@gmail.com wrote: The problem is that I have *no idea* how to begin debugging this. In C, Python, or any other imperative language, I'd put traces in, etc. But in Haskell, I don't even know where to start. One of the standard modules is

Re: [Haskell-cafe] HList and Type signatures / synonyms

2009-09-08 Thread Justin Bailey
Gunther, I've got a little experience with HList - read below. 2009/9/6 Günther Schmidt gue.schm...@web.de: Hi, I keep accumulating values and right now use plain tuples for that. I end up with a 12 element tuple and things are a bit messy. I'd like to use extensible Records from HList

Re: [Haskell-cafe] haskelldb and Debian

2009-09-07 Thread Justin Bailey
Joachim, I am maintaing the haskelldb package and it is definitely alive and well. I don't have a Debian install to test on, but I am glad to help get things compiling. See my detailed answers below: On Mon, Sep 7, 2009 at 11:04 AM, Joachim Breitner nome...@debian.orgwrote: * Are the

Re: [Haskell-cafe] cheap in-repo local branches (just needs implementation)

2009-07-21 Thread Justin Bailey
I like it. git branches are nice to work with, and they don't the conceptual pain of creating an new repository. Things that make them nice: * When switching branches, all your files magically update (if they have not been modified). * Easy to maintain multiple branches, say stable and

Re: [Haskell-cafe] What is the point of the 'What the bleep' names in haskell?

2009-07-17 Thread Justin Bailey
System.Console.Curses? Sorry couldn't resist ... On Fri, Jul 17, 2009 at 12:18 PM, Don Stewartd...@galois.com wrote: dmehrtash: Why do Haskell programmers (and libraries) name their function like @ or # ##?    Why not use a more descriptive label for functions? Where are those functions

[Haskell-cafe] Reflections on the ICFP 2009 programming contest

2009-06-29 Thread Justin Bailey
Anyone have thoughts to share? I'd love to read others' experiences but there isn't much coming up with searches or on redditt ... I was happiest with the VM I implemented. Sadly, I wasn't able to solve any of the scenarios, but my VM ran damn fast. That didn't seem to matter so much this year as

Re: [Haskell-cafe] web musing

2009-06-05 Thread Justin Bailey
I bet they have PHP on the server already. Write your program so it takes input from standard in and writes to standard out. Then just run your executable from PHP and write to its pipe. Instant web service! On Fri, Jun 5, 2009 at 8:18 AM, Conor McBrideco...@strictlypositive.org wrote: Comrades

Re: [Haskell-cafe] can someone point me to more help about Database.HDBC.ODBC?

2009-05-29 Thread Justin Bailey
Try this: http://www.connectionstrings.com/ On Fri, May 29, 2009 at 8:01 PM, Michael P Mossey m...@alumni.caltech.edu wrote: I'm trying to use Database.HDBC.ODBC to connect to a MySQL server, and I cannot figure out the docs. I want to establish a connection, and I know the server url,

Re: [Haskell-cafe] Is Haskell a Good Choice for Web Applications? (ANN: Vocabulink)

2009-05-04 Thread Justin Bailey
Thanks for sharing your code and experience. Very interesting and a good example of how to put the libraries together to build a real app. On Mon, May 4, 2009 at 12:45 AM, Chris Forno je...@jekor.com wrote: I decided to find out for myself. You can find the results at

Re: [Haskell-cafe] ANN: Bamse-0.9.4, a Windows Installer generator

2009-04-26 Thread Justin Bailey
How does this compare to WiX? I haven't looked at the docs yet ... On Sat, Apr 25, 2009 at 4:59 PM, Sigbjorn Finne sigbjorn.fi...@gmail.com wrote: Hi, a new version of Bamse has been uploaded to hackage,  http://hackage.haskell.org/cgi-bin/hackage-scripts/package/bamse Bamse is a package

Re: [Haskell-cafe] HaskellDB is alive?

2009-02-16 Thread Justin Bailey
On Sat, Feb 14, 2009 at 2:43 AM, Felipe Lessa felipe.le...@gmail.com wrote: Hello! There was a new HaskellDB release, but I didn't see any announcement here. Is it back alive? What happened to 0.11? 0.11 existed in the repository but was never uploaded to Hackage. I updated the HDBC backends

Re: [Haskell-cafe] Haskell tutorial for pseudo users?

2009-02-02 Thread Justin Bailey
It's not a tutorial but it covers all the relvant portions you asked about. Download the package, unzip it and you'll find my Haskell Cheat Sheet PDF inside: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/CheatSheet On Mon, Feb 2, 2009 at 6:35 AM, Emil Axelsson e...@chalmers.se

[Haskell-cafe] Strange error with HDBC-odbc and MySQL

2008-12-29 Thread Justin Bailey
I have run into a weird bug with HDBC-odbc that only occurs on my unix system. When I execute a select which returns more than 435 rows twice in the same process, the second execution fails with this error message: SQL error: SqlError {seState = [\HYT00\], seNativeError = -1, seErrorMsg =

[Haskell-cafe] Strange error with HDBC-odbc and MySQL

2008-12-24 Thread Justin Bailey
I have run into a weird bug with HDBC-odbc that only occurs on my unix system. When I execute a select which returns more than 435 rows twice in the same process, the second execution fails with this error message: SQL error: SqlError {seState = [\HYT00\], seNativeError = -1, seErrorMsg =

[Haskell-cafe] Using cabal to build an exportable library?

2008-12-19 Thread Justin Bailey
I've been following this instructions at http://www.haskell.org/haskellwiki/Calling_Haskell_from_C to build a Haskell library which I can call from a C program. I'd like to use cabal to do the build in the future. Are there any examples showing how to do it?

Re: [Haskell-cafe] streaming translation using monads

2008-11-19 Thread Justin Bailey
On Tue, Nov 18, 2008 at 6:23 PM, Warren Harris [EMAIL PROTECTED] wrote: I am working on a query language translator, and although I feel that a monadic formulation would work well for this application, I've stumbled on a number of questions and difficulties that I thought the knowledgeable

Re: [Haskell-cafe] streaming translation using monads

2008-11-19 Thread Justin Bailey
On Wed, Nov 19, 2008 at 11:50 AM, Warren Harris [EMAIL PROTECTED] wrote: Now perhaps the in-memory list part was a bad conclusion since the queries can be decorated with translation functions capable of streaming the results out to another channel. However, the use of a universal type for the

Re: [Haskell-cafe] Spine-lazy multiqueue

2008-10-21 Thread Justin Bailey
On Tue, Oct 21, 2008 at 11:43 AM, Luke Palmer [EMAIL PROTECTED] wrote: Hi, I need a rather strange data structure, and I can't find any existing implementations or think of a way to implement it. It's a multiqueue, basically a map of queues. The trick is that it should be lazy in its spine

Re: [Haskell-cafe] [ANN] Haskell Cheatsheet v1.0

2008-10-11 Thread Justin Bailey
module imports from multiple modules in one place: module MyInductiveGraph ( module Data.Graph.Inductive, module EnoughFlow ) where import Data.Graph.Inductive import EnoughFlow ** 2008/10/11 Justin Bailey [EMAIL PROTECTED]: All, I've

Re: [Haskell-cafe] [ANN] Haskell Cheatsheet v1.0

2008-10-11 Thread Justin Bailey
On Sat, Oct 11, 2008 at 5:30 AM, Holger Siegel [EMAIL PROTECTED] wrote: - The explanation of the layout rule is wrong. If you define more than one value in a let declaration, then it is only required that the identifiers start on the same column. Thank you - updated. - When I started to

[Haskell-cafe] [ANN] Haskell Cheatsheet v1.0

2008-10-10 Thread Justin Bailey
All, I've created a cheat sheet for Haskell. It's a PDF that tries to summarize Haskell 98's syntax, keywords and other language elements. It's currently available on hackage[1]. Once downloaded, unpack the archive and you'll see the PDF. A literate source file is also included. If you install

Re: [Haskell-cafe] Re: Field names

2008-09-09 Thread Justin Bailey
2008/9/8 Daryoush Mehrtash [EMAIL PROTECTED] Thanks. Pattern matching and memory management in Haskell (or may be GHC implementation of it) is somewhat of a mystery to me. Are there any references that explains the underlying implementation? Daryoush Be careful what you ask for. This

Re: [Haskell-cafe] haskell core definition

2008-09-09 Thread Justin Bailey
This paper is a bit old but still very relevant: An External Representation for the GHC Core Language http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.25.1755 Click view or download at the bottom to see the paper. Also, I haven't used this utility myself yet but it pages and

Re: [Haskell-cafe] Re: Haskell stacktrace

2008-09-09 Thread Justin Bailey
2008/9/9 Pieter Laeremans [EMAIL PROTECTED]: What 's the best equivalent haskell approach ? thanks in advance, Pieter The preferred approach is to look at your code, figure out where you are using tail (or could be calling something that uses tail) and use the trace function to output logging

[Haskell-cafe] Consequences of implementing a library in Haskell for C consumption?

2008-09-04 Thread Justin Bailey
I am thinking of writing a simple library in Haskell which would be useful in a number of different scenarios, and not always with programs written in Haskell. That makes me think the library should be C-compatible and able to link with C programs. Reading over chapter 9 of the GHC manual (Foreign

Re: [Haskell-cafe] Consequences of implementing a library in Haskell for C consumption?

2008-09-04 Thread Justin Bailey
On Thu, Sep 4, 2008 at 2:52 PM, Philippa Cowderoy [EMAIL PROTECTED] wrote: Would writing Haskell to generate the C via Language.C be an option? Effectively you'd be using Haskell as a typeful macro system. Interesting idea, and I've done similar things with haskelldb (generating SQL queries).

Re: [Haskell-cafe] Thinking about an unlistN

2008-08-11 Thread Justin Bailey
On Sun, Aug 10, 2008 at 11:47 AM, Michael Feathers [EMAIL PROTECTED] wrote: unlist3 :: (a - a - a - b) - [a] - b unlist3 f (x:y:z:xs) = f x y z Oleg has written about this. Be careful, its easy to overdose on: Functions with the variable number of (variously typed) arguments

Re: [Haskell-cafe] ANN: Tutorial on information visualization and visual analytics in Haskell

2008-08-10 Thread Justin Bailey
On Sat, Aug 9, 2008 at 11:30 AM, Jefferson Heard [EMAIL PROTECTED] wrote: The link is: http://bluheron.europa.renci.org/docs/BeautifulCode.pdf Very readable and interesting. You may want to add some pictures or graphs if you weren't planning on that already. I really like how you have

Re: [Haskell-cafe] HDBC-ODBC linking problems in windows.

2008-08-01 Thread Justin Bailey
On Fri, Aug 1, 2008 at 11:09 AM, PJ Durai [EMAIL PROTECTED] wrote: Greetings everyone, I am having issues getting hdbc/odbc working on windows. When using GHC, I am not able to compile a simple program. It ends up with linker errors like I had similar issues buidling hdbc-postgres. I wrote

Re: [Haskell-cafe] More fun with micro-benchmarks and optimizations. (GHC vs Perl)

2008-07-23 Thread Justin Bailey
On Wed, Jul 23, 2008 at 11:10 AM, Corey O'Connor [EMAIL PROTECTED] wrote: I still have two questions after all this: - Can I get a Haskell implementation as fast as the Perl? - What do I need to do to get GHC's profiler to provide me usable information? Telling me that 98% of the time was in

Re: [Haskell-cafe] Portland OSCon

2008-07-22 Thread Justin Bailey
The PDX functional programming interest group will have a dinner meeting at the location below tonight. John Goerzen had asked if there would be a Haskell get together in Portland during OSCON. Here is one opportunity! -- Forwarded message -- From: Igal Koshevoy [EMAIL PROTECTED]

Re: [Haskell-cafe] Space leaks

2008-07-17 Thread Justin Bailey
On Thu, Jul 17, 2008 at 11:14 AM, Peter Gavin [EMAIL PROTECTED] wrote: evaluated anywhere. I've used retainer profiling, and the functions that are leaking space according to the profiler output are strict throughout. Have you looked at the Core code generated? That might show something that

Re: [Haskell-cafe] Profiling nested case

2008-07-10 Thread Justin Bailey
2008/7/9 Mitar [EMAIL PROTECTED]: And it took 15 s. And also the profiling was like I would anticipate. Calculating points coordinates and checking spheres takes almost all time. So any suggestions how could I build a list of objects to check at runtime and still have this third

[Haskell-cafe] CPU simulation library?

2008-04-28 Thread Justin Bailey
I want to simulate various process/thread scheduling algorithms for a small project. I'm trying to compare the performance versus power consumption of several algorithms. If anyone knows of some Haskell code along those lines I'd love to hear about it. Thanks in advance! Justin p.s. I can find

Re: [Haskell-cafe] Control.Parallel.Strategies

2008-04-09 Thread Justin Bailey
2008/4/9 Sebastian Sylvan [EMAIL PROTECTED]: main = print $ parMap rnf fib $ take 80 $ randomRs (30,35) (mkStdGen 123) Does the strategy rwhnf do it for you? Justin ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Control.Parallel.Strategies

2008-04-09 Thread Justin Bailey
On Wed, Apr 9, 2008 at 2:25 PM, Sebastian Sylvan [EMAIL PROTECTED] wrote: Nope! This is GHC 6.8.2 btw, downloaded the binary from the web site, so it's nothing strange. On my hyper-threaded CPU, your original code works fine. With -N2, I see 100% CPU. With N1, only 50%. I am also using GHC

Re: [Haskell-cafe] Control.Parallel.Strategies

2008-04-09 Thread Justin Bailey
On Wed, Apr 9, 2008 at 3:03 PM, Sebastian Sylvan [EMAIL PROTECTED] wrote: Hmm, that's curious. I compile with ghc --make -threaded partest.hs -o par.exe, and then run it with par.exe +RTS -N2 -RTS. Am I making some silly configuration error? Are you running this on windows? Yep, that's the

Re: [Haskell-cafe] testing for same characters in lists of strings

2008-04-08 Thread Justin Bailey
On Tue, Apr 8, 2008 at 10:24 AM, Jackm139 [EMAIL PROTECTED] wrote: import List same :: [[Char]] - [[Char]] - Bool same [xs] [ys] = map (normalize) [[xs]] == map (normalize) [[ys]] normalize :: [String] - [String] normalize [xs] = [(sort (nub xs))] Your pattern binding [xs] and [ys]

Re: [Haskell-cafe] FW: Haskell

2008-04-01 Thread Justin Bailey
On Tue, Apr 1, 2008 at 3:18 AM, Simon Peyton-Jones [EMAIL PROTECTED] wrote: Dear Haskell Cafe members Here's an open-ended question about Haskell vs Scheme. Don't forget to cc Douglas in your replies; he may not be on this list (yet)! Simon No one seems to have pointed out how friendly

Re: [Haskell-cafe] announce: Glome.hs raytracer

2008-03-26 Thread Justin Bailey
On Wed, Mar 26, 2008 at 2:33 PM, Jim Snow [EMAIL PROTECTED] wrote: -Memory consumption is atrocious: 146 megs to render a scene that's a 33k ascii file. Where does it all go? A heap profile reports the max heap size at a rather more reasonable 500k or so. (My architecture is 64 bit

Re: [Haskell-cafe] Any ideas for - (function type) in a simply-typed lambda calculus version of Brett Victor's Alligator Eggs game?

2008-03-20 Thread Justin Bailey
On Wed, Mar 19, 2008 at 12:48 AM, Benjamin L. Russell [EMAIL PROTECTED] wrote: However, in thinking about how to adapt the game, I am not quite sure how to incorporate the representation of - (function type): * ???: - (function type) What ideas, if any, would anybody have on how -

[Haskell-cafe] Help me understand this pattern

2008-03-20 Thread Justin Bailey
All, Yesterday I wrote some code I thought was very clever (even though I stole most of it) and I wonder what the pattern is. I have seen it in at least one other place, and I suspect it's well known to long-time Haskellers. The problem I wanted to solved was creating a combinator that could be

Re: [Haskell-cafe] Using HaskellDb to connect to PostgresSql

2008-03-19 Thread Justin Bailey
On Wed, Mar 19, 2008 at 10:55 AM, Marc Mertens [EMAIL PROTECTED] wrote: Hello, I'm trying to learn to use HaskellDb. I have managed to finally compile and install it on my linux box (I have ghc 6.8.2). But when I try to create a database description (as described in

[Haskell-cafe] Dynamic typing makes you more productive?

2008-03-18 Thread Justin Bailey
From a recent interview[1] with the guy leading Ruby development on .NET at Microsoft: You spend less time writing software than you spend maintaining software. Optimizing for writing software versus maintaining software is probably the wrong thing to do. Static typing makes it harder to

Re: [Haskell-cafe] 2-level type analysis of introducing naming into data types

2008-03-17 Thread Justin Bailey
2008/3/15 Greg Meredith [EMAIL PROTECTED]: All, The following Haskell code gives a 2-level type analysis of a functorial approach to introducing naming and name management into a given (recursive) data type. The analysis is performed by means of an What's the upshot of this? That is, what

Re: [Haskell-cafe] Network.Browser and getCookies

2008-03-17 Thread Justin Bailey
On Sun, Mar 16, 2008 at 10:21 AM, Adam Smyczek [EMAIL PROTECTED] wrote: Somehow I cannot get cookies from the Response using Network.Browser module (HTTP 3001.0.4). The cookie header part seams to be empty and getCookies returns empty list as well. Network.Browser comes with a built-in

Re: [Haskell-cafe] Space leak - help needed

2008-03-14 Thread Justin Bailey
On Thu, Mar 13, 2008 at 4:50 PM, Krzysztof Kościuszkiewicz [EMAIL PROTECTED] wrote: Retainers are thunks or objects on stack that keep references to live objects. All retainers of an object are called the object's retainer set. Now when one makes a profiling run, say with ./jobname +RTS

Re: [Haskell-cafe] Space leak - help needed

2008-03-12 Thread Justin Bailey
On Wed, Mar 12, 2008 at 12:12 PM, Krzysztof Kościuszkiewicz [EMAIL PROTECTED] wrote: I have tried both Poly.StateLazy and Poly.State and they work quite well - at least the space leak is eliminated. Now evaluation of the parser state blows the stack... The code is at

[Haskell-cafe] [pdxfunc] pdxfunc meeting: Monday, March 10, 7pm, CubeSpace

2008-03-07 Thread Justin Bailey
The Portland Functional Programming group is meeting again this Monday, March 10, at 7 p.m. Join us! -- Forwarded message -- From: Igal Koshevoy [EMAIL PROTECTED] Date: Fri, Mar 7, 2008 at 11:26 AM Subject: [pdxfunc] pdxfunc meeting: Monday, March 10, 7pm, CubeSpace To: Igal

[Haskell-cafe] If Version Control Systems were Airlines

2008-03-06 Thread Justin Bailey
Way off topic, but this is the cafe. The below is well worth reading. http://changelog.complete.org/posts/698-If-Version-Control-Systems-were-Airlines.html For the click-impaired, here's Darcs Airlines: Darcs Airlines: Unlike every other airline, this one uses physicists instead of

Re: [Haskell-cafe] Re: [Yhc] Yhc Web Service quietly opened for public testing

2008-03-05 Thread Justin Bailey
2008/3/4, Dimitry Golubovsky [EMAIL PROTECTED]: Hi, I finally got the Yhc Web Service (web-based front end to the compiler) running in public testing mode. There hasn't been any documentation written, and Haddock stuff not brought in order, but if anyone wants to just get a

Re: [Haskell-cafe] Annotating GHC assembler output?

2008-03-04 Thread Justin Bailey
On Mon, Mar 3, 2008 at 5:41 PM, Ben Lippmeier [EMAIL PROTECTED] wrote: Hi Justin. try: ghc -c file -ddump-to-file -ddump-asm Thanks, that does it. I also tried the -keep-s-files (possibly new to 6.8) and found it produces the same output. Justin

[Haskell-cafe] Annotating GHC assembler output?

2008-03-03 Thread Justin Bailey
I'm interested in seeing what kind of assembler my functions turn into. Is there a means of annotating assembler output, similar to the {#- CORE -#} pragma? Is there a trickier way of doing it? Justin ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] ANNOUNCE: hsparklines 0.1.0 - A sparklines implementation in Haskell

2008-02-27 Thread Justin Bailey
On Wed, Feb 27, 2008 at 1:37 PM, Hitesh Jasani [EMAIL PROTECTED] wrote: Sparklines are small, word sized graphs that can be interspersed with text to provide context and enhance communication. There are implementations in many languages and even some web services that will generate them on

Re: [Haskell-cafe] placeholders in hsql

2008-02-25 Thread Justin Bailey
I don't know about hsql, but I have some patches that add parametes to haskelldb. I'd be glad to send them along but I couldn't offer much support. 2008/2/24 Roman Cheplyaka [EMAIL PROTECTED]: Is there an ability to use placeholders in SQL statement using hsql? (Actually I'm interested in

[Haskell-cafe] Using template haskell to create pseudo columns

2008-02-25 Thread Justin Bailey
Adding pseudo columns to a projection is cumbersome, to say the list. For example, to add a field named hidden to a query I have to write: data Hide = Hide instance FieldTag Hide where fieldName _ = hide hideField = mkAttr Hide I wrote a little Template haskell that reduces this to:

Re: [Haskell-cafe] Selecting Array type

2008-02-21 Thread Justin Bailey
2008/2/20 Jeff φ [EMAIL PROTECTED]: I'd love to find a good article that describes the ins and outs of multi parameter types, functional dependencies, and type assertions, in enough detail to resolve these surprises. A step-by-step walk through showing how the compiler resolve a type and

Re: [Haskell-cafe] Arrows: definition of pure arr

2008-02-19 Thread Justin Bailey
On Feb 19, 2008 8:04 AM, Peter Verswyvelen [EMAIL PROTECTED] wrote: Actually, if you look at the way OO programmers design code, they usually choose long descriptive names, like FindElementByName. Most Haskell people seem more math oriented and use very short names, like fst and snd (which

Re: [Haskell-cafe] ANN: Leksah 0.1 - Haskell IDE written in Haskell

2008-02-13 Thread Justin Bailey
That looks really cool and I'd like to try it out. Can you provide links to these packages? gtk =0.9.12, glib =0.9.12, sourceview =0.9.12, binary =0.4.1 I just don't have time to track them down myself ... Justin ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Compulsory relation 1 to many from entity A to entity A

2008-02-11 Thread Justin Bailey
On Feb 9, 2008 2:12 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I'd like to build a database model with winHugs that allows a recursive relation. For example a single instance of entity components is related with at least another row of the entity components (1 to many relationship). How

[Haskell-cafe] Fwd: [pdxfunc] pdxfunc meeting: Monday, February 11, 7pm, CubeSpace (Portland, OR)

2008-02-08 Thread Justin Bailey
-- Forwarded message -- From: Igal Koshevoy [EMAIL PROTECTED] Date: Feb 8, 2008 12:01 PM Subject: [pdxfunc] pdxfunc meeting: Monday, February 11, 7pm, CubeSpace To: Igal Koshevoy [EMAIL PROTECTED] Join us at the next meeting of pdxfunc, the Portland Functional Programming Study

[Haskell-cafe] Improving 'project'

2008-01-30 Thread Justin Bailey
All, project doesn't easily let me add a few columns to an existing query (or take a few columns away). Instead, each use of project requires me to build the entire list of columns I'd like to pass on by hand. Before I go further, if there is a way to do that, please let me know. An example of

[Haskell-cafe] Fwd: Improving 'project'

2008-01-30 Thread Justin Bailey
My apologies for the cryptic email below - I meant it for the haskell-db users list. And now I have to apologize for this spam too. Should I send yet another email? ;) Justin -- Forwarded message -- From: Justin Bailey [EMAIL PROTECTED] Date: Jan 30, 2008 10:00 AM Subject

[Haskell-cafe] Re: [Haskell] ANNOUNCE: HStringTemplate -- An Elegant, Functional, Nifty Templating Engine for Haskell

2008-01-18 Thread Justin Bailey
On Jan 13, 2008 11:47 PM, Sterling Clover [EMAIL PROTECTED] wrote: HStringTemplate is a port of Terrence Parr's lovely StringTemplate (http://www.stringtemplate.org) engine to Haskell. Reading about the original library, I'm impressed. Can you add some examples to your darcs repository showing

Re: [Haskell-cafe] haskelldb basic documentation needed

2008-01-15 Thread Justin Bailey
2008/1/15 Immanuel Normann [EMAIL PROTECTED]: I don't know what pairs of strings this function needs. The API description is to unspecific: The connect function takes some driver specific name, value pairs use to setup the database connection, and a database action to run. What are the

Re: [Haskell-cafe] Getting frantic with FranTk

2008-01-14 Thread Justin Bailey
On Jan 13, 2008 5:54 AM, Torsten Otto [EMAIL PROTECTED] wrote: Howdy, with a just-in-time-learning approach I managed to teach my class of advanced high schoolers the basics of functional programming using Haskell (I had only used Scheme before). Now to show them that Haskell That is

Re: [Haskell-cafe] Consensus about databases / serialization

2008-01-02 Thread Justin Bailey
I can speak to haskelldb a little, see below: On Jan 2, 2008 3:50 AM, Peter Verswyvelen [EMAIL PROTECTED] wrote: ·regarding Haskell and databases, the page http://haskell.org/haskellwiki/Libraries_and_tools/Database_interfaces describes a few, but which are the ones that are stable and

[Haskell-cafe] Fwd: Attempt at defining typeful primary key/foreign key relationships

2007-12-31 Thread Justin Bailey
. Removing it allowed me to remove all extensions except MultiParameterTypeClasses. Justin -- Forwarded message -- From: Justin Bailey [EMAIL PROTECTED] Date: Dec 31, 2007 12:25 PM Subject: Attempt at defining typeful primary key/foreign key relationships To: [EMAIL PROTECTED

[Haskell-cafe] Haskell-cafe reply-to etiquette

2007-12-27 Thread Justin Bailey
When I joined the haskell-cafe mailing list, I was surprised to see the reply-to header on each message was set to the sender of a given message to the list, rather than the list itself. That seemed counter to other mailing lists I had been subscribed to, but I didn't think too much about it.

Re: [Haskell-cafe] Optimizing cellular automata the beauty of unlifted types

2007-12-21 Thread Justin Bailey
On Dec 20, 2007 7:42 PM, Sterling Clover [EMAIL PROTECTED] wrote: I'm curious how much of the unboxing helped performance and how much didn't. In my experience playing with this stuff, GHC's strictness analyzer has consistently been really excellent, given the right hints. Unboxed tuples are

[Haskell-cafe] Why does this blow the stack?

2007-12-21 Thread Justin Bailey
Given this function: dropTest n = head . drop n $ [1..] I get a stack overflow when n is greater than ~ 550,000 . Is that inevitable behavior for large n? Is there a better way to do it? Justin ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Why does this blow the stack?

2007-12-21 Thread Justin Bailey
On Dec 21, 2007 9:48 AM, Brad Larsen [EMAIL PROTECTED] wrote: I'm curious as well. My first thought was to try the (!!) operator. Typing Prelude [1..] !! 55 overflows the stack on my computer, as does dropTest 55. I think its [1..] which is building up the unevaluated thunk.

Re: [Haskell-cafe] Optimizing cellular automata the beauty of unlifted types

2007-12-21 Thread Justin Bailey
On Dec 21, 2007 2:55 PM, Bertram Felgenhauer [EMAIL PROTECTED] wrote: If you look at the generated machine code, you'll find that f and g are identical functions. The sole purpose of the int2Word# and word2Int# operations is to satisfy the type checker. (This is even true at the core level.

[Haskell-cafe] PHP/code generation libraries?

2007-12-12 Thread Justin Bailey
I'm working on a project which would generate a PHP data-access layer from a Haskell model. I'm wondering what libraries might be already be available for generating PHP or other types of code. The pretty-printing library is one option. Any other suggestions? Thanks in advance. Justin

Re: [Haskell-cafe] Optimizing cellular automata evaluation (round 2)

2007-11-30 Thread Justin Bailey
On Nov 29, 2007 9:11 PM, Jon Harrop [EMAIL PROTECTED] wrote: Mathematica uses a single arbitrary-precision integer to represent each generation of a 1D automaton. The rules to derive the next generation are compiled into arithmetic operations on the integer. The offloads all such work onto

Re: [Haskell-cafe] Optimizing cellular automata evaluation (round 2)

2007-11-30 Thread Justin Bailey
On Nov 29, 2007 4:45 PM, Felipe Lessa [EMAIL PROTECTED] wrote: Why don't you use an UArray of Bools? They're implemented as bit arrays internally, AFAIK (e.g. see http://www.haskell.org/haskellwiki/Shootout/Nsieve ). And then you would get rid of a lot of shifts and masks in your code --

[Haskell-cafe] Optimizing cellular automata evaluation (round 2)

2007-11-29 Thread Justin Bailey
I posted awhile back asking for help improving my cellular automata program. I am competing with a C program which evolves CAs using a fairly simple genetic algorithm. The algorithm involves evaluating 100 rules on 100 CAs, 100 times. In C this takes about 1 second. In my Haskell version, it takes

Re: [Haskell-cafe] expanded standard lib

2007-11-19 Thread Justin Bailey
On Nov 19, 2007 10:25 AM, brad clawsie [EMAIL PROTECTED] wrote: so far the haskell community has taken the cpan route for most practical libs but i wonder if a batteries included approach might help get some key libraries to a more complete state. in particular, i would like to see support for

Re: [Haskell-cafe] HTTP actions proxy server

2007-11-15 Thread Justin Bailey
On Nov 15, 2007 9:01 AM, Jim Burton [EMAIL PROTECTED] wrote: How would I go about converting the little get program at http://darcs.haskell.org/http/test/get.hs to use a proxy server? I tried adding a call to setProxy like this but it doesn't work: I think it needs to be a real URL:

Re: [Haskell-cafe] the interact function and Hugs/ghci on Windows ...

2007-11-15 Thread Justin Bailey
On Nov 15, 2007 6:25 PM, Galchin Vasili [EMAIL PROTECTED] wrote: Hello, I have a Haskell script that contains several functions that are implemented in terms on interact. When I do a function application, Hugs/ghci is waiting for input from stdin. How do one denote EOF from stdin, so

Re: [Haskell-cafe] What is the role of $!?

2007-11-14 Thread Justin Bailey
It's: f $! x = x `seq` f x That is, the argument to the right of $! is forced to evaluate, and then that value is passed to the function on the left. The function itself is not strictly evaluated (i.e., f x) I don't believe. Justin ___ Haskell-Cafe

Re: [Haskell-cafe] Fwd: Trouble using HDBC-postgres on Windows - can'tfind libpq.dll

2007-11-13 Thread Justin Bailey
On Nov 13, 2007 7:09 AM, Bayley, Alistair [EMAIL PROTECTED] wrote: You're using runghc, so I guess that must use ghci, or something equivalent. You may find, now that you've changed the cabal entry to libpq, that you can no longer build with ghc (the compiler). But my memory of this is hazy.

Re: [Haskell-cafe] let vs. where

2007-11-13 Thread Justin Bailey
On Nov 13, 2007 10:56 AM, John Lato [EMAIL PROTECTED] wrote: I know there are several important differences between let-expressions and where-clauses regarding scoping and the restriction of where to a top-level definition. However, frequently I write code in which One place I find it useful

[Haskell-cafe] Performance help

2007-11-13 Thread Justin Bailey
I've been working on a program over the last few days to evolve cellular automata rules using a genetic algorithm. Luckily, this email has nothing to do with CAs but everything to do with Haskell performance. For those who don't know, a CA is represented as a row of cells, where each can be

Re: [Haskell-cafe] Performance help

2007-11-13 Thread Justin Bailey
On Nov 13, 2007 2:21 PM, Ryan Ingram [EMAIL PROTECTED] wrote: Never mind, I realized this is a ring buffer with `mod` s. That's another slow operation when you're doing code as tight as this. If you can guarantee the ring is a power of 2 in size you can use a mask instead, or use my

Re: [Haskell-cafe] Performance help

2007-11-13 Thread Justin Bailey
On Nov 13, 2007 2:49 PM, Stefan O'Rear [EMAIL PROTECTED] wrote: About how wide are your rules usually? 7 bits (3 neighbors on each side plus the current cell). Justin ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Performance help

2007-11-13 Thread Justin Bailey
I implement bit shifting to get the next rule, as you suggested, and that cut my run time by 75%. It went from 200 seconds to do 100 rules on 100 CAs to 50 seconds. Amazing. Justin ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] Trouble using HDBC-postgres on Windows - can't find libpq.dll

2007-11-12 Thread Justin Bailey
I've compiled HDBC 1.0.1 and HDBC-postgresql-1.0.1 under Windows with a little tweaking. However, when I try to run the tests I get this error: runghc -package HDBC-postgresql runtests.hs ghc.exe: can't load .so/.DLL for: pq (addDLL: unknown error) libpq.dll is in my path, and I added the

[Haskell-cafe] Fwd: Trouble using HDBC-postgres on Windows - can't find libpq.dll

2007-11-12 Thread Justin Bailey
-- From: Justin Bailey [EMAIL PROTECTED] Date: Nov 12, 2007 3:41 PM Subject: Trouble using HDBC-postgres on Windows - can't find libpq.dll To: Haskell Cafe haskell-cafe@haskell.org I've compiled HDBC 1.0.1 and HDBC-postgresql-1.0.1 under Windows with a little tweaking. However, when I try

[Haskell-cafe] Trouble using unboxed arrays

2007-11-10 Thread Justin Bailey
I would like to create a data structure that uses an unboxed array as one of its components. I would like the data structure to be parameterized over the type of the elements of the array. Further, I'd like to build the array using runSTUArray. I can't make the code work though. My naive approach:

Re: [Haskell-cafe] Re: Doubly-linked zipper list w/ insert implementation

2007-11-10 Thread Justin Bailey
On Nov 10, 2007 12:24 PM, apfelmus [EMAIL PROTECTED] wrote: Note that depending on your concrete setting, you may not need a fancy ring structure for cellular automata. And with simple automata like I realized that I never updated my automata once a row was created, and ended up using an

  1   2   >