Of course, unless you've created your own demo platform (all the way from mining your own minerals... Oh, and making your own pick to mine the minerals.. And...), you're just using what others have done for you already.
You have to set a limit somewhere. You just seem gruff because you've arbitrary set the limit a different place than the competition holders. Most of the old DOS demos used BIOS routines, after all.
The compo rules for win 64kb:
Windows: * The compo machine will be installed with Windows 7 64bit, however all entries have to be supplied in 32bit exe format and be able to run in a 32bit environment!
* We will provide the then-latest DirectX distributables.
* The "Media" and "Music samples" directories will be deleted from the compo machine.
*.net Entries : We will install the then-current version and patches of the latest.net runtime.
* And in case someone might still have this mad idea : We will not install any drivers or virtual machines to provide or improve DOS compatibility.
64k intro:
* Maximum file size is 65536 bytes for the executable. All other files in the archive will be deleted before showing the entry in the competition.
* Maximum running time: 8 minutes (including loading/precalc).
* We will not install any additional Runtimes, SDKs, Codecs, Drivers etc on the compo machine. This means that, among others, msvcr70.dll, msvcr71.dll and msvcr80.dll will not be available.
* You may not use the contents of the Windows "Media" or "Music Samples" directories. These directories will be deleted on the compo machine.
* Java entries are not allowed
*.net entries are allowed when they follow the rules listed above.
Pretty reasonable for a windows demo IMHO. You get stock windows, latest directx distributables (otherwise you wouldn't be reasonably able to do anything with the gfx card in the machine), and that's it. Under windows (NT kernel series) you don't have any direct access to the hardware, unless you write a custom driver (which they will of course refuse to install) or find a kernel exploit. This is what a modern demo is. Using a modern computer. There are of course also compos for older machines, if that better tickles your fancy.
No, that would be impossible on modern computers (unless you would only run the demo on one gfx card - and maybe even only on one specific firmware version at that). The closest I know of is the 4k demo Elevated by RGBA and TBC. Everything except audio is done by shaders on the graphics card. Even the camera movements are done there (as the cpu don't even know how the terrain looks).
IIRC they started with an OpenGL initialization to get the shader code to the GPU, but later switched to DirectX, because that used 100 less bytes in the finished product.
But people still make C64 and Amiga demos, and lft's Craft and Phasor is even more extreme, as he does everything himself:)
Re:If your customers aren't always right...
on
IT Calls of Shame
·
· Score: 2
Well, I had already checked that we had connection to his router, and tried rebooting the router.
But, there were no active connections on the LAN part of the router. After checking cables, and even trying to force the connected port up and half duplex 10mbit (in case of problematic autonegotiation or bad cable) there was no life sign from his PC. So I guided him into the settings to see if the network card reported cable out or in, and maybe see if I could force it on that end too... And maybe if he had multiple cards.
And found out the only network card there.. was grayed out. And right clicking on it did pop up an "Enable" option.. That he absolutely refused to click on, because it couldn't possibly be that.
For that matter, I've also had a customer that insisted hackers stole some of his emails from his internet connection (never mind that he had 5 different antivirus, all set up to scan email), one that accused us of following him around on poker tables and made him lose the games, one that still had his modem in the car when calling to complain about it not working, one that have had the modem turned off and wondered why it made a difference turning it on...
You have about one batshit crazy call per 2 weeks on average, in my estimate. And about 50% of the other calls are "Hello, IT. Have you tried turning it off and on again? There you go, have a nice day!"
And about every 3-5 days you get an actual real technical problem (yes, that does mean the crazies are only about twice as rare as a user with an actual issue - please keep that in mind the next time you need to contact support). I'm so glad I'm done with that job, worst year of my life. I tell you, you can really lose faith in humanity in that kind of job. Sometimes, after some of worse days, I genuinely wondered if a large meteor impact might be a good thing overall.
Re:If your customers aren't always right...
on
IT Calls of Shame
·
· Score: 2
You have no idea...
I once had a user that the internet didn't work for (DSL, with router), and he had DISABLED the network card in the settings.
He also insisted that it couldn't possibly had anything to do with the problem, and expected me to fix things on my end of the phone call..
In order to do this we had to deploy no additional machines and no special hardware. On our production frontend machines, SSL/TLS accounts for less than 1% of the CPU load, less than 10KB of memory per connection and less than 2% of network overhead.
There are grumblings about it here in Norway too. Same story. Apple homepage, tooting 4g, showing logos of norwegian operators beside it. And none of the operators support that 4G standard.
Not only did they use "Big IP" from "F5 Networks", but it seems to have been a previously unknown bug in the cache system. They reportedly managed to reproduce it in the lab, and have worked with Altinn to solve the problem. Right now they're running without caching, with the extra load problems that causes.
It also seems like they applied a hotfix to OpenSSO (which they also use) that made it less prone to garbage collection, which increased the overall performance to a level slightly above what it was earlier with caching.
This is actually a huge system, with many govt departments using it daily, and most of the time it works well. It's just that each year, when the rest of Norway also tries to log in, things go kaboom (That has happened several years in a row, I might add). The name, Altinn can be translated to all-in - it's basically THE portal between govt and citizens on many points. For example accountants use it daily (and every year they complain that they can't do anything at all for several days when this happens)
So, most of the time it works (and works well, some might say), but a few days every year it's massively underscaled. This year, they apparently tried some half-baked emergency caching, which failed spectacularly.
It takes more skill and system-programming knowledge to deal with the tricky interfaces between the internals of a Python interpreter and an external C++ program.
Is this experience talking, or guesswork?
Admittedly, I haven't had a need for it myself, but it looks easy enough. And you have plenty of options, too!
So you can write all your code in Python, find through profiling which small pieces of code are hot/heavily used, and replace that with C code.
Or write it a bit smarter. There was a poster on one forum that had a python program doing some image processing. Basically finding the nearest pixel from center within a certain variance of a color. It took ~60 seconds on a test image he had, and he had found out that the majority of the time was spent doing color convert (RGB to LAB). Removing that step ran the code in 4 seconds. When I stumbled over the thread, people had been improving parts of it for 3 days already, and it was down to ~55 seconds run time on that test image.
At that point they were talking about rewriting things to C/C++, precomputing all possible values, multithreading.. Along with comments like "it's python, what can you expect?" I suggested a simple result cache (using a dict for storing results of already converted colors, and check that first). 4 lines of code to add - and the run time went from 55 seconds to 6 seconds.
I've noticed that in many cases, if things are too slow, you're using a wrong approach. Sure, they could have rewritten it in C, and it would probably be fast enough to offset the chosen approach. But sometimes the simplest solution can also be the best solution:)
Some stuff still remains performance sensitive enough that people will go to the trouble of optimizing it at a lower level.
And the other side of that coin, is of course, that most stuff is not performance sensitive enough to go to the trouble of optimizing it at a lower level.
Hence what Guido is saying. You can do that "most stuff" part in python, and then write that "some stuff" part as a C module. You can then use that module from python. Thus you get the benefit of both languages.
Actually, as a norwegian, my first thought was "Why would you want to increase work time?" - As our laws are very strict on those things, and is set to 37.5 hours a week (lunch is calculated as half an hour off each day).
The rules allow working overtime, but only in short periods, and only to a maximum amount over a certain period (don't recall exactly now).
In fact, I know people who were forced to take two weeks paid vacation because they've worked too much, and had to stop working a period to not break the law. The companies usually puts this in quiet periods when needed, so they have the option of overtime when they need it.
Seems to work well for us, at least:) You know, as a civilized country and all that.
"No true Scotsman" fallacy? :)
Of course, unless you've created your own demo platform (all the way from mining your own minerals... Oh, and making your own pick to mine the minerals.. And ...), you're just using what others have done for you already.
You have to set a limit somewhere. You just seem gruff because you've arbitrary set the limit a different place than the competition holders. Most of the old DOS demos used BIOS routines, after all.
The compo rules for win 64kb :
Windows:
* The compo machine will be installed with Windows 7 64bit, however all entries have to be supplied in 32bit exe format and be able to run in a 32bit environment!
* We will provide the then-latest DirectX distributables.
* The "Media" and "Music samples" directories will be deleted from the compo machine.
* .net Entries : We will install the then-current version and patches of the latest .net runtime.
* And in case someone might still have this mad idea : We will not install any drivers or virtual machines to provide or improve DOS compatibility.
64k intro:
* Maximum file size is 65536 bytes for the executable. All other files in the archive will be deleted before showing the entry in the competition.
* Maximum running time: 8 minutes (including loading/precalc).
* We will not install any additional Runtimes, SDKs, Codecs, Drivers etc on the compo machine. This means that, among others, msvcr70.dll, msvcr71.dll and msvcr80.dll will not be available.
* You may not use the contents of the Windows "Media" or "Music Samples" directories. These directories will be deleted on the compo machine.
* Java entries are not allowed
* .net entries are allowed when they follow the rules listed above.
Pretty reasonable for a windows demo IMHO. You get stock windows, latest directx distributables (otherwise you wouldn't be reasonably able to do anything with the gfx card in the machine), and that's it. Under windows (NT kernel series) you don't have any direct access to the hardware, unless you write a custom driver (which they will of course refuse to install) or find a kernel exploit. This is what a modern demo is. Using a modern computer. There are of course also compos for older machines, if that better tickles your fancy.
You of course also got other wild stuff.
No, real demosceners make their own demo hardware. Those so-called "sceners" that use pre-assembled electronics are just lame.
Sorry, but just accept that the world have moved on. And you should also understand that these modern demos are just as impressive as ye olde ones.
And for that matter, people are still making C64 demos. Like Edge of Disgrace from 2008.
Cool, can you give us some examples of programs from that area that had this kind of graphics? I'll even let you pick non-realtime stuff :)
do these write directly to the video hardware?
No, that would be impossible on modern computers (unless you would only run the demo on one gfx card - and maybe even only on one specific firmware version at that). The closest I know of is the 4k demo Elevated by RGBA and TBC. Everything except audio is done by shaders on the graphics card. Even the camera movements are done there (as the cpu don't even know how the terrain looks).
IIRC they started with an OpenGL initialization to get the shader code to the GPU, but later switched to DirectX, because that used 100 less bytes in the finished product.
But people still make C64 and Amiga demos, and lft's Craft and Phasor is even more extreme, as he does everything himself :)
Well, I had already checked that we had connection to his router, and tried rebooting the router.
But, there were no active connections on the LAN part of the router. After checking cables, and even trying to force the connected port up and half duplex 10mbit (in case of problematic autonegotiation or bad cable) there was no life sign from his PC. So I guided him into the settings to see if the network card reported cable out or in, and maybe see if I could force it on that end too... And maybe if he had multiple cards.
And found out the only network card there.. was grayed out. And right clicking on it did pop up an "Enable" option.. That he absolutely refused to click on, because it couldn't possibly be that.
For that matter, I've also had a customer that insisted hackers stole some of his emails from his internet connection (never mind that he had 5 different antivirus, all set up to scan email), one that accused us of following him around on poker tables and made him lose the games, one that still had his modem in the car when calling to complain about it not working, one that have had the modem turned off and wondered why it made a difference turning it on...
You have about one batshit crazy call per 2 weeks on average, in my estimate. And about 50% of the other calls are "Hello, IT. Have you tried turning it off and on again? There you go, have a nice day!"
And about every 3-5 days you get an actual real technical problem (yes, that does mean the crazies are only about twice as rare as a user with an actual issue - please keep that in mind the next time you need to contact support). I'm so glad I'm done with that job, worst year of my life. I tell you, you can really lose faith in humanity in that kind of job. Sometimes, after some of worse days, I genuinely wondered if a large meteor impact might be a good thing overall.
You have no idea...
I once had a user that the internet didn't work for (DSL, with router), and he had DISABLED the network card in the settings.
He also insisted that it couldn't possibly had anything to do with the problem, and expected me to fix things on my end of the phone call..
No, he didn't get any internet that day.
"We've decided to stop paying artists entirely, that is up to them."
As far as I understand things, they're largely there already..
* Courtney Love does the math
* The Problem With Music by Steve Albini
So it is true, trolling is a art! ;)
Samsung Says Their TVs Aren't Really Spying On You
Of course they'll be saying that. They'd be crazy NOT to say it.
I mean, they have enough patent lawsuits from Apple already.
Lady Astor once said to Churchill, "If you were my husband, I'd poison your tea," to which he responded, "Madam, if you were my wife, I'd drink it!"
After that, I just had to look it up.
And here, for your fucking pleasure, is the movie clip!
I wonder how much work it would be to set up an auto dialer and.. hmm..
"Agents should never attempt to bow in front of an European."
Right. Because then we'll clobber him in the head and run away with his wallet.
Google's experience when switching to https as default on Gmail.
Interesting bit:
In order to do this we had to deploy no additional machines and no special hardware. On our production frontend machines, SSL/TLS accounts for less than 1% of the CPU load, less than 10KB of memory per connection and less than 2% of network overhead.
There are grumblings about it here in Norway too. Same story. Apple homepage, tooting 4g, showing logos of norwegian operators beside it. And none of the operators support that 4G standard.
And so it begins, the legends of the Technomages..
Though I'm feeling all full of myself for having guessed right.
It might please you to know this info from a norwegian article:
Not only did they use "Big IP" from "F5 Networks", but it seems to have been a previously unknown bug in the cache system. They reportedly managed to reproduce it in the lab, and have worked with Altinn to solve the problem. Right now they're running without caching, with the extra load problems that causes.
It also seems like they applied a hotfix to OpenSSO (which they also use) that made it less prone to garbage collection, which increased the overall performance to a level slightly above what it was earlier with caching.
This is actually a huge system, with many govt departments using it daily, and most of the time it works well. It's just that each year, when the rest of Norway also tries to log in, things go kaboom (That has happened several years in a row, I might add). The name, Altinn can be translated to all-in - it's basically THE portal between govt and citizens on many points. For example accountants use it daily (and every year they complain that they can't do anything at all for several days when this happens)
So, most of the time it works (and works well, some might say), but a few days every year it's massively underscaled. This year, they apparently tried some half-baked emergency caching, which failed spectacularly.
Prime Minister Jens Stoltenberg, avid gamer
(yeah, google translate.. Still, it's readable)
It takes more skill and system-programming knowledge to deal with the tricky interfaces between the internals of a Python interpreter and an external C++ program.
Is this experience talking, or guesswork?
Admittedly, I haven't had a need for it myself, but it looks easy enough. And you have plenty of options, too!
1. Extending Python with C or C++
2. ctypes
3. Cython
Examples for 1 and 2
Example for 3
So you can write all your code in Python, find through profiling which small pieces of code are hot/heavily used, and replace that with C code.
Or write it a bit smarter. There was a poster on one forum that had a python program doing some image processing. Basically finding the nearest pixel from center within a certain variance of a color.
It took ~60 seconds on a test image he had, and he had found out that the majority of the time was spent doing color convert (RGB to LAB). Removing that step ran the code in 4 seconds.
When I stumbled over the thread, people had been improving parts of it for 3 days already, and it was down to ~55 seconds run time on that test image.
At that point they were talking about rewriting things to C/C++, precomputing all possible values, multithreading.. Along with comments like "it's python, what can you expect?"
I suggested a simple result cache (using a dict for storing results of already converted colors, and check that first). 4 lines of code to add - and the run time went from 55 seconds to 6 seconds.
I've noticed that in many cases, if things are too slow, you're using a wrong approach. Sure, they could have rewritten it in C, and it would probably be fast enough to offset the chosen approach. :)
But sometimes the simplest solution can also be the best solution
Some stuff still remains performance sensitive enough that people will go to the trouble of optimizing it at a lower level.
And the other side of that coin, is of course, that most stuff is not performance sensitive enough to go to the trouble of optimizing it at a lower level.
Hence what Guido is saying. You can do that "most stuff" part in python, and then write that "some stuff" part as a C module. You can then use that module from python. Thus you get the benefit of both languages.
If you don't need to know the index, the python style for loop is awesome
Also if you do need to know the index :)
also, it's really easy to make custom iterators:
The problem is the GIL.
You might this approach interesting, then:
http://morepypy.blogspot.com/2011/06/global-interpreter-lock-or-how-to-kill.html (part 1)
http://morepypy.blogspot.com/2012/01/transactional-memory-ii.html (part 2)
if(a > 0) { return a + 1; } else { return a -1; }
Here's yet an alternative way to write it in python :o)
return a > 0 and a + 1 or a - 1
Actually, as a norwegian, my first thought was "Why would you want to increase work time?" - As our laws are very strict on those things, and is set to 37.5 hours a week (lunch is calculated as half an hour off each day).
The rules allow working overtime, but only in short periods, and only to a maximum amount over a certain period (don't recall exactly now).
In fact, I know people who were forced to take two weeks paid vacation because they've worked too much, and had to stop working a period to not break the law. The companies usually puts this in quiet periods when needed, so they have the option of overtime when they need it.
Seems to work well for us, at least :) You know, as a civilized country and all that.