EzDevInfo.com

Alice

AliceJS - (A Lightweight Independent CSS Engine) is a micro JavaScript library. For a demo, click the link below. AliceJS - (A Lightweight Independent CSS Engine)

Learning programming language concepts [closed]

As a student teacher I am very interested in how effective "mini languages" such as Scratch, Logo, Alice and Lego mindstorms are in teaching the pupil the core concepts of programming such as variables, functions and loops.

Is one "mini language" better than another for teaching these basic core concepts?


Source: (StackOverflow)

How useful is Alice as a learning tool?

I am currently studying and my next subject is 'Programming Using Alice'. Has anyone had any experience using this? And how would you rate it as a learning tool?


Source: (StackOverflow)

Advertisements

Cannot add models to scene in Alice 2.4.1: CapabilityNotSetException

When trying to add a new model (add objects -> click model -> add instance to world), I get a message box telling me that An unknown error has occured. The entity gets added to the object tree (see screenshot), but does not appear in the render window.

I'm using Alice for the first time on this computer. It worked fine on other computers in earlier versions on different PCs. I have searched the Alice forums for this particular issue, but no avail. The problem does not occur in Alice 2.3.3.

Alice version: 2.4.1
os.name: Windows XP
os.version: 5.1
os.arch: x86
java.vm.name: Java HotSpot(TM) Client VM
java.vm.version: 20.0-b11
user.dir: C:\Programme\Alice 2.4\Required

Error during simulation.
javax.media.j3d.CapabilityNotSetException: Appearance: no capability to set transparencyAttributes
    at javax.media.j3d.Appearance.setTransparencyAttributes(Appearance.java:374)
    at edu.cmu.cs.stage3.alice.scenegraph.renderer.java3drenderer.AppearanceProxy.changed(AppearanceProxy.java:122)
    at edu.cmu.cs.stage3.alice.scenegraph.renderer.AbstractProxyRenderer.dispatchPropertyChange(AbstractProxyRenderer.java:38)
    at edu.cmu.cs.stage3.alice.scenegraph.renderer.AbstractRenderer.changed(AbstractRenderer.java:220)
    at edu.cmu.cs.stage3.alice.scenegraph.Element.onPropertyChange(Element.java:155)
    at edu.cmu.cs.stage3.alice.scenegraph.Element.onPropertyChange(Element.java:162)
    at edu.cmu.cs.stage3.alice.scenegraph.Appearance.setOpacity(Appearance.java:115)
    at edu.cmu.cs.stage3.alice.core.Model.propertyChanged(Model.java:201)
    at edu.cmu.cs.stage3.alice.core.Element.propertyChanged(Element.java:269)
    at edu.cmu.cs.stage3.alice.core.Property.onChanged(Property.java:427)
    at edu.cmu.cs.stage3.alice.core.Property.onSet(Property.java:453)
    at edu.cmu.cs.stage3.alice.core.Property.set(Property.java:470)
    at edu.cmu.cs.stage3.alice.core.Property.setHowMuch(Property.java:476)
    at edu.cmu.cs.stage3.alice.core.Property.set(Property.java:492)
    at edu.cmu.cs.stage3.alice.core.response.PropertyAnimation$RuntimePropertyAnimation.set(PropertyAnimation.java:90)
    at edu.cmu.cs.stage3.alice.core.response.PropertyAnimation$RuntimePropertyAnimation.update(PropertyAnimation.java:135)
    at edu.cmu.cs.stage3.alice.core.response.DoTogether$RuntimeDoTogether.update(DoTogether.java:71)
    at edu.cmu.cs.stage3.alice.core.response.DoInOrder$RuntimeDoInOrder.childUpdate(DoInOrder.java:58)
    at edu.cmu.cs.stage3.alice.core.response.DoInOrder$RuntimeDoInOrder.update(DoInOrder.java:101)
    at edu.cmu.cs.stage3.alice.core.response.DoTogether$RuntimeDoTogether.update(DoTogether.java:71)
    at edu.cmu.cs.stage3.alice.core.response.DoInOrder$RuntimeDoInOrder.childUpdate(DoInOrder.java:58)
    at edu.cmu.cs.stage3.alice.core.response.DoInOrder$RuntimeDoInOrder.update(DoInOrder.java:101)
    at edu.cmu.cs.stage3.alice.core.util.OneShot.scheduled(OneShot.java:56)
    at edu.cmu.cs.stage3.alice.core.Scheduler.schedule(Scheduler.java:72)
    at edu.cmu.cs.stage3.alice.core.Scheduler.run(Scheduler.java:98)
    at edu.cmu.cs.stage3.alice.authoringtool.util.DefaultScheduler.simulateOnce(DefaultScheduler.java:117)
    at edu.cmu.cs.stage3.alice.authoringtool.util.DefaultScheduler.run(DefaultScheduler.java:78)
    at edu.cmu.cs.stage3.scheduler.AbstractScheduler.run(AbstractScheduler.java:45)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:641)
    at java.awt.EventQueue.access$000(EventQueue.java:84)
    at java.awt.EventQueue$1.run(EventQueue.java:602)
    at java.awt.EventQueue$1.run(EventQueue.java:600)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:611)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

see screenshot


Source: (StackOverflow)

Should an adult around 40 like me, learn programming by Alice?

Sorry I don't know is it the right place to post this question, if not please let me know.
I want to learn OOP and 3D game programming skill too, is Alice useful for old man too?
why it target on teen and child only?


Source: (StackOverflow)

Futures in Haskell

Does Haskell have an equivalent of Alice's ability to bind a variable to a future?

val a = spawn foo;

where foo is some function.

I know Haskell supports channels and threads; I'm hoping for syntax as natural as Alice's to bind a value to a future and spawn a thread to calculate it without having to deal with the details.


Source: (StackOverflow)

Is Alice a good way to teach programming? [closed]

"Alice is an innovative 3D programming environment that makes it easy to create an animation for telling a story, playing an interactive game, or a video to share on the web ..."

Is it addictive enough to have a good chance that a pupil will remain interested. Is it motivating enough to start learning "normal" programming.

... or is it better to start with Logo?


Source: (StackOverflow)

Alice and Scratch ages 8+, how about under 8yrs old? [closed]

I just found out about Alice and Scratch. I will be implementing those pretty soon. But, I wonder, what would be good material for kids from 1st grade thru 4th/5th?


Source: (StackOverflow)

Are there Java libraries to do drag and drop

Are there open source libraries for Java to make implementation of drag and drop easier?

I plan to make something like the one shown below:

alt text

The program is Alice, where you can drag some elements on the left and nest them to the right. It's open source, but they did not use any libraries I think. I'm wondering if we anyone know of open source frameworks that work this way, or assist in doing complex drag and drops.


Source: (StackOverflow)

Alice vs Python for someone with zero experience [closed]

My brother would like to learn some programming to find out if he'd enjoy doing it. He's 16 and doesn't know much about computers in general and knows nothing about programming in particular.

I'm thinking about picking either Alice or Python. I see Think Python is the often recommended read, but isn't it a bit too much (size-wise) for a beginner? It's certainly not too complicated, but I'm not that optimistic about my brother... :) Anything else he could try that would be smaller and VERY simple?

Also, has anyone had any experience with Alice? I myself wouldn't really want to start programming this way, but I can see why the visual aspect might be more attractive to certain people. I'm just not sure how limiting it is and if the time used learning the pseudo language wouldn't be better spent learning a real one.

EDIT: Thank you for your replies. I guess we'll go with Python. However, as I mentioned above, isn't "Think Python" a bit too extensive for a complete "newbie"? Any other, but simpler Python programming introductions you could recommend?


Source: (StackOverflow)

Looking for a good AIML api in java

I'm looking for a good AIML(Artificial Intelligence Markup Language) in Java, that I could embedded in a much larger java application. It would be nice if I can use a database to store the aiml files.

So far I found

a) Program D: http://aitools.org/
b) Program W: http://programw.sourceforge.net/
c) Charliebot: sourceforge.net/projects/charliebot/

b) and c) are based on Program D.

I looked at program D documentation but I didn't find anything that couldn't fin a simple example of how to embedded this into an apllication, in case you can do this.

My application will have multiple bots, every bot with separate config files and aiml files. I want to use a database because users can edit a certain node from aiml files and I think this is much easier and safe to implement.

If you know other apis please tell me, or if you know how to embedded a current one I would appreciate an example. Thanks


Source: (StackOverflow)

Store 3D objects? (Java)

I am making a program such as Alice from Carnegie Melon University using JAVA.

I am not asking about Alice! What I really want to know is HOW DO I Store 3D Graphics?

I can't seem to find a very efficient way to store complicated 3D objects and figures! I need this for 3D object libraries. I have extracted all the files from alice.JAR and decompiled them to *.JAVA. I have studied them and I don't get it. I think Alice stores them in *.XML. Am I correct? If so, how are the *.XML files so small? Is there any better way to store 3D Graphics?

I am kind of really confused!?!

Can anybody please help me?

Any answers would be greatly appreciated! :)


Source: (StackOverflow)

Alice into Netbeans Java Language

I'm working on a school project and setup a scene in Alice 3.1 and transferred it into Netbeans for the Java code. Everything in it runs fine except the audio at the very beginning.The audio file is called UnbirthdaySong.wav and it runs fine when i play it through Alice but when it gets to Netbeans it does not work. The line of code in Netbeans is
this.playAudio(new AudioSource(todo_ResourceExpression[])); and its all above a red underline. . All it says in Netbeans is ".class' expected unexpected type required: value found: class". Then if i put in the name of the song file
this.playAudio(new AudioSource(todo_ResourceExpression[UnbirthdaySong.wav])); it red underlines the todo_ResourceExpression and [UnbirthdaySong.wav] and says cannot find symbol symbol: variable todo_ResourceExpression location: class Scene. Any help would be appreciated.


Source: (StackOverflow)

Functions - different meanings in different languages?

I am a very novice programmer, taking a course on the fundamentals of Java. In Alice 3, a function is defined as: A Function computes and answers a question about an object, such as, “What is its width or height?" I have used Blockly before and in Blockly, a function appears to be something else - more like a procedure. Can anyone help please?


Source: (StackOverflow)

I can't see the output of NSTask - objective-c JAVA

Here is my code:

NSTask *setupTask = [NSTask new];
[setupTask setLaunchPath:@"/bin/sh"];
[setupTask setArguments:[NSArray arrayWithObject:@"/applications/jarvis/brain/server.sh"]];
[setupTask setCurrentDirectoryPath:@"/"];
NSPipe *outputPipeSetup = [NSPipe pipe];
[setupTask setStandardInput:[NSPipe pipe]];
[setupTask setStandardOutput:outputPipeSetup];
[setupTask launch];

NSTask *aliceTask = [NSTask new];
[aliceTask setLaunchPath:@"/usr/bin/java"];
[aliceTask setArguments:[NSArray arrayWithObjects:@"-classpath", @"/applications/jarvis/brain/", @"-Xms64m", @"-Xmx128m", @"org.alicebot.server.net.AliceServer", nil]];

 NSPipe *aliceInputPipe = [NSPipe pipe];
 [aliceTask setStandardInput:aliceInputPipe];
 NSPipe *aliceOutputPipe = [NSPipe pipe];
 [aliceTask setStandardOutput:aliceOutputPipe];

 [aliceTask launch];

NSMutableString *outputString = [NSMutableString string];
while ([outputString rangeOfString:@"Jarvis>"].location == NSNotFound) {
    [outputString appendString:[[[NSString alloc] initWithData:[[aliceOutputPipe fileHandleForReading] readDataToEndOfFile] encoding:NSUTF8StringEncoding] autorelease]];
}

BUT, outputString returns nothing and it get's stuck in the while loop. Here is the server.sh file:

echo Starting Jarvis Program D.
ALICE_HOME=.
SERVLET_LIB=lib/servlet.jar
ALICE_LIB=lib/aliceserver.jar
JS_LIB=lib/js.jar

# Set SQL_LIB to the location of your database driver.
SQL_LIB=lib/mysql_comp.jar

# These are for Jetty; you will want to change these if you are using a different http server.
 HTTP_SERVER_LIBS=lib/org.mortbay.jetty.jar

 PROGRAMD_CLASSPATH=$SERVLET_LIB:$ALICE_LIB:$JS_LIB:$SQL_LIB:$HTTP_SERVER_LIBS
 java -classpath $PROGRAMD_CLASSPATH -Xms64m -Xmx128m org.alicebot.server.net.AliceServer $1

Source: (StackOverflow)

Programming with Alice, not working with Arch Linux

I'm having trouble running Alice 2.0 on Arch. I figure I'd ask here because of the number of programmers here who may have experience with either Java or Alice on Linux. When I was running Ubuntu before, going to the proper folder and running ./run-alice would display:

attempting to register mp3 capability...  
Registered successfully.

However, now that I'm running Arch Linux, I'm having trouble with it. Alice doesn't want to run. Instead, it complains about an IndexOutOfBoundsException.

java.lang.IndexOutOfBoundsException: Invalid index  
        at javax.swing.DefaultRowSorter.convertRowIndexToModel(DefaultRowSorter.java:497)  
        at sun.swing.FilePane$SortableListModel.getElementAt(FilePane.java:528)  
        at javax.swing.plaf.basic.BasicListUI.updateLayoutState(BasicListUI.java:1343)  
        at javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState(BasicListUI.java:1294)  
        at javax.swing.plaf.basic.BasicListUI.getCellBounds(BasicListUI.java:935)  
        at javax.swing.JList.getCellBounds(JList.java:1600)  
        at javax.swing.JList.ensureIndexIsVisible(JList.java:1116)  
        at sun.swing.FilePane.ensureIndexIsVisible(FilePane.java:1540)  
        at sun.swing.FilePane.doDirectoryChanged(FilePane.java:1466)  
        at sun.swing.FilePane.propertyChange(FilePane.java:1513)  
        at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)  
        at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)  
        at java.awt.Component.firePropertyChange(Component.java:8128)  
        at javax.swing.JFileChooser.setCurrentDirectory(JFileChooser.java:568)  
        at edu.cmu.cs.stage3.alice.authoringtool.AuthoringTool.worldsDirectoryChanged(AuthoringTool.java:478)    
        at edu.cmu.cs.stage3.alice.authoringtool.AuthoringTool.dialogInit(AuthoringTool.java:631)  
        at edu.cmu.cs.stage3.alice.authoringtool.AuthoringTool.<init>(AuthoringTool.java:413)  
        at edu.cmu.cs.stage3.alice.authoringtool.JAlice.main(JAlice.java:131) 

I honestly have no idea what's wrong. I have tried checking out the source to try to fix it (seems like the error is in JAlice) but it's just a collection of .class files.


Source: (StackOverflow)