« first day (2324 days earlier)      last day (2617 days later) » 

12:04 AM
Hey in GUI, I am trying to understand the model-view-viewmodel paradigm. In this paradigm, if I have a GUI element that "enables/disables" other elements, who is responsible for enabling/disabling (and choosing what to enable/disable)? Is that the "view" object or the "viewmodel" object?
 
War
its a 2 way binding between them
the view renders the data, the model holds / owns it
when either changes they both update
it's a sort of circular referencing subscription model (if that makes any sense to you)
 
Well I'm familiar with Model-view-controller (where the controller is often ignored...). However I am finding it hard to understand why and when the "viewmodel" comes into the picture.
 
War
I'm yet to see an implementation of MVC where the controller is ignored ... but ok ...
 
Eg. I have a button that says: "show grid with data about selection". Do I then load the grid interface inside the button class and ask the ViewModel to bring me the processed data or do I just tell the ViewModel to "start the grid" and let the ViewModel do all the rest (loading correct interface elements, processing data)?
 
War
its a 2 way binding
you have a view and a model you combine them
you get a viewmodel as a result thats the representation of the 2 things combined in a way that means both can talk
its not called MVCV because the view doesn't talk back to the controller
nor does the model
the idea is that both view and model in MVVM are "smart" and can ask questions of their counter part and respond to event notifications
 
12:55 AM
MVVM for the windows
 
 
5 hours later…
5:44 AM
Is it possible to make a message "stand out" more in the console window for visual studio?
I have a "warning" that is not an unrecoverable error per se, but for debugging I would like to know when it happens and what causes it. So I write to the console a logging line. The problem is, in this WPF application it is hidden behind dozens of lines generated by automatic code.
 
@paul23 A simple way is to prefix it with something random like "asdf" and then search the output for that string
 
C# doesn't have something similar to stderr - a standard error/logging stream? (That resharper could draw into the debugging window with a different colour, pycharm does this quite well).
 
@paul23 Sure, every process has stderr, and C# does have access to it
 
6:24 AM
posted on February 25, 2017 by Scott Hanselman

I just updated my Windows 10 to Insiders Fast Build 15042, and suddenly my glorious new Logitech BRIO 4k webcam doesn't work! Well, it's all beta software, but it turns out the issue is with something in the Logitech INF files for their drivers. I'm assuming they'll figure it out, but the nutshell is that the first install works, but the driver gets messed up on the upgrade. You can't just pull

 
 
3 hours later…
8:59 AM
@Feeds got to love "feature" updates 😆
 
 
2 hours later…
11:16 AM
@KendallFrey / @TomW ^^ above ars link. I think there was a discussion here regrarding sha1 and git. It seems svn is effected as well
 
11:38 AM
> internal const String ExecutionEngine_YoureHosed="ExecutionEngine_YoureHosed";
^ that line is actually in mscorlib
 
11:58 AM
lol
 
Yeah, no idea why the standard lib contains so may fields, classes, etc. that are never used
 
deep in framework code I wouldn't rely so much on the notion of a reference to a variable, I guess. Thar be dragons
 
I've counted 35 different exception classes at this point that are never instantiated in the CLR
 
References to it are unmanaged, maybe?
 
Pretty sure that the exception throws come from external functions
Or from the runtime itself (like a DivideByZeroException)
Here's the full list so far:
System.ComponentModel.Composition.ChangeRejectedException
System.ComponentModel.Composition.CompositionContractMismatchException
System.ComponentModel.Composition.CompositionException
System.ComponentModel.Composition.ImportCardinalityMismatchException
System.ComponentModel.Composition.Primitives.ComposablePartException
System.ComponentModel.Design.ExceptionCollection
System.ComponentModel.Design.Serialization.CodeDomSerializerException
System.ComponentModel.InvalidAsynchronousStateException
System.ComponentModel.WarningException
 
 
5 hours later…
War
5:15 PM
has anyone looked at this roslyn scripting stuff ...
I have included those usings and my code can't resolve the ScriptEngine or session classes
wondering what refs I need that I don't have
I figured that VS2015 projects already referenced the roslyn core so in theory I shouldn't need any more refs than my project already has
 
This seems to say you need the CodeAnalysis package stackoverflow.com/a/34141639/313414
misleadingly named for scripting applications imho
"Why do I need a package called 'code analysis' when what I'm doing is nothing to do with code analysis?" you may ask
 
War
typical microsoft
knowing them it'll get moved at some point
 
They make some strange decisions with factoring sometimes
Yes I accept that it's useful to not have to take a dependency on a monolithic package that may have platform requirements but if you just import everything into everything anyway what's the point
 
War
oh crap
that's added like 20 refs to my project
this is not a small addition to my core code
 
What was I saying?
 
War
5:23 PM
yeh ... i know ... I consider myself "told"
ok now its being all "weird"
"found everything, no wait, ok found everything ... no wait ..."
oh geez
this is going to be a fun little minder
the project references roslyn as its compiler anyway because its a 4.5 / VS2015 project
with this it then needs to include the compiler it's using to compile the code too
so it can do the same in the app at runtime
I get the feeling this is the sort of ground Microsoft has to cover
 
you dawg we heard you like compiling
 
War
what a mind fuck
 
so we put a compiler in yo compiler
 
War
oh bloody great
Web Session, Compiler Session, Game Session, Virtual Session
I have like a gazillion Session objects now
 
 
2 hours later…
7:52 PM
Have anyone used SplendidCRM before?
 
8:14 PM
@TomW i think the same when i see nuget packages with loads of dependencies from the same author.
@War what are you using roslyn for? Do you want to pass some c# scripts at runtime? (Similair to vs c# interactive)?. If rosyln is too heavy, maybe think of creating your own DSL with a fluent api?
 
War
@garfbradaz I have no idea where to even begin developing my own DSL, but its a neat idea
quite happy to use roslyn for now as I get other languages as a side effect effectively for free
that's the beauty of .Net I guess lol
 
You could start with an internal dsl using c# and create a fluent api. External dsl are when you would use tools like antlr to create a new lang.
 
@War Haskell
 
@KendallFrey youve created languages before have you not kendal? Im sure when i was nosing on your site i saw something
 
Yeah
Nothing great
 
8:27 PM
Did you use antr?
 
Antlr
How did you approach yours?
 
I've never implemented a language with anything close to a complex syntax
So parsing was never the hard part
 
War
Feb 16 at 17:00, by War
50 secs ago, by War
@KendallFrey no-one gives a shit about haskell
I've been working a system of approved types in a known set of namespaces and their children
you call them up with simple syntax followed by a json string
It's for a game i'm building thats web based
for example, the game lets you "load an app" on your virtual desktop
so the command for loading the comms interface is ...
App.Open { name: "comms", join: "lobby" }
that evaluates to a class I have constructed on the server side (with C# pre-built) and gives it the json as a dynamic object
the command can then decide how to handle that object
the matching is done by convention so to add more commands I just follow the convention and the infrastructure can handle wiring that up
and the signalr socket worries about the two comms from client to server
or other clients if need be
the idea behind the scripting is to allow the user to write "command files" which would just be chains of thee such commands, but also to allow writing blocks of code for more complex commands
one of the things the game system will expose is chaining of the built in commands, the gamer can write a script to make the use of the built in stuff more efficeint
tbh i aint totally finalised everything in the design yet, so i'm just tinkering with ideas at the moment and protyping up various bits to see where I could take the design
in a way I sort of got almost a DSL with my simple command parser that handles terminal input from the user
 
@War wow, sounds you have done a good job so far!
 
War
8:39 PM
it's getting there
I'm just bolting together ideas at the moment and taking inspiration from 100 different sources
 
@KendallFrey but you have done one. I would love to create something like Boo which targets .net
 
War
I have this idea for a world map that's broken down in to countries that you can select and then choose a data center to hit with an attack
if you succeed you can start to bot farm the data center then use those to attack your opponents
 
@garfbradaz Boo already targets .NET
 
War
^
I was thinking that lol
 
@KendallFrey sorry i used Boo as an example of something similar i would like to have a crack at. We have an internal VMS dsl where i work that i would like "modernise" and target .net.
Its just time.
 
8:42 PM
If you want to learn how to write a compiler, try compiling brainfuck with System.Reflection.Emit
Interpreted languages are easier to implement though
 
War
I have no interest in writing a language, I just want to offer the means to write code as part of my game model
would be neat to plug in lots of languages though
maybe later look at plugging in lua / js or something
if they can be sandboxed in a manner than i'm happy with
 
@War im sure i read an article once somewhere about a guy who created a lua plugin for xna.
 
@War What language do you want that code to be written in?
You either need to use an existing intepreter/compiler, or write your own
 
War
i'm using roslyn
since it supports all the .Net languages it's done if I can host it ... which it seems I can if I can figure out the right refs
 
9:11 PM
Why most of open source projects need some sort of installation and configuration before they are used? aren't they meant to be just open source?? (I say that after trying using SplendidCRM and virto commerce)
 
9:21 PM
Because source != config. Nothing runs w/o a config if defaults can't exist (e.g. where to store shit)
 
@RoelvanUden I mean the type of configuration that install programs, I want fully open source code, is that possible? or large project must be installed that way?
 
Just because something has configuration doesn't mean it's not open source.
 
If you create a project with VS and uploaded it in GitHub. I would call that open source> why do you need that kind of UI that install things I don't know about?
 
Sigh.
You really don't grasp the concept, do you?
If I write a UI that steps you through configuring your machine environment, and open source that UI, NOTHING IS HIDDEN.
It's JUST THERE for YOUR CONVENIENCE to make setting it up on your machine easier.
Almost ANY project NEEDS some kind of configuration.
 
9:40 PM
@RoelvanUden may be. bu I never thought that any source code (.NET in particular) need more that VS and SQL server and some connection string (and other web config) with some nuget libraries, all can be done by the developer not the UI, or Am Ii missing some other types of configurations?
 
Many, many, many, many types of configuration. Besides, editing shit in VS is really inconvenient.
If you want to tell an average user 'Hey install VS and edit this XML to set it all up', go ahead.
You'll get tons of questions, because that simple thing (for us) is really not simple for most.
Thus, a UI for that is a good idea to begin with.
Then there are all the other types of configuration, what modules are enabled and what aren't? What's the email header, the body, where is it from, who receives the notifications, what number should it sms, etc, etc.
Can you imagine if windows control center was some XML file you had to edit with notepad? That'd be terrible.
 
I think you misunderstood me, I meant open source projects for developers only, for the sake of learning, I think you're considering the usual users who can use that software for some other purposes
this is not open source :(
 
10:27 PM
Hello!
I have this code:
Enumerable.Range(1, dr.FieldCount-1).ToDictionary(dr.GetName, dr.GetValue);
it returns dictionary from result of sqlite query.
dr.GetValue is of type object, I need to convert it to string, how?
 
10:48 PM
what do you mean convert to string?
oh , I get it , just dr.GetValue.ToString() probably
 
@ScottSelby That'd be great if C# had function composition
 
yea, you can tell how much effort I put into that help
 
3 effort units
 
it says: "dr.GetValue.ToString() is a method which is not valid in the given conext"
 
Yeah that's clearly not gonna work
 
10:56 PM
:\
there should be a way to do it, its c#
 
it'll work
you have to go and add it and tell it what to do with an extension method
 
what? how?
 
I have no clue what type of object it is , your probably going to have to specificy which property you want and how you want the string formatted
do you know how to write extension methods?
 
no
I just want to use the tostring method that each object in c# has...
 
well then, I would suggest now trying to turn the enumerable into a dictionary all in one line, just do it step by step putting the properities that you want as the key and value
 
11:01 PM
@Mr.Noob Just use a lambda
 
he doesn't know how to write an extension method , therefore even if you get a working lambda you probably won't be able to explain what it's doing. I would just go through and use an old-fashoned loop , which is going on anyways some where off in the code
 
will it be faster than creating new dictionary and converting there?
 
don't worry about that , unless this is like over 100k items , write code you understand and can maintain
and yes it will most likely be faster
 
ok I will try to find a way and if not I will make a copy of the dictionary
Thank you!
 

« first day (2324 days earlier)      last day (2617 days later) »