Giter VIP home page Giter VIP logo

cccitygen's Introduction

πŸ‘‹ Hi! I'm Andrew (or, at your option, OndΕ™ej), and I hack on compilers.

Some thoughts to paint a picture:

  • specifications are cool. A machine-readable specification is a specification which itself has a specification.
  • I'm surprised I haven't come across compiler combinators, i.e. a DSL for specifying language semantics that lets you automatically derive a compiler and/or a language server. This would be a fun project to work on.
  • if you care about (high-level) information, you have to stop throwing it away. This is why I love how Unison preserves typed ASTs and why I prefer the purely functional paradigm with static typing to conventional programming.
  • objective complexity should play an important role in design decisions. This is why I consider the UNIX filesystem principle of a unified rooted tree to be cleaner than drive letter assignment and the reason why I dislike languages like C++.

Here's an overview of coding time for the past seven days spent in personal projects and coursework:

No activity tracked

cccitygen's People

Contributors

viluon avatar

Watchers

 avatar  avatar

Forkers

gitter-badger

cccitygen's Issues

Handling Non-rectangular Rooms

How should non-rectangular Rooms be handled? What about hallways and such?
Possible solutions:

  • Make Rooms use more than 4 Walls, 1 floor and 1 ceiling
    • This introduces issues like how should these be assembled together, how to keep track of where everything is and how to actually construct such Rooms, because points A and B are just not enough.
  • Make Rooms link to surrounding Rooms and let some of their Walls be zero size, or let them have less than 4 Walls
    • This introduces issues like how should these Rooms be linked together and how should they be constructed, but allows structures like hallways to be built from individual segments.
  • Create a new class for more abstract handling of rooms which would join individual cells
    • This would make handling of Rooms a little more logical and would also prevent weird linking issues from the second idea. This new class could be called Room and the cell could be something like RoomCell

This issue has been derived from #1

Add Overloads for Point3D

Add overloads for easier manipulation with Point3D.

  • __tostring
  • __len
    • This should return math.sqrt( self.x ^ 2 + self.y ^ 2 + self.z ^ 2 )
  • __add and __sub
  • __mul and __div
  • __mod
  • __pow
  • __eq
  • __lt
  • __le

Note: The comparison metamethods should simply compare the x, y and z values, and return true if all of the conditions match.


This issue has been derived from #1

Implement require()

Currently, cccitygen uses a customized version of dofile() to load files. That is, honestly, a terrible solution. For these tasks, require() (unavailable in the ComputerCraft environment) should be used instead.


This issue has been derived from #1

Move Tasks from ToDo.md to Issues

These tasks have to be made into issues:

  • Add overloads for Point3D
  • What about the constructor chain interface?
  • Grid3D should use Point3D for origin
  • Rooms are somewhat limited. They can only have 4 walls. What about non-rectangular rooms?
  • Grid3D:resize()
  • Should room floors be limited only to the inner area (exclude the borders with walls)?
  • Move stuff from ToDo to GitHub Issues (done because the ToDo.md file has been deleted and this is in fact an issue πŸ˜› )
  • Implement require(), dofile() is dumb
  • Building should keep a list of outside walls
  • IDuplicable?
  • Generalize Palette, add RoomPalette
  • Use RoomPalette in :populate() along with BuildingPopulator or something similar
    • BuildingPopulator will contain a list of rules such as what Rooms the building should use and how should they be connected, how many of them etc
    • BuildingPopulators will define Building types, for example a family house vs. mall etc
    • BuildingPopulators should have a clue about how the building is structured (floors, staircases, elevators?)
  • Rooms should hold the information about windows, Buildings should only link to them

Note: The fact that a task here is checked means that it has been made into an issue, it doesn't mean it's solved.

ISupportsConstructorChain

An interface for method chaining of constructors. ISupportsConstructorChain would set the __call metamethod to the constructor of the implementing class, which would allow constructs like

local a, b, c = Point3D ( 1, 2, 3 ) ( 2, 3, 4 ) ( 3, 4, 5 )

This issue has been derived from #1

Should Room Floors and Ceilings be Limited to the Inner Area?

Should the Wall object that serves as a floor/ceiling in a Room be limited only to the inner area of the Room? As it is now, the borders of floors and ceilings overlap with the room's walls, which means that floors and ceilings have to be built first and walls "on top" of them.


This issue has been derived from #1

Implement Grid3D:resize()

As of now, Grid3D can only be resized when created. That means Window cannot be implemented, because it extends Wall which extends Structure which extends Grid3D, and Window needs to be reoriented when Window:fitToWall() is called.


This issue has been derived from #1

IDuplicable

An interface generalizing the :duplicate() method. Many classes currently implement the :duplicate() method (in fact, all classes should have one). An interface could however generalize this. The constructor for the interface would have to require information on how should the actual class constructor receive arguments (what fields in what order).


This issue has been derived from #1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.