Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense
Behold, for the first time ever witnessed on the Internet!

My very first Django project, a humor web site with no moderators, or content writers. Administrated in part by an electronic judge but more than anything else it's controlled by the users.

Anyone can end up having any of their privileges given or taken away at any time! Hilarious.

Adbot
ADBOT LOVES YOU

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense

duck monster posted:

An unmoderated humor site faces grave danger of degenerating into a cesspit of horrible racism :(

I mean though, that's the point, if all people want to talk about all day long is friend of the family this and... I dunno whatever. Then that's what they'll talk about until a bunch of people who don't want to talk about that show up.

Then they could all war with each other like a huge Internet poo poo pile of the highest stinky magnitude.

That's funny no, no real rules but temporary rules that could be instated at any time by anyone about anything?

Nolgthorn fucked around with this message at 01:20 on May 9, 2008

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense

Alex007 posted:

I'm coding a web-based MMO forthe Urban Dead goons who are sick of Urban Dead :)

I really wanted to clean up the UI, Urban Dead sucks balls on this, there's a dozen forms on-screen and you always have to search when you want to do something.

I decided to go a bit Web 2.0-style and I'm using javascript popup menus. Plyaers can interact with their environment by clicking on elements showing a drop-down arrow, and a menu pops up.

I'm not sure how standard it is, but it makes a really clean UI and is really easy to use, compared to UD.

Actually I find your interface harder to discern places that I can click on stuff, as well as having to search for which thing that I should click on to do something. Additionally UD is currently using a better font than you are which is easier to read.

I suggest you get a small test audience to try it out and give you a more detailed review of the progress.

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense
It's a bit strange the writing on the chalkboard has a drop shadow, I like it though.

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense


I've built a thing that generates email addresses. You name the site, click ok, and it gives you an email address to use. I've blurred out a bunch of stuff because I'm actually using it, it's really great. I recommend it along with bitwarden.

Now every site I use has a different password and a different email address.

It was difficult to get everything working with html emails and file attachments but it does work. The api is all based on websockets, so I always receive live notifications of new messages. I built it as a notification service first and foremost. You can register an app with it, then instead of asking a user for their email address ask them to click a link that gives them the option to allow incoming messages from your app.

Then you don't have to use email. You can pipe messages directly to them.

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense
Now that you say that I could have built it as a forwarding service... oh well!



It's a full blown email reader. You cannot reply, although if you click the email address it was sent from (reply-to if available) in the header, it uses that `mailto:` and auto-adds the subject and everything in there so that you can use your real email to send a message if you want. I've never had to. Nearly everything that has ever shown up in my email inbox ever for my entire life I've never needed to reply to it.

With this system in place it's very easy to tell who's selling your email address, and stop all emails from any source entirely.

It also has a mail throttling system. So for any source you can set how often you want to be notified by email that there are new messages, anywhere from immediately to never. Then you receive sort of a collated bunch of previews of the messages all at once.

So now my real email I can use for actual email purposes again, and as often as I've told it to my application sends me a single email.

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense
The email addresses it generates are two sets of 8 characters separated by a dot. One set is a hashed primary key indicating the account it belongs to and the other is a randomly generated key for the account. I figure that's sufficiently complex to prevent spamming millions of messages to my domain, I'd also block any sources that hit too many addresses that don't exist.

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense

Keetron posted:

What tld do you use for this? Your own or some free provider? Also, how do you instruct that domain to capture all those email addresses?

MX record in the DNS configuration. Currently I have three parts, the front end which is a single page Vue application, the API which is a Websockets server, and a separate service which parses incoming email and transforms them for consumption by the API.

The mail reader uses the public API for delivering messages to users however I cheated a bit. I'm sure other people's applications wouldn't have access to account data. I look up the account I want to deliver to based on the "to:" address field.

All accounts automatically allow messages from the super-privledged mail service.

That just sort of "does everything" from there. I don't wanna release the tld because it's an alpha and I'm worried about getting sued for god knows what. The internet isn't the wild west anymore. While I have it set up to recover gracefully from downtime, I'm sure something will go wrong and messages will get lost somehow eventually or someone will use it to store a copy of Black Panther. Public makes me uncomfortable. However if you wanna mess around with it and promise to give me feedback please send me a PM.

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense
In my experience nah they aren't. But I still like my solution better though.

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense
I kno I'm only joking.

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense
Email address RFC 5322 official standard:

(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])

Most people just use:

(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$)

I remember reading once a guy had a working address that was something like `a@a` though I can't remember what I read about it. Someone else was talking about how their email address was completely unusable on any form. I doubt even all email providers adhere to the full spec.

quote:

Note that characters after a plus sign + are generally[citation needed] ignored, so fred+bah@domain and fred+foo@domain will end up in the same inbox as fred@domain This can be useful for tagging emails for sorting, see below. The minus sign - is also used in that fashion, although less often.

What does it mean about the minus sign at the end of that sentence? It also says both + and - are valid characters to use... I'm sure I've seen email addresses where the person's name is hyphenated, does this mean their real address is just their first name?

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense
Ooh here's how W3C treats emails in email inputs:

/^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense
My preferred approach is to build an api that hands out account ids to apps and the apps send messages to account ids and the account ids have to approve the apps. But assuming people want to switch to a emailess email reader, or that app administrators don't want to collect email addresses is my folly.

pokeyman posted:

My favourite is \S@\S (no anchors). If you can match that we’ll send an email.

I used /^[^\s@]+@[^\s@]+\.[^\s@]+$/

People going no-tld are playing with fire.

Nolgthorn fucked around with this message at 13:44 on Feb 23, 2018

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense

Munkeymon posted:

Oh hey there you go Nolgthorn - you should add OAuth so you can hand out junk addresses there, too!

The workflow is similar.

While signing up somewhere you click on a link with an appId in it and it takes you to my thing, where you have to be logged in. Then it asks if you wanna receive messages from the app owner, if you click yes it adds an account to your sidebar and redirects you back to the app webpage with the new accountId in it. Then on their end they can start piping you messages.

But part of the purpose of it, were anyone to ever use it and I am not sure anyone will other than me, is that I don't want any apps being linked to my google account, or twitter, or whatever. I don't want them having my email address but I also don't want them having my name, my contacts, on and on.

So my thing just gives them an id that's it. :downs:

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense
I haven't considered it before but I imagine building an algorithm which correctly stages orbits for planets to follow is hard. Therefore are those orbits predetermined instead? They seem a bit round when I would expect something more ovalish to my untrained eye.

Can the planets disrupt one another?

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense

Kilson posted:

The biggest technical challenge is tracking rotation correctly. Phone hardware just isn't great at this. Generally, the magnetometer is used to correct gyroscopic drift, but we can't use that because a bunch of the tour stops are on top of giant metal towers that completely screw up the compass readings. So we mostly just track raw gyroscopic rotation, and try to do minor compensation for drift as best we can. There are solutions that use the camera to help, by analyzing the image to help track rotation, but I'm pretty concerned about battery life when doing something like that. Also, I just haven't had time to even try implementing something different there.

I thought by now phones would just have a simple API layer for this type of thing. Now that I think about it, half the time I look at my phone the compass is pointing the wrong direction.

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense

Volguus posted:

A small directory/drive usage application that i've been working on for the last few days. The lockdown has been ... not kind for my sanity.

Hey, you made it pretty. :allears:

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense
I've been working on a computer game for what feels like a year. I've gotten myself trapped learning how to make and animate a character model to any degree of comprehensibility. I've been stuck at this stage for a little while, and I have this just sitting on the back burner waiting for me to work on it again.

It's got a whole building system with blueprints, character ai, stuff like that.





Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense
It's a bit like cheating because far less than being a really cool thing, it's more like practically a working product. Over the last year or so I've been building this Vue app that works like a poor man's single sign on. Instead of giving all of your social media data to whatever company were to implement it, it instead gives them nothing but a uuid.

Since I figured no business would ever implement such a sensible thing. I tacked on the ability to generate email addresses that you can plug into their signup form.



Then it works the same way, essentially, as long as you have a password manager because these addresses ("6f3meitj.o53u1qx5 @ getinbox.io") for example are impossible to remember. But if it were implemented as a single sign-on solution, it would just perform a redirect and authorise a session the same as all the rest of them.

https://www.getinbox.io

It's also a notification system. So if your site were to implement it, you could send email-like messages to users without having to deal with email just websockets instead.

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense
Neat, I've never thought about how to calculate Easter before.

Adbot
ADBOT LOVES YOU

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense
It's simple
code:
        private static void CalculateEaster(int y)
        {
           
            int a = y % 19;
            int b = y / 100;
            int c = y % 100;
            int d = b / 4;
            int e = b % 4;
            int g = (8 * b + 13) / 25;
            int h = (19 * a + b - d - g + 15) % 30;
            int j = c / 4;
            int k = c % 4;
            int m = (a + 11 * h) / 319;
            int r = (2 * e + 2 * j - k - h + m + 32) % 7;
            int n = (h - m + r + 90) / 25;
            int p = (h - m + r + n + 19) % 32;
            easter_month = n;
            easter_day = p;
        }

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply