I’m working on getting an ISO burned to my USB drive but all I have is my Arch laptop which is currently Linuxing™ really hard (taking fucking forever to install an ISO burning tool called Ventoy) so I’m just kinda sitting around waiting :/
okay so it looks like the malware has actually corrupted Windows Defender and is still here after all, so I’m going to have to reinstall Windows from scratch and restore my files from a backup, and hopefully the backup hasn’t been infected too
@CIMB4 ooh I didn’t but that sounds like a good option! it’s actually taking forever to do the scan - it’s actually still running. so I’m not sure if I want to do an offline scan if it’s going to be another 10+ hours, but tbh I might at some point just to make 100% sure that there’s nothing left on my computer
@liese ohh interesting okay! so for this expression:
map sum . combinations . divisors $ n
could it be written as this?: (I’m using Python syntax here because I’m more familiar with it)
map(
lambda i: sum(combinations(divisors(i))),
n
)
I think that Haskell’s order of operations might turn the line I took from your code into this:
map(sum . combinations . divisors, n)
but I’m not totally sure if that’s how it works, and I don’t really know what would happen to the currying at that point
also for languages with curried functions, how do you keep track of how many arguments have been used up and how many are left to go? do LSPs give you that information so you can make sure that you’ve used up the right number of arguments?
and does it ever get confusing that function application happens in reverse order? like the original data is on the right, then each subsequent function is to the left, so I feel like you might need to read it right-to-left in order to understand what’s happening
also is there a cleaner way to chain three function applications like this?:
takesThreeArgs 0 x 1 = -- something I want happens here
myChainedFunc x = takesThreeArgs 0 (takesThreeArgs 0 (takesThreeArgs 0 x 1) 1) 1)
because if x was the last argument then you could just use currying to fill in the 0 and 1 but it’s the second-to-last argument instead
sorry for all of the questions but I’ve always wondered about these things
I literally saw someone trying to gatekeep the phrase “terminal user” a few days ago and I got downvoted for calling them out lol
every reddit response to a tech problem:
you deserve it tbh. it’s not even that hard not to have problems like this. literally all you have to do is [extremely time- and skill-intensive Linux thing that they’re clearly humblebragging about being able to do] which is honestly so easy and I think literally everyone should be able to do it
@liese hehe - yeah I definitely felt like I was making too many small functions. I was hoping that by having a lot of little functions, it would be easier for me to understand the bigger picture of what was happening, but I still think that my code is pretty hard to conceptualize - especially all_combos() which I’m not even sure if I could articulate what it does without giving examples or using a metaphor or something
I’m glad that it isn’t just like terrible code or anything though lol. also wow Haskell is so much more concise! I’ve tried to learn Haskell in the past so I can understand a lot of this code, but I’m definitely lost trying to understand isPractical and main lol
here’s my first attempt! https://pastebin.com/V9EPpMTz
what do y’all think? I have no idea what I’m doing and I feel like my code might be kinda hard to read, but I don’t know how to make it any more readable, either. also I just find functional-style code hard to read in general so I’m not sure if my intuition is worth anything here
so I’ve decided that I want to dip my toe in functional programming by doing some DailyProgrammer puzzles in Python (the language I’ve used for like 15+ years) but I’m going to do it in a declarative style and treat all data as immutable. I also found a cool functional library called toolz that I want to play around with
toolz definitely has the Clojure “problem” (it’s a problem for beginners like me, anyway) of being cluttered with a fuckton of different functions that are slight variations on things like reduce() or map() or etc., but I wonder if being able to concisely express something like diff(), for example, might be genuinely useful. instead of having to express this as a filter() with a lambda (which is much more explicit)
the reason why I’m not going with F# is just because I feel like the strange syntax (= for comparison, <> for not equal, <- to change a variable, and whatever the fuck | :? is, for starters) would add a lot of cognitive load that would be pretty demoralizing on top of me trying to learn a whole new programming paradigm and feeling dumb and out of my element. so I want to stay at least partly in my element while messing around with this, which is why I’m sticking with Python
although, I might try F# in the future! I definitely don’t like Lisps but it seems like other functional languages have something called monads which are basically like the functional programming version of classes. they address one of my biggest problems with Lisp-like languages, which is that there’s seemingly no way to add context to your data (like “this dict represents a catgirl”) or to group functions that operate on a certain type of data (like “this is a catgirl method that returns a matching botgirl”) or even to clearly indicate what kind of data your functions expect to get
I’m pretty sure this is because I was helping some people troubleshoot their GitHub code that wasn’t working on my machine :/ that’s what I get for trusting strangers on the internet I guess
I somehow got infected with a bitcoin miner
I’m like 80% sure that I deleted all of the malicious files (including one that Windows Defender didn’t catch) but I’m now going to put this new CPU through its paces to scan the fuck out of everything on my system just to make sure. all 500+ GB of it. I’m really hoping that there’s nothing lingering that’s going to come back to bite me later
yes i feel extremely normal about the shadow’s game over scene from look outside. i definitely found it horrifying and nothing else
@ghostlyash aaa why are there so many hot beings on Fedi?? I can’t handle these many gay feelings this early in the morning
/positive
💕💕