/tech/ - Technology and Computing

Technology, computing, and related topics (like anime)

The canary has FINALLY been updated. -robi

Server software upgrades done, should hopefully keep the feds away. -robi

LynxChan 2.8 update this weekend. I will update all the extensions in the relevant repos as well.

The mail server for Alogs was down for the past few months. If you want to reach out, you can now use admin at this domain.

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)


Open file (14.39 KB 711x512 haskell-logo.png)
Haskell general - see what other languages will introduce in 10 years Anonymous 09/14/2019 (Sat) 19:42:43 No.114 [Reply]
This thread is for make benefit glorious language of Haskell and functional programming in general. Discuss anything from newbie questions (what's a monad?) to advanced topics (what's a monad?) to category theory (what's a monad?) to your real-life haskell projects (>implying haskell is used outside academia) to what language features should be included in GHC9 to which IDE is best.

The hottest opinions: https://github.com/ghc-proposals/ghc-proposals/pulls?q=is%3Aopen+is%3Apr+no%3Alabel

Haskell for starters: http://learnyouahaskell.com/introduction#what-you-need
Hoogle: https://www.stackage.org/
Introduction to lenses: https://www.schoolofhaskell.com/school/to-infinity-and-beyond/pick-of-the-week/a-little-lens-starter-tutorial

If you're past the Hello World phase, I highly recommend using stack to sandbox projects https://docs.haskellstack.org/en/stable/README/#quick-start-guide and install HIE for IDE integration (e.g. VS Code) https://github.com/haskell/haskell-ide-engine#user-content-installation . Where Hoogle beats any other form of documentation, HIE beats any autocomplete and checker, simply because Haskell has such a rich type system and GHC has features like typed holes.

Honorable mention to http://www.purescript.org/ for being basically Haskell but without a lot of legacy garbage and with row types. A huge downside is that it's not lazy.
5 posts omitted.
>>3023 You can do an old AoC, although AoC is very much aimed at imperative languages. Other than that try project euler and kattis.
>>3025 >kattis Exactly what I was looking for, thanks m8.
if i learn haskell can i get a job and make 3 gorillion dollars a year?
>>3039 No, but you may be able to use it to virtue-signal your way into a position of temporary power in the coming pozfest during the coming collapse of the West. Elephant language is popular in academia (especially with a certain type of professor) after all. If you want gorillions then learn C++.
>>3039 If you have to ask it's a no. Most people who have learned Haskell out of interest enjoy a well-paid and satisfying job. And by learned I mean knowing how to build a useful program, not just knowing hello world, list comprehensions or >hurr durr monads are burritos. But don't despair, even if you only want to learn it to make 9 bajillion dollars, learning Haskell will help you become a better programmer by presenting you with approaches and abstractions that you could never imagine and can be applied in other languages too. And better programmers earn more.

Anonymous 08/09/2020 (Sun) 03:00:20 No.3036 [Reply]
>>3009 You forgot how micro$oft exchange (for some reason a majority of companies) still spam-file or grey list your server even when you have a perfect reverse proxy, DKIM and SPF. Still worth a try though.

Anonymous 07/24/2020 (Fri) 06:04:09 No.3007 [Reply]
What can we do to help mitigate spam on imageboards? In the past few months I have noticed an increase of spam (especially political drama manipulation and website ads) mass posted on literally dozens to hundreds of imageboards at a time. I have no doubt this will increase as we approach the US elections. How can we use technology to help mitigate the destructive impact of spam? One place where this is important is on political boards which often mistake political manipulation spam for legitimate contributions as it fits their board topic. It's also less obvious to people who use only one IB.
Open file (713.49 KB 868x651 Science.png)
Examples of spam you might recognize: https://html.duckduckgo.com/html?q=well%20now%20it%27s%20here%20and%20you%20pathetic%20incel%20losers%20are%20just%20sitting%20at%20home%20jacking%20off https://html.duckduckgo.com/html?q=%22bear%20witness%20that%20there%20is%20nothing%20worthy%20of%20worship%20in%20truth%20but%20Allah%22 https://html.duckduckgo.com/html?q=A%20slow%20but%20friendly%20greeting%20from%20Slothchan! https://html.duckduckgo.com/html?q=%22Antifa%20blm%20planning%20on%20mass%20murdering%20white%20people%20on%20july%22 Some ideas: >use search engines to identify and call out spam like above. Anyone can do it without effort, but it's manual volunteer work. This also becomes harder as more imageboards use robots.txt to unindex themselves and because it takes a few hours for search engines to update. >make public scraper bot to regularly check various imageboards for identical posts. It could have a public feed of recent spam topics and archived proof of spamming with a list of sites hit with it. You would just post a link to that site whenever it shows up. Downside: persistent threat could add random elements to try and defeat automatic identification, cat and mouse game. Unlikely to see that dedication though? This could also be used to ID false-flag spamming a topic by listing the post time (if it gets posted on a /pol/ board and then spammed six hours later, it's probably inorganic.) >moderation webring. Have a way for staff to report spam posts and have it report identical posts on other imageboards if they exist.

Message too long. Click here to view full text.

>>3007 Spam is a partially solved problem. It was estimated that over 80% flow of emails is spam. Nobody is covered in spam because spam detection solutions are good, they have all kinds of statistical learning filters. Modify rspamd, or cheaply format posts as emails and pipe that through rspamd. Moderators can easilly teach rspamd filters by "Marking as spam" like you do for emails. Just make sure to disable dns checks and email specific modules.
>>3009 That's a good idea but I am skeptical of how effective automatic filters could be for less generic spam, such as ones not including links like most of the examples given, especially on random boards or political boards. If they weren't posted on multiple imageboards or in inappropriate places, they could easily be identified as legitimate OP posts. That would still be great for generic link-spam though.
>political drama manipulation huh the old trump/russia collusion trope funny to see it unironically on an imageboard
>>3009 Email is used by basically everyone who is on the internet. The dataset to train spam filters is enormous. I reckon it wouldn't work nearly as well at a place like this.

Open file (8.21 KB 320x284 veracrypt_1-1-24.jpg)
Anonymous 01/28/2020 (Tue) 19:03:17 No.1424 [Reply]
What do you use for encryption of your data?
9 posts and 1 image omitted.
>>1435 Sadly that gives Bluescreens on Winblows, so I use Veracrypt in TrueCrypt-mode. Don't really have a choice.
>>3013 Which Windows are you using? My 64-bit Windows 7 has never encountered a bluescreen from TrueCrypt.
>>3014 Server 2019. It probably also happens on 10. It's because of a bug in TC that never got fixed. The bluescreen will say "reference by pointer" https://answers.microsoft.com/en-us/windows/forum/windows_10-performance-winpc/error-reference-by-pointer-in-windows-10-pro/407e1e4b-b2a3-4d27-a0a5-a7a851749d5a
Is there a reason why Veracrypt should be considered untrustworthy?
>>3027 Don't know why its not trustworthy. But if you are on microjew os, your data is compromised. On Linux, LUKS and dmcrypt are better anyways.

Daily(or whatever) Programming Thread Anonymous 08/21/2019 (Wed) 14:47:20 No.8 [Reply] [Last]
What are you working on? Wether you just want to show off your shiny new program, or you need help with a programming issues, this is the thread for you!
211 posts and 53 images omitted.
>>2985 if you want a simple formula for diminishing returns with a given maximum, it's: power = max_power*turbine_count/(turbine_count-1+max_power/power_per_turbine) (you can check for yourself that with 0 turbines you get power=0, with 1 turbine it's power=power_per_turbine and with infinite turbines it's power=max_power) if you get multiple types of turbines hooked up to the same system, you can calculate an average power_per_turbine. that way it doesn't matter in which order you have your turbines or whether you have 2 normal turbines vs 1 good one and 1 awful one, but having 2 turbines with a power_per_turbine of 30 is slightly better than 3 turbines of 20.
>>2988 >you can check for yourself that with 0 turbines you get power=0 Nope, when self.power_per_turbine is 0 and/or self.turbine_count is 0 I get "ZeroDivisionError: division by zero". >with 1 turbine it's power=power_per_turbine Yes as excepted >and with infinite turbines it's power=max_power How are infinite turbines represented programmatically wise? I'm not sure if Python is capable of calling "Inf" amount of objects. Current script: https://0bin.net/paste/iTHqnMlJE3rUoZ5S#HgHcQ9Uknt7FmBGlzsS2BuUgBS9m6EMyYhlHV2ROPgg With self.max_power = 100000000 Results (Without a turbine_count condition): Power: 4,850,000.0 --- Turbine: 1 Power: 9,251,311.397234144 --- Turbine: 2 Power: 13,263,445.761166818 --- Turbine: 3 Power: 16,935,835.87952859 --- Turbine: 4

Message too long. Click here to view full text.

>>2989 >Nope, when self.power_per_turbine is 0 Sure, but you've got a really shitty turbine if its designed power rating is 0. :^) Indeed, in practice you need to first check if the power per turbine is valid or by proxy whether there's any turbines, otherwise the formula doesn't make sense. >it causes power output fluctuation when I increase/decrease self.max_power despite the power output is not reaching that limit yet, is that intentional? Yes, because the formula is a simple smooth line. Last time I made an interactive graph to shed some light on the formula, but geogebra requires registration to share it so I left it at that. So here's the setup in desmos: https://www.desmos.com/calculator/v4l49zrkst If you make the power per turbine very small, like p=100 000, you'll see that the effective power grows nearly linearly with more reactors and barely changes when you slide the max power around. But the larger the power per turbine is, the more you'll see the total output fluctuate with a change in the max power, even with only 2 turbines. And the more you'll see that extra turbines have diminishing returns.
I'm just beginning a book called C++ Crash Course by Josh Lospinoso, from No Starch Press. In the preface of the book, he addresses benefits from C++ that C-only developers can take advantage of if they compile their C code with a C++ compiler. Here's an approach that allows C code to use C++'s RAII idiom, and it won't leak the file handle in case something external to the code breaks (like the disk space is exhausted for example). // demo of a SuperC file class, pp55-56 #include <cstdio> #include <cstring> #include <system_error> struct File { File(const char* path, bool write) { auto file_mode = write ? "w" : "r"; file_ptr = fopen(path, file_mode); if (! file_ptr) throw std::system_error{errno, std::system_category()}; } ~File() { fclose(file_ptr); }

Message too long. Click here to view full text.

Open file (644.04 KB 656x749 scientist.png)
>>2990 >Sure, but you've got a really shitty turbine if its designed power rating is 0. :^) It will happen when the steam temperature is less than 100°C caused by lack of fuel or lack of water input (to produce steam off from). >nearly being done with refactoring my turbine and reaktor object >hook them up to my main program which contains the structure object >I have to deal with 2 major bugs now >one is that the reaktor for some reason doesn't produce any steam due to lack of water input despite I make a function call to do so >the other bug is that turbine receives only on certain condition steam and has odd behavior depending how much steam is inputted Oh man this is going to take ages debugging this shit.

Open file (22.32 KB 640x480 StackMachine0.01.2.png)
Homebrew and Hardware Faggotry Anonymous 08/26/2019 (Mon) 18:30:24 No.40 [Reply]
I figured we can have a thread for hrdware shit. I'm planning out a homebrew CPU. This is my proposed microarchitechture. I've posted it on every other fucking imageboard. I might as well post it here. It's a pretty simple stack machine. I'll be making it from 74LS series TTL logic. I plan to use two 74LS181 for the ALU. The data bus will be 8 bit's, but the adressing will all be 16 bit so I can get a whopping 64k of ram for program memory and the stacks.

Also general thread for hardware and electronics projects.
>>40 Very nice, I'm also looking into CPU design. Even for a One Instruction Set Computer (OISC) based on SUBLEQ, you still need things like cache, peripherals etc. for the design to work sufficiently well. Of course you need a compiler/assembler too XD
>>40 >I'm planning out a homebrew CPU Then I'd recommend you check out Ben Eater's videos first OP. >>>/robowaifu/1554

The Python Pill Anonymous 04/27/2020 (Mon) 17:46:30 No.2720 [Reply]
I'm having mixed feelings about this language. I've been recently tasked to write a project using it and part of me is really happy about how relaxing it is to code with it, that is to say, how braindead most of its functionalities are and how easy it is to just grab a module from someone else, try it, find out they forgot some very important functionality, just add it in post and use it as you please. On the other hand, it's staggeringly heavy duty unless you're going for GPU processing and some design choices are just counter intuitive (why is there no Switch case? who thought that having different parts of code be separated by indenting them would have been a good idea?) - so I'm left asking you guys: 1) Is it worth it learning expansively over other languages? 2) What are your thoughts on its features? 3) Some neat modules you've found?
7 posts omitted.
>>2726 >I think you can create working executables with it. With external and unofficial tools, not natively afaik. No official support is a big deal when money is involved, you can't simply go "teehee we can't deploy the new code because some guy on github no longer maintains his py2exe tool, whoopsie".
>>2720 I hate Python packages. Disgusting virtual envs.
1. Learn it for computer vision or machine learning. Other than that it's a lazy alternative for writing native applications, but performance is going to suffer. 2. The reference and scoping semantics are both about as backwards as you'd expect for a scripting language, deploying python programs is a pain in the ass, and its async/await system is poorly implemented compared to its contemporaries. It also has most of your typical dynamic typing pitfalls in terms of maintainability, although it doesn't suffer from php and javascript's type coercion problems. It does typically manage to be fairly concise, although this is due in large part to library design, but it's nice to have regardless. 3. pyopencl is pleasant to work with, although I would generally recommend writing a native library containing your opencl code instead.
>>2720 >2) What are your thoughts on its features? It tries to make everything easy by having a simple syntax that is leaving out many things you'd see in other languages. Like curlybraces. But that makes python actually much harder to read because everything looks the same.
I am not sure if I should like Python. Some of the pro's I can think of is the pretty strong standard library. Also the data structures are very simple to use. Also there are very easy libraries for every task I can imagine (flask, tensorflow, pandas, opencv, mongodb, ...) But to be honest, most of the times being "pythonic" feels like messy code. The thought of having multiple classes in one file is not my favorite choice. Also the missing type safety, missing interfaces, structs,... makes it difficult for me. I head learnt most of my clean code and clean architecture skills from Uncle Bob. And Python seems to work against the code style I learnt.

API's and Bindings thread Anonymous 07/16/2020 (Thu) 01:22:40 No.3001 [Reply]
Holy shit, I just started using Lua 5.3's C api and it's so much cleaner than the 5.1 api I was using before. It makes it so easy to build out metatables for all the types that you're trying to bind. the luaL_checkX functions are a godsend too, it's a real breath of fresh air coming from certain other scripting languages. I think the SLOC I needed for binding easily went down at least 20% using this new interface. It's still got some warts like the lua_tolstring caveats, and the weird proxies and function metamethods for getters and setters, but I think it's a big improvement. ITT Talk about binding things to other languages. Do any api's stand out to you as particularly clean, effective or clever?
>>3001 I know very little about this topic, but I have a C++ program I'm working on that I'd like to provide a reduced & simplistic Python API for so users can script the most basic parts. ATM I'm assuming the Boost library for this would be a reasonable choice, though I haven't yet reached the stage where I'll need to do serious investigation and prototyping for it.
Guile's bindings are nice. Even withing C you can do very lispy things with it. It has a problem in which the "context" is implicit and pretty much invisible, so you can't use it as-is but you have to pass a function pointer to a function which initialized the context; when your function is called, you can use Guile's API however you want, until your function terminates. Under normal cirumstances it wouldn't be too much of a hassle, but I'm using it in a program with a lot of asynchronous operations, so I ended up writing a function which is called when the asynchronous task is executed, which calls the function to temporarily intialize the Guile context (for various reasons I can't keep the whole program in Guile mode all the time) so that the Guile API can be used. In the worst case the callback chain can reach more than three functions just to iterate over a list.

Jewtube WOn't support Palememe no moe Anonymous 02/04/2020 (Tue) 23:20:18 No.1483 [Reply] [Last]
FUCK JEWTUBE FUCK THEM Discuss
109 posts and 13 images omitted.
>>2954 Yeah, I have the same issues. >>2956 >straw-viewer First time I've heard of it. Seems like they use the invidious API, so wouldn't it have the same breakage problem?
>>2972 Try it out. It is light
>>2973 Yeah I'm testing it out now. Seems slick, like a better, terminal-based version of freetube. Very nice.
>>2975 Good to know. There is a catch, video are streamed from jewgle servers directly, not proxied via invidious.
Open file (303.53 KB 1000x978 sdafsfa.png)
>>2976 Invidous doesn't proxy video streams by default. I think it's an option instance owners can enable, but it will be disabled for all public instances because of the bandwidth requirements.

Open file (62.87 KB 560x377 cell_phone_functions.png)
New Jersey Style Anonymous 10/07/2019 (Mon) 14:33:51 No.434 [Reply]
What would it take for New Jersey/"Worse is better" style to make a comeback?

I feel like everything has gone downhill since phones made the MIT approach win out.
>>434
I think once the power grid goes down, your answer will be clear anon.
>>434
Worse is better is why everything sucks.
>>434
For someone to hax themselves into the glownigger mainframe and send rm -rf / via ssh to all Intel management engine/AMD PSP/other botnet-equipped devices connected to the Internet with execution set at a fixed future date to ensure maximum coverage.
>>434
>phones are used as toothbrushes even moreso than as electric drills in the future.
heh
Open file (28.45 KB 480x360 zhqdefault.jpg)
>What would it take for New Jersey/"Worse is better" style to make a comeback? It has never went away. Woke retards appeal to this bullshit every day and have since the beginning of computing. And now they turbo appeal to it with the absolute garbage that is "golang". The entire existence of webshit and electron is just an episode of worse is better. Smartphones literally run linux what the fuck are you even talking about. DAY OF THE SEAL SOON

Report/Delete/Moderation Forms
Delete
Report