Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
GameCube
Nov 21, 2006

the visual studio start page has something about adafruit on it rn. microsoft is cool again

Adbot
ADBOT LOVES YOU

GameCube
Nov 21, 2006

BiohazrD posted:

so the c# serialport is really bad apparently

why do things that i write appear in the read buffer

i'm calling pebkac on this one

hobbesmaster
Jan 28, 2008

BiohazrD posted:

so the c# serialport is really bad apparently

why do things that i write appear in the read buffer

because the device is repeating it back?

JawnV6
Jul 4, 2004

So hot ...
yea i found the c# serialport great, does the device have loopback

akadajet
Sep 14, 2003

Rex-Goliath posted:

can't say i agree with this. if you're the type of person who can survive or even flourish in that environment then it is one of the best gigs out there. i say if you're early in your career and get a decent offer you should go for it.

i loving hated my time doing cleared work fwiw but it's a great line on my resume

if you're mediocre clearance work is great. just work for one of the big ol defense contractors who look to put butts in seats. but you're not going to be allowed to be creative at all with your work, the people you are going to work with are going to be mediocre, your hands will be completely tied by bureaucracy a lot of times. and more likely than not the work environment is going to be poo poo.

30 TO 50 FERAL HOG
Mar 2, 2005



hobbesmaster posted:

because the device is repeating it back?

i dont see echos in putty but maybe it's auto discarding

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

FamDav posted:

also a bunch of the top ten GitHub repos are the data for package managers. the ones I recall are

crates
homebrew
nuget

they had to tell CocoaPods to stop doing naive pulls on the pods repo because it was wrecking things

HoboMan
Nov 4, 2010

React Install Guide posted:

To install React:
Get Yarn and then it's just
code:
yarn init
yarn add react react-dom

Yarn Install Guide posted:

To install Yarn:
Get Chocolatey and then it's just
code:
choco install yarn

Chocolatey Install Guide posted:

To install Chocolatey:
Get PowerShell and then it's just
code:
iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex

anthonypants
May 6, 2007

by Nyc_Tattoo
Dinosaur Gum

History
Some folks may state that Chocolatey is insecure. That is based on older information and is incorrect to be stated in that way. Feel free to correct the person with "You mean Chocolatey used to be insecure." and then point them to this page (https://chocolatey.org/security). It is correct that there were security concerns. However, all known concerns have been corrected and/or have a plan to be resolved (e.g. package signing). As we learn of new security concerns we put together a plan to resolve those issues with a priority that each CVE (common vulnerabilities and exposures) requires.

Chocolatey has had multiple security audits and findings have been corrected.

Past Security Concerns
These are things that used to be security concerns. They are listed here for historical purposes in case questions come up or someone states misinformation.

Installs without prompting for confirmation - not true as of 0.9.9. Chocolatey by default will stop and ask you to confirm before changing state of the system, showing you the script it wants to execute.
Anybody can put packages up on the community feed and they could be malicious - we put package moderation in place in October 2014. All packages coming in are now moderated BEFORE they are open to the public. See http://codebetter.com/robreynolds/2014/10/27/chocolatey-now-has-package-moderation/ for more details.
Downloads packages from S3 over HTTP (subject to DNS poisoning) - this was corrected in March 2014 (https://github.com/chocolatey/chocolatey.org/issues/70)
Site doesn't require HTTPS (could be subject to DNS poisoning) - https://github.com/chocolatey/chocolatey.org/issues/126 (closed completely in November 2014)
Downloads files from the internet with no integrity check - we've added checksumming in August 2014 and started enforcing it by default for non-secure downloads with 0.10.0 in August 2016. Secure downloads will also require checksums sometime in 2017 (but can be flipped on with choco feature disable -n allowEmptyChecksumsSecure or with a runtime switch).
Poor permissions with c:\Chocolatey at root (allows attacker to gain Admin perms through specially crafted exes dropped in bin folder, among other things) - we don't install here by default anymore. We install to C:\ProgramData\chocolatey by default for more secure permissions. The default location is locked down to explicitly to Administrators starting in 0.9.10.

30 TO 50 FERAL HOG
Mar 2, 2005



edit: nm im wrong, the loving output on this thing is hella weird, it puts the \r\n before the output and then puts another \r at the end

code:
                                                                              
#?10\r\n
\r\n1100010000200707100100\r

30 TO 50 FERAL HOG fucked around with this message at 19:50 on Feb 1, 2017

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.

FamDav posted:

also a bunch of the top ten GitHub repos are the data for package managers. the ones I recall are

crates
homebrew
nuget

Yeah someone was telling me today that package manager poo poo is something obscene like 20% of github traffic, and is a major drain on their systems. I think they should cut that poo poo off at the knees for public repos, but that's probably why I'm not in charge.

HoboMan
Nov 4, 2010


holy lol

i'm the instructions on how to whiteknight for a package manager

every new web thing tooks hella loving dumb. i am becoming afraid of falling out of date because i think the new stuff is too stupid to use

GameCube
Nov 21, 2006

BiohazrD posted:

edit: nm im wrong, the loving output on this thing is hella weird, it puts the \r\n before the output and then puts another \r at the end

code:
                                                                              
#?10\r\n
\r\n1100010000200707100100\r

i had to get shift-jis working on an old label printer here that hooked up by serial port. it turned out that you had to send the hex codes as ascii characters

like, for example, if you wanted to print 軌, that maps to 0x8b4f in shift-jis, so you would actually have to send the string '8b4f' in ascii, doubling the data size and at least quadrupling the dev time required to figure out that's what the lovely instructions were telling you to do

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.

HoboMan posted:

holy lol

i'm the instructions on how to whiteknight for a package manager

every new web thing tooks hella loving dumb. i am becoming afraid of falling out of date because i think the new stuff is too stupid to use

loving same, my friend

hobbesmaster
Jan 28, 2008

BiohazrD posted:

i dont see echos in putty but maybe it's auto discarding

BiohazrD posted:

edit: nm im wrong, the loving output on this thing is hella weird, it puts the \r\n before the output and then puts another \r at the end

code:
                                                                              
#?10\r\n
\r\n1100010000200707100100\r

this is why I use real term and then fire up my saleae if anything looks off

Sweevo
Nov 8, 2007

i sometimes throw cables away

i mean straight into the bin without spending 10+ years in the box of might-come-in-handy-someday first

im a fucking monster

GameCube posted:

i had to get shift-jis working on an old label printer here that hooked up by serial port. it turned out that you had to send the hex codes as ascii characters

like, for example, if you wanted to print 軌, that maps to 0x8b4f in shift-jis, so you would actually have to send the string '8b4f' in ascii, doubling the data size and at least quadrupling the dev time required to figure out that's what the lovely instructions were telling you to do

there is a special place in hell for the people who write label printer firmware. you get all the downsides of dealing with printers, plus all the downsides of industrial hardware, plus all the downsides of weird proprietary comms protocols

Aquarium of Lies
Feb 5, 2005

sad cutie
:justtrans:

she/her
Taco Defender
does anybody have experience with error tracking tools like sentry or airbrake?

Bloody
Mar 3, 2013

well I figured out how to union an array on top of a List<> in c# such that the array functionally has access to the List's backing store but hopefully I never actually use it because it is stupid

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Aquarium of Lies posted:

does anybody have experience with error tracking tools like sentry or airbrake?

ya although not extensive. they're pretty simple though.

spiritual bypass
Feb 19, 2008

Grimey Drawer

Aquarium of Lies posted:

does anybody have experience with error tracking tools like sentry or airbrake?

yeah it's kinda nice i guess but honestly it's better just to not cause errors

Aquarium of Lies
Feb 5, 2005

sad cutie
:justtrans:

she/her
Taco Defender

MALE SHOEGAZE posted:

ya although not extensive. they're pretty simple though.

yeah they all seem straightforward. this was something my predecessor was looking into but he hadn't actually picked a product yet, so I'm going through comparing prices/features. sentry seems like the best fit for us from what I've seen so far

Aquarium of Lies
Feb 5, 2005

sad cutie
:justtrans:

she/her
Taco Defender

rt4 posted:

yeah it's kinda nice i guess but honestly it's better just to not cause errors

you obviously haven't seen the code I write!!

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Aquarium of Lies posted:

yeah they all seem straightforward. this was something my predecessor was looking into but he hadn't actually picked a product yet, so I'm going through comparing prices/features. sentry seems like the best fit for us from what I've seen so far

sentry does what it says on the box, for sure.

they're just a special version of a log aggregator though. if you don't already have a log aggregator, get one of those running first. you can build most of the same features into splunk or ELK or whatever.

CPColin
Sep 9, 2003

Big ol' smile.

Bloody posted:

well I figured out how to (program) but hopefully I never actually use it because it is stupid

:same:

redleader
Aug 18, 2005

Engage according to operational parameters

Bloody posted:

well I figured out how to union an array on top of a List<> in c# such that the array functionally has access to the List's backing store but hopefully I never actually use it because it is stupid

post it

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

anthonypants posted:

History
Some folks may state that Chocolatey is insecure. That is based on older information and is incorrect to be stated in that way. Feel free to correct the person with "You mean Chocolatey used to be insecure." and then point them to this page (https://chocolatey.org/security). It is correct that there were security concerns. However, all known concerns [...] have a plan to be resolved.

It's in the wiki, so it's as good as fixed.

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

lmao i should probably be better at using the product i spend 40 hours a week developing but nah

cowboy beepboop
Feb 24, 2001

Aquarium of Lies posted:

yeah they all seem straightforward. this was something my predecessor was looking into but he hadn't actually picked a product yet, so I'm going through comparing prices/features. sentry seems like the best fit for us from what I've seen so far

you can self host sentry, it's just a django app + redis so it's not too bad. you get the user + request data along with any exceptions which is super helpful. I like it :)

Sagebrush
Feb 26, 2012

GameCube posted:

the visual studio start page has something about adafruit on it rn. microsoft is cool again

adafruit is a good & cool company

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.
So can somebody explain for a terrible programmer why all of gitlab's backup strats failed? I get why the original problem occurred (lol rm -rf) but after reading a couple different post-mortems I don't have enough pgsql experience to grok what happened there.

GameCube
Nov 21, 2006

Sagebrush posted:

adafruit is a good & cool company

yeah

stramit
Dec 9, 2004
Ask me about making games instead of gains.

Bloody posted:

well I figured out how to union an array on top of a List<> in c# such that the array functionally has access to the List's backing store but hopefully I never actually use it because it is stupid

can you drop the code, i'm curious what terrible things you had to do.

HoboMan
Nov 4, 2010

Strumpy posted:

can you drop the code, i'm curious what terrible things you had to do.

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.

Strumpy posted:

can you drop the code, i'm curious what terrible things you had to do.

Moreleth
Jun 11, 2001

lego my eggo

Finster Dexter posted:

So can somebody explain for a terrible programmer why all of gitlab's backup strats failed? I get why the original problem occurred (lol rm -rf) but after reading a couple different post-mortems I don't have enough pgsql experience to grok what happened there.

because all software is garbage and all programmers are terrible. Next question?

HoboMan
Nov 4, 2010

Moreleth posted:

because all software is garbage and all programmers are terrible. Next question?

still loling about the rm -rf

e: i don't now poo poo about postgres but it looks like "YP" is a huge fuckup that did literally everything wrong in the timeline they published.

it looks like "YP" had hosed up their staging environment trying to get replication running (which is coincidentally their backup) and then called it a day because they couldn't figure out how to unfuck it without the help of someone who was out that day.
later, YP deals with spamming on their DB poorly, causing some data to get corrupted and db2 to poo poo itself.
In a effort to get replication to work into db2 again (note that trying to get replication up in staging is what caused YP to gently caress it up in the first place) YP had the brilliant idea of loving with database settings and then running a rm -rf command on prod.
i have no idea why they can't use db2 to recover from except that maybe the postgres instance ate itself because of aforementioned corrupted data. they could recover from staging but their "web hook data", whatever that means, is not backed up into staging.
Also they apparently have no idea what the postgres settings for prod is supposed to be (and never backed that up either).

HoboMan fucked around with this message at 20:26 on Feb 2, 2017

30 TO 50 FERAL HOG
Mar 2, 2005



so heres a question re: thread safety in c#



when my read thread raises the AmplifierStateChanged event, a function in the Amplifier class will be called. what thread will that occur in? the same thread as the read thread?

lets say the volume were to change, whats the best way to update that value so that if tries to read the volume at the same time as the event is updating the value? ideally i think i would like the read to just pause until the event completes but idk

30 TO 50 FERAL HOG fucked around with this message at 20:21 on Feb 2, 2017

Bloody
Mar 3, 2013

Strumpy posted:

can you drop the code, i'm curious what terrible things you had to do.

it was surprisingly trivial - all I had to do was alias a class containing an array (???) over the list:
code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            var bar = new hello {a = new List<int> { 8, 6, 7, 5, 3, 0, 9 } };
            for (var i = 0; i < bar.b.b.Length; i++)
            {
                Console.WriteLine(bar.b.b[i]);
            }
            Console.WriteLine(bar.b.b.Length);
            Console.WriteLine("hi");
            bar.a.Add(69);
            bar.a.Add(420);
            bar.a.TrimExcess();
            for (var i = 0; i < bar.b.b.Length; i++)
            {
                Console.WriteLine(bar.b.b[i]);
            }
            Console.WriteLine(bar.b.b.Length);
            Console.Read();
        }
    }

    [StructLayout(LayoutKind.Explicit)]
    struct hello
    { 
        [FieldOffset(0)]
        internal butt b;
        [FieldOffset(0)]
        internal List<int> a;
    }

    class butt
    { 
        public int[] b; 
    }
}

it could be plausibly useful in some scenarios where your List's capacity is the same as its length, which you can do either by initializing it to the right size, getting lucky (default capacities seem to be 2^n, at least at these small sizes), or by using TrimExcess, which I feel makes the whole thing redundant anyways


it Seems To Work under a few different compilation settings (debug/release, x86/64) but still lol

GameCube
Nov 21, 2006

BiohazrD posted:

so heres a question re: thread safety in c#



when my read thread raises the AmplifierStateChanged event, a function in the Amplifier class will be called. what thread will that occur in? the same thread as the read thread?

lets say the volume were to change, whats the best way to update that value so that if tries to read the volume at the same time as the event is updating the value? ideally i think i would like the read to just pause until the event completes but idk

yeah if the read thread raises the event that's what'll call the event handler. if only one thread is writing the volume level and multiple threads are reading it, i don't think you need to worry about thread safety, it's only a concern if multiple threads are reading *and* writing

Adbot
ADBOT LOVES YOU

Bognar
Aug 4, 2011

I am the queen of France
Hot Rope Guy

BiohazrD posted:

so heres a question re: thread safety in c#



when my read thread raises the AmplifierStateChanged event, a function in the Amplifier class will be called. what thread will that occur in? the same thread as the read thread?

lets say the volume were to change, whats the best way to update that value so that if tries to read the volume at the same time as the event is updating the value? ideally i think i would like the read to just pause until the event completes but idk

when you raise an event, listeners are called in the same thread as the one the event is raised in

  • Locked thread