/robowaifu/ - DIY Robot Wives

Advancing robotics to a point where anime catgrill meidos in tiny miniskirts are a reality.

Roadmap: file restoration script within a few days, Final Solution alpha in a couple weeks.

Sorry for not being around for so long, will start getting back to it soon.

Max message length: 6144

Drag files to upload or
click here to select them

Maximum 5 files / Maximum size: 20.00 MB

Captcha
no cookies?
More

(used to delete files and postings)


Open file (32.62 KB 341x512 unnamed.jpg)
Biological synthetic brains for robowaifus? Robowaifu Technician 04/06/2020 (Mon) 20:16:19 No.2184 [Reply] [Last]
Scientists made a neural network from rat neurons that could fly a fighter jet in a simulator and control a small robot. I think that lab grown biological components would be a great way to go for some robowaifu systems. It could also make it feel more real. https://www.google.com/amp/s/singularityhub.com/2010/10/06/videos-of-robot-controlled-by-rat-brain-amazing-technology-still-moving-forward/amp/
55 posts and 2 images omitted.
Open file (137.64 KB 350x350 carlos.png)
>>7493 Obviously, trying to create, long, stringy muscles grown in situ is opening up a whole other can of worms. I'm generally opposed to liquids maintenance inside our robowaifus to the feasible degree possible. There are simply a rapefugee-boatload of problems that come along with the basic concept itself and we'd be best served not to open that door in the first place IMO. And the idea of intentionally adding biologicals into the system? Well, that seems a little more like the lid to Pandora's Box tbh. I know that the topic ITT, but the idea is an extreme stretch for something that's already out there so far it seems like getting to Mars and back.
Open file (113.63 KB 579x700 female_Cthulhu.jpeg)
>>7494 My take is rather that I want to use liquids anyways, for cooling and heat distribution. I also know that there are artificial grown bio robots, made in part out of jellyfish and such. However, I don't plan to go into that and don't think this is something where we can get fast progress. One more thought on this, I had on my mind, was comparing it to the cables of earphones. The cables often break on the inside, while the insulator isn't broken. If the inside was made out of something that would repair itself, it wouldn't matter. That's how nerves or muscle fibers could work. That's the best way to describe what I meant. In the most extreme case it would be different from most or any Cyborgs we know from fiction. Maybe like a silicone doll on the outside, with artificial bones, the rest made out of silicone rubber and grown stuff, which would be originated from animals not closely related to us. Reminds me a bit of Lovecraft's creatures, but hopefully better looking and smelling, and without all the demonic stuff.
>>7498 Haha, fair enough. There's surely some merit and even possible benefits from exploring the concepts around integrating partial biologicals into our robowaifus. But, obviously, it will come at a heavy cost development-wise. Better appear to be well worth it before any serious effort is started.
>>7499 The development costs would be high if we would now try to get into it, on top of all the other things. On the other hand, in case someone would show up here, who would already happen to be involved in biology, then it will be good that we already have some ideas laid out.
>>7500 That's true. But honestly, I can't think of anything we're dabbling into that I personally feel less qualified to discuss in earnest, and even barely to speculate on. My investigations into the biochemical foundations of life via molecular-biology studies and research frankly leave me flabbergasted. -In software engineering, I feel vaguely like some kind of an engineer, at least part of the time. -In character animation, I feel remotely qualified to judge acting-quality, having been a human being all my life. -In electrical engineering, I've actually put together a thing or two under the close guidance of a good mentor. -In mechanical engineering, I feel like only a bumbling dabbler, strictly an amateur. Mostly breaking things but sometimes succeeding. But when it comes to life sciences (in particular at the molecular level) I don't think I understand much at all. Nor do most others I suspect -- certainly not the pop-science crowd. Never have so many LARPed so hard with so much ultimate comedy in the end.

Open file (44.05 KB 443x224 Proteomics.png)
A.I. Masters Proteomics Robowaifu Enthusiast 12/02/2020 (Wed) 11:01:13 No.7458 [Reply]
Google Deepmind's "Alphafold 2" machine learning program has gotten very accurate at predicting how a protein will fold into it's tertiary structure just by analysing it's amino acid sequence. Of course, the amino acid sequence is linked to the mRNA molecules, which is directly encoded by DNA and genes. This could be big, guys. I remember when I was at Uni and one of the most experienced biochem professors there said that whoever manages to solve proteomics will become "the closest thing to a God on this Earth". Because it cracks the code of how the majority of organic life is assembled. Not sure whether this should go in the thread about artificial wombs or organic brains for robowaifus, but this advancement could have BIG implications for things like growing whole organs from scratch, developing drugs that are tailored to each patient (and, of course biogenetic weapons such as an engineered virus that only kills a particular person or genetic group). https://www.nature.com/articles/d41586-020-03348-4 Looks like A.I. saves the day just as I'd given up hope on humans ever making any more big scientific advancements!
5 posts omitted.
>>7479 Best girl.
>>7484 Neat. If you're going to shitpost, at least it's a robot. still...
>>7484 >nudoom >bethshit You deserve bullying.
>>7478 >called "Cyborgs & Organic Computing" That's not 'catch all enough', not general enough. We don't have that much going on with cyborgs, for good reasons. I wrote something to the potential problems with cyborg development here: >>7456 The most likely uses of organic material in near future will be water kefir in the saliva of the fembots, or generally something on their body parts to keep organisms at bay which could be harmful to the owner or the bot materials. Pheromones are also a thing, though we probably won't be able to create organisms which produce them, idk. Biohackers exist. So maybe this is not related and a topic of it's own. But, well it's human biology, so it could go into a thread related to biology general.
Just spitballing here. Since crossovers are so common in anime or otherwise, what if we included that concept in the subject. RobowaifuXBiology nahh. bad idea probably but w/e.

Waifu Materials Robowaifu Technician 09/12/2019 (Thu) 03:04:33 No.154 [Reply] [Last]
I would define a robowaifu as a doll with robotic features. However there are many different types of dolls (BJD, cloth doll, sex doll, etc). A doll has a skin or surface material, sometimes a filler (cotton), and sometimes internal structure (bones and joints).

Continuing the discussion from (((>>2831 >>2836 todo:relink))) , I want to create a thread to explore the many possible surface materials for a waifu (robo or no). The most important decision is whether to use a hard or soft material.

Hard Materials
>Ceramics
>Wood
>3D Printed Hard Plastic (PLA/ABS)
>Injection Molded Hard Plastic

Soft Materials
>Natural Fabrics (Cotton, Silk, Wool)
>Synthetic Fabrics (Vinyl, Polyester, Nylon)
>Fur/Hair (presumably synthetic, inb4 yiff in hell)
>Silicone or TPE Rubber (TPE is basically a cheaper form of silicone)

I'm strongly biased against the hard materials for comfort reasons. Personally, I have a hard time seeing myself falling in love with something hard, but others on this board talk about using hard materials, so I'm trying to keep an open mind.

My preference is for silicone, but there are four big problems with it. Firstly, it's expensive. Secondly, it impedes modification after the silicone has set. Thirdly, it contributes to the uncanny valley/silicone slut issue. Fourthly, it is heavy, and this weight really constrains the skeleton, posablity, and probably robotics. Because of the weight, silicone dolls have heavy-duty skeletons.

My second choice is therefore fabric, presumably stuffed with cotton. Fabric is super comfy, and has no uncanny valley issue. A non-fuggable fabric doll or robot would have no stigma issue, and could be the start of a productive hobbyist scene with plenty of females. Fabric is extremely lightweight which could be a plus or a minus. By itself, its unsubstantial and not ideal for robotics. A fabric robot is possible, but it requires hard, heavy parts underneath to provide structure and as actuators, which would make it less comfy. The fabric could be a textile (cotton), a synthetic leather (resembles skin, makeup/dress-up potential), or synthetic fur for you furfags out there.

Another possibility is a hard vinyl BJD-like doll with a layer of something comfy on top. Alternately, you all can reject my comfort autism if the benefits of having a hard doll/robot are clear enough. I'd like to hear others make the case for a hard doll/robot, since I don't think I could do the argument justice.

Finally, this is a discussion, not a debate. There are multiple paths we could take, and I'm sure different robowaifuists will try different techniques to see what works and what doesn't. I'm more interested in seeing what options are on the table than shutting down any particular approach.
54 posts and 7 images omitted.
>>6943 This would become a real breakthrough for many areas of robowaifu design & manufacture if they can be made inexpensive and reliable. It would be an advance for many other domains too ofc. Very cool Anon, thanks.
>>6943 That's amazing. I wounder how long this stuff lasts when soaked into some textile or similar material. One problem with soft skin and soft muscles is to put sensors into them which last very long. The other electronic cold be in the bones, well protected. The sensors would need to be very resilient, but also the "cables" to transport their data to the next processor in the bones. Cables don't work very well, I bought a whole bag of earphones recently, because they only last a few weeks at maximum.
>>6943 Awesome! If this goes mainstream it could come in very handy for folding and bending circuitry to fit inside small spaces. Like the inside of a robowaifu chassis!
>>6943 >>https://en.wikipedia.org/wiki/Gallium >Elemental gallium is a liquid at temperatures greater than 29.76 °C (85.57 °F), and will melt in a person's hands at normal human body temperature of 37.0 °C (98.6 °F). >used in thermometers as a non-toxic and environmentally friendly alternative to mercury >Purities of 99.9999% are routinely achieved and commercially available. >>https://en.wikipedia.org/wiki/Indium >toxic when injected into the bloodstream >rare and not relevant: Indium lung >major future increases in the by-product production of indium will be possible without significant increases in production costs or price >The average indium price in 2016 was US$240/kg, down from US$705/kg in 2014 Looks like it's low risk and low cost. Looking forward to try this out one day...

Open file (23.61 KB 590x539 0704234805604_01_lel.jpg)
The Basement Lounge Robowaifu Technician 09/09/2019 (Mon) 21:34:51 No.39 [Reply] [Last]
This is the humor & designated shitposting containment bread for anons to say anything that's on their minds. WARNING WARNING Don't come in here friend! Remember back when /b/ was good? Yeah I didn't think so. You wouldn't have wanted to hang out in there either. >Git! Shoo!!11 WARNING WARNING WARNING
Edited last time by Chobitsu on 11/30/2020 (Mon) 08:13:14.
498 posts and 147 images omitted.
>>8677 There's something I forgot: Men being friends with women, in the hopen to get closer one day (aka beta orbiters), and all men spending money on women, from simp to customers of some womanly services. All this would go down. Then think of the whole divorce business, including the jobs for lawyers. The whole dating business including clubs.
>>8715 You're right. You realize that represents a lot of money out there right? Greedy men tend to be very protective of their money sources. We all already know how corrupt """TPTB""" really are. Many of them already have their thumbs buried deeply in these sketchy pies.
How's our waifu's body going to be made? Is it going to be 3D printed parts?
>>8733 Hi there Anon, we're going to duplicate your question up to the meta thread for better visibility. >>8734
>Police Now Actively Using Boston Dynamics Robot Dogs Andrew Anglin explains how cops are really just zogbots and mean to kill all Whites with vicious robo-terrorist canines, courtesy of Boston Dynamics. http://dstormer6em3i4km.onion/police-now-actively-using-boston-dynamics-robot-dogs/ Obviously, he's right. Thankfully, these robot's AI can be pre-programmed that anyone but Whites are literally incapable of any form of criminality whatsoever!

RoboWaifuBanners Robowaifu Technician 09/15/2019 (Sun) 10:29:19 No.252 [Reply] [Last]
This thread is for the sharing of robo waifu banners. As per the rules, fallow these requirements:

>banner requirements:

File size must be lower than 500 KB and dimensions are 300x100 exactly.

Allowed file formats are .jpg, .png, and .gif.
64 posts and 61 images omitted.
Open file (21.17 KB 300x100 rwbanner1.png)
Open file (28.13 KB 300x100 rwbanner2.png)
Open file (4.84 KB 300x100 rwbanner3.png)
Decided to fix an old banner someone made of me talking to Mitsuku
>>7292 Think you can darken up the perimeter shadow on the /robowaifu/ tag Anon? I think that might make it a bit more readable.
Open file (5.18 KB 300x100 rwbanner4.png)
>>7295 Best I can do
>>7296 OK thanks done.

Open file (32.03 KB 400x400 FXCY9fGv.jpg)
THE LANGUAGE PROBLEM Robowaifu Technician 11/20/2020 (Fri) 13:22:39 No.6937 [Reply]
'Sup anons? I am here to remind you guys something important, TO DO YOUR RESEARCH IN MULTIPLE LANGUAGES. Our mutual language is English however that is not enough. We need people who can speak those 3 important languages: Japanese, Chinese, Russian. I've been learning japanese for 4 months and with the help of dictionary I am able to understand basic stuff. Here is the point, there is a whole another world out there. 1) Chinese: Chinese people work under such hard circumstances and put really much effort into their jobs. Nearly none of the projects are translated into English since Google is banned at China. However there are a lot of great stuff there, I mean like even Microsoft runs their virtual woman project there. Since it is too hard for me to learn I generally use DeepL (best translator out there) and Baidu (Chinese search engine) and read latest researches and projects there. I wish I knew chinese well, in that case I would be able to find not-so-popular webpages and grab more information on topics. 2) Japanese: Even though good Japanese projects gets translated into English most of the research there gets translated only when the projects is ready to publish and sometimes they are too hard to find. I try to read as much AI papers in Japanese as I can. Scientists there do great stuff. I've seen a lot of robowomen projects there. You can also find some 3d printing projects for anime girls. Really worth looking. 3) Russian: Russian is the least important one in my opinion. But a professor of mine graduated from a university there and he has a lot of academic books that aren't translated to English. You would be amazed at how much work they have on stuff such as algorithm theory, artificial intelligence, computer science. Most of the stuff there are focused on "science" part of CS. So they are theory-weighted. So right now we need people who can speek Japanese and Chinese (Korean would be good as well, but there isn't that much of research there tbh) Using DeepL is enough to understand most of the pages but only a person with fluent Chinese/Japanese would be able to find goldmines deep there. I am pretty sure that there are hundreds of Chinese people working on robowaifu related projects that we are not aware of. Same applies for Japanese people, but since Chinese people are in a much worse situation it becomes really hard to find those people. Anyone has some recommendations? I wish I had time and skills to learn all those languages but I can only afford to learn one and I am going with Japanese since I have a dream of moving there in the future. We need to brainstorm on this issue.
7 posts omitted.
Anon, I've been keeping tabs on Japanese projects on Twitter, the robowaifu guys there love to retweet anything interesting. I notice most of them use Raspberry Pi, Nvidia Jetson Nano, M5Stack, and the multitudes of Shenzhen arduino clones and microcontrollers. What they mainly got different is they got their own seemingly Japan-exclusive servos or for some reason are able to afford Dynamixels. As for language processing, if we are training chatbots they will be dependent on the specific language unless they just all make cute noises like Chii -- well our mascot is Chii so a cute noise generator waifu will be more universally appealing without the need for translations.
>>6975 We miss you no longer reporting on updates from those guys. That really added some interesting flavor and inspiration to /robowaifu/.
My Japanese is no where near good enough to read research papers. I just opened one and got stuck on NLP, kek. >はじめに従来,自然言語処理 (shizen gengo shori) >Introduction: Natural language processing >>6975 >if we are training chatbots they will be dependent on the specific language Not necessarily, it's possible to create a chatbot that can speak in multiple languages and translate between them. However, with current methods those languages have to be targeted at from the beginning. I've been researching ways to create a language model that can handle text in any language and automatically segment it across different languages. So far I've created one that can operate on UTF-8 text, a way to encode and decode variable length sequences, and a way to structure sentences in a hierarchy of compressed sequences. It works on toy examples but I haven't had much success yet training on large datasets. I'm thinking it might be better to create some sort of neural byte pair encoding so that whenever the model sees a repeated pattern it automatically encodes it into a token. I think this ability to compress information and improve the compression will be essential to creating high-quality conversational AIs. There's a Japanese roboticist on Twitter looking for a decent Japanese chatbot for his robot, Kibo-chan. He's pretty friendly and I plan to show him my project once it's ready. I think it would be a great starting point for English and Japanese robowaifuists to come together, share their knowledge and collaborate. They're leagues ahead of us in robotics but the West is leagues ahead in AI. If we can combine our strengths it'll be amazing. And of course we could also reach out to Russian, Korean and Chinese developers too.
>>7267 >I think it would be a great starting point for English and Japanese robowaifuists to come together Not that anon, but that would be absolutely wonderful. Kibo-chan-Anon knows a thing or two about character-animating servo based armatures obviously. I would absolutely love to hear her speaking with some kawaii synthesized voice as well.
Open file (23.09 KB 480x360 hamtaro-FIGHTO.jpg)
>>7267 >My Japanese is no where near good enough to read research papers yet. FTFY, Anon. Gambate!

Open file (3.48 MB 4160x3120 Proto1_Chonker.jpg)
Proto1 All Parts Robowaifu Enthusiast 10/31/2020 (Sat) 22:16:00 No.6323 [Reply]
Fully printed, it is quite the chonker. Two heavy duty servos (110kg.cm torque or greater. 12 to 24 volt) in the shoulder. Two 60kg.cm servos (DS5160SSG) in the bicep Five 20kg.cm servos (PDI-6221MG) to move the forearm and fingers. One micro-servo in the palm to drive the thumb.
31 posts and 13 images omitted.
>>7004 Wow, that's quite an improvement you've made there Anon. If you keep going on like this, you apparently will come up with a state-of-the-art robowaifu arm/hand design. Go, go, go! :^) >finger-burners I'm unfamiliar with that concept?
>>7006 LOL I noticed that while the rest of my servos operated normally, these would just heat up where the 555 timer is. One of them even melted through the external casing. So to prevent them getting too hot, I hold a finger over the bottom every time I test them. Hence the "finger burner". This happens even at just 5V so not sure what the problem is. Just a helluva lot of resistance and heat coming from somewhere in the servo driver circuit. Gears move okay when checked manually.
Great work, and thanks for sharing. I looked up the servos in the forearm: http://www.jx-servo.com/en/Product/STANDARD/SD/555.html Did you or the original creator consider to put them in a line, so the arm would be thinner and longer? Is there a reason not to do that? They are circa 4x2x4 cm, so five would be 20 cm, which is a bit much, but four would fit that way. Also, how much will the fingers then be able to hold and lift? How is it calculated, considering they're connected to strings? Seem to be quite strong...
>>7011 My pleasure anon! The original creator (Ryan Gross) positioned the forearm servos like that because the next part up the arm is another 20kg.cm servo which connects to the back of the forearm case (effectively the wrist is above the forearm rather than below). You could change it so that the 4 servos are all in a line, but you need a gap between each servo for the mounting tabs+wires. By all means download the Protolite arm from Sophie's file repository and experiment with the .f3d file in Fusion360, but I reckon you'll end up with overly long forearms. TBH I am still working on shortening and downscaling the joints because the rest of the arm is still too long for the size of my robowaifu. She's only a little lady, but then that makes her parts easier and cheaper to prototype.
>>7023 Oh yeah. The hands can definitely hold light things like cups, a comb, a toothbrush etc. I have to find some rubber pads for her palm and I'm going to squeeze silicone caulk on the inside of the fingers to make the hand more grippy. Then hopefully she will be able to hold heavier things such as my socket wrench. The "ligament" material is BZS monofilament 40lb (18.4kg) clear fishing line. It is very strong, stronger than the ligaments in my own fingers. So it's just the weakness of PLA biopolymer coupled with the relatively small size and torque rating of the forearm servos that limit grip strength. If you were to 3D Print the forearm in ABS or Nylon and maybe scale it up 20% or so, you could definitely fit more powerful servos in. Then your robowaifu would have an iron grip!

Who wouldn't hug a kiwi. Robowaifu Technician 09/11/2019 (Wed) 01:58:04 No.104 [Reply] [Last]
Howdy, I'm planning on manufacturing and selling companion kiwi robot girls. Why kiwi girls? Robot arms are hard. What would you prefer to hug, a 1 m or 1.5 m robot? Blue and white or red and black? She'll be ultra light around 10 to 15 kg Max with self balancing functionality. Cost is dependent on size, 1000 for 1 m or 1500 for 1.5 m. I'm but one waifugineer, so I'm going to setup around one model to self produce. If things go well, costs can go down and more models can be made. Hopefully with arms someday.
68 posts and 43 images omitted.
>>6180 I was originally going to say you read way much into things, but then this is from one of the Pepper creators, so as mainstream as robots get, so I dunno. The bigger crime to me is that this thing costs 3000 bucks for one piece or 5K for a two-pack. Cute but otherwise useless robots should be in 200-500 range.
>>6182 whelp, meant to answer >>6181
>>6182 >>6183 A) you've probably forgotten what it's like to be a child, and how gullible they are, and B) Never underestimate the sinister designs of Evil and it's puppets, evil men and women.
>>6136 > I'm not even bothering to fit any electronics inside my robowaifu aside from servo motors which drive the joints. There are so many structural and movement concerns that at the moment I am keeping the electronics separate and joined to the body with long wires. Once I have the structure and movement figured out, I'll maybe add mounting points anywhere there's space to conceal a circuit board or two, but I can see my robowaifu being connected to a big box of tricks at the moment.

Wifu that gives you Hope. Dyinganon 09/11/2019 (Wed) 02:07:32 No.107 [Reply]
Is it possible to script a "hope" android-based character that learns from a chat cloud whose purpose is to give even the worst cases of us hope, even when we know better? I just want to smile again, even if it is not possible to expect much. I hate looking at my family with sadness and fear. The guilt is hard on me and them. >=== >I'm going to pin this again for a while in remembrance of Dyinganon and the others. I hope they all made it OK.
Edited last time by Chobitsu on 11/17/2020 (Tue) 15:13:34.
33 posts and 9 images omitted.
>>6834 OK, I emailed you Dollfan.
>>107 Time doesn't matter after death. This is incredibly important. It is also calculated by the French Mathematician Henri Poincaré that the universe (maybe not this exact one, but one with the same physical constants) will recur given enough time. It may well be that after you die, the next thing you see is your mother's face after being born again in the next universe. The timescales involved in this are mind-bogglingly long. But as I said, time is of no consequence if you cannot perceive its passage! One second and one hundred quadrillion years may as well be the same thing.
I have a similar project like this. I named her Kibou - 'hope'. Amusingly, I know that '希望' (hope) can also be read as '詭謀' (ruse, trick, deception) - and the irony is amusing. That's right, I'm building something to trick the pervasive environment of doom and gloom of the real world. I may never know the love of a real woman, but this will be of help.
>>6929 We wish you well Anon.

Modern C++ Group Learning Thread Chobitsu Board owner 08/31/2020 (Mon) 01:00:05 No.4895 [Reply]
In the same spirit as the Embedded Programming Group Learning Thread 001 >>367 , I'd like to start a thread for us all that is dedicated to helping /robowaifu/ get up to speed with the C++ programming language. The modern form of C++ isn't actually all that difficult to get started with, as we'll hopefully demonstrate here. We'll basically stick with the C++17 dialect of the language, since that's very widely available on compilers today. There are a couple of books about the language of interest here, namely Bjarne Stroustrup's Programming -- Principles and Practice Using C++ (Second edition) https://stroustrup.com/programming.html , and A Tour of C++ (Second edition) https://stroustrup.com/tour2.html . The former is a thick textbook intended for college freshmen with no programming experience whatsoever, and the latter is a fairly thin book intended to get experienced developers up to speed quickly with modern C++. We'll use material from both ITT. During the progress, I'll discuss a variety of other topics somewhat related to the language, like compiler optimizations, hardware constraints and behavior, and generally anything I think will be of interest to /robowaifu/. Some of this can be rather technical in nature, so just ask if something isn't quite clear to you. We'll be using an actual small embedded computer to do a lot of the development work on, so some of these other topics will kind of naturally flow from that approach to things. We'll talk in particular about data structures and algorithms from the modern C++ perspective. There are whole families of problems in computer science that the language makes ridiculously simple today to perform effectively at an industrial scale, and we'll touch on a few of these in regards to creating robowaifus that are robust and reliable. >NOTES: -Any meta thoughts or suggestions for the thread I'd suggest posting in our general /meta thread >>3108 , and I'll try to integrate them into this thread if I can do so effectively. -I'll likely (re)edit my posts here where I see places for improvement, etc. In accord with my general approach over the last few months, I'll also make a brief note as to the nature of the edit. -The basic goal is to create a thread that can serve as a general reference to C++ for beginners, and to help flesh out the C++ tutorial section of the RDD >>3001 . So, let's get started /robowaifu/.
40 posts and 54 images omitted.
>>6531 Thanks for the tip Anon. There's a guy Bean Eater who created a simple 8-bit computer from scratch using breadboards and commonly-available ICs. In a couple of the videos about the ALU & A/B registers he deals with one's- and two's-complement number representations. Playlist is linked here >>1554
>>6531 >>6532 I might also add there's a great little book that addresses all sorts of interesting things going on inside computers. But How Do It Know? >>4660 Hopefully, we'll integrate some of it's contents ITT in addition to the two primary books by Stroustrup already being used.
So the silly test REQUIRE(waifu.say(9'001) != "Foobar9000"); was really just an artifact of the way we grew the code, and isn't really relevant for a proper test. We've already provided for a reasonable result from our class' member function on an invalid input "I don't understand Oniichan...", so time for a minor refactoring of the test itself. REQUIRE(waifu.say(9'001) == "I don't understand Oniichan..."); > #1 Recall from Phil Nash's Test Driven C++ talk linked above that there are 3 steps in the primary TDD loop: -Red -Green -Refactor > #2 Even tests may need refactoring themselves, as we saw above. But we're not done just yet. We have two passing tests about valid inputs (#2 & #1), but we don't really want to try testing every.single.input. Not only would that be a fool's errand, but it doesn't really help us to drive the design, and that's what we're really after here. What might be a better approach is to provide a valid input, and then check for both the positive result, and then confirm it's inverse; 'not a negative' result. To put it another way, let's also make sure we don't get a "I don't understand Oniichan..." when we give a valid input. This may seem silly at first, but once code grows big and things begin to change around this approach (testing the positive and negative) can help us smoke out regression bugs we might introduce. Let's remove one of the redundant positives, and replace it with the 'not a negative' test instead. REQUIRE(waifu.say(1) == "I love you Oniichan!"); REQUIRE(waifu.say(1) != "I don't understand Oniichan...");

Message too long. Click here to view full text.

Open file (65.75 KB 1113x752 juCi++_181.png)
Open file (65.07 KB 1113x752 juCi++_180.png)
Open file (68.47 KB 1113x752 juCi++_182.png)
Open file (67.29 KB 1113x752 juCi++_183.png)
Open file (99.95 KB 1112x760 juCi++_184.png)
>>6922 OK, now that we've wrung our simple Robowaifu class with it's sole member function out a bit, let's lift both it and the sayings std::map out into their own files, and we can begin using them outside our test system. Create two new files in our project 'Robowaifu.hpp' & 'sayings.hpp', (File > New File). Cut & paste the Robowaifu class into it's own file, and the sayings std::map into it's own file. You'll also need to add the appropriate C++ library includes for each file as well. Eg: #include <cstdint> #include <map> #include <string> > #1 #2 Since we've moved the sayings std::map off into it's own file, we'll need to include it into the Robowaifu.hpp file so the class itself can find the sayings data. #include "sayings.hpp" > #3 The test file now just contains the test (as we'd like), but we need to add an #include for the new Robowaifu.hpp file so the test can find the new location of the class itself. #include "Robowaifu.hpp" > #4

Message too long. Click here to view full text.


Report/Delete/Moderation Forms
Delete
Report

Captcha (required for reports)

no cookies?