For the following expression, I would consider a True result a false positive:
let x = x :: Int in x == x
Dean
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Hi Nathan,
| It was purely just for demonstration. I did update the code with a few more
| comments, but the enumerator package may not be the easiest thing to grok.
| You might try putting up your current code and someone might be able to
| recommend a better or easier approach.
Thank you very m
It was purely just for demonstration. I did update the code with a few more
comments, but the enumerator package may not be the easiest thing to grok.
You might try putting up your current code and someone might be able to
recommend a better or easier approach.
If the git pack headers have lengths
On Wed, Jul 20, 2011 at 23:53, Richard O'Keefe wrote:
> On 21/07/2011, at 9:08 AM, Paul Johnson wrote:
> > I would have thought that the compiler, as a matter of optimisation,
> could insert a check to see if (==) is comparing an object with itself. The
> only way I can see this breaking is with
Hi Nathan,
Thank you very for the solution, since I am somewhat new to haskell, I
am taking some time to digest it :). But it seems that you are using
header -> streamLength to find the length of a single entry. However this
info is not present in the protocol I am parsing (git server pack file
On 21/07/2011, at 9:08 AM, Paul Johnson wrote:
> I would have thought that the compiler, as a matter of optimisation, could
> insert a check to see if (==) is comparing an object with itself. The only
> way I can see this breaking is with perverse instances of Eq that would
> return False for
> There's an odd error every time I try to run this code:
>
>
> sqlReaderIO = do
> handle <- connectSqlite3 "table2.db"
> scoresSql <- quickQuery' handle "SELECT * FROM pachinkoScores ORDER BY
> score, name" []
> let scores = map (map (\x -> fromSql x :: String)) scoresSql
> return
> When I remove the "scoresPassed <- sqlReaderIO" line, the code run
> smoothly. Nothing else references "scoresPassed". The ghc, however,
> gives me this error when the line is included:
I'm not 100% sure, but what if you put a liftM or liftIO in somewhere?
> (liftM output) . renderHtml $ ...
Hello there,
There's an odd error every time I try to run this code:
import Network.CGI
import Text.XHtml
import qualified Text.Html as H
import Database.HDBC
import Database.HDBC.Sqlite3
import System.Random
...
sqlReaderIO = do
handle <- connectSqlite3 "table2.db"
scoresSql <- quickQu
On Wed, Jul 20, 2011 at 11:50 AM, rahul wrote:
> Unfortunately the binary protocol itself is external, so can't use a
> different
> type of compression
>
Perhaps something like this would work: https://gist.github.com/1096039
I didn't test to make sure it works, but you could probably hack toget
On 7/20/11 1:22 PM, Chris Smith wrote:
> If the latter, then it seems this would be a
> pretty serious garbage collector bug, and that it would be impossible
> that such a bug wouldn't also break other code that doesn't use pointer
> equality at all. After all, we've got a running user thread, whi
On 7/20/11 5:08 PM, Paul Johnson wrote:
> I would have thought that the compiler, as a matter of optimisation,
> could insert a check to see if (==) is comparing an object with itself.
> The only way I can see this breaking is with perverse instances of Eq
> that would return False for "f == f".
L
I would have thought that the compiler, as a matter of optimisation,
could insert a check to see if (==) is comparing an object with itself.
The only way I can see this breaking is with perverse instances of Eq
that would return False for "f == f".
Paul.
On 07/20/2011 04:51 AM, Nikhil A. Pat
2011/7/20 Sergey Mironov :
> Hi. I was searching for info about building ghc on ARM arch. I already
> know about [1] approach, and also saw debian binaries [2], but I am
> afraid I have to compile ghc by myself this time, since our system
> uses incompatible libc, so my question is addressed to gen
Hi. I was searching for info about building ghc on ARM arch. I already
know about [1] approach, and also saw debian binaries [2], but I am
afraid I have to compile ghc by myself this time, since our system
uses incompatible libc, so my question is addressed to gentoo users
and sympathetic :) Did an
Hi,
| > I am trying to parse a binary stream with the format for one entry
| >[headers, zlib compressed content] , with multiple entries.
| >I can use the Zlib library to get the content for the first entry after
| >the headers, but I cannot find a way to get the offset to start parsing
| >for th
David Barbour wrote:
> On Wed, Jul 20, 2011 at 10:40 AM, Chris Smith wrote:
> > The point, I think, is that if pointer equality testing really does what
> > it says, then there shouldn't *be* any correct implementation in which
> > false positives are possible. It seems the claim is that the garb
On Wed, Jul 20, 2011 at 13:40, Chris Smith wrote:
> On Wed, 2011-07-20 at 13:32 -0400, Brandon Allbery wrote:
> > of them *will* be safe) — but there is no way for it to crowbar
> > pointer equality tests in that case.
>
> I have looked up crowbar in a number of dictionaries of slang and
> inform
> have not updated the first pointer yet. But if that's the case, and
> it's executing arbitrary user code that may refer to that memory, then
> the garbage collector contains race conditions!
Not necessarily, if the garbage collection and the move happened
between taking the pointers of the two
On Wed, Jul 20, 2011 at 10:40 AM, Chris Smith wrote:
> I have looked up crowbar in a number of dictionaries of slang and
> informal usage... and still have no idea what you just said. Can you
> reword it?
>
Crowbars offer 'leverage'.
>
> The point, I think, is that if pointer equality testing
On Wed, 2011-07-20 at 13:32 -0400, Brandon Allbery wrote:
> I think it's more correct to say that the compiler is free to do
> things that would lead to false positives if it knows that it's safe
> to do so (and purity means it can find more of those cases, and more
> of them *will* be safe) — but
On Wed, Jul 20, 2011 at 13:22, Chris Smith wrote:
> On Tue, 2011-07-19 at 23:33 -0700, Carl Howells wrote:
> > False positives and false negatives are both possible, depending on GC
> > timing. Don't use it, unless you know why it can result in both false
> > positives and false negatives, and y
On Wed, 20 Jul 2011, Brandon Allbery wrote:
Ports is build-from-source, so every package is what Linux calls a -dev package.
The OP might need to make sure that cabal knows to look in /usr/local for
libraries.
I see. If net-snmp supports pkg-config then all such problems should be
solvable
On Tue, 2011-07-19 at 23:33 -0700, Carl Howells wrote:
> False positives and false negatives are both possible, depending on GC
> timing. Don't use it, unless you know why it can result in both false
> positives and false negatives, and you know why neither of those are
> bad for your use case.
C
On Wed, Jul 20, 2011 at 10:48 AM, Thiago Negri wrote:
> Hello all,
> I'm a newbie at Haskell and I was not aware of this problem.
> So, equality comparison can run into an infinite-loop?
>
> My current knowledge of the language tells me that everything is
> Haskell is a thunk until it's value is r
2011/7/20 Henning Thielemann
> On Wed, 20 Jul 2011, Комар Максим wrote:
>
>> I want to install package NetSNMP:
>>
>>> cabal install NetSNMP
>>>
>> Resolving dependencies...
>> Configuring NetSNMP-0.1.6...
>> cabal: Missing dependency on a foreign library:
>> * Missing C library: netsnmp
>>
>> Pa
Quoting Thiago Negri :
> Hello all,
> I'm a newbie at Haskell and I was not aware of this problem.
> So, equality comparison can run into an infinite-loop?
Yes, comparing infinite lists is a non-terminating computation.
> My current knowledge of the language tells me that everything is
> Haskel
Hello all,
I'm a newbie at Haskell and I was not aware of this problem.
So, equality comparison can run into an infinite-loop?
My current knowledge of the language tells me that everything is
Haskell is a thunk until it's value is really needed.
Is it possible to implement (==) that first check th
Carl Howells wrote:
> On Tue, Jul 19, 2011 at 11:14 PM, yi huang wrote:
> > 2011/7/20 Eugene Kirpichov
> >>
> >> reallyUnsafePointerEq#, and it really is as unsafe as it sounds :)
> >>
> > Why is it so unsafe? i can't find any documentation on it.
> > I think always compare pointer first is a goo
On Wed, 20 Jul 2011, rahul wrote:
Hi Guys,
I am trying to parse a binary stream with the format for one entry
[headers, zlib compressed content] , with multiple entries.
I can use the Zlib library to get the content for the first entry after
the headers, but I cannot find a way to get the of
Hi Guys,
I am trying to parse a binary stream with the format for one entry
[headers, zlib compressed content] , with multiple entries.
I can use the Zlib library to get the content for the first entry after
the headers, but I cannot find a way to get the offset to start parsing
for the second
On Tue, 19 Jul 2011 21:04:58 +0530, Rohit Agrawalla
wrote:
Non-text part: multipart/mixed
Non-text part: multipart/alternative
> I am new to haskell and the haskell fgl (functional graph library). l am
> looking for some examples of the haskell fgl. Would appreciate any pointers
> regarding the s
On Wed, 20 Jul 2011, Комар Максим wrote:
I want to install package NetSNMP:
cabal install NetSNMP
Resolving dependencies...
Configuring NetSNMP-0.1.6...
cabal: Missing dependency on a foreign library:
* Missing C library: netsnmp
This problem can usually be solved by installing the system pac
I want to install package NetSNMP:
> cabal install NetSNMP
Resolving dependencies...
Configuring NetSNMP-0.1.6...
cabal: Missing dependency on a foreign library:
* Missing C library: netsnmp
This problem can usually be solved by installing the system package that
provides this library (you may nee
On Jul 19, 2011, at 11:34 PM, Levent Erkok wrote:
> import System.Mem.StableName
>
> areEqual :: Eq a => a -> a -> IO Bool
> areEqual x y = do
> sx <- hashStableName `fmap` (x `seq` makeStableName x)
> sy <- hashStableName `fmap` (y `seq` makeStableName y)
> return $ (sx == sy) || x == y
On
35 matches
Mail list logo