stdin alternative to the -c command line option?

20 views
Skip to first unread message

Dani Irinchev

unread,
Oct 3, 2012, 7:09:43 AM10/3/12
to band...@googlegroups.com
Hi there,
Is it possible to feed program code to bandicoot through stdin instead of -c filename?
Cheers, Dani

Ostap Cherkashin

unread,
Oct 3, 2012, 3:59:27 PM10/3/12
to band...@googlegroups.com, band...@googlegroups.com
Hi Dani

So far there is only one way to pass the program code (via a file). We can probably extend the command line processing to deal with the "-c -" as most unix tools do. I raised an issue on github and will have a look at it when I have a moment: https://github.com/bandilab/bandicoot/issues/12

May I ask you what are you trying to achieve? To run dynamically generated programs or workaround the lack of dynamic queries?

Regards
Ostap

Dani Irinchev

unread,
Oct 3, 2012, 4:09:12 PM10/3/12
to band...@googlegroups.com
I have started a new project - bandicoot module for Node.js and was hoping to be able to offer the option to code bc scripts within the node app, will stick to files for the moment.. I am also preparing a new blog post on the subject, will be available shortly.. 

Dani Irinchev

unread,
Oct 4, 2012, 4:37:05 AM10/4/12
to band...@googlegroups.com
Another question - any chance to ask BC to bind to a specific IP instead of 0.0.0.0? Like 127.0.0.1 would be preferred in a case when BC is being hidden behind something else..

On Wed, Oct 3, 2012 at 9:59 PM, Ostap Cherkashin <os...@bandilab.org> wrote:

Ostap Cherkashin

unread,
Oct 4, 2012, 4:52:22 PM10/4/12
to band...@googlegroups.com
I've implemented an extension to the "-c"  which allows to specify "-" as the program file so that it is sourced from stdin, e.g.:

cat test/test_defs.b | bandicoot start -p 1235 -d bin/volume -s bin/state -c -

There are no binaries yet so you will need to build it from source (master).

With regard to being able to specify the IP address to bind to, this is not possible at the moment. I raised another issue and you can find the workaround in the corresponding comment:


Regards
Ostap
Reply all
Reply to author
Forward
0 new messages