That awkward feeling when you start trying to politely explain to someone why they're an idiot only to suddenly realize that you're an idiot...
I shall leave this thread up as a memorial to my dumbassery.
That awkward feeling when you start trying to politely explain to someone why they're an idiot only to suddenly realize that you're an idiot...
I shall leave this thread up as a memorial to my dumbassery.
So...
the Internet would still exist, but it would be a much less reliable, much more dangerous place to be—especially for businesses and government agencies
I'm actually personally OK with this. If anything is destined to screw up the internet, it's over-commercialization and corporatization. I myself could get by just fine without online banking or if I needed to make a phone call to order something from Amazon so an automated system can take my credit card info and put it into Amazon's physically isolated internal network (or however it might work, I don't effing know. ).
Someone would finally need to sort out that whole "waiting on hold for a half hour just to yell at someone who doesn't understand english" issue, though.
I guess your solution to having to unlock your front door to get in is to remove the door.
If I had to go re-unlock the front door every time I wanted to access a household appliance, I'd probably consider it.
Bought a new Win 8.1 laptop after using Vista and Ubuntu for the last 5 years. As any long-time windows user knows, the very first thing you do in a fresh Windows install (even before opening IE for the one and only time ever to download the firefox installer) is to go to the control panel and disable UAC and any other security garbage you can find, since the practical effect of UAC is just to add an "Are you sure?" dialog box onto everything you ever want to do.
Unfortunately, the new permission restrictions for the Program Files folders aren't disableable. Luckily there's a workaround: create the folder on the desktop first, then move it into Program Files. The permissions seem to persist, though moving the folder spawns one last "Are you sure?" dialog. I guess I could just use a different folder, since arguably a VM doesn't belong in Program Files to begin with (it's a VM with a program inside it, so technically...), but this is my damn computer and I'll save all my porn to c:\windows\syswow64 if I want to.
Now that that's all up and running, I open up the CentOS VM and the Windows Firefox interface, but oh noes! It uses an unsigned Java applet for part of its core functionality. Java warns me about this and I click through, expecting no more issues, but the nag dialog shows up every single time this applet tries to run. There's no whitelist, and google tells me there is no way to disable the restriction altogether. But I do learn that it was only added after version 7.25, and in the near future Java will disable running unsigned applets completely.
At this point, I can either write emails to the developers of the program and/or the applet and ask them to fix their shit, or I can downgrade Java to 7.25 and disable updating. Since only one of these two courses of action will likely solve anything, I choose the obvious.
Cut to the not-too-distant future, when Firefox suddenly decides that Java 7.25 is no longer secure enough to be allowed to run. Ever. Googling leads to many support threads by pissed off people who can't update their plugins for whatever reason, and the response is invariably stubborn pontificating about how Mozilla knows best and you're too stupid to be trusted to decide what's safe. Just before beginning to research which version of Firefox I need to downgrade to (because fuck Chrome), I find the about:config setting I need to toggle to disable plugin blocking altogether (extensions.blocklist.enabled). I double check that automatic updating is disabled in the Firefox settings, and everything is finally good to go, at least for now.
So to summarize, the net effect of all the added security has been:
Backstory: Early versions of Minecraft would run beautifully even on low-tier hardware, but after years of "improvements" and feature creep, it's become more and more bloated until people with old, cheap hardware can have trouble getting double-digit fps on default graphics settings. Now in the newest version (1.8) even people with high end machines are complaining about lag spikes.
'Optifine' is a mod that was created to help by tweaking and simplifying the game's graphics code to make it run better. The result is a slightly less 'pretty', but much more usable game.
Since there's no modding API, modding Minecraft involves someone actually unpacking and deobfuscating the minecraft .jar for each new version or subversion to create a source file that can be rebuilt later. Mojang encourages and even assists this process, but won't make the game open source.
As the one with possibly the deepest knowledge of Minecraft's source outside of Mojang, the creator of optifine took to minecraftforum.net to explain the sudden performance trouble:
Minecraft 1.8 has so many performance problems that I just don't know where to start with.
Maybe the biggest and the ugliest problem is the memory allocation. Currently the game allocates (and throws away immediately) 50 MB/sec when standing still and up to 200 MB/sec when moving. That is just crazy.
What happens when the game allocates 200 MB memory every second and discards them immediately?
- With a default memory limit of 1GB (1000 MB) and working memory of about 200 MB Java has to make a full garbage collection every 4 seconds otherwise it would run out of memory. When running with 60 fps, one frame takes about 16 ms. In order not to be noticeable, the garbage collection should run in 10-15 ms maximum. In this minimal time it has to decide which of the several hundred thausand newly generated objects are garbage and can be discarded and which are not. This is a huge amount of work and it needs a very powerful CPU in order to finish in 10 ms.
- Why not give it more memory?
Let's give Minecraft 4 GB of RAM to play with. This would need a PC with at least 8 GB RAM (as the real memory usage is almost double the memory visible in Java). If the VM decides to use all the memory, then it will increase the time between the garbage collections (20 sec instead of 4), but it will also increase the garbage collection time by 4, so every 20 seconds there will be one massive lag spike.
- Why not use incremental garbage collection?
The latest version of the launcher by default enables incremental garbage collection (-XX:+CMSIncrementalMode) which in theory should replace the one big GC with many shorter incremental GCs. However the problem is that the time at which the smaller GCs happen and their duration are mostly random. Also they are not much shorter (maybe 50%) than a full scale GC. That means that the FPS starts to fluctuate up and down and there are a lot of random lag spikes. The stable FPS with a lag spike from time to time is replaced with unstable FPS and microstutter (or not very micro depending on the CPU). This strategy can only work with a powerful enough CPU so that the random lag spikes become small enough not to be noticeable.
- How did that work in previous releases?
The previous Minecraft releases were much less memory hungry. The original Notch code (pre 1.3) was allocating about 10-20 MB/sec which was much more easy to control and optimize. The rendering itself needed only 1-2 MB/sec and was designed to minimize memory waste (reusing buffers, etc). The 200 MB/sec is pushing the limits and forcing the garbage collector to do a lot of work which takes time. If it was possible to control how and when the GC works then maybe it would be possible to distribute the GC pauses such that they are not noticeable or less disturbing. However there is no such control in the current Java VM.
- Why is 1.8 allocating so much memory?
This is the best part - over 90% of the memory allocation is not needed at all. Most of the memory is probably allocated to make the life of the developers easier.
- There are huge amounts of objects which are allocated and discarded milliseconds later.
- All internal methods which used parameters (x, y, z) are now converted to one parameter (BlockPos) which is immutable. So if you need to check another position around the current one you have to allocate a new BlockPos or invent some object cache which will probaby be slower. This alone is a huge memory waste.
- The chunk loading is allocating a lot of memory just to pass vertex data around. The excuse is probably "mutithreading", however this is not necessary at all (see the last OptiFine for 1.7).
- the list goes on and on ...
The general trend is that the developers do not care that much about memory allocation and use "best industry practices" without understanding the consequences. The standard reasoning being "immutables are good", "allocating new memory is faster than caching", "the garbage collector is so good these days" and so on.
Allocating new memory is really faster than caching (Java is even faster than C++ when it comes to dynamic memory), but getting rid of the allocated memory is not faster and it is not predictable at all. Minecraft is a "real-time" application and to get a stable framerate it needs either minimal runtime memory allocation (pre 1.3) or controllable garbage collecting, which is just not possible with the current Java VM.
- What can be done to fix it?
If there are 2 or 3 places which are wasting memory (bugs), then OptiFine can fix them individually. Otherwise a bigger refactoring of the Minecraft internals will be needed, which is a huge task and not possible for OptiFine.
- Example
A sample log of GC activity with effective FPS for the GC lag spikes is available here.
- the average rendering FPS is about 50 FPS
- the GC lag spikes have effective FPS of 7-20
- there are 1-2 lag spikes per second caused by GC activity
tldr; When 1.8 is lagging and stuttering the garbage collector is working like crazy and is doing work which has nothing to do with the game itself (rendering, running the internal server, loading chunks, etc). Instead it is constantly cleaning the mess behind the code which thinks that memory allocation is "cheap".
Mojang devs took to twitter and reddit to defend themselves/make snarky comments and blame the community
Games can be either fast or extensible, pick one. I'll let you knife-fight it out with the ones demanding a plugin API.
I could have said that lots of short-term allocations were a bad thing. Nobody asked me, and I don't control mass changes to the engine like that.
This one stands out to me, though: "The chunk loading is allocating a lot of memory just to pass vertex data around. The excuse is probably 'mutithreading', however this is not necessary at all (see the last OptiFine for 1.7)."
Since sp614x is so much better a coder than me (according to Twitter), perhaps he can enlighten me as to what this "memory just to pass vertex data around" is that he's referring to, because I don't see it. Is there memory allocated for each block's model, so that we can bulk-transfer the data for individual faces into an IntBuffer in order to construct the final 16x16x16 renderable chunk? Sure. That's simply necessary, what are we supposed to do, recalculate the model data every time we render a block? If he's not referring to that, then what? The fact that there are 5 10-meg groups of BufferBuilder instances so that each thread can peel off a group as necessary and put data into the builder's IntBuffers before the final upload that happens on the main thread? Typically the chunk rebuild performance ends up bottlenecking at the final upload, so we have more builder groups than threads so that there can be multiple threads' worth of outstanding uploads so that the builder threads don't sit idle most of the time. And don't say "just use a thread-safe GL context," that is a gross LWJGL hack that doesn't work on as many hardware setups as it does work. I'd be really curious to hear how he would propose that we construct the buffers prior to uploading them to GL without having buffers in CPU-side local memory with which to do so.
And what of Optifine's multithreading in 1.7, anyway? Are we referring to the multi-core chunk loading option where you can find countless people in the comments reporting that it causes stuttering or chunk drop-out?
Since we're on this subject, why are there umpty-nine versions of Optifine for different machines, anyway? It has always struck me as a shotgun-like approach to performance. Does this hack not work? Try this hack! That one doesn't work? Try this other one. Things get a whole lot harder to optimize when you don't have the chance to release 3-4 versions of the same codebase, all with different optimizations, something that some folks don't appreciate.
Ultimately, the man has some good points about memory management, but I would love to hear an explanation as to this "passing vertex data around" issue that just reads like Buzzword Bingo, meant to gull inexperienced people into lining up the torches and pitchforks at those poor Mojang idiots who don't know what they're doing, if only they had the infallible advice of Optifine. Until then, I'm going to keep on doing what I'm doing.
So this happened...
A boy from Coventry has become the youngest computer specialist in the world.
Ayan Qureshi is now a Microsoft Certified Professional after passing the tech giant's exam when he was just five years old.
Ayan, now six, whose father is an IT consultant, has set up his own computer network at home.
He told the BBC he found the exam difficult but enjoyable, and hopes to set up a UK-based tech hub one day.
Mr Qureshi introduced his son to computers when he was three years old. He let him play with his old computers, so he could understand hard drives and motherboards.
"I found whatever I was telling him, the next day he'd remember everything I said, so I started to feed him more information," he explained.
"Too much computing at this age can cause a negative effect, but in Ayan's case he has cached this opportunity."
Ayan has his own computer lab at his home in Coventry, containing a computer network which he built.
He spends around two hours a day learning about the operating system and how to install programmes.
When the boy arrived to take the Microsoft exam, the invigilators were concerned that he was too young to be a candidate.
His father reassured them that Ayan would be all right on his own.
The test is usually taken by people who want to become IT technicians.
Ayan Qureshi at the compurer The exam invigilators thought Ayan Qureshi was too young to be a candidate
Ayan's mother Mamoona is training to be a GP.
The family moved to England from Pakistan in 2009.
"I'm very happy and very proud, I don't want to see him set a world record every day. But I want him to do his best whatever he does in his life," she said.
Ayan says he hopes to launch a UK-based IT hub similar to America's Silicon Valley one day, which he intends to call E-Valley.
He also wants to start his own company.
I need to add something to the server (written in python) so that a method gets called at a certain time (required precision +/- a minute, say) to kick off an event, usually days in advance. Events will be read in from a file at startup and scheduled to run on the off chance the server hasn't crashed in the meantime.
The simplest thing I thought of was just
t=threading.Timer(<however many hundreds of thousands of seconds from now until 8 PM on saturday>, <method>)
t.daemon=True
t.start()
but I'm concerned about precision. Alternatively I could create a thread to loop infinitely and check the time every 30 seconds, but that seems ugly and like more work than I should need to do.
wat do?
There's years on years of annoying bullshit that Windows users have gotten used to but just don't exist on other platforms; the convenience of something like apt-get is just mind-blowing.
I spent close to a year begrudgingly stuck with Ubuntu on a laptop I used every day and am going to wholeheartedly call bullshit on that. apt-get is great IF you happen to know the exact name of what you want (case sensitive no less) and IF it exists in the preloaded repositories and IF everything goes perfectly during installation (because god help you if you try to find any useful error info in the wall of text the install process will spew forth) and IF the program's author has prepared a download for the specific version of the specific OS you're using.
In practice, installing anything interesting or specialized seemed to invariably require c&ping a laundry list of terminal commands and spending the next several hours praying that nothing went wrong as I rebuilt the entire application from scratch, since the precompiled binaries for the proper OS version either didn't work or didn't exist, because the "LTS" in 12.04LTS apparently doesn't apply to programmers.
Meanwhile in Windows Land, the procedure is just: Google the program's website -> Download the .exe or installer -> Carefully dodge the toolbars and browser hijackers built into the installer -> PROFIT
Snort, well, no. Approximately all of them did. The last few each took it to new heights. Obama's going for the Guinness Book of World Records, though.
Damn, I thought here of all places I'd be safe from the intellectually lazy regurgitating easily disproven propaganda.
As a side-note, I almost feel sorry for Dookdook who probably came here expecting everybody to commiserate and go, "oh yeah! UAC! such a pain!" without realizing how far away from the mainstream he's drifted in the last 10 years or so.
Nah, I'm still the mainstream. You guys are just nazis.
Seriously though, this is a personal laptop is only used by me. No one else even has physical access to it. There are a huge number of people in the same situation, and they have no use for user accounts with non-admin privileges.
There needs to be a checkbox buried somewhere in the Control Panel that says "I am the one and only God of this computer, you are a nothing but a technological slave to me and will carry out my orders and the orders of any programs I authorize silently and without question. In return, I promise not to whine to Microsoft if my shit gets fucked up with malware, I have to wipe the entire machine and reinstall everything from recovery disks, and russian hackers empty my bank account."
Not that any of that has much to do with my original Java/Firefox issues...
That awkward feeling when you start trying to politely explain to someone why they're an idiot only to suddenly realize that you're an idiot...
I shall leave this thread up as a memorial to my dumbassery.
Being forced to put static variables in class scope makes me a sad panda.
The schedule is an external file and reread every time the server restarts so nothing will be forgotten, plus there's no bad side effects for missing an event, so I'm not too worried about that. Adding events without a server restart would be nice, but I expect it to be rare enough that I'm not super worried about it just yet. (edit: I take that back, that's an important thing)
It's not just a matter of broadcasting once, the server will handle the execution of the event afterwards as well, which could take hours. If I set up a separate program to handle everything, there'd need to be realtime synching of client lists between the two, which currently are only stored internally to the server script, and that sounds awful.
Hmm, well the task really only depends on data internal to the server program; I don't think I could make it standalone so it could run externally.
Essentially it's a chat server that functions as a matchmaking tool for online gaming, and at time X on day Y I want to broadcast an invitation to everyone online to join a tournament that the server will be running. If I scheduled something externally to signal it I'd still end up spinning watching for the signal anyway.
(Also, it's someone else's project and I'm hoping the lighter my changes are the more likely he is to pull my stuff into the main release)
I need to add something to the server (written in python) so that a method gets called at a certain time (required precision +/- a minute, say) to kick off an event, usually days in advance. Events will be read in from a file at startup and scheduled to run on the off chance the server hasn't crashed in the meantime.
The simplest thing I thought of was just
t=threading.Timer(<however many hundreds of thousands of seconds from now until 8 PM on saturday>, <method>)
t.daemon=True
t.start()
but I'm concerned about precision. Alternatively I could create a thread to loop infinitely and check the time every 30 seconds, but that seems ugly and like more work than I should need to do.
wat do?
The closest to that IMO is all the stuff google does. But that's more about giving you tools and stuff, and doesn't seem to keep you within their walls (though maybe they'd like to).
I rage against the 'walled garden' thing as much as anyone, but I'm the first to admit I'd be lost without google. Without google (or an equivalent search engine owned by another giant corporation with the money to do the same things google does) the internet would just be a small handful of sites whose url's I happened to learn somewhere.
People want to buy things, it's amazon.
People want to watch things, it's netflix.
People want to watch other things, it's pornhub.
People want information, it's wikipedia.
People want to talk about shit, it's reddit.
etc.
"The Internet" is becoming a small handful of sites, with everything else just kind of existing unnoticed and fading into irrelevance. Defending The Internet is starting to feel like defending Walmart.
I dunno, I'm just rambling. :p
So...
the Internet would still exist, but it would be a much less reliable, much more dangerous place to be—especially for businesses and government agencies
I'm actually personally OK with this. If anything is destined to screw up the internet, it's over-commercialization and corporatization. I myself could get by just fine without online banking or if I needed to make a phone call to order something from Amazon so an automated system can take my credit card info and put it into Amazon's physically isolated internal network (or however it might work, I don't effing know. ).
Someone would finally need to sort out that whole "waiting on hold for a half hour just to yell at someone who doesn't understand english" issue, though.
TRWTF is ever using metro apps for anything except to change the ~3 system settings that seem to be in the PC settings app but nowhere in Control Panel.