Search found 342 matches

by marpon
Nov 24, 2018 8:02
Forum: Tips and Tricks
Topic: quick sort in FreeBASIC faster then C-Lib
Replies: 10
Views: 1304

Re: quick sort in FreeBASIC faster then C-Lib

@D.J.Peters sorry but i have to insist, it is a bug To compare you need two values :lol: true but on pointers example : a[0] a[1] 1-0 means 2 elements... but better to see using your code demonstration with 1 000 000 elements , please check the first of 10 last element with your code and you will ag...
by marpon
Nov 23, 2018 8:37
Forum: Tips and Tricks
Topic: quick sort in FreeBASIC faster then C-Lib
Replies: 10
Views: 1304

Re: quick sort in FreeBASIC faster then C-Lib

@D.J.Peters i was checking your quicksortPointer function and trying to tweak it a little (avoiding the <=) as you were promoting to dodicat And found first it could be 1.5% faster with these evolutions wich was good but found also a little bug. your original ' my pointer version of qsort in FreeBAS...
by marpon
Nov 06, 2018 11:18
Forum: Tips and Tricks
Topic: Simple lzw encoder - decoder without dependance
Replies: 6
Views: 1276

Re: Simple lzw encoder - decoder without dependance

for the ones interrested on better compression like zlib, an alternative without any dependancy : miniz is a very complete code in c. a bit complex to translate as it is to freebasic, so i've managed to simplify it in order to get only the main features compress / uncompress (deflate/inflate) it is ...
by marpon
Nov 03, 2018 18:12
Forum: Tips and Tricks
Topic: Simple lzw encoder - decoder without dependance
Replies: 6
Views: 1276

Re: Simple lzw encoder - decoder without dependance

D.J.Peters wrote:I would like to see a version of deflate and inflate
without any dependency only a *.bi file.

it's a pert of zlip or libz I don't know.


may be a good alternative c source here
https://github.com/richgel999/miniz


no time now to simplify and translate to FreeBASIC
by marpon
Oct 29, 2018 14:59
Forum: Tips and Tricks
Topic: Simple lzw encoder - decoder without dependance
Replies: 6
Views: 1276

Re: Simple lzw encoder - decoder without dependance

@counting_pine

True, sorry... editing the title to correct
by marpon
Oct 28, 2018 16:04
Forum: Tips and Tricks
Topic: Simple lzw encoder - decoder without dependance
Replies: 6
Views: 1276

Simple lzw encoder - decoder without dependance

I was trying to compress/decompress without any dependance (not shared and not static lib) and found a quite simple working code done in c. the original code comes from rosetta i"ve done the translation to freeBASIC /' simple_lzma.bas Translated to freebasic by Marc Pons email : marpon@aliceads...
by marpon
Sep 16, 2018 16:16
Forum: Community Discussion
Topic: Feature request: instrisic Defines for console / gui mode
Replies: 60
Views: 6071

Re: Feature request: instrisic Defines for console / gui mode

extend for sleep without value in code as Jocep Roca was suggesting in fact it does not exist any safe solution, at compile time , the test is too restrictive, the only safe way is to do specific tests at run time i've made a first draft , not complete because it should also take into account Screen...
by marpon
Sep 15, 2018 14:50
Forum: Community Discussion
Topic: Feature request: instrisic Defines for console / gui mode
Replies: 60
Views: 6071

Re: Feature request: instrisic Defines for console / gui mode

@aggree
is why i've tested it, do not care...

thank's again for the reaction

on the sleep extension feature, it will be another story, as i think we have to work on the fb_sleep function of the rtlib side,

i'm even not be able to compile the rtlib (to test my mingw tool-chain installation)
by marpon
Sep 15, 2018 14:23
Forum: Community Discussion
Topic: Feature request: instrisic Defines for console / gui mode
Replies: 60
Views: 6071

Re: Feature request: instrisic Defines for console / gui mode

@fxm

understand, please as you like <> 0 or = true

i"m not sure the "not" usage on #if is somewhere explained
i use chm, and did not found that usage

it is my c notions to push me trying that :-)
by marpon
Sep 15, 2018 13:42
Forum: Community Discussion
Topic: Feature request: instrisic Defines for console / gui mode
Replies: 60
Views: 6071

Re: Feature request: instrisic Defines for console / gui mode

@fxm good and quick done :-) on FBWiki : KeyPgDdfbgui could be added , only for win32 / win64 the example #if __FB_GUI__ <> 0 'could be also just #if __FB_GUI__ #print Executable subsystem: gui #else #print Executable subsystem: console #endif can also be the opposite #if not __FB_GUI__ 'notice the ...
by marpon
Sep 15, 2018 10:06
Forum: Community Discussion
Topic: Feature request: instrisic Defines for console / gui mode
Replies: 60
Views: 6071

Re: Feature request: instrisic Defines for console / gui mode

@coderJeff

thank"s for my quick request implementation, now we have __FB_GUI__ on the rolling v1.06.0
by marpon
Sep 13, 2018 19:24
Forum: Community Discussion
Topic: Feature request: instrisic Defines for console / gui mode
Replies: 60
Views: 6071

Re: Feature request: instrisic Defines for console / gui mode

sure but it does not be what José is requesting , an error from the compiler on that wrong situation for that we need to act at fb_sleep interception i think we could use internally fb_GfxScreenPtr that is the source of ScreenPtr and could have a function to get env.clopt.modeview (my added new var)...
by marpon
Sep 13, 2018 18:41
Forum: Community Discussion
Topic: Feature request: instrisic Defines for console / gui mode
Replies: 60
Views: 6071

Re: Feature request: instrisic Defines for console / gui mode

but work-arround is possible in code for graphics windows defined by Screen[Res]() If ScreenPtr = 0 Then ... can check it Yes, of course, but it's a test at run-time while the test on "__FB_GUI__" will already be available at compile time. that's why i've said it's not easy (inside compil...
by marpon
Sep 13, 2018 16:50
Forum: Community Discussion
Topic: Feature request: instrisic Defines for console / gui mode
Replies: 60
Views: 6071

Re: Feature request: instrisic Defines for console / gui mode

If the suggestion is implemented, additional features can be added like flagging as an error the use of SLEEP without parameters in an application compiled as a Windows GUI and without any graphics windows defined by Screen[Res](). sleep interception not so easy but work-arround is possible in code...
by marpon
Sep 13, 2018 13:35
Forum: Community Discussion
Topic: Feature request: instrisic Defines for console / gui mode
Replies: 60
Views: 6071

Re: Feature request: instrisic Defines for console / gui mode

@jj2007 i apologize if my formulation did hurt you, my intention was not to "insult" any people. "subtle" not me, be sure my english knowledge is not allowing for that. As i understand now : you are thinking about extending define functionalities... May be, it could be easier to ...

Go to advanced search