« first day (2748 days earlier)      last day (2205 days later) » 
02:00 - 12:0012:00 - 00:00

mr5
2:18 AM
o/
 
!!learn o/ <>https://media0.giphy.com/media/ASd0Ukj0y3qMM/giphy.gif
 
@KendallFrey Command o/ learned
 
she's learnding
 
mr5
what time is it in your timezone kendal?
 
10:21 pm
 
mr5
2:22 AM
I've been sleeping for only 2-4hrs for about a week. My question is, how long before my neurons starts to decline/degenerate?
you're not from Eu aren't you?
 
not with that time zone
@mr5 about 5 days ago
 
mr5
@KendallFrey fixed
 
same answer
 
 
1 hour later…
mr5
3:28 AM
285
Q: Is there a constraint that restricts my generic method to numeric types?

Corin BlaikieCan anyone tell me if there is a way with generics to limit a generic type argument T to only: Int16 Int32 Int64 UInt16 UInt32 UInt64 I'm aware of the where keyword, but can't find an interface for only these types, Something like: static bool IntegerFunction<T>(T value) where T : INumeric

I want a numeric constraint for numbers only i.e where T is numeric
 
 
3 hours later…
6:06 AM
Goood morning sharperinos!
@mr5 Build your own generic that checks if it can cast to int in the constructor and throws if it fails or something
 
6:30 AM
!!>'@'+'Hello'+' World'
 
@Squirrelkiller "@Hello World"
 
!!>@+Hello+World
 
@Squirrelkiller "SyntaxError: expected expression, got '<'"
@Squirrelkiller "SyntaxError: illegal character"
 
You're an illegal character!
 
בוקר טוב.
 
6:39 AM
Forgot to switch keyboards?
 
nah, deliberately refrained from switching keyboards.
 
Do you ever accidentally press alt+shift and wonder why your keyboard acts up?
 
The alphabets are totally different, so it's always immediately clear - but it's very common to start typing, realize you're on the wrong language and have been typing gibberish for a word or two, then fix.
It's actually a marginally-accepted idiom to tell someone he's talking nonsense. "Dude, you're on English".
 
lol
We make fun of our colleague for programming in german
 
When I was in the US recently, I had to use a US layout keyboard, with Danish locale.
It was challenging.
Specifically because of that one key.
 
6:49 AM
Hey we have that too, although the AltGr character is a pipe
|
brb coffee
 
@WilliamMariager About 10 years ago I was in Denmark for a music festival (Roskilde), which was rained out, and we escaped to Copenhagen, muddy and defeated, after a day and a half (with about 15000 other people). I remember making it to a hostel in the middle of the night, dirty, muddy, exhausted and drunk (don't ask) and trying to send an email home using a shared computer which was set to a Danish locale. It was... challenging.
 
I can only imagine. If I end up moving to the US I'll definitely bring my own keyboard.
Also, Roskilde is hard to get away from sober. :P
(and dry some years as you saw)
 
Yeah. I remember the price of a stack of 24 beer cans in Roskilde as the same as a single pint in a Copenhagen bar. :)
 
Yeah, and people will happily drive to Germany to save even more money.
We recently did this since I'm getting married soon, so getting as much as possible from Germany saves us a lot of money.
 
Hey, congrats.
 
6:59 AM
Thanks!
 
I remember thinking "Hey, the beer here in Copenhagen costs even more than in Tel-Aviv. And the average salary is only about twice as high. :("
 
You should see Norway then
 
Morning.
Doesn't Copenhagen work with Krowns?
they lost 20% of their value not so long ago.
 
Danish Crowns yeah
And our cents are called ears. Not sure why that is. :P
 
Lmao.
Sounds like something worth investigating.
 
7:04 AM
Did the Danish Crown lose 20% of their value?
I just realized I have no idea how to check/confirm that. It's stable against the Euro, but fluctuates against the USD, but that might also just mean the USD got weaker/stronger. :P
I guess comparing to other currencies is the wrong approach.
 
I think it was the icelandic one, not the danish one.
 
xe.com/currencycharts/?from=EUR&to=DKK&view=1Y the Krone(r?) spiked early 2017, but it's been fairly level for years.
 
@HéctorÁlvarez This was in 2007, so I dunno.
 
yeah, the ISK dipped last year because of politics
recovered though
 
according to this it's lost 10% in the yearly statistic.
 
7:09 AM
ISK, the Interstellar Kredit. :P Always enjoyed EVE Online using their local currency name for their game.
 
oh, against the US Dollar
@WilliamMariager inorite?
it's better to compare DKK and ISK against EUR, because there's far more intersection in the economies
 
Yeah, also the USD tends to rise a lot at certain points.
I don't know if it's true, but my muslim friend states the USD will grow during his holidays, because many muslims go to Africa for their holidays, and in order to have more money they convert their EUR to USD, because it's cheaper and you get more. So it just rises like 20% for about 2-3 months and then settles back behind the Euro.
I think this was during summer.
By the way, maybe you know something about this. I finally got all my parts for a new rig, and eventually found out the AIO radiator doesn't fit the case holes. The separation between screw holes differs by less than 1 cm.
 
Well, if you know a certain pattern in currencies, making money is simple enough I guess. 1 USD fluctuates between 6 .. 8 DKK, so buying while at 6 DKK and selling when at 8 DKK would be a 33% return. But like any investment, you can never be sure.
 
I don't want to return the case because it's heavy, and everything's mounted already.... I could return the AIO and get a different one, but I'm still not sure if it will work.
 
I so don't intend to ever build my own PC ever again.
I actually need to buy a new desktop PC, and I want it a relatively small one (STX? ITX? not sure of the current names of form factors) but bigger than a NUC.
 
7:20 AM
What do you want it for?
 
I used to be into building my own PCs, but I don't really bother anymore. With a prebuilt I get the two year warranty on the whole build, so if anything breaks, I don't have to figure out what is failing. Just less of a hassle this way.
 
only fools play the FX markets
 
what would You invest into?
 
growth industries
 
myself
:D
 
7:24 AM
@HéctorÁlvarez A lot of general desktop use, some gaming (no new AAA games - my current 5 year old GPU works fine for most game, though it would be nice to update), some dev work.
 
10 years ago I'd have put it in solar, electric vehicles, battery techonology etc
Today? probably the same
 
Last games I've run were Mass Effect 3, Slay the Spire and recently started Pillars of Eternity. My GTX 670 (650? I don't remember) serve me well.
 
@AvnerShahar-Kashtan I'd go for an APU then, a small motherboard, 8GB DD4 and you're set.
 
urgh. Buying a graphics card these days.
 
400-500€ tops.
 
7:25 AM
Sounds like we have the same approach to PCs Avner. I don't really play any new AAA titles. I'm still stuck on Factorio and Slay the Spire.
 
I'd rather go for 16GB, because the different in price isn't huge and VS likes RAM.
 
I bought my 1070 on release, 450€. Now it costs 650€
 
wow. Everybody factorios
 
Fuck prices.
 
@HéctorÁlvarez Miners?
 
7:26 AM
Ironically I have a GTX 1080 because I wanted to mess around with VR. But it also means I'm set for GPU for like 6-10 years with my usage.
 
yeah. Miners makes graphic card buying a torture
 
I dunno about APU. I haven't had good experience with AMD in the past. I was aiming for a midrange i5, though, again, pushing up to a (non-K) i7 isn't a huge jump in price.
 
@AvnerShahar-Kashtan Nope, it was just for gaming and video editing.
Too bad the video editing didn't last, it wasn't for me unfortunately.
 
@ntohl It's a game that basically lets you do all the optimizing you get told every day you can't do. :P
 
I don't mind paying a bit more for good components. What I don't want is A) a monster GPU, and B) having to know which of the millions of motherboards go with which CPU and setup.
@HéctorÁlvarez No, I mean the miners drove the price up.
 
7:28 AM
@AvnerShahar-Kashtan You'll welcome extra cores for productivity.
@AvnerShahar-Kashtan Oh yes, that was half the deal.
 
And everyone's waiting for NVidia to release a new generation and no-one knows when they'll do.
@HéctorÁlvarez Quad-core isn't limited to K-series, is it?
 
The other half was phone manufacturers wanting to put 16GB ram on every single phone since then, which made memory prices rise.
 
@WilliamMariager 😃 Sometimes I open it up. Put down 10 tracks, than try to find out, what am I missing in the big picture. 2 minutes later I give up, and start a cs:go, because at 22:00 I don't have the brainpower
 
People are even considering HBM as an alternative, even though the guys that make it are the same that make DDR and they won't really drop the HBM right now, because they're selling like mad anyway.
@AvnerShahar-Kashtan No, the K only means it's unlocked by default and can be OCed.
 
7:32 AM
@HéctorÁlvarez Yeah, I don't need those.
 
If you want a lasting powerhouse that you'll never have to replace (or at least in 20 years) you can get an i9 for a hefty 1000€, and take the risk of some piece breaking in the process. But I wouldn't suggest it anyway.
Or a threadripper, which is the AMD equivalent.
 
7:46 AM
Nothing like accidentally publishing with parts of the code turned off ...
Thank god I caught it.
 
I have two bufferblocks. BufferblockA and BUfferblockB. Linked B to A with bufferblockB.linkto(bufferblocka). bufferblockA has data posted to it, but it is not propogating into bufferblockB. why?
 
So does anyone have any recommendations for the radiator issue?
Because I'm going to go apeshit, the whole rig is almost done, but the god damn LC didn't want to match the case. I thought those measures were standarized?!
 
8:04 AM
What's a Bufferblock?
Ah, TPL DataFlow.
Never touched that.
 
        var bbA = new BufferBlock<int>();
        var bbB = new BufferBlock<int>();
        bbB.LinkTo(bbA);
        bbA.SendAsync(1).Wait();
        bbA.SendAsync(2).Wait();
basically trying to get bbB to pull from bbA
as it becomes available
 
What's going on here.
The flow is completely reversed on that one line.
Even has the "menu" arrow on the left instead of the right.
 
@WilliamMariager Messing around with Unicode RTL/LTR markers.
Welcome to our world. :)
 
is it necessary to give a class/id to a div?
 
Only if you need to refer to it later from code.
Or apply CSS implictly.
@WilliamMariager It took a while, but Microsoft managed to get the LTR/RTL story pretty much correct starting around 2001. Windows XP and Office 2000 finally did RTL properly, including mixing LTR and RTL text in the same sentence (you can see the cursor switch directions the minute you switch into LTR in the middle of RTL).
 
8:19 AM
yeah I need to do that
apply style
 
@Breathing That's what class does.
Tool Apple a couple of more years to remember to support it properly. Some frameworks (Adobe Air, anyone?) still don't.
 
<h1 style="color:blue;margin-left:30px;">This is a heading</h1>
I don't see a class here
 
I honestly don't have a lot of praise for Adobe tools. They're riddled with weirdness.
 
Oh jesus, inline CSS!
 
@Breathing That's because you use inline styles. That means you have to copy the same style to each <h1> element.
 
8:21 AM
gasps for breath.
 
well there is going to be only one <h1> element
 
If you use <h1 class='blueHeader'>Heading</h1>, you only define the CSS class once and apply it to all relevant headers.
 
so I don't think it needs an id or class
yeah
 
@Breathing That's a terrible, terrible, terrible, terrible way to work.
 
Like, InDesign is all sorts of painful. I'm sure the only reason it stays in business is because it's a company standard at this point.
 
8:22 AM
lol
 
You're purposefully writing WET code. :P
 
Fine. You only have one H1. And in a month, you need to change the color. So you do a Ctrl-F to find the header and change the color inthe inlnie style. And tomorrow you have a new page, with a new H1, so you add it inline as well. And then you need to change it to green. So you change it in page 1, and forget page 2 - oh, oh, bug! Because you purposefully wrote duplicated code instead of extract a shared resource.
Just like you use literal values in your code, but instead extract a constant.
 
I get it
 
If you ever find yourself saying "I only have one instance, I might as well just put it inline", hit yourself in the back of the head and extract it to a variable anyway.
 
gotcha
 
8:27 AM
It also encourages you to look at your HTML in a structured manner. It's not a random <h1> with random colors - it's an element of type blueHeader. It's a reusable unit of style and definition.
 
I began about asking about div though
since this is going to be a special div I will give it an id
 
Woah just got coffee and suddenly there's like 5000 messages here
 
That's an exaggeration.
 
ok maybe 3000
 
Between 1 and 5000 would be correct.
 
8:32 AM
@Breathing it's even more important to give class and id to divs, because divs don't carry any semantic information by themselves.
An <h1> is an <h1>. It carries the semantic information of "main heading" even without any class. You can get all elements of type h1 in code and know that you're finding the main headings. You can set the style for all h1 elements in CSS knowing that you're styling the main heading.
 
wow, thank you Avner
 
But divs are nothing. They're "a generic non-inline container". There's nothing you can assume about two given divs without a class or id.
 
8:44 AM
Has anyone here used NHibernate? Because I'm getting an error as cryptic as "could not execute query". Obviously the NH mapping doesn't match the DB schema, so I have no clue what to do next.
Looking for the error is like shotting planes down with a slingshot.
Because every error is different out there, and to make this even more fun, for the sake of code reusability it's all ExpandoObjects and dynamics.
One day I will get to start a project myself, instead of being handed something that is 70% done and needs changes here and there, but clueless since day 1 because I've no idea what they've been doing for the last 6 months.
One day, not today.
 
@HéctorÁlvarez "For the sake of code reusability" here means "We want it to be as unusable for all projects".
 
Yes, I was quoting the technical notes.
I like strongly-typed languages, why even use dynamic.
They don't even use the same service for 2 different entity types anyway.
I'm sure it's going to be fast and perform well when it's done, but maintenance is a pain in the balls.
 
good morning :)
 
Morning
So it seems, oracles GUI in sql developer cant even change a users password properly
actually had to google how to do that shit
 
oracle provides a gui?
 
8:57 AM
sql developer
their pendant counterpart to ssms
 
ahh okay ^^
 
May I suggest TOAD for Oracle?
It's a pretty cozy environment for SQL stuff.
 
o/
wassup folks o/
 
o/
 
9:03 AM
\o
 
(o)
 |_
/ /
 
🅗🅔🅛🅛🅞
Haha
 
@Squiggle is that a chair?
 
Hahah it looks like @SebastianL
( ͝° ͜ʖ͡°)
( ͝° ͜ʖ͡°)/
 
9:13 AM
~(˘▾˘~)
╚(ಠ_ಠ)=┐
☜(˚▽˚)☞
 
Hahaha the first and the third are like birds haha @Squirrelkiller
 
That's a seriously dodgy chair, might want to get that checked out
 
is toad commercially free?
Also that is obviously Squiggle with a jetpack
 
@Squirrelkiller I think there is one free version.
 
By the way guys, I just want to make survey haha have you tried using this to your asp.net applications before? letsencrypt.org
It's free ssl
 
9:26 AM
@mark333...333...333 i have used the service on multiple occasions
it's good
 
I'm debugging some function and it calls itself from the underlying call...
What kind of magic is this?
 toReturn = Get((r, p, si, so, filterInfoRules) => {
                               return SomeDal.getWhatever(r, p, si, so, filterInfoRules);
                           },
                           (filterInfoRules) => SomeDal.getWhateverCount(filterInfoRules),
                       rows, page, sidx, sord, filters);
I didn't even think this was possible.
 
erm i don't exaclty see the recursion in this, but i could be blind so point me to it pls ^^
 
toReturn = Get(
    (r, p, si, so, filterInfoRules) => SomeDal.getWhatever(r, p, si, so, filterInfoRules),
    (filterInfoRules) => SomeDal.getWhateverCount(filterInfoRules),
    rows,
    page,
    sidx,
    sord,
    filters);
Just split it up a bit so it's easier to read. :P
So what exactly is the issue?
I mean, all it does it pass in two delegate. Whether they're called or not depends on the implementation of the Get method.
 
Oh I understand haha thanks for that info @SebastianL I need to test their freessl on my ASP.NET Core 2 :)
 
10:08 AM
php is hell
 
@mark333...333...333 I have like 5 ssl certificates from letsencrypt
 
@Harry no hell would be still somewhat enjoyable
 
@SebastianL is the most sadistic thing i've ever read
 
@WilliamMariager After a long debug session I found out the Unity Container is returning null.
It's registered, we register all the modules within the namespace, IDK why it doesn't return the correct type.
Oh and it's not calling itself by the way, it was the sloppy formatting that made me think so.
It just calls Get and passes the function over.
It may have something to do with my brain being about to explode, but eh...
 
10:36 AM
That's nice @Squirrelkiller hehe thank you :)
 
Not sure how everyone else does it, but I use simple win client for lets encrypt
just execute, choose site, and wait for it to do everything else
Anyone else use LE on windows?
 
10:52 AM
What's LE?
 
Lets enrcypt
 
By the way, is there any way to tell my unit test project to read the other project's web.config instead of its own app.config? Because I'm trying to read a parameter and apparently it's trying to reach for the unit test configuration, and I need to test using the current web.config instead.
@Squirrelkiller Nope, sorry.
 
ive just spent an hour trying to fix a problem with a php script and it turns out i just repeatedly spelled my variable name wrongly
 
@Squirrelkiller nope linux only
 
I feel you shouldn't actually need a web.config
 
10:55 AM
@Harry don't you use an ide?
 
@Squirrelkiller Why not?
 
phpstorm or something?
 
nah we're being made to use coffeecup
im on a training course and its just being dictated to us
 
wth is coffeecup?
 
@HéctorÁlvarez Should test a single unit, a single method. If at all possible, this should be independent of other files or classes
 
10:59 AM
Oh really @Squirrelkiller. I'm going to try to use LE on Ubuntu let's see what would happen.
 
@SebastianL html text editor
 
Why not use VS Code @Harry?
 
like i said, we're being told to use this
i use VS at work
 
what's is coffeecup? is it similar to Notepad++?
 
it's seems more like DreamWeaver in cheap
 
11:00 AM
^
 
Oh I see @SebastianL I'm not a fan of DreamWeaver though hehe
those drag and drop thing hehe you know
 
@Squirrelkiller But that unit reads from the configuration file. I currently force the parameter to whatever I want. Is this what you mean?
 
@mark333...333...333 me neither
but i tried it once and i think there may be people who like it
 
Yep, perfect. Make it independent of outside stuff by just setting it. I guess that's, aside from IoC and mocking, the best way of testing a unit.
 
@Harry is the tutor capable?
if not screw his opinion and show him you can do better stuff in no time
with a better ide
 
11:04 AM
@SebastianL he is, he used to work for siemens
 
@SebastianL Oh yes. I've tried that too before but I didn't appreciate it. I prefer customizing from behind.
 
i think he wants to avoid getting us into the habit of relying on compiler warnings
 
@Harry php doens't get compiled
 
thats a prime example as to why im on this course hahah
 
11:06 AM
When trying to learn html/css, I also did it in npp.
 
@Harry I see hehe
 
For as basic training as possible
 
back in the days npp was the best option, but i'd use vs code today
 
Haha notepad++ me too @Squirrelkiller I was using codewrap theme too hehe
Exactly @SebastianL Thanks to Microsoft hehe VS Code is really a game changer because it's for community
 
@HéctorÁlvarez Yeah. You should force the parameter. Btw something read from configuration file should be a dependency
 
11:08 AM
I mean, you don't need to crack it haha I was struggling before how to get sublime or phpstorm because those aren't free though
 
!!lenny
 
( ͡° ͜ʖ ͡°)
 
( ͡° 0 ͡°)
 
VS Community is for the community too though
 
when i was in school i had all the games cracked on a external hdd
 
11:09 AM
Hey guys, what would be the approach to create an instance of a type using a generic factory method?
I am trying to do something like:

// In some method:
Type t = Type.GetType("IStorageConnector");
return connectorFactory.GetConnector<t>(connector);
 
@HéctorÁlvarez If You unit test the reading of the config file, it should be contained.
 
@ntohl Do you mean I should add the configuration file to the unit test as a dependency?
 
Of course, the t won't work.
 
I'm technically using the unit test to familiarize myself with unit testing at the same tim I use it to debug a specific webAPI controller call.
 
@HéctorÁlvarez No You should mock the IConfigurationManager, which in it's real state reads from the config file. The mocked version contains whatever You want for the specific test
 
11:11 AM
The signature of that method is:
public T GetConnector<T>(string connectorName) { ... }

It's going to read the info from a config file and create an instance of that type
 
@ntohl Oh right, I forgot about mocks and stubs.
 
@TusharTyagi Activator.CreateInstance<>
 
But the method doesn't have this kind of IoC because nobody expects to set the configuration file manually.
 
@SebastianL Haha that's IT way of playing paid games before
 
@HéctorÁlvarez default implementation may read the default way (ConfigurationManager.AppSettings)
 
11:12 AM
@Squirrelkiller Yes, that is happening inside the method
 
in the IoCModule You default for that one. But You have to be explicit in every webAPI controller, that You depend on the IConfigurationManager
 
public object GetConnector(Type t, string connectorName) { ... }
Although I'm not exactly sure what the actual question is
I heard:
"create an instance of a type using a generic factory method? "
 
can you elaborate your question @TusharTyagi?
 
Activator.CreateInstance<T> is a generic factory method to create an instance of a type
 
Ok, let me rephrase.

At runtime, I need to create some types based. I know what interfaces I need to instantiate. I'll read some config file
That config file contains some instantiation logic. More on this later
Once I know which interfaces I am going to use, I load some DLLs containing the actual implementation classes
But I want to write a factory to abstract away the object creation logic. So that it can be easily used for instance in a console app or a webapi app by just using the factory
Config contains the configs (user credentials, endpoints) for each of these classes
This is basically a plugin model which gets the implementation at runtime
 
11:20 AM
So

Type t = GetTypeFromFile("IConnector");
dynamic d = Activator.CreateInstance(t, [...]);
 
What's the correct data type for storing bcrypt encoded passwords? Or any other recommended password storage algorithm
 
I got a custom Configuration item, but I don't know how to pass it. The function I'm testint doesn't accept the Configuration element.
Unless I can set it globally...
 
@Butler1233 byte[]
probably
 
I saw something saying it should be fixed length too? Is that true
 
@HéctorÁlvarez than the problem resides to You can't pass any dependency down on some path
 
11:23 AM
Arrays have fixed length anyway
 
@Squirrelkiller I've already implemented what you wrote.
Webapi/Console/IoC container would use the 1st line and inside the factory I'm using the second line.
 
dynamic saves the day!
 
For instance, this is what DI logic has to do in a dotnet core app:

services.AddSingleton(connector, (provider) =>
{
Type t = Type.GetType("IStorageConnector");
return connectorFactory.GetConnector<t>(connector);
});
But that line with return statement is causing trouble, I'm not able to think of a way which might work
 
@HéctorÁlvarez (You may hack it with DependencyResolver.SetResolver(resolver); and DependencyResolver.Current.GetService<IConfigurationManager>())
 
1. Make the lambda into a method
2. look at error messages
 
11:42 AM
@TusharTyagi It's causing trouble because t is a Type object, not a generic type parameter.
 
@AvnerShahar-Kashtan Yup, that I understand.
@Squirrelkiller Finally used
public object GetConnector(Type interfaceType)
Threw away generics
@AvnerShahar-Kashtan I wanted an approach with generics but I wasn't able to understand how to work with this at runtime.
 
Generics aren't runtime things.
So that's where you hit a wall.
 
^^
Specifically, though, if IStorageConnector is the type name, you could probably do connectorFactory.GetConnector<IStorageConnector>. That doesn't seem to be a runtime definition.
 
11:57 AM
Yeah, but there's type.MakeGenericType so I thought maybe I can find a clever use of that :P
But that connector name (IStorageConnector) is not fixed. I'm reading a string off a config file and creating a type out of that.
@AvnerShahar-Kashtan
 
@TusharTyagi That's reflection. That's your very last solution to any problem.
 
@TusharTyagi That still generates a Type object. Not generic.
 
02:00 - 12:0012:00 - 00:00

« first day (2748 days earlier)      last day (2205 days later) »