Programming, computers, etc. [Serious]

All things asdf (and anything else)
User avatar
lunar_furor
ASDF Prophet
ASDF Prophet
Posts: 4346
Joined: Wed May 14, 2008 3:34 pm
Location: Most likely at work

Re: Programming, computers, etc. [Serious]

Post by lunar_furor » Tue Jun 09, 2015 6:07 pm

So I got all the things working and I'm posting the game in the games section! It's beta so... yay, also it's a class project from like 2 years ago so it's still WIP with some updates inbound over the next whenever.
Image

User avatar
atomtengeralattjaro
Site Admin
Site Admin
Posts: 35622
Joined: Wed May 23, 2007 3:43 pm
Location: green
Contact:

Re: Programming, computers, etc. [Serious]

Post by atomtengeralattjaro » Sat Dec 19, 2015 9:48 pm

My day in a nutshell:
fracking quaternions, how do they work?
Ivokyuftaf6666 wrote:
Sun Oct 20, 2019 5:22 pm
Awesome Site, Delivering Fun
Image

User avatar
soloman
ASDF-Ville Chief
ASDF-Ville Chief
Posts: 1217
Joined: Wed Nov 14, 2007 8:08 pm
Location: The Great White North, USA
Contact:

Re: Programming, computers, etc. [Serious]

Post by soloman » Sun Jan 10, 2016 11:52 pm

guys make an android app for asdf forums.
Somewhere out there something wonderful is waiting to be discovered.

Powered by Purple

User avatar
Shai'tan
ASDF's Best Friend
ASDF's Best Friend
Posts: 26130
Joined: Fri Sep 14, 2007 12:14 pm
Location: Seven
Contact:

Re: Programming, computers, etc. [Serious]

Post by Shai'tan » Mon Jan 11, 2016 9:55 am

Would be hard and tiresome to do though. There's no official API as far as I'm aware, which means you need to install a plugin, which only philtom can do.
Quote of the Ages:
atomtengeralattjaro wrote:The Forums of ASDF turn, and Pages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Page that gave it birth comes again. On one Page, called the Six Hundred and Ninety Fifth Page by some, a Page yet to come, a Page long past, a post was made by atomtengeralattjaro. The post was not the beginning. There are neither beginnings nor endings to the turning of the Forums of ASDF. But it was a beginning.

User avatar
atomtengeralattjaro
Site Admin
Site Admin
Posts: 35622
Joined: Wed May 23, 2007 3:43 pm
Location: green
Contact:

Re: Programming, computers, etc. [Serious]

Post by atomtengeralattjaro » Mon Jan 11, 2016 11:06 am

There is also a mobile "style" for the forum that the admin can install, as far as I understand it also requires some kind of a plugin to make the server automatically redirect you to the mobile page.
Ivokyuftaf6666 wrote:
Sun Oct 20, 2019 5:22 pm
Awesome Site, Delivering Fun
Image

User avatar
Shai'tan
ASDF's Best Friend
ASDF's Best Friend
Posts: 26130
Joined: Fri Sep 14, 2007 12:14 pm
Location: Seven
Contact:

Re: Programming, computers, etc. [Serious]

Post by Shai'tan » Tue Jan 12, 2016 8:29 am

And philtom doesn't really answer our (my?) mails :shaiface:
Quote of the Ages:
atomtengeralattjaro wrote:The Forums of ASDF turn, and Pages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Page that gave it birth comes again. On one Page, called the Six Hundred and Ninety Fifth Page by some, a Page yet to come, a Page long past, a post was made by atomtengeralattjaro. The post was not the beginning. There are neither beginnings nor endings to the turning of the Forums of ASDF. But it was a beginning.

User avatar
soloman
ASDF-Ville Chief
ASDF-Ville Chief
Posts: 1217
Joined: Wed Nov 14, 2007 8:08 pm
Location: The Great White North, USA
Contact:

Re: Programming, computers, etc. [Serious]

Post by soloman » Thu Jan 14, 2016 5:05 pm

funny. we should track him down.
Somewhere out there something wonderful is waiting to be discovered.

Powered by Purple

User avatar
Uly
ASDF Prophet
ASDF Prophet
Posts: 4056
Joined: Tue Dec 08, 2015 7:40 pm
Location: Jersey

Re: Programming, computers, etc. [Serious]

Post by Uly » Fri Jan 15, 2016 12:58 am

It'll be like an episode of The X-Files
The

User avatar
Anonymously Famous
JKL; Assassin
JKL; Assassin
Posts: 11413
Joined: Thu Mar 03, 2011 6:52 pm
Location: Area ???, under Bermuda Triangle

Re: Programming, computers, etc. [Serious]

Post by Anonymously Famous » Wed Feb 03, 2016 9:31 pm

An admin may be able to have a style selected based on the browser or OS as conveyed by the request sent by the browser. That shouldn't be too hard, at least in theory.
BOTTOM TEXT
ThingerDudes wrote:The only reasonable amount of Nutella is infinity. Everything else is too little.
Proud poster of the 300kth post in General

User avatar
Uly
ASDF Prophet
ASDF Prophet
Posts: 4056
Joined: Tue Dec 08, 2015 7:40 pm
Location: Jersey

Re: Programming, computers, etc. [Serious]

Post by Uly » Thu Feb 04, 2016 1:40 pm

Sounds reasonable to me, but y'know, I'm not an Admin
The

User avatar
Anonymously Famous
JKL; Assassin
JKL; Assassin
Posts: 11413
Joined: Thu Mar 03, 2011 6:52 pm
Location: Area ???, under Bermuda Triangle

Re: Programming, computers, etc. [Serious]

Post by Anonymously Famous » Thu Feb 04, 2016 5:40 pm

I just looked it up. philtom is the only administrator. The other green named people are global moderators. I'm guessing they don't have access to the administration page.
BOTTOM TEXT
ThingerDudes wrote:The only reasonable amount of Nutella is infinity. Everything else is too little.
Proud poster of the 300kth post in General

User avatar
Uly
ASDF Prophet
ASDF Prophet
Posts: 4056
Joined: Tue Dec 08, 2015 7:40 pm
Location: Jersey

Re: Programming, computers, etc. [Serious]

Post by Uly » Thu Feb 04, 2016 6:11 pm

We need to call up Evai to hack the world
The

User avatar
atomtengeralattjaro
Site Admin
Site Admin
Posts: 35622
Joined: Wed May 23, 2007 3:43 pm
Location: green
Contact:

Re: Programming, computers, etc. [Serious]

Post by atomtengeralattjaro » Thu Feb 04, 2016 8:40 pm

Anonymously Famous wrote:I just looked it up. philtom is the only administrator. The other green named people are global moderators. I'm guessing they don't have access to the administration page.
We do have access, but only to some of it. Can't change styles and stuff like that.
Ivokyuftaf6666 wrote:
Sun Oct 20, 2019 5:22 pm
Awesome Site, Delivering Fun
Image

User avatar
Anonymously Famous
JKL; Assassin
JKL; Assassin
Posts: 11413
Joined: Thu Mar 03, 2011 6:52 pm
Location: Area ???, under Bermuda Triangle

Re: Programming, computers, etc. [Serious]

Post by Anonymously Famous » Thu Feb 04, 2016 9:49 pm

atomtengeralattjaro wrote:
Anonymously Famous wrote:I just looked it up. philtom is the only administrator. The other green named people are global moderators. I'm guessing they don't have access to the administration page.
We do have access, but only to some of it. Can't change styles and stuff like that.
Thanks for the clarification.
BOTTOM TEXT
ThingerDudes wrote:The only reasonable amount of Nutella is infinity. Everything else is too little.
Proud poster of the 300kth post in General

User avatar
atomtengeralattjaro
Site Admin
Site Admin
Posts: 35622
Joined: Wed May 23, 2007 3:43 pm
Location: green
Contact:

Re: Programming, computers, etc. [Serious]

Post by atomtengeralattjaro » Fri Feb 05, 2016 9:46 am

On the topic of programming:

I never really needed the Fibonacci sequence, the only times I saw code that calculates it was in the context of explaining recursion and other meta coding stuff like that, so I never really thought about how to actually calculate a fibonacci number in a way that makes sense.

Then I saw this funny post on imgur about different coding styles: http://imgur.com/gallery/XOA5O

And my first thought was yeah, sure, I'd just write

Code: Select all

return x < 3 ? 1 : fibonacci(x - 1) + fibonacci(x - 2);
and be done with it, but that's actually a horrible way to do it.

I wonder what's the best way?
This seems to work perfectly and very fast:

Code: Select all

		public static BigInteger Fibo(int x)
		{
			BigInteger a = 1, b = 0, c = 0;
			for (int i = 1; i <= x; i++)
			{
				c = a + b;
				a = b;
				b = c;
			}
			return c;
		}
(In .NET you need an assembly reference to the System.Numerics library for this to work, otherwise you can't use the BigInteger.)

I compared the results to what Wolfram Alpha gave me and it checks out. Got the 100000th fibonacci number in a little over 600 milliseconds for me (that's a 20899 digit number).
Ivokyuftaf6666 wrote:
Sun Oct 20, 2019 5:22 pm
Awesome Site, Delivering Fun
Image

User avatar
Uly
ASDF Prophet
ASDF Prophet
Posts: 4056
Joined: Tue Dec 08, 2015 7:40 pm
Location: Jersey

Re: Programming, computers, etc. [Serious]

Post by Uly » Fri Feb 05, 2016 1:20 pm

I sent philtom an e-mail
The

User avatar
Anonymously Famous
JKL; Assassin
JKL; Assassin
Posts: 11413
Joined: Thu Mar 03, 2011 6:52 pm
Location: Area ???, under Bermuda Triangle

Re: Programming, computers, etc. [Serious]

Post by Anonymously Famous » Fri Feb 05, 2016 5:27 pm

atomtengeralattjaro wrote:On the topic of programming:

I never really needed the Fibonacci sequence, the only times I saw code that calculates it was in the context of explaining recursion and other meta coding stuff like that, so I never really thought about how to actually calculate a fibonacci number in a way that makes sense.

Then I saw this funny post on imgur about different coding styles: http://imgur.com/gallery/XOA5O

And my first thought was yeah, sure, I'd just write

Code: Select all

return x < 3 ? 1 : fibonacci(x - 1) + fibonacci(x - 2);
and be done with it, but that's actually a horrible way to do it.

I wonder what's the best way?
This seems to work perfectly and very fast:

Code: Select all

		public static BigInteger Fibo(int x)
		{
			BigInteger a = 1, b = 0, c = 0;
			for (int i = 1; i <= x; i++)
			{
				c = a + b;
				a = b;
				b = c;
			}
			return c;
		}
(In .NET you need an assembly reference to the System.Numerics library for this to work, otherwise you can't use the BigInteger.)

I compared the results to what Wolfram Alpha gave me and it checks out. Got the 100000th fibonacci number in a little over 600 milliseconds for me (that's a 20899 digit number).
I've normally seen it as an example of recursion. In Python, it's sometimes used as an example of a generator.
BOTTOM TEXT
ThingerDudes wrote:The only reasonable amount of Nutella is infinity. Everything else is too little.
Proud poster of the 300kth post in General

User avatar
Shai'tan
ASDF's Best Friend
ASDF's Best Friend
Posts: 26130
Joined: Fri Sep 14, 2007 12:14 pm
Location: Seven
Contact:

Re: Programming, computers, etc. [Serious]

Post by Shai'tan » Sat Feb 06, 2016 7:25 pm

atomtengeralattjaro wrote:On the topic of programming:

I never really needed the Fibonacci sequence, the only times I saw code that calculates it was in the context of explaining recursion and other meta coding stuff like that, so I never really thought about how to actually calculate a fibonacci number in a way that makes sense.

Then I saw this funny post on imgur about different coding styles: http://imgur.com/gallery/XOA5O

And my first thought was yeah, sure, I'd just write

Code: Select all

return x < 3 ? 1 : fibonacci(x - 1) + fibonacci(x - 2);
and be done with it, but that's actually a horrible way to do it.

I wonder what's the best way?
This seems to work perfectly and very fast:

Code: Select all

		public static BigInteger Fibo(int x)
		{
			BigInteger a = 1, b = 0, c = 0;
			for (int i = 1; i <= x; i++)
			{
				c = a + b;
				a = b;
				b = c;
			}
			return c;
		}
(In .NET you need an assembly reference to the System.Numerics library for this to work, otherwise you can't use the BigInteger.)

I compared the results to what Wolfram Alpha gave me and it checks out. Got the 100000th fibonacci number in a little over 600 milliseconds for me (that's a 20899 digit number).
Seems like a pretty good way of actually doing it. I can't really think of why you would want to in a real environment though.
Anonymously Famous wrote:I've normally seen it as an example of recursion. In Python, it's sometimes used as an example of a generator.
I know I could probably Google™ this, but can you give an (the?) example?
Quote of the Ages:
atomtengeralattjaro wrote:The Forums of ASDF turn, and Pages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Page that gave it birth comes again. On one Page, called the Six Hundred and Ninety Fifth Page by some, a Page yet to come, a Page long past, a post was made by atomtengeralattjaro. The post was not the beginning. There are neither beginnings nor endings to the turning of the Forums of ASDF. But it was a beginning.

User avatar
Uly
ASDF Prophet
ASDF Prophet
Posts: 4056
Joined: Tue Dec 08, 2015 7:40 pm
Location: Jersey

Re: Programming, computers, etc. [Serious]

Post by Uly » Sun Feb 07, 2016 7:17 pm

He hasn't responded
The

User avatar
Anonymously Famous
JKL; Assassin
JKL; Assassin
Posts: 11413
Joined: Thu Mar 03, 2011 6:52 pm
Location: Area ???, under Bermuda Triangle

Re: Programming, computers, etc. [Serious]

Post by Anonymously Famous » Mon Feb 08, 2016 8:13 pm

No I hadn't, because I had a busy weekend.

Here's a site that has one:
https://technobeans.wordpress.com/2012/ ... in-python/

I might change it some, but that's about it.

Generators create a list-like sequence dynamically. If it has an end condition, you can even create a list (array) by calling the list function on it.
BOTTOM TEXT
ThingerDudes wrote:The only reasonable amount of Nutella is infinity. Everything else is too little.
Proud poster of the 300kth post in General

Post Reply