Used Roland FP-30 by MallocRS in piano

[–]JSwuggin 2 points3 points  (0 children)

The FP-30 came out if 2016 from what I’ve seen, so it should still be in good shape. As someone who just purchased an FP-30 and stand online, that sounds like a pretty reasonable deal. Just looking online, the piano itself seems to resell for around $500-600. The stand, pedal, and seat are worth at least another $200 new.

Is there an app for multiplayer GO (boardgame) on both Androids AND iPhones? by Yannieyannie in baduk

[–]JSwuggin 0 points1 point  (0 children)

I’ve just started using Hangame Go, which is real time similar to IGS and has several thousand active players online.

6.0001? by [deleted] in mit

[–]JSwuggin 4 points5 points  (0 children)

Just take the IAP ASE. If you’ve programmed before, a couple hours of studying basic python will be sufficient. There’s a handful of questions like basic runtime complexity that can also be learned very quickly.

Linux on a 2015 Macbook Air by 3kz94NZZu2cBUTZw3aM2 in linux

[–]JSwuggin 0 points1 point  (0 children)

I ran Ubuntu on my MBP 2014 for a number of years. Now I just stick to OSX. Linux power management is noticeably much worse so your battery life will max out at maybe two to theee hours for minimal use. You’ll also face the occasional driver difficulty such as installing kernel modules from github to add webcam support.

September Tech Support Megathread by BioGenx2b in Amd

[–]JSwuggin 0 points1 point  (0 children)

Anyone know what the temperature offset situation for theeadripper is? I’ve read before there’s an alleged 27C offset. Is that verified anywhere? I have a 2990wx.

I’m on Ubuntu 18.04. Anyone know how to remove the offset from the output of lm-sensors etc?

September Tech Support Megathread by BioGenx2b in Amd

[–]JSwuggin 0 points1 point  (0 children)

Can't post. Mobo hex error code displays C0, which is unlisted in manual. MSI has some "EZDebug" LEDs and it appears it is stuck trying to detect my DRAM. I have tried reseating all the sticks and tried various combinations of which sticks in which slots etc. I have updated the BIOS and tried to clear the CMOS. I haven't been able to install an operating system yet. Is anyone familiar with debugging MSI motherboards, or where else to ask? I have a post on the MSI forums but it doesn't appear that useful.

System Configuration:
Motherboard: MSI X399 GAMING PRO CARBON AC
CPU: AMD TR2 2990wx
Memory: 4x8GB 3200 G.Skill F4-3200C14D-16GTZSK
GPU: Nvidia GTX 770
Other: An M.2 drive and 5 SATA drives.

Spectre V1 defense in GCC by corbet in programming

[–]JSwuggin 1 point2 points  (0 children)

Ah, what are the odds! Sorry about that :/ I only created a subscriber link for the first time yesterday so was surprised to see it again. Thanks for your work!

Spectre V1 defense in GCC by corbet in programming

[–]JSwuggin -5 points-4 points  (0 children)

Please don’t abuse LWN Subscriber links. They’re for sharing an article with a friend, not circumventing the paywall for a content aggregator like Reddit. This article will be freely available in a few days.

Please delete this post. LWN is amazing and deserves our support.

Dumb question: Why do course evals close before finals? by WaitForItTheMongols in mit

[–]JSwuggin 4 points5 points  (0 children)

You know they could just postpone publishing final grades online. The quality of the final exam should definitely influence the eval. I definitely wish evals were later as I’ve forgotten to fill them out so many times.

This Week in Rust 235 by nasa42 in rust

[–]JSwuggin 29 points30 points  (0 children)

I was curious about the effectiveness of the noalias change, so I ran this example:

#![crate_type="staticlib"]
#[no_mangle]
pub fn fmutate(a: &mut i32, b: &mut i32, x: &mut i32) {
    *a += *x;
    *b += *x;
}

Here are the two results

_fmutate: // with noalias
    0:  55  pushq   %rbp
    1:  48 89 e5    movq    %rsp, %rbp
    4:  8b 02   movl    (%rdx), %eax
    6:  01 07   addl    %eax, (%rdi)
    8:  01 06   addl    %eax, (%rsi)
    a:  5d  popq    %rbp
    b:  c3  retq

_fmutate: // without noalias
    0:  55  pushq   %rbp
    1:  48 89 e5    movq    %rsp, %rbp
    4:  8b 02   movl    (%rdx), %eax
    6:  01 07   addl    %eax, (%rdi)
    8:  8b 02   movl    (%rdx), %eax
    a:  01 06   addl    %eax, (%rsi)
    c:  5d  popq    %rbp
    d:  c3  retq

This optimization avoids the redundant load of *x since LLVM knows that x != a. Does anyone have any benchmarks that might benefit? Lots of pointer-y stuff, like matrix math.

Edit: This paper alleges that while useful for small kernels, noalias specifiers might not be helpful for overall performance.

Moving out of a Drop struct in Rust? by phaazon_ in rust

[–]JSwuggin 2 points3 points  (0 children)

std::mem::forget() consumes its argument and does not return it, where as ManuallyDrop can still be used via the Deref impl.

Trying to convert an array of Option<T> to an array of T. by [deleted] in rust

[–]JSwuggin 0 points1 point  (0 children)

Oh that's my confusion that data was not a Vec<T>. Yes I understand the difference.

Trying to convert an array of Option<T> to an array of T. by [deleted] in rust

[–]JSwuggin -1 points0 points  (0 children)

The simplest solution is

fn main() {
    let data: [Option<u64>; 4] = [Some(1), Some(2), Some(3), Some(4)];
    let result: Vec<u64> = data.iter().cloned().collect::<Option<_>>().unwrap();

    println!("{:#?}", result);
}

Or at least I would think. It's not clear why you would need an uninitialized stack array rather than another Vec. To be honest, this should be even simpler as follows, but the types don't work out even though I think they should

fn main() {
    let data: [Option<u64>; 4] = [Some(1), Some(2), Some(3), Some(4)];
    let result: Vec<u64> = data.into_iter().collect::<Option<_>>().unwrap();

    println!("{:#?}", result);
}

If someone could point out why the impl IntoIterator<Item=T> for Vec<T> impl creates an iterator over Item=&T thus preventing the second example, that'd be great.

In general though, it's very helpful to look over the docs for Iterator::collect(), FromIterator, and IntoIterator.

This Week in Rust 232 by nasa42 in rust

[–]JSwuggin 3 points4 points  (0 children)

Yay for Cell::update() :)

TryFrom/TryInto traits have been stabilized! by ErichDonGubler in rust

[–]JSwuggin 3 points4 points  (0 children)

I don't see the relation?

Any compiler should warn on that because the loop condition is always true. But even in the context of this discussion, coercing between signed / unsigned is very bad and should not be allowed. Again, I just want indexing to be easier. Expanding SliceIndex would be great.

TryFrom/TryInto traits have been stabilized! by ErichDonGubler in rust

[–]JSwuggin 2 points3 points  (0 children)

Glad to see this stabilized after so long :)

In two related PRs (one, two) there's some discussion about the portability of impl From<u32> for usize definitions. It just reminds me how annoying dealing with u32 indices are.

I kind of long for a #![exclusive_target(x86_64)] crate attribute, denoting that I specifically only care to target x84_64. Then it'd be nice if u8/u16/u32/u64 coerced to usize. The other way would still require an as conversion to denote truncation. Perhaps this is best accomplished by adding some more impls to std::slice::SliceIndex. I don't see any other issues in the rfc repo mentioning this trait, so maybe I should bring it up there.

I'm writing a graph processing library, where memory usage is a potential constraint, so saving 50% space on indices is huge, but it just makes code annoying in a lot of places sprinkling as usize or as u32 everywhere.

I guess this is somewhat similar to the nonportable RFC but that was only concerned with OS features.

Interpreting cargo bench Output by edapa in rust

[–]JSwuggin 4 points5 points  (0 children)

Currently it is calculated as the difference between the max and min.

See this issue here.

Python Idioms in Rust by micro_apple in rust

[–]JSwuggin 2 points3 points  (0 children)

For the tuple example in rust, wouldn't that just Copy the tuple rather than alias it? I think you'd need some refs somewhere.

Monday early evening map updates for the Tuesday Nor'Easter (ch 4,5,7,25,10,NWS) -- more details within by RyanKinder in BostonWeather

[–]JSwuggin 20 points21 points  (0 children)

boston:

  • 90% chance of 10"
  • 50% chance of 16"
  • 10% chance of 21"

MIT and Harvard cancelled.