« first day (3114 days earlier)      last day (2059 days later) » 
01:00 - 14:0014:00 - 22:00

mr5
mr5
01:42
if (true == true) return true ? true == true : false;
02:32
@c0dem0nkey Me and mr5 works with Xamarin. Mine Xamarin.Android, mr5 is on Xamarin.Forms
02:57
@mr5 if (false == false) return false;
 
2 hours later…
04:33
@nyconing sup!
@nyconing, im trying to learn and now is coding xamarin.forms for ios
but having trouble implementing google maps. should it be mapkits for that?
and apis.
google apis
i know code is shared but for maps im not sure. hoping you could shed some light
 
2 hours later…
06:36
Oh, I cant help with Maps
ohayou
Did you target on beautiful, native-like and a consistent GUI with system? Then you need to go native. Choose Xamarin.Ios and Xamarin.Android, maintain two different GUI and share the foundation, architectures and behaviors behind the code.
Xamarin.Forms is awful on GUI, but it is good choice if your progress output performance on project is the top priority.
06:54
@c0dem0nkey Why not go netstnadard + Xamarin.iOS/Android?
@nyconing have you worked with react native? Can you compare it with xamarin?
07:09
@Proxy I havent worked with react native. maybe in future.
i see. okay
07:31
Friday!
07:45
when I am trying to beautify my xml it is parsing the html codes as well which I don't want, Any idea
?
@Shad context?
@Shad html codes aren't xml codes
so no, it should be treated as just plaintext
you mean like &?
yes
yeah, the xml parser doesn't care about that
when I format it
it changes to &
07:46
hmm, that's weird
i recall having had that same issue
@Shad just use one of the jetbrains ides
they will format nicely for you
np++ also has a nice xml plugin that can format
2
apparently I'm wrong about that
In SGML, HTML and XML documents, the logical constructs known as character data and attribute values consist of sequences of characters, in which each character can manifest directly (representing itself), or can be represented by a series of characters called a character reference, of which there are two types: a numeric character reference and a character entity reference. This article lists the character entity references that are valid in HTML and XML documents. A character entity reference refers to the content of a named entity. An entity declaration is created by using the <!ENTITY name...
some special character codes are shared between xml and html
if you need to do it programmatically, then you need to try each library until you find one that pleases you
though an xml beautifier shouldn't change the xml in that case
07:48
@Neil in Xml, the only characters that need to be escaped are & and < in node content
and & and " in attributes
and _ in names
though &apos; still has special meaning
it does?
according to the wiki it is, yeah
I think I've used apostrophes in xmls before and never had issues before though
<Parent>&#91;</Parent>
is getting changed to bracket
07:52
it's a bad beautifier then
it shouldn't alter the content
it technically doesnt
the content remains the same
XDocument.Load() does this as well
the notation is different
@Wietlol the output is supposed to be XML, not a parser interpretation of an xml..
it is xml
[ is a perfectly valid character
07:54
No, if it converts &lt; to <, then it invalidates your XML
but it doesnt convert &lt;
that one remains &lt;
It's still altering the content, which is undesirable
hmm
5 elements are not okay
[ ] are okay, right?
ye
but still, Neil is right
you might be better off with a different beautifier
hmm... found this
// todo remove this heresy
// ok, we can't
@Wietlol thanks will try! :)
07:59
we used to use the np++ formatter
but it has one downside
when you have an empty node: <node></node> it formatss as <node />
so I now prefer the IntelliJ formatters
the empty node thing became annoying when we used it to format html emails
and the title became <title />
and html is an idiot and claims that it is wrong
lol
there is this common pattern in which, the longer you use an application, the more you wish jetbrains provides you with an alternative
good meurning
most decent IDE's have a shortcut for formatting xml or code or whatever
for a one-time thing, usually just convenient to simply paste it in your IDE and format
thanks @Neil @Wietlol :')
I am breathing btw
08:12
I am breathing too
haha
@Wietlol eh to be fair, html isn't xml. So it isn't wrong to complain
it is wrong to complain
because <title /> is valid html
in terms of syntax
@Shad Good thing to know how to do
I highly recommend it :)
I had to look it up, as I thought self-closing was prohibited except for certain elements like <br />
More or less right
> Then, if the element is one of the void elements, or if the element is a foreign element, then there may be a single U+002F SOLIDUS character (/). This character has no effect on void elements, but on foreign elements it marks the start tag as self-closing.
<title> is neither void nor foreign
08:35
html is weird
yehup
09:03
how to read this
CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*)
@Shad it's not very clear is it
The text talks about character data being all the characters which are allowed. But the pattern looks like it represents all the characters that aren't allowed
good (ugt) morning
hmm
mr5
mr5
VS for Mac actually suggesting to me that I could convert this code:
if (e.NewElement != null)
{
    Control.AllowsSelection = false;
}
into this:
Control.AllowsSelection &= e.NewElement == null;
@c0dem0nkey use this GoogleMap for both platform instead: github.com/amay077/Xamarin.Forms.GoogleMaps
09:18
I love you all
@mr5 That's not even accurate
lol, dat binary and
@Neil how not?
It is accurate
well the fact that that wasn't clear to me should say something
yeah it took some thinking but I guess it's right
09:20
I don't mean that in an "I'm superior" kinda way.. I mean it wasn't clear to me at first
non-obvious enough though that it's a bad refactoring
Assign to false only if it isn't already false..
@Neil About you? Just kidding
@anand_v.singh Fair enough, I set myself up there :P
it swapped the != to ==
I think that caused most of the confusion
09:25
well why would you use &= unless the original value of Control.AllowsSelection were relevant
that's what confused me
it is relevant
It's not relevant, but it doesn't matter, so
for example, you cant refactor it to Control.AllowsSelection = e.NewElement == null;
It is relevant. You don't know what the value was before you entered the if statement
it's implicitly if(condition) { set it} else { leave it as whatever it was before }
in the context of not knowing what it was before, I see that
but the line immediately above could be Control.AllowsSelection = true
meaning you could simply assign it
09:34
considering it came up with &=, I think it should be able to refactor using the initial value as well :D
Control.AllowsSelection = if (e.NewElement == null == false)
	false;
else
	Control.AllowsSelection;
Control.AllowsSelection = if (e.NewElement == null)
	Control.AllowsSelection;
else
	false;
Control.AllowsSelection = e.NewElement == null & Control.AllowsSelection
Control.AllowsSelection = Control.AllowsSelection & e.NewElement == null
Control.AllowsSelection &= e.NewElement == null
makes sense
It's not smart enough to consider the starting value probably
though conceivably you could
actually... no
if you had a guarantee it was true to start, you could use that information
since the Control.AllowSelection is probably a property
mr5
mr5
@Neil indeed. Why would the IDE suggest converting to bit operations from a conditional operation
09:38
@mr5 Because that was the safe conversion that works for any previous value of Control.AllowsSelection
that's the context-less equivalent written in shorter form
mr5
mr5
I believe the guy who wrote the suggestion came from a hardcore C/C++ background
anyway, mr5 did you see the link I posted?
mr5
mr5
oh
wait. I haven't checked my previous notifications yet
ho
(dont expect any updates soon tho, im on vacation next week :D )
mr5
mr5
@Wietlol prepare your source code to get hacccckeed
yeah. I'll try to fiddle with it
09:44
why so?
mr5
mr5
maybe this weekends
nothing. I think compiler source codes are meant to be a secret
why so?
mr5
mr5
so you prevent people from knowing how to make a compilers
BS
not true at all
compiler source code is self-obfuscating
09:46
gcc is open-source, so is C#
no obfuscation required
@mr5 I fail to see the reason
its written by me anyway, none of you can read it
¯\_(ツ)_/¯
mr5
mr5
@Wietlol I kind of have the mentality of "some people might claim that they wrote compiler from scratch back when they're college" but they just forked the linux source code and made some few changes.
anyway, if you have suggestions on what to put there in the first place, im happy to take them
most of the time im like "I have no clue what I should write over here."
@mr5 isnt that how every college project works?
They do do that kind of project legitimately. Usually for a really dumb, simple language
09:51
so far, I think its not really interesting
the string interpolation part might also be a bit cryptic
mr5
mr5
I have personally witnessed someone claim they wrote compiler from scratch and after showing it to me it was just another linux fork. It's infuriating to hear
What does linux have to do with compilers?
isnt a spoon better than a fork?
@TomW Nah Even for QBASIC compiler I forked the code and added a few fancy shenanigans
if someone wrote a better compiler than you, you should try to use that better compiler
mr5
mr5
09:53
@TomW oh I mean gcc is part of the linux soo
@Wietlol spork is better
@Neil agree. I always browse those lexer source code just to get my mind blown
lexers are fun... until you write your own
I did :)
but I did it for the reason that the library I used before was the only JVM library
so my compiler can now run without the JVM
actually, the lexer was one of the easier ones
10:24
Anyone else using SO ask's page to upload images and get the URL? I think this is the fastest way to upload images for using online !
That's um...ingenious and evil
Hm. Couldn't you register your own domain as "Fast Image Uploader", redirect to StackOverflow image uploader, bang a few ads on it, boom push button receive money
all from infrastructure paid for by someone else
hope they don't see my message
@TomW I know many devs who had psycho problems with the ask page, it reminds them with their failure with SO
Just forked a WPF App, building it gives multiple errors similar to
Error CS0246 The type or namespace name 'MicroStep' could not be found (are you missing a using directive or an assembly reference)?

Did I miss a step, there are 3.5K such errors, the project contains multiple solutions, How do I add references to each file, or should this not happen if commits are good?
MicroStep is declared within one of the solutions
clean, build & restart VS
restart pc
restart life
have you tried turning yourself off and on again?
10:39
@mshwf Cleaning and building again only raise the error count to 4k
@Wietlol Someday..
@Wietlol if it's Xamarin I would agree strongly
if you could turn yourself off, would you ever do it?
considering that advantages include, not aging while you're "off", but you are still subject to being harmed
and someone would of course have to turn you on eventually
Oh NVM Just asked a senior Dev, he said an application called they built is required, the missing references come from there which requires .NET Framework 3.5, which requires Windows update to be enabled, which requires going to IT, and IT is already giving me a new laptop next week, So the DEV told to just read the code for now
@Neil I've finally moved to C#
10:44
I never thought I would be so happy to see our sales drop that fast
Guess wont be turning myself off today
and I'm kinda stuck
@JacobSchneider move back :)
jacob.GetUnstuck()
should I favor properties over getters?
if(aboutToBeStuck()) dont()
10:45
jacob.Unstuck
If I'm not mistaken, it was you who told me to move away from VB
hiss
shame on you Neil
Sorry, sorry, instinctive reaction
yes, C# is still better than VB
10:46
haha
true
I'm lovin it
why would you tell peeps to move away from le glorious VB?
but
I mean, yeah, I do love VB
@Wietlol I swear if on another day, someone came in here saying that I switched them from C# to VB, you'd be saying the exact opposite thing you're saying now
.NET Ugly Editionâ„¢
10:47
I would never call C# glorious
but VaseBook is on a different level
and VB is glorious? Surely you're being ironic
You're hilarious
no, I am Wietlol
jacob.Unstuck(){throw new InvalidOperationException();}
@nyconing foiled again!
10:49
if(me.bored()){
joinChat();
}
looks at logs
> System.Data.Entity.Validation.DbEntityValidationException: Validation failed for one or more entities. See 'EntityValidationErrors' property for more details.
F U EF
WTF EF FML
:D
I'm developing a asp.net app and i'm mostly done with data and background stuff, but i'd like to implement complex sorting and filtering. Is there something i can use besides Linq? (linq is a bit risky since it would be parsed from user input)
or is there a way to sanitize a where clause?
@SebastianL well if we're just talking about sorting and filtering, what is the worst thing that could happen?
honest question. assuming they place a valid request/filter, worst case scenario is they filter nothing and get all the data, right?
that's not so bad, is it?
if linq is parsed from a string couldn't you forge the query to reveal server stuff?
11:01
If the worst that happens is they enter some garbage and they get back an error along the lines of "can't parse expression" - well, don't do that?
what "server stuff"?
Well I wouldn't just parse any old user string, no
yeah, but i have no idea what should be the restrictions in parsing
how complex are we talking here?
you need to do joins and such?
nah no joins
or are you just specifying filters for specific columns?
because if that's the case, you could make a simplistic meta language where they could type like column is "value" or column starts with "value" etc.
11:04
You could look at building expression trees
Then you could only represent LINQ which actually gives you real data
@Neil i thought about that too, but if there is a simpler solution i'd try something new :)
@TomW sounds worth a try
11:17
What do you use for UML diagrams?
Just ofund PlantUML for VSCode. Can do wsd, pu, puml, iuml, plantuml. Not ure which one to use.
i use visual paradigm for UML but that was just the first thing i found when i googled for UML programs
at least it looks "proessional" ^^
11:36
Not for free, I need something for commercial usage
Can't figure out PlantUML
11:56
F U EF
"" != null
JS: That's where you're wrong kiddo
EF = C#
.NET rather...
How would I use resources located in the resources folder of my VS solution?
12:19
If I have a Dictionary<string, int> x and put string[] keys = x.Keys.ToArray() next to int[] values = x.Values.ToArray(), does item #1 in keys match item #1 in values?
basically, do .Keys and .Values maintain the same order?
they probably will
but it is safer to unzip the paired collection
@JacobSchneider can you be more specific? Resources usually go under a project, as far as I know
Are you talking about .resx files?
it's one of those things that works with a fair amount of boilerplate by default unfortunately
No it'd be a zip file
OK, I think you'll need to be more specific. What's in it and what do you want to do with it. Any reason for using the word "resources" other than the folder being called that? Resources usually means something quite specific in C#
12:37
@Wietlol how do I unzip a dictionary? my version of LINQ does not seem to support it
sad version of LINQ
@Henri you can cast it to IEnumerable<KeyValuePair<TKey, TValue>>
Does that help?
hi @TomW a bit yes. But I'd like 2 arrays with the keys and values separate. in the same order
o/
fat finger Friday with the Enter key
12:43
this appears to help
MoreLinq might also have an Unzip somewhere
@Wietlol this looks nice!
You could also .ToArray() and then do Select(kv=>kv.Key) and Select(kv=>kv.Value)
1 sec, might not need ToArray
OK cool it's ICollection<KeyValuePair<TKey, TValue>> so it ** should** return in constant order
should
@Wietlol @TomW this
I have a Dictionary with settings and can't afford to set the color of something to 2.0, or a Name to Red
Well if you index it by its name like dictionaries are intended for that won't be a problem, will it?
12:53
Correct. But the method I need to send them to wants 2 arrays: keys and values
And no this is not a method under my control ;)
ugh
then I would recommend the Unzip
@Wietlol I will use it, but my mom told me never to copy paste code from strangers into my codebase so I'm still trying to find out how this works exactly.
never knew you could return 2 values by surrounding them with parentheses
two schools of thought on that
I honestly think returning multiple values is awesome
I wish Java could do that
that's TupleValue
13:03
@Neil my language is also awesome :D
@Henri what it does is it returns 2 enumerables that load their data from the source
when one loads the data (for example, the key) from the source, the other caches its own data (for example, the value) in a list
should prolly be a queue tho
oh no, wait, should be a list
if you enumerate from it multiple times, it will load it again from the cached list
this makes the unzipping lazy
haskell
waits
Getting ready to welcome Frendall, Cap'n O7
13:20
@Wietlol I understand. What does a yield return do though?
its actually weird return
too difficult to explain
I did some Ruby programming back in the day, it had something similar
you can define an IEnumerable 2 ways. One is just define it like a normal class. Like Enumerable.Repeat(...), the other way is start an iteration, where every item is returned with yield return
yield break or end of function indicate end of enumeration
There aren't a lot of situations where it's useful. Sometimes if you have an algorithm that you don't know the logical path of in advance that returns results
Can be useful for that
13:35
class User
{
	value username: String
	value emailAddress: String
	value password: Password
	value friends: Integer
		get() = 0
}
hmm... someone is positive
yield return is nice if you want to process the returned value before the called method is able to return the entire list of object, e.g. if it's calling an external service. It lets you lower the memory footprint of your application as you don't need to have tho entire list of objects in memory.
all kind of Streams.
endless processes
I love it already
it's very useful IMHO
It's very underused.
13:41
IEnumerable<short> GetNextDigitOfPi()
IEnumerable<Short> GetAllDigitsOfPi()
Most would create a List<int> with n numbers and return it.... :c
yes
01:00 - 14:0014:00 - 22:00

« first day (3114 days earlier)      last day (2059 days later) »