« first day (1623 days earlier)      last day (3324 days later) » 

5:00 PM
I'll do it for $350
$350 is the consultant version of $3.50
 
I'd pay 350 to have the right solution to this
 
IMO operator overloading is a terrible idea and you should just use static functions
 
Lol what the fuck
I'm sat here reading TDWTF, nothing is debugging, and IISExpress suddenly decides it's had enough of life and crashes.
Haven't had anything running on it in the last hour lol
@ton.yeung Nah
 
5:10 PM
@jth41 - 1st off, that wreaks of obfuscation. Second, you need a type to represent the units being passed to your method in addition to the type that is representing the result.
@jth41 - VolumetricFlowRate flowRate = new VolumetricFlowRate<DistanceTypes.InchesCubed,VolumetricFlowRateType.InchesCubedP‌​erSecond>(flowRateAsDouble);
 
@TravisJ not sure I understand your comments. Can you start with the obfuscation?
 
@jth41 - Yes, obfuscation, meaning that using that library adds, in my opinion, unnecessary structure to the math being done.
 
@ton.yeung but Katana is such a mature and easy to work with solution!
 
aeiou
 
no, I'd never be facetious with you!
I also hate that it's 65 degrees and sunny here, I really wish I was back in Michigan with the snow and the black ice on the roads
wait shit, I forgot this. </s>
 
5:14 PM
@TravisJ thats the whole point. I don't want to care what units the variables are in
As long as I know what type of unit it is
 
That sounds contradictory.
How can you possibly assume the end units without knowing the input units?
I need you to give me the amount of inches per second my car will travel at 50.
 
Distance carWillTravel = new Distance(DistanceType.Inch, 50);
double x = carWillTravel.Inches;
 
But 50 was actually in meters per second cubed.
 
or just as easily double y = carWillTravel.Meters
sorry
 
See, I forgot to tell you the units.
I need to know the amount of inches per second my car will travel at 50 meters per second cubed.
 
5:19 PM
Speed carWillTravel = new Speed(SpeedType.InchesPerSecond, 50);
 
Also, how would that look if instead
I need to know the amount of inches per second my car will travel at 50 meters per hour cubed.
 
I don't understand
meters per hour cubed?
 
You are treating 50 meters per hour cubed, 50 miles per hour, and 50 meters per second cubed as the same. As a result internally they are being miscalculated.
 
no they aren't
I identify them by an enum when they are created
 
Seems like your Inches cubed in your question ending at Inches^5th is doing just that.
Identify which by an enum?
 
5:22 PM
> "We need to put foreign keys on auxiliary tables in order to enforce the relationships between primary and secondary data." We don't need foreign keys in the database; they slow everything down and make it harder to delete stuff. We'll just keep everything straight in code!
 
Its the first argument of the constructor for each type
 
I cringed so hard my neck hurts
 
Yes, that is the result. But how can you know the result without knowing the input?
 
Why are developers like that hired man
 
5:22 PM
@Sippy - No fks in your db?
 
@TravisJ It's a quote.
If I didn't use FKs then I'd be a moron.
Like that guy.
 
@Sippy - lol
 
@TravisJ let me fix some of those broken links real quick
 
@jth41 - Even with and enum that represents type, you are not using it for the input, only the desired output.
Not sure how many different ways I can say it so hopefully somewhere in there I made my point.
 
Only in basic units like distance! composite units contain basic units
 
5:25 PM
> No, keep writing tests. If we have enough of them and it becomes too cumbersome to change it all, the users won't be able to make changes to this iteration of development, and it will all get pushed to version 2.0!
Dear god.
 
@Sippy - ah, teh wtf
 
@Sippy is it time to go to the pub yet?
 
@Squiggle Oh fuck it is
PUB TIIIIIIIIIIIIIIIIIIIIIIIME
 
5:27 PM
:D :D :D
 
I'm a big fan of this emoticon.
My favorite part about google hangouts haha.
So often it expresses how I feel when looking at code.
 
@jth41 - I was mistaken, I think I understand your point now.
 
@ton.yeung pub Commonly used shorthand for "Public House". Pubs are non-membership bars serving all sorts of alcoholic beverages. Most commonly found in the British Isles or Eire.
 
@jth41 - So you are concerned that although the enum is used in calling the method, the passed value may not be the type indicated?
 
@TravisJ you have no idea how much it means to read someone on the internet say the words "I was mistaken, I think I understand your point now." Kudos
 
5:31 PM
@jth41 line 393... yikes!
 
:)
 
@CharlieBrown which file?
 
Speed.cs
That lib doesnt look ideal to me, way to much hardcoded cruft
 
@TravisJ I'm just looking for a better way to extend classes without adding operators to a previous class when I add a new type
 
5:33 PM
So you aren't worried about enforcing the second parameter to be of the type passed?
@jth41 - I see, I believe I have a solution to that though.
 
@CharlieBrown I know there is a lot left to be desired in the library, to be honest we have only been using Force and Distance up to this point. It's most useful feature is its equality
 
@jth41 - You are having problems representing the prefix of the unit.
for example, a yoctometer.
 
Yes that is one of the problems
The real purpose of the unit library is this: bitbucket.org/Clearspan/geometry-class-library
built on top
@TravisJ that problem and all the ones like it that come up when adding a new type.
 
@jth41 - Okay, so here is what I would suggest. Take, for example, Inch. You could make type Inch internally have a power property, and as inches are multiplied together they return a new Inch with a higher power property. This would solve the problem of having to track the prefix values. You could also make an enum for the prefix values, and pass them as part of the constructor for base units, such as Inch or Meter, and the set the power property with the correlating 10^n value.
 
@jth41 this sounds like something @JohanLarsson has implemented
 
5:38 PM
@TravisJ Ok let me think through all you just wrote there
 
what are you looking for?
 
@TravisJ I think we are missing each other on the idea of an Inch type. you mean Distance?
 
It would allow things like
new Meter(5,3);// 5 km or 5000 meters
new Meter(5,-2);// 5 cm or .05 meters
new Meter(5,PowerScale.Nano);// 5nm or .000005 meters
 
oh Units there are many implemantations. Another lib
 
@JohanLarsson do you know of any other geometry implementations with units? like so: bitbucket.org/Clearspan/geometry-class-library
Cause I would love to use them
@JohanLarsson The main difference with this library is the attempt to solve equality at the same time as unit conversion. In the particular industry I work in anything less than 1/32 an inch should be considered equal
 
5:42 PM
@TravisJ I don't think you understand what "power" is
 
there is an overload for equality that takes a tolerance
 
5 m^3 is very different from 5000m
 
and there is always the alternative to write some code
 
@KendallFrey - Yes you are correct power scale is a terrible word to use there, but I couldn't think of the word for the prefixes
5 * (10^3) m is what it was saying though
 
"as inches are multiplied together they return a new Inch with a higher power property" not a good idea
inches * inches != inches
dimensional analysis ftw
 
5:44 PM
@TravisJ are you suggesting that I should make new classes for each unittype: Inch, Meter, etc.?
 
in ^1 * in^1 = in ^(1+1) = in ^2
 
@KendallFrey - How would you solve it? I think doing it like that would allow a lot of calculation to occur without needing to worry about specifying useless InchesSquared types for your example.
 
@TravisJ I would have a type that has a value and a dimension
 
@KendallFrey - Okay so it would have both, essentially what I was getting at.
 
5:45 PM
so new Measurement(5000, "m")
or something along those lines
it would probably use a fixed system of measurements, like m/g/s
 
@jth41 - Apparently this is rather opinion based :)
 
and then have conversions defined, like inch = 0.0254m
 
@TravisJ lol yes
 
@jth41 - I think if each of us made enough suggestions we would all end up with libraries we would prefer to use which look differently.
 
the important part is when you multiply value together, you have to add the dimensions
 
5:48 PM
Yeah, and tracking it internally can be useful
 
what do you mean?
 
Hardcoding each possible dimension as opposed to keeping track of it as a value
 
you can't hardcode each possible dimension
there are infinitely many
 
Right, so it should be a value held internally
 
@KendallFrey thats what we attempt to do with known things like Speed. bitbucket.org/Clearspan/unit-class-library/src/…
 
5:49 PM
you might want a fixed list of units though, like distance, time, mass, etc.
 
Speed has a reference to a Distance object and to a Time object
 
base units & derived units
 
@jth41 that sounds terrible
 
ohhhhhh snap son
 
measurements aren't objects, they're values
 
5:50 PM
word
 
excel
 
am i using enough hipster lingo to be cool, or not yet
 
yoloswag
 
YOLO
 
@KendallFrey nu uh! with my OO glasses on EVERYTHING is an object!
 
5:51 PM
@jth41 even a number?
5 is not an object
 
no im being sarcastic.
refering to the way some people are when they began to understand OO
 
5 is whatever the hell i tell it to be
 
5 is object
 
OO is often referred to as the pit of failure.
At least by FP hipsters.
 
5:53 PM
 
OO is cool, FP is cool, if only they mixed well
 
I guess null and default mutability are main contributors to the pit of failure thing.
 
Warning, it says, 5 is always going to be type of object.
 
Making illegal state so easy to represent
 
@Bonner by the way what would sou be willing to pay for the app, just hypotetically.. also think of the time i spent with coding ~ 1 and a half year
 
5:55 PM
So anyways, if I understood the last serious thing about the idea of a new type called Measurement
 
@jth41 if you check out the lib you only want Gu.Units.dll, the rest is for code-gen.
I think Quantity is the most correct word. Quantity & Unit.
Did some googling when naming things. Think it is what ISO uses.
 
@JohanLarsson So how do you handle units you haven't generated yet? and the need for
operators on previous units
 
I have a huge bloat in the codegen project. You type in a new derived unit and it figures out all overloads that needs to be added.
 
im tired
somebody say something funny
 
Gotcha, so Every class is regened when you add a new class
?
sorry new UNIT
no new class
 
6:00 PM
Say you have Length & Time. Then add Speed. Then it figures out that Length must have a length / time = speed operator and all the other operators.
For units you can add new units to quantities and the codegen spits out new code.
 
Awesome. ok,
 
A warning is in place, the code gen project is not really meant for public use. Bloated and pretty buggy.
There are a bunch of quantities in place already, added quite a few when debugging it :)
 
Thats ok. just want to study it for my own code gen: bitbucket.org/Clearspan/unitclassgenerator
 
@JohanLarsson - What codegen project are you talking about?
 
Cause that seems to be the only pseudo- Open Closed principle keeping implementation
 
6:03 PM
@SpencerRuport this
 
Nice
I love code gen stuff.
 
Ok. So now I want to save this section in chat by copying a URL and pasting it into our issue tracker as a todo for my codegen. Is there a nifty way to save theses specific chat logs
 
crap, my rants about porn are going to be documented some where
2
 
Bugtracker till end of time.
I really just want to save this comment to show my kids someday when they lose hope about people on the internet: chat.stackoverflow.com/transcript/message/22347135#22347135
 
lol
 
6:12 PM
haha
 
Will they ever gain hope for people on the internet?
 
@jth41 you can bookmark sections in chat
 
how?
 
room > create new bookmark
gotta afk
 
XLinq is awesome
 
6:21 PM
there is an xlinq too
 
ah yeah saw that on the news
 
Ok thanks for the help guys
 
@jth41 - Don't be a stranger :)
 
1 line of normal code, 5 lines of error handling. \o/
 
6:26 PM
That link does actually work for yall yes? I havent made sure it works for opensource like it is supposed to
 
yes
 
awesome
 
@SpencerRuport lmao
 
Is is possible to have a regular expression that accomplishes the functionality of "(someOptionalSubstring)?" without creating an additional capturing group?
 
I have an annoying IoC bug, the ctor is called twice despite singleton.
 
6:28 PM
Why the hell are parentheses used for both capture groups and for grouping?
 
there are noncapturing groups think the syntax is (?:someOptionalSubstring)
 
@MikeAsdf (?:)
@MikeAsdf because derps
 
@JohanLarsson The stack trace isn't offering help as to what is calling each of the two ctors?
 
cool, thanks
 
@LynnCrumbling only external code, VS shows no refs to the ctors either.
These bugs are not much fun, chasing a dumb :)
 
6:30 PM
is the singleton a class you wrote?
 
Would unchecking the "Just My Code" box provide more detail?
 
@NETscape the ctor is public but I'm asking ninject for singleton
think I found the dumb, testing
yep found it
was asking for the class and not the intercafe in one place
 
intercafe lol
 
standard no?
 
hello
 
6:36 PM
He transsoped his characters.
s/cafe/face
 
can anyone point me in the right direction for something in .NET that will allow me to await some Boolean condition with a timeout? Im testing async code in a unit test, and want to give it time to finish without resorting to crude Thread sleeps
 
@LynnCrumbling ty for helping Lynn.
 
@MarkW you're trying to await a Task<bool> and timeout?
 
@JohanLarsson It'll be a while until I can repay all of you guys for the help I've received...
 
extension method coming up
 
6:38 PM
not really, Its a void operation, I send something via a server, and want to await the receive fromt eh client
that receive will modify a local in the unit test
basically I want to wait for that value to not null, or to a timeout
then fail/pass accordingly
 
with reactive you can do observable.FirstAsync().Timeout(...). Pretty nice
 
I am unfamiliar with reactive
 
@MarkW this is what you need? stackoverflow.com/questions/4238345/…
 
@MarkW How are you getting the value back if it's void?
with a Task<T> you can do:
public static async Task<T> WithTimeout<T>(this Task<T> task, int milliseconds)
{
    if (await Task.WhenAny(task, Task.Delay(milliseconds)) == task)
        return await task;
    else
        throw new TimeoutException();
}
which is handy to have anyways ;)
 
there is no reason I cant do it that way, so I suppose I will. I am used to JUnit, and in JUnit I use a utility called Awaitility to await conditions for async unit tests
its a different pattern
 
6:42 PM
(in general, it sounds like the function you're trying to test is pretty nasty/impure, and should be refactored to return Task<bool> in the first place :) )
 
so I had not considered this approach
no
its the Send method of the server
which should not return a value
 
well, a void method that's setting a local bool sounds nasty
 
but if I move the condition to the receive event handler for the client
 
yay, I convinced my client to go with my idea :D
success!
 
then it follows your pattern
 
6:42 PM
@Pheonixblade9 - Nice! :)
 
@Pheonixblade9 Congrats
 
its only in a unit test FYI... I construct the client and the server, then subscribe to their connected/received events
in the unit test
on receive I set a local
so I know I got a value
 
@Pheonixblade9 - Uh... yeah, Brain, but where are we going to find rubber pants our size?
 
instead of using a variable
just make receive set a task
 
I don't understand
set a task, or return a task?
 
6:44 PM
var tcs = new TaskCompletionSource<bool>();

client.OnReceive += (o,e) => tcs.SetResult(true);

try
{
    var success = await tcs.Task.WithTimeout(2000);
}
catch (TimeoutException te)
{
    // You timed out
}
 
ah
that's beautiful
thanks Reed!
 
np
needs to be in an async Task test - but most modern test runners support that out of the box ;)
 
@TravisJ details, Pinky...
 
!!hangman
 
@SteveG That didn't make much sense. Use the !!/help command to learn more.
 
6:52 PM
!!do what i tell you
 
@SteveG No
 
lol, that wasn't expected
 
HAMMAHTIME!
 
_ _ _ hangman, go
 
The
 
6:54 PM
!!hang
 
fuck
 
  +---+
  |   |
  |
  |
  |
__+__

----------
 
@Bonner i didn't expect anybody to get it
 
@SteveG I have a better one for you
_ _ _ _
 
a
 
6:55 PM
I didn't I knocked my pho e :p
 
_ a _ _
 
t
 
nope
 
Tate
 
6:55 PM
r
 
Yes
 
!!hang head
 
nope all around
 
  +---+
  |   |
  |   O
  |
  |
__+__
head
----------
 
Mate
 
6:56 PM
dont guess whole words, have you never played hangman before lol
 
Hang your mate? That's not nice
 
@Bonner protip: gues letters
 
H
 
!!hang neck
 
6:57 PM
  +---+
  |   |
  |   O
  |   |
  |
__+__
head, neck
----------
 
!!hang body
 
Not for years to be honest I had forgotten how to play lol
 
  +---+
  |   |
  |   O/
  |   |
  |
__+__
body, head, neck
----------
 
M
 
6:58 PM
!!hang m
 
  +---+
  |   |
  |  \O/
  |   |
  |
__+__
body, head, m, neck
----------
 
G
 
how about....s
 
no
and no
 
!!hang s
!!hang g
 
6:58 PM
  +---+
  |   |
  |  \O/
  |   |
  |  /
__+__
body, head, m, neck, s
----------
  +---+
  |   |
  |  \O/
  |   |
  |  /
__+__
body, g, head, m, neck, s
---------g
 
lmao
!!hang GIVEMEALEG
 
@SteveG You people suck. The word is flickering
  +---+
  |   |
  |
  |
  |
__+__

-----
 
oh, duh
 
@KendallFrey ugh, what was your word?
 
jazz :D
 
6:59 PM
lmao
 

« first day (1623 days earlier)      last day (3324 days later) »