Search found 7096 matches

by D.J.Peters
Dec 13, 2018 1:48
Forum: General
Topic: Programm is simply closeing but.. why??
Replies: 4
Views: 81

Re: Programm is simply closeing but.. why??

I fixed only the syntax of the code not the logic if there any ;-) Joshy #define thread_uninitalized 0 #define thread_running 1 #define thread_crashed 2 type thread_proc as sub(byval param as any ptr) type thread_controller state as uinteger declare sub reboot(byval proc as thread_proc, byref state ...
by D.J.Peters
Dec 11, 2018 21:23
Forum: Linux
Topic: How to force opening a window terminal from program
Replies: 4
Views: 116

Re: How to force opening a window terminal from program

May be: https://www.freebasic.net/wiki/wikka.ph ... PgOpenScrn

"Opens the console directly for input and output as a file"

Joshy
by D.J.Peters
Dec 11, 2018 21:01
Forum: Tips and Tricks
Topic: Fast Reverse String?
Replies: 89
Views: 878

Re: Fast Reverse String?

I compiled with -RR on both WINDOWS and Linux 64-bit The windows MinGW compiler tool chain creates different assembler code as the gcc on my linux. By the way the created assembler code is totally stupid every human asm coder can do it better. On the other hand may be in some years if all JavaScript...
by D.J.Peters
Dec 11, 2018 20:13
Forum: Tips and Tricks
Topic: Fast Reverse String?
Replies: 89
Views: 878

Re: Fast Reverse String?

Joshy, can you replace my function in your source code with this new one Yes Sir :-) It's faster here are the result on my slow laptop 64-bit Ubuntu 18.4 : with optimization -O max 0.175 Joshy 0.257 Munair 0.285 MrSwiss 0.294 dodicat without optimization 0.282 Joshy 0.613 Munair 0.641 MrSwiss 0.851...
by D.J.Peters
Dec 11, 2018 20:03
Forum: Community Discussion
Topic: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Jan 2019), 800 $ 1st prize
Replies: 105
Views: 4898

Re: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Jan 2019), 350 $ 1st prize

People like a game they can start playing immediately Ok but: you can't play a flight simulator without to learn how to fly a plane. you can't win a battle with AI robots if you don't learn/detect its weak points. you can't win a FPS game if you don't know how your player can climbing, jumping, swi...
by D.J.Peters
Dec 11, 2018 19:37
Forum: Tips and Tricks
Topic: Fast Reverse String?
Replies: 89
Views: 878

Re: Fast Reverse String?

I'm back on 64-bit Ubuntu 18.4 0.2772464752197266 total dodicat 0.2852909564971924 total MrSwiss 0.3338081836700439 total Munair 0.2611167430877686 total Joshy compared to 64-bit Windows-10 0.7957597205822822 total dodicat 1.036331373441499 total MrSwiss 0.9491949061048217 total Munair 0.39811640421...
by D.J.Peters
Dec 11, 2018 19:29
Forum: Tips and Tricks
Topic: Fast Reverse String?
Replies: 89
Views: 878

Re: Fast Reverse String?

@Joshy, I am unable to reproduce your results on 64 bits Linux. My results on average do not come close to yours. Yes I'm under 64-bit Win 10 ATM but I get different results also. I close firefox taskmanager ... can you post your results from this please ? Win 10 64-bit 0.7957597205822822 total dod...
by D.J.Peters
Dec 11, 2018 18:56
Forum: Tips and Tricks
Topic: Fast Reverse String?
Replies: 89
Views: 878

Re: Fast Reverse String?

...cuz he IS the King of pointer manipulation! Not really but I know how to help a compiler :-) Long time ago, FreeBASIC was a x86 compiler (emitter) only I have done many things with inline assembler but since FreeBASIC is a real cross compiler and run's on my cute Raspberry PI and Beagle Bone bla...
by D.J.Peters
Dec 11, 2018 18:09
Forum: Tips and Tricks
Topic: Fast Reverse String?
Replies: 89
Views: 878

Re: Fast Reverse String?

@fxm good find (it's fixed know)

pE = pD + nChars + 1
while pD<pE
...
should be faster than
pE = pD + nChars
while pD<=pE

I will try it

Joshy
by D.J.Peters
Dec 11, 2018 18:04
Forum: Community Discussion
Topic: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Jan 2019), 800 $ 1st prize
Replies: 105
Views: 4898

Re: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Jan 2019), 350 $ 1st prize

Lachie Dazdarian wrote:Gameplay (15 points max): In this category I will evaluate how much the game is fun and challenging to play.
"challenging to play"
Does it mean a complex game where you have to learn how to play it, gets lesser points ?

Joshy
by D.J.Peters
Dec 11, 2018 17:28
Forum: Tips and Tricks
Topic: Fast Reverse String?
Replies: 89
Views: 878

Re: Fast Reverse String?

@leopardpm I edit my post

Joshy
by D.J.Peters
Dec 11, 2018 17:19
Forum: Tips and Tricks
Topic: Fast Reverse String?
Replies: 89
Views: 878

Re: Fast Reverse String?

yes swap is slow it's a function call not a (inline) macro

edit:
wait swap is on 64 bit faster than tmp=A : A=B : B=tmp
but on 32-bit swap is slower !

Joshy
by D.J.Peters
Dec 11, 2018 16:46
Forum: Tips and Tricks
Topic: Fast Reverse String?
Replies: 89
Views: 878

Re: Fast Reverse String?

I get on old 64-bit laptop 0.67 Joshy 0.75 dodicat 0.92 Munair 0.98 MrSwiss edit: 32-bit GAS mode it's slower 0.80 dodicat 0.84 MrSwiss 0.88 Joshy 1.06 Munair 32-bit -gen gcc 0.78 Joshy 0.80 dodicat 0.85 MrSwiss 0.96 Munair Joshy ' dc_s-test_invFunct.bas -- dodicat 'Munair function RevStr(byval s as...
by D.J.Peters
Dec 09, 2018 3:10
Forum: Tips and Tricks
Topic: Fast clipping lines in BASIC.
Replies: 2
Views: 731

Re: Fast clipping lines in BASIC.

I replaced the function findRegion with a macro.

Joshy
by D.J.Peters
Dec 09, 2018 1:06
Forum: General
Topic: How to fix error 177 ???
Replies: 40
Views: 587

Re: How to fix error 177 ???

#ifdef class #undef class #define class type #endif type aType as integer i end type class aClass extends object declare abstract sub implement_me declare virtual sub overwrite_me as aType i_share_it end class sub aClass.overwrite_me print "you don't overwrote me: " & i_share_it.i end...

Go to advanced search