Programming Pimpage Thread

Grab your favourite IDE and tinker with the innards of game engines

Re: Programming Pimpage Thread

Postby Surfa on Thu Mar 25, 2010 9:27 pm

Yes the intent was a programming pimpage thread hence I changed the title to show that.

Anyway I tried to get syntax highlighting in my qc editor and although I got it to work it ran really slowly so if someone could point me in the direction of some help that would be spiffy.
Surfa
May Contain Skills
May Contain Skills
 
Joined: Sun Dec 30, 2007 3:04 pm

Re: Programming Pimpage Thread

Postby zombie@computer on Thu Mar 25, 2010 9:27 pm

Well i dont have any pictures to show the awesome project ive just finished but a description works just as well.
Ive made a program to view bank account data offline. It connects to my bank's website, downloads some csv file and updates the local database. It has options to view transactions, account levels, labeling (by account, date, transactionaccount, description, transaction amount) using an sql-like syntax, and i can use it to generate graphs and the likes.

Doing my taxes has never been this easy!
When you are up to your neck in shit, keep your head up high
zombie@computer
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Fri Dec 31, 2004 5:58 pm
Location: Lent, Netherlands

Re: Code Pimpage Thread

Postby coder0xff on Thu Mar 25, 2010 9:28 pm

Major Banter wrote:
A code is a rule for converting a piece of information (for example, a letter, word, phrase, or gesture) into another form or representation (one sign into another sign), not necessarily of the same type.


I believe the definition you just gave describes things like pig-latin.

Edit: Surfa, try ants profiler to locate the slow code. You may also want to try caching the data that does the highlighting (if you're not). Reparsing every repaint is going to kill the performance.
User avatar
coder0xff
Veteran
Veteran
 
Joined: Fri Jun 13, 2008 1:51 am

Re: Programming Pimpage Thread

Postby Spike on Thu Mar 25, 2010 9:31 pm

Gimme fucking assembler >:-(
User avatar
Spike
May Contain Skills
May Contain Skills
 
Joined: Wed Sep 17, 2008 7:10 pm

Re: Programming Pimpage Thread

Postby coder0xff on Thu Mar 25, 2010 9:34 pm

Spike wrote:Gimme fucking assembler >:-(


YOU GOT IT! Enjoy your lag.

Code: Select all
Start:
jmp Start
User avatar
coder0xff
Veteran
Veteran
 
Joined: Fri Jun 13, 2008 1:51 am

Re: Programming Pimpage Thread

Postby vcool on Thu Mar 25, 2010 9:35 pm

zombie@computer wrote:Well i dont have any pictures to show the awesome project ive just finished but a description works just as well.
Ive made a program to view bank account data offline. It connects to my bank's website, downloads some csv file and updates the local database. It has options to view transactions, account levels, labeling (by account, date, transactionaccount, description, transaction amount) using an sql-like syntax, and i can use it to generate graphs and the likes.

Doing my taxes has never been this easy!


You know you could make money off that?

Give it a pretty interface and sell it for slightly less than substitutes.
Image

Neighborhood Forum Elitist
User avatar
vcool
Veteran
Veteran
 
Joined: Fri Jun 23, 2006 1:03 am
Location: USSR

Re: Programming Pimpage Thread

Postby zombie@computer on Thu Mar 25, 2010 9:42 pm

Surfa wrote:Yes the intent was a programming pimpage thread hence I changed the title to show that.

Anyway I tried to get syntax highlighting in my qc editor and although I got it to work it ran really slowly so if someone could point me in the direction of some help that would be spiffy.

if you parse the code on the fly (eg after an enter) you can set indexes for the styles you need. When repainting, find the first index in the scope of the textbox(using scrollbar offset and textheights/widths), and start after that untill the index is past the scope of the textbox.
when a piece of code is altered, you generally only need to reparse the bits between that what has been changed and the first index that matches the old styles. Ergo

TOKEN Token Token

list(of int and style)
0 -> b
6 -> i
12 -> u

user then creates code:

TOKEN Token Token Token

alteration between 6 and 12;
Everything >= 6 += difference
list(of int and style)
0 -> b
12 -> i
18 -> u

parse start at 6

list(of int and style)
0 -> b
6 -> b
12 -> i
18 -> u

then we get to 12, but its already i, so we found a similar style at the correct index-> stop parsing.

Offcourse if multiple token types have the same style you should index token types instead, but you get the general idea i hope
When you are up to your neck in shit, keep your head up high
zombie@computer
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Fri Dec 31, 2004 5:58 pm
Location: Lent, Netherlands

Re: Programming Pimpage Thread

Postby coder0xff on Thu Mar 25, 2010 9:48 pm

I remember you working on that I think. How did you get past the login problem? Did you end up using Gecko or whatever?
User avatar
coder0xff
Veteran
Veteran
 
Joined: Fri Jun 13, 2008 1:51 am

Re: Programming Pimpage Thread

Postby Surfa on Thu Mar 25, 2010 9:56 pm

Thanks zombie although I found a really nice example of syntax highlighting.
Surfa
May Contain Skills
May Contain Skills
 
Joined: Sun Dec 30, 2007 3:04 pm

Re: Programming Pimpage Thread

Postby zombie@computer on Thu Mar 25, 2010 10:02 pm

coder0xff wrote:I remember you working on that I think. How did you get past the login problem? Did you end up using Gecko or whatever?

no, ive been using thisone:

http://www.codeproject.com/KB/miscctrl/csEXWB.aspx

again, an IE wrapper, but a lot more options than the webbrowser. Works pretty well, allthough occasionally it doesnt register certain commands which is a shame, but not a huge problem. Theres a retry button :p The biggest problem was compiling it, which i needed to do in xp (:o) on a virtual pc.
When you are up to your neck in shit, keep your head up high
zombie@computer
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Fri Dec 31, 2004 5:58 pm
Location: Lent, Netherlands

Re: Programming Pimpage Thread

Postby Surfa on Thu Mar 25, 2010 10:27 pm

Decided to screw the syntax highlighting as it was just a simple tool and I couldn't seem to get it to work without directly copy and pasting from some other program so screw it. It was a tool for my own personal use anyway.
Surfa
May Contain Skills
May Contain Skills
 
Joined: Sun Dec 30, 2007 3:04 pm

Re: Programming Pimpage Thread

Postby Armageddon on Thu Mar 25, 2010 10:56 pm

Surfa when are you gonna re-write your leaning tutorial? :)
User avatar
Armageddon
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Sun Dec 14, 2008 5:53 am

Re: Programming Pimpage Thread

Postby zombie@computer on Fri Mar 26, 2010 9:10 am

btw, is anyone here interested in a dev-log for my own programming language? Creating your own programming language is quite a lot of fun, and at the same time, very educating. I wonder if i should do the efforts of creating my own log about that.
When you are up to your neck in shit, keep your head up high
zombie@computer
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Fri Dec 31, 2004 5:58 pm
Location: Lent, Netherlands

Re: Programming Pimpage Thread

Postby MNM on Fri Mar 26, 2010 9:19 am

Do it zombie!
When in doubt, VDC.
User avatar
MNM
Pheropod
Pheropod
 
Joined: Thu Oct 02, 2008 6:13 pm
Location: Norway

Re: Programming Pimpage Thread

Postby Terr on Fri Mar 26, 2010 5:32 pm

For controlling/automating your web-browser, you might want to take a look at Selenium-RC, since you can use it with multiple web-browsers. I used it at a previous job for automated testing. Basically it allows you to use a language-of-choice to remotely control the web browser through the javascript layer.
Terr
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Mon Oct 12, 2009 11:35 pm
PreviousNext

Return to Programming

Who is online

Users browsing this forum: No registered users