« first day (2650 days earlier)      last day (2524 days later) » 
02:00 - 14:0014:00 - 00:00

14:00
Pokemon is life!
Still waiting for that official pokemon MMO...
:D
PokemonGo is more or less it
let me correct
PokemonGo IS a MMO game --> there you have it
That's not Pokemon. That's Ingress with a Pokemon-skin.
I will use the new entities that are similar and rewrite all the data access, will probably be simpler code in the end.
a shame. but i think it will come out at the end of this year (or at the start of 2019)
14:09
@Nerdintraining I cracked xD
@HéctorÁlvarez Like an egg?
like a hamster?
that's illegal here sir, I need to take that for 'evidence'
14:14
I'll be needing to store it in a safe place sniiiiiiiiiiiiiiiiiiiiiiiiiiff
You don't sniff crack, silly.
is cocaine
you always sniff cican
i've made a oops
pls stop @Kieran you've had enough ;)
that was the joke :P
well
cican was a horrible typo
He never has enough!
14:23
YEAH
MOAR I SAY
MOA MOA HEY HEY HEY
@Nerdintraining'questionmark' pubg tonite?
@Kieran sure why nought
14:24
anyone kind enough to tell me why this doesnt run in under 100ms?
public List<Cell> getReachable(List<Cell> visited, Stopwatch sw)
    {
        if (sw.Elapsed.Milliseconds >= 80)
        {
            return visited;
        }
        for(int i = 0; i< Links.Count(); i++)
        {
            if (!visited.Contains(Links[i]) && Links[i].Content == ContentType.empty)
            {
                visited.Add(Links[i]);
                visited.AddRange(Links[i].getReachable(visited, sw));
            }
        }
        return visited;
    }
@SebastianL becuase you have slow wood PC
but there's a upper limit of 80ms
@Kieran Or maybe i'll fall asleep bringin my son to bed, my wife is out for the night
@SebastianL The fuck should we know. What is all that shit? Why are you counting everything with an enumerable? Dafuq are you doing Contains on a list? dafuq does getreachable do
Is that supposed to be A*?
14:26
@RoelvanUden its a simple BFS for a AI on codinggame.com
wow that code
It's terrible. Fist and foremost, STOP USING System.Linq
Then start thinking about how you represent search data
is Links IQueryable attached to a DB on the other side of the world?
well, at least, not until you understand what LINQ does
How big does visited get? Because you're running an O(n) search on it every time you call Contains.
14:27
^^ That for nuances
Where is Links defined? You're going over all of it every time.
Super tips: Big-o notation, data structures, how hashes work, etc.
Then come back with a complete source :-P
it's not Your day
the efficiency is not why i asked this (i know that this is terrible), but i wondered why if (sw.Elapsed.Milliseconds >= 80) is not working, but i assume Contains is the bad guy here
@Nerdintraining'questionmark' just bring him to the vidya gaems
its fiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiine
Joking ofcourse, just hit me up if you manage to get on your pc @Nerdintraining'questionmark'
14:29
Because you can easily have >20ms delay between the first and second time you check sw.Elapsed, which, I believe, isn't particularly reliable for <100ms resolutions anyway.
@SebastianL Don't assume, measure. There are performance measuring tools in VS. It's called the profiler. Use it ;-)
suuuure why not.
It happen din the past, he woke up and came over just when i spawned in the airplaine.
He was super excited to see the airplane and when i jumped out he said "airplane gone?.." sounded sad
and will do :)
@SebastianL think about what happens when it takes eternity between the call to .Elapsed and to .getReachable
also it doesn't even help much, it will loop over entire Links anyway
regardless of how fast would .Contains be (it's slow)
Also, is this educational or are you doing this for production code? There are vast pathfinding libraries out there, that are highly optimized.
You check sw.Elapsed. It's 70ms. All's good. Then you call Links.Count(), visited.Contains, Links[i].Content and visited.Add, any of which, and certainly all together, can push your running time over 100ms.
14:32
@RoelvanUden nah just a little AI for a js Game
Only then, in the recursive call to getReachable, do you check the elapsed time again.
which does nothing to prevent running the entire loop over Links
only prevents further recursive calls
awe haha @Nerdintraining'questionmark'
I'm not even sure what you're doing. For each link, you're going over all other links, looking for ones you haven't visited yet and are empty, and "visit" them?
But your recursive call both returns a list of cells and updates the parameter, which is confusing and probably problematic too.
I'm pretty sure you're duplicating Visited cells. You're passing it into getReachable which adds to it, and then returns the cells after adding, and adds again.
@AvnerShahar-Kashtan its a part of a pathfinding algorithm for a n-dimensional matrix
14:36
What what does Links contain? The set of possible links from your starting position? It doesn't look like you update it, so it will always go over hte Links from the starting cell, not from the cell it moved to.
@AvnerShahar-Kashtan a Link is neighbour cell. It has to be empty to be accessible. it does work (even if its slow).
to explain the code a little:
i start with the starting cell (this)
and recursivly search for all neighbours which are empty
and so on
So Links is a calculated property?
Not a value?
@AvnerShahar-Kashtan Links is a never changing value
a List of Cells
Links contains n*2 elements for n<=3
Last night I think I learnt something important about types
Your type checker is your best friend
1.) .Count() is pointless on a collection, use .Count instead 2.) Use something that has a faster .Contains than O(n), like HashSet (assuming your Cell hashes well and the hashing criterion doesn't change)
14:57
@RonaldMunodawafa duh
@milleniumbug does the default hashing work properly?
aka, hashing the object reference?
@Wietlol The response to the lack of static type checking has been unit testing
@Wietlol yes, default hashing does it by identity
lack of static type checking?
Like in Python where dynamic type checking happens
@milleniumbug ah, well, then you could be fine with reference hashes
14:59
Type checking happens as your script is running
Rather than first checking types before running your program
i mean, hashcode and equals only make sense in the context where there is a parsable representation of your instance
in tables/cells, you never want 2 different objects to appear equal
@RonaldMunodawafa Oh, yes, let's write a unit test for every goddamn thing the compiler should've seen in the first place. Because that's not a wasted effort at all!
if you want identity hashing then sure, "it hashes well and the hashing criterion doesn't change"
I remember, when I had a parameter, which was handled as a list of strings. Then flattened it. It worked well in most of the circumstances. One time we called it with 1 item. Than it iterated through the string's chars, and flattened that... Can't reproduce
15:01
\o @Nerdintraining'questionmark' graduation party eh :P
@RoelvanUden To me it's a really poor defence for the lack of static type checking
import itertools

def iterate(someIterable):
    print (list(itertools.chain.from_iterable(someIterable)))

print "Hello World!\n"
iterate([["foo"], ["bar"]])
iterate([["foo"]])
@RonaldMunodawafa Indeed.
@RoelvanUden Sir from where did you got this json.encode and json.decode method?
function manipulateJson(value)
  local data = json.decode(value)
  data.myAddedValue = 123
  return json.encode(data)
end
Using json.lua. You could've googled that one.
github.com/rxi/json.lua really doesn't matter which one you use.
There are plenty
Thanks and sorry once again :)
im trying to use this to implement a progress bar, but im not a front end person and im not sure how to apply it to my code, could anyone help me?
15:31
@RoelvanUden Hey, long time.
16:06
I'm trying to compare an edmx file to a database, and someone said there was an option to do that in VS2017. Is that true, and does the option exist in 2015?
git noob question, I take git commit sends the changes to the remote repo, but what does push do?
@HéctorÁlvarez git commit does not send the changes to the remote repo.
That's exactly what push does.
commit doesn't send changes to the remote repo
git commit is a stronger version of "Save", recording the version alongside a timestamp and a commit message
git commit is 100% local, and will work offline
commit logs the changes in your local repository
16:07
@MadaraUchiha Oh I see, so commit only creates a commit in the local version...
ugh, I've been doing commit followed by push all the thime thinking I was committing the changes to the remote repo, then pushing for whatever reason
You can configure Source Tree to automatically push commits but I don't recommend it
It's like that day when I had been using encrypted google and didn't actually know the difference between it and the standard (still https) one
My GIT is local, because bosses don't want to move SourceSafe to GIT
so I made one myself for both SS and SVN
and then I'll checkout wherever they want
so you have git, svn and sourcesafe?
> discontinued
woot
16:15
yeah
there was a sourcesafe
and someone decided that it was time to move to some platform that was supported by someone
so they decided to use SVN last year
LAST YEAR, YOU READ IT RIGHT
and there's a GIT, but not for my department
so, one month ago
that department has Jira as well...
we have jira
and svn
and git
my department has SVN and redmine
and SourceSafe, but I don't count that one
even if thre are still 104 projects in there
104 tools that are never used
16:19
Much like this chat room, it's full of useless tools.
3
BOOM
!!> 2+2
@HéctorÁlvarez 4
@mikeTheLiar at least im still here to compensate for it
@mikeTheLiar I will have you know, jerk, I am very useful.
16:32
Do you guys consider yourselves tools? I don't take it personal
Can't relate at all, you know
@mikeTheLiar how does it feel to be the celebrity of the room once in a whiele ?
user5500750
16:56
Does Unity3D support testing games directly on Android phones?
Today's a funny day
right now I'm writing a SWITCH-CASE for a hardcoded value in a SQL Sentence
What do nudists dream about in place of the "forgetting your clothes" dream?
2
SELECT [...], 'Foo' as Bar [...] UNION ALL SELECT [...], 'Git' as Bar [...]

SWITCH (Bar)
CASE "Foo"...
@Hypersapien peeling
Guys apprending to the old question
Differences between Types/Structs and their aliases
I just got a suggestion to "Simplify" my function from
public static String Foo()
to
public static string Foo()
how is it simpler? :O
17:11
Use built-in types as much as possible, because there's no reason not to
For one, you don't need usings
half of my .cs files don't have a using System; directive
I need to do a contains with case insensitive. Any advice on best approach? I found this: stackoverflow.com/questions/444798/…
But I'm not sure how to set the cultureInfo instance
I haven't written a using directive
half me files are just files
they have no extension
@Euridice01 the accepted answer addresses your issue.
Also the highest voted answer (NOT the accepted answer) has an example that doesn't require a culture info instance.
17:16
I saw the one about string extension
I added the string extension in one project and I'm hoping to reference it in another project but it doesn't catch it
I guess I'll create the extension in the project
and have duplicate extensions haha
@Kieran i have 554 .cs files in my project :), don't know how you would manage files without extensions
You can always drop source code into folders that only source code goes into. Why you'd go out of your way to have no file extensions on your .cs files is beyond me, though. I can't see it being a recommendation, and I wouldn't be surprised if it messes up some 3rd-party IDE plugin somewhere.
@Raldo94 with great difficulty
17:34
ello
'ello govnah
@mikeTheLiar sooooo about that extension method LOL...
I used the extension method and ran my code. However, now I get a complaint for sqlite... no such function contains
even though without the extension method, the normal contains works in sqlite linq query
so that is odd...
user7480455
17:56
hi all
18:19
That moment when you're bored and start typing ASCII art, then press enter instead of shift + enter on accident
@Euridice01 I'm not sure I understand what's going on here. Are you expecting Linq to SQL to use your extension method?
 
2 hours later…
20:09
How can I add icons to my VSTO buttons in the Ribbon Designer so that it shows me in VS and deployed on Outlook where it at the moment doesn't do that?
 
1 hour later…
21:38
I never knew how many boxes of minerals I had until I began packing to move this week.
It's enough to fill a closet, leaving only enough room to hang clothes on racks above.
> boxes of minerals
wat
Although technically
Isn't everything just a box of minerals when you get right down to it?
No. Amorphous and non-solids don't qualify. It has to be a repeated and definite chemical structure. But that does make ice and salt minerals (house salt is officially called halite). I collect rocks like agate, etc. and minerals like quartz crystals. It's not uncommon for good specimens to be abundant when they show up, so I collected a lot...
22:20
In StreamReader, if you do while(!reader.EndOfStream) if I enqueue into a concurrent collection, do I need to store the index? Or will I be able to trust the ordering?
22:32
@Greg Can you give a more concrete example?
Specifically, what are you doing in different threads?
 
1 hour later…
23:37
@KendallFrey I saw this example, I wondered why he couldn't use a ConcurrentQueue or another thread safe collection.
AllLines = new string[MAX]; //only allocate memory here
using (StreamReader sr = File.OpenText(fileName))
{
        int x = 0;
        while (!sr.EndOfStream)
        {
               AllLines[x] = sr.ReadLine();
               x += 1;
        }
} //CLOSE THE FILE because we are now DONE with it.
Parallel.For(0, AllLines.Length, x =>
{
    TestReadingAndProcessingLinesFromFile_DoStuff(AllLines[x]);
});
Why would it need something threadsafe?
also, ewww
File.ReadAllLines
That was the other example:
AllLines = new string[MAX]; //only allocate memory here
AllLines = File.ReadAllLines(fileName);
Parallel.For(0, AllLines.Length, x =>
{
    TestReadingAndProcessingLinesFromFile_DoStuff(AllLines[x]);
});
oh jesus have mercy
he's just allocating a huge chunk of memory and immediately throwing it away
Then they provided some performance, but something seemed off.
I think it's safe to say these examples aren't worth paying much attention to
23:41
What do you mean just throwing the memory away?
new string[MAX]
it's never used and gets reassigned right away
Oh, yeah I noticed that.
I have 2,300 files I need to read, each contains over 86,400 lines. So I was trying to read that quickly.
And this will occur every night.
Well, the best way to do that depends on how it's processed
But probably you're not going to improve much on a simple File.ReadAllLines
So I was looking into Parallel processing, to read all the files.
            // Todo: Wrap in Parallel
            var contents = new ConcurrentQueue<string>();

            using (var reader = File.OpenText(file.FullName))
                while(!reader.EndOfStream)
                    contents.Enqueue(reader.ReadLine());

            Parallel.ForEach(contents, index =>
            {
                // Do Stuff.
            });
That's not reading the files in parallel
Is the slow part reading the file or processing?
23:45
Something like that, where it does Parallel on the open / read, and then the action of parsing data to database. I know some constriction would occur on the IO.
focus on optimizing the slow part
is anyone good with EF and/or SQL Server? We have tables resources and work and a child table work_resources. We want to cascade delete work_resources rows when either a resource or work item is deleted. we can a circular cascade delete error when cascade on delete is on both foreign key relations.
@KendallFrey They're both kind of slow.
Well, file I/O is slow for an obvious reason. What's the reason processing is slow?
CPU-bound, file-bound, network-bound?
@KendallFrey Currently trying to determine where the header is in the file, then begin capture to database.
The current approach, basically conditionally checking every line to find the header then capture all below it in essence.
What would you do?
23:55
If the data is completely independent and can be parallelized, and performance is critical, do it.
If the bottleneck is file access or DB access you're probably not going to see much improvement though
Okay, I'll talk to you tomorrow about this. I've gotta pickup my son from daycare, I'd be interested on your thoughts in more detail.
02:00 - 14:0014:00 - 00:00

« first day (2650 days earlier)      last day (2524 days later) »