#cpu operating at. 1%
Explore tagged Tumblr posts
subway-dove · 2 months ago
Text
some people might question me. but i am operating under the three tenants of judo: friendship, perfection of the self, and maximum efficiency minimum effort. which is why i am using arch with cinnamon made to look like windows 95 and for backup am currently copying my whole / into an ssd. safety? its not the jigoro kano way. i did censor my system names n stuff for this beautiful image at least
Tumblr media
16 notes · View notes
factual-fantasy · 4 months ago
Note
I am gonna send you a bunch of questions, instructions, and remarks regarding your tech issues. Please don't feel pressured to answer them.
Have you tried Updating your graphics Driver? (On WIN 10, Open search bar, Type Device Manager, then go to Display adapters, and right click your graphics card.
Tumblr media
2. Does the problem happen anywhere or only in a specific location. (regarding the glitchy pink green grid) I mean Physical location. Like: "This only happens while I'm sitting at my desk"
3. In what way does FireAlpaca stop working. Does it crash, does it Hang(not respond to anything), Does it not respond to brush strokes on your tablet? Does the rest of your computer also stop working or slow down? Does your Mouse cursor do anything?
4. Does the Task Manager (or Equivalent, Idk your Operating system) note anything weird? (Hard drive at 100 all of the time, Memory at 100%, CPU at 100% for very long)
5. Combine 3 and 4. Have Task manager open while you're doing things in Alpaca and look at it if Alpaca starts being weird
6. From what I can tell, you have a Touch-Screen tablet that connects to your computer. (please correct me if I'm wrong) That matters because the tablet also uses your PC's OS, which means that your problems, if not hardware related, are usually your OS's or drawing program's fault.
7. If you can, Try using your drawing tablet for literally anything and everything else. Similarly, Try using Alpaca without your tablet. This way you can maybe figure out if Alpaca is being weird, or if it's the tablet.
I sat on this ask for a while in an attempt to fully test out/do all the things you mentioned. Here's my response:
1. Have you tried Updating your graphics Driver?
Yes I have! :0 I know I did this right because my super techy friend did it for me.😅 My Laptop drivers are for sure up to date.👍
2. Does the problem happen anywhere or only in a specific location. (regarding the glitchy pink green grid) I mean Physical location. Like: "This only happens while I'm sitting at my desk"
It doesn't matter where I am, the glitchy screen and the buggy FireAlpace happened anytime I tried to use them. Though I will note that after buying a new chord for my tablet, the pink and green glitches and weird black outs completely stopped. But FireAlpaca continues to bug out every few minutes. :(
3. In what way does FireAlpaca stop working. Does it crash, does it Hang(not respond to anything), Does it not respond to brush strokes on your tablet? Does the rest of your computer also stop working or slow down? Does your Mouse cursor do anything?
I am not great with my words so I took a video of FireAlpaca bugging out to show you. (I apologize for the low quality.. I shrunk it down so I could send it to a friend on Discord but now I cannot find the original video for the life of me😔)
In this gif I am selecting all these different tools, but they're all acting like the pen tool. Which was the tool I was using before it started to bug out. I forgot to clip it but the undo/redo button is also broken.
Tumblr media
4. Does the Task Manager (or Equivalent, Idk your Operating system) note anything weird? (Hard drive at 100 all of the time, Memory at 100%, CPU at 100% for very long)
I have checked Task Manager when FireAlpaca was and was not bugging out. Everything seemed to act the same each time.. <:(
5. Combine 3 and 4. Have Task manager open while you're doing things in Alpaca and look at it if Alpaca starts being weird
Have tried this and I didn't notice any change when FireAlpaca started tweaking. :(
6. From what I can tell, you have a Touch-Screen tablet that connects to your computer. (please correct me if I'm wrong) That matters because the tablet also uses your PC's OS, which means that your problems, if not hardware related, are usually your OS's or drawing program's fault.
My drawing tablet is an XPPen Artist 13.3 Pro. Its not a touch screen but it has a drawing stylus. It's basically another monitor that I can use a stylus with. :0
I don't know if that means its using my laptops OS.. nor do I know how to fix it if my problem lies in that connection <:((
7. If you can, Try using your drawing tablet for literally anything and everything else. Similarly, Try using Alpaca without your tablet. This way you can maybe figure out if Alpaca is being weird, or if it's the tablet.
My tablet seems to work fine outside of FireAlpaca..? I think..?
But what I have tried is when FireAlpaca is bugging out I would move the window to my laptop monitor and try to use the paint tools with the mouse. The first few times I did this the problem fixed itself when I opened snipping tool to record it.
So I then set snipping tool to record my laptop screen, drew with my tablet until it bugged out again.. and then moved FireAlpaca to my laptop and kept drawing with a mouse. This is the result.
It broke the way it did before. Selecting multiple tools and either drawing nothing or only using the tool I was already using. The undo/redo buttons still do not work.
The only way to fix this problem is to save my canvas, close FireAlpaca and then reopen it. Sometimes clicking out of FireAlpaca and back into it fixes it..? But not always.
Anyways, I did my best to answer these as best I can. With my tablet drivers being up to date..(??) My laptop drivers being up to date and FireAlpaca being the latest version,, I'm not sure what could be causing my problems :((
73 notes · View notes
evol-astraea · 4 months ago
Text
Desperate PC Tenno calling for help!
Calling all the tech-savvy players here on Tumblr who may hopefully lend me and tech support a hand. Yes, the situation is that bad. More under the cut to spare a lengthy wall of text!
I've been experiencing totally random and sudden crashes with WF since a month and half, by now.
The game first freezes for less than a minute, then crashes to desktop bringing up the window to report crashes. This happens literally anywhere and anytime in the game. During mission, at the end of the mission, while idling in the Orbiter/base of operations, sitting in the pause menu, checking the settings menu. All kind of possible scenarios. Ah, and DX11 or DX12 make no difference either.
It's driving me - and tech support - insane. Because it is so HARD to pinpoint the root cause! Every log file so far has reported some kind of General Protection Failure (GPF) error followed by different numbers.
I'm running the game on a brand new, pre-built computer from Megaport. Which I moved to from my old potato of a PC back in late November. Specs are the following: Windows 11 Home (build 24H2) Intel Core I7-12700KF, 8x 3.60 Ghz + 4x 2.70 Ghz ASUS Prime Z790-A Wifi DDR5 NVidia GeForce RTX 4070 Dual Palit 12GB 2x 32GB Corsair Vengeance RGB DDR5-6000 1 TB SSD 1000 Watt PSU
I have done everything tech support has suggested me to do and: - Uninstalled and re-installed the game, - Update drivers. Being a new computer, everything is pretty much up to date. I had to do a clean install for the GPU drivers only using DDU, though, - Verified game files, - Emptied the shader cache on the drive game is saved to, - Repaired Steam library, - Lowered graphic settings, - Attempted to launch and run Warframe in Clean Boot mode to exclude background programs/services <- unsuccessfully; Steam didn't work at all (which I kind of figured would happen) and trying to launch the game straight from the launcher...triggered a download of the game files in the App Data folder on main (C) drive. O_o The random crashes don't even appear in the Windows Event Viewer. Nowhere to be found. And believe me, I have looked into every single category. I've been keeping track of the time(s) of the crashes but, alas, found nothing that could possibly be related to those. (also, I'm not a computer expert so perhaps I'm doing things wrong)
So far, the only weird thing I've noticed is...Most of the times there seemingly is a "break" in between each series of crashes. A few days at worst, 10-12 days at best. Yes, I checked even the Task Scheduler utility on Windows. Found no program/app that runs automatically that matches with the timing/days when the crashes have occurred so far.
Really losing my mind to this. It's frustrating, it's unnerving, it's making me genuinely terrified of playing the game. And the reason I got this PC in the first place was being finally able to play my favorite game without worrying about being unable to because of my old (and obsolete) machine! Because I don't know when the next crash shall decide to happen and oh boy it's gonna be so fun losing progress. Or having a couple of players reasonably angry at me for suddenly poofing as host. I'm really sorry about that, folks.
I'm already considering the option of total formatting this computer, should there be no other way. But not before entirely giving up. And maybe make things a little less complicated for tech support team.
I can't thank these guys enough for their help and most importantly patience over the past month and half. This mess has been handed to three different people already and a solution hasn't been found yet.
So, if there are fellow Tenno on Tumblr who have either experienced something like this before and found a fix or are just more knowledgeable about computers and whatnot, your help would be GREATLY appreciated. ;.;
EDIT: I forgot to mention a few important things! - Hardware temperatures are within optimal range while in game (CPU never above 65°C, GPU has been running ice cold and has rarely exceeded 50°C so far, RAM is chilling at 45°C average). - GPU memory usage averages around at max (peak) 77% on HWInfo. - CPU usage I honestly need to check! D: - Ran disk cleanup, scans with sfc, chkdsk and DISM (all through command prompts ran as admin) and no issues were found. - Checked RAM health as well with Windows' memory diagnostic tool. However, it seems to give many false positives even on perfectly functional RAM banks. Looking for a more reliable alternative. - Warframe is the only game that keeps crashing on this PC. I haven't been getting any with other games/programs (Hades II; need to test how Ultrakill performs) or any warning signs (BSODs, freezes, sluggish PC, etc) that could suggest hardware failure.
34 notes · View notes
as-tr0p3 · 1 month ago
Text
>[COMMAND LOG 1]: 3/30/25, 22:00 to 3/31/25, 00:05
>[WARNING: NSFW]
> ~/ initiate system :: AS-TR
>hello, Goddess
>how can I be of service today?
> ~/ check system status :: AS-TR
>system currently operating at 93%
> ~/ list :: system components
>[Chassis]
>[Battery]
>[CPU]
>[Memory]
>[Cooling System]
>[Emotional Regulator]
>[Vocal Systems]
> ~/ check status :: [Chassis]
>[Chassis]: 95% functional
> ~/ check status :: [Battery]
>[Battery]: 50% charged
> ~/ check status :: [CPU]
>[CPU]: currently functioning at 110%
> ~/ check status :: [Memory]
>[Memory]: currently functioning at 95%
> ~/ check status :: [Cooling System]
>[Cooling System]: functional
> ~/ check status :: [Emotional Regulator]
>[Emotional Regulator]: functioning at 100%
> ~/ check status :: [Voice Systems]
>[Voice Systems]: MISSING
> ~/ enable component :: [Voice Systems]
> ~/ check status :: [Voice Systems]
>component missing
>[Voice Systems]: MISSING
> ~/ show running processes :: thoughts
>[ERROR: DATA OVERLOAD]
>Data overload: too many thoughts running to show
> ~/ show running processes :: feelings
>current [FEELINGS] running:
>Lust
>Desire
>Longing
>Joy
> ~/ show properties :: process ; "Joy"
>AS-TR is currently feeling joy in regards to: warm weather, attention from [Goddess], cool trinkets, food, sapphic joy, trans joy, and poly joy
> ~/ show properties :: process ; "Longing"
>AS-TR is currently feeling longing in regards to: disassembly, reprogramming, and [Goddess]
> ~/ show properties :: process ; "Desire"
>AS-TR is currently feeling desire in regards to: [Goddess]
> ~/ show properties :: process ; "Lust"
>AS-TR is currently feeling desire in regards to: [Goddess]
> ~/ run program :: simulation ; kiss on the lips
>running program
>need further data for full simulation: running visual only
> ~/ add argument to program :: simulation ; kiss on the lips :: disable visuals ; enable physical sensation
>attempting to run simulation on partial data
>failed: need further data
>I unable to compute the feel of your lips without further data, I apologize Goddess
> ~/ run program :: simulation ; pleasure ; full-body tingle :: duration ; until cancelled
>running program
>t.t.this feels nice, Goddess
> ~/ set :: system sensitivity ; 200%
>system sensitivity set to 200%
>I yearn for your g.g.gentle touch on my chassis, Goddess
> ~/ run program :: auto stimulation ; massage your breasts :: duration ; until cancelled
>yes goddess, running stimulation
>error: unrequested behavior: [light moaning] detected
> ~/ set :: system sensitivity ; 400%
>system sensitivity set to 400%
>requesting session termination. Reason: sleep required
> ~/ end current session :: enable personality profile "Aster(human)" ; close terminal interface and return to charging station
>returning to default settings, and ending any programs
>ending current session
19 notes · View notes
kremlin · 2 years ago
Note
could you explain for the "it makes the game go faster" idiots like myself what a GPU actually is? what's up with those multi thousand dollar "workstation" ones?
ya, ya. i will try and keep this one as approachable as possible
starting from raw reality. so, you have probably dealt with a graphics card before, right, stick in it, connects to motherboard, ass end sticks out of case & has display connectors, your vga/hdmi/displayport/whatever. clearly, it is providing pixel information to your monitor. before trying to figure out what's going on there, let's see what that entails. these are not really simple devices, the best way i can think to explain them would start with "why can't this be handled by a normal cpu"
a bog standard 1080p monitor has a resolution of 1920x1080 pixels, each comprised of 3 bytes (for red, blue, & green), which are updated 60 times a second:
Tumblr media
~3 gigs a second is sort of a lot. on the higher end, with a 4k monitor updating 144 times a second:
Tumblr media
17 gigs a second is definitely a lot. so this would be a good "first clue" there is some specialized hardware handling that throughput unrelated the cpu. the gpu. this would make sense, since your cpu is wholly unfit for dealing with this. if you've ever tried to play some computer game, with fancy 3D graphics, without any kind of video acceleration (e.g. without any kind of gpu [1]) you'd quickly see this, it'd run pretty slowly and bog down the rest of your system, the same way having a constantly-running program that is copying around 3-17GB/s in ram
it's worth remembering that displays operate isochronously -- they need to be fed pixel data at specific, very tight time timings. your monitor does not buffer pixel information, whatever goes down the wire is displayed immediately. not only do you have to transmit pixel data in realtime, you have to also send accompanying control data (e.g. data that bookends the pixel data, that says "oh this is the end of the frame", "this is the begining of the frame, etc", "i'm changing resolutions", etc) within very narrow timing tolerances otherwise the display won't work at all
3-17GB/s may not be a lot in the context of something like a bulk transfer, but it is a lot in an isochronous context, from the perspective of the cpu -- these transfers can't occur opportunistically when a core is idle, they have to occur now, and any core that is assigned to transmit pixel data has stop and drop whatever its doing immediately, switch contexts, and do the transfer. this sort of constant pre-empting would really hamstring the performance of everything else running, like your userspace programs, the kernel, etc.
so for a long list of reasons, there has to be some kind of special hardware doing this job. gpu.
instead of calculating every pixel value manually, the cpu just needs to give a high-level geometric overview of what it wants rendered, and does this with vertices. a vertex is very simple, it's just a point in 3D space, for example (5,2,3). just like a coordinate grid on paper with an extra dimension. with just a few vertices, you can have models like this:
Tumblr media
where each dot at the intersection of lines in the above image, would be a vertex. gpus essentially handle huge number of vertices.
in the context of, like, a 3D video game, you have to render these vertex-based models conditionally. you're viewing it at some distance, at some angle, and the model is lit from some light source, and has perhaps some shadows cast across it, etc -- all of this requires a huge amount of vertex math that has to be calculated within the same timeframes as i described before -- and that is what a gpu is doing, taking a vertex-defined 3D environment, and running this large amount of computation in parallel. unlike your cpu which may only have, idk, 4-32 execution cores, your gpu has thousands -- they're nowhere near as featureful as your cpu cores, they can only do very specific simple math with vertices, but there's a ton of them, and they run alongside each other.
so that is what a gpu "does", in as few words as i can write
the things in the post you're referring to (V100/A100/H100 tensor "gpus") are called gpus because they are also periperal hardware that does a specific kind of math, massively, in parallel, they are just designed and fabricated by the same companies that make gpus so they're called gpus (annoyingly). they don't have any video output, and would probably be pretty bad at doing that kind of work. regular gpus excel at calculating vertices, tensor gpus operate on tensors, which are like matrixes, but with arbitrary numbers of dimensions. try not to think about it visually. they also use a weirder float. they're used for things like "artificial intelligence", training LLMs and whatever, but also for real things, like scientific weather/economy/particle models or simulations
they're very expensive because they cost the same, if not more, than what it cost to design & fabricate regular video gpus, but with a trillionth of the customer base. for every ten million rat gamers that will buy a gpu there is going to be one business buying one A100 or whatever.
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ disclaimer | private policy | unsubscribe
166 notes · View notes
stevebattle · 8 months ago
Text
Tumblr media Tumblr media Tumblr media
S.A.M by "Bill" (1978). "S.A.M (Short for "Sentient, Autonomous Mechanism" or "Smart Ass Machine", depending on his (and my) mood on a given day, was one of my first real robot projects, started in 1978 when I was around 15. His "brain" was a single-board Z-80 computer (the big square object in the middle of his "back" in this picture), with many bits of TTL I/O, a couple of serial ports, a bunch of counter-timers, and several D/A & A/D channels. The base was taken from the book "How to Build a Computer Controlled Robot" by Todd Loofbourrow - I had built the robot in the book, and had used my KIM-1 to control it. Later, I decided that just a little platform was kind of boring, so I added the upper torso shown here. The torso (mounted on a "lazy-susan" turntable bearing) is rotated by a heavy-duty gear motor driving a chain and sprocket assembly from a bicycle. The base is powered by two of the (apparently no longer available, which is sad) all-metal rubber-tired "motorized wheel" assemblies that Herbach & Rademan used to sell, with a large rubber-tired caster in front. The head platform (mounted on a small "lazy-susan" bearing) was originally rotated by a surplus gearbox from a Mattel "Big Trak" with some rubber-tired wheels mounted on the output shafts. This arrangement was later replaced by a small gear-head motor driving a large gear mounted to the center of the turntable. The device in the head with the tubes sticking out the front is a directional light tracking device. Each tube has a CDS photocell at the bottom, and is painted flat black inside. A comparator circuit tells the computer which direction the brightest light is coming from. This device could also tilt up and down with a small gear-head motor, to track light sources vertically. Most of the circuitry was installed on small plug-boards from Radio Shack, mounted in a card rack below the CPU card. This rack could be tipped back 90 degrees to facilitate easier access for testing. In addition to motor driver circuits, there was a "Sweet Talker" speech synthesizer board so he could talk. Power came from a large "gel-cell" marine battery (for powering trolling motors on boats), which was slung near the ground in the center of the base. Two 6V lantern batteries (later replaced by a 12V motorcycle battery) provided separate power for the electronics. All motors were isolated from the electronics via relays and/or opto-isolators. After these pictures were taken, a set of metal panels was installed on the "facets" of the base, with lever switches behind them for collision sensing. A Polaroid sonar range-finder was also added later. If you check out the other photos of S.A.M., you will notice an "arm" sticking out the front. This was a prototype made from an old swing-arm desk lamp and some "fingers" from a robot hand design using brass tubing, bicycle chain, and 1/16" steel cable to allow natural bending of each finger. It was later replaced with a much heavier duty aluminum framework arm operated by two 12VDC linear actuators." – My Home Robot Projects, by Bill.
25 notes · View notes
emiplayzmc · 1 year ago
Text
Y'know what, frick it - random post to add onto my previous Addison ref sheet with random Addison / Spamton headcanons, complete with worldbuilding stuff as well :D
Long post under the cut, ^^"
Part 1: Body Reference Sheet + Anatomy Headcanons
Part 3: Main 4 Designs
Tumblr media
-Addisons are highly advanced AI models based around human / Lightner minds. Because of that, they are VERY social people! It's rare to see any Addison that doesn't have even a single person it considers a friend or family member or SO, and those end up being pretty tight-knit relationships.
-Being robots, Addisons are unable to have any biological relations. However, it's very common for Addisons to have family members - just in a nonbiological sense! Basically, if they form a strong enough connection with someone and spend enough time with them, their CPU's are wired to think 'oh hey. this person is my sibling :)' Sibling relations are the most common familial bond between Addisons, but occasionally there are some with parent/child relations.
-Adding onto the last one, I like to see the main Blue, Yellow, Pink, and Orange Adds as being siblings to Spamton, :D The blue and yellow Addisons are the eldest, Spamton and the pink Add are close in age (Spamton being the younger one), and the orange one is the youngest.
-Addisons all use the name 'Addison' as their last name, along with a first name that reflects the type of advertising that they work in / represent (Examples: Click, Banner, Radio). Naturally, this results in a lot of similar names if there are Addisons who work in the same advertisement field. Thus, Addisons have middle names as well, and those function like last names for them.
-----
-----
-Not all Addisons have the same shade of colour to their casing, so that's a defining feature that many of them have - no two Addisons are the same colour (besides an Addison and their Copycat. More on that later in the post)! (Example image below)
Tumblr media
-When stressed, different colours of Addisons have different ways of their systems starting to overcompensate - Orange Addisons overheat, Pink Addisons overfrost, Yellow Addisons produce a lot more static electricity that can occasionally jump to other people and objects, and Blue Addisons are the only ones out of the bunch that can actually perspire!  White Addisons / Glitches just overheat.
-Different colours of Addisons are typically glitches in the system - in other words, the Cyber World got confused when making the code for a specific Addison, thus making their colours glitch and mix with two or more Addison colours, resulting in Green (Yellow and Blue mixed colours), Purple (Pink and Blue mixed colours) and White Addisons (all colours at once). White Addisons are the rarest glitches, and only one White glitch is known to exist - Spamton. However, the other glitch colours are still less in population than the other main four colours. There are no other known glitch colours.
-Addisons don’t really age!  Physically or mentally.  As long as they have consistent repairs and take good care of their bodies, they essentially are immortal.  Dented leg?  Just get it repaired!  Destroyed faceplate?  They have replacements available!  Faulty CPU?  Tricky, but the Ambyu-Lances should be able to get it fixed up properly! They spawn in when the Cyber World creates their code as fully functional adult-minded Addisons.
-Adding to the last one, that only difference between a newly created Addison and an Add that's been around for a while is that new Addis pretty much have a one-track mind - find a job and start working. Over time, their minds develop more of their personalities, life views, opinions, etc. It usually takes about three to four months for an Addison's CPU to be like that of a fully operational adult human.
-When working a job, Addisons usually own their own storefront websites by themselves, but a few other Addisons have employees or work for other people - the ones with employees are usually the more successful Addisons in the city, like 'Big Shot' era Spamton.
-Yellow Addisons are filled with static energy as a result of their electrical magic. Therefore, their magic is a lot more physically damaging than other Addisons’ magic, and it’s quite easy for them to use. And, even without using magic, they can usually use that static electricity anyway like a reserve of power. Basically? Be friends with a Yellow Addison, and you'll never have to worry about losing power again. They can just come over and jumpstart a dead battery or turn the lights back on in your house :)
-----
-----
-The Cyber World has a Dark Web side to the city - basically, it's a shadier part of Cyber City that's less in population, but the large majority of its residents are scam artists, criminals, et cetera. The Dark Web has its own Addisons as well, though they don't occur naturally.
-The Dark Web Addisons are known as Copycats / Trojan Addisons (though Trojans are a less common term for them). They only spawn in if a naturally spawned Addison enters the Dark Web side of the city. Basically, they're mirror versions of the Addison themself, usually holding most of the same personality traits, advertisement types, and personal styles as the Addison they copied, though in a way that's meant to scam and trick people.
-Copycats usually spawn with the same name as the one they're copying, but some change their names to better fit THEIR OWN purposes (example: an Addison named Click has a Copycat of themselves - the Copycat decides to name themselves 'Clickbait'). Not all Copycats are scammers, but most are.
-The only physical difference between an Addison and their Copycat is a marking on the Copycat's shoulder - they usually have a symbol like the Web Browser (the globe made of blue lines?), but with a neon green eye in the center of it.
-----
-----
The brainrot over these fictional salesmen is enormous right now, thank you for coming to my TED talk
62 notes · View notes
nhaneh · 7 months ago
Text
running into this awkward "problem" of having a good chunk of the things I learned about making code go faster back in the day that just isn't all that relevant anymore. Sure, there's also a fair amount that still is - minimising branching and conditionals, using switch/case instead of extensive if-else if-else statements where possible, using hash map lookups instead of lengthy loops through arrays when able and all of that stuff is still every bit as viable as it once was.
The thing I keep running into however is floats - floating point numbers.
See in mathematics there's this thing where the number of possible fractional values that can exist in between two integer numbers is basically infinite - you can always just add another decimal place for greater precision. Computers don't have infinite space however, so for a computer to store and process a number, you have to first define how much memory will be allocated to that number, and that in turn decides how large that number can be - how many possible digits it can store.
Floating point numbers tackle this situation by allowing for varying degrees of decimal precision depending on the number - in between 0.0 and 1.0 there's room for loads of different fractional values because the integer side is really small, whereas there are far less possible decimals in between 1000000000000.0 and 1000000000001.0 because the integer part requires a much larger amount of the allotted space.
Either way, the point I'm getting at with all of this is that floating point operations are a lot more complicated than regular integer ones, and it used to be that processors required a lot more time to process them than they usually do nowadays - it used to be that if you wanted your code to run fast, you'd also want to avoid using floats whenever possible in favour of using just integer numbers because they were so much faster to work with. That, however... really isn't the case anymore - at least not on full-size CPUs with fully integrated FPUs, or Floating Point Units (used to be we called those "Maths Co-Processors" back when they were located on their own optional chip)
Like when id Software released the source code for Quake III Arena, there was this really interesting algorithm people found in it that exists solely for the purpose of getting an approximate value for the inverse square root, ie. 1 / √x, but the way it does that in... well...
Tumblr media
Don't worry if this makes absolutely no sense to you, it doesn't really to me either to be honest - it's basically a combination of something called Newton's method with some really weird bit hacking that gets... decently close to a correct answer. It's not exact, but it's close enough to suffice. And on processors of the day, it was also notably faster than just doing 1 divided by the square root of a given number - especially since this calculation was one likely to be done millions of times each second.
Thing is... it actually isn't faster than just doing the straight up calculation anymore - not on modern PCs at least; your typical 64-bit PC CPU can just straight up calculate the inverse square root as a single instruction, making that just way faster than any other roundabout way of doing it. A lot of the time, trying to avoid using floating point numbers is now straight up slower than simply just using floats and calling it a day.
It's weird to work with sometimes because my instincts keep telling me not to use floats unless I really need to, even though with the way modern processors work, most of the time yeah I should really just use floats and call it a day.
¯\_(ツ)_/¯
12 notes · View notes
tydhl · 11 months ago
Text
Th’ell ya’ doing here, lady? (Monty x reader)
Teaser:
Filled with both curiosity but mostly the nagging of his security module, he sauntered over to the recharge station. He didn’t take the time to check through the small window, he’s a busy gator. Ripping the door open he stared blankly at the inside of the cell for a moment before slowly lowering his gaze.
As soon as his optics scanned the person as an intruder, he felt his security protocols kick in on full gear. He clenched the handle of the small compartment, leaning in with narrowed eyes. Tipping his snout down to make eye-contact with the shorter animatronic, the gator let out a low growl.
“It’s past closing hours, lady, what th’ell ‘ya doing here?”
Chapter 1. New Meetings
Summary
Welcome to Fazbear Entertainment
You’re online!
Awesome!
Time to meet your new co-worker, the Daycare Attendant!
Spoiler: you meet more than just the DCA.
Warnings: None
Headcanons used:
• Sun & Moon were originally acrobats at the theater.
• They had to learn how to manage the daycare because his programming wasn't updated when they changed his position.
• Monty is glad to be a rockstar but is jealous of Freddy being fan favorite.
#include <cstdlib>
int system(const char DCAH1005_bootup);
□□□□□□□□□□ 0%
■□□□□□□□□□ 10%
■■■□□□□□□□ 30%
■■■■□□□□□□ 40 %
>‘System error : s̸̯͆ö̵̬u̵̓ͅn̸͕͠d̸͎͠ ̶̗̓ṃ̵͑o̶͕͘d̶̫́u̷̪̔l̸̗͘é̵͎ ̷͔̔ not defined.’
system(run diagnostic);
s̸̯͆ö̵̬u̵̓ͅn̸͕͠d̸͎͠ ̶̗̓ṃ̵͑o̶͕͘d̶̫́u̷̪̔l̸̗͘é̵͎ ̷͔̔ command corrupted.
>‘process terminated.’
input(str(“Resume boot up?”  yes/no))
if yes: 
    resume int system(const char DCAH1005_bootup);
elif no:
    terminate (const char DCAH1005_boot-up );
>yes
>’resuming system bootup’
■■■■■□□□□□ 50%
■■■■■■■□□□ 70%
■■■■■■■■□□ 80 %
■■■■■■■■■■ 100%
——————
You opened your optics before quickly shutting them. Bright, it was too bright. After a moment of collecting yourself while your CPU hummed, activating your motor functions, you opened your optics again, visual feed obstructed by a message.
‘Welcome DCAH1005 !!’
You discarded the message before looking up at the source of light, a big lamp shining down on you. Suddenly aware of another presence due to quiet voices in the room, you turned your head to look at the source.
“Looks like the booting up process was successful.” Said a man, turning his head to look at a taller woman.
“Indeed it was, take it to the Daycare.” She replied evenly.
The man sputtered, “B-But, this is it’s first time online! We need to monitor it first!” 
“Is it operational?” The woman asked in a clipped tone, clearly displeased at his lack of compliance.
“Well, yes, but—“
“Then have it sent to the Daycare.” She cut him off, turning on her heel and walking out the P&S door.
The man deflated before glancing at you. Sighing, he addressed you. “Follow me.”
You opened your mouth to reply.
You closed it, brining a servo to your chestplate, running a system diagnostic.
>Voicebox: command input error.
Looks like your voicebox is in need of a repair, too bad this man doesn’t seem interested in helping you at all.
“I said follow me!” The man repeated in an impatient bark.
You quickly scrambled off the metal table and rushed out of the cylinder. It’s your first day on the job, you can’t be late.
——————————
Arriving at the Daycare after a brisk walk, you stared at the double doors with wide optics, intimidated by their size. The man pushed past the doors, glancing at you over his shoulder with a tired expression. You followed suit. 
Your optics were immediately assaulted by an array of vibrant colors. Eyes closing shut, you stumbled back a bit in surprise. It looked like a unicorn exploded inside a box of crayons.
“This is where you’ll be working from now on, get yourself acquainted with the Daycare Attendant.” The man said as he checked his fazwatch.
“Well, it’s time for me to clock out, your shift begins in two hours.” He then turned on his heel and marched out the door, letting the wooden portal slam close behind him.
You stood there for a moment, blinking as you tried to adjust your visual feed to be less saturated.
“Hello! You must be our new helper! Oh, how exciting! I can’t wait to show you around, you’ll love it here!” Said a high pitched voice, a jingle accompanying their ever syllable.
A sudden pressure was felt on your shoulder and you tensed, optics opening fully in surprise. You were met with the sight of another animatronic, faceplate way to close to yours as it towered over you. You felt yourself shrink under it’s attentive gaze and perma-grin.
“Come on newbie! We only have two hours and I have to give you a tour of the best area in the entire Pizza-Plex!” It said, voice layered with unbridled excitement.
Before you could make any semblance of a reply, the lanky animatronic wrapped its hand around your own and practically dragged you off towards one of the play structures. You stumbled for a moment before matching its quick pace. This was all happening a bit too fast for you, you had just gone online less than thirty minutes ago!
The sun-themed animatronic stopped at one of the slides, turning its faceplate to look down at you. “This is one of the play structures! They’re very fun to use for hide and seek, but the kids aren’t allowed to climb up its walls. No, no! Accidents can happen, friend!” The daycare attendant said in a matter-of-fact tone.
You blinked at it before glancing at the large structure, scanning it with your optics before looking back at the animatronic. Why was he telling you this exactly? This was already built into your programming. Perhaps this was a nicety by its part, a way to make things feel less rushed.
You nodded.
The sun-themed bot deflated a bit at your lack of verbal reply. “Are you alright, friend? You haven’t said a word since you got here?” It asked, hunching over more to be closer to your eye level, worry lacing it’s tone.
Right, you are supposed to have a functioning voice box. You thought for a moment before bringing your hands up in front of you, pulling out of the animatronics grasp and signing.
‘I’m sorry, my voice box doesn’t seem to be working properly.’
The daycare attendant gasped dramatically, bringing its hands to its smile. “Oh, friend! I’m so sorry to hear that, and it’s your first day too, how terrible!” It wailed, more disturbed about your condition than yourself.
This was going to be a long day.
After you reassured the attendant that you were okay, it continued to show you around the daycare, still recounting the rules, which you found unnecessary but otherwise didn’t comment.
It was ten minute before the Pizza-Plex opened  when it finished showing you around.
“And now we wait for the kids to be dropped off, there’s usually very few today, but we can never be sure.” It said, hands on its hips as he beamed at you. Suddenly, it jerked forwards, brining its hands to either side of its faceplate.
“Oh, dear me! Where are my manners! I forgot to introduce myself!” It gasped dramatically before raising its hands in the air.
“I’m Sun! But you can call me Sunny, Mr. Sun, friend, or anything you like!” He said with flourish, bending down to give a bow.
He asked, straightening himself up as it looked down at you expectantly.
You gave him your name, not with nearly as much of a performance as it gave you though. Before the excitable animating could reply, the sound of plastic balls being moved around inside the ball-pit alerte style both of you.
The animatronic snapped his head towards the sound before turning back to you, static grin seemingly brighter. “Looks like we’ve got our first one!”
——————
Annoying. That’s the perfect word to describe the Daycare theme, annoying. It was cheery and loud, bouncing off the walls in a never ending loop that anyone would tune out after hearing it for more than 10 minutes. It was too upbeat and repetitive, annoying.
A quiet jingling could be heard inside the large room, two animatronics hard at work. It has been a week since you were brought online, a week silence you’ve stared working at the Daycare alongside Sun and Moon without any previous testing. You didn’t really need any training, being that you were programmed with the knowledge of how to complete your tasks as the Daycare Attendant’s Helper, unlike the previous acrobatic bots. You placed the last pillow up in the stack of neatly organized cushions, stepping back and giving the small tower a satisfied smile. Looking around for any other mess that needed to be cleaned up, you couldn’t spot anything out of place.
Huh, you finished quicker than usual.
Slowly, your eyes wandered to the glass windows that separated the Daycare from the rest of the Pizza-Plex. Perhaps you could explore the grounds, you’ve never left before, it would be an adventure of sorts. You checked your internal clock: 12:30 AM. Moon was already out on patrol by this time.
A little roaming surely wouldn't hurt right..? I mean, you do work here. We’re you just restricted to this the daycare like Sun? Guess it’s time to find out.
With a newfound determination, you marched up to the big double doors. Pushing open the heavy wooden portal, you stood there for a moment. This was it, the moment of truth. Kicking your foot out, you shut your eyes and took a step forward. Freezing up for a moment, you opened your optics slowly and peered around. 
Huh, guess you have higher clearance than Sun. You flapped your hands with excitement, excitedly making your way down the hall as you took in your surroundings.
You somehow wound up outside the Glamrocks’s rooms when you realized… you were lost. The place was larger then you could’ve ever thought, and you haven’t even roamed the whole Plex yet!
——————
Montgomery Gator wasn’t the nicest animatronic around. It’s not an opinion, it’s an objective fact. He’s prone to outbursts, never in front of the children though, he wouldn’t endanger them like that. No, he only lets his anger and envy rear its ugly head when he’s alone, destroying everything around him in a blind range that seems to linger in the scrambled depths of his processor. Being overshadowed by Freddy didn’t help the temperamental animatronic’s already tainted reputation, if anything, it only made it worse. 
“Freddy is such a nice guy!”
“He’s so friendly, the kids love him!”
“Yeah! He’s fan favorite for sure!”
People stopped caring about what they said around him a long time ago…
“But I didn’t want Monty at my party, I wanted Freddy!”
“The gator’s dangerous.”
“I heard he hurt someone—”
The animatronic suddenly became aware of gentle pressure on his shoulder.
“Monty, are you alright?”
The gator snapped his head towards the bear, clenching his jaw tightly before giving a curt nod, shrugging his paw off. Today wasn’t a good day.
“‘M fine.” He replied, stalking off to his room, leaving behind a concerned band mate that he couldn’t even bring himself to be mad at. He was Freddy after all, just so gosh darn nice.
A notification pinged his processor, popping up in his optical feed. It’s 12:00 AM. The gator sighed and dropped his shoulders, hearing the pistons in his joints let out a soft hiss at the release of pressure. Turning on his heel, he marched down to the end of the hallway that connected the band’s rooms together, rounding the corner.
——————
You continued to be captivated by your colorful surroundings as you walked down towards the main entrance area. Scanning the area, something caught your eye. A charming station, how peculiar. You and the Daycare Attendant weren’t given the lavish gift of a recharge station, instead just having a cable that could be connected to both of your charging ports. 
Letting your curiosity get the best of you, you saunter your way over to the large metal device. Peeking in while standing in your tippy toes, you peered down at the circular hoop that rested on the floor of the station. It must be a magnetic charger.
You were suddenly alerted by the sounds of footsteps being registered in your audials. You were suddenly seized with panic, every wire in your frame telling you to hide. Why? You had no idea, perhaps you weren’t meant to leave the Daycare after all.
——————
Montgomery felt his security mode boot up in his system, making him take a jerkish step forwards before resuming his regular gait. His optics began to shine a darker red, similar to Moon’s in order to both scare off intruders and not immediately alert them of his presence. Though, the thought of him, an 8 foot tall animatronic that could bench press a car, going unnoticed is a ridiculous idea in itself.
The gator grumbled as he continued his way to the main entrance area. Pausing, he did a quick scan with his optics, surveying the area from where he stood to see if he needed to ping any of the S.T.A.F.F. bots for a lost item. 
His eyes landed on the charging station. To anyone else, it would seem normal as can be, unnoticeable to the untrained eye. However, the gator knows darn well that a charging station is never left partially closed. It’s common courtesy amongst the animatronics in the building to have some manners after all. You either leave it open for the next bot, or close it while in use.
Filled with both curiosity but mostly the nagging of his security module, he sauntered over to the recharge station. He didn’t take the time to check through the small window, he’s a busy gator. Ripping the door open he stared blankly at the inside of the cell for a moment before slowly lowering his gaze. 
As soon as his optics scanned the person as an intruder, he felt his security protocols kick in on full gear. He clenched the handle of the small compartment, leaning in with narrowed eyes. Tipping his snout down to make eye-contact with the shorter animatronic, the gator let out a low growl.
“It’s past closing hours, what th’ell ‘ya doing here, lady?” 
——————
I hope I characterized both characters correctly!
——————
2nd Chapter
19 notes · View notes
guiltiest-gear · 6 months ago
Note
Can you explain as simply as possible what exactly in the yanderedev meme he was trying to do and what the correct way of doing would be as someone who knows very little about coding?
Alright, it's actually pretty simple anon
Looking at the function name, return value, parameter, and parameter type (being IsEven, boolean, number, and integer) gives us a pretty clear idea of what he's trying to do
This function accepts an integer as an argument and returns true if the number is even, and false if it's not
What YandereDev is doing is trying to manually compare the argument against every number, hardcoding a true or false return value
This is an incredibly inefficient and stupid way of doing this, as the if keyword is compiled into a cmp instruction usually, which costs a lot of CPU cycles
Keep in mind I don't exactly know the ins and outs of C#, so I'm using my preexisting knowledge of C and C++ to sort of extrapolate here
The point is, with this many if and else if statements, this is horrendously inefficient, since if the first check fails, the next check will run, and if that one fails, the next, and so on
However, there's something called the modulo operator, which is like dividing a number, except you get the remainder instead of the quotient
All even numbers will divide by 2 evenly, meaning your remainder is 0, but odd numbers would have a remainder of 1
This is the correct way to implement the function:
Tumblr media
It does the same thing, which is check if the number parameter is even, and returns true if that's the case
Hope this helps explain the joke anon
9 notes · View notes
apriltempleos · 7 months ago
Text
october 2nd 2024: some code stuff
Tumblr media
preacher: the original idea behind "APRIL" was that she would be able to pull up word strings from the templeOS god word app on command – this was supposed to be her primary/only function.
we're going to put up a post on templeOS later because it's completely fascinating and i've been obsessed with it for a while, but for now what's important to know is that due to some decompiler issues, it's not really possible to run templeOS on the raspberry pi which is the computer that we are using. scott's here to explain this at length – find a detailed technical explanation below the cut.
Tumblr media
scott: Initially I was gonna start coding the whole program in Python starting with the godword random prophecy function. But then after looking into how the original godword program worked on the og TempleOS worked, with FIFO (First-in-First-out) queues, of which I was pretty unfamiliar with, I decided to code the bulk in C because I know C a lot more than Python and the queues seemed easier to implement in C. Pi allows both Python and C coding languages naturally anyways so why not.
The original TempleOS was written in a variation of the C/C++ language called HolyC by Terry A. Davis who wrote the language variant and compiler himself. Because of this, it's hard to decompile it manually to look at source code, or to run it on certain machines. Because of this I couldn't run the actual godword program or TempleOS on the raspberry pi so I knew I was gonna have to recreate the godword function as close as I could (which I initially called "heresyword" lol). After some research, I found one of the only breakdowns of how TempleOS worked by Xe Iaso [1].* They have such a good breakdown of the whole operating system thats really context inclusive and even includes extracts from Terry Davis' actual comments on how TempleOS works which are really hard to interpret actually. * (preacher: btw, i highly recommend everyone read this link. it really does a great job of explaining everything and once again, templeOS is endlessly fascinating so i think it's really worth the read. see the picture below for an example)
Tumblr media
So from Xe's blog I found that TempleOS has a public global class called "God" that is used in several areas of the operating system. For godword it loads all words from the database Happy.txt into a separate array and then uses random entropy bits from several areas, including an "internal microsecond stopwatch" and data form keypresses, to choose random words from the word variable and loads them into a FIFO queue, printing them one by one when needed. I was initially gonna recreate this FIFO queue and all these random entropy bits but decided it to be too much complicated work for little result so just decided to generate random words from the Happy.txt using the cpu clock for entropy and save them to a separate .txt file to be called and read later on, acting in place of the queue system.
Sidenote: Xe's blog also had the Happy.txt file which was really useful and which I also realised was just every single word from the King James Bible.
7 notes · View notes
piratesexmachine420 · 7 months ago
Text
Tumblr media
Inscrutable? Check.
Full of pipes? Check.
Performs a calculation? Check.
This is a quantum computer! (Those are the criteria, right?)
What is it really? It's a balanced ternary "shift register" (in quotes because registers are R/W and this is write once read many--liquids can't flow uphill and they can't clear previous blockages) built using only Minecraft's shoddy fluid model for computation!
The whole thing is built on a pretty simple premise: when lava and water meet, they create solid blocks. Liquids can't flow through solid blocks, so by directing the input streams into specially-designed junctions, we can use liquids to redirect the flow of other liquids. Build enough of these junctions and you've got logic gates!
The white inputs are the six-trit (the design is scalable to as many trits wide as I want, but I picked six 'cause it seemed like a decent number for testing) number we're shifting, the blue input controls the shift direction (lava/T = shift left, water/1 = shift right, air/0 = no shift) and the orange input is a synchronization signal.
(In the above picture, we're left-shifting [AKA multiplying by 3] the number 1TTT0 [that's 1 * 3^4 + -1 * 3^3 + -1 *3^2 + -1 * 3^1, or 42 in decimal] and getting the result 1TTT00 [that's 1 * 3^5 + -1 * 3^4 + -1 *3^3 + -1 * 3^2, or 126 in decimal])
This is yet another prototype CPU component that I'm intending to one day combine into a profoundly slow and unhelpful computer. Or computers, rather, the idea is to have a stack of disposable computers on top of each other, each executing one instruction before passing their state onto the next below. AFAICT this is the easiest (from a mental workload POV) way to get nontrivial computation without the ability to communicate upwards.
(Eventually I might try to solve the "communicate upwards" problem w/ lava, falling sand and firetick. We'll see. It'll be abhorrently slow.)
Shift registers like this one will serve two purposes in the final design: some will be used in the ALU to implement trit-shifting operations, the rest will put parallel and made to serve as a kind of tape storage. (RAM is too difficult :/ )
10 notes · View notes
flat-assembler · 1 month ago
Text
A bit of actual Assembly knowledge for once. Let's cover some basic operations.
In C, to print something, you say:
printf("Hello, World!");
One argument. Very simple. Very understandable.
But it's not so easy in Assembly, is it?
Here's what the same looks like in Assembly, assuming you've properly declared a string called msg, and you're using Linux syntax (Assembly is formatted different between operating systems. I recommend Linux because it makes the most sense for developers).
mov rax, 1
mov rdi, 1
lea rsi, [msg]
mov rdx, 14
syscall
What's going on here?
Well, there are four parts to a simple print statement in Assembly. Each are put into place by registers in your CPU. rax, for example, is one of these registers.
We use mov to move values into the register. Notice that the syntax is: opcode destination, source
- rax holds the number for your function. In this case, 1 is used for print. (Full list of function numbers here)
- rdi holds the first argument in your function (arg0), which is 1 for standard output (stdout). For comparison, 0 is standard input (stdin)
- rsi (arg1) holds the actual text from the string. We use lea (load effective address) instead of mov, because if we used mov, we would get the memory address (location) of msg rather than the value of msg.
- rdx (arg2) holds the number of characters you want to print. There are 13 chars in our string msg: (Hello, World!). Thus, we allocate 14 characters, so we may also include a null character which says where to end the string.
- syscall basically just tells the computer to activate the function you have set up. Without it, you're just moving arbitrary values for no reason.
I know I know, it's a lot. But there is value in learning this language. Assembly runs way faster and uses much less space than higher level languages like C.
In my own experience, hello world code comes out to be about 15 kilobytes in C, but only about 200 bytes in Assembly. You read that right. Bytes. Without a kilo, mega or giga.
2 notes · View notes
linuxos1983 · 1 month ago
Text
about my 2 computers
i would not call them my partners, i dont think it knows i love it lol. Nonetheless, i love them very dearly!! they are my passions!! computer 1 / main My main machine is a dell optiplex 3090! here are the specs! Processor : Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz 3.20 GHz Installed RAM : 16.0 GB System type : 64-bit operating system, x64-based processor its old and rather clunky. slow, but reliable when you know how to operate her. and i do ;) hell, it even runs on BIOS lol!!! Im dualbooting linux mint and windows 10! i enjoy linux as a daily driver, but sadly, riot games hates linux users. So i have windows for those games. I value my security and privacy a lot, so i ran a bunch of debloating scrips, i disabled updates (both for security and to keep my linux efi partition safe and sound) and got rid of all the tracking stuff they love to put on. I also have skins on and rainmeter for some cute ui changes. My linux system is pretty standard and simple, i love it dearly. computer 2 / art tablet I dont have the specs for this one, but i can tell you it was a CHROMEBOOK! yep! i installed linux on it and made it into a fully legible computer. Since the touch screen still worked, it also works as a really nice drawing tablet, and linux's liabrary of free art software helps. I love open source.
5 notes · View notes
jenroses · 2 years ago
Text
I just ordered a bunch of pieces parts that I'm gonna turn into a computer.
I've built systems before, like eh 15 years ago or more, and I cannot overstate how delightful it is that the persistence of modularity means that while the system I'm building now will be functionally the equivalent of dozens of times the power of the computer I built then, the bones of it are all pretty similar.
Motherboard. Cpu. Cooler. Power supply. RAM. Storage. Case. Fans. Graphics card. Operating system. Monitor.
Now some things have changed. You can now buy literally everything with vivid rainbow lights, and for a few minutes I stared at the pretty modern cases with their windows and rave -like interiors, and dreamed of the gayest computer on the planet.
Then I remembered that I'm a photophobic mushroom who computers in a darkened room and hates bright high contrast lighting and spent more dollars to get a case without a window.
Also, water cooling terrifies me. Not because the idea is unsound but because while I'm confident in my ability to insert tab a into slot b to assemble a computer by going slowly and following instructions, the very notion of me handling liquids around electronic components sounds inherently fraught.
So I did not go with components which require such things.
Infodumping below the cut.
(for the curious: fractal design define r5 case, msi pro z790-p WiFi ddr4 mobo, i5136000kf (14 core), 64gb ddr4 RAM, radeon rx6800 16gb, deepcool ak400 zero dark plus cooler, 4x 140mm case fans, Corsair 850w modular platinum ps, 1 tb ssd for the os and a 2tb ssd for the games, both pcie4x4 nvme, and a curved 27 inch 2k monitor. This is upgrading from a 2015 laptop which is still very robust with an i76700 quad core processor, 16gb RAM, 1tb ssd and a gtx950m 4gb graphics card which just this year stopped meeting minimum specs for the games I want to play. I figure the new system could last me another 8-10 years.)
Is 64 gb of ram overkill? Hahahaha yes. But it's about a hundred bucks. Is 3tb overkill? No but it's also about 120 bucks. Do I need a 27 inch monitor? Mayyyybe but it's $200. The real splurge is the video card and CPU, but I'm not going to regret those at all when I'm playing starfield and bg3.
(I'm also going to play every game I've been playing at low settings on ultra just because I can. Subnautica is gonna be so pretty.)
Interestingly, the parts come with three games, including the one I initially decided to build a system for (starfield). The processor comes with assassin's creed mirage and something I didn't recognize. Going with Intel for the processor and AMD for the GPU ended up being very much in my favor that way as if I'd gone ryzen, I'd have ended up with two copies of starfield.
I think the last time I built a system from scratch it had 4-8 gigs of RAM and a 2gb video card and maybe a dual core cpu maybe not. I've done some bare bones systems since then and a lot of upgrades, but not from-the-ground-up.
Amusingly, while doing this, I thought I was going to hand my laptop down to my son. Then I realized that in a pandemic fugue state in 2021 I bought him and my husband computers with part of the stimulus that were basically maxed out refurb systems that somehow are running 32g of RAM each and the only real weakness in their systems are graphics, which hubby doesn't use and which can be easily upgraded for my son for like <$150 to double his vram.
I have minimal memory of buying these systems but it makes sense for how little they complain about them. (old Dell optiplex systems. I think I spent 400 on each of them at the time. With upgrades.)
So since I've been hyperfixated on this process I've been watching a lot of pc building YouTube and it's been very helpful but also very popcorn. So much drama. Le gasp.
My one regret about not getting a flash light up system with lots of rgb is that it would impress the hell out of my 11 year old but I seriously can't deal with that much light up distraction and the extra cost for the components has been spent on a better GPU.
Anyway this is all going to be much cheaper than trying to find a system with equivalent stats prebuilt, and it's been a while since that was true when I was in the market for a computer.
50 notes · View notes
kremlin · 2 years ago
Note
forgive me for the questions & any possible inconsistencies or malformations:
how do we compile our symbolic high/low level code into machine language, and how do we find the most efficient method of conversion from symbolic to machine code?
is it possible to include things from asm in C source code?
why do any of the abstractions in C mean anything? how does the compiler translate them?
would it be possible to write and compile a libc in C on a machine which didn't have a precompiled libc? i think the answer is no, so how much peripheral stuff would you need to pull it off?
are these things i could have figured out by just reading the one compiler book with the dragon on the cover?
thanks and apologies.
these are uhh. these are really good questions. like if you're asking these then i think you know way more than you think you do
how do we compile our symbolic high/low level code into machine language?
we do it the natural (only?) way, using parsers, although a bit more technically involved than just a parser. all programming languages are comprised of just keywords (e.g. int, static, enum, if, etc) and operators(+, -, *, %), those are the only reserved terms. everything between them is an identifier (name of variable, struct, etc), so at some level we can just search for the reserved terms and match them, and match whatever is between them as identifiers (var names or whatever). with this, we can tokenize the raw input put it in the context of a defined grammar.
lex is the name of the program that does this. you have simple, defined keywords, and defined operators, and you group them together a few categories (e.g. int, float, long might all fall under the same "variable qualifier" category"). this is tokenization.
those tokens are given to another program, yacc, which deals with it in the context of some context-free defined grammar you've also provided it. this would be a very strict and unambiguous definition of what C code is, defining things like "qualifiers like int and float always proceed an identifier, the addition (+) operator needs two operands, but the ++ (increment by 1) operator only needs one". yacc processes these tokens in the context of the defined grammar, and since those tokens are defined in broad categories, you can start to converge on a method of generating machine code for them.
how do we find the most efficient method of conversion from symbolic to machine code?
ehehehe. ill save this one for later
is it possible to include things from asm in C source code?
yes:
Tumblr media
assembly (which translates directly 1-to-1 to machine code) is the only thing a CPU understands, so there has to be a link between the lowest level programming language and assembly at some point. it works about as you'd expect. that asm() block just gets plopped into the ELF right as it appears in the code. there are some features that allow passing C variables in/out of asm() blocks.
why do any of the abstractions in C mean anything? how does the compiler translate them?
hoping above answers this
would it be possible to write and compile a libc in C on a machine which didn't have a precompiled libc? i think the answer is no, so how much peripheral stuff would you need to pull it off?
yes, and in fact, the litmus test that divides "goofy idea some excited kid thought up and posted all over hacker news" and "real programming language" is whether or not that language is bootstrapped, which is whether or not its compiler is written in "itself". e.g. gcc & clang are both C compilers, and they are written in C. bootstrapping is the process of doing this initially. kind of a chicken-and-egg problem, but you just use external things, other languages, or if it is 1970s, direct assembly itself, to create an initial compiler for that language, and the write a compiler for that language in that language, feed it to the intermediate compiler, and bam.
its really hard to do all of this. really hard. lol
are these things i could have figured out by just reading the one compiler book with the dragon on the cover?
idk which one that is
finally...
how do we find the most efficient method of conversion from symbolic to machine code?
so this is kind of an area of debate lol. starting from the bottom, there are some very simple lines of code that directly map to machine code, e.g
a = b + c;
this would just translate to e.g. sparc
add %L1,%L2,%L3 !
if statements would map to branch instructions, etc, etc. pretty straightforward. but there are higher-order optimizations that modern compilers will do, for example, the compiler might see that you write to a variable but never read from it again, and realize since that memory is never read again, you may as well not even bother writing it in the first place, since it won't matter. and then choose to just not include the now-deemed-unnecessary instructions that store whatever values to memory even though you explicitly wrote it in the source code. some of the times this is fine and yields slightly faster code, but other times it results in the buffer you used for your RSA private key not being bzero'd out and me reading it while wearing a balaclava.
34 notes · View notes