/robowaifu/ - DIY Robot Wives

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

Build Back Better

More updates on the way. -r

Max message length: 6144

Drag files to upload or
click here to select them

Maximum 5 files / Maximum size: 20.00 MB

More

(used to delete files and postings)


Have a nice day, Anon!


C++ General Robowaifu Technician 09/09/2019 (Mon) 02:49:55 No.12
C++ Resources general The C++ programming language is currently the primary AI-engine language in use. isocpp.org/get-started https://archive.is/hp4JR stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list https://archive.is/OHw9L en.cppreference.com/w/ https://archive.is/gt73H www.youtube.com/user/CppCon https://archive.is/QGynC BTW if you're new to C++ and you're stuck on Windows (either you can't or won't upgrade to Linux) then you can at least incorporate a good, open shell into your system to begin with so you can follow along. Start at this link, and if you have any questions just ask ITT: www.msys2.org/ https://archive.fo/p3EUc >=== -julay-era fmt'g post
Edited last time by Chobitsu on 04/04/2024 (Thu) 23:25:55.
>>8688 >daemon Yes, I considered exactly that as the solution for a good bit later when we're actually implementing such a tool in a production runtime for our robowaifus. And as you basically indicated, I imagine there are entire classes of types of solutions that would require multiple, cooperating components for their systems to function correctly. For example, when we adopt a Neuromorphic response strategy for our robowaifu's 'nerve & muscle' sense/response cycles, we'll need to adopt both a real-time tiny kernel directly into the sensor hardware to provide for instantaneous responses. This will enable her to have self-defense for thing like avoiding dangerous, hot or sharp objects for example -- same as the designs we bios enjoy having. OTOH, within a short time-frame (say 5ms), there may also be the need her to have the ability for higher-order functions to kick in to direct her to go on in and proceed -- even in the face of danger. Again (but in a little different, 'human being' way) same as we people do. To my thinking this simple example spells out one of the many design-separation boundaries between static & one-shot/repetition processing that will be needed for effective Robowaifu Systems Engineering design strategy & engineering approaches.
Updated BUMP to work with the RPi, but the instructions for building & running should work similarly for other Linux distros. >>8769
>>8562 >>8576 I meant to have this for you sooner Anon. >>8769
I'm not sure where to post this, I made a C++ imageboard some time ago. it lacks some important features and I'm not developing it anymore, but I thought it might be useful or interesting to someone: gitlab.com/schinopsis/cxxchan
>>8823 Thanks I'll have a look Anon.
Open file (69.79 KB 1024x705 Selection_281.png)
>>8823 Apologies, but I wasn't able to see the repo. Looks like Gitlab is forcing Tor users to log in now before you can even see a repo. > This is of course a very bad development on their part if true. I'll be looking to move my little repo off there if this turns out to be the case. Any chance you can zip the repo into a flattened version https://stackoverflow.com/questions/4506758/flatten-old-history-in-git and then just post it onto catbox.moe ?
>>8830 my fault, it was set as private by default
>>8835 Ah I see, grabbed a clone and I'll give it a look. Eventually, the Bumpmaster project should basically be a high-performance, standalone on- and off-line imageboard program. It will be written mostly (if not entirely) in C++ (with some C dependencies on well-established libraries like cURL).
Video interview with Bjarne Stroustrup in March. This lockdown racket scheme has visibly taken a toll on him this past year. :/ https://www.youtube.com/watch?v=8aIqIBmNJyM
So I finally installed waifusearch v0.2a. It worked, but I got some error messages: g++ main.cpp -std=c++2a -O3 -ljsoncpp -lstdc++fs -o waifusearch In file included from /usr/include/c++/8/vector:69, from /usr/include/c++/8/bits/fs_path.h:37, from /usr/include/c++/8/filesystem:37, from main.cpp:12: /usr/include/c++/8/bits/vector.tcc: In member function \u2018void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {std::pair<std::chrono::duration<long long int, std::ratio<1, 1000000000> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >}; _Tp = std::pair<std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long long int, std::ratio<1, 1000000000> > >, std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long long int, std::ratio<1, 1000000000> > >, std::__cxx11::basic_string<char> > >]\u2019: /usr/include/c++/8/bits/vector.tcc:413:7: note: parameter passing for argument of type \u2018std::vector<std::pair<std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long long int, std::ratio<1, 1000000000> > >, std::__cxx11::basic_string<char> > >::iterator\u2019 {aka \u2018__gnu_cxx::__normal_iterator<std::pair<std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long long int, std::ratio<1, 1000000000> > >, std::__cxx11::basic_string<char> >*, std::vector<std::pair<std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long long int, std::ratio<1, 1000000000> > >, std::__cxx11::basic_string<char> > > >\u2019} changed in GCC 7.1 vector<_Tp, _Alloc>:: ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/8/bits/vector.tcc: In member function \u2018void rw::Timer::stop()\u2019: /usr/include/c++/8/bits/vector.tcc:109:4: note: parameter passing for argument of type \u2018__gnu_cxx::__normal_iterator<std::pair<std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long long int, std::ratio<1, 1000000000> > >, std::__cxx11::basic_string<char> >*, std::vector<std::pair<std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long long int, std::ratio<1, 1000000000> > >, std::__cxx11::basic_string<char> > > >\u2019 changed in GCC 7.1 _M_realloc_insert(end(), std::forward<_Args>(__args)...); ^~~~~~~~~~~~~~~~~
>>10484 Hmm. Thanks for letting us know Anon. So, when you say >It worked do you mean you were able to successfully, build, run, and search with it? Something else? BTW, would you double-check your meson.build file, you should see a line like this: add_project_arguments('-Wno-deprecated-declarations', '-Wno-psabi', language: 'cpp') The no-psabi warning directive should have disable that warning.
>>10485 >g++ main.cpp -std=c++2a -O3 -ljsoncpp -lstdc++fs -o waifusearch Ahh, that must be it. Apologies, I neglected to add that directive to the comment on line #61. It should read: # g++ main.cpp -std=c++2a -O3 -ljsoncpp -lstdc++fs -Wno-psabi -o waifusearch I've amended that comment line and it will be in the next version of the tool. Try rebuilding with that command instead and let me know how it goes please.
>>10487 I might rebuild it tonight, if I don't forget it before going to bed. It works anyways, I mean searching and all. No errors so far.
>>10489 > It works anyways, I mean searching and all. No errors so far. You're fine then, that was just an odd warning that the GCC devs added for that version of the compiler -- which they apparently later dropped in newer versions (thankfully). Also, I'd advise you to grab the latest version of the JSON archives to update it with. I'll try to start generating those on a more frequent basis.
Microcontroller-oriented C++ blogpost. >A C++ (subset?) for small micro-controllers http://www.voti.nl/blog/?p=114
>>8678 Feature request: Sometimes I wonder if a link, or more specifically a YouTube video, has already been posted. I think Waifusearch doesn't find that right now. If that's easy to change, it might be worth considering, same for files.
>>10791 Noted. Actually, it will return any part of the YT video link, eg, the hash of it. But ofc that's not particularly useful by itself. The other part ofc is if the poster actually mentioned the name of the video in his post. I went through and found at least 400 YT videos have been linked here on /robowaifu/. I'm currently working on Bumpmaster atm, but I've given some thought to creating some kind of video link scraper that will auto-generate proper youtube-dl links. Maybe we should have a set of crosslinks on our library thread for something like this Anon? After all, it's why the thread was created in the first place to help everyone locate anything posted here.
>>10791 >same for files. Apologies, I missed that. Yes, that's a pretty easy addition and I had already planned to incorporate that soon. Be aware, it would only be a filename search, not some type of AI-context analysis relying on huge globohomo cloud datacenters. So, if an anon posted a well-named file, you might get lucky that way. OTOH, if it's just a SHA or other type of hash name, then probably not so much. One feature I want to add into Bumpmaster is crowd-sourced tagging of posts & other content, including images. We potentially could conceivably even tap into the work the Hydra community has done in this area.
>>10794 >>10795 Sounds all very good, thanks. I probably could get all inks out of the json archives and also download them this way, including the description.
>>10809 Yep, and there are a few of them here too: waifusearch> youtube OR youtu.be . . . ' youtube | youtu be ' = 476 results waifusearch>
>>10812 Yeah, if it's possible to build on Waifusearch, it's probably better to do it that way.
just leaving this here for future reference. https://github.com/adobe-fonts/source-code-pro
New talk by Sean Parent https://www.youtube.com/watch?v=NO5wHzI_oug Turns out, he's finished all the talks for his book, and is now just doing the writing. Also, he's starting the STLab at Adobe back up, and David Abrahams will be joining him there. This is great news ofc. We probably will get a very polished implementation of an efficient, scalable & robust continuations library out of this collaboration. This is great news for /robowaifu/ and should make things like anon's IPCNet (>>2418) and anon's RPCS (>>11018) doable on very lightweight hardware, and relatively quite simple to write the underlying 'fabric' software itself.
What would be the fastest way to do matrix multiplication in C++? With compiler optimizations, profiling and everything. I wanna implement a transformer with raw, absolute speed. No fluff or usable code, just pathological maximum efficiency, running on a Raspberry Pi 4B. The matrix operations in the self-attention layers will also be a key part to optimize: # query: (batch_size, query_length, heads, heads_dim) # key: (batch_size, key_length, heads, heads_dim) # energy: (batch_size, heads, query_length, key_length) energy = einsum("nqhd,nkhd->nhqk", (query, key)) # attention: (batch_size, heads, query_length, key_length) # value: (batch_size, value_length, heads, head_dim) # out: (batch_size, query_length, heads, head_dim) out = einsum("nhqk,nvhd->nqhd", (attention, value)).view(batch_size, query_len, self.heads * self.head_dim) Einsum is just a way to describe multiplying and adding matrices and transposing axes. How can these three things be done most efficiently?
Open file (4.05 KB 80x84 armadillo_logo2.png)
>>12422 >The real heavy-lifting will come from libraries like mlpack & Armadillo (>>8565) You won't be able to outperform the pure-template libraries of Armadillo lad. And since you're interested in doing this type maths for ML work, you may as well ride with mlpack to utilize it with. Besides, we already have AI researchers here working with both, so you'll be right at home with it, /robowaifu/ speaking. https://mlpack.org/ http://arma.sourceforge.net/
>>12422 >>12424 If you just want to cut to the chase, this lad has already hatched together a tensor contraction algorithm you can tinker around with for starters. https://github.com/romeric/Fastor I'm sure you'll have your hands full getting all this to work well on wee hardware like the RPi, but of course that's a serious and fundamental goal for the Model A robowaifu prototyping stage, so go to it you madlad! :^)
>>12425 >I'm sure you'll have your hands full getting all this to work well on wee hardware like the RPi I've been doing some tests and the RPi is roughly 1/10th the speed of my PC. Full-attention layers are probably out of the question but it should be able to handle linear attention. Fastor looks amazing. I hadn't heard of this. >>12424 Armadillo might have some issues with it: https://romanpoya.medium.com/a-look-at-the-performance-of-expression-templates-in-c-eigen-vs-blaze-vs-fastor-vs-armadillo-vs-2474ed38d982 But I don't think the norm function is needed for inferencing, only clipping the gradient during training. I'll test them both and see which is faster.
>related crosspost (>>12439)
Do the C++ anons here have this channel on their radar? Dave's garage: https://youtu.be/B9DouAlkZlc
>>12739 Thanks for the heads-up Anon, but something titled > 'New! Stupid C++ Tricks - Most Dangerous C Functions (E02)' doesn't sound like something I'm really interested in spending the bandwidth to download. Mind spelling out why you linked that particular one, is there something I'm missing? So-called 'C-with-classes' that so many C developers are prone to is absolutely the worst of both worlds and something no self-respecting C++ developer, nor the same for C developers would give two pennies for. Standard, straight modern C++ is superior in every way imaginable from the professional software engineer's perspective, and teaching newcomers circa mid 1980's software techniques is something only worthless college """professors""" who never slung a line of professional code in their lives would think of abusing doing tbh.
I still can't use Bump to reliably backup the forum. Even if a delete a whole subfolder from the folder with threads, and the catalog json+html it do recognize that something is missing. It doesn't remember failed downloads of pictures or files, so it won't try again. Before that it looked good, it updated some thread and downloaded all the old pictures with it. I don't know why. This would at least helpd a little.
>>13034 Hey Anon, sorry you're having trouble with BUMP. I'd suggest you try this command (note the 2 separate, extra '1' at the end): build/bump alogs.theГунтretort.com robowaifu 1 1 That should hopefully rebuild the special .archbot.config file for you, walk all the threads and all your local directories, and patch up anything missing. I added the two 'undocumented' flags to the program to deal with just such issues. Let me know if you still have issues, I'm usually around the board every few days like today.
>>13064 >that Гунтed link AUUUUUUGH ROBI U BASTARD Got me again. :^)
>>8823 How do I install/run this?
>>13537 meson build meson -C ninja cp cxxchanConfig.example.json cxxchanConfig.json cp config.example.json config.json build/cxxchan then uncomment the 0.0.0.0:80 listener in the config.json file, and you should be able to access localhost/sys/login in your browser *depending on your gcc version you might have to edit some const c-string declarations (const char* -> constexpr char*, constexpr char x[] -> constexpr char* x)
>>14626 ninja -C build*
Open file (97.52 KB 611x469 waifudev.jpg)
>>8823 God, what the fuck is wrong with whoever wrote that library you used? In libcaptcha.c: void makegif(unsigned char im[70*200], unsigned char gif[gifsize]) { // tag ; widthxheight ; GCT:0:0:7 ; bgcolor + aspect // GCT // Image Separator // left x top // widthxheight // Flags // LZW code size memcpy(gif,"GIF89a" "\xc8\0\x46\0" "\x83" "\0\0" "\x00\x00\x00" "\x10\x10\x10" "\x20\x20\x20" "\x30\x30\x30" "\x40\x40\x40" "\x50\x50\x50" "\x60\x60\x60" "\x70\x70\x70" "\x80\x80\x80" "\x90\x90\x90" "\xa0\xa0\xa0" "\xb0\xb0\xb0" "\xc0\xc0\xc0" "\xd0\xd0\xd0" "\xe0\xe0\xe0" "\xff\xff\xff" "," "\0\0\0\0" "\xc8\0\x46\0" "\0" "\x04",13+48+10+1); int x,y; unsigned char *i=im; unsigned char *p=gif+13+48+10+1; for(y=0;y<70;y++) { *p++=250; // Data length 5*50=250 for(x=0;x<50;x++) { unsigned char a=i[0]>>4,b=i[1]>>4,c=i[2]>>4,d=i[3]>>4; p[0]=16|(a<<5); // bbb10000 p[1]=(a>>3)|64|(b<<7); // b10000xb p[2]=b>>1; // 0000xbbb p[3]=1|(c<<1); // 00xbbbb1 p[4]=4|(d<<3); // xbbbb100 i+=4; p+=5; } } // Data length // End of LZW (b10001) // Terminator // GIF End memcpy(gif+gifsize-4,"\x01" "\x11" "\x00" ";",4); } He could've assigned that huge-ass string at the start to an array with a nice name like "header" and memcpy()ed the array, as well as taken its size with the sizeof operator instead of calculating it by hand. After making that mistake, he then goes and copypastes his complicated length calculation when initializing the variable *p, and makes the same mistake all over again at the bottom of the function. It's literally the first function in that file I read and a first impression like this usually means the entire program is rotten. He also got his MAX macro wrong. #define MAX(x,y) ((x>y)?(x):(y)) Notice how (x>y) doesn't parenthesize x and y. Just skimming further down I see memmove() used for no reason at the end of the filter() function (its source and destination don't overlap, the source is an auto array, the destination is one of the function's parameters). I also see a load of repeated small read() calls that would've been better done with readv() and which have no error checking inside captcha(). Then there's also the buttload of globals which in all likelihood are global for no reason, of which Clang says lt4 and lt6 aren't used. t. C programmer who wouldn't touch C++ even at gunpoint.
>>14738 Thanks for the constructive critique Anon, it's appreciated. Yes, memory-management is a very tricky issue, and one that few in life master. I strongly prefer to figure something like this out 'one time only', then encapsulate it all behind a simple-to-use interface I can stumble through successfully during a bleary eyed 3AM coding session. >t. C programmer who wouldn't touch C++ even at gunpoint. Kek. BTW, would you like to write robowaifu software with us here? I can tell you (well in advance) that we'll be needing many, many device drivers for our robowaifu's electronics & hardware systems. Literally hundreds of different drivers to adopt to our HALs. C programming will obviously play a very strong role in the devising of all these. It's certainly a man-sized task, and your help would be welcome if you'd care to assist us with it. We certainly have a big, big collection of things to do on our plate, and this will be a vital one. Cheers.
>>14738 >t. C programmer who wouldn't touch C++ even at gunpoint. Nice bait. Though its true that the majority of his globals are unnecessary and should be creatable in an array function as needed to take advantage of C++’s dynamic memory allocation. Optimization is truly a dark art these days.
>>14743 The constants that make up those globals have to be somewhere in memory, using a C++ feature for them won't improve anything. If anything it might create an undesirable situation where some memory is allocated and then the values are unnecessarily copied into the memory when the values could be used directly from where they already are in memory at the start of the program. They should be inside a function that calls the functions that need them, and then passed on as arguments. The compiler will place them in some region of memory and they won't be copied around if the compiler can prove they're never written to or if you explicitly give them static storage duration. The issue with the globals is semantics. Computers do what we tell them to do. That C programmer told the compiler he needs a number in a specific place that can be read and written in any way possible by anyone and that he wants the latest state of the number every time he uses it, when what he actually wants is a number that is always known and always the same and that will only ever be recalled in the current source file, gifsize should've been an enum which is what provides these semantics. Heck, thanks to POSIX the compiler doesn't even know if those globals will be executed, because POSIX has functions for making a place in memory executable. There is no such thing as self documenting code, but there is code about which there is less to know. One has to look at the entire program to tell if the global gifsize is modified and then find out why and when, even if it's const qualified, because const variables can be modified in C (and probably C++). If at least it had internal linkage, you'd know its only uses were in that ~240LoC file, and suddenly it's also easier to put faith in the "const" qualifier. The semantics of globals prohibit compiler optimizations. Inside a linkable library or without LTO, the compiler is forced to assume that the broadest set of operations is performed on the globals, as all it knows is that code other than the code it can see has read/write/execute access to them, and because of that gifsize & its friends can't resolve into immediates in assembly and the operations performed on them can't be resolved at compile time or anything like that, they have to be a place in memory that the processor has to fetch with a pointer and every single operation on them has limited range of possible optimizations. This isn't so much of a premature optimization as it is a nice little side effect of just getting the semantics right, correct code is both easier to understand and faster.
>>14758 Naicu insights, Anon. Thanks! >correct code is both easier to understand and faster. Lol, you clearly saved the best bit for last. :^) I would go further and add that the closer you fashion a solution in code to one that a domain expert themselves immediately recognize as good one, then the more likely it is to be efficient in both time and space after compilation. I hope you help us all with the drivers Anon. We'll probably start with the Arduino Nano (which is amply documented already) and move out from there. Cheers.
>>14759 Sure. But I haven't done drivers. Never touched an Arduino either.
>>14765 Neat! That's good to hear Anon. Welcome aboard! >But I haven't done drivers. It'll be easy. You just need to devise a standardized way to talk to the device's pins. As you might imagine, pin numbers can be all over the place, and may also require small amounts of preamble ceremony beforehand. We just need to turn that into easy to remember interfaces, standard across all the devices we'll use in our robowaifus. I'd suggest you have a look at Derek Molloy's videos for a starter Anon. https://www.youtube.com/c/DerekMolloyatDCU/playlists >Never touched an Arduino either. You might want to pick up a handful then, they're quite inexpensive (for the power they bring). Here's but one of hundreds of possible sources, 3 for ~ US$ 20 www.amazon.com/REXQualis-Board-ATmega328P-Compatible-Arduino/dp/B07WK4VG58 >=== -fix missing greenquote
Edited last time by Chobitsu on 12/23/2021 (Thu) 12:41:36.
>>14738 kek, feel free to email the libcaptcha author (kefeer@brokestream.com). that library has some problems indeed, I noticed that various things were wrong when I used it for the ib, I even felt tempted to rewrite it entirely, or at least partly, or at the very least fix the compiler warnings, but got scared by the copyright notice (points 1 and 2 in particular). and didn't want to waste time writing my own. I ended up doing things like avoiding the gifSize "constant" entirely and the declare my own ("constexpr int gifSize = 17646"; constexpr is a C++ specifier for expressions that are known at compile time). to avoid some of the semantic problems that you mention. you're wrong about the internal linking tho. g++ uses internal linking by default for symbols marked as "const" (and static, obviously). I never #include the libcaptcha.c file, so the compiler would throw an error (even before linking) if I tried to use those symbols anyway. the C++ part (my code) is even worse. from the hard-coded queries to the obscure orm (which needs it's own compiler to generate implementation files), blocking queries everywhere, and non-threadsafe globals in a multi-threading context. it nonetheless work. I might try to write something better in zig or C++ in the distant future
>>14826 >blocking queries everywhere, and non-threadsafe globals in a multi-threading context. We'd certainly be interested in seeing solutions to these issues Anon. BTW, do you know of Apple's libdispatch ?
Realized I was being kinda silly devising my own convoluted logging system out of concern for performance latency, once it suddenly dawned on me the C++ standard library already sported a perfectly-serviceable buffered logging system--which can lazily write to files. Here's a little RAII-compliant hack for doing just that. [1] >main.cpp #include <cstdlib> #include <fstream> #include <iostream> #include <string> class File_clog { public: File_clog() = delete; // no default ctor // globally-redirects all std::clog output into the given filename instead explicit File_clog(std::string const& name) : log_nm{name}, log_file{log_nm} { // assign this log file's buffer into std::clog : auto log_buff = log_file.rdbuf(); std::clog.rdbuf(log_buff); } ~File_clog() { // restore the original clog buffer std::clog.rdbuf(clog_buff); } void flush() const { std::clog.flush(); } void exit() const { this->~File_clog(); } private: std::string log_nm; std::ofstream log_file; // preserve clog's original buffer for restoration during this class' dtor std::basic_streambuf<char, std::char_traits<char>>* clog_buff = std::clog.rdbuf(); }; //------------------------------------------------------------------------------ // use a disk file named test.txt to write log entries into int main() { using std::clog; clog << "Foo, Foo, Foo\n"; // capture all std::clog output into logfile instead : File_clog const logfile{"test.txt"}; clog << "Test, Test, Test\n"; clog << "Bar, Bar, Bar\n"; logfile.exit(); // note: class' ofstream member flushes on destruction std::system("cat test.txt"); clog << "Baz, Baz, Baz\n"; // note: std::clog is working normally again here } --- 1. https://coliru.stacked-crooked.com/a/e9564f03168681f3 >example command line + possible output: g++ -std=c++20 -O2 -Wall -pedantic main.cpp && ./a.out Foo, Foo, Foo Test, Test, Test Bar, Bar, Bar Baz, Baz, Baz >=== -fmt, prose edit -reworked example
Edited last time by Chobitsu on 04/04/2024 (Thu) 21:48:40.
>>14826 well, I decided to finally write that zig imageboard, 2 years later. I'm still not 100% happy with the results, but it's an improvement over the previous attempt. this one is easier to setup too, and it only has two dependencies besides the zig compiler: sqlite and imagemagick. no libcaptcha this time (just imagemagick) and even less javascript (none) https://codeberg.org/cirefl/yutai (sorry for the necrobump)
>>28906 >(sorry for the necrobump) NONSENSE! :^) We here on /robowaifu/ don't believe in any such thing! :D BTW, if you do create a site, please allow for Torposting of files. Also, a post 'move' feature (such as the one supported by JSchan server software) would be very nice. And lastly, I may say that having a JSON API for your pages would be very welcome, since it would allow tools like our BUMP (and soon, Bumpmaster) to effectively access/archive your site's boards. Good luck with your project, Anon. Cheers. :^) >=== -add 'JSON' cmnt
Edited last time by Chobitsu on 04/04/2024 (Thu) 21:44:08.
>>28906 That's great. Can it import backups of boards via json? You probably just use the database, so is it documented where what belongs or is it only in the code? Also, did you share it in other places, so people who know Zig look at the code?
Just a headsup that I've picked back up work on the PPP2 project to support our C++ Classroom thread : (>>19777) , and as a direct part of our accompanying /robowaifu/ C++ Textbook thread : (>>18749) . Here's an early peek at the new files layout. I hope to be ready and pick the classroom back up around late May/early June. We'll see. Cheers. >main_p415.cpp : // filename: ./ch_12/main_p415.cpp // Code derived from Stroustrup's PPP2 book // § 12.3 A first example // -and beginning on p415 // -Instead of using the recommended Meson project way, this file can be built // and run standalone (from the root directory of the overall PPP2 project) : /* g++ ./ch_12/main_p415.cpp ./lib_src/all_srcs.cpp \ `fltk-config --ldflags --use-images` \ -I./lib_include/ -std=c++20 -O2 -Wall -pedantic -o p415 ./p415 */ // --=^=-- #include "Graph.h" // get access to our graphics library facilities #include "Simple_window.h" // get access to our window library //------------------------------------------------------------------------------ /** */ int main() { using namespace rw::Graph_lib; // our graphics facilities are in Graph_lib Point tl{100, 100}; // to become top left corner of window Simple_window win{tl, 600, 400, "Canvas"}; // make a simple window Polygon poly; // make a shape (a polygon) poly.add(Point{300, 200}); // add a point poly.add(Point{350, 100}); // add another point poly.add(Point{400, 200}); // add a third point poly.set_color(Color::red); // adjust properties of poly win.attach(poly); // connect poly to the window win.wait_for_button(); // give control to the display engine } // --=^=-- // Copyright (2024) // License MIT (Expat) https://opensource.org/licenses/MIT >=== -minor edit -patch crosslinks -minor code patch
Edited last time by Chobitsu on 04/18/2024 (Thu) 12:38:18.

Report/Delete/Moderation Forms
Delete
Report