Hi there - another question which will show you how little I know about linux (or any kind of) machines. I use Scite as my script editor on Ubuntu Gutsy (Linux/Debian), and I need a syntax highlighter for Chuck stuff. The wiki suggests that I use this python script as my IDE: http://wiki.cs.princeton.edu/index.php/Smallest_ChucK_IDE_Ever Now my question is...which directory do I put this .py script in to run? I mean, i've noticed that Chuck files can only be thrown in the VM from a terminal which is in that directory that contains the .ck file being chucked? And I often need to switch directories to access different files. Or can this .py run in some kind of global manner? -- ------- -.- 1/f ))) --. ------- ... http://www.algomantra.com
ons 2008-02-06 klockan 14:47 +0530 skrev AlgoMantra:
Hi there - another question which will show you how little I know about linux (or any kind of) machines.
I use Scite as my script editor on Ubuntu Gutsy (Linux/Debian), and I need a syntax highlighter for Chuck stuff. The wiki suggests that I use this python script as my IDE:
http://wiki.cs.princeton.edu/index.php/Smallest_ChucK_IDE_Ever
Now my question is...which directory do I put this .py script in to run? I mean, i've noticed that Chuck files can only be thrown in the VM from a terminal which is in that directory that contains the .ck file being chucked? And I often need to switch directories to access different files. Or can this .py run in some kind of global manner?
I'd place it anywhere I wanted. be it in my home, with my chuckfiles, or in /usr/local/bin, or something else. Just execute it with "python /path/to/runchuck.py path/to/file.ck", and you're all set. (btw, even if the wiki tells you to do something, you don't need to do it. But if you like Scite...) Gasten
I'd place it anywhere I wanted. be it in my home, with my chuckfiles, or in /usr/local/bin, or something else. Just execute it with "python /path/to/runchuck.py path/to/file.ck", and you're all set.
o-kay, that sounds simple enough. Thanks!
(btw, even if the wiki tells you to do something, you don't need to do it. But if you like Scite...)
Er..meaning? i didn't get you. I think Scite is alright. I'm not cool enough yet to use vim/emacs though. That's because I am habituated to IDLE. -- ------- -.- 1/f ))) --. ------- ... http://www.algomantra.com
tor 2008-02-07 klockan 06:13 +0530 skrev AlgoMantra:
I'd place it anywhere I wanted. be it in my home, with my chuckfiles, or in /usr/local/bin, or something else. Just execute it with "python /path/to/runchuck.py path/to/file.ck", and you're all set.
o-kay, that sounds simple enough. Thanks!
(btw, even if the wiki tells you to do something, you don't need to do it. But if you like Scite...)
Er..meaning? i didn't get you.
I think Scite is alright. I'm not cool enough yet to use vim/emacs though. That's because I am habituated to IDLE.
Oh, no. Never mind. I'm just kidding. =) Gasten
---- Forwarded message from admin@icmc2008.net -----
Date: Fri, 11 Jan 2008 21:35:31 +0000
From: Dr Pamela Smith
http://wiki.cs.princeton.edu/index.php/Smallest_ChucK_IDE_Ever Well, this works but it's not much help since Chuck itself warns of a syntax error if I throw a badly formatted file into the VM. This is just giving me the same thing through Python, which just a more roundabout way of saying the same thing. The thing is, I'm just starting to toy with Chuck and I am not familiar with the syntax of anything but Python. More specifically, I'm getting a syntax error in the original code example posted on this page under "using events. Can someone please tell me what's wrong in that little printer() thingie? -- > http://chuck.cs.princeton.edu/doc/language/uana.html - fadereu / rohit PS: Sigh, what do you cats use for a Chuck IDE so that you don't spend days hunting for a missing indent?
AlgoMantra wrote:
The thing is, I'm just starting to toy with Chuck and I am not familiar with the syntax of anything but Python. More specifically, I'm getting a syntax error in the original code example posted on this page under "using events. Can someone please tell me what's wrong in that little printer() thingie? -- >
That sample has several errors (incompatible types in assignment, wrong order of operands, missing "fun void" in the function declaration). It doubt anyone ever tried to run it.
PS: Sigh, what do you cats use for a Chuck IDE so that you don't spend days hunting for a missing indent?
Python is the only common language that I know of where indentation is important to the compiler. For other languages it's just a convenience to make it easier for the programmer to read. I personally use XEmacs with the chuck.el that's been posted here a few times. -Scott
That sample has several errors (incompatible types in assignment, wrong order of operands, missing "fun void" in the function declaration). It doubt anyone ever tried to run it.
I win! (I've always had that rare talent to find ditches no one's fallen through before. ) Python is the only common language that I know of where indentation is
important to the compiler. For other languages it's just a convenience to make it easier for the programmer to read. I personally use XEmacs with the chuck.el that's been posted here a few times.
Thats very...unfortunate. Some files in my Ubuntu Gutsy dpkg have been corrupted for several months now, with no proper solution in sight. Which means I can't install anything (including Xemacs) using 'aptitude' or synaptic. thanks, ------- -.- 1/f ))) --. ------- ... http://www.algomantra.com
AlgoMantra wrote:
Thats very...unfortunate. Some files in my Ubuntu Gutsy dpkg have been corrupted for several months now, with no proper solution in sight. Which means I can't install anything (including Xemacs) using 'aptitude' or synaptic.
Well, I rarely recommend XEmacs to those that aren't already members of the cult. ;-) Syntax highlighting / indentation for Kate (KDE editor) is just XML files, so if somebody wanted to do a syntax file for ChucK that would be relatively easy (since most of it could be copied from C++ or Java) and I could commit that directly into KDE so that it'd be supported in the next release... -Scott
Well, I rarely recommend XEmacs to those that aren't already members of the cult. ;-) Syntax highlighting / indentation for Kate (KDE editor) is just XML files, so if somebody wanted to do a syntax file for ChucK that would be relatively easy (since most of it could be copied from C++ or Java) and I could commit that directly into KDE so that it'd be supported in the next release...
Hm, the Gedit editor in Gutsy has syntax highlighting for both Java and C++, and many other conlangs, and some of it seems friendly to Chuck, but yeah.. I guess I have to find a solution to one problem (dpkg corruption) which will take of the rest... thanks, f )) -- ------- -.- 1/f ))) --. ------- ... http://www.algomantra.com
fre 2008-02-08 klockan 22:18 +0530 skrev AlgoMantra:
Well, I rarely recommend XEmacs to those that aren't already members of the cult. ;-) Syntax highlighting / indentation for Kate (KDE editor) is just XML files, so if somebody wanted to do a syntax file for ChucK that would be relatively easy (since most of it could be copied from C++ or Java) and I could commit that directly into KDE so that it'd be supported in the next release...
Hm, the Gedit editor in Gutsy has syntax highlighting for both Java and C++, and many other conlangs, and some of it seems friendly to Chuck, but yeah.. I guess I have to find a solution to one problem (dpkg corruption) which will take of the rest...
There is syntax-highlighting for vim on the wiki, and I have made some commands to operate the VM from inside Vim. Join the Force, Luke! Gasten
There is syntax-highlighting for vim on the wiki, and I have made some commands to operate the VM from inside Vim.
Join the Force, Luke!
The saber's still broken, Obi-wan! Ref to: http://wiki.cs.princeton.edu/index.php/Ck.vim So there are two very easy steps to follow BUT.... 1. In my version (vim71) there is no folder called syntax in vim71 (as in "/usr/share/vim/vim62/syntax") ....which I suppose can be created? 2. Moreover, I need to edit "/usr/share/vim/filetype.vim" --> I have no such file in the vim folder. Should I create this file too? Sorry if I sound idiotic, it'll get better I promise. ------- -.- 1/f ))) --. ------- ... http://www.algomantra.com
lör 2008-02-09 klockan 09:00 +0530 skrev AlgoMantra:
There is syntax-highlighting for vim on the wiki, and I have made some commands to operate the VM from inside Vim.
Join the Force, Luke!
The saber's still broken, Obi-wan!
Ref to: http://wiki.cs.princeton.edu/index.php/Ck.vim
So there are two very easy steps to follow BUT....
1. In my version (vim71) there is no folder called syntax in vim71 (as in "/usr/share/vim/vim62/syntax") ....which I suppose can be created?
2. Moreover, I need to edit "/usr/share/vim/filetype.vim" --> I have no such file in the vim folder. Should I create this file too?
Sorry if I sound idiotic, it'll get better I promise.
Right, yes, sorry 'bout that. You need to create the files/directories you miss. Gasten
On Sat, Feb 9, 2008 at 3:59 PM, Martin Ahnelöv
lör 2008-02-09 klockan 09:00 +0530 skrev AlgoMantra:
There is syntax-highlighting for vim on the wiki, and I have made some commands to operate the VM from inside Vim.
Right, yes, sorry 'bout that. You need to create the files/directories you miss.
Okay, I have made the modifications as suggestion (syntax folder where you put the ck.vim file, and the filetype.vim file) but when I run $vim filename.ck I see no highlighting. Is there something else I need to do to use this functionality? - rohit -- ------- -.- 1/f ))) --. ------- ... http://www.algomantra.com
On Tue, Feb 12, 2008 at 9:26 AM, AlgoMantra
On Sat, Feb 9, 2008 at 3:59 PM, Martin Ahnelöv
wrote: lör 2008-02-09 klockan 09:00 +0530 skrev AlgoMantra:
There is syntax-highlighting for vim on the wiki, and I have made some commands to operate the VM from inside Vim.
Right, yes, sorry 'bout that. You need to create the files/directories you miss.
Okay, I have made the modifications as suggestion (syntax folder where you put the ck.vim file, and the filetype.vim file) but when I run $vim filename.ck I see no highlighting. Is there something else I need to do to use this functionality?
- rohit --
Yes, it's written in the wiki too: "Tip from Graham Percival: " If you cannot write to /usr/share/ (lacking root privileges), " enter these commands: " $ echo "syntax on" >> ~/.vimrc " $ mkdir ~/.vim " $ mkdir ~/.vim/syntax " $ cp ck.vim ~/.vim/syntax/ " $ echo "if exists(\"did_load_filetypes\") " finish " endif " augroup filetypedetect " au! BufNewFile,BufRead *.ck setf ck " augroup END" >> ~/.vim/filetype.vim cheers Thomas
------- -.- 1/f ))) --. ------- ... http://www.algomantra.com _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
Okay, I have made the modifications as suggestion (syntax folder where you put the ck.vim file, and the filetype.vim file) but when I run $vim filename.ck I see no highlighting. Is there something else I need to do to use this functionality?
- rohit --
Yes, it's written in the wiki too:
"Tip from Graham Percival: " If you cannot write to /usr/share/ (lacking root privileges), " enter these commands: " $ echo "syntax on" >> ~/.vimrc " $ mkdir ~/.vim " $ mkdir ~/.vim/syntax " $ cp ck.vim ~/.vim/syntax/ " $ echo "if exists(\"did_load_filetypes\") " finish " endif " augroup filetypedetect " au! BufNewFile,BufRead *.ck setf ck " augroup END" >> ~/.vim/filetype.vim
cheers Thomas
I don't get it, Thomas. I asked if there is 'something else' I need to do, having made the modifications using sudo (root). Now you are asking me to also take actions suggested in the case that I DO NOT have root privileges. Please clarify what you're suggesting. ------- -.- 1/f ))) --. ------- ... http://www.algomantra.com
participants (5)
-
AlgoMantra
-
Mara Helmuth
-
Martin Ahnelöv
-
Scott Wheeler
-
Thomas Friese