FreeBasic IDE-poseidonFB(Update 2024.03.03)

User projects written in or related to FreeBASIC.
Post Reply
c-sanchez
Posts: 145
Joined: Dec 06, 2012 0:38

Re: FreeBasic IDE-poseidonFB(Update 2016.10.25)

Post by c-sanchez »

Hey Kuan Hsu I'm back with more hehe

if you close poseidonFB on window mode, and open this again, poseidon is restored with the window size, is ok
but now, if you have go to maximized, closes poseidonFB, open it again and go to window mode, this restore with a wrong window size, ie no the last used instead.
I guess is because you are saving the maximized state and the window size on the same line on settings. ie, i think the maximized state must be saved independient of window mode settings.

btw, i have the doubt, why you use xml to save the settings? i think the xml files are really ugly. And are really a problem to do changes manually also.
ie, i think is better a simple ini file, or somthing like this, by example scite use .properties files, scite even use a "locale.properties" to translate the program.
By example, check this images.
So looks the settings file of fbIDE
http://s6.postimg.org/63ox0d54h/fb_IDE_settings.png
From notepad2
http://s6.postimg.org/cg42a786p/notepad ... gsfile.png
scite
http://s6.postimg.org/wq1dpc9bl/scite_settings.png
And poseidonFB (i think the settings file looks ugly compared with the other three)
http://s6.postimg.org/yvvojucs1/poseido ... ttings.png
Kuan Hsu
Posts: 586
Joined: Sep 16, 2007 15:12
Location: Taiwan

Re: FreeBasic IDE-poseidonFB(Update 2016.10.25)

Post by Kuan Hsu »

c-sanchez wrote:Hey Kuan Hsu I'm back with more hehe

if you close poseidonFB on window mode, and open this again, poseidon is restored with the window size, is ok
but now, if you have go to maximized, closes poseidonFB, open it again and go to window mode, this restore with a wrong window size, ie no the last used instead..

I guess is because you are saving the maximized state and the window size on the same line on settings. ie, i think the maximized state must be saved independient of window mode settings.
It already fixed at rev0.229 that now catch main-window resize information every time, not the settings issue.
c-sanchez wrote:btw, i have the doubt, why you use xml to save the settings? i think the xml files are really ugly. And are really a problem to do changes manually also.
...
Haha, once upon time xml is very popular......^^
Last edited by Kuan Hsu on Nov 03, 2016 13:49, edited 2 times in total.
Kuan Hsu
Posts: 586
Joined: Sep 16, 2007 15:12
Location: Taiwan

Re: FreeBasic IDE-poseidonFB(Update 2016.10.25)

Post by Kuan Hsu »

Makoto WATANABE wrote:Dear Kuan Hsu

Thank you for your consent.
I corrected your name.
I think that poseidon is a just fit name for FreeBasic IDE.
(๑ ^ ₃•๑)
Imortis
Moderator
Posts: 1924
Joined: Jun 02, 2005 15:10
Location: USA
Contact:

Re: FreeBasic IDE-poseidonFB(Update 2016.10.25)

Post by Imortis »

c-sanchez wrote:...btw, i have the doubt, why you use xml to save the settings? i think the xml files are really ugly. And are really a problem to do changes manually also...
Funny thing is, people who like XML say the exact opposite of what you just said. It is easily human readable, and changes are easy to make manually.

It all comes down to preference.
c-sanchez
Posts: 145
Joined: Dec 06, 2012 0:38

Re: FreeBasic IDE-poseidonFB(Update 2016.11.03)

Post by c-sanchez »

Kuan Hsu wrote:Haha, once upon time xml is very popular......^^
Heh a bad reason to use this (imho) ugly format, but at least don't day "is better" or something :P
Imortis wrote:
c-sanchez wrote:Funny thing is, people who like XML say the exact opposite of what you just said. It is easily human readable, and changes are easy to make manually.
It all comes down to preference.
Maybe that people need check a xml without syntax highligh?

This is the poseidonFB settings XML on windows notepad
Image

and this is with the INI file from FBIde
Image

I think the the style OPTION=VALUE is more readable than <OPTION_TAG>VALUE</OPTION_TAG>
sancho2
Posts: 547
Joined: May 17, 2015 6:41

Re: FreeBasic IDE-poseidonFB(Update 2016.11.03)

Post by sancho2 »

I am one of those who says XML formatting is fine and very readable.
Why are you manually making changes to the settings file?
If you are doing that, then the problem isn't with the settings file format is it?
c-sanchez
Posts: 145
Joined: Dec 06, 2012 0:38

Re: FreeBasic IDE-poseidonFB(Update 2016.11.03)

Post by c-sanchez »

<quote>
sancho2 wrote:I am one of those who says XML formatting is fine and very readable.
Why are you manually making changes to the settings file?
If you are doing that, then the problem isn't with the settings file format is it?
</quote>
answer = First, readable is, sure, but the XML files compared with simple files like INI are ugly, by that, because don't are simple. Or really in some way is better save settings with a bunch of tags structure? o_O sincerely, i don't think so.
The only "good" thing i can say about XML it's a (too) detailed format, but again, is full of tags, doing at end a file bloated of text unnecessary, doing a ugly text file.
Second, the manually changes can be ok as a optional way to do the things, no?
The problem is if result annoying or confortable. some times some programms use hide/advance settings changeable only from settings file, ofcourse this is not the case, but is a simple example.
Or as is not necessary do manually changes, then settings can be binary.. no? xD
sancho2
Posts: 547
Joined: May 17, 2015 6:41

Re: FreeBasic IDE-poseidonFB(Update 2016.11.03)

Post by sancho2 »

Its my opinion, these are valid reasons to access a settings file:
1. The program screws up the settings file.
2. Another program screws up the settings file.
3. The program requires that you manually edit the settings file.
All of these are disasters of programming. Bugs/mistakes at the very least.
And this resolution should be extremely rare, last resort.
And why would any program hide advanced settings? Maybe if you give me an example of this, I will better understand.
Edit:
Here is what FBIde settings menu looks like in notepad++ (free, and if your going to edit a file, use a good tool)
Image
(disclaimer: I typed it into notepad++ because I don't have fbIde on this machine)
c-sanchez
Posts: 145
Joined: Dec 06, 2012 0:38

Re: FreeBasic IDE-poseidonFB(Update 2016.11.03)

Post by c-sanchez »

This are the settings from poseidonFB with the ugly XML style on notepad++
Image

and so can look the same settings file but with a simple style like ini.
Image
without unnecessary tags, also i think on this image the category tree is sorted better, so is more readable to find a specific setting.
sancho2 wrote:Here is what FBIde settings menu looks like in notepad++ (free, and if your going to edit a file, use a good tool)
hah The real FBIde settings is a ini file, why you wrote that xml? :S
Image

I'm agree that it is best to use a good tool, but again, ini is readable even on something simple like Windows Notepad, but no xml.
so with syntax highlight ini is even better.

then, now i wonder, the only adventage/reason to use xml is because is popular?
sancho2 wrote:And why would any program hide advanced settings? Maybe if you give me an example of this, I will better understand.
The reasons i guess can be various. But i think this is the normal reason.
* May not be necessary for the general user, so is not necessary show on interface.

Examples exist a bunch, but I only remember a few.
* SumatraPDF have settings (gui) and advance settings (a simple txt with settings about look and behavior)
you can check this: http://www.sumatrapdfreader.org/settings3.1.html

UltraDefrag (a small, nice and open source windows defragmenter) have the options on options.lua file, i think because the developers working on port the interface to wxWidgets first, and then (maybe) improve the interface.

On http://ultradefrag.sourceforge.net/handbook/FAQ.html you can read:
Why configuration files are better than one settings window with tabs?
Configuration files are easy to edit, even in Windows Notepad.
I would add this, unless it is xml ;P
sancho2
Posts: 547
Joined: May 17, 2015 6:41

Re: FreeBasic IDE-poseidonFB(Update 2016.11.03)

Post by sancho2 »

I typed it in because I didn't want to download the IDE just to show the xml file. Close all the tags and you will see that my image is near identical to what notepad++ shows.
I did make the mistake of calling it FBIDE's settings. It is obviously Poseidon's. But that is proof of nothing so why try to rest your case on that?
Here is a couple of quotes from your Sumatra link:
Highlighted settings can't be changed from the UI. Modifying other settings directly in this file is not recommended.

If you add or remove lines with square brackets, make sure to always add/remove square brackets in pairs! Else you risk losing all the data following them.
Sounds like they don't want you messing with some things but are ok with messing with others. So long as you don't make a mistake and lose everything. This is a mess. Is this how you would want to present your customers with a settings/config system?
Ultimate defrag has a settings option on its menu. Why edit that manually?
In the end its up to Kuan, and he has made the correct choice in using XML.
c-sanchez
Posts: 145
Joined: Dec 06, 2012 0:38

Re: FreeBasic IDE-poseidonFB(Update 2016.11.03)

Post by c-sanchez »

sancho2 wrote:I typed it in because I didn't want to download the IDE just to show the xml file. Close all the tags and you will see that my image is near identical to what notepad++ shows.
I did make the mistake of calling it FBIDE's settings. It is obviously Poseidon's. But that is proof of nothing so why try to rest your case on that?
sorry, my error, I thought you wanted to show me that XML could have been a better choice for FBIde (which obviously is not)
sancho2 wrote:Close all the tags and you will see that my image is near identical to what notepad++ shows.
This is the problem, XML is bloated of unnecessary simbols < > / ? plus tags.
on xml you have something like:
<category>
--<option>
----<value>value</value>
--<option>
</category>

on INI files you have only
[category]
option=value
sancho2 wrote:Sounds like they don't want you messing with some things but are ok with messing with others. So long as you don't make a mistake and lose everything. This is a mess. Is this how you would want to present your customers with a settings/config system?
that will happen with any file modified manually incorrectly.
so again, is more simple/secure/easy/etc modify manually a option=value than a <option>value</option>

Imagine children learning how to sum numbers with XML and with "INI"
<2+1>3</2+1>
2+1=3
hah!
sancho2 wrote:In the end its up to Kuan, and he has made the correct choice in using XML.
Yeah it's a Kuan Hsu option. Although as i say, for me, xml is not the best option, but well is only my opinion.
If with the comparisons that I showed the people still viewing more comfortable xml.. geez, really i don't understand this world.
St_W
Posts: 1626
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: FreeBasic IDE-poseidonFB(Update 2016.11.03)

Post by St_W »

XML is totally fine for configuration data. Yes, it usually isn't that compact as INI is, but for that little downside you get better possibilities for structuring the options, including nesting, compared to plain INI.

@c-sanchez: Your XML example is overly complicated. Usually it would be just <category><option>value</option></category> and if you like even <category option="value" /> is possible.
Your second example is not very useful either as neither INI nor XML is appropriate for storing calculations in a format like that.
marcov
Posts: 3462
Joined: Jun 16, 2005 9:45
Location: Netherlands
Contact:

Re: FreeBasic IDE-poseidonFB(Update 2016.11.03)

Post by marcov »

The main part of XML is that it is nestable.

There are various hacks to get ini nestable (namespaced keys, declaring nested sections as [[level2]] and [[[level3]]] etc, but those are cumbersome.

Worse, other INI tools don't understand such hacks, which is the nice thing about XML, a fairly large subset that all XML parsers are supposed to understand.
c-sanchez
Posts: 145
Joined: Dec 06, 2012 0:38

Re: FreeBasic IDE-poseidonFB(Update 2016.11.03)

Post by c-sanchez »

St_W wrote:@c-sanchez: Your XML example is overly complicated. Usually it would be just <category><option>value</option></category> and if you like even <category option="value" /> is possible.
heh, overly complicated?
Is the same

Code: Select all

<category><option>value</option></category> 
but sorted with new lines and tabs ' - '

Code: Select all

<category>
--<option>value<option>
</category>
sorry, I had created a <value> tag of more :p

anyway this is with only a option, would that occurs when is more? a really overly complicated document.
by example this is the actual poseidonFB style to save the settings

Code: Select all

 <category option1="value" option2="value" option3="value"/>
well, indeed don't looks too bad, but several options on same line i think don't looks good neither.

this is a line of poseidonFB settings:

Code: Select all

<toggle00 LineMargin="ON" BookmarkMargin="ON" FoldMargin="ON" IndentGuide="ON" CaretLine="ON" WordWrap="OFF" TabUseingSpace="ON" AutoIndent="ON" ShowEOL="OFF" ShowSpace="ON" AutoEnd="ON" TabWidth="4" ColumnEdge="0" EolType="0" ColorOutline="OFF" Message="OFF" BoldKeyword="ON"/>
and as can be with something like ini:

Code: Select all

[toggle00]
LineMargin="ON"
BookmarkMargin="ON"
FoldMargin="ON"
IndentGuide="ON"
CaretLine="ON"
WordWrap="OFF"
TabUseingSpace="ON"
AutoIndent="ON"
ShowEOL="OFF"
ShowSpace="ON"
AutoEnd="ON"
TabWidth="4"
ColumnEdge="0"
EolType="0"
ColorOutline="OFF"
Message="OFF"
BoldKeyword="ON"
cons: too many lines.
pros: easier to read.

but ok, i will stop the xml/ini topic hehe.
c-sanchez
Posts: 145
Joined: Dec 06, 2012 0:38

Re: FreeBasic IDE-poseidonFB(Update 2016.11.03)

Post by c-sanchez »

@Kuan Hsu please improve the code folding.
i'm tried notepad2mod, scite, wxFBE and all this have the fold margin feature BUT with a not very good trick.
the folding is made based on tab . I think the correct must be base keyworks and block end keywords
on this editors if you don't have tabulation on code, you don't have code folding on the editor.

the only editor that I have seen with the folding code made correctly is AkelPad.

ImageImageImageImage

1st image: wxFBE, based tabs.
2nd image: even FBIde is based tabs.
3rd image: poseidonFB only fold type/end type?
4th image: AkelPad is not a freebasic ide, so type/end type is not folded, but works better with the rest.
AkelPad is not based on tabs, but if keywords / block end keywords.
Post Reply