-
Posts
7951 -
Joined
-
Last visited
-
Days Won
26
Content Type
Profiles
Forums
Events
Everything posted by Sensei
-
The fast forward key for retro game(I want to apply it to Python)
Sensei replied to fredreload's topic in Computer Science
I don't think so. It would boost opponents movements as well as the main player movements, possibly rendering entire game unable to play anymore by human. The all real time games refresh at constant rate (if game has wait for vblank) or adaptive rate (if has not wait for vblank). Contrary to games with rounds in which objects don't move therefore don't require periodical screen refreshes. Refresh is needed when there is movement to update state. There are special electronic displays which update only when there is change of pixels. Used mostly with ebooks. This reduces electric power usage only to switch states and saves battery. -
The fast forward key for retro game(I want to apply it to Python)
Sensei replied to fredreload's topic in Computer Science
You don't seem to understand what he did on the video... Game was not run in some turbo speed. Just frequency of key events was increased.. On Windows OS is sending events WM_KEYDOWN when user pressed key and WM_KEYUP after releasing key button. However when user pressed key button and holds it, there are send WM_CHAR with small delay between them. Application (emulator) and/or external keyboard utility (e.g. keylogger) can inject more WM_CHAR into input events queue and increase frequency. Buggy application will be cheated because programmer did not think about such situation in advance.. Similar situation is with games which did not wait for vertical blank (VBlank interrupt). Emulator get this functionality to fight with such not waiting for vblank games, so they still could be usable after increasing delay of key events. If you want to increase speed of execution of your programs 1) stop using Python and write code in C/C++ 2) use multithreading. Modern CPUs have 8+ HT threads and more. 3) use CUDA/OpenCL and use GPU for heavy computing. Modern GPUs have 1024-8192 cores on GFX. Looking on questions asked on the forum, doubtful that his Python programs are multithreaded. So he could instantly have 8-12 boost after using the all cores of CPU.. If script is just calculating.. But the most of the scripts are loading data from storage etc. etc. Getting M2 NVMe would speedup 3-7x in comparison to ordinary SSD, and 70x in comparison to traditional HDD. -
Is the earth really our planet? Or the planet of fishes?
Sensei replied to Biological Combination's topic in Speculations
-
is it possible to harness gravity to power a motor
Sensei replied to darkmatter11's topic in Engineering
Yes.. https://en.m.wikipedia.org/wiki/Hydropower https://en.m.wikipedia.org/wiki/Hydroelectricity -
A rather unique idea to room cooling (radiant cooling + peltier array)
Sensei replied to markg85's topic in Engineering
What is color of building and room walls? White color reflects light preventing it from being absorbed. But check if it is not having Titanium Oxide. https://www.sustainability-times.com/green-consumerism/a-new-white-paint-can-keep-buildings-naturally-cooler/ You can get IR camera for smartphone to see which part of wall is heating the most. -
There were couple airplane crashes and accidents due to metric-imperial conversion errors including fatal costing people lives.. https://en.m.wikipedia.org/wiki/Gimli_Glider In See Also section in the article above there is list of accidents which were not so happy ending as this story..
-
Here they are called "sleeping policeman".
-
Chances comparable to winning on the lottery..
-
Finding appropriate resonance for specific object can have fatal consequences https://en.m.wikipedia.org/wiki/Tacoma_Narrows_Bridge_(1940)#Resonance_(due_to_Von_Kármán_vortex_street)_hypothesis There might be places in the room where are existing constructive interferences.
-
Quick question about perpetual motion.
Sensei replied to Deep-Fried-Thoughts's topic in Classical Physics
Watch video from his other thread. The idea is simple. Heat substance with low boiling point so it will change to gaseous state and move to the other end of closed container where it will liquify. Repeat with other end. -
People with idea build prototype. Nobody will do it for you. Once you have prototype you can show it on YouTube and Vimeo and make crowdfunding project on e.g. Kickstarter or similar website. If people will see value in your idea, they will give you money to build more professional motors utilizing relatively low boiling temperature 39.6 C of methyl chloride or whatever else you will choose. It will be heat by sunlight I suppose so? I enjoy the idea. But you did not even spend time on description of your idea.. Sounds like you want everything to be done for you by us.. If you will continue this, somebody will use idea without you participating in it at all.. You can start from 3D model. Download 3D application e.g. Blender, LightWave etc. model motor and animate it. Render to image sequence. Then render video. Make professional appealing video with lecturer and present it on Kickstarter. The first stage of building a prototype could be 1) buy 3D printer. Once you will have it, remake what you presented on previous showcase in the real world. This way people will see that it is serious project and will give you even more money to e.g. buy CNC and make metalic prototype. Or invest these initial ~ 500 usd in 3D printer by yourself.
-
To implement MMU you need knowledge how to program MMU. https://en.m.wikipedia.org/wiki/Memory_management_unit To implement FPU you need knowledge how to program FPU. And how to store IEEE 754 in memory. https://en.m.wikipedia.org/wiki/IEEE_754
-
I can help you: "grow up"..
-
On incentives to cure or not to cure diseases or disabilities
Sensei replied to ScienceNostalgia101's topic in Speculations
That reminds me situation from the past. Language teacher was giving novels to read in such quantity it was physically impossible to read them all and learn anything else including other disciplines, basically 24h was not enough to read them all, forcing the all students in the class to use ready novels summaries instead of reading these books for real. Does it count as cheating if you read brief book summary instead of the real book? Teachers who really bother about it, often ask tricky questions about details which can be known only by person who really spent time reading a book.. Flood of knowledge and great amount of books to read in a short period of time forces students to cheating and taking shortcuts.. -
If you will hover by mouse pointer that little icon on PC desktop/laptop machine there will appear bubble help with details "(...) joined recently". It changes with icon image. In your case it is shield and text "swansont is a moderator".
-
Where do algorithms go in the java program heiarchy
Sensei replied to ALine's topic in Computer Science
Read Java manual.. e.g. https://docs.oracle.com/javase/specs/jvms/se7/html/index.html https://en.m.wikipedia.org/wiki/Java_bytecode There are even physically existing CPUs which understand Java bytecode natively. https://en.m.wikipedia.org/wiki/Java_processor -
Where do algorithms go in the java program heiarchy
Sensei replied to ALine's topic in Computer Science
That is correct. Object and class are building blocks in Java language. Program written in C/C++ is compiled to machine code. Understood by some physical processor. It runs directly only on CPUs which understand it. Program written in Java is compiled to special code. It is executed on virtual machine. Simulation of the real computer. This disallow program direct access to mother machine devices and resources. e.g. if you allocate memory in Java it is from JVM heap. It is problematic on Android for example. Default heap size on my smartphone is.. 128 MB per app. Programmer has to set special field in manifest largeheap=true to get 512 MB. Virtual machine interprets Java special code to the real processor instructions. -
This is good for a beginner: https://www.w3schools.com
-
Where do algorithms go in the java program heiarchy
Sensei replied to ALine's topic in Computer Science
Read about spatial database: https://en.m.wikipedia.org/wiki/Spatial_database e.g. Google maps, computer game playfield, stars and galaxy database etc. It is an example of data which dictates the most optimal algorithms to store and query records. Sorry. That part was meant to be together with the rest of my reply but was split to two by Prometheus's post written in the middle of my longer reply. -
Where do algorithms go in the java program heiarchy
Sensei replied to ALine's topic in Computer Science
There is no sense to use Kd-tree or octree algorithms on data which are not 3 dimensional. There is no sense to use quad tree on data which is no 2 dimensional. So the number of dimensions of data forces programmer to use or not use specific algorithms. OP said: Therefore I replied, "blackbox is not an algorithm".. No teacher would say "let's apply the blackbox algorithm".. Blackbox is lack of knowledge about specific implementation by unauthorised people. e.g. programmer executing method Collections.sort( list ); has no idea whether it is quicksort algorithm or bubble sort algorithm. Authors of this method/class know what is algorithm used there in the reality. 3rd party programmers don't. Unauthorised programmer can gain knowledge about specific implementation by reverse engineering the code. -
Where do algorithms go in the java program heiarchy
Sensei replied to ALine's topic in Computer Science
Blackbox means that you have no idea how 3rd party library or class is working internally and it can be changed at any time by the creator e.g. your app connects to database. It could be MySQL, SQLite, in-memory db, or something less recognizable.. Blackbox is not an algorithm. Usage of certain algorithms sometimes force programmer to use of specific solutions e.g. hash map requires that class will calculate hash code for supplied data. Lack of proper implementation of hash code method e.g. return 0 all the time, will lead to useless non optimal hash map which will work slower than plain list/array. If you are expecting there will be very few elements in the collection there is no sense to use hash map. It will just slowdown. The amount of elements in collection dictates you what algorithm you should use to have the quickest and the most optimal access to a single element. e.g. list/array of strings (specific data source) "begs" for being sorted alphabetically and then usage of binary search algorithm to find exact element (string) on the list. Binary search algorithm will find element in O(log2(x)) instead of O(x). Make graph f(x) of both functions to see how much can you gain depending on value of x. -
@Dave if you will compare computer version of the forum with mobile version of reply UI panel, you should see there are missing buttons e.g. subscript and superscript icons in mobile. Is it fixable?
-
Don't try to understand, just use them.. You don't understand how computer works but still use it either. Understanding how something works grow together with the amount of stuff that you wrote (programmed). It is not heart surgery. Don't have to know how it works internally with great details. Bugs and problems are unavoidable and common day stuff for any programmer. The best programming tutorials for beginners IMHO are the one which explain "How to write app xxx". Because they are not boring. You immediately see effects. You repeat what tutor is presenting and together with him or her repeat line by line. Attempt to explain everything will lead to uberboring textbook. To store name you need e.g. string. In C++ you write: std::string first_name; Then you need to have surname: std::string surname; Then you need age. Age is integer with years. int age; put them in separate class together: class Person { std::string first_name; std::string surname; int age; } You need to create object of this class so you use: Person *person = new Person(); and you need to initialize it: person->first_name="John"; person->surname="Doe"; person->age=34; Abstract/custom data type. For app which stores people data. You don't need to know how std::string was implemented. And you will never know it. It is blackbox. You can only know what methods and fields were exposed to public and read about their parameters and properties in the reference.
-
FPU stands for Floating point unit. https://en.m.wikipedia.org/wiki/Floating-point_unit ALU stands for Arithmetic logic unit. https://en.m.wikipedia.org/wiki/Arithmetic_logic_unit If CPU has no builtin instructions which operate natively on the datatype, they need to simulate it in normal code. Such virtual datatypes are created in every C++ or Java project. Programmer-scientist usually needs to have limitless resolution of the number so needs to make (or find library with ready solution) which will allow much better precision than 64 bit integer to 64 bit double. CPU which has no FPU built-in nor external FPU had to simulate IEEE 754 in regular code. If you would like to have 128 bits or 256 bits floating point number you would have to make such code by yourself. It is kinda fun task.