collapse collapse

* Who's Online

  • Dot Guests: 70
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Board Stats

  • stats Total Members: 88
  • stats Total Posts: 11163
  • stats Total Topics: 1699
  • stats Total Categories: 4
  • stats Total Boards: 76
  • stats Most Online: 248

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Nathan

Pages: [1] 2 3 4 5 6 ... 46
1
Projects / Re: srchub - free source code hosting
« on: December 14, 2015, 11:37:02 PM »
Import/conversion is always tricky. Here is where it falls apart - every source data system will be different. Google Code, github, bitbucket, gitlab etc - I could probably spend the next couple of years writing conversion programs to go from that data to srchub - and probably a total of 1.5 people would use it (.5 would be the one person who would use it and decide he didn't want to use srchub).

If I did write a backend process where as if you upload this CSV in this format then I will populate the srchub project - this presents similar problems that the above had. First off - how do I attribute users (for example in FAQs, wiki posts, release uploads etc) that aren't registered users? Call them conversion? Anonymous? This also has the downside of requiring the user to convert their data into this special CSV format. Which is fine for the most part - but it is almost guaranteed that the user will need hand holding when importing their data. Also no one has really inquired about importing of data so I assume that everyone is happy on github.

It's something I want to architect right the first time. And in order to do that I need feedback from people who want to leave their current systems to either the hosted or self-hosted srchub.

As far as export - I wanted the export to allow users to feel like it wasn't a vendor lock in and holding their data hostage. Pretty much the opposite of to Google Code, github and gitlab. As you may know from Google Code - shortly after they announced the shutdown they added the feature to export to github - but they didn't have that before and for years before the close you could tell that Google management didn't care at all about Google Code.

Unfortunately I am the only developer on the project and I'm constantly juggling other projects. Though srchub has come along way from when I first "adopted" it. A little over 2 years and 90 commits. Honestly when I first started to use it my expectation was that within a couple of months I would have to spin up a gitlab instance requiring GBs of RAM for each project. srchub has almost 200 projects and is only actively using 170MB of RAM.

2
News / Updates
« on: October 30, 2015, 08:27:36 PM »
As of yesterday celestialcoding.com has been renewed for another year \o/

I have also added a new (hidden) bbcode to make posting easier. I personally think bbcode sucks. Markdown isn't perfect  - but it's still better and easier/more natural to use.

To use markdown just use the md bbcode:

Code: [Select]
[md] text [/md]

Example:

An h1 header

Paragraphs are separated by a blank line.

2nd paragraph. Italic, bold, and monospace. Itemized listslook like:

  • this one
  • that one
  • the other one

Note that --- not considering the asterisk --- the actual textcontent starts at 4-columns in.

 

Block quotes are  written like so.

   

They can span multiple paragraphs,  if you like.

Use 3 dashes for an em-dash. Use 2 dashes for ranges (ex., "it's allin chapters 12--14"). Three dots ... will be converted to an ellipsis.Unicode is supported. ☺

An h2 header

Here's a numbered list:

  1. first item
  2. second item
  3. third item


Code: [Select]
[md]An h1 header
============

Paragraphs are separated by a blank line.

2nd paragraph. *Italic*, **bold**, and `monospace`. Itemized lists
look like:

  * this one
  * that one
  * the other one

Note that --- not considering the asterisk --- the actual text
content starts at 4-columns in.

> Block quotes are
> written like so.
>
> They can span multiple paragraphs,
> if you like.

Use 3 dashes for an em-dash. Use 2 dashes for ranges (ex., "it's all
in chapters 12--14"). Three dots ... will be converted to an ellipsis.
Unicode is supported. ☺



An h2 header
------------

Here's a numbered list:

 1. first item
 2. second item
 3. third item[/md]

3
Tutorial Support / Re: Client-Server Messaging
« on: October 25, 2015, 05:48:57 PM »

Thank you for not using the boost framework. It's overly bloated and wayyyy over the top with namespace usage and complexity. I know many would disagree - but I personally find it easier to read and understand the low level code like this than examples using boost.

You can take a look at the examples I wrote for my Operating Systems class - where I use threads on Windows and Linux:

https://srchub.org/p/os-70-350/source/tree/master/

Or you should also take a look at the ptypes library which has easy to use cross-platform threading and networking.

https://srchub.org/p/ptypes/

Using networking in ptypes is so simple:



Code: C++
  1. #include <pinet.h>
  2.  
  3. USING_PTYPES
  4.  
  5. int main()
  6. {
  7.     ipstream client("www.yahoo.com", 80);
  8.  
  9.     try
  10.     {
  11.         client.open();
  12.  
  13.         // send a valid HTTP/1.1 request
  14.         client.put("GET / HTTP/1.1\r\n"
  15.             "Accept: * /*\r\n"
  16.             "User-Agent: TestAgent/1.0\r\n"
  17.             "Host: www.yahoo.com\r\n"
  18.             "Connection: close\r\n\r\n");
  19.         client.flush();
  20.  
  21.         // receive the response and print it line by line
  22.         while (!client.get_eof())
  23.             pout.putline(client.line());
  24.  
  25.         client.close();
  26.     }
  27.     catch(estream* e)
  28.     {
  29.         perr.putf("Error: %s\n", pconst(e->get_message()));
  30.         delete e;
  31.     }
  32.  
  33.     return 0;
  34. }

Documentation: https://srchub.org/ptypes/inet.examples.html

It also has support for things like mutexes, semaphores, variants, and I recently added support for JSON.

Shameless plug: Feel free to signup for an account/repo on srchub and push your code there. Public and private repositories are free. :)


4
Projects / Re: srchub - free source code hosting
« on: October 23, 2015, 11:27:24 PM »

I usually don't bring up old threads but I do want to post some updates.

  • OTP has been integrated
  • Exporting a project has been implemented

The service has been moved to gandi's infrastructure so now I can support largish files but srchub also supports the ability to link files offsite


5
Tutorial Support / Re: My First Program
« on: March 16, 2015, 09:13:00 PM »
Quote
system(anything) uses more resources then just getting it done more pure

Sure - but also keep in mind system("pause") won't work on Mac OS and Linux.

Code: [Select]
@mysql01:~$ pause
bash: pause: command not found

6
Tutorial Support / Re: A PHP Solution
« on: March 01, 2015, 08:47:26 AM »
Well...

This is a topic that is always argued but first off I would recommend using htaccess/IIS to have a basic auth prompt - if it's not using SSL it will be in clear text but it will prevent random people from accessing it.

The options have no value so this as is wouldn't work. And if you are thinking what I think you are thinking - you should set the value options to the subdirectory and do a rrmdir on C:\sg\darkrp\garrysmod\\ + $_POST['file']. Also to check to make sure they aren't trying to traverse through the filesystem you could use http://php.net/manual/en/function.realpath.php to check if $_POST["file"] == realpath($_POST['file']). If it's not equal then you know that they included some ../ or ./ in the filename.

7
Tutorial Support / Re: My First Program
« on: February 18, 2015, 10:31:08 PM »
I think we should have a support section - but I'll let Justin (Celestialkey) figure that out.

A couple of things:

- Many people argue global variables are bad form ie:

Code: C++
  1. vector<string> data;

- Shelling out to a system command with system is usually frowned upon because it's platform dependent (arguably there are a lot worse C++ code that you will probably write that will be platform dependent) ie

Code: C++
  1. system("PAUSE");

Check out these links for alternatives:

http://www.cplusplus.com/forum/beginner/106769/
http://www.cplusplus.com/forum/beginner/105772/

You can also replace system("cls") with a number of newlines (as that is what it really does).

- Since C++11 they have introduced the auto keyword - I am a huge detractor but using that keyword is all the rage so this:

Code: C++
  1. for( vector<string>::const_iterator i = data.begin(); i != data.end(); i++)

becomes

Code: C++
  1. for( auto i = data.begin(); i != data.end(); i++)

- Be sure to include <string> - some compilers don't include that by default and will cause compilation errors

- A lot of amateur C++ developers argue against using a global using namespace and insist on fully qualifying it or use it in a smaller scope. Doing this will prevent name/namespace collision - which is pretty rare if you are sticking to STL and standard library.

8
Misc / Re: CelestialCoding Redesign
« on: January 11, 2015, 12:43:59 AM »
I really think we should get a CMS module that makes it more like a website rather than a forum. I kind of like DreamPortal:

http://custom.simplemachines.org/mods/index.php?mod=2763

Also we should take a look at new themes or mods that would fit this forum. I feel like the more things to do and better appearance will drive more people to come and sign up.

Edit: We also need to clean up the spam accounts.

9
Projects / Re: srchub - free source code hosting
« on: December 21, 2014, 05:06:19 PM »
I suppose it's time to bump this topic with updates:

srchub has come a long way since I first "adopted" it. Some of my promises have been fulfilled such as TOTP for login, svn and mercurial authentication (I think I'm the first person to do such a thing), and project exporting (it exports to JSON format - no import yet).

3. is not true anymore - I'm using urbackup now and it's working great. I think backuppc is a great product but it's issue that rather than storing backup metadata in a database - it relies on a listing of files to show available backups. If you have a lot of backups (>1000 folders in same folder) for a specific host this doesn't scale well on a default configured file system. If the disks are local - there are tweaks you can do to the file system to help with this but this appears to be a known issue on many file systems. Unfortunately, my backup mount was a NFS mount so I didn't have the ability to do much. urbackup leverages a database for metadata so it's very fast.

srchub currently has over 100 projects hosted - and hopefully to adopt many more.

I have switched to git for my SCM and finally added it to github - https://github.com/nadams810/srchub

For #4 - please keep in mind that google code appears to be abandoned judging from the spam issues that are getting submitted. The writing was already on the wall when they dropped download releases. So if you don't trust my service but trust google - keep in mind that at any time Google may announce that they will shut down or limit google code even more. As long as I am a developer - srchub isn't going anywhere.

One feature that I would like is to be able to host large projects (like Linux distros or Android ROMs) - but I would need to integrate Amazon S3 support first. I don't have the bandwidth to serve 700MB+ files.

10
Project Advertisment / Re: Axios RPG
« on: December 17, 2014, 08:09:44 PM »
That game looks interesting - kind of has an Alien Legacy theme to it (which was also a great game).


11
Project Advertisment / Re: Axios RPG
« on: December 15, 2014, 09:54:27 AM »
Looks similar to Tibia's ico 2d view. Do you intend to use scrolling for the landscape in similar fashion to mario or just flip the page like old school Pokemon does? It looks pretty nice, I've been distracted playing Dungeon Defenders 2. About time I get back to work on my project as well.

I am planning on having scrolling - I did some memory tests and that alone only took about 90MB of RAM so I should have plenty of room to make larger maps. For entering towns/houses I plan on "flipping" the page - which really makes sense as I'm displaying an entirely different map.

12
Updates / Added youtube bbcode
« on: December 14, 2014, 11:35:24 PM »
I have added youtube bbcode - the button itself doesn't seem to currently work but to use it just wrap it in youtube tags - ie:

Code: [Select]
[youtube][/youtube]
You can read about the mod here:

http://custom.simplemachines.org/mods/index.php?mod=3982


13
Project Advertisment / Axios RPG
« on: December 14, 2014, 11:32:13 PM »
Ever since I started Axios Engine I wanted to create my own RPG game. The specific nature of the RPG is up in the air - but I have been working on the engine before the story. Whatever the story is - it will be amazing.

The time has come to show some clips:

Here is the original video:



Then I added dialog and door support/map switching recently:



Most recently I have implemented basic AI for the NPCs:



I will keep this thread up to date on progress and any releases. Stay tuned! There is still a lot of work to be done in it - but it will be open source when it is completed.

I am looking for help with the following:
  • C#/XNA
  • Art
  • Music

14
General / Re: Mac addresses
« on: October 25, 2014, 06:08:43 PM »
Having duplicate MAC addresses on the same network will cause flapping or other weird networking issues. Assuming the other guy left the wireless - this would work.

http://serverfault.com/questions/462178/duplicate-mac-address-on-the-same-lan-possible

You would be better off with other tricks like IP over DNS:

http://code.kryo.se/iodine/

15
Project Advertisment / FTP honeypot in C++
« on: April 27, 2014, 08:43:43 PM »
Hey all I noticed that people were trying to access my FTP service and instead of just turning up logging I decided to write a quick FTP honeypot (turning up logging won't tell me about any files they are wanting to upload or download - as I'm not granting them access).

I call it ftphoney - you can grab a copy for Windows/Linux (Debian) here https://srchub.org/p/ftphoney/

The basic idea is that it accepts any commands and will do nothing in return (sort of like a bit bucket). It does utilize threads (real threads - not fake Python threads ;) ). My personal interest is seeing the password as well as any files they request.

Right now it doesn't implement ACTIVE or PASV protocols but they should be fairly trivial to put in (so they won't see directory listings). What I would like to do is present a root file system along with fake files and see what they do.

If you want to test it out - point your FTP client to datanethost.net on port 21.

16
General Talk / Happy Egg Collecting Day
« on: April 20, 2014, 03:17:37 PM »
Happy Egg Collecting Day!!!

17
C++ / Re: Re: Challenge: Celestialkey's Submission
« on: April 13, 2014, 10:56:44 PM »
You will find no disagreement from me that avoiding the usage of global variables leads to better design in favor of using classes or even structs. This has been proven, there is no argument here. Not using "using namespace" in headers - as well there are enough solid reasons not to do that.

However, I have seen cases where using global variables makes development easier. I don't know if you use or have used Python/Django but it really does encourage, in my opinion at least, bad programming styles (now PHP is the equivalent of putting a loaded gun in your hands, Django in my mind tells you to look down the barrel). I even tried to ask how to introduce more sane site development using classes and was basically shot down because I was trying to introduce my own functionality into the framework (wait, what?). In any case, Django is really function based so a large site becomes a tangled mess and lots of grepping - but one thing I have noticed from one developer is that in order to avoid global variables is to pass a variable to every function. If I was writing the same thing I would have just stuck with a global variable - simply because it would be easier to use throughout the code as Django is already a mess I would rather not make it even harder. In C I might still, but in C++ I would just make it a class member (well maybe in C I would use a struct with function pointers that have a parameter as the variable inside of the struct - it's really the same thing except that it's self contained rather than a "global" variable).

I did stick with my implementation and if I wanted a "global" variable type all I did was add it as a variable in the class. And since the controllers inherit from a base class it just made sense.

(Aside comment: Django is also written by the same people who think that they shouldn't provide support for Unixtime stamps)

I honestly think that part of the problem is the sheer size of the language - C++ has become this ginormous monolithic beast that whenever someone posts some code the immediate reaction is that the code must be perfect. The question is what is perfect? C++ textbook style? MFC style? Qt style? If the textbook styles/Stroustrup is right - then why are frameworks that abuse the standard styles like Qt so popular? Surely, if that style was so bad people would refuse to use their product no?

We saw this ideology with the Debian random number bug. They commented out code simply because a tool told them it was bad.

You know I actually smiled a little bit when you mentioned STL - this is yet another never ending argument with C++ opinions - is it the C++ standard library or STL? I know what you meant, the problem is that others get so hung up on little insignificant things like this.

Quote from: 0xDEAD10CC
Surely the worst thing would be to have someone look at a snippet of code and think it's gold when really it's a bunch of copper (for lack of a better analogy)?

Hahaha - I call these people stackoverflow coders. Simply because their programming ability extends to be able to only copy/paste snippets of code from stackoverflow. The worst part is I do use stackoverflow from time to time (ignoring the fact that stackoverflow uses a confusing license for the posted code) and some of the code I've seen is sometimes subpar.

Quote from: 0xDEAD10CC
Once in a while, be open-minded and look at the purpose behind my post before judging me as a member through the tone derived from the context my words are put in. :)

For me it's not just you personally - it's just I've read stuff like this over and over and over again that in my mind I've developed this bias/predisposition toward other C++ developers. And it's not just C++ developers - I also have this bias toward Django developers as well for the same reasons.

Now, I don't claim to be a C++ expert but I just grow tired of reading all the bashing and fallacious arguments, know what I mean? Perhaps I'm just not thick skinned enough - but personally I would rather read something that's like "hey, I like what you did but I think doing this would be better" rather than "This really does suck wow.". To be honest if someone I just meet talked to me like that - I would be put off a little bit. The problem being is that text can't deliver emotion so it's hard to tell if it's like a "friendly" criticism or just someone trying to be a jerk/troll. I'm not saying that's you - I'm just saying from what I've read. My two cents.

18
C++ / Re: Re: Challenge: Celestialkey's Submission
« on: April 13, 2014, 12:31:27 PM »

Another thing, with C++ you hardly should ever be required to use global variables:

Code: [Select]
CFileSystem f;

char* file;

I believe this to be one of those things that people say in a classroom but people who develop real projects don't follow (like using smart pointers).

Examples:
Valve SDK: https://github.com/ValveSoftware/source-sdk-2013/blob/master/sp/src/public/disp_powerinfo.cpp
Doom 3: https://github.com/TTimo/doom3.gpl/blob/master/neo/game/Game_local.cpp and https://github.com/TTimo/doom3.gpl/blob/master/neo/game/Pvs.cpp

(There are some who think Doom 3 sucks, however, critics disagree and the simple fact they sold over 3.5 million copies says something about if people liked the game...but I digress).

If you think they are bad programmers - feel free to phone John Carmack or Gabe Newell and tell them how bad of a programmer you think they are. Granted, people like John Carmack have had tons more experience than most people, however it really boils down a programming style as I'm sure they have been programming like that since they started. Or perhaps it was their respective teams, however, I'm sure they have code reviews and if someone really disagreed with that practice it wouldn't have made production code.

Everyone has their own style, wither it's right or wrong is debatable but I think this is the wrong time/place to do that. However, I think this reddit comment proves that point. Pointing out functional problems (such as issues where the code would never compile) in code sure, not style problems. We could go back and forth on what's right and wrong in fact I have read pages and pages on google groups about people discussing STL style (I believe it was on shared_ptr usage and implementation). Just remember there will always be people out there who are making 2-3 times as much as you ever will writing worse code.

Here is an example: I believe the auto keyword was a horrible addition to the C++ language - however - enough people on the C++ teams thought otherwise. One of the developers of Java thinks the same way that I do and rejected an auto keyword into the Java language. In my opinion I think people shouldn't use it - but it's like the goto keyword, there is nothing wrong in using or not using it. Granted the use of the goto keyword use in C++ is usually not needed but that doesn't mean it's a deprecated feature or an unsupported feature. If it works - great, however, I think there is a good quote that shows up on celestialcoding that goes something like this "Always code as if the person who will maintain your code is a maniac serial killer that knows where you live".

I also think that the use of third party libraries/headers is almost cheating, especially since this wasn't specified within the guidelines in the first post as to whether or not they could be used. Otherwise, perhaps helper libraries can be used (BOOST?), and there must be in place, some form of limitations as to what kinds of libraries you can use, based on what they do.

I'm not seeing third party libraries really? The only one that isn't natively on Windows is dirent.h and you can grab a copy for Windows here: http://www.softagalleria.net/dirent.php (looks like MIT style license even). dirent.h is part of the POSIX standard so it's not Celestialkey's fault if Microsoft decided not to port that.

This challenge is really as trivial as understanding how to write a table of contents (to the header metadata of the output file) and the file binary data in the structure specified within that structure header to a single file... Separators if naive, but this would be less efficient IMO.

After teaching a class - you make think it's trivial but there are many people out there who would struggle with this. There are people who spend 9+ hours on a programming assignment. I know students who worked several hours on a Java threading assignment even though most of the sample code was given to them and they just had to add about 4 lines of code to get it working.

(I have actually seen people on reddit say that they should change majors if they are struggling that bad. Just because you struggle with programming doesn't mean you can't be an awesome network guy, or Windows/Linux admin, or exchange admin, or....again I digress).

Edit: Celestialkey - perhaps you should cut these posts out into their own thread so they don't clutter this original thread?

19
Beta Releases / Re: C++'s Random Song.
« on: April 07, 2014, 11:01:41 PM »
The disassembly seems to disagree with the source.

20
C# / Re: Split Paragraphs into Sentences
« on: April 06, 2014, 09:35:27 PM »
Like I just said, C# doesn't use pointers so you don't use the new keyword.

What?  :o C# does have pointers if unsafe context is specified. You DO however, use the new keyword to create arrays.

I suppose I do need to take that back - I just read an article on them the other day. Very interesting - especially considering they provide no smart pointer constructs (at least none I could see). However, by Microsoft's own accord you should not use them but rather pass things as references.

21
Project Advertisment / Re: New Age OpenGL Engine/Game
« on: April 05, 2014, 07:02:43 PM »
Awesome - I can wait to see the structure of the library. If you don't already have a repo you should sign up at srchub and request a private git repo :). You can flip it to public when you are ready to release.

You should check out my ptypes fork for things like crossplatform threading, networking, and JSON (even an intelligent variant type!). I also have sample code for crossplatform AES.

22
C# / Re: Project
« on: March 27, 2014, 11:07:02 PM »
What if instead of using a server model, it used a p2p model? The host would 'lend' their compiler to other users and the results would be compiled on their machine and sent back? I can't see a server doing this as a good idea since you would run into dependency errors. Not to mention the fact that the program would by default be compiled for that local system architecture. If it is a teaching tool, there would be a teacher hosting the source, or so I'd assume. What do you think?

The dependency issue would be solved by allowing people to upload a zip or multiple zip files of libraries. Either headers, so, DLLs ect. This is exactly what jsfiddle - http://jsfiddle.net/ does - if you click on external resources you can include external javascript or CSS. Again though this does open up more issues and would probably require an approval system.

I think it would be cool to spawn a pip of C++ - so like for example:

(pip plus plus)

Code: [Select]
ppp install irrlicht
It would pull down all the libraries for irrlicht - either precompiled or just the source to be compiled. It would then contain a compile script such that:

Code: [Select]
./compile project
And project would contain the source files and compile is a script that would automatically invoke g++/gcc with the proper parameters telling the compiler where to find the libraries.

(In case you didn't know what pip was - it's a package manager for Python applications that are uploaded to https://pypi.python.org/pypi . You can say do a pip install project and it will automatically install that package and any dependencies)

23
C# / Re: Project
« on: March 26, 2014, 12:31:22 AM »
* One that I REALLY WANT is a clone of codepad. I would like collaborative editing but compiling/running would be awesome. It's not a hard idea - but there are few caveats such as restricting internet access (don't want random people to build a malware application to attack or listen on a port - I think a short timeout period for anonymous, longer but still short for registered and longer for paid people), running it in a sandbox such that it can't access any files on the system except in the directory that was created to run it (which would also allow for registered users to upload libraries). Anyone attempting to exploit the system would be automatically banned.

Isn't this the same as the CCTC thing I built a while back. Basically multiplayer notepad, right? I remember the developement went smoothly until for some reason my ISP derped my connection and I couldn't test/debug it anymore.

This would be way different. This isn't just storing a copy of the code like a gist but rather compiling it, running it, and showing the output. These tools are great for showing examples/explaining things - especially if the user can "fork" an example and modify it. I think it would be extraordinary if for an OpenGL example - run it, and run some commands with it (such as press and hold w key for 5 seconds) record it and show it to the user. I think something like this would have to be queued but I think it could provide an amazing new experience to people. I write something simple - then you fork it add some stuff - then I fork it etc etc.

So... compile locally, upload feedback to remote users from local machine? Due explain, sounds interesting.

Please elaborate in a bit more detail how you think something like this will work. I'm getting pretty interested in this project idea.

The compilation would happen server side. The only thing the user uploads is code. Like jsfiddle.com, codepad.org etc.
So lets say for example you have an OpenGL example. You would upload the cpp file, it compiles it server side and perhaps even records a video/screenshot of it automatically. It would then generate a link that you can give to other people and they can copy the code to their program or fork it from the site (github style) make their own modifications and recompile/record and have another unique link for their example. I think this would be amazing - especially considering I can spit out Windows exes from Linux using mingw (not optimal - but it would work until we get a Windows build server online running Visual Studio). Click here to download source + binaries for this sample code/whole program.

The problem comes in is in theory someone could upload malicious code. Simple port scan or even a root level exploit. It's almost like such a service would need a hierarchy of approvals - it would be almost impossible to create an automatic silver bullet that would recognize malicious code.

24
C# / Re: Project
« on: March 18, 2014, 07:59:07 PM »
* One that I REALLY WANT is a clone of codepad. I would like collaborative editing but compiling/running would be awesome. It's not a hard idea - but there are few caveats such as restricting internet access (don't want random people to build a malware application to attack or listen on a port - I think a short timeout period for anonymous, longer but still short for registered and longer for paid people), running it in a sandbox such that it can't access any files on the system except in the directory that was created to run it (which would also allow for registered users to upload libraries). Anyone attempting to exploit the system would be automatically banned.

Isn't this the same as the CCTC thing I built a while back. Basically multiplayer notepad, right? I remember the developement went smoothly until for some reason my ISP derped my connection and I couldn't test/debug it anymore.

This would be way different. This isn't just storing a copy of the code like a gist but rather compiling it, running it, and showing the output. These tools are great for showing examples/explaining things - especially if the user can "fork" an example and modify it. I think it would be extraordinary if for an OpenGL example - run it, and run some commands with it (such as press and hold w key for 5 seconds) record it and show it to the user. I think something like this would have to be queued but I think it could provide an amazing new experience to people. I write something simple - then you fork it add some stuff - then I fork it etc etc.

25
Beta Releases / Re: Random Number Generator
« on: March 16, 2014, 01:09:07 AM »
True, but isn't this the basis for most modern random number generators? I've seen quite a few random number algorithms and the most proficient is table based.  Granted its usually a much larger table.



I always thought they were based on an algorithm:

http://en.wikipedia.org/wiki/Mersenne_twister
http://computer.howstuffworks.com/question697.htm
http://stackoverflow.com/questions/6275593/how-to-write-you-own-random-number-algorithm
http://mathoverflow.net/questions/29494/pseudo-random-number-generation-algorithms

But I do suppose they need a value or set of values to start with. Just like how MD5 has a lookup table - http://en.wikipedia.org/wiki/MD5

26
C# / Re: Project
« on: March 15, 2014, 06:03:21 PM »
Applications, My struggle with games is the lack of any artistic skill at all. I get tired of looking at ugly games really fast :/

Make something similar to WinRAR or WinZIP. Create a program that can combine multiple files into one and still preserve the data of each file inside it. It's a fun little project I did in the past for my game.

I believe this was done in either Quake 3, Duke Nukem 3D or Ken's Labyrinth. In any case - it is a pretty clever way to keep out the random people.

Applications, My struggle with games is the lack of any artistic skill at all. I get tired of looking at ugly games really fast :/

Here are some ideas:

* A script monitor type application - the idea is that automated scripts report to this central interface and can report on if a script hasn't ran or it was a failed run
* One that I REALLY WANT is a clone of codepad. I would like collaborative editing but compiling/running would be awesome. It's not a hard idea - but there are few caveats such as restricting internet access (don't want random people to build a malware application to attack or listen on a port - I think a short timeout period for anonymous, longer but still short for registered and longer for paid people), running it in a sandbox such that it can't access any files on the system except in the directory that was created to run it (which would also allow for registered users to upload libraries). Anyone attempting to exploit the system would be automatically banned.
*  A C++ garbage collector (I can explain my ideas if you are interested as well as what problems this is trying to solve)

27
Beta Releases / Re: Random Number Generator
« on: March 15, 2014, 05:45:26 PM »
I propose using a unix timestamp for the datetime number:

Code: [Select]
public static int DateTimeToInteger(DateTime time)
{
TimeSpan span = (this.date - new DateTime(1970, 1, 1, 0, 0, 0, 0).ToLocalTime());
    return (int)span.TotalSeconds;
}

Here is a whole class that deals with Unix timestamp in C#:

Code: [Select]
class Unixtime
{
    private DateTime date;
    public Unixtime()
    {
        this.date = DateTime.Now;
    }
    public Unixtime(string date)
    {
        this.date = DateTime.Parse(date);
    }
    public Unixtime(double timestamp)
    {
        DateTime converted = new DateTime(1970, 1, 1, 0, 0, 0, 0);
        DateTime newDateTime = converted.AddSeconds(timestamp);
        this.date = newDateTime.ToLocalTime();
    }
    public DateTime toDateTime()
    {
        return this.date;
    }
    public int toUnixTimestamp()
    {
        TimeSpan span = (this.date - new DateTime(1970, 1, 1, 0, 0, 0, 0).ToLocalTime());
        return (int)span.TotalSeconds;
    }
}

I do want to make a comment - this idea is fine for a game or simple application but don't use it in any sort of cryptography :). The bad guy will know all possible values.

28
C# / Re: Project
« on: March 13, 2014, 08:50:57 PM »
I have many ideas - are you looking for a game or application?

29
Project Advertisment / Re: Math parsing engine
« on: March 13, 2014, 08:49:29 PM »
Couldn't an effective method to complete this is to keep a list of all the calculations being done by the problem and then once your receive your decimal value begin working backwards to display the proper answer?

Simple Example.
sqrt(100 + 2/8);

2/8 = sqrt(100 + .25), division
100.25 = sqrt(100.25), addition
10.01249 = 10.01249, sqrt

now
apply the inverse of the function
and go back to sqrt(100.25)

check that there are no arithmetic functions left in your solution. and finished.  Just tossing ideas in case you wanted to pursue this challenge.
This only works for basic math. Try doing advanced derivatives/anti derivatives like that. It is nearly impossible since there are hundreds of real solutions. For example, finding the antiderivative of
3x^2 = x^3+C

That constant can literally be ANY value. Although this isn't a problem for this simply one, once you start getting into using cosine, sine, tangents and so on, it becomes a huge hassle.

TI-89 has an engine for derivatives/anti derivatives/integrals it's pretty sweet. I believe those engines run off of lookup tables though - I don't believe there is a way to solve them "algorithmically" without a lookup table. See this youtube video: http://www.youtube.com/watch?v=l3Wrq_sVkCU

Obviously, you could create a formula that you couldn't possibly integrate I think that the calculator would just calculate an estimate using one of the algorithms.

30
C / Re: CALL OF THE OCEAN "FORE": Underwater Warfare
« on: February 03, 2014, 10:17:34 PM »
Ahh that makes a lot of sense. Thanks for the heads up, I just assumed it was part of the things we had to do with the strict compiler options. And yeah, we knew about the memory leak but weren't sure where it was. Do you know how we might try and find it?

valgrind would be able to help you. If you are using Linux it should be in your repos.

Pages: [1] 2 3 4 5 6 ... 46

Donate


* Search


* Recent Posts

Image Comparison by Shishka
[May 15, 2017, 01:18:02 PM]


Re: srchub - free source code hosting by Nathan
[December 14, 2015, 11:37:02 PM]


Re: srchub - free source code hosting by Celestialkey
[November 27, 2015, 08:51:42 AM]


Updates by Nathan
[October 30, 2015, 08:27:36 PM]


Re: Client-Server Messaging by Nathan
[October 25, 2015, 05:48:57 PM]