Return to “Everything & Anything”

Post

Re: Things That Made You Happy Today

#1353
JoshParnell wrote:I finally implemented AABB trees. Perf tests look very good. It made me happy.
So, another part of collision detection done?

Yeah, the heavy perf tests will come later when the player base get hands on the game and bring it to its limits. There were a lot of games out there that worked perfectly fine before they were released, but nobody envisaged with the unbelievable creativity and sheer willpower of the community to exploit glitches. :lol:
Automation engineer, lateral thinker, soldier, addicted to music, books and gaming.
Nothing to see here
Flatfingers wrote: 23.01.2017: "Show me the smoldering corpse of Perfectionist Josh"
Post

Re: Things That Made You Happy Today

#1354
Technically not today but monday evening, but you guys were having so much fun with the runway thing, and it still makes me happy today -
went on a date on monday. I sneakily took her hand while we were walking after dinner, and she smiled and pretty much hasn't let go of mine until we had to each take our train a good 2 hours later. :D

And from today: according to my manager I code as fast as light :ghost:
BONSAAAIII
Warning: do not ask about physics unless you really want to know about physics.
The LT IRC / Alternate link || The REKT Wiki || PUDDING
Image
Post

Re: Things That Made You Happy Today

#1356
Dinosawer wrote:Technically not today but monday evening, but you guys were having so much fun with the runway thing, and it still makes me happy today -
went on a date on monday. I sneakily took her hand while we were walking after dinner, and she smiled and pretty much hasn't let go of mine until we had to each take our train a good 2 hours later. :D

And from today: according to my manager I code as fast as light :ghost:
BONSAAAIII
Grats on both. <3

Talvieno wrote: And yes, you do code incredibly fast. :P
He does?

*looks at Dino*

You gotta have to proof me that!
Automation engineer, lateral thinker, soldier, addicted to music, books and gaming.
Nothing to see here
Flatfingers wrote: 23.01.2017: "Show me the smoldering corpse of Perfectionist Josh"
Post

Re: Things That Made You Happy Today

#1359
Grumblesaur wrote:I nuked a lot of memory leaks in a programming language project I'm working on with a friend, and we're beginning to implement functions.
This is really cool. :thumbup:

I wouldn't even be able to know where to start for developing a new programming language. :think:
Automation engineer, lateral thinker, soldier, addicted to music, books and gaming.
Nothing to see here
Flatfingers wrote: 23.01.2017: "Show me the smoldering corpse of Perfectionist Josh"
Post

Re: Things That Made You Happy Today

#1361
JanB1 wrote:
Grumblesaur wrote:I nuked a lot of memory leaks in a programming language project I'm working on with a friend, and we're beginning to implement functions.
This is really cool. :thumbup:

I wouldn't even be able to know where to start for developing a new programming language. :think:
We're going the easy route. We're using GNU Bison to generate a parser and GNU Flex to create a lexical analyzer. This isn't always as fast as writing these programs by hand, but it's a lot easier to reason about.

The lexical analyzer reads a file and uses regular expressions to match string patterns, and will spit out a token (which is just a number, but on value literals in the source file, it'll also store the value) indicating the element of code identified. The parser takes these tokens and looks to see if they match up with grammatical patterns. When the tokens match up with a pattern, the parser will add nodes to the syntax tree that correspond to the statement or expression it parsed from the tokens.

Once the whole tree is constructed (and it didn't error out from a syntax issue), the interpreting stage takes place. The interpreter recursively walks the syntax tree and executes instructions based on the type of node present, its child nodes, and any value data contained therein.

All of this is compiled up as one executable, so that when you invoke the interpreter on a file, you're also invoking the lexer and parser (you'd be hard pressed to find a language implementation that didn't work that way. Compilers are a little different in that they translate to assembly/binary, but the lex-parse-(compile/interpret) stages are usually bundled up as one package).

The way we're going to handle functions is by making them objects. Their value will be a pointer to a node in the syntax tree where the definition for a function's code starts, and the function itself will be stored in a map of identifier : mg_obj. When the function's identifier is invoked after its definition, its code in the syntax tree will be called with the provided arguments, which will be placed in an identifier : object map within the function. This emulates a stack.

At least, that's what we're thinking. The implementation details may differ significantly once we move on to it.
Shameless Self-Promotion 0/ magenta 0/ Forum Rules & Game FAQ
Post

Re: Things That Made You Happy Today

#1362
Grumblesaur wrote:
JanB1 wrote:
Grumblesaur wrote:I nuked a lot of memory leaks in a programming language project I'm working on with a friend, and we're beginning to implement functions.
This is really cool. :thumbup:

I wouldn't even be able to know where to start for developing a new programming language. :think:
We're going the easy route. We're using GNU Bison to generate a parser and GNU Flex to create a lexical analyzer. This isn't always as fast as writing these programs by hand, but it's a lot easier to reason about.

The lexical analyzer reads a file and uses regular expressions to match string patterns, and will spit out a token (which is just a number, but on value literals in the source file, it'll also store the value) indicating the element of code identified. The parser takes these tokens and looks to see if they match up with grammatical patterns. When the tokens match up with a pattern, the parser will add nodes to the syntax tree that correspond to the statement or expression it parsed from the tokens.

Once the whole tree is constructed (and it didn't error out from a syntax issue), the interpreting stage takes place. The interpreter recursively walks the syntax tree and executes instructions based on the type of node present, its child nodes, and any value data contained therein.

All of this is compiled up as one executable, so that when you invoke the interpreter on a file, you're also invoking the lexer and parser (you'd be hard pressed to find a language implementation that didn't work that way. Compilers are a little different in that they translate to assembly/binary, but the lex-parse-(compile/interpret) stages are usually bundled up as one package).

The way we're going to handle functions is by making them objects. Their value will be a pointer to a node in the syntax tree where the definition for a function's code starts, and the function itself will be stored in a map of identifier : mg_obj. When the function's identifier is invoked after its definition, its code in the syntax tree will be called with the provided arguments, which will be placed in an identifier : object map within the function. This emulates a stack.

At least, that's what we're thinking. The implementation details may differ significantly once we move on to it.

"easy" he says. "a lot easier" he says. I had trouble even following how the things work you just explained. :?

Damn. Really gotta read that book "Structure and interpretation of computer programs" and others sometimes soon...

My pile of books I gotta read keeps piling up. Gaaah! I have already reached the thousands of pages! :|
Automation engineer, lateral thinker, soldier, addicted to music, books and gaming.
Nothing to see here
Flatfingers wrote: 23.01.2017: "Show me the smoldering corpse of Perfectionist Josh"

Online Now

Users browsing this forum: No registered users and 46 guests

cron