« first day (1752 days earlier)      last day (3190 days later) » 

1:01 PM
using System;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Threading.Tasks;

namespace Test {
    internal class Program {
        public static void Main() {
            var client = Task.Run(() => Client());
            var server = Task.Run(() => Server());
            Task.WaitAll(client, server);
        }

        public static async Task Client()
        {
            await Task.Delay(1000);
            using (var client = new TcpClient()) {
                await client.ConnectAsync("localhost", 8080);
@AshSimpson There you go. See? Simple. Effective. Stop using old garbage. :/
 
I have some questions on threading and whether I should be entering/using the ThreadPool or not. // I have about 10 peripheral devices, I want to constantly display their state to the user; constantly "pinging" them for info ex IsLEDOn, GetCurrentTemp, etc. So I imagine having ~10 threads that do this continually for the application lifetime. My other communication is when the user wishes to set the state of the devices.
^ Con't -- So in this case there will just be a single thread that simply sends a single command to the a device and exists.
 
@KDecker 10 threads polling? That's not all that much. What's the problem?
 
Changed shirt. I can't get over the idea that I still smell it.
 
I would like to know if I should put them all in a ThreadPool?
 
@Roel van Thanks, appriciate it.
 
1:05 PM
@KDecker Explain please?
 
Is there a reason 1 thread isn't enough?
 
I feel like ThreadPool is more "churning" through a bunch of threads
 
Why can't you loop through devices on one thread?
 
@KendallFrey Some of the devices may take more time than others to respond. So if one thread does all the communication each device has to wait on the one before to update its state
 
oh.
 
1:07 PM
I assume async is not an option
But it does seem odd that a peripheral would take more than a few milliseconds to respond to status requests
 
Do you mean just async communication in general or a specific code
 
Both
 
Some of them can be others are just simple RS232
I think I need to do more research first, I am not explaining this very well
 
@Griffin it has seeped into your skin. Hence you will be known as catpiss-man
 
@BenjaminDiele It's fucking driving me crazy. I'm going to try and go home after lunch because I can still smell it. Thankfully I only work here another week.
 
1:17 PM
@SteveG You there?
 
yeah
 
Remember how you said that method did too much. Isn't this almost identical?
public static IEnumerable<T> Query<T>(this IDbConnection cnn, string sql, object param = null, SqlTransaction transaction = null, bool buffered = true)
That is sample code from Dapper.Net.
 
@Griffin Well, your nickname for when you're gone is already made then.
 
:(
 
I'm guessing a cat peed on your shirt
 
1:24 PM
See, we don't have a cat on the first floor. That's where the dogs are.
 
@Griffin You don't understand cats. You don't "have" a cat. A cat has you.
 
But I was babysitting my girlfriend and she has 4 fucking cats. And I did my laundry while I was at her house.
4
 
@BenjaminDiele FTFY: A cat owns you.
 
@Griffin Erhm, dare I ask how old your girlfriend is?
 
TIL: @Griffin's girlfriend smells like cat piss.
 
1:26 PM
@Griffin You were babysitting your girlfriend? :o
 
@BenjaminDiele She's younger than me,.
Oh wait.
No no no.
 
haha
 
You're not helping yourself right now
 
Ahahaha.
 
God damn it. That's not what I meant. I was house sitting. I meant to say babysitting her animals but then I was just going to switch it to house sitting. I evidently did neither.
Anddddd it's got three stars. FML
 
1:27 PM
Make it four
 
R
I
P
 
::sigh:: I guess I deserved that.
 
@Griffin Yes, now go stand in the corner.
 
Welcome to the C# room can I take a order prees
Tell your girlfriend that she doesn't need 4 cats if she has a boyfriend. Excess cats are for lonely people.
 
Her sister is lonely. Does that count?
 
1:29 PM
cats are for people who want to be lonely or left alone
 
How old are you?
 
I'm 18.
 
That explains er'thing
 
ev'thing
 
I'm 19 actually.
 
1:29 PM
@Sippy says the wizened old geezer.
 
...
 
and 2 quarters?
 
Sorry. I forgot I leveled up.
 
@Sippy We're not all 40+
 
I'm 22, hence Benny's sarcasm
My point was that he said his gf was younger than him, it explains why she lives with 4 cats and her sister.
And has to babysit.
xD
 
1:30 PM
Ooh, let me add the sarcasm tag
:)
 
See when I said she was younger I thought you guys were talking about her having the 4 cats and I thought you guys were thinking she was an old crazy cat lady.
 
@SteveG Or am I missing something?
 
@Griffin No no, it's too late to explain everything
 
@Sippy Did you get excess cats yet?
 
@Greg i bet their code gets the data and builds an ienumerable out of it in different methods, internally
 
1:32 PM
Yeah, I forgot I am 19. My birthday was like a week ago and I was babysitting and my parents didn't get me a gift or anything and yeah. It was like an adult birthday
 
@Griffin The word "babysitting" isn't helping when you're talking about your gf. Even remotely.
 
An adult birthday? That sounds good.
 
@RoelvanUden Haven't had one of those yet.
 
"You are invited to my birthday. Bring strippers and beer."
I guess?
 
Parent birthday. You don't get gifts. You still work. And nobody bothers to remember it's a special day.
 
1:34 PM
@SteveG Your more than likely correct. That would make sense.
 
@Griffin Ohhh, you mean, a regular birthday. :P
 
@BenjaminDiele I was refering to her animals.
 
@Griffin I hope your parents remember tho.
 
@RoelvanUden They remembered.... and then proceeded to go rock wall climbing with everyone but me.
And mom. But I think mom surpasses the weight limit.
4
 
That sounds very home alone~ish
 
1:35 PM
That's a nice thing to say rofl
@KendallFrey resist the urge
@RoelvanUden Not yet
 
I went to Joe's Crab Shack alone. Waitress thought I got stood up for a date. Tried saying something comforting. Informed her it was my birthday. Just made her sadder.
 
Roflmao omg
 
OMG
 
Did she ask you out
 
They come and sing to you?
 
1:37 PM
She was an older black lady. Said something like "It's okay honey. You don't want to be with someone who treats you like that anyway"
 
Awwwwwwwwww
 
Me "Oh no. I'm not out on a date. It's my birthday and I figured I'd go out to eat" Her face goes from "poor thing" to "that's just depressing" instantly.
 
Meh
You don't meet anyone being lonely alone I guess lol
 
Really? You meet lots of people. They'll all dislike you, but hey, can't have everything!
 
Going out to eat by yourself is depressing
Probably shouldnt do that
 
1:40 PM
Sorry, I really don't get it. Why is it depressing?
You get good food. You're out of an otherwise empty house. What's the problem?
 
It's only depressing if it's izakaya or tapas.
 
I gave her like a 50% tip, was quick and easy to serve, and pretty much cleaned up after myself. I try and treat the waiters really nice because according to my girlfriend I am a total ass to waiters. I really try not to be. I feel terrible.
@RoelvanUden You've been alone too long if you don't know why.
 
@Griffin Or I just don't share your social norms :P
 
@RoelvanUden That's true. To make it worse the girl behind me was celebrating her birthday with her family and stuff.
 
eating alone in a restaurant is depressing
but I should I bought along a book like someone else did
avoid looking like a loser and look more elite :P
 
1:45 PM
But for reals guys. I need to buy myself a birthday present but I don't know what to get. I looked around and thought everything I saw was stupid or kinda useless. Then I found the Myo and was like "hey this is pretty cool" and was about to get it but I watched a review and saw it was pretty annoying. Anyone got an idea of cool toys? myo.com
 
Myo is nice. It takes a little getting used to but a friend of mine has it and likes it
 
How about a new game console? Or a new PC? Perhaps that drone now?
 
Drones are Fun
 
What would I do with a drone?
 
1:46 PM
@Griffin Fly.
 
drones are kinda like dogs too they attract friends
 
Make it first-person-view and fly around like a fucking badass motherfucker.
 
drones are cool but I'm waiting until they get better to spend a lot of money on them
Griffin, what are some of your hobbies?
 
fiends?
 
@KalaJ The review said that its lock and unlock command triggers really really really easy. Like the piss easy fix is to just add a button on the device but that's a hardware change and would have to come in a new model.
@KalaJ I've been trying to figure that out for a while now :P Not really sure. But what kind of drone would I get?
 
1:48 PM
If you're rich, get the phantom :P
But there are budget drones as well
I think like the parrot?
 
@Griffin Perhaps something like an EasyStar or something. Put a GoPro on it. Then hook up the receiver to transmit it. And get a mounted headset. Now you can fly first-person. Fun? Probably. Gets amazing video? Absolutely.
Or buy a motorcycle. That's a fun hobby.
 
Okay so when I get the drone I fly around first person and get video of like a park?
 
yes you can
with a gopro
ardrone2.parrot.com there is this
 
Is that legal in the US?
 
yes
 
1:50 PM
@RoelvanUden I have been considering that actually. Problem is that gets really expensive really fast and I'd have to get my motorcycle license.
 
I know there are certain rules
check your city. Major cities tend to be more strict
but if you go out to the open, the laws are more flexible
@Griffin, birthday gift = motocycle license :)
 
@Griffin got a bike?
 
Hi guys! Ahm, I wonder if anyone could give me a hint as to why VS would tell me the there's something wrong with my arguments. I'm calling a function -that belongs to a C++ module- as myObj.processFrame(_writeableBitmap.PixelWidth, _writeableBitmap.PixelHeight, pnt, pixels.Length);. I don't know why it shows me this 'out' modifier in the error message.
 
@KalaJ They're cheap to get. It's the effort that's the problem. @juanvan Actually mine got stolen but my family has plenty.
 
@Griffin It's not that expensive, and it is a lifetime investment. A decent motorcycle costs somewhere around ~1000 euros, something nice around ~2500. With the necessary gear, you add ~500. The license itself might be around ~1500. It's actually not that bad considering it's an actual vehicle you can use to commute (and is dirt cheap on insurance and gasoline).
 
1:53 PM
@Griffin a motorcycle
 
@PaulinaD. have to put out on the parm that is out
 myObj.processFrame(_writeableBitmap.PixelWidth, out _writeableBitmap.PixelHeight, out pnt, out pixels.Length);
 
@RoelvanUden can confirm. Bought my bike for 1500, probably will have around 250 in costs to fix it up. License costs ~1k here.
 
@BenjaminDiele Where do you live again?
 
@BenjaminDiele That's cheaper then I thought
 
@Griffin The country of beer, french fries, and chocolate!
 
1:54 PM
@griffin, think about your hobbies and what you need. Then you get something. At a certain point in life though you're like screw material stuff you can always buy it another time and go on adventures :)
 
@juanvan so if my function in C++ is like int processFrame(int width, int height, BYTE* memStream, int size); , adding 'out' to all arguments will fix it?
 
@Griffin @Benja Jup. My motorcycle did cost me ~2500, additional gear ~500 and license ~2000 (because I sucked hard when I started out). Insurance is around ~8 euro a month, and it drives 1:25 so it's really cheap for commutes.
 
@KalaJ That's where I'm at right now. Problem is, the money isn't there for big adventures.
 
small adventures. Go hiking at a local park
or something cheap to do
 
@RoelvanUden wtf how do you pay 8€ a month? My insurance for a year is 400€. And that's with 65% discount because my car is insured with the same company.
 
1:55 PM
Yeah I do. But I want like a tech toy.
 
@PaulinaD. on of them is Declared out on the signature
int processFrame(int width, int height, out BYTE* memStream, int size);
 
hmm @Griffin, what tech toys do you have currently?
 
@BenjaminDiele Umm.. motorcycles are really cheap here. Because they are not primary for most people. I don't know why it's that cheap, because you don't actually use it most of the year? It'd be weird to pay that much for it considering it's mostly just standing in the garage.
 
@Griffin Honestly, I'm much more happy with something without tech than with. I program 8 - 10 hours a day, got enough tech for me.
 
@BenjaminDiele liability only maybe?
 
1:57 PM
@KalaJ I have the standard devices but I don't think I have any toys really. I want something I'll actually use though.
 
@Griffin, this is so lame but Leap Motion is running a contest right now
 
@juanvan But now, if I add 'out' in the header file, I just get an 'undefined identifier' error
 
If you purchase the device with the promo code, you can get the device price refunded
if you submit an entry for the contest
 
Yeah I saw that. I was looking through recent hackathon contests at what tech they were using. That's how I discovered myo.
 
So essentially you'll just pay $8 for shipping in total
ah ok
 
1:58 PM
@PaulinaD. whats the exact message -maybe I am wrong :)
 
I signed up for it. I received my leap motion, submit an entry later and then get the device refunded
 
@juanvan "Identifier 'out' is undefined'
 
with out the changes i recommended
 
@griffin, if you don't have one already look into raspberry pi or arduino if you're into that kind of thing
Guys, I have a concept question: programmers.stackexchange.com/questions/291681/…
 
@KalaJ Yeah I got really excited for getting one. Until I thought about how I'd use it. Then I realized I'm not sure what I'd do with it. I looked at a bunch of projects but they all seemed..... ehh
 
2:01 PM
@juanvan Best overloaded method match for processFrame(int,int,out byte, int) has osme invalid arguments
 
check the number of arguments? @PaulinaD
what's the full message say?
 
@Griffin That's for all "toys". Once you think, "What can I use this for?" you'll be all like: Uhmmm....
It's a toy. It's amusement. It doesn't have a clear purpose other than that.
 
@RoelvanUden Well I was thinking "where would I get amusement from this" and couldn't think of something.
 
@Griffin, do you ride a bike?
*bicycle not motorcycle
 
The act of tinkering with something is not fun for you? :P
 
2:03 PM
@KalaJ ok, now it's not finding the C++ project..
 
@KalaJ No I drive. I don't live in a major city so things are too far away.
 
ah ok nvm then
@PaulinaD, what do you mean by not finding?
 
@RoelvanUden Tinkering is fun if I have a purpose for tinkering. I never had like, spontaneous creativity. I have problem solving creativity but I don't have like imagination like kids do.
 
Then just keep programming :P
 
@KalaJ I have a Windows phone app that is using a RuntimeComponent (which is actually a wrapper to use a library) and now, I rebuilt the project after removing the 'outs' but...now, now the Phone app one is not finding the Runtime one after cleaning and rebuilding. Loving VS
 
2:06 PM
At one point I desperately wanted an HTPC. I got an HTPC. I proceeded to have no clue how to properly implement it and was super disappointed with it.
 
@Griffin Just get a PC with Plex. :P
 
@RoelvanUden Kind of what I did. Then I was like "we don't actually record shit and Netflix does this all for me. This is kinda useless." I could of hooked a controller up to it and make a kind of controller out of it but I realized that would be really messy with controls and a yeah.
I desperately want a project I'm passionate about. The problem is I can't find anything I'm passionate about.
 
@Griffin, for some reason I thought you said: HPLC en.wikipedia.org/wiki/High-performance_liquid_chromatography. Used to work in a lab
 
@PaulinaD. there is the out in the Byte
 
That'd be far more interesting
 
2:09 PM
@KalaJ ok, now I get *"The best overloaded method match for processFrame(int,int,out byte, int) has some invalid arguments
Argument 3: Cannot convert from 'System.IntPtr' to 'out byte'*
 
okay, so properly cast it or change the type to what you need
 
@juanvan What do you mean? There's a hidden 'out' modifier?
 
Paulina, what are you trying to do? byte should not be out
 
what is the signature to the method? processFrame(int,int,out byte, int) ?
 
^
 
2:11 PM
Ehhh I maybe have an idea. I mean I guess it's something to do.
It'd use the recognition software to track what birds go to a bird feeder.
 
@KalaJ I'm trying to send the pointer of a byte array from C# to the underworld. SO I found this post
 
@Squiggle I'm not sure how impossible that is anymore. I've seen some promising things. Like water gun turret that shoot squirrels.
 
@Griffin All this technology and they use it for that.
Those are just movement sensors though surely.
I very highly doubt that technology uses cameras which actively detect squirrels.
 
@Griffin I bet it also shoots rats and pigeons though
 
2:15 PM
@Sippy Not movement sensors. Dude had it pointed at a bird feeder. Wanted to get squirrels off without shooting birds. PRetty good success raite.
 
@Griffin a weight sensor is much more effective there
 
heheh
 
@KalaJ lol yes that awful machine..
 
That's fairly impressive.
 
2:17 PM
@juanvan I wasn't adding 'out' anywhere but that's what gets displayed in the error message :/
 
This was years ago and there is better "learning" software out there now.
 
What does he hit the squrilles with?
He should use a laser :)
 
Water.... he's not trying to kill them.
 
There is a machine like that but for mosquitos, uses a "low" power laser and shoots skeeters. The laser is low power enough to just burn the skeeters wings and not reall burn skin
@Griffin Well yeah lol, I dont mean more than a Watt, just enough to piss it off enough to leave
 
@KDecker Yeah I saw a ted talk on it. Gates foundation funded it heavily.
I thought of using OpenTLD instead of OpenCV. TLD seems wayyyyy more powerful.
Problem is OpenTLD is no longer supported and it seems like their new software CMT is going to be paid for
 
2:21 PM
Whats TLD stand for, never heard of it
I've used OpenCV (Emgu) a fair amount
 
Be back in some mins, gotta relocate
 
No clue. They just nicknamed it predetor
Nevermind it's free just harder to find. It's also C++ which was my first language. So that will be fun.
 
@PaulinaD. oh well that won't work. looked over the link - what does your code look like - can you put it to pastie.org? and link back
 
@ton.yeung Honestly, I never had to do anything big with C++ so it was never that bad for me.
 
that had to be pretty cool
 
2:31 PM
@ton.yeung Like.... how pretty?
Ohhh okay. I was like "shit is going to be terrible if he needs like little videos on big video stuff.
@ton.yeung Usually the IDE will warn you about that kind of stuff.
@ton.yeung hugs you that's what you did wrong
No no no. You tried using C++ without an IDE. And I understand they weren't as prominent then.
 
vOv
There was a visual studio back then
Probably more a cost thing
 
QBasic they used in my HS
 
@ton.yeung You a dinosaur bro
@ton.yeung 15 years ago in 2010? WHAT YEAR IS THIS?!
 
WAAAAAT
tl;dr: Visual Studio has existed since the 90s
 
@ton.yeung Don't worry. I forgot how old I was today.
 
2:36 PM
Guess so
And it was named in true Microsoft style
Microsoft Visual Studio is an integrated development environment (IDE) from Microsoft. It is used to develop computer programs for Microsoft Windows, as well as web sites, web applications and web services. Visual Studio uses Microsoft software development platforms such as Windows API, Windows Forms, Windows Presentation Foundation, Windows Store and Microsoft Silverlight. It can produce both native code and managed code. Visual Studio includes a code editor supporting IntelliSense (the code completion component) as well as code refactoring. The integrated debugger works both as a source-level...
 
I'm starting to wonder if I'm just peeing myself and I can't tell. That's why the smell is so bad.
 
VS, VS97, VS6.0, VS.NET, VS.NET2003, VS 200*, etc
Gj microsoft
 
:|
feeling dumb
 
VS6.0 was all I knew of pre-00 was 600 for license
 
haha :D
 
2:44 PM
@ton.yeung @Rusty myself likewise. I like being a dumb developer.
it prevents me from writing code that other people won't understand
FFS why isn't there a Uri.Combine() method
It really is a glaring omission
Path.Combine(a, b) uses Windows path notation, using "\\"
OK I'll get an example.
		var baseDomain = new Uri("http://example.com");
		var resource1 = new Uri(baseDomain, "FOO");
		var resource2 = new Uri(resource1, "BAR");

		Console.WriteLine("Base URL: " + baseDomain.ToString());
		Console.WriteLine("Resource 1: " + resource1.ToString());
		Console.WriteLine("Resource 2: " + resource2.ToString());
output:
Base URL: http://example.com/
Resource 1: http://example.com/FOO
Resource 2: http://example.com/BAR
I'm trying to get something that concatenates paths like example.com/FOO/BAR
 
I need a way to remember when .net uses CurrentCulture or CurrentUICulture
 
I just want to concatenate paths like
"domain.com/FOO" + "BAR" = domain.com/FOO/BAR
is this really so hard to do?
 

« first day (1752 days earlier)      last day (3190 days later) »