Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

www.prevayler.org say you wanted a database, which logged updates to disk

54 views
Skip to first unread message

quiet_lad

unread,
Jun 3, 2012, 11:07:56 PM6/3/12
to
and then you could write whole database to disk every so often

how would you concoct this using forth?

you would need to get web requests and run queries against the data in
ram so you have fast queries and then log any data updates first to
logfiel followed by the data structures in ram

if cash read in last database dump and rerun logfile updates against
it to regain state

Elizabeth D. Rather

unread,
Jun 4, 2012, 12:23:38 AM6/4/12
to
FORTH, Inc. managed databases like this for 20 years, in a large number
of applications, some of which are still in use. It isn't difficult to
implement, in any language, but you first have to learn the language.

Cheers,
Elizabeth

--
==================================================
Elizabeth D. Rather (US & Canada) 800-55-FORTH
FORTH Inc. +1 310.999.6784
5959 West Century Blvd. Suite 700
Los Angeles, CA 90045
http://www.forth.com

"Forth-based products and Services for real-time
applications since 1973."
==================================================

marko

unread,
Jun 4, 2012, 1:20:18 AM6/4/12
to
Forth applications by SD Roberts, $9.95 from amazon,

http://www.amazon.com/FORTH-Applications-Ready-programs-
Bitfire/dp/0911827005/ref=sr_1_fkmr1_2?ie=UTF8&qid=1338786923&sr=8-2-
fkmr1

shows a method for forth binary trees.

This might point you in the right direction for the in memory
structures.

When you have something working please post your code here.




quiet_lad

unread,
Jun 5, 2012, 8:06:08 AM6/5/12
to
On Jun 3, 9:23 pm, "Elizabeth D. Rather" <erat...@forth.com> wrote:
> On 6/3/12 5:07 PM, quiet_lad wrote:
>
> > and then you could write whole database to disk every so often
>
> > how would you concoct this using forth?
>
> > you would need to get web requests and run queries against the data in
> > ram so you have fast queries and then log any data updates first to
> > logfiel followed by the data structures in ram
>
> > if cash read in last database dump and rerun logfile updates against
> > it to regain state
>
> FORTH, Inc. managed databases like this for 20 years, in a large number
> of applications, some of which are still in use. It isn't difficult to
> implement, in any language, but you first have to learn the language.
>
> Cheers,
> Elizabeth
>
> --
> ==================================================
> Elizabeth D. Rather   (US & Canada)   800-55-FORTH
> FORTH Inc.                         +1 310.999.6784
> 5959 West Century Blvd. Suite 700
> Los Angeles, CA 90045http://www.forth.com
>
> "Forth-based products and Services for real-time
> applications since 1973."
> ==================================================

point taken... surfs to starting forth and thinking forth again..

quiet_lad

unread,
Jun 5, 2012, 8:09:03 AM6/5/12
to
hmm very interesting, I am tempted to purchase it for $10 on amazon...
hmm
!

Elizabeth D. Rather

unread,
Jun 5, 2012, 3:09:36 PM6/5/12
to
On 6/5/12 2:06 AM, quiet_lad wrote:
> On Jun 3, 9:23 pm, "Elizabeth D. Rather"<erat...@forth.com> wrote:
...
>
> point taken... surfs to starting forth and thinking forth again..

They won't do you any good unless you install a Forth and write some
code yourself. If you install a Forth (such as the evaluation version of
SwiftForth at www.forth.com) it will come with a lot of documentation
that will be more helpful to you than Starting Forth and Thinking Forth.

Trying to learn a programming language without writing code is like
trying to learn to swim without getting wet.

Bernd Paysan

unread,
Jun 5, 2012, 6:01:49 PM6/5/12
to
Elizabeth D. Rather wrote:
> Trying to learn a programming language without writing code is like
> trying to learn to swim without getting wet.

Actually reading someone else's code *is* helpful. Learning a language
(regardless if computer or human language) is both reading *and*
writing. It seems to me that computer languages are taught merely by
teaching how to write, and let the computer do the reading. This then
results in the typical "write-only code", which the author himself does
not comprehend, but - by the magic of testing - works.

So apart from installing your own Forth system and making experiments,
you also should look at Forth code from others. Unfortunately, I think
the German Forth user group's "VD" is the last standing regular
publication. It was a lot easier when I learned Forth. Dr. Dobbs had
put together a whole book of collected articles with Forth code.

A language consists not only of words, but also of idioms. In
programming languages, idioms are ways to do things which often occur -
a typical idiomatic thing was the OVER + SWAP (often defined as BOUNDS)
that we discussed here recently. When I taught b16 Forth to one of my
coworker, my argument was "32 instructions, three of them nops, some of
them with small variations, you ought to learn that quickly" was
countered by questions for idioms. "How do you read-modify-write a
variable" and such. In b16, it's @. >R <modify> R> ! (@. is a variation
of @ which leaves the address on TOS). This sort of stuff is non-
obvious to the beginner.

It does help to look at other people, how they swim, to learn swimming.
It is not sufficient, you have to get wet. But if you just jump into
the water without having looked at how swimmers move, you'll drown.
This is rather pointless.

--
Bernd Paysan
"If you want it done right, you have to do it yourself"
http://bernd-paysan.de/

Elizabeth D. Rather

unread,
Jun 5, 2012, 6:56:51 PM6/5/12
to
All true. But the main Forths available for download come with lots of
code to study, as well as documentation, all of it useful. I was
focusing on writing code because gavino keeps hoping if he badgers us
into posting code he'll learn something. He doesn't need to depend on
clf for that.

quiet_lad

unread,
Jun 6, 2012, 6:55:30 PM6/6/12
to
> Los Angeles, CA 90045http://www.forth.com
>
> "Forth-based products and Services for real-time
> applications since 1973."
> ==================================================

I have little guy called pfe on my freebsd box here.
It seems nice.
I usually use gforth but I think compiing it points to libsomething.so.
5 not 6 and I have been told they will fix that soon so then I might
go back to gfroth but pfe seems fine sofar.

quiet_lad

unread,
Jun 6, 2012, 6:57:02 PM6/6/12
to
> Los Angeles, CA 90045http://www.forth.com
>
> "Forth-based products and Services for real-time
> applications since 1973."
> ==================================================

ps I am not trying to badger anyone, sorry if I seem so, I just see
howto do some things and wanted to look at how forth did them. I
envision forth a a little ocnveyor belt that puts data on the belt and
then has lil robotic arms than do things an put results back on the
belt aka stack.

marko

unread,
Jun 7, 2012, 9:26:40 AM6/7/12
to
Cool - so do it, post your result here. You have direct access to the
gurus. When you post on-topic stuff here, the best in the world will
comment.

When you post off-topic everyone else will comment, which brings down
the whole thread.






quiet_lad

unread,
Jun 8, 2012, 2:53:14 AM6/8/12
to
what questions when asked, would make you happy?

quiet_lad

unread,
Jun 8, 2012, 3:00:45 AM6/8/12
to
On Jun 7, 6:26 am, marko <ma...@marko.marko> wrote:
What in my post was "off" topic?

Elizabeth D. Rather

unread,
Jun 8, 2012, 3:08:54 AM6/8/12
to
On 6/7/12 8:53 PM, quiet_lad wrote:
> On Jun 7, 6:26 am, marko<ma...@marko.marko> wrote:
...
>>> ps I am not trying to badger anyone, sorry if I seem so, I just see
>>> howto do some things and wanted to look at how forth did them. I
>>> envision forth a a little ocnveyor belt that puts data on the belt
>> and
>>> then has lil robotic arms than do things an put results back on the
>>> belt aka stack.
>>
>> Cool - so do it, post your result here. You have direct access to the
>> gurus. When you post on-topic stuff here, the best in the world will
>> comment.
>>
>> When you post off-topic everyone else will comment, which brings down
>> the whole thread.
>
> what questions when asked, would make you happy?

Anything that arises out of serious work and study on your part. That is
what we fail to see any sign of.

marko

unread,
Jun 8, 2012, 4:40:05 AM6/8/12
to
Which part?

Part 1 - prevayler - object persistance in java. Not Forth. If you
want that, use java. In Moore speak, "you wouldn't", In conventional
forth it is bloatware. This is the stuff you cut out to get the 10%
code size.


Part 2 - The oncveyer belt - has nothing to do with the title.

You need to contribute to the group if you want answers. Formulate
your analysis, research your topics, then post.

If I wanted a database which logged updates to disk, I would use a
database which logged updates to disk. There are plenty available. I
certainly would not write a Forth program to do this task.


Quering against data in ram is called caching. All the major databases
do it. Writing to a log file is called journaling. Many major
databases and operating systems do it.





marko

unread,
Jun 8, 2012, 5:16:01 AM6/8/12
to
Don't forget that the python, lisp and scheme newsgroups consider your
posts as trolling. comp.lang.lisp had your number back in 2006.


<https://groups.google.com/group/comp.lang.lisp/msg/be1d88d7d455951f?dmode=source&output=gplain&noredirect>

http://www.digipedia.pl/usenet/thread/1158/63735/


You have a lot of work to do if you really want to be taken seriously.

quiet_lad

unread,
Jun 11, 2012, 4:43:32 AM6/11/12
to
I suggest opening the link to prevayler www.prevayler.org

quiet_lad

unread,
Jun 11, 2012, 4:57:49 AM6/11/12
to
On Jun 8, 2:16 am, marko <ma...@marko.marko> wrote:
> Don't forget that the python, lisp and scheme newsgroups consider your
> posts as trolling.  comp.lang.lisp had your number back in 2006.
>
> <https://groups.google.com/group/comp.lang.lisp/msg/be1d88d7d455951f?d...>
>
> http://www.digipedia.pl/usenet/thread/1158/63735/
>
> You have a lot of work to do if you really want to be taken seriously.

Let me share my perspective on this: I know unix well, and am a high
paid pro at it.
Programming is something I want to learn more about and not java. I
consider myself
a genius and indeed have a high iq 154. I don't come here as someone
you assume
as being wowed by technology. I see things that might be amazing and
ask
hey you are using this tek, what do you think about it? How does it
compare
to this other tek also free that also seems high performance, great
abstraction
etc etc, and I guess I appear insolent when I don't cringe at people's
feet.
I am also super tall, american, and have lots of muscles, which might
add to
my arrogance or I guess rejection and counterattack to any insults I
get
from a lot of the nerds I encouter or eurotrash commies I encounter.
Remember from my point of view Europe are sickly failed economies who
should copy USA not the other way around. I would also end the fed,
public
school, and all foriegn aid immediatly and cut gov spending 80% or
more while
replacing most lawyers with software. So I see things like forth as
amazing
tools, and people who won't stay on subject or who insult me as just
tools.
Many people insult me without even knowing a solution to whatever
problem I
am posting about and they get boomerang of abuse back on them from me.
I find forth so far to be foriegn and a big shift from procedural
things like
tcl which I use day to day but am slowly studying. This does not stop
me
from wondering about more general things like does forth run on 16 cpu
boxes?
Would a web app done in forth be stuck on 1? or since it is
essentially a cgi like
the gforth appserver by paysan would it fork and run on any of the 16
cpu?
In unix management this is the kind of thing I have to tune for all
the time.
For example nginx has worker processes, and if you dont put 1 per cpu,
and then
configure the cpu affinity it also won't use a 16 core machine. I
then ask
questions about things like this. I also know memory is many times
faster than
disk so prevayler looks like a huge win, as long as it can be made to
talk to the web, which seems entirely possible. Cacheing of course is
important,
but prevayler is more than that, see the link. It would seem a forth
prevayler
and web app would be very efficient and extensible perhaps this is
what I will
work toward as I learn more forth.

quiet_lad

unread,
Jun 11, 2012, 4:58:36 AM6/11/12
to
0 new messages