YOUR ACCOUNT

Login or Register to post new topics or replies
Sphinx.
Filter Optimizer

Posts: 1750
Filters: 39
I'd like to hook up Lua Profiler - is it possible? And if so, how is it done?
  Details E-Mail
Vladimir Golovin
Administrator
Posts: 3446
Filters: 55
I don't think it can be used within / together with FF, but, I guess, nothing prevents you from implementing a standalone Lua program with some code calling the prepare() and get_sample() functions, say, while traversing pixels of a bitmap. This setup lets you profile scripts outside of FF. To better emulate FF execution environment, make sure you're executing Lua with debug hooks turned on, and without LuaJIT.
  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1750
Filters: 39
Ok, hmm I had hoped it was possible hooking up the profiler in unsafe mode (while developing / debugging).

Perhaps you could evaluate if its worth adding the profiler to your lua setup (so its available by default). Being able to profile the performance critical parts of a script is a great help.

I'm currently trying out LuaEdit (of course temporarily, because I'm sure we will soon get a build-in kick ass editor smile;) ). Actually it would be interesting to hear a bit about your work flow when you made the excellent script examples on the beta page, what editors/additional tools did you use? I guess it is Egret I need to ask about this?
  Details E-Mail
Vladimir Golovin
Administrator
Posts: 3446
Filters: 55
Quote
Sphinx. wrote:
it would be interesting to hear a bit about your work flow when you made the excellent script examples on the beta page, what editors/additional tools did you use? I guess it is Egret I need to ask about this?


These examples were written when we had a simple text edit box instead of the code editor we have now, buggy error handing, etc. The code was written in Notepad++ and pasted into the edit box.
  Details E-Mail
Vladimir Golovin
Administrator
Posts: 3446
Filters: 55
Quote
Sphinx. wrote:
because I'm sure we will soon get a build-in kick ass editor


What, in your opinion, is missing in our current one (except for the editing area width?)
  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1750
Filters: 39
What I miss the most is overview and editing room. The fact that the editor is attached to the main editor window is quite annoying; being able to have the editor in a separate window that does not change along with the component selection in the workspace, would be really helpful (the editor could have a list/tabset/something of available scripts corresponding to the no. of script components in your filter).

In the actual editing situation I miss the following: search replace tools, code hinting*, line numbers and function list shortcuts (the latter mainly because of the restricted area)

*code hinting:
You already have a list supported functions and global variables internally somewhere, these could pop up in code hints as you type.

For example typing the dot in "math." opens up available math functions in a list. I'm sure you know what I mean, its standard in many editors ("code hint", "code insight" .. there are names for the same thing)
  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1750
Filters: 39
Quote
These examples were written when we had a simple text edit box instead of the code editor we have now, buggy error handing, etc. The code was written in Notepad++ and pasted into the edit box.

smile:eek: Respect! lol
  Details E-Mail
Totte
Übernerd

Posts: 1460
Filters: 107
+1 on standalone editor window with a tab for each script component. I find myself very often tweak inputs while looking at code. Having the codeeditor as it is now can easily be described ad one of my clients once described something :

It is like when the monkey made love to the giraffe and wanted to kiss all the time...
- I never expected the Spanish inquisition
  Details E-Mail
James
James
Posts: 676
Filters: 46
Quote
Vladimir Golovin wrote:
What, in your opinion, is missing in our current one (except for the editing area width?)


Well just my opinion but -

Line numbering and current position lost on apply or show the desktop etc, i know there is the line position thing which is good but rather than clicking to find a line i prefer it numbered by default. Being restricted to a set area you can't move around and minimize is also a problem, i also code in notepad++ and then copy and paste it in maybe with a bit of editing after if needed.

There is also the long time thing that has annoyed me about FF which is forced re-rendering and the way it jumps up to 100% cpu constantly rather than to just press a button when ready. What i do instead is to lock it to a quick rendering preview like a image input or gradient but this is an annoying workflow in my opinion and that also another reason why i have been writing scripts in a external editor.

Maybe it would be a good idea to have customization over the main preview and have things like push a button to render or allow to disable or resize it down so there is more room to code etc and it's not in the way of things. I know some people like it but i don't and to me the way the program automatically renders is probably one of my only dislikes about FF now. Having more control over that system would improve things greatly and also be much nicer for scripting in my opinion.
  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1750
Filters: 39
Quote
These examples were written when we had a simple text edit box instead of the code editor we have now, buggy error handing, etc. The code was written in Notepad++ and pasted into the edit box.


Did you run into global variables strangely being nil where they shouldn't?
I'm fighting that a lot: I go over the script, double check things, inspect variables and when known to be assigned I find them unassigned later on.. its soo confusing
  Details E-Mail
Vladimir Golovin
Administrator
Posts: 3446
Filters: 55
Quote
Sphinx. wrote:
Did you run into global variables strangely being nil where they shouldn't?


No, we didn't. Perhaps this is due to typos? Lua doesn't require variable declaration, so typos in variable names will create new variables.
  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1750
Filters: 39
No, I figured it out GRR.. those damn tables, they are treated as pointers, even when assigning to a new variable. Consider the following example:

a = {5}
b = a
a[1] = 7
error(b[1])

so log says? .. 5? Nopes.. 7! Imagine passing a few "vectors" around btwn functions.. its a damn mess I'm cleaning up now smile;)
  Details E-Mail
StevieJ
Designer/Artist

Posts: 11264
Filters: 163
Quote
James wrote:
There is also the long time thing that has annoyed me about FF which is forced re-rendering

+2 Yeah, I dislike that too.....unnecessary re-renders when saving.....seems to happen above a certain sized image and/or filter complexity.....and not for images that are like 1024 x 768 and below.....
Steve

"Buzzards gotta eat...same as worms..." - Clint :)
  Details E-Mail

Join Our Community!

Filter Forge has a thriving, vibrant, knowledgeable user community. Feel free to join us and have fun!

33,711 Registered Users
+18 new in 30 days!

153,531 Posts
+36 new in 30 days!

15,347 Topics
+72 new in year!

Create an Account

Online Users Last minute:

16 unregistered users.