Jump to content

Razbit

Member
  • Posts

    143
  • Joined

  • Last visited

Everything posted by Razbit

  1. How about Qt Creator? A nice cross-platform IDE, installs (checkbox) MinGW GCC on Windows and you're off to the races
  2. Thinking out an algorithm is not an easy task. Even though a calculator might seem simple, there is quite a lot more to it than you'd think on the first glance.. Point being, you should not settle with whatever first comes to your mind (even if it worked ). Trying to find alternate solutions is always a good idea!
  3. My approach would be something along these lines: 1) parse the string starting from the "main" operator, save to a tree data structure 2) walk the tree from the leaves up, calculating each node from its two children 3) when at the top, done. e.g. 2 * (1 - 4) main operator *, operands 2 and (1-4) add the * to the root node of the tree add 2 as the other child of the * node parse the parantheses, creating a new "-" child for the "*" node add 1 and 4 as its children now the tree should be like this * / \ - 2 / \ 1 4 walking the tree from the bottom up: 1) 1 - 4 = -3, thus the tree: * / \ -3 2 2) -3 * 2 = -6, thus the tree: -6 done. On a side note, a reverse polish notation calculator would be a lot easier to implement. Actually this is the reason first powerful calculators from e.g. HP used RPN instead of the more usual infix notation: the code needed for parsing parentheses took up a large portion of the calculators' memory, thus taking space from more advanced functions. My implementation for an infix calculator actually transformed the expression into RPN and then calculated it. see https://github.com/Razbit/it5/tree/master/stack
  4. have a look: http://amfeltec.com/products/flexible-x4-pci-express-4-way-splitter/
  5. what other components you got in the computer? which CPU, motherboard etc are you using
  6. AFAIK, no. VGA is analog whereas HDMI is totally digital. You'll need an adapter there. DVI to HDMI goes with a pure cable tho
  7. While writing a UNIX-ish OS (RazOS), I "needed" my own version of hexdump, so here it is #include <stdint.h> #include <string.h> #include <stdio.h> #include <stdlib.h> #include <ctype.h> int read(FILE* file, int n, uint8_t* buf) { uint8_t* tmp = buf; int c = 0, i = 0; do { c = fgetc(file); if (c != EOF) { *(tmp++) = c; i++; } } while (c != EOF && i < n); return i; } int main(int argc, char** argv) { if (argc < 2) { printf("Usage: hexdump <file>\n"); return -1; } FILE* file = fopen(argv[1], "r"); uint8_t* buf = malloc(16); if (buf == NULL) { fprintf(stderr, "Memory error\n"); return -1; } int n, i, j = 0; do { printf("%8.8x ", j); n = read(file, 16, buf); for (i = 0; i < n; i++) { if (i > 0 && i % 8 == 0) printf(" "); printf("%2.2x ", *(buf+i)); } if (n > 0) { if (i < 8) printf(" "); for (; i < 16; i++) printf(" "); printf(" |"); } for (i = 0; i < n; i++) { if (isprint(*(buf+i))) printf("%c", *(buf+i)); else printf("."); } if (n > 0) printf("|\n"); j += n; } while (n > 0); printf("\n"); return 0; } See the original: https://github.com/Razbit/razos/blob/master/tools/hexdump.c Cheers!
  8. Agh, kernel development is running me crazy!

  9. Howdy, fellas! Now that the case is painted, its time for assembly! Here it is, all painted and dried. Some of the cuts can be seen if you look closely, but I'm happy & surprised with the result! So, @JokuTyyppi came over to help me with the assembly (thanks, man!). He got some Noctua Redux fans from the local shop, they fit the color quite well: Only pull, yes. No other way to 1) keep the case cool and 2) have enough space for the mobo & graphics card Trying the mobo Fits well, onward! I finalized the USB hub (soldered the cables and installed using hot glue), the rest of the mobo cables were installed, too The SSD (240GB Kingston HyperX Fury) was installed to the side panel using double-sided tape, then it was the time to install the rad+fan assembly. Of course, it didn't fit without first taking out the mobo.. So, unscrew, remove cables and try again -> fits like a glove. Screwed in the bracket to secure the rad, reinstalled the mobo and on we go with the tubing! Pump -> rad -> CPU -> GPU -> reservoir -> pump. A fill/drain "port" is at the end of the tube leaving the T-piece at the pump. In went the PCIe power cables, the PSU and it was time to fill her up! First, face down: Back on her feet, trying to get rid of air.. Seems to go quite well. Reddish coolant so possible leaks can be seen easily, will change to clear later. Power supply in place and...... Boot up! That drain needs some work, maybe some holders to keep the tube up against the rear aluminum or something, we'll see That's a pretty tight fit, have to say. Not many millimeters of space between the GPU and rad, or the mobo and the PSU Once the side is ready, I call this done. Cheers, Razbit
  10. Wow, time really does fly, gotta say.. The G5 is gettin' ready little by little; it is now painted! So, in the early summer I thought that 'now I finally have time to get this ready', BUT other things got my attention and here we are.. But first, I'll show you how I've planned the cooling system. I fiddled with different radiators and decided to go for a 280 rad from Alphacool. It fits *very* tight, the height with the plugs is exactly the height of the case But, it works better than a 240.. All other components will be taken from the Redefine, except for the motherboard (I bought an Asrock Z97M Pro4 for this build). The pump and the res will sit on the bottom of the case like this: A very fancy plan for tubing can be seen, too The PSU will be from the Redefine, too (Silverstone Strider Plus 1000W). It'll be mounted to the rear of the case, like so: Not too much space left anywhere, eh? Then to the paint job. Some silverish car spray paint from Maston was used, quite close to Apple's color. It turned out pretty good, all the cuts got hidden surprisingly well! Before And after Later today/tomorrow I'll show you guys the assembly! cheers, Razbit
  11. Looks interesting so far, I'd love to see it "get wet" Keep up the good work, Razbit
  12. http://www.learncpp.com http://www.cprogramming.com Those two came to my mind, also see the cplusplus.com forums, there are some tasks (e.g. http://www.cplusplus.com/forum/articles/12974/ ) Cheers, Razbit
  13. Hello again, and first of all sorry for this delay again... Anyhow, now that the summer is finally here, I'll have time till mid-August, more or less.. So, there will be (and has been) progress! After a long while of sanding the putty I got to drilling the holes open again. I used a piece of the hole mesh as a guide and got to it: A couple of holes at a time, but it turned out pretty good: When it gets painted I believe it'll be quite hard to find the cut (by accident, at least). The same method was used with the front IO thingy. Some more sanding to smoothen the holes and done. I'll paint the case once all the internals are done. The next thing I did was figuring out a way for mounting the mobo to the case. The aluminum L-channel provided a surface for the two mounting screws at the expansion slots, so all I did was a hole (2.8 mm) and screwed a riser to it. The mobo was positioned and held in place using a couple of expansion cards, one of which is shown above. I made two holders for the rest of the 6 holes. I used a bunch of risers and some aluminum C-channel. Screwed them to the board and glued to the case using chemical metal. The board seen in these pics is not one that'll be used in the end After gluing I used a car coolant container as a weight to keep the motherboard down There she is Now about the future of the build. The Redefine got severely damaged while I was selling it, so its case is unusable now.. The parts work, tho. So, I'll need to get rid of the motherboard (MVIIR) and the 360 rad, rest of the parts will be used in this build! That means we'll have a 4690K and a R9 290 in this case, with water cooling. I need a new mobo (Asrock Z97M Pro4?) and a rad, probably a single 280 to the front. Once I have the mobo and the rad (won't take long, hopefully during the next two weeks), I'll finish this one, shouldn't be that much left anymore. I'll get back to you with the side panel soon, tho Thanks for reading! Cheers, Razbit
  14. Comic Sans pls no Thank you! And yes, cable management doesn't really matter, but it hurts me to see it not tidy..
  15. Well, not totally from plastic, no. It has a metal (steel?) Frame, but if I recall correctly, the feet and handles on top are plastic. Anyway, I like the g5, but with the Redefine I got fed up with the size of even midi towers like the FD R4, and wanted something smaller. (And a normal motherboard just looks stupid in the huge G5, I think) And about your build, looks great! I like those scratch builds, if the maker has a good idea (like you had), they usually work great! @HellaflushMcSwaggins, @ALXAndy Thanks, guys!
  16. Yeah, thats what I did But it houses a mATX board, and is not made of plastic I agree with ya on that Thanks guys!
  17. Update May 2nd, 2015: MOAR PUTTYYYYY Alrighty folks, time for an update! Since the previous putty update there has been two more rounds of putty-ing (is that a word?) I sanded the case and applied more putty, two rounds of chemical metal, one layer of car putty. That's a total of 3 layers of putty, thats quite a lot of sanding! (could be more, of course ) Anyway, here we go! Thats how the power jack will look like, not bad And then, after the (so far) final sanding: Next up, drilling them holes open again and mobo mount. Some "things" occured in my wallet, so we might have to wait a bit.. The Redefine will donate some of its components to this build, but at this moment I can't buy a motherboard (GA-Z97M-D3H).. I'll get back to this ASAP, I'll try to finish this thing during summer! Thanks for reading, please comment! Tell me what ya think! That's it for today, stay tuned!
  18. Yep, that I'll do Probably today I'm gonna sand the case and apply more putty, paint will come later
  19. Just a small heads-up: I added a 1TB disk to the server, moved everything there, wrote a shell script for backing up everything to the 2TB disk (based on rsync). Works like charm now! Oh, and all of my Steam games are there too, they work pretty nice with the ~100MBps in the LAN, but Origin doesn't seem to work with a network share, don't know why. SO, no I have just a 240GB SSD in my computer, so AHH, SILENCE.
  20. Howdy guys, its time for an update again! I've been working on the PSU now (and the front panel cables), here's what I've done (so far) I started by making the hole for the fan to the bottom of the PSU, mounted the PSU to its case, mounted the fan, tinkered with them cables and got this: All the unnecessary cables are wrapped around the fan, so only one SATA, PCIe, ATX and the EPS cables come out of the PSU case -> neat. I cut & glued a piece of aluminum to cover the holes in the front of the PSU: There'll probably be an aluminum shroud on the whole PSU thing, we'll see And then to the cables. The USB3.0 cable is still undone, since I don't know its exact length yet.. Sleeved and soldered the power button and power led cables from an old case to the Apple power button, like so: The center is a shared ground and the orange goes to the other pin of the power button (if I remember correctly, nothing visible anymore because of the sleeving.. Pretty sure, tho) And then, last but not least, the USB hub. No data cable yet, but the power cable is done. It just has a Molex in the other end, nothing that fancy Also, the FET chip is overridden to make the power button of the hub useless, I don't want to manually turn the hub on every time I boot the computer.. Thats it again, thanks for your time, please comment and share! Thanks, Razbit
  21. Hi again! Last Friday (and Sunday) I had the time for gluing the rest of the G5 together, namely the rear and the front USB thingy. This time I used chemical metal (from Pakla, a Finnish putty/glue manufacturer), so that I could fill all the gaps at the same time. I used a Dremel to cut open some tiny gaps so that they could be filled well. Anyway, here we go! On Friday I glued the inside and prepared the USB hub (an LC Power USB3.0 hub) for gluing to the case: I glued an aluminum sheet to the side of the case, seen above. And drying: And that was it for Friday, now on we go to Sunday! The case was dry, so it was time to get this bad boy out: Chemical metal! (At this point I dumped the OnePlus camera for my father's Nikon D3200, there is a *slight* difference ) Mix with some curing agent: And ready for use! The rear was glued first, like so: And the USB was glued: Then the same stuff was used for filling some gaps in case: The gaps on the side of the case were filled too, no pics (yet), sorry.. Next up there is a BIG bunch of sanding to be done, then some more putty and some more sanding and, you know, more sanding There was some progress on the power supply, too. I took apart the original G5 PSU, shortened it's case and fitted a Corsair VX450 to it. Some work-in-progress pics: Todo list for the PSU: - fan hole - cover the original holes - safety?? - ??? - profit More to come, stay tuned! Thanks for reading, please comment and share! Tell your friends! Cheers, Razbit
  22. As other people already said, instead of a simple (stupid) text editor such as notepad++ (notepadqq), nano (or sublime, haven't tried, don't know), I'd suggest going for emacs/vim. They are really powerful and offer a huge bunch of tools for programmers, shell access and a huge bunch of plugins. For my programming (mainly c/c++) I use Emacs with a plugin called ecb, emacs code browser. It gives Emacs a nice, ide-ish look. There is a learning curve to emacs and vi, but you won't regret it, at least I haven't
×