The PokéCommunity Forums Off-Topic Discussions Science & Technology
The Coder's Lounge

Science & Technology From the computer lab to the chemistry lab, or even the observatory, here's where we nerd out over all things science and technology!


Reply
 
Thread Tools
  #176    
Old April 25th, 2018 (4:27 AM).
Seliph's Avatar
Seliph Seliph is offline
Lord
 
Join Date: Feb 2013
Gender: Male
Posts: 2,589
The way how Delphi handles interfaces has got to be the weirdest and stupidest way that I've ever seen.

Basically, when you want to implement an interface, you automatically subscribe to implement three specific methods as well, whose only purpose is to keep track of the weird reference counting those interfaces do. From what I understand that's also the reason why in Delphi you can specify multiple interfaces alongside a class the implementing class inherits from. Delphi by itself is only single-inheritance.

Looking at different tutorials, the way people get around that issue is deriving the class from a class called TInterfacedObject whose only purpose is to implement those three methods. However, if you do that, since Delphi is only single inheritance, you lose out on the ability to derive from another class. So, if you don't want that you end up copying them anyway.
__________________

Reply With Quote

Relevant Advertising!

  #177    
Old April 29th, 2018 (1:24 AM).
Zemanahrad's Avatar
Zemanahrad Zemanahrad is offline
Audino Master
  • GT
 
Join Date: Apr 2013
Location: Czech Republic
Age: 21
Gender: Male
Nature: Relaxed
Posts: 1,480
Do you guys have any experience with Java Applets? I was tasked with making educational interactive materials for kids about basic data structures. And because I was working pretty much only in Java for the last year I was thinking about using it for this.

Also, I wanted to make real life example for each structure. I was thinking about comparing queue to the queue in the school cafeteria, but I don't know what I should compare to stack. Do you have any ideas?
__________________
Reply With Quote
  #178    
Old April 29th, 2018 (10:09 PM).
Ganondorf's Avatar
Ganondorf Ganondorf is offline
 
Join Date: May 2009
Posts: 148
Quote:
Originally Posted by Zemanahrad View Post
Do you guys have any experience with Java Applets? I was tasked with making educational interactive materials for kids about basic data structures. And because I was working pretty much only in Java for the last year I was thinking about using it for this.

Also, I wanted to make real life example for each structure. I was thinking about comparing queue to the queue in the school cafeteria, but I don't know what I should compare to stack. Do you have any ideas?
I haven't tried Java applets yet, actually. I'm trying to kinda stay away from Java as it's slowly dying at least in my eyes.

As for data structures, a good reference for a queue is probably some kind of line for service, so a school cafeteria is probably a good bet. For a stack, the most common comparison is a stack of identical plates. When you want to pop/retrieve data from your stack, you're taking a single plate off the top of the stack to use it. When you're pushing/adding data to the stack, you're putting a clean plate on the stack to use later.
__________________
My country lay within a vast desert. When the sun rose into the sky, a burning wind punished my lands, searing the world.

And when the moon climbed into the dark of night, a frigid gale pierced our homes. No matter when it came, the wind carried the same thing... Death.

But the winds that blew across the green fields of Hyrule brought something other than suffering and ruin.

I coveted that wind, I suppose.

Moderator of Science & Technology - Signature Image
Reply With Quote
  #179    
Old May 8th, 2018 (3:02 AM).
Alexander Nicholi's Avatar
Alexander Nicholi Alexander Nicholi is offline
We come close to find Singularity
 
Join Date: Nov 2009
Location: the Research Triangle
Age: 20
Nature: Adamant
Posts: 5,353
I’ve been working on the build tool for our game engine, ÔÇô, writing both the tool and the engine itself in D.

It takes a stacked solution/project approach that’s similar to Visual Studio, but the solution is headed by a small INI file that contains Git URLs along with some metadata. Those repos get cloned and have their own project INIs along with their sources, which are compiled together and linked statically into a single executable.

The engine isn’t purely D, though: C and C++ source code are important to have in some cases. The build tool uses the LLVM toolchain to produce D code as well as C and C++, and with the LLD linker it can perform link-time optimisation across both file and language boundaries. Since everything’s bundled statically this should be great for optimisation. It also means building on *nix and Windows happens with the same tools.

The build tool will also (eventually) help facilitate development and release cycles, which I wrote about here. My deadline for a functioning build tool and engine stub is at the end of May, but with how much progress I’ve made so far I might be able to start working on these things afterward, too!
__________________
<Signature user="Alexander Nicholi" />
Reply With Quote
  #180    
Old 4 Weeks Ago (7:59 AM).
Ganondorf's Avatar
Ganondorf Ganondorf is offline
 
Join Date: May 2009
Posts: 148
I managed to pull 70% on my project in my programming class and I'm pretty happy about it. I have a strange suspicion that it might also be one of, if not the, highest mark in the class. :x
__________________
My country lay within a vast desert. When the sun rose into the sky, a burning wind punished my lands, searing the world.

And when the moon climbed into the dark of night, a frigid gale pierced our homes. No matter when it came, the wind carried the same thing... Death.

But the winds that blew across the green fields of Hyrule brought something other than suffering and ruin.

I coveted that wind, I suppose.

Moderator of Science & Technology - Signature Image
Reply With Quote
Reply

Quick Reply

Join the conversation!

Create an account to post a reply in this thread, participate in other discussions, and more!

Create a PokéCommunity Account

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 6:16 PM.