Re: [Haskell-cafe] Knight Capital debacle and software correctness

2012-08-04 Thread Florian Weimer
* Vasili I. Galchin: > I am going to make an assumption except for Jane Street > Capital all/most "Wall Street" software is written in an imperative > language. I expect that most of it is written in Excel, which doesn't really qualify as an imperative language. High-frequency trading i

Re: [Haskell-cafe] Best way to build a GHC backend?

2012-07-08 Thread Florian Weimer
* Niklas Larsson: > http://www.haskell.org/haskellwiki/GHC/FAQ#Why_isn.27t_GHC_available_for_.NET_or_on_the_JVM.3F > "It would make a lot of sense to give GHC a .NET or JVM back end, and > it's a question that comes up regularly. The reason that we haven't > done it here, at GHC HQ, is because it'

Re: [Haskell-cafe] Toy implementation of the STG machine

2011-06-11 Thread Florian Weimer
* Thomas Schilling: > Does Bernie Pope's http://www.haskell.org/haskellwiki/Ministg work for you? MiniSTG might do it, I will definitely look at it. The source repository is gone, but there's still a tarball on Hackage. I had hoped for something more interactive, though. __

[Haskell-cafe] Toy implementation of the STG machine

2011-06-11 Thread Florian Weimer
I'm looking for a simple implementation of the STG machine to do some experiments, preferably implemented in something with memory safety. Performance is totally secondary. I'm also not interested in garbage collection details, but I do want to look at the contents of the various stacks.

Re: [Haskell-cafe] Type System vs Test Driven Development

2011-01-07 Thread Florian Weimer
* Jonathan Geddes: > When I write Haskell code, I write functions (and monadic actions) > that are either a) so trivial that writing any kind of unit/property > test seems silly, or are b) composed of other trivial functions using > equally-trivial combinators. You can write in this style in any

Re: [Haskell-cafe] Taking the TLS package for a spin ... and failing

2010-12-14 Thread Florian Weimer
* Mads Lindstrøm: > I got it to work :) But there seems to be some bugs in the Haskell > server certificate handling. It seems that TLS do not transfer the ST > (state, as in California) parameter in the X509 subject field. It also > seems that the Haskell server do not send the email-address. An

Re: [Haskell-cafe] gtk2hs and hmake websites

2010-12-12 Thread Florian Weimer
* Joachim Breitner: > I get regular error message from some Debian tools that check for new > upstream versions that it cannot find http://haskell.org/hmake, and > http://haskell.org/gtk2hs seems to be gone as well since the recent move > of haskell.org. Is that temporary or will these projects ha

Re: [Haskell-cafe] Avoiding the Y combinator for self-referencing types

2010-12-12 Thread Florian Weimer
* Miguel Mitrofanov: > Not sure if that's what you need: > > data NodeF f = Node {name :: String, refs :: [f (NodeF f)]} > > newtype Const a b = Const a > newtype Id a = Id a > > type NodeS = NodeF (Const String) > type Node = NodeF Id Thanks for the suggestion. Yes, the resulting syntax looks b

[Haskell-cafe] Avoiding the Y combinator for self-referencing types

2010-12-12 Thread Florian Weimer
Suppose I've got some named objects which reference other objects by name: > data NodeS = NodeS {nameS :: String, refsS :: [String]} Through name resolution, the strings are translated to the actual nodes they denote: > data Node = Node {name :: String, refs :: [Node]} > resolve :: [NodeS] -> Ma

Re: [Haskell-cafe] Manatee Video.

2010-11-28 Thread Florian Weimer
* Andy Stewart: > Many people ask "What's Manatee?" > > A video worth a thousand words : > here is video (select 720p HD) > http://www.youtube.com/watch?v=weS6zys3U8k Ahem: | This video contains content from UMG. It is not available in your | country. _

[Haskell-cafe] Return stack buffer vs Haskell compilers

2010-11-28 Thread Florian Weimer
Are there any Haskell compilers which use a calling convention which is friendly to return stack buffers found in many modern CPUs? Such a calling convention uses CALL/RET pairs for function calls. Tail calls are implemented with JMP and may require shuffling the stack, including the return addre

Re: [Haskell-cafe] In what language...?

2010-11-28 Thread Florian Weimer
* Andrew Coppin: > On 26/10/2010 07:54 PM, Benedict Eastaugh wrote: >> On 26 October 2010 19:29, Andrew Coppin wrote: >>> I also don't know exactly what "discrete mathematics" actually covers. >> Discrete mathematics is concerned with mathematical structures which >> are discrete, rather than con

Re: [Haskell-cafe] In what language...?

2010-11-28 Thread Florian Weimer
* Gregory Collins: > * Andrew Coppin: >> Hypothesis: The fact that the average Haskeller thinks that this >> kind of dense cryptic material is "pretty garden-variety" notation >> possibly explains why normal people think Haskell is scary. > > That's ridiculous. You're comparing apples to oranges:

Re: [Haskell-cafe] Re: Re: Bulletproof resource management

2010-11-28 Thread Florian Weimer
* Ben Franksen: >> The other library might provide something like IORef, and then >> it's impossible to uphold static guarantees. > > The way it is implemented for instance in the regions package, you can lift > IO actions into the Region monad, as there are > > instance MonadCatchIO pr => Monad

[Haskell-cafe] Error handling with safer-file-handling

2010-11-15 Thread Florian Weimer
How am I supposed to write an exception handle for an invocation of System.IO.SaferFileHandles.openFile? Currently, I have got this: case req of Open path -> do handle <-openFile (asAbsPath path) ReadMode liftIO $ forcePut result Success run handle Follwing safer-file-han

Re: [Haskell-cafe] Bulletproof resource management

2010-10-15 Thread Florian Weimer
* Henning Thielemann: > Some open/close pairs have corresponding 'with' functions, that are > implemented using Exception.bracket. You can also use them within > GHCi. I think using both manual resource deallocation and finalizers > makes everything more complicated and more unreliable. It seems

Re: [Haskell-cafe] ANNOUNCE: tls, native TLS/SSL protocol implementation

2010-10-09 Thread Florian Weimer
* Donn Cave: > Quoth Florian Weimer , > >>> wikipedia: "Managed code is a differentiation coined by Microsoft to >>> identify computer program code that requires and will only execute >>> under the "management" of a Common Language Runtim

Re: [Haskell-cafe] Re: Bulletproof resource management

2010-10-08 Thread Florian Weimer
* Ben Franksen: > You might be interested in Lightweight Monadic Regions > > http://okmij.org/ftp/Haskell/regions.html#light-weight > > which solve the problem (IMHO) in a much cleaner way, i.e. w/o explicit > closing and also w/o using finalizers. Is this approach composeable in the sense th

[Haskell-cafe] Bulletproof resource management

2010-10-08 Thread Florian Weimer
At least in my experience, in order to get proper resource management for things like file or database handles, you need both a close operation and a finalizer registered with the garbage collector. The former is needed so that you can create resources faster than the garbage collector freeing the

Re: [Haskell-cafe] ANNOUNCE: tls, native TLS/SSL protocol implementation

2010-10-08 Thread Florian Weimer
* Donn Cave: > wikipedia: "Managed code is a differentiation coined by Microsoft to > identify computer program code that requires and will only execute > under the "management" of a Common Language Runtime virtual machine > (resulting in Bytecode)." I like this term, I apply it by e

Re: [Haskell-cafe] ANNOUNCE: tls, native TLS/SSL protocol implementation

2010-10-08 Thread Florian Weimer
* Vincent Hanquez: > Native means the implementation is in haskell, and the library is > not using another implementation (in another language) to do the > work: either through FFI as a binding, or as a wrapper to an > external program. I can see how this terminology makes sense, but it's the opp

Re: [Haskell-cafe] Re: String vs ByteString

2010-08-14 Thread Florian Weimer
* Bryan O'Sullivan: > If you know it's text and not binary data you are working with, you should > still use Data.Text. There are a few good reasons. > >1. The API is more correct. For instance, if you use Text.toUpper on a >string containing latin1 "ß" (eszett, sharp S), you'll get the >

Re: [Haskell-cafe] Re: How many "Haskell Engineer I/II/III"s are there?

2010-02-14 Thread Florian Weimer
* Simon Marlow: > In a sense the GC *is* deterministic: it guarantees to collect all the > unreachable garbage. But I expect what you're referring to is the > fact that the garbage remains around for a non-deterministic amount of > time. To me that doesn't seem to be a problem: you could run the

Re: [Haskell-cafe] Lisp like symbols in haskell

2009-12-08 Thread Florian Weimer
* jean-christophe mincke: > Has there already been attempts to introduce lisp like symbols in haskell? Do you mean something like Objective Caml's polymorphic variants? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailma

Re: [Haskell-cafe] Type family oddity

2008-10-05 Thread Florian Weimer
* Claus Reinke: >> -- erase_range :: (Sequence s) => RangeTrait s -> IO (RangeTrait s) > > This can't work, as you can see after desugaring: > >> -- erase_range :: (Sequence s,RangeTrait s~rs) => rs -> IO rs > > There is nowhere to get 's' from, unless you start applying type families > backwards,

[Haskell-cafe] Type family oddity

2008-10-04 Thread Florian Weimer
I can't figure out why the following code doesn't compile with the October 2n GHC 6.10 beta (-XTypeFamilies -XFlexibleContexts) when the type declaration is not commented out. module T where type family RangeTrait c class InputRange r where remaining :: r -> Bool advance :: r -> r class

Re: [Haskell-cafe] Kind-agnostic type classes

2008-10-03 Thread Florian Weimer
* Luke Palmer: >> For instance, I've got >> >> class Assignable a where >>assign :: a -> a -> IO () >> >> class Swappable a where >>swap :: a -> a -> IO () >> >> class CopyConstructible a where >>copy :: a -> IO a >> >> class (Assignable a, CopyConstructible a) => ContainerType a >> >>

Re: [Haskell-cafe] Kind-agnostic type classes

2008-10-03 Thread Florian Weimer
* Derek Elkins: > On Fri, 2008-10-03 at 12:22 +0200, Florian Weimer wrote: >> I'm trying to encode a well-known, informally-specified type system in >> Haskell. What causes problems for me is that type classes force types >> to be of a specific kind. The system I&#

[Haskell-cafe] Kind-agnostic type classes

2008-10-03 Thread Florian Weimer
I'm trying to encode a well-known, informally-specified type system in Haskell. What causes problems for me is that type classes force types to be of a specific kind. The system I'm targeting however assumes that its equivalent of type classes are kind-agnositic. For instance, I've got class As

Re: [Haskell-cafe] Baffled by Disk IO

2006-07-30 Thread Florian Weimer
* SevenThunders: > OK it was stupid. Apparently GHC behaves differently according to what the > name of the high level source file is. If I renamed test.hc to main.hc > everything works the same as GHCi. I probably should actually read the > manual some day. Some operating systems have a "test

Re: [Haskell-cafe] Bit fiddling

2005-05-17 Thread Florian Weimer
* robert dockins: > If you want C compatibility, you need > > http://www.haskell.org/ghc/docs/latest/html/libraries/base/Data.Array.Storable.html > > which is similar. You then use the "withStorableArray" to call out to > your C functions. Looks exactly like what I need. I'll give it a try and

Re: [Haskell-cafe] Bit fiddling

2005-05-17 Thread Florian Weimer
* robert dockins: > Probably you have seen this already, but I thought I'd mention it on the > off-chance you missed it: > > http://www.haskell.org/ghc/docs/latest/html/libraries/base/Data.Bits.html > http://www.haskell.org/ghc/docs/latest/html/libraries/base/Data.Word.html > > Probably you'll wa

[Haskell-cafe] Bit fiddling

2005-05-17 Thread Florian Weimer
I'm toying a bit with Haskell and wondering what's the best way to implement bit fiddling. Most of my applications involve serializing and deserializing small blobs (IP packets, for instance), and after browsing the GHC library documentation, I'm not sure which appraoch I should use. That's why I

[Haskell-cafe] Re: [darcs-users] fptools in darcs now available

2005-05-16 Thread Florian Weimer
* John Goerzen: >> Would you please add tags regularly, so that the _darcs/inventory file >> does not exceed some moderate size? It's currently at 4 MB, which >> seems to be a tad bit excessive to download, just to check that there >> are no new patches available. > > Yes, I can do that more regu

[Haskell-cafe] Re: [darcs-users] fptools in darcs now available

2005-05-16 Thread Florian Weimer
* John Goerzen: > Anyway, comments welcome. > > I intend to sync this up with the CVS sources every few days until > either 1) the fptools people adopt darcs, or 2) it becomes apparent > that it's not being useful for people. Would you please add tags regularly, so that the _darcs/inventory file