[Haskell-cafe] Time constrained computation

2009-08-28 Thread Mitar
Hi! I am not really sure if this is correct term for it but I am open to better (search) terms. pure ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: Time constrained computation

2009-08-28 Thread Mitar
bound. And all this should be as abstracted as it is possible. Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Interval Arithmetics

2007-08-05 Thread Mitar
language itself, without making changes to the compiler and/or runtime itself? Because, for example, a good implementation should reformulate equations at the runtime accordingly to exact values it wants to compute them on. Has it been done already? Mitar

Re: [Haskell-cafe] Dynamic thread management?

2007-08-13 Thread Mitar
taken. I really messed this explanation up. Or maybe it is completely wrong and this is why it looks like a mess to me. :-) Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Serial Communications in Haskell

2007-08-29 Thread Mitar
my Lego Mindstorms NXT interface, pre-beta version: http://www.forzanka.si/files/NXT.tgz It is for UNIX (POSIX?) systems but I had similar problems so I had to use FFI (foreign function interface) to setup a link. You will probably just have to replace that with Windows API

Re: [Haskell-cafe] let and fixed point operator

2007-09-01 Thread Mitar
Hi! > I did once try to learn Prolog. And failed. Miserably. You should backtrack at this point and try again differently. :-) Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Serial Communications in Haskell

2007-09-04 Thread Mitar
e with Hackage and Cabal nor I have time now for this. But if anybody wants to help ...) I am using it in my AI robot research project where I am using Lego Mindstorms NXT unit and communicating with it over Bluetooth. And the AI is made in Haskell. :-) Mitar __

[Haskell-cafe] Missing join and split

2007-12-28 Thread Mitar
have them there. Or am I wrong and are those hidden somewhere? So what are common ways to get around this? What are elegant definitions? Inline definitions? Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman

Re: [Haskell-cafe] Missing join and split

2007-12-28 Thread Mitar
And then we could use split in many other than just text processing contexts. Of course, the problem in both cases is implementing something like regular expressions efficiently, especially on lists, but this is why there are smart people around. :-) Mitar ___

Re: [Haskell-cafe] Missing join and split

2007-12-28 Thread Mitar
; "out of group chunk" and Right is "in group chunk"). > > foo (match (group any `sepBy` char ';') -> [c1, c2, c3]) = ... Ah. Is this accessible somewhere? Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] 0/0 > 1 == False

2008-01-10 Thread Mitar
ere is probably an implementation reason behind it, but do we really want such "hidden" behavior? Would not it be better to throw some kind of an error? Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] 0/0 > 1 == False

2008-01-16 Thread Mitar
tation returns NaN? No, it is not. With undefined this is correctly (not)evaluated. Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Dependent types

2010-09-09 Thread Mitar
possible for given Line. Somehow I would like to have a getFromFirstLine function which would based on type of given Line return Maybe (Packet i) (for Line) or Maybe AnyPacket (for LineAny). So that this would be enforced and type checked. Best regards and thanks for any help Mitar Test2.hs

Re: [Haskell-cafe] Dependent types

2010-09-10 Thread Mitar
How to change MaybePacket to GADTs? Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Dependent types

2010-09-10 Thread Mitar
Hi! I made it. ;-) Thanks to all help from copumpkin on IRC channel. I am attaching my solution for similar problems in future. And of course comments. Mitar Test5.hs Description: Binary data ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] Cleaning up threads

2010-09-12 Thread Mitar
do bracket (thread "foo") killThread $ \_ -> bracket (thread "bar") killThread $ \_ -> bracket (thread "baz") killThread (\_ -> run) Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Interruptable event loop

2010-09-13 Thread Mitar
-> IO () timer t = do threadDelay redrawInterval throwTo t TimerInterrupt timer t Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: Interruptable event loop

2010-09-13 Thread Mitar
Hi! OK, System.Timeout's timeout does not have this problem. ;-) Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: Cleaning up threads

2010-09-14 Thread Mitar
es not work as intended. Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Cleaning up threads

2010-09-14 Thread Mitar
-raise an exception that was thrown in or to it: Thanks. Will look into it. Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: Cleaning up threads

2010-09-14 Thread Mitar
happen) why do not use it also for less exceptional things (because you have cleaner code then). > Also using the Quit command from my example you can actually wait for > the thread to finish cleanup work.  You can't do this with an exception. You can. If you would have a proper way

[Haskell-cafe] Idea for hackage feature

2010-09-15 Thread Mitar
n code and evaluate circumstances in which that unsafe* call is made. And then vote/vouch once you discover that it is probably pretty safe.) Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: Cleaning up threads

2010-09-21 Thread Mitar
ible through type system. Something like: http://paczesiowa.blogspot.com/2010/01/pure-extensible-exceptions-and-self.html ? Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: Cleaning up threads

2010-09-22 Thread Mitar
avior and for some other. Maybe what I am arguing for is that currently (with mask) you cannot say "mask everything except". To answer Bas: I do not know how this should look like. I just know that I am missing Java's transparency what can be thrown and what not and its at-compile-t

Re: [Haskell-cafe] problems using macports?

2010-09-23 Thread Mitar
for MacPorts or Fink's library paths? Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] openFd under -threaded gets interrupted

2009-12-16 Thread Mitar
out -threaded it works flawlessly. I am using Linux 2.6.30 amd64, GHC 6.10.4. It was the same with 6.8. Why is this? Is there any workaround? Does it work in 6.12? Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mail

Re: [Haskell-cafe] Broken GHC doc links

2009-12-16 Thread Mitar
Hi! On Wed, Dec 16, 2009 at 8:08 PM, Edward Z. Yang wrote: > As the W3C would say, "Cool URLs don't Change".  Can we at > least setup redirects to the new pages? I second that. I have to manually fix URLs from Google results now

[Haskell-cafe] Reading from a process

2009-12-16 Thread Mitar
ading byte per byte and appending it to the end. Then the problem is that if process is sending garbage faster then Haskell can consume it Haskell stays in slurpInput function and never gets to readData where it would found out that there is garbage coming i

Re: [Haskell-cafe] Reading from a process

2009-12-16 Thread Mitar
I am not using hReady signal as delimiter. This is just to have some robustness for example if processes will communicate over network and there will be delays. So I am just trying to pick enough bytes together for "read" to succeed. And I

Re: [Haskell-cafe] Double free-ing (was: Reading from a process)

2009-12-17 Thread Mitar
-> return () So I run processExited if there is EOF from underlying process. But I also run terminateDataProcess in a bracket I am calling getLastMyData. Code is like this: bracket initDataProcess terminateDataProcess (... read getLastMyData repeatedly and process it ...) Why I

Re: [Haskell-cafe] Double free-ing (was: Reading from a process)

2009-12-17 Thread Mitar
ry O(n). Why would I read data into some other buffer just to be able to append it to main buffer later. Any suggestion how can I do that in Haskell why? Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: openFd under -threaded gets interrupted

2009-12-17 Thread Mitar
Hi! On Wed, Dec 16, 2009 at 3:18 PM, Mitar wrote: > fd <- openFd device ReadWrite Nothing OpenFileFlags { append = False, > noctty = True, exclusive = False, nonBlock = True, trunc = False } OK. After some testing I have discovered that the problem is only with /dev/rfcomm0 as a device

Re: [Haskell-cafe] Double free-ing (was: Reading from a process)

2009-12-18 Thread Mitar
Hi! On Fri, Dec 18, 2009 at 8:16 AM, Jason Dusek wrote: >  Concatenating two `ByteString`s is O(n)? This is what it is written here: http://haskell.org/ghc/docs/latest/html/libraries/bytestring-0.9.1.5/Data-ByteString.html#v%3Aappend Mi

Re: [Haskell-cafe] Double free-ing

2009-12-18 Thread Mitar
to read at that moment whatever it can? But appending is really better. Why are lazy ByteStrings not default? Thanks again. Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Double free-ing

2009-12-18 Thread Mitar
Hi! On Fri, Dec 18, 2009 at 6:54 PM, Mitar wrote: > On Fri, Dec 18, 2009 at 8:29 AM, Ketil Malde wrote: >> Lazy ByteStrings should be able to append with O(1).  (Or use strict BS >> hGetNonBlocking, and Lazy ByteString fromChunks.) > > Oh, true. Thanks! > >

[Haskell-cafe] Control.Parallel missing

2009-12-28 Thread Mitar
t compile out of the box. Maybe we could extend this 4th step also with an introduction to Cabal? Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Parallel executing of actions

2007-04-15 Thread Mitar
-- so it would be great if those computations would be done in parallel -- and results printed out as they come mapM_ rwhnf (putStrLn) ["a","b","c","d"] Is this possible? Without unsafe functions? And without changi

Re: [Haskell-cafe] Parallel executing of actions

2007-04-15 Thread Mitar
raycasting engine. (Any suggestions on other memory/performance improvements are more than welcome.) Mitar Main.hs Description: Binary data ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Parallel executing of actions

2007-04-16 Thread Mitar
ecompute the values in threads someway and then sequentially draw it? Any suggestion how to do that? Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Parallel executing of actions

2007-04-17 Thread Mitar
e best way). Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Parallel executing of actions

2007-04-19 Thread Mitar
errors. Thanks everybody Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Internet Communications Engine and Haskell

2008-06-26 Thread Mitar
Hi! Has been any work on implementing Internet Communications Engine in Haskell already done? Any other suggestions how could I use ICE in Haskell? Through FFI calls to its C++ version? http://www.zeroc.com/ice.html Mitar ___ Haskell-Cafe mailing

[Haskell-cafe] Profiling nested case

2008-07-09 Thread Mitar
ions how could I build a list of objects to check at runtime and still have this third performance? Why this big difference? (I am using GHC 6.8.3 with -O2 compile switch.) (The <* operator is casting a ray, that is multiplying a ray direction vector with a scalar factor.) Mitar Main-c

Re: [Haskell-cafe] Profiling nested case

2008-07-11 Thread Mitar
ame as my previous example. Where a hard-coded list was not optimized. (Like it would change during the execution.) It looks like my program would be interpreted and not compiled. Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Profiling nested case

2008-07-12 Thread Mitar
But to notice this ... This is something you have to spend a day for. Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Profiling nested case

2008-07-12 Thread Mitar
erformance of Num instance functions of Quaternion is then quite worse. Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Profiling nested case

2008-07-18 Thread Mitar
there is a finite number of possibilities (in my case two) - why not inline both versions and at run time choose one? Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Profiling nested case

2008-07-18 Thread Mitar
for that type. Something what specialization is doing as I see. I thought this is always done. Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: Profiling nested case

2008-07-19 Thread Mitar
functions is not important so it could be a good candidate for parallelism.) Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Help with optimization

2008-07-20 Thread Mitar
s to much allocations. Probably it should not store intermediate lists? Any suggestions? Best regards Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Help with optimization

2008-07-20 Thread Mitar
to slow. This and that when saving to a file it takes almost 25 % more allocations. So probably it is slower because of all this allocations? Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] ANNOUNCE: Sun Microsystems and Haskell.org joint project on OpenSPARC

2008-07-25 Thread Mitar
ses? I have been playing lately with dual Quad-Core Intel Xeon Mac Pros with 12 MB L2 cache per CPU and 1.6 GHz bus speed and it would be interesting to check this things there. Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.hask

Re: [Haskell-cafe] ANNOUNCE: Sun Microsystems and Haskell.org joint project on OpenSPARC

2008-07-26 Thread Mitar
Hi! On Sat, Jul 26, 2008 at 3:17 AM, Ben Lippmeier <[EMAIL PROTECTED]> wrote: > http://valgrind.org/info/tools.html No support for Mac OS X. :-( Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman

Re: [Haskell-cafe] ANNOUNCE: Sun Microsystems and Haskell.org joint project on OpenSPARC

2008-07-26 Thread Mitar
Hi! On Sat, Jul 26, 2008 at 1:35 PM, Mitar <[EMAIL PROTECTED]> wrote: > No support for Mac OS X. :-( Apple provides Shark in Xcode Tools which has something called "L2 Cache Miss Profile". I will just have to understand results i

[Haskell-cafe] Rigid types fun

2010-11-05 Thread Mitar
t move that into the function? I am using GHC 6.12.3. Is this something which will work in 7.0? Mitar Test.hs Description: Binary data ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: Rigid types fun

2010-11-05 Thread Mitar
ot;Nerve (Axon a) (AxonAny b)" as a result. If I would call it like "create (AxonAny undefined) (AxonAny undefined)" I would get "Nerve (AxonAny a) (AxonAny b)" as a result. And so on. So I know I can move some hard-coded combination into a function.

[Haskell-cafe] Re: Rigid types fun

2010-11-05 Thread Mitar
Hi! On Fri, Nov 5, 2010 at 12:50 PM, Alexey Khudyakov wrote: > I'm not sure what do you exactly want. But what about applicative functors? > They offer nice notation > >> Nerve <$> (Axon <$> newChan) <*> (AxonAny &l

[Haskell-cafe] Re: Re[2]: Rigid types fun

2010-11-05 Thread Mitar
skell printf implementation afaik While reading the source code I found that in loadstring you do not make sure that free is called even in a case of an exception. Is this not necessary? Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@hask

Re: [Haskell-cafe] Rigid types fun

2010-11-05 Thread Mitar
for this approach. It seems to me the nicest. Simple and allows me to later redefine Nerve and Axon without breaking stuff around. Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Bracket around every IO computation monad

2010-11-07 Thread Mitar
So it is possible that evaluation of monad actions would be stacked inside of bracketOnError and in a case of error clean-up functions would be called, otherwise returns a list of results? Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Printing of asynchronous exceptions to stderr

2010-11-09 Thread Mitar
posed of? Because it can be reused by some other computation? But then my exceptions could be delivered to wrong (new) thread while they were meant for old one? Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Printing of asynchronous exceptions to stderr

2010-11-10 Thread Mitar
. > It would help if you could show us your code (or parts of it). I hope the code above should satisfy. If not I will make some real example. Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Printing of asynchronous exceptions to stderr

2010-11-10 Thread Mitar
; it outputs: Test.hs: MyTerminateException MVar was successfully taken With "throwIO ThreadKilled" is as expected, just: MVar was successfully taken So MVar is filled. What means that thread gets exception after that. But there is nothing after that. ;-) (At least nothing visible.) M

Re: [Haskell-cafe] Printing of asynchronous exceptions to stderr

2010-11-10 Thread Mitar
tter than my "hanging threads at the end". And with my throwIO approach I just override MyTerminateException with ThreadKilled. Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Printing of asynchronous exceptions to stderr

2010-11-11 Thread Mitar
d with maskUninterruptibleExcept function Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Bracket around every IO computation monad

2010-11-15 Thread Mitar
a bracket, which would be stacked? Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Bracket around every IO computation monad

2010-11-15 Thread Mitar
In a case of success the resulting list is returned. Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Bracket around every IO computation monad

2010-11-15 Thread Mitar
hose approaches with libraries will be a good guide to me. Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Bracket around every IO computation monad

2010-11-15 Thread Mitar
hand. So first 100 monads by hand and then such libraries are useful, but also you exactly understand what are they doing - what are they automating, which process you have been doing by hand before. So thank you for your approach. I didn't know that this can be automated in so elegant way. Mitar ___

Re: [Haskell-cafe] Bracket around every IO computation monad

2010-11-16 Thread Mitar
nad based on all this knowledge. (As an exercise.) Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Bracket around every IO computation monad

2010-11-16 Thread Mitar
eOperation :: LiveNeuron n -> IO () > > (I'm not sure Mitar actually has this...) No. In fact Neurons are defined with an operation they do. You just feed them with data and they output data. In main program you do not do operations over them. You just grow/prepare them and attache/in

[Haskell-cafe] [ANNOUNCE] A Haskell interface to Lego Mindstorms NXT

2010-11-18 Thread Mitar
compile because of this bug: http://hackage.haskell.org/trac/hackage/ticket/656 Can anybody help with fixing this bug? It would be much nicer to see all documentation on HackageDB I made. Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] Printing of asynchronous exceptions to stderr

2010-11-18 Thread Mitar
why I argue for some way of being able to specify which interrupts you still allow: like mask everything except... (user interrupts, my special exception meant for cleanup code hanging conditions...). Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.or

[Haskell-cafe] Eq instance for Chan

2010-11-24 Thread Mitar
already have a consumer and then duplicating it if another (and every additional) consumer would be added. But without Eq it is not possible to check if there is Chan already in a list (and I hope Eq would compare just Chan and not its content). Is there some other way to achieve this? Mitar

[Haskell-cafe] Re: Eq instance for Chan

2010-11-25 Thread Mitar
Hi! On Thu, Nov 25, 2010 at 1:05 PM, Simon Marlow wrote: > It's just an oversight.  Send us a patch, or make a ticket for it? Done: http://hackage.haskell.org/trac/ghc/ticket/4526 Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.

Re: [Haskell-cafe] Re: Eq instance for Chan

2010-11-25 Thread Mitar
and send a proposal to the libraries list. I just have. I attached your patch to the ticket. Thanks. Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Plot Haskell functions in TikZ

2010-11-26 Thread Mitar
Hi! On Thu, Nov 25, 2010 at 9:41 PM, Henning Thielemann wrote: > Has anyone tried to write such a '--plot' command for TikZ? Great idea. ;-) I haven't yet done this but I have played with TikZ a lot. Mitar ___ Haskell-Cafe mailing

[Haskell-cafe] [ANNOUNCE] A general data-flow framework

2010-11-30 Thread Mitar
or consumers) can be made (so that created models/systems/networks can be used directly in real world applications, for example robots). I am more than open to any suggestions and comments. Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Printing of asynchronous exceptions to stderr

2010-11-30 Thread Mitar
ly in my cleanup code I do not really care about new exceptions being ignored. Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Printing of asynchronous exceptions to stderr

2010-12-07 Thread Mitar
sk_ $ a `catches` [ Handler (\(e :: AsyncException) -> case e of UserInterrupt -> throw e ; _ -> uninterruptible a), Handler (\(_ :: SomeException) -> uninterruptible a) ] Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] [Haskell] ANNOUNCE: genprog-0.1

2010-12-08 Thread Mitar
o do with programs. Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] [Haskell] ANNOUNCE: genprog-0.1

2010-12-08 Thread Mitar
language has. True. We should evolve also the language itself, not just programs. Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] [Haskell] ANNOUNCE: genprog-0.1

2010-12-09 Thread Mitar
would probably not survive. (If they would remove protection for some sentences they have build before.) Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] threadWaitRead and threadWaitWrite on multiple fds

2010-12-12 Thread Mitar
lly light-weight threads) and once some is triggered you spawn another thread which deals with the event, while the original thread goes back into the waiting. Or you can also send data over Chan to another thread which then processes the even (if you need to serialize processing)

Re: [Haskell-cafe] Printing of asynchronous exceptions to stderr

2010-12-16 Thread Mitar
readId values are passed around, as capability tokens for throwing an exception) and inform/warn you about which exceptions can be thrown in which code segments. And you could specify which exceptions you predict/allow and if there would be a mismatch you would

Re: [Haskell-cafe] Misleading MVar documentation

2010-12-24 Thread Mitar
is why I proposed tryReadMVar and tryModifyMVar here: http://hackage.haskell.org/trac/ghc/ticket/4535 Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Misleading MVar documentation

2010-12-25 Thread Mitar
ns are blocking (and we document that) and we introduce non-blocking versions. Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] [ANNOUNCE] Etage 0.1.7, a general data-flow framework

2011-01-05 Thread Mitar
free to test it and provide any feedback Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] lhs2tex and line numbers

2011-02-12 Thread Mitar
Hi! How could I convince lhs2tex to add in poly mode line numbers before each code line in code block? Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] lhs2tex and line numbers

2011-02-14 Thread Mitar
in Great! Super! This is exactly what I needed. Thanks really a lot! I especially like having the numbers on the right. Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] BlockedIndefinitelyOnMVar exception

2011-03-31 Thread Mitar
Hi! Is there a way to disable throwing BlockedIndefinitelyOnMVar exceptions? Because I am doing small program where I do not care if some threads block. As at the end user will have to interrupt the program anyway. Mitar ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] BlockedIndefinitelyOnMVar exception

2011-03-31 Thread Mitar
Hi! On Thu, Mar 31, 2011 at 4:37 PM, Brandon Moore wrote: > If you plan to send an exception, you must have the ThreadId saved elsewhere, > which should prevent the BlockedIndefinitelyOnMVar exception. But this behavior is something they wish to remove in future versions as not-wanted?

[Haskell-cafe] [ANNOUNCE] Data-flow based graph algorithms

2011-04-03 Thread Mitar
many nodes (> 300). There is documentation, but because of this bug it is not visible: http://hackage.haskell.org/trac/hackage/ticket/656 Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] lhs2tex and comment

2011-04-04 Thread Mitar
.) Or at least to not ignore newlines in comments? I am using poly mode. Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] fmap and LaTeX

2011-04-08 Thread Mitar
e nice symbols, and <$> is left as it is. I have also tried \mathbin{<\$>} but it adds space around $ (at least in lhs2tex), so it looks ugly. Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] fmap and LaTeX

2011-04-08 Thread Mitar
Hi! Uuu, nice. Thanks Daniel and Henning. Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Generating random graph

2011-04-10 Thread Mitar
0) gen return $ zip3 (repeat node) others weights return $ mkGraph ns es But I noticed that graph has sometimes same weights on different edges. This is very unlikely to happen so probably I have some error using random generators. Could somebody tell me where? Mitar __

Re: [Haskell-cafe] Generating random graph

2011-04-11 Thread Mitar
. Thanks. Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe