Alice Community  

Go Back   Alice Community > General Discussion > Questions and Comments

Reply
 
Thread Tools Display Modes
Alice Source code and open source development
Old
hgs
Guest
 
Status:
Posts: n/a
Default Alice Source code and open source development - 01-16-2009, 03:06 PM

Quote:
Originally Posted by aikmin View Post
Alice is open source. I am working with the source code right now, and i have been and still releasing new updates as i fix bugs in Alice.
Could I trouble you to explain more about your process, please? I was unable to make any progress myself because of the dependency graph, which when I tried to build it was unknown to me and only discoverable by error messages. Also, the process ended in a failure to load something already installed due to a previous dependency.

Dennis Cosgrove's fictional quote:
Quote:
EAD#3: There aren't any Makefiles. It's Java.
may be amusing, but the Java compiler, javac, may be invoked from the command line, so using a Makefile should be possible. If an IDE is expected, there seemed to be no information that I could find about what it should be, or how to setup its configuration for correct operation. Maybe this is extremely obvious to those who actually use the language, which I don't, really. I was exploring this for various reasons, one as a motivator to become more familiar with Java, as it gets everywhere! :-) I would have also liked to contribute a move_horizontally_towards method to overcome the "walking into the ground" problem people have faced.

I hope there will be encouragement for a developer community whose selected contributions may end up in the official source code, when Alice 3 is released. The busy Alice team could benefit from that.
   
Reply With Quote
Old
Niteshifter
Guest
 
Status:
Posts: n/a
Default 01-24-2009, 01:03 AM

Hmm... I'm going to see what I can modify in this source code...
   
Reply With Quote
Alice's "openness" currently at 25%
Old
jeffery
Guest
 
Status:
Posts: n/a
Default Alice's "openness" currently at 25% - 02-25-2009, 04:09 AM

Dennis,

Thanks for that very entertaining and illuminating historical recount. I truly enjoyed the creativity of the response.

If there is one thing I can't stand, it is a whiner baby like Jeffery! I mean, the nerve of some people! Requesting an open-source distribution to come with build instructions! The ungrateful wretch!
---
A quick scan of responses on hgs's thread seems to show three people unable (or too lazy, or too pressed for time) to figure out how to build, and one person who has succeeded. So we are at 25%. Aik Min, I salute you, and beg you to write up and go public with your experience. And, I hope others in the community will tell about their build experiences.
   
Reply With Quote
Alice's Open Source Nature
Old
edljr
Guest
 
Status:
Posts: n/a
Default Alice's Open Source Nature - 02-28-2009, 10:02 PM

Yes, Alice truly is open source. I am not sure what the Hex comments are referring to unless someone is trying to edit the compiled exe files. What you can do is download Alice's complete set of source files and edit them with Sun's NetBeans 6.5 (www.netbeans.org). If you do not already have the Java Developer's Kit, you can download NetBeans and the JDK in one file.

I already had NetBeans and have (at this moment) Alice's source code open on my screen. Let there be no confusion, this is all free and completely open.

Alice is a robust program with several libraries, objects, and other elements that you have to be a navigational master to get through the maze. If anyone has mastered the labyrinth of code, I would like to hear from them; I have a simple change I would like to implement.
   
Reply With Quote
Getting source into an IDE into an IDE
Old
ottar9919
Guest
 
Status:
Posts: n/a
Default Getting source into an IDE into an IDE - 03-07-2009, 02:00 PM

I am trying to get the source code in Netbeans IDE, but I don't know how. Can anybody help me?
   
Reply With Quote
Net Beans & Alice
Old
edljr
Guest
 
Status:
Posts: n/a
Default Net Beans & Alice - 03-07-2009, 02:18 PM

Step 1. Open Net Beans (6.5 is preferred)
Step 2. Inside Net Beans, select File->Open File
Step 3. Navigate to where you put the Alice files
Step 4. Select the "/Required/lib/alice.jar" file

Now you have access you everything. Let me know if you need further help.
   
Reply With Quote
Old
DrJim
Guest
 
Status:
Posts: n/a
Default 03-16-2009, 10:54 AM

Quote:
Originally Posted by Dennis Cosgrove View Post
EAD#3: But Alice is implemented in Java. There really isn't any build information.
The above quote didnít quite ring true when I first saw it - but since I agreed with the rest of Dennisís posting (Alice is definitely open source, though I doubt anyone would claim the source is well documented ) I really didnít give it much thought, nor did I really understand some of the following postings.

But then I was looking at the recently (March 4, 2009) released source code for Greenfoot and BlueJ - and there, big as life, were build.xml files for the code for both programs. I started looking at the issue in a little more depth and can say that the above quote is definitely incorrect - or at best misleading. A build file is a Configuration Management (CM) tool that has very little to do with the underlying programming language. If one was not included in the source code package - it was at the choice of the developers, not a result of the code being Java (also see last comment).

As an example, see http://en.wikipedia.org/wiki/Apache_Ant for a sample build.xml file, generated using ANT (Another Neat Tool), for a simple Java "Hello, world" program. Of course, going to a full CM system for such a simple program would be ridiculously expensive and time consuming - but the sample does illustrate the approach.

The same link, in the section on portability, has a discussion of Makefiles, which seem to be a Unix (not C++) specific thing. Both this, and Configuration Management in general, are well beyond the scope of a simple forum posting - and also probably not appropriate topics to be addressed at a beginning CS level. It should be noted, however, that for large software projects, especially for critical systems such as medical electronics and avionics, CM is an extremely important part of the overall development process.

In addition to ANT (which is used by NetBeans), there are many other CM tools available, including MSBuild. According to Wiki - several IDEís also support this function, including a specific plug-in for Eclipse. (As an added note, if you are working with the complete set of Alice source files, you are going to have to have an IDE that handles both C++ and Java, since many C++ files are included.)
   
Reply With Quote
Modifying Alice source code
Old
DrJim
Guest
 
Status:
Posts: n/a
Default Modifying Alice source code - 03-16-2009, 02:43 PM

Quote:
Originally Posted by edljr View Post
Step 3. Navigate to where you put the Alice files
Step 4. Select the "/Required/lib/alice.jar" file

Now you have access you everything.
Well, not quite unless you are actually using NetBeans. Can't say for sure about that - haven't quite gotten to the point with Java where I'm willing to jump there. But I do know when you try to start Alice by double clicking on alice.jar I get a "mainifest file not found" or something similar.

Caution : Do not do this at home unless you are willing to destroy your entire Alice setup - and maybe a few other things. Among other things, this may just demonstrate my talents - developed over nearly half a century - of being able to really screw up a computer.

However, the following link may be interesting:
http://ostermiller.org/opening_jar_files.html

Using this hint - and 7Zip on an XP machine (I haven't got it to work on Vista) - I was able to decompress the alice.jar file. Very nice - one can now see which compiled (.class) files are actually used in the version of Alice you are currently using.

Since, at least with a quick check, the uncompiled (.java) files are all available in the Alice source code listings, you - in PRINCIPLE - should be able to modify a .java file, recompile it and replace the original .class file with the new one.

Anyone that feels like it - have fun. But you were warned!

Last edited by DrJim; 03-16-2009 at 02:51 PM. Reason: Corrected typo's
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 03-16-2009, 10:26 PM

I've done something similar already. When an element of my Alice worlds generated an error which prevented the world from opening, I eventually had to extract the files from the Alice world (coincidentally, I used 7-Zip) and look through the folders representing the extracted objects in the world to find the element then delete the flawed object.

I never gave this any thought, but I suppose it might be possible to REPLACE corrupt elements in an Alice world with nearly identical but untainted elements by deleting the bad one, inserting the good one, then rezipping the changed world.

I'll try it...eventually.


(')>
   
Reply With Quote
Old
DrJim
Guest
 
Status:
Posts: n/a
Default 03-18-2009, 06:47 PM

I had a private exchange with Dick Baldwin on the subject and he pointed out that there are some security checks in Java that make actually editing a .class file directly a bad idea. Recompiling from a modified .java file and just doing a substitution may work - or may really goof things up. If I ever get enough guts to try, I'll post the results.
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2019, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.