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
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
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
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
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
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
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
__
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
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
___
; "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
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
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
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
How
to change MaybePacket to GADTs?
Mitar
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
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
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
-> 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
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
es
not work as intended.
Mitar
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
-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
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
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
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
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
for MacPorts or Fink's library
paths?
Mitar
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
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
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
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
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
-> 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
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
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
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
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
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!
>
>
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
-- 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
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
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
e best way).
Mitar
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
errors.
Thanks everybody
Mitar
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
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
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
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
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
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
.
> 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
; 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
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
d with maskUninterruptibleExcept function
Mitar
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
a bracket, which would be stacked?
Mitar
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
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
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
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
___
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
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
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
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
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
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.
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
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
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
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
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
o do with programs.
Mitar
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
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
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
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)
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
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
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
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
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
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
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
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?
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
.) 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
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
Hi!
Uuu, nice. Thanks Daniel and Henning.
Mitar
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
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
__
.
Thanks.
Mitar
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
98 matches
Mail list logo