At 4/1/16 09:08 AM, Sam wrote: I'm good at Linux.
You should definitely totes run this:
sudo rm -rf /
Don't actually run that. You'll regret it.
HO HO HOPE you become a Newgrounds Supporter this year!
We're working hard to give you the best site possible, but we have bills to pay and community support is vital to keep things going and growing. Thank you for considering!
At 4/1/16 09:08 AM, Sam wrote: I'm good at Linux.
You should definitely totes run this:
sudo rm -rf /
Don't actually run that. You'll regret it.
the bash shell is coming for windows
i don't know what this means as i'm just a filthy peasant but it's big news
Slint approves of me! | "This is Newgrounds.com, not Disney.com" - WadeFulp
"Sit look rub panda" - Alan Davies
At 4/1/16 11:30 AM, Gimmick wrote: the bash shell is coming for windows
i don't know what this means as i'm just a filthy peasant but it's big news
It means that, if implemented properly, a lot of Windows users will unintentionally screw themselves.
Programming stuffs (tutorials and extras)
PM me (instead of MintPaw) if you're confuzzled.
thank Skaren for the sig :P
At 4/1/16 11:30 AM, Gimmick wrote: the bash shell is coming for windows
i don't know what this means as i'm just a filthy peasant but it's big news
ConEmu plus MinGW is basically that, anyway (for most stuff you're likely to do).
I also hope you're still not actually using command prompt; if so, you should get ConEmu. (Command prompt is useless garbage.)
At 4/1/16 11:30 AM, Gimmick wrote: the bash shell is coming for windows
i don't know what this means as i'm just a filthy peasant but it's big news
Me too. I don't see myself using the command line more because of this, although it's really cool that they're doing this. I also have no idea why people use the command line in the first place, aside from using PowerShell to mass rename files or updating haxelibs...
or doing python homework
At 4/2/16 02:14 AM, MSGhero wrote: I also have no idea why people use the command line in the first place
Ping something.
Execute Python/Ruby/Perl/JS scripts.
Run CLI programs, such as CLOC.
Flush your DNS.
Compile something with GCC/G++.
SSH into a server.
Quickly partition a disk.
Append something to PATH without having to navigate through a series of windows (or use the crappy UI).
There's plenty of reasons for using a CLI.
At 3/24/16 04:00 PM, Diki wrote: The standard library is pretty robust, especially with C++11. What functions did you have to write to do things that aren't available in the STL?
One thing I verbally said "Really..?" to, was the inability to split a string on a delimiter. I think aside from that, I just felt I was writing more lines of code to achieve things. I suppose that's the nature of lower-level languages.
Personally, I hate function names like "stod". And some of the error messages are cryptic. The C++11 for loops are nice, though.
I still don't understand why I need a header file and a cpp file.
At 4/1/16 11:30 AM, Gimmick wrote: the bash shell is coming for windows
Hopefully they'll fix the max length on paths that's been plaguing Node modules while they're at it!
At 4/3/16 09:06 PM, Sam wrote: Hopefully they'll fix the max length on paths that's been plaguing Node modules while they're at it!
I'm tempted to troll the shit out of anyone who asks for things like that.
"Yeah, just type 'rm -rf C:\' and it'll fix everything for you"
I mean, I wouldn't, but I guarantee that's going to be a new thing that goes around with the release.
There's so many different ways to accidentally hose yourself with bash it's not even funny.
Like I said before, if it's implemented properly we'll see a lot of fucked Windows systems.
Programming stuffs (tutorials and extras)
PM me (instead of MintPaw) if you're confuzzled.
thank Skaren for the sig :P
At 4/3/16 09:52 PM, egg82 wrote: Like I said before, if it's implemented properly we'll see a lot of fucked Windows systems.
I feel like if you're even aware enough to think about considering touching bash on Windows, you know not to run dumbass random code.
At 4/3/16 10:18 PM, MSGhero wrote: I feel like if you're even aware enough to think about considering touching bash on Windows, you know not to run dumbass random code.
If it's integrated, then the common user might me tricked into installing it.
Otherwise, you'd be surprised at how many ways you can screw your system over just using a few basic bash commands (especially since you can use Ubuntu's package management with this)
Just see my above post. Completely hosed my system twice using two different commands. That's just the tip of the "oh fuck, what did I do?" iceberg.
If you're wondering, the "usermod" command hosed me because I removed my account from the sudo group.
Normally if you want to add an existing user you write in: "sudo usermod -a -G group user" which is this:
usermod - command
-a - append
-G - group(s)
group - the group to add
user - the user to add to
I forgot to include the "-a" which, instead of adding my user to an existing group, simply replaced all of my groups (including sudo, which is the only thing allowing me root access since I disabled the root account) with that one.
Two keyboard keys (or lack thereof) hosed my system using purely bash commands.
Programming stuffs (tutorials and extras)
PM me (instead of MintPaw) if you're confuzzled.
thank Skaren for the sig :P
So, I decided I'd lend some of my gbit connection to archive.org and help them back up Google Code.
(you basically download and run a vm, it's pretty simple)
I noticed one of my workers was downloading a large file and discovered someone put a bunch of Prison Break avi and mkv files on gcode.
.. Am I technically pirating these, then?
I'm confused now.
If I get a DMCA from Centurylink I'm gonna throw a fit.
Programming stuffs (tutorials and extras)
PM me (instead of MintPaw) if you're confuzzled.
thank Skaren for the sig :P
At 4/3/16 11:38 PM, egg82 wrote: .. Am I technically pirating these, then?
I'm confused now.
If I get a DMCA from Centurylink I'm gonna throw a fit.
That's kinda hilarious.
At 4/3/16 09:06 PM, Sam wrote: One thing I verbally said "Really..?" to, was the inability to split a string on a delimiter. I think aside from that, I just felt I was writing more lines of code to achieve things. I suppose that's the nature of lower-level languages.
Yeah, it is a bit lame that specific function doesn't exist, but it's still pretty trivial to implement:
void split_string(
std::vector<std::string>& destination,
const std::string& source,
const std::string& delim)
{
if (source.size() < delim.size()) {
destination.push_back(source);
} else {
std::string buffer;
const char* itr = source.c_str();
while (*itr) {
if (memcmp(itr, delim.c_str(), delim.size()) == 0) {
destination.push_back(buffer);
buffer.clear();
std::size_t temp = delim.size();
while (temp-- && *itr++); /* Move itr past current match. */
} else {
buffer += *itr++;
}
}
destination.push_back(buffer);
}
}
And even simpler if you only want to split by a single character:
void split(
const std::string& source,
char delim,
std::vector<std::string>& destination)
{
std::stringstream stream(source);
std::string item;
while (std::getline(stream, item, delim)) {
destination.push_back(item);
}
}
But, for the most part, anything you're likely to do is in the STL.
At 4/3/16 09:06 PM, Sam wrote: And some of the error messages are cryptic.
They can be, especially when working with templates, but that's just what happens with very low-level languages; the compiler can only do so much.
At 4/3/16 09:06 PM, Sam wrote: I still don't understand why I need a header file and a cpp file.
The CPP file gets compiled and the header does not, and the header is necessary for declaring what is in the CPP file so the linker can link them together in your source code. If the header didn't exist, your source code wouldn't have any of the declarations so it wouldn't know what the functions and classes are named or where to call them from.
At 4/4/16 09:28 AM, Diki wrote: Yeah, it is a bit lame that specific function doesn't exist, but it's still pretty trivial to implement:
It being trivial is kind of my argument that it should be in the standard library. Again, it's probably because I'm switching between Python which cradles you with a function for everything and C++ for this project.
At 4/3/16 09:06 PM, Sam wrote: I still don't understand why I need a header file and a cpp file.The CPP file gets compiled and the header does not, and the header is necessary for declaring what is in the CPP file so the linker can link them together in your source code. If the header didn't exist, your source code wouldn't have any of the declarations so it wouldn't know what the functions and classes are named or where to call them from.
But I can't (from memory) see any information in the header file that couldn't be included or is already defined in the source file. Couldn't headers be generated automatically as part of a pre-compile process?
At 4/4/16 02:54 PM, Sam wrote: It being trivial is kind of my argument that it should be in the standard library. Again, it's probably because I'm switching between Python which cradles you with a function for everything and C++ for this project.
Beats me as to why the STL doesn't contain it; there really isn't any compelling reason for it on modern systems (makes sense that it wouldn't be included back in the 80s).
It might end up in C++14. Who knows?
At 4/4/16 02:54 PM, Sam wrote: But I can't (from memory) see any information in the header file that couldn't be included or is already defined in the source file.
Headers generally don't contain definitions; they're supposed to be used for declarations, except for edge-cases where you have no choice but to include the definition in your header (such as when using templates).
The header is basically the skeleton of the source file, whereas the source file is where all the meaty goodness is.
Another way to think about it is how you have to declare your member variables in a class before you can ever use them in some OO languages (e.g. ActionScrupt, C#, Java).
At 4/4/16 02:54 PM, Sam wrote: Couldn't headers be generated automatically as part of a pre-compile process?
No.
The compiler wouldn't know what is and what isn't supposed to be exposed by the header file, which could cause it to put things in the header that don't belong which could end up breaking an application. The only option it would have is to include absolutely everything that is in the source file, and if you have a function in your source file with the same name as a function in another source file, and both of those headers are automatically generated and both included somewhere else: KABLAMO! COMPILER ERROR!
When it comes down to it: the header file is there to publicly expose parts of the source file. If you put a class, function, or variable inside of a source file, and do not declare it in the header file, then absolutely nothing outside of that one single source file can ever access it. Inversely, if you do include it in the header file, then anything that includes that header file will have access to it.
At 4/4/16 03:41 PM, Diki wrote: No.
I think Sam's question is more, "How come I don't have to do this in Haxe (especially Haxe->CPP), and why can't C++ just do what higher level languages do?"
Edit: Haxe's dead code elimination doesn't compile variables, functions, and classes that I'm not using, and the analyzer even deletes local variables I'm not using. So why is C++ so dumb?
At 4/4/16 08:14 PM, MSGhero wrote: I think Sam's question is more, "How come I don't have to do this in Haxe (especially Haxe->CPP), and why can't C++ just do what higher level languages do?"
I'm pretty sure he's talking about regular C++, so what you would do in Haxe wouldn't apply, and if it is in fact the latter: I hope I don't actually need to answer that question.
At 4/4/16 08:28 PM, Diki wrote: I'm pretty sure he's talking about regular C++, so what you would do in Haxe wouldn't apply, and if it is in fact the latter: I hope I don't actually need to answer that question.
I may or may not have oversimplified.
At 4/4/16 08:45 PM, MSGhero wrote:At 4/4/16 08:28 PM, Diki wrote: I'm pretty sure he's talking about regular C++, so what you would do in Haxe wouldn't apply, and if it is in fact the latter: I hope I don't actually need to answer that question.I may or may not have oversimplified.
Eh, I was just sarcastically saying that if someone asks why C++ doesn't do what higher level languages do: the clue is in the title.
Also:
At 4/4/16 08:14 PM, MSGhero wrote: Edit: Haxe's dead code elimination doesn't compile variables, functions, and classes that I'm not using, and the analyzer even deletes local variables I'm not using. So why is C++ so dumb?
C++ won't fix that for you—it can't really do anything for you, as C++ is just a language, really—but any C++ compiler worth its salt will fire off warnings if you define variables that are never used.
However, it won't not compile anything that's not in use—most of the time—because doing so could possibly be worse than the alternative, or the compiler simply does not have the information required to determine if a class or function is not being instantiated/called. It is possible that the compiler will be able to figure out that it can omit something, but it will only do so if it can be 100% certain of it.
So, it probably won't omit unused functions and classes, but sometimes it will. It's very circumstantial.
Like most decisions the compiler makes, it's done to be in accordance with the spec: it will do whatever the fuck it wants so long as the resulting program is in compliance with the spec, and the spec doesn't say anything about omitting unused shit.
So, if haxe is eliminating those functions/classes, it's either doing a bunch of shit that will negatively impact pre or post compilation performance, or it's not being in compliance with the spec.
This is one of the poorest attempts to exploit my computer I've ever seen.
It didn't even execute when I ran it in my VM.
Programming stuffs (tutorials and extras)
PM me (instead of MintPaw) if you're confuzzled.
thank Skaren for the sig :P
At 4/5/16 01:46 PM, egg82 wrote: This is one of the poorest attempts to exploit my computer I've ever seen.
It didn't even execute when I ran it in my VM.
pcap file.
what the hell have you been doing to get so many zips and exes emailed to you? worst I ever get is obviously sketchy links... all sent to a separate spam catcher email address I have...
At 4/5/16 05:15 PM, Glaiel-Gamer wrote: what the hell have you been doing to get so many zips and exes emailed to you? worst I ever get is obviously sketchy links... all sent to a separate spam catcher email address I have...
I've had that e-mail account for over 12 years and I use it for all of my "iff-y" stuff. I just checked my spam box and found a ton of shit in it. Decided to test it all out.
Programming stuffs (tutorials and extras)
PM me (instead of MintPaw) if you're confuzzled.
thank Skaren for the sig :P
Man, I just set my new game server up two days ago and I get flooded with these e-mails.
Them automated bots is fast.
Programming stuffs (tutorials and extras)
PM me (instead of MintPaw) if you're confuzzled.
thank Skaren for the sig :P
Programming stuffs (tutorials and extras)
PM me (instead of MintPaw) if you're confuzzled.
thank Skaren for the sig :P
Aw, I thought you guys would enjoy that video :(
Well, I finally made one on hacking if anyone's interested?
Programming stuffs (tutorials and extras)
PM me (instead of MintPaw) if you're confuzzled.
thank Skaren for the sig :P
At 4/8/16 12:03 AM, egg82 wrote: Aw, I thought you guys would enjoy that video :(
Well, I finally made one on hacking if anyone's interested?
I haven't had free time in the past few days, so I just looked through the scam one. When he took control of your desktop or at least screenshared it, is there no indication that it was a VM? For you, there's the "Send ctrl alt del", but that would be pretty bad if it were visible to the VM itself.
I'm not sure why I'm awake tbh. Part of me wants to learn to draw, but the other part wants to sleep.
At 4/8/16 12:52 AM, MSGhero wrote: I haven't had free time in the past few days, so I just looked through the scam one. When he took control of your desktop or at least screenshared it, is there no indication that it was a VM? For you, there's the "Send ctrl alt del", but that would be pretty bad if it were visible to the VM itself.
The only indication of a VM is the VirtualBox icon in the system tray, which is optional client software to integrate nicely with the host. Otherwise, no. It just looks like a normal Windows system. You can't see or interact with the window it's in or desktop behind it.
I'm not sure why I'm awake tbh. Part of me wants to learn to draw, but the other part wants to sleep.
You waited until now to pick up an artistic skill?
I'm just surprised it took you until college to say "yeah, this might be something I want to do" in a major field of study.
Programming stuffs (tutorials and extras)
PM me (instead of MintPaw) if you're confuzzled.
thank Skaren for the sig :P
At 4/8/16 01:18 AM, egg82 wrote: You waited until now to pick up an artistic skill?
I'm just surprised it took you until college to say "yeah, this might be something I want to do" in a major field of study.
It's mostly been motivation as far as art is concerned. Programming is kind of an art, and I've done a good bit of that, and I also do uni newspaper which is an art (layout; writing stories is like kinda an art). So I have a few half-arts I've been doing for a while. I've been sketching in Krita some, but not consistently enough to my liking.
My unrealistic goal is to make my ideal game mostly by myself. Programming is fine, art I want to learn, and I have 26 gb of sound effects that I hope just assemble themselves. Obviously, I know how hard it is to just do programming, but it's kinda nice to have something to aim for.
Bought the Crosshair-V Formula-Z a while back but discovered it didn't come with TPM. Bought this two days ago.
I'm happy now.
No performance issues with games since they're stored on an entirely separate drive.
Programming stuffs (tutorials and extras)
PM me (instead of MintPaw) if you're confuzzled.
thank Skaren for the sig :P
Good christ, yet another Flash 0-day.
At least FP got a recent update that issues basic security to help prevent unauthorized code exec on Windows.
The security geek in me is like "for the love of all that is holy let Flash die"
But the game dev in me is like.. :(
I want to switch, stop using it, and uninstall it all, but then I don't.
Programming stuffs (tutorials and extras)
PM me (instead of MintPaw) if you're confuzzled.
thank Skaren for the sig :P