Page 11 of 14 FirstFirst ... 9 10 11 12 13 ... LastLast
Results 101 to 110 of 133

Thread: [GALLERY] Rob's WIPs

  1. #101

    Re: [GALLERY] Rob's WIPs

    Yes, but where's the proof that a heptagon is not constructible?
    You can't say "Nobody knows of a method therefore it can't be done". Not that I really doubt that it's true that you can't construct a regular heptagon with Greek construction, but I won't be content until I see an actual proof.
    The method I'm using sort of fudges the rules of Greek construction, and it;s quite similar to the method you linked me.
    And yeah, Hotrod, those are H1 animations. I imported them into my file to test if they are going to clip my geometry. They do, but no more than they already clipped the original pelican.
    Reply With Quote

  2. #102
    おはようございます klange's Avatar
    Join Date
    Dec 2006
    Posts
    3,028

    Re: [GALLERY] Rob's WIPs

    Quote Originally Posted by Rob Oplawar View Post
    Yes, but where's the proof that a heptagon is not constructible?
    You can't say "Nobody knows of a method therefore it can't be done". Not that I really doubt that it's true that you can't construct a regular heptagon with Greek construction, but I won't be content until I see an actual proof.
    The method I'm using sort of fudges the rules of Greek construction, and it;s quite similar to the method you linked me.
    And yeah, Hotrod, those are H1 animations. I imported them into my file to test if they are going to clip my geometry. They do, but no more than they already clipped the original pelican.
    It was proven algebraically some time ago (1700's?)
    (Also, the second link in my post was my construction using a Neusis construction)
    Reply With Quote

  3. #103
    State your identity! Hotrod's Avatar
    Join Date
    Dec 2006
    Location
    Ontario, Canada
    Posts
    5,282

    Re: [GALLERY] Rob's WIPs

    Oops, I must have skipped over that last line where you said that, my bad.

    Nice...Pelican? Marine? Ass?
    Reply With Quote

  4. #104

    Re: [GALLERY] Rob's WIPs

    Quote Originally Posted by AdmiralBacon View Post
    It was proven algebraically some time ago (1700's?)
    I suspected as much.
    Quote Originally Posted by AdmiralBacon View Post
    (Also, the second link in my post was my construction using a Neusis construction)
    *takes a gander* Hm, that looks extremely similar to what I'm doing. I think it's essentially the same thing, although I can't seem to discern the steps you used to construct that.
    Also, what program are you using to do that?
    Also also, I still can't seem to derive the algebraic proof of why that method works. Sigh.
    Reply With Quote

  5. #105
    おはようございます klange's Avatar
    Join Date
    Dec 2006
    Posts
    3,028

    Re: [GALLERY] Rob's WIPs

    Quote Originally Posted by Rob Oplawar View Post
    *takes a gander* Hm, that looks extremely similar to what I'm doing. I think it's essentially the same thing, although I can't seem to discern the steps you used to construct that.
    Also, what program are you using to do that?
    First I generate the angle pi/7 using the Neusis construction. Then I construct a circle at the outer edge, followed by a mirror of the pi/7. This gets me part of a 14ngon, which I can then cut down to a heptagon and then draw the inner circle. From there it's a bunch of equally sized circles to get myself the rest of the way around.

    The lack of pure accuracy is because I drew it all in Inkscape. Didn't want to bother with a CAD, and I don't have any geometry-specific apps with me.
    Reply With Quote

  6. #106

    Re: [GALLERY] Rob's WIPs

    This is directed mostly at p0lar/Admiral Bacon (for they are fellow PHPers), but anybody who knows a bit about software architecture design is welcome to chip in.

    So as you may already know, I am writing my own open-source forum software (pretty much just for the hell of it, as I realize belatedly that there are plenty of quite good open source forums out there already).
    One of the trickiest problems I've run into so far is localization. I can't seem to get a good pattern for it to fit in with my other code.

    I'm doing some things kind of strangely right now- I'm experimenting with __autoload (for a couple of reasons- 1st to reduce the size of the include blocks at the head of my code and also allow a script to dynamically decide which files it needs to include, so that those that aren't used on a specific load can be left out).

    So anyway, my forum has many different modules which may be added, removed, and expanded at will by both the site administrator and the user, which is why autoload is so great for that. But when I use autoload to load a module, it also loads the language file (and any other required resources) for that module.

    So here's my problem: before loading any language files, I have to specify the language I want. But the language is user specifiable, so in order to get the preferred language I have to load the user module (the user login/preferences system is implemented as a module so that it can be expanded or entirely replaced by the site administrator, to allow more customizeability).


    As I was typing this, though, I realized the solution- the way I have implemented it, the localization loading is part of the framework, which all modules depend on, so I could simply have the user module specify the initial language as it is being loaded--

    no, that won't work- if I'm depending on autoload, other modules are quite likely to be loaded first.

    I think any way I go about this, the User module is going to have to be manually loaded and the language files manually selected, after which modules can be autoloaded.


    What do you guys think?

    Especially AdmiralBacon- I saw that your forum supports localization. How did you go about implementing that?

    edit: I got it working.
    Oh my goddness, it is quite epic.

    here's what the headers of all the view scripts look like now:
    Code:
    require_once('business/framework.php');
    mysqliSession::initiate();     //My equivalent of session_start, using mysql in lieu of files.
    loadLanguageFile();
    I'm considering making a class to encapsulate framework functions such as loadLanguageFile(), or maybe I might just put them in a namespace; either way it's likely to become Framework::loadLanguageFile();

    well, you guys like? I love php. It makes me go .

    edit again: hm. I don't think I ever call mysqliSession::initiate() and loadLanguageFile() separately-- do you suppose I ought to have mysqliSession::initiate() call loadLanguageFile() before returning? The dependency goes in the right direction...
    Actually, no, I won't do that, because I don't want the session handler to be so strongly coupled.
    Last edited by Rob Oplawar; October 22nd, 2008 at 08:10 PM.
    Reply With Quote

  7. #107

    Re: [GALLERY] Rob's WIPs

    EUREKA!

    For about a year and a half now I've had the lurking problem of recursive database queries to fetch arbitrary forum subtrees. Until recently, I've been pretty much ignoring it, but for the past few weeks I've been wracking my brain for a solution. I wasn't happy with my previous solution of simply forbidding arbitrary subtree lookups and only allowing the user to view a thread in its entirety or a single post within the thread or a straight chain of replies to a single post.

    But today I solved it! I added a single indexed field to the database, which only adds a small size and insert time overhead, and bingo! It now takes two queries to lookup an arbitrary subtree: one query to lookup information on the root node, and a second query to fetch all of its descendants based on the information found.

    Considering that most of the time it takes to execute a SELECT SQL query comes from the network communication and/or context switching, this reduces my query time from quadratic (query for the node, then all its children, then its children's children, etc) to CONSTANT.

    Of course this optimization comes with a couple of drawbacks, the primary drawback being increased insert time. In the worst case, an insert causes an update on all descendants of the parent node of the new node being inserted, which takes O(n) longer than the best case insert. But considering the best case insert is constant time, and the insert cases are extremely biased towards the best case side, and also considering that forum-goers are more willing to wait a few seconds while their post is inserted than to wait a few seconds trying to load the next page of results, I am quite happy with this result.

    Holy shit, I am damn pleased with myself.




    Also, on the subject of that localization stuff:
    It is working flawlessly, it is awesome, and all of my file headers look like this:
    Code:
    require_once('business/framework.php');
    This forum of mine just got a whole lot better. Booyah!
    Reply With Quote

  8. #108
    am I an oldfag yet? Heathen's Avatar
    Join Date
    Feb 2008
    Location
    a
    Posts
    9,534

    Re: [GALLERY] Rob's WIPs

    Congrats.....?
    Reply With Quote

  9. #109
    Splendid! ExAm's Avatar
    Join Date
    Dec 2006
    Location
    Santa Cruz, CA
    Posts
    8,558

    Re: [GALLERY] Rob's WIPs

    Quote Originally Posted by Rob Oplawar View Post
    EUREKA!
    The geekiness of this post is waaaaay over my level ;_;
    Reply With Quote

  10. #110

    Re: [GALLERY] Rob's WIPs

    Code:
    function displayTree(&$array,$indent='') {
        echo "$indent".$array['letter']."\n";
        foreach($array['child_array'] as $child) 
            $this->displayTree($child,$indent);
    }
    
    $result=TreeRow::$dbLink->query("SELECT * FROM `" . MYSQLI_TEST_TABLE . "` WHERE 1 ORDER BY tree_index ASC, treesort_index ASC");
    $rows = array(0=>array('child_array'=>array()));
    while($row=$result->fetch_assoc()) {
        $row['child_array']=array();
        $rows[$row['my_index']]=$row;
        $rows[$row['parent_index']]['child_array'][$row['my_index']]=&$rows[$row['my_index']];
    }
    displaySubtree($rows[0]);
    AWESOME! Reference variables make this so much easier.
    (the above code fetches rows from an associative database and returns them reorganized into their tree structure)

    Output:
    Code:
    a
     b
      c
      d
     e
      f
       g
      h
    i
     j
      k
    l
     m
     n
    Last edited by Rob Oplawar; January 10th, 2009 at 04:32 PM.
    Reply With Quote

Thread Information

Users Browsing this Thread

There are currently 2 users browsing this thread. (0 members and 2 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •