/t/ - Technology

Discussion of Technology

Index Catalog Archive Bottom Refresh
+
-
Options
Subject
Message

Max message length: 0/12000

files

Max file size: 32.00 MB

Total max file size: 50.00 MB

Max files: 5

Supported file types: GIF, JPG, PNG, WebM, OGG, and more

CAPTCHA
E-mail
Password

(used to delete files and posts)

Misc

Remember to follow the Rules

The backup domains are located at 8chan.se and 8chan.cc. TOR access can be found here, or you can access the TOR portal from the clearnet at Redchannit 3.0.



8chan.moe is a hobby project with no affiliation whatsoever to the administration of any other "8chan" site, past or present.

You may also be interested in: AI

Programming Thread: Up and Running Edition Anonymous 04/27/2020 (Mon) 19:03:16 No. 9 >>16827
Hey Anon, Learn to Code! There's a bunch of free resources for learning to program. Come here to ask for advice or to discuss current projects. Download the complete Gentooman's Library: https://g.sicp.me/books/ Visit MIT OpenCourseware on (((YouTube))) https://www.youtube.com/user/MIT Or take one of these free online courses being offered by universities right now: https://www.freecodecamp.org/news/free-courses-top-cs-universities/
Edited last time by codexx on 05/04/2020 (Mon) 00:54:19.
>>8511 If by PajeetScript you mean Javascript then yes, yes it is if you work in webdev (which is most of programming jobs).
Honestly, I recommend starting with Python or something. >https://automatetheboringstuff.com/#toc
Has anyone ever made a webscrapper for collecting images under a tag/hashtag on twatter/oixiv/some booru? How would you go about doing such?
Bump this awesome thread. I'm learning prog from scratch, whish me luck.
>ctrl + f >"the art of programming" not found contempt.png
Should I try learning Angular, React or Haskell? Been searching for jobs on the internet and I've seen many complement the first two complement a lot with what I work with already (C++, ASP.NET, C#, T-SQL), but Haskell is something that, even though it was only one place that asked for it, calls my attention because apparently it has a different programming structure compared to most programming languages. It could probably turn out to be fairly useful
(42.10 KB 359x480 byte_lisp-2880772885.jpeg)

>>8844 ( (there can be ((only [((one,true)])language)) )
What would be the most appropriate neural network to train with a dataset like this?: id,timestamp B6Q_6XYb5p65QG3,1304474548 iSjl6kmliNfBFoI,1295997524 Uy9oyE2nzJxNWJZ,1256104029 QM5-eotmsdkPhf5,1134644428 4mcrT4f_wtSy_ru,1261067627 Sb4Eg5z12ESarN3,1647054017 WvwKiPE2AvcQFjI,1534320056 ekufrTSThZ3sJNW,1389277113 uJApLEvULs03tf4,1493811764 b4hcxn3qXVA4wd_,1239339894 y1OjJhKRkTSkven,1130146654 JeaF_DMH-fFGS4T,1425254914 KUgf-3FKes1IKQX,1447501927 6CMVPYsPXV7MOET,1298337269 AC3xm_8KCpTWE1i,1396932104 fvDNW4YLRYTzaDK,1537370404 Ni7Bg1tBG17UOLC,1401677745 O-6vRfrO7g6Zqz5,1277357594 37fk5yq9XQrOPFf,1635309809 G7UwXLgnp_PlYZ7,1257546306 The idea is to make a program that, when passing an id that it doesn't know, returns the corresponding timestamp (or an approximate one). Another question I have is, how should I normalize the dataset for training (from what I understand, numerical datasets are normally used)?
Is it really better to study everything from the ground up with these textbooks, or just jump into a tutorial and learn as you go? I feel that the latter is more fun, and fun is the most critical element in learning a skill.
What are some good alternative technology imageboards? This place is slow and I'm tired of 4chan /g/.
>>9456 The ID is randomly generated without a mathematical relationship to the timestamp, or is a hash of the timestamp? If so that's not something suited for AI, as far as I underatand. It'd be like trying to predict the outcome of a die roll based on when the roller woke up that day. You could try though maybe something would happen.
>>9525 soyjak.party/g/
About more than half of the stuff in the /g/ torrent looks to be pretty old man I was just wondering if an anon out there could update it with new stuff
Resources for those that wish to code: https://www.codecademy.com/ https://www.khanacademy.org/ And a good game engine to help you learn programming fundamentals. https://stencyl.com/
>>9560 >soyjak.party/g/ it's no longer a tech board
>>9560 And here I was thinking you couldn't get worse than cuckchan.
I have been adapting the code of https://gitgud.io/LynxChan/LynxChan/-/blob/master/src/be/native/captcha.cpp so that it does not depend on the Node.js API and in fact it compiles without problems, but at the moment of trying to generate an image it returns the following error: terminate called after throwing an instance of 'Magick::ErrorImage' what(): Magick: width or height exceeds limit `#FFFFFFFFFFFF[0]' @ error/cache.c/SetPixelCacheNexusPixels/5053 Aborted From what I could find out, it fails in this line: textImage.distort(Magick::ShepardsDistortion, distortArrayLength, distorts); What could cause this and how do I solve it? It doesn't seem to be a problem with the fonts and I also tested it in two different machines to rule out system problems (although on the other it does not return an error but a black image is generated). The modified code is the following: #include <ctime> #include <Magick++.h> #include <cstring> #include <iostream> #include <fstream> const int width = 300; const int height = 100; const int distortLimiter = 30; const int minDistorts = 3; const int maxDistorts = 5; const int minCircles = 5; const int maxCircles = 10; const int minCircleSize = 15; const int maxCircleSize = 30; const int lineCount = 5; const int minLineWidth = 10; const int maxLineWidth = 20; const double baseDistorts[] = { 0, 0, 0, 0, 0, 100, 0, 100, 300, 0, 300, 0, 300, 100, 300, 100 }; const int baseDistortsLength = 4; int rng(int min, int max) { return min + (rand() % (max - min + 1)); } extern "C" { void buildCaptcha(const std::string& text, const std::string& font, const std::string& filepath, int level) { srand((unsigned) time(0)); Magick::Geometry dimensions(width, height);
[Expand Post] Magick::Image textImage(dimensions, "white"); textImage.fillColor("black"); textImage.font(font); textImage.fontPointsize(70); textImage.annotate(text, MagickCore::CenterGravity); Magick::Image maskImage(dimensions, "white"); if (!level) { const int circleCount = rng(minCircles, maxCircles); for (int i = 0; i < circleCount; i++) { const int startX = rng(width * 0.1, width * 0.9); const int startY = rng(height * 0.1, height * 0.9); const int size = rng(minCircleSize, maxCircleSize); maskImage.draw( Magick::DrawableCircle(startX, startY, rng(startX, startX + size), rng(startY, startY + size))); } } else { int lineOffSet = rng(-maxLineWidth, maxLineWidth) / level; for (int i = 0; i < lineCount * level; i++) { const int lineWidth = rng(minLineWidth, maxLineWidth) / level; maskImage.draw( Magick::DrawableRectangle(0, lineOffSet, width, lineWidth + lineOffSet)); lineOffSet += rng(minLineWidth, maxLineWidth) / level + lineWidth; } } textImage.composite(maskImage, 0, 0, Magick::DifferenceCompositeOp); textImage.negate(); const int distortCount = rng(minDistorts, maxDistorts); const int distortArrayLength = (distortCount + baseDistortsLength) * 4; double distorts[distortArrayLength]; memcpy(distorts, baseDistorts, baseDistortsLength * 4 * sizeof(double)); const double portionSize = width / distortCount; for (int i = 0; i < distortCount; i++) { const int distortOriginX = rng(portionSize * i, portionSize * (1 + i)); const int distortOriginY = rng(0, height); const int offset = (baseDistortsLength + i) * 4; distorts[offset] = distortOriginX; distorts[offset + 1] = distortOriginY; distorts[offset + 2] = rng(distortOriginX - distortLimiter, distortOriginX + distortLimiter); distorts[offset + 3] = rng(distortOriginY - distortLimiter, distortOriginY + distortLimiter); } textImage.distort(Magick::ShepardsDistortion, distortArrayLength, distorts); textImage.blur(0, 1); textImage.magick("JPEG"); textImage.write(filepath); } } int main() { // Example parameters, font and captcha_path must be valid file paths std::string text = "o9sd8f"; std::string font = "/usr/share/fonts/dejavu/DejaVuSans.ttf"; std::string captcha_path = "captcha.jpg"; int level = 2; buildCaptcha(text, font, captcha_path, level); std::cout << "Captcha generated and saved in " << captcha_path << std::endl; return 0; } And this is the command I used to compile it: g++ -o captcha-standalone -fPIC captcha-standalone.cpp -I/usr/include/ImageMagick-7 `Magick++-config --cxxflags --cppflags --ldflags --libs`
>>9456 Why would you use a neural network for this? Is there even any relation in your dataset between ID and timestamp? Garbage in - garbage out.
>>12088 >What could cause this and how do I solve it? Some of the math is probably blowing up. Debug it to see where the problem is and inspect the values, or if you don't know how that then add logs to the same extent.
>try to learn Qt for a project >still shaky on C++, but I can make do >try to figure out how to properly exit the main loop >qt example just does QCoreApplication::quit() in some unrelated class >wut >read through documentation again >public slot: void QCoreAppliction::quit() blah blah blah and a few tips to make sure it works >no mention of why you can access it from somewhere else without even referring to the object >wonder if this is some Qt specific bullshittery >fruitlessly try to research the issue >check the implementation of quit >nope, it's just a three line call to exit() >keep researching, still nothing >decide to check the header file >public slots: static void quit() <DSP_woooow.webm >later realize the documentation does include the static part, as a small, hard to notice comment on the side
>>9 (OP) Gentooman is kill, but you can download the torrent/mag link on IA.
Hey bros what's your favorite language? After 5 years of C#, I'm finally learning Go and love it.
>>18191 Bash because it's the only one I can use :(
>>18191 Hasklul
>>18191 after 25 years of programming with everything, i still haven't see a pl superior to lisp/scheme.
>>18191 Ruby is the one I find most comfy to work in, though it's not necessarily the one I use the most. But if I have an I/O heavy task that isn't super dependent on certain data science libraries, I'll often dip into Ruby.
>>18191 I've been programming mostly C and Python for a long time and lately have to use CUDA/C++, dabbled in Scheme with SICP, use xmonad as a WM, so a bit of Haskell, and metric fuckton of shell scripting. To be honest, I don't have a favourite language in general. For a type of problem, I'll have a favourite language because I know what a pain it'd be to implement in the others. I won't do complex image segmentation in C, but I'll write my HPC solvers in C/C++ and when it comes to text processing, shell scripts it is. Glue? Shell.
Any tips on how to meaningfully get better as a programmer? I have been working as self-taught systems-level c++ dev for 2 years now, after doing a master's in physics and realizing there are no jobs. I'm working through books on the side, but I always forget anything I learned in them because I don't use it daily. And all of my projects seem very pedestrian to me (chip8 interpreter, TFTP server, 3D renderer, malloc-clone, a simple shell etc.). At the same time I feel like any meaningful project would take more than a year for me to finish since I work full time and want to keep reading up on new topics at the same time. My job is not very challenging 90% of the time, at least not from a programming perspective. I don't know if this is different at other places, so I'm worried I'll be on the streets if when lose this job.
>>18191 I'd go with Pascal as a favorite maybe, but I don't write it regularly. I use Go for anything that needs a bit more performance because I'm too lazy to write it in C. Otherwise I'll use Perl for glue code/small build scripts, and since I mostly write web apps I'll use something like Elm. For desktop apps, I'll use Raylib and <insert language here> because it really just works in most languages. I guess picking a favorite language is kinda difficult, but I enjoy functional and procedural paradigms the most.
>>19045 To become a better programmer, write more programs. If your job is not challenging you enough, consider some side projects. They will certainly enhance your resume in case you lose this job.
I just got done implementing a version 4 UUID generator in Elm because I didn't like the packages online. I know I can't use it for security stuff, but, realistically, how probable is it to get repeated UUIDs using Elm's random generation compared to Math.random in JavaScript?
>>19045 Getting better as a programmer is partially about knowing the tools at your disposal, i.e. what your language and libraries can provide you, with the rest being split between knowing what kind of approach to apply to a problem and knowing the problem. Being able to weigh approaches comes with time spent writing programs, at least if you don't always apply the same techniques and look for alternative approaches. Same goes for what your language can provide. Knowing the problem is, at least in my opinion, something that is entirely undervalued. There's that "print this pattern" thing from a few years back >>602 and it looked instantly like a simple max-norm to me, trivial. And then I see the jeet solution later and puke. Domain knowledge, like with the above, doesn't just come to you. The question of what domain knowledge to acquire depends on your goals, and if those are "be employable", then the still living ML """AI""" hype might be your best bet. I myself see it as a huge bubble of wasted money and energy (both mental and electrical).
>>20199 I wonder what the residual impact of over investment in AI will be. Don't you think that AI users are going to atrophy their skills to the point where they'll need AI to work which is essentially going to anchor it as a required asset for programming? I personally use it for nothing outside of a better search engine, but I wonder how many power users are going to reflect in the aftermath of all this hype.
>>20200 Going to atrophy? It is already ongoing. In my previous job some people couldn't even code simple shit without asking ChatGPT-chama. In my current job in Japan people use it to write and translate stuff without giving a second thought; but the place where they submit that crap have a policies which don't cover that use, and they just don't check that box. People are entering a dependent state fully willingly because it's quick and easy. Right until their house of cards collapses. It's smartphones and decreasing attention spans all over again.
>>20212 I've left the industry for some time now, but I'm not surprised the state has worsened so quickly. I guess rampant incompetence is a constant regardless of country.
(45.26 KB 512x512 zunovna.jpg)

int tm_year /* year - 1900 */ int tm_mon /* [0-11] */


Forms
Delete
Report
Quick Reply
Drag files here to upload or
click here to select them
No Cookies?
0