<?php

require_once "src/display.php";

run_application();
function run_application()
{
   display_page();
}
import re, os

class Sequence(list):
    def __init__(self, pattern):
        self.pattern = pattern.strip()
#         self.set_pattern(pattern, index)
        self.set_components()
        self.build_list();

#     def set_pattern(self, pattern, index):
#         if type(pattern) is not str:
#             index = int(index)
#             pattern = file("patterns/" + pattern).readlines()[index]
#         self.pattern = pattern.strip()

    def set_components(self):
        self.set_repetitions()
        self.set_parameters()

    def set_repetitions(self):
        match = re.match("^\(([0-9]+)[ \n]+(.*)\)$", self.pattern)
        if match is not None:
            self.repetitions = match.groups()[0]
            self.pattern = match.groups()[1]
        else:
            self.repetitions = 1

    def set_parameters(self):
        self.pattern = list(self.pattern)
        parameters = []
        while len(self.pattern) > 0:
            parameters += [self.read_parameter()]
        self.parameters = parameters

    def read_parameter(self):
        self.skip_whitespace()
        if self.pattern[0] is "(":
            return Sequence(self.read_until_close())
        else:
            return self.read_until_whitespace()

    def skip_whitespace(self):
        while re.match("[ \n]", self.pattern[0]):
            self.pattern.pop(0)

    def read_until_close(self):
        level = 0
        parameter = ""
        while True:
            character = self.pattern.pop(0)
            parameter += character
            if character is "(":
                level += 1
            elif character is ")":
                level -= 1
            if level is 0:
                break
        return parameter

    def read_until_whitespace(self):
        parameter = ""
        while len(self.pattern) > 0:
            character = self.pattern.pop(0)
            if character is " ":
                break
            parameter += character
        return parameter

    def build_list(self):
        sequence = []
        for iteration in range(0, int(self.repetitions)):
            for parameter in self.parameters:
                if isinstance(parameter, Sequence):
                    sequence += parameter.sequence
                else:
                    sequence += [parameter]
        self.sequence = sequence

    def __str__(self):
        return str(self.sequence)

    def __repr__(self):
        return self.__str__()

    def __getitem__(self, index):
        return self.sequence[index]

    def __len__(self):
        return len(self.sequence)
<?php

require_once "operations/include/include_config_file.php";

function __autoload($name)
{
   $path = str_replace("\\", "/", $name) . ".php";
   require_once $path;
}
function display_page()
{
   include_configuration_file(dirname(__FILE__) . "/config", "php");
   echo build_page();
}
function build_page()
{
   return new entities\evr\Emoticon_Vs_Rainbow();
}
<?php
namespace entities\html;

class Link extends Element
{
   public function __construct($rel=null, $href=null)
   {
      parent::__construct("link", null, null, false);
      $this->add_attribute("rel", $rel);
      $this->add_attribute("href", $href);
   }
}
<?php
namespace entities\html;

class Checkbox extends Input
{
   public function __construct(
      $name=null, $value=null, $class=null, $checked=false)
   {
      parent::__construct($name, "checkbox", $value, $class);
      $this->checked = $checked;
   }
   protected function build_assignments()
   {
      $assignments = parent::build_assignments();
      if ($this->checked)
      {
         $assignments .= " checked";
      }
      return $assignments;
   }
}
<?php
namespace entities\html;

class Div extends Element
{
   public function __construct($id=null, $class=null, $content=null)
   {
      parent::__construct("div", $id, $class);
      $this->content = $content;
   }
   protected function build_content()
   {
      return $this->content . "\n";
   }
}
<?php
namespace entities\html;

class Element
{
   private $attributes = array();
   public function __construct($name, $id=null, $class=null, $close=true)
   {
      $this->name = $name;
      $this->add_attribute("id", $id);
      $this->add_attribute("class", $class);
      $this->close = $close;
   }
   protected function add_attribute($name, $value)
   {
      $this->attributes[$name] = $value;
   }
   public function __toString()
   {
      return $this->build_html();
   }
   protected function build_html()
   {
      $markup = $this->build_opening_tag();
      $markup .= $this->build_content();
      if ($this->close === true)
      {
         $markup .= $this->build_closing_tag();
      }
      return $markup;
   }
   private function build_opening_tag()
   {
      $tag = "<" . $this->name;
      $tag .= $this->build_attributes();
      $tag .= ">";
      return $tag;
   }
   protected function build_attributes()
   {
      $attributes = "";
      foreach ($this->attributes as $name => $value)
      {
         if (!is_null($value) && $value !== false)
         {
            $attributes .= " $name";
            if ($value !== true)
            {
               $attributes .= "=\"$value\"";
            }
         }
      }
      return $attributes;
   }
   protected function build_content()
   {
      return null;
   }
   private function build_closing_tag()
   {
      return "</" . $this->name . ">";
   }
   protected function get_attribute($name)
   {
      return $this->attributes[$name];
   }
}
216.73.216.30
216.73.216.30
216.73.216.30
 
July 18, 2022


A new era ‼

Our infrastructure has recently upgraded ‼

Nugget Communications Bureau 👍

You've never emailed like this before ‼

Roundcube

Webmail software for reading and sending email from @nugget.fun and @shampoo.ooo addresses.

Mailman3

Email discussion lists, modernized with likes and emojis. It can be used for announcements and newsletters in addition to discussions. See lists for Picture Processing or Scrapeboard. Nowadays, people use Discord, but you really don't have to!

FreshRSS

With this hidden in plain sight, old technology, even regular people like you and me can start our own newspaper or social media feed.

Nugget Streaming Media 👍

The content you crave ‼

HLS

A live streaming, video format based on M3U playlists that can be played with HTML5.

RTMP

A plugin for Nginx can receive streaming video from ffmpeg or OBS and forward it as an RTMP stream to sites like Youtube and Twitch or directly to VLC.


Professional ‼

Nugget Productivity Suite 👍

Unleash your potential ‼

Kanboard

Virtual index cards you can use to gamify your daily grind.

Gitea

Grab whatever game code you want, share your edits, and report bugs.

Nugget Security 👍

The real Turing test ‼

Fail2ban

Banning is even more fun when it's automated.

Spamassassin

The documentation explains, "an email which mentions rolex watches, Viagra, porn, and debt all in one" will probably be considered spam.

GoAccess

Display HTTP requests in real time, so you can watch bots try to break into WordPress.

Nugget Entertainment Software 👍

The best in gaming entertainment ‼

Emoticon vs. Rainbow

With everything upgraded to the bleeding edge, this HTML4 game is running better than ever.


Zoom ‼

The game engine I've been working on, SPACE BOX, is now able to export to web, so I'm planning on turning nugget.fun into a games portal by releasing my games on it and adding an accounts system. The upgraded server and software will make it easier to create and maintain. I'm also thinking of using advertising and subscriptions to support the portal, so some of these services, like webmail or the RSS reader, may be offered to accounts that upgrade to a paid subscription.