guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sph.io libraries


From: tantalum
Subject: Re: sph.io libraries
Date: Mon, 21 Jul 2014 21:03:34 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

> How do I implement it using 'process' and 'record' from sph.io? How do
I later access
> pid2 for example? How do I iterate over all the records?
a few examples are included in the other message i sent. maybe it
already clears things up a bit. (reference
http://lists.gnu.org/archive/html/guile-user/2014-07/msg00023.html)
the records are just elements in memory like for example a hashtable or
a vector.
to iterate over multiple records you could store them in a list and then
iterate over the list.
(for-each
  (lambda (element) (display element))
  list-of-records)
to store them on disc you would need to use files or a database and find
a way to get vectors in and out of there.
if there are not thousands of records it could be as simple as
(call-with-output-file "filepath" (lambda (file) (write list-of-records
file)))
(call-with-input-file "filepath" (lambda (file) (read file)))


> have you considered using open source hosting which specialize on fixing 
> those?
yes, but for now decided to host the repositories myself. the
git-repositories otherwise do not require much maintenance effort. but
of course servers can go down or permissions amiss. i may re-evaluate
the hosting decision in the future.

nice, i did not know jekyll. seems useful.
i currently use the database for its specific features that may be
useful for new functions on the site and experimentation. so for now i
stick with it, but thanks for the tip.

> The existing docs are nice but they are too brief for newbies :(
i hope to improve that in the future. the site is in a relatively early
stage. i know that most documentation pages do not have any real intro
that explains the library, for example.


On 2014-07-21 18:15, Max wrote:
> Wow, that sounds like a lot of maintenance burden - have you considered using 
> open
> source hosting which specialize on fixing those?
> Something like https://gitorious.org/ or http://hub.darcs.net/ depending on 
> your vcs
> preference. On a related note - using something like jekyll or hakyll to 
> generate
> plain-text website content could solve db issue once and for all while 
> improving
> security at the same time.
> 
> Getting back to the question which got me interested in your libraries in a 
> first
> place - do you have some working examples?
> I'm especially curious in 'process' and 'record': I'd like to spawn plenty of
> long-running processes while setting env. variable to process-specific value 
> and
> saving process pid into some data structure for further interacting with it.
> 
> For example, I'd like to spawn proc1 with DISP=X1, proc2 with DISP=X2 etc and 
> I'd
> like to save that into record with (proc1, X1, pid1), (proc2, X2, pid2)
> 
> How do I implement it using 'process' and 'record' from sph.io? How do I 
> later access
> pid2 for example? How do I iterate over all the records?
> 
> The existing docs are nice but they are too brief for newbies :(
> 
> 21.07.2014 17:48, tantalum пишет:
>> i am sorry, i am late... i was not subscribed to the list. i maintain
>> the site
>>
>> yes, the site is unstable. despite that, it should always restart
>> automatically, please try again, and when you see a 403 that probably
>> means it is just starting, 502 that it just crashed ...
>>
>> at first i had to rewrite the server. that lead to downtimes as i found
>> difficulties with sockets and signals, but that should be good now.
>> i had a segfault in guile-reader and i just removed the dependency for
>> now and try to write at least a bug report for that.
>> now, if it crashes again i think it could only be one thing - the
>> database, let's see.
>>
>> until recently there was also a permission problem with the git
>> repositories: do you know about the setgid bit? i did not, and any time
>> i pushed new changes, the new files got the group of my user and not of
>> the git user which made the repository inaccessible to others. now i
>> have a test script and will look for continuous integration solutions.
>>
>> those are things that are hopefully fixed, but what is not yet fixed is
>> that i have to take the site down after i added or deleted content (not
>> when editing) to import database changes. this is another reason for
>> downtimes that i hope to remove some day.
>>
>> because, as always, there are so many things that can go wrong, if you
>> encounter a problem you can mail me at address@hidden and i will try to
>> fix it asap
>>
>> thanks for you interest
>>
> 
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]