Jump to content
Objectivism Online Forum

Amaroq

Regulars
  • Posts

    360
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Amaroq

  1. Amaroq

    AmaGallery

    I had fun programming the whole thing! I'd also promised to set up a custom version of it for a friend within a certain amount of time, so that pushed me to complete it on time too. No IDE. I wrote it all from scratch in a simple text editor that had syntax highlighting. Gedit, if you're curious. And unfortunately, of all the features I want to add to it, the previous/next buttons is the one most likely to give me trouble. Adding the ability to do pages is as simple as only looking at a portion of the Images directory list. Commenting, would be tougher. I think I could just add that functionality to the full-view part. Previous/next buttons would require me to dive back into the gallery code and redo stuff. Hmm...
  2. Amaroq

    AmaGallery

    I coded this gallery from scratch. If you don't mind seeing pictures of furries, here it is. http://amaroq.org/gallery/gallery.php This was my first (and only, so far) large-ish PHP project. It was also my first venture into PHP OOP, as well as my first time seriously making use of the GD library. (Before this, I experimented with GD a little bit. My random forum avatar is the result of this experimentation.) Here's the gist of how it works: AmaGallery searches a predefined Images folder for images, checks this list against a Thumbnails folder, generates any thumbnails that are missing and saves them to that folder (if needed), then displays all of the thumbnails, each one a link to its full-sized picture. Keeping a thumbnails folder is much more efficient than generating the thumbnails every time the gallery is loaded. When I delete all the pictures before loading the gallery, it takes upwards of a minute to load. But every time after that, it loads almost instantly. The images are validated in two ways: The extention (.jpg/.jpeg, .gif, .png), and it uses GD itself to validate that it's really got image data. No uploading or includ()ing hidden php scripts here! If it's not an image, it's skipped. (If I remember right... I'll have to look again. It's been a while.) Once you're viewing a full-view image, one of two things can happen: If you have javascript disabled or blocked, full size is shown. If you have javascript enabled, the width and height of your window is autodetected. (Or rather, the size of the space for the document to be displayed.) Javascript loads two images into memory. The first image is actually a request to a php file that generates a resized image on the fly, once again using GD. (With the format being directgen.php?image=[image url here]&width=[pixels]&height=[pixels]). It lies to your browser, sending a header that tells the browser it's receiving image data. The image it loads is the fullsize you are viewing, but the width and height requested are based on the autodetected page size. The second image javascript loads into memory is the actual full-sized image. The first one is displayed, and the second one is held in memory. The first and second swap every time you click the image. What that basically means is that when you click on a thumbnail, your browser quickly loads a server-generated version of the image that fits your window. The larger, full-sized, bandwidth-hungry image is loading in the background while you're viewing the fitting image. When you click the fitted image, javascript swaps it with the full sized one to give you a full view, and clicking it again switches back. AmaGallery is set up to be easily configurable via a single config file. Amongst the many options you can set up are the images directory, the thumbnails directory, and size of the thumbnails. You can set width and/or height. If only one dimension is set, the aspect ratio of the original image is maintained. If both width and height are set, then they will be treated as a maximum width and maximum height, once again while maintaining the aspect ratio. Another thing I like is the idea for the main gallery page's gallery specific CSS file. It's actually another php file that lies to your browser. It sends a header telling the browser that it's CSS, then outputs some dynamically generated CSS. Then the php block closes and the rest of the file is CSS as normal. (This is to size the tables to something close to the thumbnails. The fullviews do not use this.) Compare these three links. http://amaroq.org/gallery/gallery.css.php http://amaroq.org/gallery/gallery.css.php?...&td_w=100px http://amaroq.org/gallery/gallery.css.php?...&td_w=200px That's all I can think of right now. Yes, it's still lacking in functionality. Like the ability to separate the main gallery into pages, and commenting on individual images, for example. I don't even have a previous or next link in the fullview, so you have to back up to the gallery to go to the next image. And it doesn't have an uploader script either. I ftp in when I want to put images in.
  3. Amaroq

    Trance/Dance

    I noticed there isn't much here about trance or dance music. Do most people simply not like this kind of music? I admit, these and related genres contain a lot of crap, but there's also a lot of good if you know where to look. Why do I like them? I can't quite say. It's the way they make me feel inside when I listen to them. Anywhere from simply happy to uplifted and awed. I'll give examples by listing some of my favorites. I can't really logically say why I like them. Just that I do. DJ Tiesto - Hero (If you can't stand it, I personally believe that to give it a fair chance, you should at least listen to it up to 3:30.) Eric Prydz - Pjanoo Flutlicht - The Fall http://www.youtube.com/watch?v=Oly9LbK8yOM DJ Toxic - It's Killing Me (This is the version with vocals.) (This is the version without vocals. I personally like this one better. I think the 'good part' sounds much better in this one, even though it takes longer to get to.) Darude - Sandstorm (Getting a little mainstream here, but it's still a good song.) And of course the Trance and Euro Dance channels on Digitally Imported That's it for now. I'm sure I'll be able to think of more later. What do you guys think of these and stuff like it?
  4. There's other kinds of rationalists? *looks up rationalism and empiricism* Whoa, yeah, I was using 'One who advocates reason', not 'One who deduces knowledge with no regards to the senses'. How can you be rational while ignoring your senses? It sounds like Rationalism and Empiricism are opposing philosophies which are much better off blended together. I'll have to be more careful of my usage of words around here.
  5. Thank you very much for the welcome. Shucks, I was curious about Objectivists at large. But I am still curious about this place. I've enjoyed adding my two-cents to a debate topic or two. I do believe that Objectivism as Ayn Rand herself set it forth is right. Hearing that there are apparently a large number of Objectivists not even following Objectivism correctly depressed me slightly, and while I came here to see it in action for myself, I'm glad that my assumption was wrong. I value the truth. Ever since I read Atlas Shrugged, I've wanted other people I care about to read it so they can be exposed to it and have a chance to learn the truth about everything we ever thought was true before we read it. When I see people engaging in non-truth, whether they know it or not, I feel the urge to correct them. Any rationalist presented with a rational argument should be able to accept that argument if it is true, shouldn't they? Maybe I sound like a bit of a fanatic when I say this, but I feel that Atlas Shrugged should be read by everyone. We have nothing to lose and everything to gain by being exposed to the messages that it has for us. I have yet to find an argument presented to me that can disillusion me with Objectivism.
  6. All three people in the homes have had their rights violated. Government is here to protect us from criminals and from attacking countries. So while the rest of America have not had their rights threatened, America has been attacked, and every individual is under threat of the army continuing to advance and attack others. It is right for an individual to use violence in defense of himself, his property, or someone he cares about when violence is instigated first by the opponent. It is right for a government to retaliate against an attack that has been directed at the people it is established to protect.
  7. A friend of mine semi-recently introduced me to Objectivism. First by giving me a .txt file containing Anthem to hook me, and then sending me Atlas Shrugged (in its full 1000+ page book form) for my birthday in the mail. By the time I got around to finishing it, I'd gone through more epiphanies than I ever have from any single source of writing in the history of my life. No other single piece of literature has resonated with truth the way that book has for me. Unfortunately, I've been hearing nasty rumors about the Objectivist community. Things that lead me to believe there are a lot of self-proclaimed Objectivists out there spouting off completely non-Objectivist things. To quote Eliezer Yudkowsky himself, from lesswrong.org: http://lesswrong.com/lw/8t/whiningbased_communities/ I quickly pointed out that any Objectivist who believes this have gotten Objectivism completely wrong, and that anyone who levels that accusation has failed to understand Objectivism as well. But that's not the only source that tells me there are a lot of Objectivists out there who are doing it wrong. (Also, my friend has become disillusioned with Objectivism, at least as far as going off of one and only one philosophy goes. He believes it could work for now, but it has no place in a transhumanist future. The singularity will be here by 2025.) The reason I'm here is to observe, to see if it's the majority of self-proclaimed Objectivists "doing it wrong", or if it's just a fundamental (loud) minority. So far I'm not seeing any wrong-ness, except from new people who haven't read Rand's stuff yet. Either way, I think I'll stick around. EDIT: Also, I guess I should mention a little bit about myself. I am an aspiring web designer who wants to make video games someday. I've self-taught myself html, xhtml, css, javascript, php, a little bit of c++, and a little bit of sql. I built the computer I'm using and duel boot with XP 64 bit, Ubuntu amd64, and Gentoo amd64. (At least I will have amd64 Gentoo once I successfully finish installing it.) I'm also a furry, but not the kind that dresses up in animal costumes. Though I love hanging around the ones that do.
  8. Amaroq

    Fuzzy Ethics?

    What they don't know is that you're probably not living up to the same code of ethics they're trying to live up to. You're living up to a more Objective set of ethics, which leads to happiness, rather than the sacrifice and suffering their ethics leads to. Unless the "students" you refer to are students of Objectivism. Either way, I'd say their ethics aren't very Objective if they bring them suffering for adhering to them. If he is failing at the same moral code that the others are failing at, or at any moral code at all really, I'd say he should be blaming himself too if he doesn't want to be a hypocrite.
×
×
  • Create New...