Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / Forum syntax highlighting is live now!

Author
Message
Darth Vader
18
Years of Service
User Offline
Joined: 10th May 2005
Location: Adelaide SA, I am the only DB user here!
Posted: 24th Nov 2009 00:15


I'm using Google Chrome and apart from the broken commands that Mson seem to have found everything works well, with no slow down at all!

Awesome add Jeku!

NeX the Fairly Fast Ferret
19
Years of Service
User Offline
Joined: 10th Apr 2005
Location: The Fifth Plane of Oblivion
Posted: 24th Nov 2009 00:21 Edited at: 24th Nov 2009 00:21
Looks fine in Opera 10.



Athlon64 2.7gHz->OC 3.9gHz, 31C, MSi 9500GT->OC 1gHz core/2gHz memory, 48C, 4Gb DDR2 667, 500Gb Seagate + 80Gb Maxtor + 40Gb Maxtor = 620Gb, XP Home
Air cooled, total cost £160

Attachments

Login to view attachments
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 24th Nov 2009 00:55
To all firefox users with the slow down:
There is a very easy fix. Open a new tab and type 'about:config' into the address bar.
Find the key with the name 'javascript.options.jit.content' and change its value to 'false'.
The pages will now be nice and fast
(Don't ask how I found out)

NeX the Fairly Fast Ferret
19
Years of Service
User Offline
Joined: 10th Apr 2005
Location: The Fifth Plane of Oblivion
Posted: 24th Nov 2009 00:58
That's the Just-In-Time compiler... shouldn't this be making things FASTER?

Athlon64 2.7gHz->OC 3.9gHz, 31C, MSi 9500GT->OC 1gHz core/2gHz memory, 48C, 4Gb DDR2 667, 500Gb Seagate + 80Gb Maxtor + 40Gb Maxtor = 620Gb, XP Home
Air cooled, total cost £160
MSon
19
Years of Service
User Offline
Joined: 13th Jul 2004
Location: Earth, (I Think).
Posted: 24th Nov 2009 01:17 Edited at: 24th Nov 2009 01:20
This will scan a Keyword file and change it automatically for you, I dont know how you did it, but this would be how i would add all the DarkBasic plugins, It beats adding them all manually.



Everyone Be Cool, You, Be Cool.
hyrichter
20
Years of Service
User Offline
Joined: 15th Feb 2004
Location: Arizona
Posted: 24th Nov 2009 01:36




CodeSurge
Version 1.0 finally released! Code your DBP projects in style. (And save the kittens!)
Jeku
Moderator
20
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 24th Nov 2009 01:40
Quote: "To all firefox users with the slow down:
There is a very easy fix. Open a new tab and type 'about:config' into the address bar.
Find the key with the name 'javascript.options.jit.content' and change its value to 'false'.
The pages will now be nice and fast
(Don't ask how I found out)
"


Sweeeeet thanks for that! I can't test it but if people can verify this it would be great. Thanks

Quote: "This will scan a Keyword file and change it automatically for you, I dont know how you did it, but this would be how i would add all the DarkBasic plugins, It beats adding them all manually."


Cool, I will take this into consideration, thanks! The way the keywords have to be added are as follows:

command one|command two|command three| etc. etc. etc.

Basically I copied all the keywords from the Help HTML file, then wrote a parser to replace all the carriage returns with the pipe | which worked perfect. I haven't taken a look at the keyword files yet and I will try out your code.


Senior Web Developer - Nokia
MSon
19
Years of Service
User Offline
Joined: 13th Jul 2004
Location: Earth, (I Think).
Posted: 24th Nov 2009 01:50
No probs, if you need a | instead, then just change CHR$(10) to "|"

I never bother with scanning the Help Files, as usually theres some commands which wont be listed there.

Everyone Be Cool, You, Be Cool.
Dar13
15
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 24th Nov 2009 02:22 Edited at: 24th Nov 2009 04:34
Whoops, missed your earlier post.
Let's test the same code...


BearCDP
14
Years of Service
User Offline
Joined: 7th Sep 2009
Location: NYC
Posted: 24th Nov 2009 02:50 Edited at: 24th Nov 2009 05:41
I'm not having any slowdown on Firefox, aside from the few issues of missing keywords all the highlighting works properly. However, now when I try to log in on Firefox 3.5.5 on OS X 10.5.8, clicking "Login" on the login page doesn't do anything. Going to boot in Windows and see if the problem persists . . . probably won't . . . stupid Firefox . . . at least you're not Safari . . .

[EDIT]Works fine on Windows running Firefox or Chrome. Starting Firefox in safe mode on OSX still yields the same issue.

jasonhtml
20
Years of Service
User Offline
Joined: 20th Mar 2004
Location: OC, California, USA
Posted: 24th Nov 2009 10:03
neat! thanks

Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 24th Nov 2009 13:56
Quote: "That's the Just-In-Time compiler... shouldn't this be making things FASTER?"


Yah, once it's actually done the compilation, which is what's taking up so much time at the start.

"everyone forgets a semi-colon sometimes." - Phaelax
zeroSlave
14
Years of Service
User Offline
Joined: 13th Jun 2009
Location: Springfield
Posted: 24th Nov 2009 17:23
Quote: "To all firefox users with the slow down:"


Thanks, Diggsey! It did the trick!

There's something in this room that makes you can't speak well.
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 24th Nov 2009 23:13 Edited at: 24th Nov 2009 23:19
Some missing DBPro keywords:


Darth Vader
18
Years of Service
User Offline
Joined: 10th May 2005
Location: Adelaide SA, I am the only DB user here!
Posted: 25th Nov 2009 00:13
Curious Question:
Why are you dong this Jeku? Has Rich handed the reins of Apollo over to you? And like I said I'm just curious...

Sid Sinister
18
Years of Service
User Offline
Joined: 10th Jul 2005
Location:
Posted: 25th Nov 2009 00:14
Very cool!

"If I have seen a little further it is by standing on the shoulders of Giants" - Isaac Newton
Current Project: http://strewnfield.wordpress.com/ (Last updated 06/11/09)
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 25th Nov 2009 01:35
now all the newly-formatted []code won't paste right in the IDE; there are no line-breaks


hyrichter
20
Years of Service
User Offline
Joined: 15th Feb 2004
Location: Arizona
Posted: 25th Nov 2009 02:01
Quote: "now all the newly-formatted []code won't paste right in the IDE; there are no line-breaks"


Works fine for me.

CodeSurge
Version 1.0 finally released! Code your DBP projects in style. (And save the kittens!)
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 25th Nov 2009 02:31 Edited at: 25th Nov 2009 02:32
i should have included that i'm using vista 64, IE8 and the orginal IDE. and, actually, i get no line-breaks no matter where i paste the formatted code...

@jeku (well, anyone that might know ), anything i should look for as far as browser settings?


Zeus
17
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Atop Mount Olympus
Posted: 25th Nov 2009 02:52 Edited at: 25th Nov 2009 02:53
Oh my God, Oh my God, Oh my God!

I must test this now.



Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 25th Nov 2009 10:12
The 'Code' button should automatically include DBP as the default language, I think. Most code on this forum is DBP.

I think a fantastic addition to this site would be an online syntax highlighting code editor. It doesn't matter that you couldn't compile it, but I'd be able to code at work and compile when I get home.


Download the game!
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 25th Nov 2009 11:46
Quote: "now all the newly-formatted []code won't paste right in the IDE; there are no line-breaks "


I have exactly the same problem - which renders the new system functionally useless for me.

Here's what I get when I paste Diggsey's last snippet into DBPro (new IDE) or NotePad (or anything ):



Quote: "i should have included that i'm using vista 64, IE8 and the orginal IDE. and, actually, i get no line-breaks no matter where i paste the formatted code...

@jeku (well, anyone that might know ), anything i should look for as far as browser settings?"


Seconded - except I'm using the new IDE. This is very frustrating.
demons breath
20
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 25th Nov 2009 13:34
Quote: "The 'Code' button should automatically include DBP as the default language, I think. Most code on this forum is DBP."

I don't think so - that would be a pain on the DarkGDK boards, for example, or for when people do things like use the code snippets to avoid revealing spoilers in a thread about a book or a film. Also, not everyone is necessarily a fan of syntax highlighting, so it should be optional whether to include it or not in your posts instead of being automatically included.

NeX the Fairly Fast Ferret
19
Years of Service
User Offline
Joined: 10th Apr 2005
Location: The Fifth Plane of Oblivion
Posted: 25th Nov 2009 18:16
There's no real standard on what defines a line break; either chr13 or chr 10 if I remember correctly. Unix systems generally use just the 10 whilst Windows needs both for it to count as a line break, I think.

Athlon64 2.7gHz->OC 3.9gHz, 31C, MSi 9500GT->OC 1gHz core/2gHz memory, 48C, 4Gb DDR2 667, 500Gb Seagate + 80Gb Maxtor + 40Gb Maxtor = 620Gb, XP Home
Air cooled, total cost £160
MSon
19
Years of Service
User Offline
Joined: 13th Jul 2004
Location: Earth, (I Think).
Posted: 25th Nov 2009 18:25 Edited at: 25th Nov 2009 18:26
BlueGui uses CHR(10) for a line break, so i assume 10 is default for Windows.

Everyone Be Cool, You, Be Cool.
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 25th Nov 2009 18:49
The windows default is CHR(13) + CHR(10) (From the days of typewriters - Carriage return + line feed)

BiggAdd
Retired Moderator
19
Years of Service
User Offline
Joined: 6th Aug 2004
Location: != null
Posted: 25th Nov 2009 18:52
Awesome newLevel = new Awesome( Awesomeness.TO_THE_MAX );

Very good work Mr. Jeku! And thanks for the speed fix Diggsey!



Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 25th Nov 2009 19:29
Quote: "There's no real standard on what defines a line break; either chr13 or chr 10 if I remember correctly. Unix systems generally use just the 10 whilst Windows needs both for it to count as a line break, I think."


Maybe. But as far as I know the previous arrangement worked fine for everyone. Why not keep that (with the very desirable extra highlighting of course)?
Jeku
Moderator
20
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 25th Nov 2009 19:47
@Green Gandalf - That code pasting issue only happens when I copy from IE but not from other browsers. I'm not sure what the problem is, actually, and I will have a look. The syntax highlighting is the same used by http://code.google.com and I'd be surprised if they didn't fix this. I will have a look, but the easiest thing for the time being would probably give people a way to turn off highlighting if they feel it necessary to use IE.

Any chance you can switch to another browser for a while?


Senior Web Developer - Nokia
Aertic
16
Years of Service
User Offline
Joined: 2nd Jul 2007
Location: United Kingdom
Posted: 25th Nov 2009 21:43 Edited at: 25th Nov 2009 21:44
Does FPI work?(FPSCreator's scripting language, lawl).



No!

Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 25th Nov 2009 21:45 Edited at: 25th Nov 2009 21:46
Quote: "Does FPI work?(FPSCreator's scripting language, lawl)."


No. lawl.


Download the game!
Aertic
16
Years of Service
User Offline
Joined: 2nd Jul 2007
Location: United Kingdom
Posted: 25th Nov 2009 21:59
Quote: "No. lawl."

Lawl!

MSon
19
Years of Service
User Offline
Joined: 13th Jul 2004
Location: Earth, (I Think).
Posted: 25th Nov 2009 22:07
I made a post here in both Normal, and using this, as im worried that some people may have a problem with this one at the moment.

If i do post using just syntax highlighted, will it be automatically updated when any fixes are applied, or should we just use non highlighted for now?

Everyone Be Cool, You, Be Cool.
Jeku
Moderator
20
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 26th Nov 2009 01:20
Quote: "If i do post using just syntax highlighted, will it be automatically updated when any fixes are applied, or should we just use non highlighted for now?"


Yes, when this is fixed, it should automatically work on the existing posts. No need to update your posts in the future


Senior Web Developer - Nokia
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 26th Nov 2009 02:33 Edited at: 26th Nov 2009 03:04

That is so cool! Thanks Jeku! (And other people behind this)

I'm getting some of the same problems as HowDo did aways back, though - some really wacky highlighting, everything purple, etc.

Robert F
User Banned
Posted: 26th Nov 2009 05:16 Edited at: 26th Nov 2009 05:16


That is awesome!
Sigh
18
Years of Service
User Offline
Joined: 26th Dec 2005
Location: The Big 80s
Posted: 26th Nov 2009 06:03
Ooooo, fancy pants

Keep your Hope & Change to yourself, I choose Liberty! Stop by for a chat! [IXE]Nateholio on irc.maxgaming.net:6667 #GarageGames
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 26th Nov 2009 13:10
Quote: "Any chance you can switch to another browser for a while?"


Sounds like a sledgehammer to crack a nut.
Jeku
Moderator
20
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 26th Nov 2009 18:44 Edited at: 26th Nov 2009 18:45
@Green Gandalf - Fear not! Paul has fixed the highlighting bugs for IE, so you can now copy and paste the code properly. The colours are also fixed in IE

@Matuka -
Quote: "Does FPI work?(FPSCreator's scripting language, lawl)."


I'm going to be adding new languages next week after my move.


Senior Web Developer - Nokia
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 26th Nov 2009 19:03
The highlighting is indeed fixed (yay!) but I still don't get any line returns when I copy-paste.

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 26th Nov 2009 23:19
Quote: "The highlighting is indeed fixed (yay!) but I still don't get any line returns when I copy-paste."


I do. Thanks Jeku.

Perhaps you were too quick off the mark?

Quote: "I'm going to be adding new languages next week after my move."


FORTRAN, ALGOL, COBOL, etc?

Don't forget HLSL!
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 26th Nov 2009 23:54
Nope, still not working.

From IE8 into CodeSurge and into Notepad, no line returns.

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 27th Nov 2009 00:56
IE8 into DarkBasic IDE and Notepad both OK (on XP laptop). Will check Vista PC tomorrow (closing down now).
MSon
19
Years of Service
User Offline
Joined: 13th Jul 2004
Location: Earth, (I Think).
Posted: 27th Nov 2009 01:09
Tested in IE7 on Vista Basic

Pasting into DarkBasic IDE, CodeSurge and NotePad all works fine now.
Previous Highlighting Problem on Rems also fixed.

Thanks Jeku.

Everyone Be Cool, You, Be Cool.
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 27th Nov 2009 01:17
Quote: "From IE8 into CodeSurge and into Notepad, no line returns.
"


IE6 - check
IE7 - check
IE8 - Doh

I've added the <br/> to newline code to IE8 as well, should work now. Interesting that it was working for you GG, if IE8 was announcing itself as IE7 that would explain it (compatibility mode?), otherwise I'm not sure why it was working there.
BearCDP
14
Years of Service
User Offline
Joined: 7th Sep 2009
Location: NYC
Posted: 27th Nov 2009 08:30 Edited at: 27th Nov 2009 08:30
Hey cool, Firefox works again for me.



Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 27th Nov 2009 12:19
Quote: "Interesting that it was working for you GG, if IE8 was announcing itself as IE7 that would explain it (compatibility mode?), otherwise I'm not sure why it was working there. "


Both machines (XP laptop, Vista 64 bit PC) have IE8 and copy/paste is working on both now. [Don't know whether it worked on Vista before the latest fix . ]

Must have been an obscure bug.
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 27th Nov 2009 13:58
Hmm sync rate and point camera still not highlighted correctly for me.

BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 27th Nov 2009 15:23
Nor do SET OBJECT TRANSPARENCY or any of the other SET OBJECT ___ commands. It only detects the first command it sees (SET OBJECT).

But you fixed the really important stuff now, thanks!

HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 27th Nov 2009 16:03
will this be plugged in the newsletter, for the few who may not visit here.

Dark Physics makes any hot drink go cold.

Login to post a reply

Server time is: 2024-05-06 19:31:59
Your offset time is: 2024-05-06 19:31:59