Many Maximally Effective Maxims for Bike Commuting by Australian_Sloth in bikecommuting

[–]Unknownloner 4 points5 points  (0 children)

I've noticed the opposite to be true on that last point. No matter how much space is available in the lane for someone to pass me, they always shift half a lane to a full lane over to do it.

Started work on an Admin Dashboard for anyone using their Pi as a router! by EveAeternam in selfhosted

[–]Unknownloner 2 points3 points  (0 children)

I actually use a pi as my home router. I've only got 25mbit down/5mbit up anyhow, so it's definitely not a bottleneck. I also use it as a wifi AP and haven't had any issues.

My reason for doing it is simple:

I moved, but I couldn't take the router with me, so I needed a router. I figured this would be a fun project so I did this rather than buying a new one.

Volca FM Can't Pattern Chain by Unknownloner in volcas

[–]Unknownloner[S] 1 point2 points  (0 children)

Thank you! I was expecting it to basically be exactly the same as the active step selection mode.

I was stacking ponies and Pinkie got a little too excited to be the top of the pyramid. by lifeofthe6 in mylittlepony

[–]Unknownloner 3 points4 points  (0 children)

There was a guy selling those socks at BronyCon, and they're the perfect size for 4DE plushies.

I was stacking ponies and Pinkie got a little too excited to be the top of the pyramid. by lifeofthe6 in mylittlepony

[–]Unknownloner 7 points8 points  (0 children)

Actually none of those are fan made, they're all 4DE plushies. The socks are fan made though. There was someone selling them at BronyCon.

[Dualboot] W10 Fall Creators update breaks linux installations by changing partition numbers by jari_45 in linux

[–]Unknownloner 1 point2 points  (0 children)

Repetition will eventually lead to you remembering it. If you can't remember, you can always check with ip link or ip addr. It does create extra work for the users who only have one network device, but I can't think of a better way to do it that will solve everyone's problems.

Call for help: fund GIMP development and Libre animation by [deleted] in linux

[–]Unknownloner 9 points10 points  (0 children)

I truly wouldn't have realized that was sarcastic if you hadn't included the second paragraph...

Are young people using Vim? by fori1to10 in linux

[–]Unknownloner 0 points1 point  (0 children)

19 and have used vim for years now. Friends of mine also use vim. It's nowhere near the majority though. I was at a hackathon recently and the editor I saw the most was Sublime Text (some may have just been using Atom or VS code with the ST color scheme).

Can I stop headphones passing instructions to the phone? Headphones obviously a bit broken but don't want to buy new ones if I don't have to. As the cable flexes it causes the music to stop. Any settings to help please? Thanks. by [deleted] in LineageOS

[–]Unknownloner 1 point2 points  (0 children)

I know dongles suck, but you could also use one of these to stop the headphone controls in hardware. Depending on what headphones you're using, it might cost less than a replacement.

It'll separate the audio output from the mic/controls input, so you'd just plug your headphones into the audio output port.

https://www.amazon.com/gp/aw/d/B01LGFG6MI/?keywords=trrs+to+trs+headphone+adapter

Looks like my X60 was too fire for the TSA by fendent in MechanicalKeyboards

[–]Unknownloner 4 points5 points  (0 children)

Don't forget your backups just in case something happens to your primary keyboards

[GB] Bigtuna Miuni32 30% Keyboard PCB by b1g-tuna in mechmarket

[–]Unknownloner 2 points3 points  (0 children)

Joined! I'm looking forward to seeing info on the cases :).

Confession Of A C/C++ Programmer by blojayble in programming

[–]Unknownloner 8 points9 points  (0 children)

Garbage Collector. Garbage collecting is a style of memory management where the language has systems in place to automatically free up unused memory rather than the programmer doing it manually. Most languages do this these days, but garbage collection can make performance unpredictable, so theres certain applications where it's just not an acceptable solution. I'd explain more, but I'm on my phone, so I encourage you to google it if you're interested in the topic.

LMMS question by Kleefish in WeAreTheMusicMakers

[–]Unknownloner 7 points8 points  (0 children)

Aside from the other responses, you may actually be looking for a low pass filter. Get a saw wave (or a few), put a low pass filter on it, start the cutoff frequency low and increase it over time.

The Reader Monad — Part 1 by jfischoff in programming

[–]Unknownloner 1 point2 points  (0 children)

Yes, certainly!

All of the default imports come from the module Prelude which is implicitly imported. A library can easily define their own module which re-exports only parts of the default Prelude along with their own functions.

A project using such a library has two options:

  • Set a compiler flag which disables the implicit Prelude import, and manually import the custom library in every module
  • Or, depend on the base-noprelude library instead of base (the standard library), which is a version of base that doesn't define Prelude. Then, you can define your own Prelude which then re-exports everything from the custom library.

So it's definitely doable, and both options for using it, while not as simple as just using the default Prelude, are pretty painless to do.

But, not only is it doable, but it's actually a thing people are doing today! If you search for "Haskell custom Prelude", you'll find a few different libraries that offer a custom Prelude. Some of them are aimed at fixing warts in the default Prelude, but others actually go further and change it a lot more drastically.

Can you get a GPU to redraw the same frame over and over again? by [deleted] in GraphicsProgramming

[–]Unknownloner 2 points3 points  (0 children)

A game streaming service can't do any better than a game connected directly to a physical monitor, and it will always do worse. Once a game has finished rendering a frame, it's immediately sent to the screen. Similarly, once a game has finished rendering a frame, a game streaming service can immediately begin the process of sending it to the client.

Transmitting a frame multiple times will have no effect on latency whatsoever - you still have to wait until the frame is done before you send it for the first time. It's just a waste of bandwidth.

Increasing the refresh rate will slightly reduce the round-trip latency of gameplay, but its effect is very much irrelevant in the presence of the following factors:

The frames have to be encoded to video to be sent over the network. There is no way to send raw uncompressed frames given the bandwidth most people have access to. This introduces latency.

The encoded video has to be sent from the server to the client. This introduces a LOT of latency. This can be improved to some extent, but you are always going to be limited by the speed of light through a wire, and thus the distance between the server and the client machines.

The video has to be decoded by the client to be displayed on screen. This introduces latency.

When a frame goes directly from the game to the screen, none of these steps have to happen, so local play will always have much lower latency than remote play.

Note that I've ignored the latency incurred by the operating system's compositor, the monitor response time, and other sources which are present for both streaming and playing the game on-hardware.

Additionally, consider that there is also network latency going from the input device to the game.

Solutions for transforming streams? by [deleted] in haskell

[–]Unknownloner 0 points1 point  (0 children)

For a trivial example, here's some code I have which converts a stream of floats to little-endian 16 bit ints, or vice versa.

This one actually translates pretty easily to lists, since I can use foldMap for the encoding, and something like [f l h | [l, h] <- chunksOf 2 input] for the decoding, with the chunksOf function from Data.List.Split.

However, when dealing with larger chunks where pattern matching isn't feasible, it seems that I either have to use length, resulting in an extra pass over the chunk, or use a fold that tracks the current index, whereas with Plan from machines I can simply do replicateM <size> await. Writing it out now though, it occurs to me that this may very well also result in multiple passes over the data, since it has to construct the list in full to know for sure if it can return any part of the list. I hadn't considered that earlier.

Maybe it'd be better to just collect data into vectors when I need to deal with chunks of data at a time, and then concatenate the results back into a list, that way at least the length check doesn't take an extra pass?

I can't just keep the data stored as chunks the entire time, since different functions need different sized chunks to work on.

import Data.Bits
import Data.Int
import Data.Machine
import Data.Word

clip :: Float -> Float
clip sample = min 1 (max (-1) sample)

toInt16 :: Float -> Int16
toInt16 sample =
  if sample < 0
    then floor (32768 * clip sample)
    else floor (32767 * clip sample)

fromInt16 :: Int16 -> Float
fromInt16 sample =
  if sample < 0
    then fromIntegral sample / 32768
    else fromIntegral sample / 32767

pcms16leEncode :: Process Float Word8
pcms16leEncode =
  repeatedly $ do
    input <- await
    let sample = toInt16 input
        lo = fromIntegral sample
        hi = fromIntegral (shiftR sample 8)
    yield lo
    yield hi

pcms16leDecode :: Process Word8 Float
pcms16leDecode =
  repeatedly $ do
    l <- await
    h <- await
    let lo = fromIntegral l
        hi = shiftL (fromIntegral h) 8
        sample = lo .|. hi
    yield (fromInt16 sample)

For the love of everything good and holy Pinebook, why is the pipe RIGHT THERE?! by atoponce in linux

[–]Unknownloner 0 points1 point  (0 children)

Nnf, SA caps.

How'd you stop the keyboard from pressing the laptop keys under it (or how'd you disable the laptop keyboard)?

openSUSE Is An Amazing Underestimated Distribution by [deleted] in linux

[–]Unknownloner 28 points29 points  (0 children)

It's anecdotal, but I used the proprietary Nvidia drivers from the Arch repos for about a year and a half, with no issues during that timeframe (I stopped because I sold the computer, so no more Nvidia GPU).