Re: [Haskell-cafe] Using tiny (atomic) mutables between multiple threads

2009-09-13 Thread Belka
patterns in code, minimize load on LoopBreaker itself, centralize my timing and configuration application management and simplify some resource management processes (like acquiring network handle, when it's required). Added in a ToDo list for next version!.. =) Thanks again! Belka

[Haskell-cafe] Using tiny (atomic) mutables between multiple threads

2009-09-12 Thread Belka
g to a assembler's "mov"? 2. Are the above readMyVar and writeMyVar really atomic? Or are they atomic only if I apply them to type? 3. Are the above readMyVar and writeMyVar safe against asynchronous exceptions? Or again, only if I use type? Belka -- View this message in cont

Re: [Haskell-cafe] Seeking for an extention (functional incapsulation)

2009-08-07 Thread Belka
Belka wrote: > >> Exponentially? Now I'm missing something... > I meant: in as-is version you have 3 declarations (data, sdtField2 :: ..., > sdtField2 = ...), but in a proposed one - only one, with subdeclarations. > My perception is more oriented on that compos

Re: [Haskell-cafe] Seeking for an extention (functional incapsulation)

2009-08-07 Thread Belka
> Exponentially? Now I'm missing something... I meant: in as-is version you have 3 declarations (data, sdtField2 :: ..., sdtField2 = ...), but in a proposed one - only one, with subdeclarations. My perception is more oriented on that compositional criterion, than calculates char counts. Besides, s

Re: [Haskell-cafe] Seeking for an extention (functional incapsulation)

2009-08-06 Thread Belka
but unfortunately, yet haven't had time to try it in my practice. Belka -- View this message in context: http://www.nabble.com/Seeking-for-an-extention-%28functional-incapsulation%29-tp24856249p24856983.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. _

[Haskell-cafe] Seeking for an extention (functional incapsulation)

2009-08-06 Thread Belka
would be: 1. Funtion similar to Data.Function.on (example: (*) `on` f = \x y -> f x * f y), but opposite - I called it under. t `under` f = \x y -> (x f) `t` (y f) 2. currying and uncurrying Is there any such extension? Belka -- View this message in context: http://www.nabble.com/Seeking-for-

[Haskell-cafe] typeclasses comprehension problems: situation classes?

2009-05-16 Thread Belka
able in Haskell? This assumption is the last one to make... I'd rather belive, that there is something I'm not aware of (for a considerably long time already) in Haskell. A lack of some programming technique Please, Help! Regards, Belka ==TRY=1===DOESN'T=COMPILE==

[Haskell-cafe] Classes: functional dependency (type -> value)

2009-05-10 Thread Belka
Nothing -> case err_or_keyset2 of Left err_msg -> return $ Left err_msg Right key_set -

Re: [Haskell-cafe] using haskell for a project

2009-05-03 Thread Belka
ow char_new_version where char_old_version = Charcter {...} new_spell = Spell { } Have luck, with the brain rewriting! =) Belka -- View this message in context: http://www.nabble.com/using-haskell-for-a-project-tp23348425p23352598.html Sent fro

Re: [Haskell-cafe] [tryReadAdvChan :: AdvChan a -> IO (Maybe a)] problems

2009-05-01 Thread Belka
it (FlowUnit), that is being passed in the Channel. The FlowUnit diversifies to real bizness data, and service data. That way I now may gain control over blocking But this solution is not simple and lightweight. If anybody is interested, I could describe the concept in more details. Belka N

[Haskell-cafe] [tryReadAdvChan :: AdvChan a -> IO (Maybe a)] problems

2009-04-30 Thread Belka
--- --- Later after writing my own code, and understanding the problem I checked Hackage. Found "synchronous-channels" package there (http://hackage.haskell.org/cgi-bin/hackage-scripts/package/synchronous-channels), but it isn't an

Re: [Haskell-cafe] controlling timeout for Network.Socket.connect - how?

2009-02-26 Thread Belka
nd >use select (or poll/epoll/kqueue). Thanks, now I'm confident, that am on the right way! ^__^ I wonder, if *select* really blocks the whole process... or blocks just the "green" thread, that called it?.. It doesn't depend from being safe/unsafe FFI-ed, does it?

Re: [Haskell-cafe] controlling timeout for Network.Socket.connect - how?

2009-02-26 Thread Belka
d >use select (or poll/epoll/kqueue). Thanks, now I'm confident, that am on the right way! ^__^ I wonder, if *select* really blocks the whole process... or blocks just the "green" thread, that called it?.. It doesn't depend from being safe/unsafe FFI-ed, does it?

Re: [Haskell-cafe] controlling timeout for Network.Socket.connect - how?

2009-02-24 Thread Belka
It's hard to belive, that nobody ever tackled/solved the subj. problem. I still can delay a bit solving it, in hope somebody would share experience. Regards, Belka Belka wrote: > > Hello, communion people! > > I have a problem and ask for an advice. > I'm deali

[Haskell-cafe] controlling timeout for Network.Socket.connect - how?

2009-02-21 Thread Belka
his matter...), but it's not in the Network or Network.Socket libs (but in the libs that they FFI with). Hope I won't have to rewrite these low-level functions >__< Could anybody, please share some experience on how to adjust timeout for *connect*? Thanks in advance, B

Re: [Haskell-cafe] estimating the speed of operation

2009-02-18 Thread Belka
early, what can't be said about the second string. I still wonder if (and how) GHC optimizes the process. Belka -- View this message in context: http://www.nabble.com/estimating-the-speed-of-operation-tp22075843p22078560.html Sent from the Haskell - Haskell-Cafe mailing l

[Haskell-cafe] estimating the speed of operation

2009-02-18 Thread Belka
izers So, perhaps, GHC evaluates the MD5 once, but cycles on something else?.. For now I can only guess. Could anybody, please clarify and maybe suggest configuration, which would allow objective speed estimation? Thanks in advance, Best regards, Belka -- View this message in context:

Re: Re[Haskell-cafe] cursive referencing

2009-01-30 Thread Belka
A somedata1 $ snd p, BB somedata2 $ fst p)) and my mod (added "some_very_expensive_f") fix (\p -> (AA (some_very_expensive_f somedata1) $ snd p, BB (some_very_expensive_f somedata2) $ fst p)) 2. Does the sumAA evaluates this "some_very_expensive_f" every iteration of r

Re: Re[Haskell-cafe] cursive referencing

2009-01-29 Thread Belka
up it's power (speaking about "where" and namespacing in general). =) Belka -- View this message in context: http://www.nabble.com/Recursive-referencing-tp21722002p21722503.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

Re[Haskell-cafe] cursive referencing

2009-01-28 Thread Belka
aa :: AA } f :: SomeData1 -> SomeData2 -> AA f somedata1 somedata2 = ?? -- Always True: ghci> f == aa $ bb f True ----- Any ideas? Belka -- View this message in context: http://www.nabble.com/Recursive-referencing-tp21722002p21722002.html Sent from the Has

Re: [Haskell-cafe] how to implement daemon start and stop directives?

2009-01-24 Thread Belka
>If you want a normal daemon, you want to look at System.Posix.Process >to create a proper daemon (forkProcess, createSession; don't forget to >close stdOutput (and, errr, Haskell library types: stdin and stderr >are where? not System.Posix.IO with stdOutput) and reopen them on / >dev/nul

Re: [Haskell-cafe] how to implement daemon start and stop directives?

2009-01-22 Thread Belka
O-pipe-file would solve my problem. Imagine writing a command in it, while one of daemon's thread is locked-while-awaits for anything to come out from the other side of the pipe... Belka -- View this message in context: http://www.nabble.com/how-to-implement-daemon-start-and-stop-directives-

[Haskell-cafe] how to implement daemon start and stop directives?

2009-01-21 Thread Belka
Hi! Could somebody please share some experience on how to implement daemon start and stop directives. In theory I need something like this: 1. "my_daemon start" - starts my app with an infinite loop of serving inside. 2. "my_daemon stop" - puts in some TVar a value signalizing, that stop is given

[Haskell-cafe] Haskell, successing crossplatform API standart: first feedback

2009-01-04 Thread Belka
responce times - Lucu was 2 times faster for 1 simple query, which returned 5 rows from small DB. Now I'm planning 1. To try some modification of Lucu, so it has a DB connection in it's environment and some basic triggering (providing conditioned actions after WEB interaction process).

[Haskell-cafe] Connect to DBMS - what's the cost

2009-01-04 Thread Belka
Hello, community people! Is anybody aware, what aproximately is the cost for the acquiring connection to DB (and also disconnecting from it)? I guess that may differ from DBMS to DBMS, so I mostly am interested in PostgreSQL case, but for other DBMS it's also good to know. Actually, since all H

Re: [Haskell-cafe] Haskell, successing crossplatform API standart

2008-12-17 Thread Belka
Thanks for the info! > These days, however, web services seem to be moving towards a RESTful model with a JSON layer and there are plenty of JSON libraries on hackage, which you could just throw over the fastCGI bindings. Oh, but JSON doesn't seem to support tree-structured data... This mi

Re: [Haskell-cafe] What *not* to use Haskell for

2008-11-29 Thread Belka
(1) Function as a system of N concurrent inputs and 1 output is easy essence. How about function as N concurrent inputs and M concurrent outputs? I think it's not native to lambda calculus. So "system's programming" (if we ever had such paradigm) would solve this issue, while criticizing all FP.

[Haskell-cafe] "Could not find module ... which is hidden" problem

2008-11-29 Thread Belka
Hello! START-- $ sudo runghc Setup configure --user Configuring HCL-1.2... $ sudo runghc Setup build Preprocessing library HCL-1.2... Preprocessing executables for HCL-1.2... Building HCL-1.2... HCL.hs:302:7: Could not find module

[Haskell-cafe] Haskell, successing crossplatform API standart

2008-11-29 Thread Belka
Hello! (1) Is anybody aware of SOA approach being supported in Haskell? Found HAIFA package (SOAP, WEB services), but it seems to be a RIP project (with it's last updated in 2006) - trying to install it is a total mess (for me, a newby). (2) Please, perhaps experienced developers could suggest