It is currently Tue Sep 17, 2019 7:18 pm



Reply to topic  [ 46 posts ]  Go to page Previous  1, 2
 New scripting language 
Author Message
Sharp Eyed Eagle!
User avatar

Joined: Tue Aug 21, 2012 6:51 am
Posts: 401
Reply with quote
CyberRascal wrote:
Also, mahler: What do you think about using Python?
Anyone else have any comments? I'd rather not force something like this onto anyone :p

No problem here with python. I had to learn it for a project this year.
Using indentations instead of brackets was annoying at first, but after a while I started to appreciate it.
For the rest the language syntax is very simple and short.

Code:
words = ['cat', 'window', 'defenestrate']
for w in words:
    print w, len(w)


CyberRascal wrote:
We are almost there, but we lack two major things - syntax highlighting and code completion.
Hopefully we can get working syntax highlighting from somewhere soon, but code completion might be harder. I will look around a bit for a compatible lexer for python.

This seems like a good one...
http://scintillanet.codeplex.com/


Fri Oct 26, 2012 2:06 am
Profile
Two Eyed Hopeful

Joined: Fri Sep 21, 2012 4:46 am
Posts: 74
Reply with quote
Thanks for the input mahler. Sounds like python could be the way to go. It doesn't support multiline lambdas though (for event handlers), but if you understand enough to use that feature it's probably not a large leap to using

Code:
def transmogrify(x, y):
    return x *= y

myPlugin.update += transmogrify


About scintilla. It's a full-size editor, and it uses GTK+ to render itself. As far as I remember, GTK+ doesn't support "native look and feel" (being cross platform). We could have used scintilla, but it's probably geared more towards winforms (don't know how well GTK+ meshes with winforms though), plus issues with fonts, rendering etc that comes with the cross-platformness.

I remember looking for a C++ editor, and I pretty much ruled out any editor based on scintilla, for reasons I can't remember right now but which probably relates to... Something. I went with Emacs instead.

Anyway, we are looking for a lexer, not a editor, because I don't think CyberVillain will be that enthusiastic towards redoing all the editor stuff.

I could refit the current (not very well functioning) CC to python. Is anyone using it though? :D And not just because it's forced upon you?


Fri Oct 26, 2012 4:26 am
Profile
Petrif-Eyed

Joined: Mon Jun 22, 2009 8:36 am
Posts: 2160
Location: Stockholm, Sweden
Reply with quote
I'm using it :D I'm mostly missing argument completion when defining a function call, and some small bugs with the CC window stealing navigation from the editor. But on the whole its pretty ok, way better than GlovePie's CC

edit: I also ruled out Scintilla over AvalonEdit for reasons I do not remember, but one was probably that its winforms which clashes with WPF (You can invoke it but its a bit ugly, and doesnt work that nice). However I think Avalon is using Win32 under the hood because you get the same strange behavior like you get when using winform controls in WPF.

_________________
FreePIE
My blog


Fri Oct 26, 2012 5:17 am
Profile
Two Eyed Hopeful

Joined: Fri Sep 21, 2012 4:46 am
Posts: 74
Reply with quote
So, the ironpython branch pretty much just went gold, it's pushed to my master as of now. Lua is removed completely from my master (barring mistakes, and a few C# types named after Lua).

Brantlew, I had to make a few changes to the console project to make it build. Instead of using LuaScriptEngine directly, it now uses IScriptEngine, so we don't have to touch it if we change engine again. I made two alterations as a bit of cleanup as well, I changed the Enumerator related code to just simply fetch the item directly. I hope you find it acceptable :)

Anyway, I haven't been able to make it crash, but I suspect as soon as the next guy/gal tests it it will crash happily. So please try it out, so we can work these kind of things out.

The code is available at https://github.com/maxmalmgren/FreePIE/


Sun Oct 28, 2012 5:04 pm
Profile
Petrif-Eyed
User avatar

Joined: Sat Sep 17, 2011 9:23 pm
Posts: 2220
Location: Menlo Park, CA
Reply with quote
Sounds awesome! Looking forward to using it. I guess we will need to update many of the scripts that are listed in the forum.


Sun Oct 28, 2012 5:18 pm
Profile
Petrif-Eyed

Joined: Mon Jun 22, 2009 8:36 am
Posts: 2160
Location: Stockholm, Sweden
Reply with quote
brantlew wrote:
Sounds awesome! Looking forward to using it. I guess we will need to update many of the scripts that are listed in the forum.


I tested it yesterday, no crashes or slowdowns. Yeah, we need to update the Wiki too and some other places. Not a problem thought. I hope the users will take the change without problems, its a pretty big braking change.

_________________
FreePIE
My blog


Mon Oct 29, 2012 2:09 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 46 posts ]  Go to page Previous  1, 2

Who is online

Users browsing this forum: Google [Bot] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by STSoftware.