Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Aureal

Pages: [1] 2
1
QB64 Discussion / Re: Follow the development of QB64
« on: September 21, 2018, 01:39:14 pm »
Pls implement a C++11 compatible compiler :( :( :(

2
QB64 Discussion / Re: Graphical IDE. Should we all pitch in and make one?
« on: September 21, 2018, 01:36:25 pm »
I actually created an advanced, universal IDE/Code editor, which had a QB64 Pack, however, due to some performance issues, I had to rewrite it, and most of the functionality was gone. I've planned to implement the syntax highlighter (basically the keystone of the program), but, the lack of C++11+ support of the C++ compiler we're using didn't allow me to use std::regex, and so, making the implementation a lot more difficult. Anyways, the first version had a syntax highlighter that worked very well, actually, one could create syntax files, along with color scheme files. I might be able to give this for a bigger project (I say "might be able", because my laptop's harddrive died, along with 3 years of work :/ )

3
QB64 Discussion / Re: Multi Thread?
« on: July 24, 2018, 04:27:04 am »
That is not multi-threading anyways, computers are very fast, even on single threads, so fast two tasks that run one after another seem to run simultaneously.
Real multi-threading is a different story, its about managing workloads the most efficient way possible.

4
QB64 Discussion / Re: C++11 needed for a library
« on: June 23, 2018, 05:40:31 pm »
Hi RhoSigma,

it seems that -std=gnu++0x is not working, I've sent all the technical information to Felippe, maybe he can help. It would be nice if qb64's internal c++ compiler had c++11, 14 and 17 support, I think that the gcc version that we're using is old (timestamps date 2012), and therefore its c++11 implementation is not bug-free, maybe the core c++ compiler should be updated? I tried downloading a fresh new version of MinGW and then just stuck it in the "..\internal\c\c_compiler\" folder, which solved the c++11 problem, however, there were a lot of #include not found errors (which could be easily solved by moving them, or just modifying the common.h file, I think), so maybe this can actually be updated without breaking anything, giving us support for c++ standards up to std=c++17?

5
QB64 Discussion / C++11 needed for a library
« on: June 23, 2018, 01:20:01 am »
So, I made a new C++ library for QB64 that needs C++11 support, but, it seems that the command line arguments for the embedded c++ compiler do not include "std=c++11". The log goes like this:
Code: QB64: [Select]
  1. In file included from c:\users\zurio.000\desktop\os\qb64\internal\c\c_compiler\bin\../lib/gcc/i686-w64-mingw32/4.7.1/../../../../include/c++/4.7.1/regex:35:0,
  2.                  from ..\\temp\\..\\..\\regex.h:2,
  3.                  from ..\\temp\\regsf.txt:1,
  4.                  from qbx.cpp:987:
  5. c:\users\zurio.000\desktop\os\qb64\internal\c\c_compiler\bin\../lib/gcc/i686-w64-mingw32/4.7.1/../../../../include/c++/4.7.1/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
  6. compilation terminated due to -Wfatal-errors.
  7.  

6
QB64 Discussion / Mapping a texture to a cube's faces
« on: March 27, 2018, 01:54:52 pm »
Knowing both x and y co-ordinates (which have already been projected from 3D space) of every vertex of the cube, how would I map a texture to its face(s)? I've seen examples using _MAPTRIANGLE, but I'm not sure whether I have to use it, neither how to, can I get some help?
I've attached an image for reference

7
Programs / Re: Brainfuck Interpreter
« on: July 23, 2017, 10:28:43 pm »
Hi, bplus, actually, I might do something else with this, I do have some experience on writing many tools for weird things : D (please note my "suite" for the Chip8, including a disassembler, emulator, and assembler!)

8
QB64 Discussion / Compound assignments
« on: July 22, 2017, 06:56:58 pm »
Another little improvement to the QB64's syntax, in order to make it a bit less cumbersome to type, using the C/C++ Compound assignments, and increment/decrement by one operators.

"a += b" would be the same as "a = a + b". Its barely noticeable when variable names are short, but when using long names, variables with types, or even nested types, that amount of code seems unnecessary to write.

Code: QB64: [Select]
  1. myLongVariableName.myType.myNestedType = myLongVariableName.myType.myNestedType + myLongVariableName.myType.myNestedType
vs
Code: QB64: [Select]
  1. myLongVariableName.myType.myNestedType += myLongVariableName.myType.myNestedType

Another good thing would be the ++ and -- operators for increment by one and decrement by one:
Code: QB64: [Select]
  1. myLongVariableName.myType.myNestedType = myLongVariableName.myType.myNestedType + 1
  2.  
vs
Code: QB64: [Select]
  1. ++myLongVariableName.myType.myNestedType
  2.  

9
QB64 Discussion / Re: CatChum for CP/M
« on: July 19, 2017, 09:47:14 pm »
I like it a lot!

10
WHAT IN THE WORLD ARE THOSE HUGE ELSE IFs?????

11
Programs / Brainfuck Interpreter
« on: July 19, 2017, 08:23:05 pm »
Well, I've written an interpreter for brainfuck, why? why not? But I've ran into a bug that I can't solve.
I don't understand the reason, but even though I included a line that wraps the data pointer to the upper bound of the data array, the program keeps subtracting 1 to it, this is crucial for loops to work. Here's the code

Code: QB64: [Select]
  1. dim shared prog(&hffff&) as string
  2. dim shared ostream       as _unsigned _byte
  3. dim shared arr(&hffff&)  as _unsigned _byte
  4. dim shared istream       as _unsigned _byte
  5. dim shared ptr           as integer
  6.  
  7.     sleep
  8.     do
  9.         select case inkey$
  10.             case ">"     : s$ = s$ + ">": cnt = cnt + 1: prog(cnt) = ">": exit do
  11.             case "<"     : s$ = s$ + "<": cnt = cnt + 1: prog(cnt) = "<": exit do
  12.             case "+"     : s$ = s$ + "+": cnt = cnt + 1: prog(cnt) = "+": exit do
  13.             case "-"     : s$ = s$ + "-": cnt = cnt + 1: prog(cnt) = "-": exit do
  14.             case "."     : s$ = s$ + ".": cnt = cnt + 1: prog(cnt) = ".": exit do
  15.             case ","     : s$ = s$ + ",": cnt = cnt + 1: prog(cnt) = ",": exit do
  16.             case "["     : s$ = s$ + "[": cnt = cnt + 1: prog(cnt) = "[": exit do
  17.             case "]"     : s$ = s$ + "]": cnt = cnt + 1: prog(cnt) = "]": exit do
  18.             case chr$(8) : if len(s$) then s$ = left$(s$, len(s$) - 1)  : exit do
  19.             case chr$(13): exec
  20.             case "v"     : for i = 1 to len(_clipboard$): prog(i + cnt) = chr$(asc(_clipboard$, i)): next: s$ = s$ + _clipboard$: exit do
  21.             case else    :
  22.         end select
  23.     loop
  24.     print s$;
  25.     _keyclear
  26.  
  27. sub exec
  28.     for i = 0 to ubound(prog)
  29.         select case prog(i)
  30.             case ">": ptr = ptr + 1
  31.             case "<": if ptr then ptr = ptr - 1 else ptr = ubound(arr) 'What the heck?
  32.             case "+": arr(ptr) = arr(ptr) + 1
  33.             case "-": arr(ptr) = arr(ptr) - 1
  34.             case ".": ostream  = arr(ptr)
  35.             case ",": arr(ptr) = istream
  36.             case "[":
  37.                 if arr(ptr) = 0 then
  38.                     for y = i to ubound(prog)
  39.                         if prog(x) = "]" then i = x + 1: exit for
  40.                     next
  41.                 end if
  42.             case "]":
  43.                 if arr(ptr) then
  44.                     for x = i to 0 step -1
  45.                         if prog(x) = "[" then i = x: exit for
  46.                     next
  47.                 end if
  48.         end select
  49.         updateOutput
  50.         updateConsole(i)
  51.     next
  52.  
  53. sub updateOutput     : print chr$(ostream): _display: cls: end sub
  54. sub updateInput      : istream = asc(inkey$)             : end sub
  55. sub updateConsole(i) : cout "dataptr           =" + str$(ptr)
  56.     cout "data    (current) ="  + str$(arr(ptr))
  57.     cout "program (current) = " + prog(i)
  58.     cout "---------------------"
  59. sub cout(s$)      : _dest _console: print s$: _dest 0 : end sub
  60.  

And here's the test program (paste with v, execute with [enter]):

Code: QB64: [Select]
  1. ++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.
  2.  

12
QB64 Discussion / Re: Try to Recreate a Small Interpreter/Compiler
« on: July 18, 2017, 02:14:46 pm »
lol?

Code: QB64: [Select]
  1.     sleep
  2.         case "+": cnt = cnt + 1
  3.         case ".": print chr$(cnt); " "; "("; cnt; ")"
  4.     end select
  5.     _keyclear
  6.  

13
Yeah sure, I'm working on movable windows!

14
Heyyyy its very nice! tho i would add
Code: QB64: [Select]
  1. on error goto somelabel
in order to avoid the invalid handles

Edit, I was actually typing that before you changed the post hahah

15
Quote
I just upgraded my qb64 version and now it works. Could also be a mistake with how i extracted it before.
Nice job, I'll take a better look sometime later, I work on something similar.

Nice! I would like to see some of that too!

Pages: [1] 2