« first day (2749 days earlier)      last day (2204 days later) » 

5:49 AM
goooood morning :)
 
mooooorning sharperinos :D
 
6:04 AM
why?
 
morning remains undefined until coffee is inserted into person ._.
 
thats an Explanation i full agree on :P
 
coffee being absorbed as we speak
will let you know if result for morning analysis is good or otherwise shortly
 
6:27 AM
mehh Visual Studio is consuming Hotkeys...
 
Hey guys whats wrong with
ALTER TABLE MYTABLE ADD MYCOLUMN integer DEFAULT 0 NOT NULL
when using oracle?
 
MYCOLUMN = 'NOPE' could be a problem
 
@Squirrelkiller ADD COLUMN MYCOLUMN
if I'm not mistaken
 
will try
Good news everyone
I just got a coffee
bad news, that statement actually worked in oracle
fucking oracle
 
6:49 AM
yo
 
@Squirrelkiller "when using oracle" is the issue.
 
It is indeed. Unfortunately, some companies want our product that use oracle :(
 
7:04 AM
how can I overwrite a production setting on ubuntu
msdn said i should export the settings with __ (two underscores) but don't get it.
 
@Squirrelkiller You have my pity
Also pity me as well, as I, too, am obliged to be using Oracle
 
I don't actually mind Oracle that much. It's clunky and requires work to get it running, but it works, after that.
I wrote an answer on SoftwareEngineering.SE a while back recommending Oracle as a good DB if you want a system to keep on running 10, 20 years on. Got, like, 50 outraged comments from Oracle bashers.
 
@AvnerShahar-Kashtan Same could be said about any technology/design choice really
Figure there are people who still use spaces to indent their code.. pff
 
@Neil Nah, some are the opposite. Ruby on Rails, for instance, was very easy to set up and get up and running. Everyone was all "This is the future, all app development is easy, none of this Java enterprise crap!".
Then they realized that maintainability is still crap, regardless of platform, and things didn't always scale well on a new, untested framework.
 
There are those which strongly dislike ruby on rails
I don't particularly care either way, personally
But you're right, there are certainly trends
in 10 years time, ruby on rails might go the way of the groovy
 
7:15 AM
@Neil It pretty much already has, I think.
 
Morning.
 
cobol used to be considered the language of the future at a certain point, food for thought
 
@Avner I eventually found the Unity container issue, it wasn't injecting dependencies because the mappers weren't correct according to the DB
 
You don't hear about many new high-profile projects on RoR. Though, like Cobol, it will still be in use for a good few years.
@HéctorÁlvarez I have absolutely no idea what mappers or the DB have to do with it. :)
 
And that happened due to someone uploading broken scripts, which broke the migration, which almost broke my neck.
 
7:17 AM
I usually just register my dependencies during app launch.
 
@AvnerShahar-Kashtan In a way, I suppose it is the language of the future :P
Like Java, and C before it
We can't really seem to get rid of them
 
@AvnerShahar-Kashtan Me neither, but I was suggested that by the old gods guy who made this, and it worked.
Oh right, come to think of it I also tinkered with the unity configuration. I did register a few more namespaces before it came to life.
 
@HéctorÁlvarez No, I honestly have no idea what the DB has to do with it.
 
Anyway, do you know if there are any kind of logs that tell me why something isn't working? Something that isn't the output window?
Because I haven't found any, it really gets tiring to juggle around until something sparks.
 
What sort of problems? Usually it's simple - if you can't resolve a dependency, you get an exception.
 
7:21 AM
@HéctorÁlvarez does unity not have a log4c library or something?
 
Why is Console.WriteLine so fckin slow?
 
@AvnerShahar-Kashtan But I get the exception when the dependency is used, which doesn't tell me much about why it's not working.
@Neil We have a custom logger integration, but it doesn't catch any Unity-related problems.
 
You get the exception when the dependency is resolved, yes, because there's only a problem then. You can't get an error that service X wasn't registered if no-one tried to resolve service X, because, well, you can't warn when something no-one stated to require hasn't happened.
 
Anyway, I think the problem here is my lack of understanding, as usual. It will probably come together when I've spent a few more hours tweaking stuff.
@AvnerShahar-Kashtan I mean, what if I need to resolve a dependency and there's nothing registered for it? It returns null instead of an exception.
It would be awesome to get UnityDependencyNotRegisteredException: We couldn't find anything registered here, are you sure you registered it?
 
@HéctorÁlvarez It shouldn't. Autofac, for instance, has Resolve (which throws) and ResolveOptional (which returns null).
 
7:27 AM
This reminds me of a joke : Some tourists visit the great pyramids in Giza. The guide tells them that the pyramids are 4504.5 years old. Tourists are impressed by this precision, and ask the guide how it was calculated : "That's very simple, I've been working for 4 and a half years here, and the pyramids were 4500 years old when I started". — Eric Duminil 2 days ago
 
But I wouldn't be surprised if Unity is stupid that way. It's stupid in other ways as well.
 
@Seb wait, how long does cw take?
 
@Squirrelkiller about 5ms for a single call, and it gets exponentially worse when calling often
because it uses synchronized streams
so that it can be threadsafe
 
Anyone using UWP to handle deep linking/app linking?
 
You mean like...a link being opened by the app when clicked?
 
7:31 AM
Yeah. There's a lot of built-in faciltiies for that, but our requirement is a bit weird.
 
It makes sense, I'll that into account the next time.
 
No idea :D
 
Our UWP app is hosting a control that shows a PDF document. There are clickable links in that document, which we want to catch and raise events for. But the problem is that they're links, so even if we catch the OnLinkClicked event, it also goes to the Windows shell and tries to launch the protocol handler for the link (the browser, for http links).
 
Can't you simply set the event.Handled property to true, and then tell it to stop propagating?
 
@HéctorÁlvarez Not that we've found, because the event goes in parallel - to the control host and directly to Windows.
We might try to have the links point to acustom URL scheme, and add a dummy handler for them.
 
7:34 AM
you sure about that? It's done badly if that's the case
 
Or event.cancel or something
 
That's what our initial experiments show.
 
you could try making the thread sleep during the event and see if the pdf loading is delayed
 
Hmmm, weird. I've seen instances (not UWP) where you can even intercept CTRL+ALT+DEL
Can you wrap the link into a button?
 
It's part of the PDF.
We're using a 3rd-party control to show the PDF, but we don't have much control over how it's rendered.
 
7:37 AM
Whoopsie... maybe it's the tool you're using to visualize the PDF?
Yes, that might be the problem, maybe that tool is forcefully sending the event because they wanted to, for some reason.
 
there are ways of transforming pdfs
if needbe
 
Maybe you could try whatever open-source PDF reader, try to mirror that behavior and see if you can force the event to stop propagating.
 
No, no. We really don't want to go there. It's been a long enough process to get it to this point. They were PNGs first, then SVGs, now PDFs. We get them from a different department and they contain sensitive information so we can only use what we get from them.
 
sounds less than ideal..
 
Yes, well.
 
7:41 AM
If you needed control over it, probably a web page would have been best
 
We've been waiting for this data for a couple of months now.
There are many ways I would have modeled it if I could have had control over it.
But right now we're trying to find the least-terrible way to work with their data in the timeframe we have.
 
Ah the least-terrible method. I know that feel.
 
I bet anything I could come up with, you'd have already went over 10 times, but a wild guess... Given you have a set tool, with a set way of doing it already, maybe your next least-terrible way could be blocking the underlying call from code?
I mean, instead of stopping propagation you could simply redirect somewhere else, which would look transparent to the user but you'd have control over there.
 
I'm going to start messing with it soon to see if there's any built-in way in the control to limit it. Once I've exhausted that, I'll see what to do.
My original thought was simply to catch the URL event and send it to my app, to propagate as an event. That's the standard UWP approach to app-linking.
But I simply don't need it if the links always come from within my own app (which they do)
(for now)
 
Reminds me about the time my boss asked me how to copy the text from a screenshot in an e-mail. He was shocked to learn you couldn't without using some image-to-text converter
 
7:47 AM
It wasn't until recently that most non-commercial PDF readers wouldn't let you copy-paste their content either.
 
Heh. This comic was posted about 4 years ago. Give it the one more year she asked for, and Google will have a simple, reliable open library that can recognize if a photo is of a bird. :)
 
You have to translate, sorry
proxy server at work doesn't like images :P
 
Oh, right.
> [Ponytail sitting at a computer with Cueball standing behind her.]
Cueball: When a user takes a photo, the app should check whether they're in a national park...
Ponytail: Sure, easy GIS lookup. Gimme a few hours.
Cueball: ...and check whether the photo is of a bird.
Ponytail: I'll need a research team and five years.
In CS, it can be hard to explain the difference between the easy and the virtually impossible.
 
is there a caprica command for this, like !!rehost ?
or something
would be useful
 
Conveniently, there are transcripts available for all xkcd comics.
 
7:54 AM
@AvnerShahar-Kashtan Oh yeah, I recall that xkcd strip XD
I don't even think a layman could understand that joke
they'd just scratch their head
 
Hey guys, there's a dll that I'm dynamically loading and trying to execute a method -- I get MethodNotFound exception.
If I add that project's reference and run the startup project I am able to execute the thing.
 
Ok, it seems there's a JQuery oneliner that can extract the transcript for an xkcd strip by ID. Now I'll have to see how to get Caprica to fetch the page and extract it.
 
@TusharTyagi you need to Invoke the method with reflections
 
How are you loading it? Assembly.Load? Assembly.LoadFrom? How are you referencing the class and the method?
 
@AvnerShahar-Kashtan Assembly.Load which is executed by AssemblyResolve event handler
So there are 2 dependent dlls, I've verified that both are loaded
The method which is not found is a constructor for one of the classes in the dependent dll
 
8:06 AM
And when you reference it regularly, you simply call new on that class?
You'll have to show the code in the AssemblyResolve handler.
 
No, Activator.CreateInstance in both the instances
both the cases*
Here's the code
So it's loading the assemblies of both the dependent dlls, hitting the breakpoint fine and everything
@AvnerShahar-Kashtan It's a parameterized constructor, if that changes anything
 
@TusharTyagi Where's the actual activation code?
 
It's in a separate project
Constructor is simple:
public Constructor(IConfigurationRoot configuration)
{
_configuration = configuration;
_endpoint = Namespace.GetEndpointFromString(_configuration["Storage:endpoint"];
_client = new Client(
_configuration["USER"],
_configuration["SECRET"],
_endpoint
);
}
All three keys are available in configuration
@AvnerShahar-Kashtan Updated the gist with the activation code as well
 
8:23 AM
@AvnerShahar-Kashtan I didn't know they had names.
 
Not necessarily official names.
 
@TusharTyagi, Do you have control over the other assemblies? From the look of this, you might benefit from something like the Managed Extensibility Framework. But it does mean decorating some classes with attributes. MEF can handle loading external assemblies and find types based on various conditions like type or meta data.
 
Am I the only one that has enough Chrome tabs opened to form a serrated edge?
 
8:38 AM
All developers do that in my experience.
I feel like the unique one.
 
I also close down my computer when I leave the office.
 
I keep my tabs around 8.
 
I like a clean slate.
 
I have 25+ tabs at most times and never shut down my laptop, it always goes to sleep.
 
8:41 AM
Nothing like a interpolated verbatim string.
Let's hope they don't keep adding modifiers. :P
 
Not because I don't want to close stuff, neither because I don't want to update, but because we use Skype Enterprise and message logs are lost when Skype ends, which usually contain important information I don't want to miss.
@WilliamMariager I have a shit ton of those, I use that a lot.
Mainly for SQL when we don't have ORMs.
 
It's easy to see why Discord is quickly becoming used in the industry if Skype can't even manage to store a message log. :P
Slack is falling behind since it offers nothing Discord can't do while also costing money.
 
😃 skype become the worst in a blink of an eye. Constantly getting worse
 
I recently was at a place that used Cisco Spark. Never heard of it before.
 
@WilliamMariager should newer languages have only one way of doing strings?
 
8:44 AM
@HéctorÁlvarez Skype for Business?
If you're using Exchange/Office365, it should keep the logs in your inbox.
 
@Wietlol It was just a joke. Imagine how it's going to look with 5 modifiers. :P
 
@WilliamMariager the verbatim modifier isn't strictly needed there, is it?
 
i am not joking, should every string be a template string by default or is there a better approach (for a new language)?
 
Not since I'm using forward slashes.
 
@AvnerShahar-Kashtan There's a company policy that disables history saving.
@WilliamMariager I've suggested RocketChat, but nobody listens here. People grew fond of it for some reason and nobody wants to change.
It's crashed my PC so many times I don't even care any more.
 
8:49 AM
@Wietlol Template strings would be a nice default feature in my opinion.
 
at least C# is an improvement over JS
in JS, you need different quotes
 
@Wietlol They do that automatically in groovy
 
kotlin as well
i cant remember if scala does that
 
@HéctorÁlvarez That seems like they're being purposefully destructive to productivity.
 
@AvnerShahar-Kashtan Do you want a screenshot of our sourcesafe repo?
Or the SVN distribution with 6 different trunks for the same project?
 
8:52 AM
@HéctorÁlvarez I do not wish to see a sourcesafe repo ever again.
 
@WilliamMariager i am currently having a lot of those design decisions that I am literally having issues with choosing what would be good
most of them are even stupid to think about in the first place
for example, a top-level member can be a function, a function inside a type however is actually a method, should I give them separate keywords?
 
mooornin'
 
That's the advantage of making a new language. You can take the good ideas, avoid the bad and you don't have to worry about backwards compatibility.
 
ikr
 
@WilliamMariager You only have to deal with the several million programmers that are upset you didn't add their favorite feature into your new language
 
8:55 AM
until I make a v1, then suddenly backwards compatibility kicks in place
however, I think there is a fairly easy way of solving that
if you change a version of the language, you should tell the compiler to compile with the old version and decompile with the new version
that would make it be able to work around all issues that would arise from backwards compatibility reasons
 
@Wietlol That's how Java does it
 
it does?
i never noticed
 
yep
well, I doubt if they "decompile"
 
but iirc, Java designers are also afraid of backwards compatibility issues
"decompile" might be a bit exaggerated
more like, "generate the code"
 
but they probably have a class dedicated towards the nuances of the newer version with the possibility to use the older version parsers too
 
8:58 AM
the only real forwards compatibility thing should be the runtime environment
if you mess that up, you done
 
if your starting language is flexible enough, you could redesign language behavior by doing little more than changing the standard library
 
Being flexible isn't always a good trait.
Just look at macros in C/C++.
 
True, but the opposite isn't good either
It's a tradeoff between future growth and good compiler checking
 
I havent used C++ that often
never used macros
 
Macros were an easy trap to fall in
 
9:05 AM
iDunno if marcos are just badly designed or if flexible is really the issue
 
You needed to use them to write a platform-specific build, and from there, it was easy to expand on that
 
platform-independent you mean?
 
I wouldn't say that. You'd have to create precompiler definitions to compile for a specific platform
like if WINDOWS were defined, it means the target system was windows
 
111
A: Why are preprocessor macros evil and what are the alternatives?

Mats PeterssonMacros are just like any other tool - a hammer used in a murder is not evil because it's a hammer. It is evil in the way the person uses it in that way. If you want to hammer in nails, a hammer is a perfect tool. There are a few aspects to macros that make them "bad" (I'll expand on each later,...

 
@WilliamMariager Thanks @WilliamMariager, will check that out as well.
Although I don't have controls over those dependencies, those are nuget packages for accessing some 3rd party functionalities
 
9:11 AM
@WilliamMariager i guess that counts the same for everything
"It is evil in the way the person uses it in that way."
 
Yeah of course.
But macros lend themselves to a lot of the evils.
If I recall correct the C preprocessor is even turing complete. :P There's very few limits to what you can do with a macro and make it do at compile time.
 
have you ever heard of a "ThisType" ?
(outside vJASS)
 
Is there any reason why you would allow macros or gotos in a new language?
 
gotos? no
macros, iDunno
 
I mean they give you more flexibility, but that flexibility encourages bad code
 
9:15 AM
gotos might work as long as they are only ever allowed to jump between places in their own function though
if you jump between functions, then you created a monster
but on the other hand, I have never had the need of goto
and I program... A LOT
 
it's hard to quantify how much a particular feature is damaging and how much it is useful, although gotos are almost universally considered to be bad
I'm not sure why that is
I mean I'm not sure I understand the metric which highlights why a particular feature is bad, not specifically gotos
 
there was a programming principle about it
single entry single return or something like that
> Single Entry, Single Exit
@Neil in simple terms, a function should only start at the beginning and only return to the caller
 
But that isn't even true in some cases
 
if you can start a function half way through (using goto), you basically are asking for problems
 
Take an asynchronous call for instance..
 
9:19 AM
async calls work the same
they start at the top of the function and return to the caller
async calls are just syntax sugar for threads imho
 
Hmm, the result from the call isn't returned to you immediately
 
and not that great actually
not immediately, it has a thread.Join() half way through
 
I mean technically yes, there is a return, but not perhaps the one returned from the async call
 
iirc, it is placed by the await keyword
async stuff makes it harder to understand, but in the end it all works the same
 
@Neil, In C# there's always a return. Either it's a Task<T> which you can process further, or you can use await and get the T instead.
So it doesn't violate it as far as I know.
 
9:23 AM
@WilliamMariager Yes but awaiting for an async result isn't ideal
So not waiting for the result is akin to calling a function and returning in a different spot
I guess my point was that if not returning to the caller was the issue with goto, then we've managed to create a goto of another sort
 
its called a "Thread"
it gives you processing of multiple things at "the same time"
 
yes, thanks. I'm aware of what a thread is
 
not waiting for the result is not really violating the single exit principle
 
9:37 AM
@Wietlol Sounds like Aristotle.
 
why so?
do I sound like a greek?
 
@Wietlol, You mentioned C#8 will get default interface methods. What's your source on that? All I've been able to find is a highly downvoted suggestion on GitHub.
I was trying to read up, prepare for the inevitable. But I can't tell if it's actually coming.
 
It is :(
 
Then it would just basically be a class wouldn't it? What's the point
 
@Butler1233 not entirely, but yea, interfaces will soon be equal to abstract classes
 
9:43 AM
That's dumb
 
@WilliamMariager Im not sure about actual MS sources, but since everyone says its coming, I suppose its coming
 
I like interfaces without default methods because then you have to implement them, and therefore implement them properly and then cant complain that "hurr durr my interface's methods are being weird"
 
@Butler1233 that is because you see interfaces for one, and only one specific thing
 
@Wietlol Looks like it's coming from a conference talk.
 
the issue that has always been here is more subtle
i think that the root of the issue came from stopping with MI
they split up stuff into classes and interfaces to solve the issues MI had, but they didnt split it up properly enough
imho, there are no real problems with MI, just that people can use it wrongly
my language design has MI because I only have interfaces
but each non-abstract interface that you instantiate in your code, will get its own class
so, implicitly, I create a class for each interface (that has only virtual methods and properties with a default initializer)
but, in the source code, there are only interfaces
it still feels weird writing code like that after having a strict interface-coupled policy in other Class based OO languages
@WilliamMariager I wonder when they will support all visibility modifiers on interface members
or even static members
or default initializers on properties
 
9:50 AM
Visibility modifiers on interfaces seem pointless.
Less so if they add these changes.
 
not any more
now, you have concrete methods in interfaces, now you also need other visibility modifiers
public interface Stuff
{
	protected abstract IList<Foo> GetFoos();

	public Foo GetFooAt(int index)
	{
		return GetFoos()[index];
	}
}
simple example, not really useful, but simple enough to have it
encapsulation OP!
Java now has private methods as well
 
like defaults in java
 
because, if you have concrete methods with 100000000 lines of code, you really start smelling stuff
Java still doesnt have protected methods though
im wondering what is keeping them up
 
well they do have "protected" methods
just not the protected of C#
 
but not protected abstract methods in interfaces
protected in Jaba == protected in C-harp
package-private in Java != internal in C#
 
9:54 AM
protected classes in java can be accessed by other classes in the same package
 
protected classes?
0.o?
that makes no sense whatsoever
only if they are nested ofcourse
protected top-level members are bullshit
 
if a class is protected, it can only be accessed by another class in the same package
 
@Neil and you know it!
 
it typically isn't done though
 
that is package-private
protected is not allowed on top level types
protected nested classes are accessible by their enclosing type and the subtypes of the enclosing type
@Neil dont try to be smarter than me when it comes to Jaba
 
9:57 AM
@Wietlol fine, in exchange, you can do me the favor of not being so condescending
 
> System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
@Neil sorry, there seems to be an error
 

« first day (2749 days earlier)      last day (2204 days later) »