tell me if i have implemented the
algorithm correctly and if its possible then why i am getting wrong
answer for this problem . In case of indentation problem [
http://ideone.com/perhE ]
Thank you
Mukesh Tiwari
import Data.List
import qualified Data.Sequence as DS
import Text.Printf
data Point
some
one please tell me what is wrong with implementation. It would be
great if some one can explain this algorithm in pseudo code which
explains the rotating caliper and their implementation details . In
case of indentation , see here [ http://hpaste.org/49907 ] .
Thank you
Mukesh Tiwari
import
5 1 , P 9 2 , P 12 3 , P 14 4 , P 15 5 , P 16
7 , P 17 10 , P 18 14 , P 19 19 ]
3.9982
ghcifinal [ P 2 ( -3 ) , P (-1 ) 2 , P 0 5 , P (-5) (-1) , P (-4)
( 2 ) , P 4 0 , P 1 3 , P 4 3 , P (-3) (-4) , P 0 (-2)]
4.0
Thank you
Mukesh Tiwari
On Aug 6, 10:32 pm, Tillmann Vogt tillmann.v
Thank you Tillmann Vogt. I really appreciate your help . Finally
implemented working code [ http://hpaste.org/49957 ] .
Thank you
Mukesh Tiwari
On Aug 7, 3:16 pm, Tillmann Vogt tillmann.v...@rwth-aachen.de wrote:
Am 06.08.2011 22:23, schrieb mukesh tiwari:
There are several algorithms
Hello all
I am trying implement this algorithm [
http://stackoverflow.com/questions/1621364/how-to-find-largest-triangle-in-convex-hull-aside-from-brute-force-search
] in Haskell but i am getting wrong answer for some test cases. A c++
implementation which is accepted for this problem [
'
area'' = caltmp (a'' `mod` n) b'' c'' arr
and solve now applies area twice: looPing 0 1 2 n area area arr'
This now matches the result from C++ for me.
On Wed, Aug 17, 2011 at 8:09 AM, mukesh tiwari
mukeshtiwari.ii...@gmail.com wrote:
Hello all
I am trying implement
ind_1 $ take ind_2 htmlpage
writeFile down.html tmphtml
and its working fine except some symbols are not rendering as it
should be. Could some one please suggest me how to accomplish this
task.
Thank you
Mukesh Tiwari
___
Haskell-Cafe mailing list
Is it possible to automate this process rather than manually clicking
and downloading using Haskell ?
Thank You
Mukesh Tiwari
On Thu, Sep 8, 2011 at 6:11 PM, Max Rabkin max.rab...@gmail.com wrote:
This doesn't answer your Haskell question, but Wikpedia has
PDF-generation facilities (Books
I tried to use the PDF-generation facilities . I wrote a script which
generates the rendering url . When i am pasting rendering url in
browser its generating the download file but when i am trying to get
the tags , its empty. Could some one please tell me what is wrong with
code.
Thank You
Mukesh
helpful for this purpose ? Is there way to solve this
problem ?
Sorry for many questions but this is my first web application program and
i am trying hard to finish it.
Thank you
Mukesh Tiwari
On Fri, Sep 9, 2011 at 4:17 AM, Daniel Patterson lists.hask...@dbp.mm.stwrote:
It looks to me
anything it could all brake,
but
that's the risk you run anytime you resort of site scraping.
-R. Kyle Murphy
--
Curiosity was framed, Ignorance killed the cat.
On Thu, Sep 8, 2011 at 23:40, Conrad Parker con...@metadecks.org
wrote:
On Sep 9, 2011 7:33 AM, mukesh tiwari
and installing
ghc-7.0 will resolve the issue ?
Thank you
Mukesh Tiwari
.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
September 2011, 21:37:29, mukesh tiwari wrote:
I tried to resolve this issue on #haskell and i got suggestion that it
was due to conflict in
global and local namespace [ see here for more detail
http://hpaste.org/51376 ].
Yes.The containers in the global db is shadowed by the user containers
so i am asking you although i am pretty comfortable with $ cabal install
--with-compiler=/usr/local/bin/ghc-7.2.1 -v keys --dry-run
Regards
Mukesh Tiwari
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell
. Could some one
please tell me , how to write arbIndex n in terms of smaller n like in the
paper
arbTree 0 = liftM Leaf arbitrary
arbTree n = frequency[ ( 1 , liftM Leaf arbitrary ) , ( 4 , liftM2 Branch
( arbTree $ div n 2 ) ( arbTree $ div n 2 ) ) ]
Thank You
Mukesh Tiwari
:
Couldn't match expected type `Test' with actual type `[Test]'
In the first argument of `runTestTT', namely `tests'
In the expression: runTestTT tests
In an equation for `it': it = runTestTT tests
Could some one please tell me what is wrong with this code.
Regards
Mukesh Tiwari
Thank you
On Oct 12, 3:35 am, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com
wrote:
On 12 October 2011 09:25, mukesh tiwari mukeshtiwari.ii...@gmail.com wrote:
Hello everyone
I was going through this
tutorial http://hunit.sourceforge.net/HUnit-1.0/Guide.html and just wrote
some simple
( At least for UDP packet ) . Could some
one please tell me a guide map to approach for this . A general guide line
for this project like What to read which could be helpful for this project
, which haskell library or any thing which you think is useful .
Regards
Mukesh Tiwari
{
struct timeval ts; /* time stamp */
bpf_u_int32 caplen; /* length of portion present */
bpf_u_int32 len;/* length this packet (off wire) */
};
If yes then how can i deduce ts , caplen and len from these hex
values.
Regards
Mukesh Tiwari
: Year hour:min: sec ] and hex data return by variable
q into Ascii characters.
Regards
Mukesh Tiwari
On Oct 12, 11:33 pm, mukesh tiwari mukeshtiwari.ii...@gmail.com
wrote:
Thank you all for your valuable comments.
@ MD no , i haven't tried but i am looking forward .
@ Neil Davis It would
, 0xb2 , 0xa1 ] - True
_ - False
p - parseFile rest revflag
print $ p !! 0
BS.putStr $ p !! 0
Regards
Mukesh Tiwari
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman
$ BS.take 4 a of
[ 0xd4 , 0xc3 , 0xb2 , 0xa1 ] - True
_ - False
p - parseFile rest revflag
print $ p !! 0
BS.putStr $ p !! 0
Regards
Mukesh Tiwari
___
Haskell-Cafe mailing list
Sorry everyone for cross posting. I was trying to send it on some
other forum but some how i missed the email id.
Regards
Mukesh Tiwari
On Oct 16, 5:47 pm, mukesh tiwari mukeshtiwari.ii...@gmail.com
wrote:
Hello everyone
I am writing application which reads pcap file like wireshark in pure
;
}
Regards
Mukesh Tiwari
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
I am not sure about Int overflow. There is no case of Int overflow in
prime , pList and divPrime function however lets assuming Int overflow in
main but then still answer should be outputted.
Regards
Mukesh Tiwari
On Tue, Nov 8, 2011 at 5:08 PM, Lyndon Maydwell maydw...@gmail.com wrote:
Could
.
Which loop ?
On 8 November 2011 22:50, mukesh tiwari mukeshtiwari.ii...@gmail.com
wrote:
I am not sure about Int overflow. There is no case of Int overflow in
prime
, pList and divPrime function however lets assuming Int overflow in main
but
then still answer should be outputted
++)
if ( k % i == 0 prime[ i + ( k / i ) ] ) { f=1 ; break
; }
if ( !f ) sum += k;
}
coutsumendl;
}
Regards
Mukesh Tiwari
On Tue, Nov 8, 2011 at 6:03 PM, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
On 8 November 2011 23:29, mukesh tiwari mukeshtiwari.ii
Thank you Ryan . I never compiled my program with -O3 option before and
now i can feel the power of compiler optimisation.
Regards
Mukesh Tiwari
On Tue, Nov 8, 2011 at 6:50 PM, Ryan Yates fryguy...@gmail.com wrote:
I forgot to add, I'm on 32-bit GHC and the sum will overflow there, so
I
++ then it returns to calling function and again
loops through remaining element which i am not able visualize in Haskell.
Could some one please help me how to solve this issue .
Regards
Mukesh Tiwari
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http
]
ghcidfsSearch g [2] []
[1,0,2]
ghcidfsSearch g [3] []
[5,4,3]
ghcidfsSearch g [4] []
[3,5,4]
In this dfs , I am returning list of elements in visited in last to
first order.
Regards
Mukesh Tiwari
On Nov 9, 5:08 am, David Barbour dmbarb...@gmail.com wrote:
Major error is in the line of code
but it does not look. Although I did not get all these details
but none of the sparks converted which is really important for parallel
programming. Could some one please tell me how to improve this. Also kindly
recommend me some literature for parallel programming in Haskell.
Regards
Mukesh Tiwari
I changed it bit and use pseq to force the computation but still its
non of the sparks are converting.
import Data.List
import Control.Parallel
parHelp :: ( Num a ) = [ a ] - [ a ] - a
parHelp [] [] = 0
parHelp ( x : xs ) ( y : ys ) = ret where
ret = par a ( pseq b ( a + b ) ) where
Kernel Version 11.2.0: Tue Aug 9 20:56:15
PDT 2011; root:xnu-1699.24.8~1/RELEASE_I386 i386
Macintosh:~ mukesh$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.2.1
Xcode 3.2 ( 64 bit )
Could some one please tell me how to resolve this issue.
Regards
Mukesh Tiwari
Hello all
I am trying to convert List of Lists ( [[(Int , Double )]] ) into PArray (
PArray ( Int , Double )) but getting run time error. This code works fine
and print list of PArray ( Int , Double ) but when i put print $ P.fromList
( map P.fromList c ) then i am getting runtime error. It says
to data parallel haskell
http://www.haskell.org/haskellwiki/GHC/Data_Parallel_Haskell wiki
page using ghc-7.2.1. Could some one please tell me how to compile haskell
program using dph with ghc-7.4.0.20111219.
Regards
Mukesh Tiwari
___
Haskell-Cafe
Tiwari
On Jan 21, 10:27 pm, Brandon Allbery allber...@gmail.com wrote:
On Sat, Jan 21, 2012 at 06:47, mukesh tiwari
mukeshtiwari.ii...@gmail.comwrote:
I have installed ghc-7.4.0.20111219 and this
announcementhttp://www.haskell.org/pipermail/glasgow-haskell-users/2011-December/...says
Thank you. It helped me lot.
Regards
Mukesh Tiwari
On Sun, Jan 22, 2012 at 7:14 PM, Atsuro Hoshino hoshinoats...@gmail.comwrote:
I don't know so much about ghc-7.4, but if loading dph codes in ghci
is the main matter here, below might help:
http://warmfuzzything.posterous.com/loading-dph
-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)
Regards
Mukesh Tiwari
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org
-7.2.1 -fllvm Hello.hs
Macintosh-0026bb610428:tmp mukesh$ ./Hello
Hello Haskell
Regards
Mukesh Tiwari
On Fri, Feb 10, 2012 at 12:41 PM, Carter Schonwald
carter.schonw...@gmail.com wrote:
It may be a problem with the gloss / opengl dependencies? do you have
those packages installed?
I had similar
Hi Carter
Yes both of these packages gloss-1.6.1.1 , OpenGL-2.5.0.0 (
http://hpaste.org/63397 ) are installed on my system.Could you please
tell me how did you resolve the issue.
Regards
Mukesh Tiwari
On Feb 10, 12:11 pm, Carter Schonwald carter.schonw...@gmail.com
wrote:
It may be a problem
Xcode 4.2 ( 1.6 GB ) because of smaller
size. I am not able to solve this issue. I am in the middle of project
and stuck :(.
Regards
Mukesh Tiwari
On Feb 10, 9:36 pm, Carter Schonwald carter.schonw...@gmail.com
wrote:
/Users/mukesh/.ghc/i386-darwin-7.4.1/package.conf.d
you need the 64bit version
you can use brew install llvm to install llvm. It worked for me.
Regards
Mukesh Tiwari
On Mar 3, 6:58 pm, G gra...@fatlazycat.com wrote:
Thanks, i though the llvm was part of the OS install these days. Not that
I know much about OSX coding.
Will download and try it.
Thanks
to
every chunk. Could some one please tell me what is wrong with this concept
and why the code above is showing laziness.
Regards
Mukesh Tiwari
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Productivity 20.7% of total user, 30.1% of total elapsed
gc_alloc_block_sync: 12718
whitehole_spin: 0
gen[0].sync: 0
gen[1].sync: 0
real0m0.575s
user0m0.805s
sys0m0.300s
Regards
Mukesh Tiwari
On Thu, Apr 19, 2012 at 6:56 AM, Jeff Shaw shawj...@msu.edu wrote:
Hello Mukesh Tiwari,
I'm
You can add Simon Marlow slides (
http://community.haskell.org/~simonmar/slides/cadarache2012/ ) on different
topic of parallel Haskell. Thank you for putting all the parallel Haskell
tutorial at one place.
On Fri, Aug 10, 2012 at 6:21 PM, Obscaenvs obscae...@gmail.com wrote:
Hi! I have
llvm is backend for repa package. Try to install llvm on you system. I
think this can be helpful (
http://llvm.org/releases/3.0/docs/GettingStarted.html ).
Mukesh Tiwari
On Tue, Aug 14, 2012 at 2:47 AM, KC kc1...@gmail.com wrote:
The install of repa-algorithms fails saying it can't cannot find
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Mukesh Tiwari
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
I thought you are asking for how to install two versions of GHC on same
system. Sorry for irrelevant answer.
Mukesh Tiwari
On Thu, Sep 27, 2012 at 10:05 PM, mukesh tiwari
mukeshtiwari.ii...@gmail.com wrote:
On Thu, Sep 27, 2012 at 9:32 PM, spacestat...@venussociety.org
spacestat
Hi Mark
I can work on couple of algorithms if you have anything specific in mind.
May be first start with how to represent the matrix and then continue with
algorithms.
Mukesh Tiwari
On Fri, Nov 30, 2012 at 3:33 AM, Mark Flamer m...@flamerassoc.com wrote:
I am looking to continue to learn
library
or distributed parallelism using Cloud Haskell and sparse matrix
representation consideration.
Mukesh Tiwari
On Sat, Dec 1, 2012 at 3:28 AM, Mark Flamer m...@flamerassoc.com wrote:
Thanks for all the replies,
It sounds like there is enough interest and even some potential
collaborators
k_3 = mp SM.! ( hl , am )
modify ( SM.insert ( hl , am ) ( maximum [ k_1 ,
k_2 , k_3 ] ) )
Regards
Mukesh Tiwari
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
in
inconsistent state. Could some one please tell me how to achieve this ? I
look at IORef but it does not have function like modifyMVar_.
Mukesh Tiwari
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Tiwari
On Tue, Dec 18, 2012 at 11:50 PM, Serguey Zefirov sergu...@gmail.comwrote:
2012/12/18 mukesh tiwari mukeshtiwari.ii...@gmail.com:
Hello All
I have two questions.
1. I wrote this code to create 10 simultaneous threads. Could some one
please tell me if this is correct
Hi Jocob
I would recommend you to go through the LYH (
http://learnyouahaskell.com/making-our-own-types-and-typeclasses ) .
data Either a b = Left a | Right b deriving (Eq, Ord, Read, Show)
Lets say you have a division function and you want to avoid division by
zero so this simple function
The same as C way. You can import Data.Bits and can use the functions.
Prelude import Data.Bits
Prelude Data.Bits Data.Bits.
Data.Bits... Data.Bits.bitDefault Data.Bits.complementBit
Data.Bits.rotate Data.Bits.shift
Data.Bits.testBitDefault
Data.Bits..|.Data.Bits.bitSize
is Leaking..
Regards,
Mukesh Tiwari
[1] http://www.mega-nerd.com/erikd/Blog/
On Sat, Mar 23, 2013 at 11:11 AM, C K Kashyap ckkash...@gmail.com wrote:
Oops...I sent out the earlier message accidentally.
I got some profiling done and got this pdf generated. I see unhealthy
growths in my XML
Hi Lone
Just coded quickly so still there is lot of chance for improvement.
{-# LANGUAGE MultiWayIf #-}
import Data.List
import Data.Word
import Data.Bits
builtin_ctz_hask :: Word32 - Word32
builtin_ctz_hask x
| x == 0 = 32
| otherwise = n' - ( ( .. ) x' 1 ) where
)
Failed, modules loaded: none.
Prelude
Mukesh Tiwari
[1] http://hpaste.org/88155
[2] http://hpaste.org/88156
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Hi Roman,
Thank you. Now I can see what was going under the hood. I was passing the
ByteString and functions were expecting String. Working solution using
ByteString[1]
Regards,
Mukesh Tiwari
[1] http://hpaste.org/88156
On Sat, May 18, 2013 at 6:16 PM, Roman Cheplyaka r...@ro-che.info wrote
this problem.
Regards,
Mukesh Tiwari
[1] http://hackage.haskell.org/package/sbv
[2]
http://z3.codeplex.com/wikipage?title=Building%20the%20unstable%20%28working-in-progress%29%20branchreferringTitle=Documentation
[3] http://pastebin.com/K5rq3jCF
[4] http://z3.codeplex.com/SourceControl/latest
.
Loading package syb-0.3.7 ... linking ... done.
Loading package sbv-2.10 ... linking ... done.
*** An error occurred.
*** Unable to locate executable for Yices
*** Executable specified: yices-smt
Regards,
Mukesh Tiwari
[1] http://yices.csl.sri.com/download-yices2.shtml
On Mon, Jul 1, 2013
Finally I got the Yices working by adding yices-2.1.0/bin to my path. Still
looking to resolve Z3.
Regards,
Mukesh Tiwari
On Mon, Jul 1, 2013 at 3:42 PM, mukesh tiwari
mukeshtiwari.ii...@gmail.comwrote:
I also tried installing Yices[1] but still getting same error. I followed
Thank you for your response. Now it's working.
-Mukesh Tiwari
On Mon, Jul 1, 2013 at 8:32 PM, Levent Erkok erk...@gmail.com wrote:
SBV should be able to pick up Z3 from your path; make sure the z3
executable is in it and you can invoke it from your shell. Alternatively,
you can use
63 matches
Mail list logo