Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2013-06

Some general questions - I've been away from fpc for a while

4 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Peter Brooks

I've been away from fpc for a while, but I'm thinking of using it because the simulation project that I'm working on looks as if it is well suited to it. I've looked at python, but the threading doesn't work. I've looked at Ada, which would be an excellent solution, but I don't really need it to be that reliable so the type-checking overhead probably isn't worth the hassle.

I've used Turbo Pascal for a similar simulation in the past (the late '80s, when the new Borland object orientated compiler had just come out), and it worked really well.

Are there any good examples of threads working well with fpc?

How well is JSON integrated with fpc - I see that there is a package, and it supports some reading and writing, but, can you import instantiate a new object from a JSON schema?

Is there any NoSQL support yet? I'd like to export variably sized JSON objects into a NoSQL database so that they can be retrieved randomly by ID (URI really). I say this because there might be some b-tree software that'll do the job well.

Reply by email

Sven Barth
to Peter Brooks
Peter Brooks wrote
How well is JSON integrated with fpc - I see that there is a package, and it supports some reading and writing, but, can you import instantiate a new object from a JSON schema?

There is a unit fpJsonRTTI which allows you to read and write classes which contain RTTI information. I've not used it yet, but it sounds promising. You should read up on the topic of RTTI in Free Pascal/Delphi though to understand any restrictions this approach might impose. For example here:
http://www.blong.com/Conferences/BorConUK98/DelphiRTTI/CB140.htm

Regards,
Sven

Reply by email

leledumbo
to Peter Brooks: I've been away from fpc for a while, but I'm thinking of using it because the simulation…
Are there any good examples of threads working well with fpc?

The wiki article should get you started:
http://wiki.lazarus.freepascal.org/Multithreaded_Application_Tutorial And I have one working application using it:
https://code.google.com/p/express-gui/

How well is JSON integrated with fpc - I see that there is a package,

and it supports some reading and writing, but, can you import instantiate a new object from a JSON schema?

Why don't you just try? If you need a (somewhat complex) example, try this: https://bitbucket.org/reiniero/fpctwit

Is there any NoSQL support yet?

I don't remember, but I think it doesn't exist yet

Reply by email