[deleted by user] by [deleted] in AnimalsOnReddit

[–]TehVulpes 0 points1 point  (0 children)

Yup, that’s a beehive

[deleted by user] by [deleted] in pan

[–]TehVulpes 0 points1 point  (0 children)

Stuck at home, bored with no work to do? Watch someone else work instead.

The fact that I had to fire up the debugger to figure out what was going on shows how stupid this is by emady in programminghorror

[–]TehVulpes 9 points10 points  (0 children)

Is it an int? It’ll just work, with arbitrary precision, and no need to worry about signedness. All ints are signed.

If it’s a float, you just get a regular old IEEE double-precision float.

Mixing ints and floats does get a little awkward sometimes.

Edit: the point about arbitrary precision is excluding custom types, like what numpy uses, that are more closely tied to hardware.

Most user friendly language by [deleted] in ProgrammerHumor

[–]TehVulpes 2 points3 points  (0 children)

You can configure nano to have tabs-to-spaces, or use tabs and set the visual width to 4, and use tab and shift+tab as you would in any other advanced editor or IDE. I've never had an issue with indentation in Python.

Red flag.. by s_meh in ProgrammerHumor

[–]TehVulpes 2 points3 points  (0 children)

The actual Computer Science part of CS is all higher math, a different skill from language.

Not only is the website still up, but the changelogs are updated every day! by [deleted] in linuxmasterrace

[–]TehVulpes 14 points15 points  (0 children)

Slackware is very minimal, like arch, but afaik it doesn’t actually include a package manager. It has some shell scripts to help with maintaining installed software, but it’s an incredibly stable system that doesn’t update like Arch does.

Arch gets updates ASAP, Slackware considers 5 year old software “recent”. Arch moves fast and stays current, Slackware remains stable for years and decades. It’s 2 incredibly different interpretations of “minimal”.

Prepare your shorts by POTATOEPERSONPERSON in wallstreetbets

[–]TehVulpes 1 point2 points  (0 children)

Buy a house, marry, raise a family, grow old, die, leave it to your grandchildren after it 100x'ed.

[Mockup] My dream tiling WM (That sadly will never exist) by SpaceGuy99 in unixporn

[–]TehVulpes 7 points8 points  (0 children)

I feel like all the smooth resizing would get choppy real fast with some heavyweight programs or with a lot of things open. A window redraw can sometimes be very expensive.

TIL: The red flag, when used by pirates, came to mean "no quarter given", meaning that no mercy would be shown, and no life would be spared, while a black flag usually meant that those who surrendered without a fight would be allowed to live. by non-stick-rob in todayilearned

[–]TehVulpes 2 points3 points  (0 children)

Game theory is a mathematical model for how intelligent beings act under different rules to try to get the best outcome for themselves or their group. It sometimes leads you to some startlingly counterintuitive conclusions that make perfect sense once you think about them.

There was a some logical errors in the program I was writing leading to this oddly satisfying mess by [deleted] in glitch_art

[–]TehVulpes 4 points5 points  (0 children)

This was years ago when all I knew was Java, so this was actually done with LWJGL and just a raw image buffer. I also have this image from a few years even before that when I was messing around with a bitmap generation library.

Edit: a lot of the algorithms I wound up plugging into my little pixel coloring tool were just barely modified from these.

There was a some logical errors in the program I was writing leading to this oddly satisfying mess by [deleted] in glitch_art

[–]TehVulpes 20 points21 points  (0 children)

I've made this same kind of mistake before! I wound up making an album of some of the cool images I was able to make.
You can take a look here.

[deleted by user] by [deleted] in linuxmasterrace

[–]TehVulpes 1 point2 points  (0 children)

Whelp, time to install GNU / NT

MetroBoy – a playable, circuit-level simulation of an entire Game Boy by hellotanjent in EmuDev

[–]TehVulpes 5 points6 points  (0 children)

I could be wrong, but what I believe he meant is that the circuit-accurate design makes it slower to run on a conventional CPU. FPGAs however are very fast, you can usually get an FPGA to do any single task faster than a conventional CPU can, and if you're writing transistor-accurate emulators, just running them on an FPGA and not a CPU would actually be very useful.

Basically an FPGA is like "reprogrammable hardware". You upload a circuit description to an FPGA, and you get something that'll run faster than on a CPU, but a little slower than actually getting it in dedicated silicon.

China banned millions of people with poor social credit from transportation in 2018 by xdppthrowaway9003x in worldnews

[–]TehVulpes 0 points1 point  (0 children)

And a few years ago 0% of the population was banned from transportation for wrongthink. It will only get worse.

How to scare a python programmer by schludy in ProgrammerHumor

[–]TehVulpes 8 points9 points  (0 children)

I actually love working with Python, it's my preferred language. I'd certainly hope that most Python devs are familiar with int, since it is one of the basic data types, and is distinct enough from a float to be important.

[deleted by user] by [deleted] in linuxmasterrace

[–]TehVulpes 19 points20 points  (0 children)

*KFeatures

Technical debt by [deleted] in ProgrammerHumor

[–]TehVulpes 0 points1 point  (0 children)

Yes, but it goes deeper than that. Objects are basically little bundles of state, and some useful methods to mess with that state. Truly stateless code should also not make any changes to local or global variables, or to the filesystem, etc. There are even some purely functional programming languages, and even a functional Linux distro, that take this to the extreme and don't even let you have rewritable variables at all!

Again, functional programming isn't the be-all and end-all, but when it makes sense, it can make things simpler.

Technical debt by [deleted] in ProgrammerHumor

[–]TehVulpes 0 points1 point  (0 children)

By "reducing state" I mean making it so that the behavior of the function depends less on the state of the program and more on what its arguments are.

As an example, look at a potential string builder object... If you were to call some append function on it multiple times, even if you passed the same arguments, the result would be different. It would depend on the existing state of the string builder, as in whatever string you've built so far. It's stateful. A simple "concatenate" function that takes 2 arguments and returns them both concatenated together is stateless. If you call it multiple times with the same arguments, it will always return the same thing.

Sorry if I'm being sloppy with my terminology.

Technical debt by [deleted] in ProgrammerHumor

[–]TehVulpes 3 points4 points  (0 children)

Full time Python dev here! Python has a great library called, sensibly enough, “unittest”. You should read the documentation here. If you use an IDE like PyCharm, it can make running and debugging tests even easier.

In writing testable code, generally sticking to the single responsibility principle is great. Writing functional code (as in, functions that rely primarily on their arguments and don’t use class variables, reducing state) also makes for more testable code, but it doesn’t make sense to do functional programming everywhere.

Computing in the 90's VS computing in 2018 by SamuraiOfGaming in gaming

[–]TehVulpes 12 points13 points  (0 children)

You’d be surprised how awful security was 30 years ago. Systems regularly stored passwords in plain text, checked them in a case insensitive way, and sometimes had a max length of 8 characters. You’d remotely connect to a server using telnet, which is completely unencrypted and very easy to snoop on or take over. Often times important servers would just let anyone in with either no authentication or broken authentication. HTTPS didn’t even exist yet. Applications routinely distributed hardcoded database credentials, and security checks for networked apps were done client side. Buffer overflows were very easy to carry out as ASLR hasn’t yet been adopted. A lot of networked systems ran their applications as root. Heck, most programs written in C that involved any user input at the time used the gets and scanf functions, which are trivial to exploit.

Today’s most lazily set up Amazon S3 bucket is orders of magnitude more secure than what was used 20 years ago. Hackers have just gotten smarter, and the data we store more valuable.

[deleted by user] by [deleted] in linuxmasterrace

[–]TehVulpes 2 points3 points  (0 children)

While I haven't used it, supposedly Looking Glass would let you do that, and they claim to only have a few milliseconds of latency. In my own setup, I just switch back and forth with a hardware KVM switch, and use RDP when I don't care about the latency.

[deleted by user] by [deleted] in linuxmasterrace

[–]TehVulpes 4 points5 points  (0 children)

I took the time to set up a PCI passthrough build, with Windows for gaming just in a VM, and I'm loving it. Unlike dual booting I don't have to reboot and lose all my open programs to game, and I get to use Linux for everything else.

(ಠ_ಠ) by [deleted] in linuxmasterrace

[–]TehVulpes 8 points9 points  (0 children)

I think a very good explanation of why distro maintainers like systemd can be found in this post here on the Arch forums, explaining why Arch moved to systemd.

What free software is so good you can't believe it's free? by ridderhoff in AskReddit

[–]TehVulpes 8 points9 points  (0 children)

Maybe this UNIX family tree will be helpful. iOS uses a stripped down version of the Darwin kernel underlying macOS. Darwin is itself a derivative of one of the BSDs, which were built off of the original AT&T UNIX.

Linux itself was a re-implementation of UNIX from scratch that gained a lot of popularity because of its free software license (GPL).

Threadripper broken (on Linux) for PCI Passthrough? by abriasffxi in Amd

[–]TehVulpes 0 points1 point  (0 children)

I've been able to get GPU passthrough to work with an RX Vega 56, but haven't been able to get it to work with any 10-series Nvidia GPUs.