pushing readline

0 views
Skip to first unread message

Davide Del Vento

unread,
Apr 5, 2011, 2:12:42 PM4/5/11
to slipstream-proteus-developers
I implemented readline in clip, but I cannot push, probably you need
to give me permissions:

~/scratch/proteus-core/ProteusCore/core$ git push
error: Cannot access URL
https://github.com/BruceDLong/ProteusCore.git/, return code 22
fatal: git-http-push failed

Note that I didn't implement conditional compilation if readline is
not available on your system, because I'm not very familiar with how
to do it with cmake. Note also that I didn't do it on a cross-platform
way either (it'll probably fail on windows, you might want to check it
- for this reason I left a couple of informative prints).

To install readline, on debian-like, you'll have to do a:
sudo apt-get install libreadline-dev

Cheers,
Davide

Bruce Long

unread,
Apr 5, 2011, 2:22:03 PM4/5/11
to slipstream-pro...@googlegroups.com
I added you as a collaborator in gitHub.

Thanks for that change to clip. That should make it much easier to use. I don't have a windows build just now. I'd say let's wait until someone needs it in Windows then look at updating it.

Again, thanks!

Bruce
--
Give me immortality or give me death!

David Van Duzer

unread,
Apr 6, 2011, 4:01:35 PM4/6/11
to slipstream-pro...@googlegroups.com
The readline commit works fine on Mac OS X 10.6 for what it's worth.

The mingw32 compilation tools and a boilerplate cmake file (attached)
build clip.exe for Windows if I revert the readline commit.
Interestingly enough, there is some special sauce inside Win32 that
provides readline-like functionality (i.e. up-arrow history works
automagically). An ifdef wrapper makes sense.

This points at the larger question of cross-compilation. Building
Proteus for Win32 is pretty straightforward with stock tools.
Including SDL libraries will be the main obstacle to cross-compiling
on Windows, but it is relatively easy to add SDL to a mingw build
environment.

On that note, should things like the attached cmake file go into the
git repository, or should build-related detritus live somewhere else
entirely?

dvd

Reading material: http://www.itk.org/Wiki/CmakeMingw

Toolchain-mingw32.cmake

Davide Del Vento

unread,
Apr 6, 2011, 4:15:08 PM4/6/11
to slipstream-pro...@googlegroups.com
My opinion on this. Building a cross-platform C/C++ app without an
external framework (such as Qt), is very messy. The code will become
full of #ifdef and painful to read: on windows use this library which
has this syntax for being called, on linux do this other thing...

So I guess the question is: what are our goals at this time? Possible answers:

- Do we want to build a fully-fledged cross-platform application? If
so, I would recommend to use a cross-platform framework (which would
ruin the "keeping dependencies to the bare minimum and possibly have
the thing compile in an embedded system" goal)
- Do we want to build a sort of functional, but more proof-of-concept
thing? Then just forget about windows. I would forget about MacOS too,
but maybe it's not too hard/messy to support it, so we should keep it
in the loop.

I believe there is room to do something in between these two extremes,
but it goes back to the housekeeping and keeping the code very clean,
which I'm not sure is a major goal at this time.

Let's see what Bruce says,
Davide

Bruce Long

unread,
Apr 6, 2011, 4:27:06 PM4/6/11
to slipstream-pro...@googlegroups.com
We definitely want to support all the major platforms. And it's important to have clean code. My understanding is that cmake is supposed to make it  build on Windows without additions to the CMakeLists.txt file. So I'm curious David, what happen if you try to build it on windows as-is. Just doing 'cmake .' then make.  It would worry me if we need a different cmake file for Windows.

As for getting clip to be cross platform, I see using readline as a temporary hack. Eventually we need clip to allow multi-line infons to be entered and that means we need to use ncurses and manually handle backspace, del, insert, home, end, pgup, pgdown and the arrow keys in a switch statement.

So my suggestion is that we don't try too hard to get clip with readline to work on Windows.

As for cross-platform slipstream, SDL should provide everything we need. At least for now. And SDL exists for XBOX, playstation, iPhone, Android, mac, etc. 

The only thing we MAY not be able to do with SDL is an HTML5 interface. Even then, I think there may be a way to do it. 

Bruce

Bruce Long

unread,
Apr 6, 2011, 4:59:00 PM4/6/11
to slipstream-pro...@googlegroups.com
On Wed, Apr 6, 2011 at 2:15 PM, Davide Del Vento <davide.d...@gmail.com> wrote:

I believe there is room to do something in between these two extremes,
but it goes back to the housekeeping and keeping the code very clean,
which I'm not sure is a major goal at this time.


Regarding housekeeping and clean code, these are priorities but right now getting a prototype/demo is a higher priority. So many other aspects of this project depend on a demo of the Slipstream engine. For example the work becomes much more parallelizable after a demo exists. That is true for both C++ code and Proteus model making.

After we have a good prototype that demonstrates user interaction through themes let's stand back and talk about what is next.

Davide, does the description on gitHub of the problem with associated lists make sense?

Bruce
Reply all
Reply to author
Forward
0 new messages