Archived posts, use them to search

Re: New Virtual Programming Lab (VPL) module

by Juan Carlos Rodríguez-del-Pino -
Number of replies: 3
Picture of Particularly helpful Moodlers Picture of Plugin developers

Hello Vikram Jain,
Notice that VPL is highly configurable allowing you to write your own scripts for many programming languages that run on Linux.  In any case the execution server must provide the compiler/interpreter and libraries needed to run these programs.
At this moment with VPL 3.3 and Execution Server 2.2.2 on Ubuntu you can:
1)    SWIFT language. The editor can do the syntactic highlighting of the code. To run basic Swift programs, you must install the compiler https://swift.org/download/ and write the script vpl_run.sh to compile and prepare the run of the program
2)    Android. I guess that you are referring to java, I suppose (I really don’t know) that in this case you need to install the compiler, libraries and an emulator for android that allow to run multiple instances simultaneously.
3)    KOTLIN. the next release of VPL will do the syntactic highlighting of the code. You must install the compiler and write the script vpl_run.sh to compile and prepare the run of the program for the chosen target platform.

Summarized: VPL, out of the box, can do very few with these programming languages . If you manage to resolve this issues, please share your code and experience.

Best regards,
Juan Carlos

In reply to Juan Carlos Rodríguez-del-Pino

Re: New Virtual Programming Lab (VPL) module

by Vikram Jain -

hi Juan,


While running a simple "hello World" script in R, I encounter the connection closed error. see attached image.

Any clues ?


Below my r_run.sh ...

########################

# load common script and check programs

. common_script.sh

check_program Rscript

if [ "$1" == "version" ] ; then

echo "#!/bin/bash" > vpl_execution

echo "R --version | head -n3" >> vpl_execution

chmod +x vpl_execution

exit

fi

get_source_files r R

#Select first file

for FILENAME in $SOURCE_FILES

do

SOURCE_FILE=$FILENAME

break

done

#compile

cat common_script.sh > vpl_wexecution

cat  $SOURCE_FILE >> .Rprofile

if [ "$1" == "batch" ] ; then

echo "xterm -e R --vanilla -f $SOURCE_FILE" >>vpl_wexecution

else

echo "xterm -e R -q" >>vpl_wexecution

fi

chmod +x vpl_wexecution

########################################3

Best Regards,

Vikram

Attachment conn_closed.JPG
In reply to Vikram Jain

Re: New Virtual Programming Lab (VPL) module

by Juan Carlos Rodríguez-del-Pino -
Picture of Particularly helpful Moodlers Picture of Plugin developers

Hello Vikram,
sorry for the long long delay, it seems that I lost some e-mail from Moodle.
Really I don't why when you run R code your program exit with no message. I run your code on demo site of VPL and it shows the message.
But I see two VPL problems:
1) A know problem is that sometimes the VNCclient don't show the window if you don't click on blue background.
2) The demo site of VPL shows a very slow R start up. This problem can be improved using vncaccel to reduce the start time of the GUI programs (see release of execution server 2.2.2)
Due to your post I have added “R” (uppercase) extension to the editor and language auto-detector to the next VPL release.

Best regards,
Juan Carlos.

Attachment Captura.jpg
In reply to Juan Carlos Rodríguez-del-Pino

Re: New Virtual Programming Lab (VPL) module

by Vikram Jain -

hi Juan,


On running a simple swift code, the execution server is not able to locate swift (though it is correctly installed). I guess the problem is : Execution server cannot locate the installation path of swift compiler files. see attached image.

Any clues ?

I have tried to set both ENVPATH and PATH in /etc/vpl/vpl-jail-system.conf file and stop/start service but no success.

If I locally copy the swift compiler to "/usr/bin", the problem is partially resolved but further dependencies cannot be resolved.

Note - My execution OS is Ubuntu 16.04


Best Regards,

Vikram

Attachment swift_path_error.JPG