« first day (1715 days earlier)      last day (1465 days later) » 

9:00 PM
IKR?
 
Forget sleepwalking. Let's sleeprun.
 
I'd comment it again, but my caps lock would need a caps lock.
 
another edit
 
Is there a Russian version of MS Docs?
 
9:16 PM
should be - ru-ru, I'd think.
but take in consideration that a large majority of those are machine translated, so....
 
Это содержимое недоступно на вашем языке. Вот версия на английском языке.
> This content is not available in your language. Here is the English version
 
for all i know it might be a very dirty limerick in Russian about a sailor and a gal with a illegitimate baby.
or not that.
 
I really hate the German ones.
 
That bad?
 
They tend to translate keywords and class names, too.
 
9:18 PM
that's.... useless.
 
@this Hmm... closest I could find was this:
Прицепился к милой девушке из Брайтона.
        Но корабли сели на мель,
        И моряки утонули,
Потому что она не будет заниматься сексом при свете.
 
-2
Q: how can I fix this code?

M.karadenizcustomerRowcount= datatable.GetSheet(3).GetRowCount dataRowCount= datatable.GetSheet(4).GetRowCount msgbox customerRowcount msgbox dataRowCount While customerRowcount> 0 '' msgbox customer1=datatable.Value(1,3) print username=datatable.Value(5,3) print password= datatable.Value(6,3) ...

 
@Comintern lol. I don't know Russian so can't say if that actually works for the limerick's requirements but if it did that's impressive.
 
It's missing the illegitimate baby, sadly.
 
@M.Doerner It simply easier to read the documentation in English?
A :derp: kind of question considering you already speak/type English better than myself.
 
9:27 PM
@IvenBach FWIW, from what I've talked with those outside the murica, they find it easier to read English -- far too much documentation and the third party sources (e.g. SO, forums, blogs, etc.) are in English, so it would be impossible to not read English in programming.
 
I inferred that was the case.
Same way latin/greek are the basis for scientific naming conventions.
 
@Comintern WT*, not safe for work.
 
wow excel worksheet blows for data entry.
 
Not in English.
 
Why is german de-de for the language code? Where did de come from?
 
9:31 PM
Deutschland is how they call their country, AIUI.
and Deutsch is the people / language (?)
For same reasons, we use es => español. fr is a exception in that both English and French have the same starting letters (French => Francais)
 
@this Kind of both. Wiktionary puts it best I think: "pertaining to the German people".
 
I derped hard on that.
#DerpFastDerpOften
 
Although by that logic, Russian should be ру-ру and Chinese should be 中文-中文
 
oh wow. I did not realize that.
I suppose with the chinese that's impractical.
since I think code has to be in the latin alphabet
 
Why, that's the entire word "Chinese".
That's incredibly practical.
Yeah, ISO is a western body.
 
9:38 PM
中文 (Zhōngwén) zh
 
So that's why. #TIL
 
so with chinese, they do use the latinized pronounication
Russian русский ru
Go figure.
unless the py sounds like ru in English pronounication, maybe?
 
More likely it was standardized during the Soviet era and they simply didn't cooperate in expressing a preference.
 
Google says it's pronounced russkiy
 
Yep.
 
9:42 PM
 
The "u" is a bit longer though.
 
so it is consistent.
 
I've forgotten an embarrassing amount of my Russian. It's been like 25 years.
 
The truth comes out!
 
That he was a soviet expat? I thought everyone knew that.
 
9:44 PM
Wait wut??
 
:whistles innocently:
 
BTW - if you want to really trip them up, try Turkish sometimes.
 
@Comintern what am I missing that the rest of the pond knows.
 
A joke?
 
That TV show the Americans? Documentary of my life. I used to be a travel agent too.
 
9:47 PM
ok, excel guys - i just want to double check I'm not missing something very simple. I need to help control the data input on a worksheet for a bunch of people who want to use Excel as a data entry form because #reasons.
Am I correct in understanding that the Excel table has no way to provide default value?
 
Not that I'm aware of. Can you use VBA to do so?
 
i saw suggestions about using formulas but I don't think that works if they don't actually enter stuff.
 
="the default"
 
because the default is for current month. That'd change next month
 
=FormulaThatReturnsTheDefault
 
9:49 PM
and no VBA. They get heart attacks when they see that yellow bang on the file => VIRUS!!!!
 
Was is Spolskly that said that what all users ultimately want you implement is Excel?
 
I can believe it if he said that. Yeah.
 
The swiss army knife of applications can't be wrong!
 
No it can't be. However, it's used by wrongiest kind of people --- the users!
 
9:52 PM
Are we talking about a query table?
 
no literally a data entry form. only in the spreadsheet.
they want to have rows for users to bang away at, and it need to conform to some format/validations
I can do validations, fine but the format / default values .... not seeing it without VBA.
 
Yeah, I'm not seeing it either - it's not what Excel is for.
 
Good, I wasn't missing something.
 
What about digitally signing the project?
 
does that remove the yellow icon on the file?
I thought that was a thing you get w/ the xlsm
 
9:56 PM
It can, depending on the macro security setting. If the cert is in the user's trusted store, it shouldn't display the security dialog.
Doesn't Access do that too?
 
no, there's no such icon affixed to the file
the check is always done at the startup, and you must Enable Content
 
Pretty sure that if the project is signed with a trusted cert, it doesn't banner it.
 
I would say that to trust an Access file w/ VBA takes much less hassle compared to trusting an Excel file w/ VBA.
 
You could use selfcert and test it.
Access databases aren't meant to be distributed.
 
Yeah that may work but meh. once they click the Enable Content, it's usually a one time thing and never happens again.
ah, remember there are also Access applications
 
10:00 PM
Still? I thought they got rid of those in like 2003.
 
if they're using an Access backend, they'll have the database in the network folder or whatever, and distribute another Access file containing the forms/reports/code for users to use.
(or in our cases, usually just Access files w/ forms/reports/code that connects to a SQL Server database)
 
What am I thinking of then?
 
I'm not sure. ADPs, maybe?
 
@this Deutsch is the language and deutsch the adjective. The people is Deutsche, which is the plural of Deutsche(female) or Deutscher(male).
 
but that went away in 2007, I think.
 
10:02 PM
@this Yep, that's the one.
 
@M.Doerner Thank you!
 
Yes, TBF they screwed the pooch badly there with ADP.
 
So, you nailed two out of three and the third one was very close.
 
Note that I edited, though so I did not get it right on the first & second try.
I think Comintern will like this
 
10:12 PM
That was good.
 
Is there any particular reason why the RenameRefactoring works off the active selection when it is called with a target declaration that does not have a selection?
 
isn't it supposed to support non-code entities like userform (and its controls) or project?
 
That was my understanding.
 
But why fall back to the active selection after passsing an explicit declaration?
 
Yeah, that part doesn't make much sense.
I'm trying to think of a reason it would do that and it's not coming to me.
 
10:29 PM
when in doubt, blame me. it's statistically sound.
(it's not coming to me either)
notices Hosch subtly walking out ;-)
 
That's the fun thing about hacks. Day #1: Wow, what a clever hack! Day#1001: WTF?
 
the design with a parameterless and a parameterized overload was flawed in the first place
the API was basically made to result in inconsistent implementations, looking back
> Hindsight is always 20/20
I need to stop thinking "{someone} fucked up" whenever something looks weird somewhere. What matters is that the code gets better with time :)
 
@MathieuGuindon I like that idea.
After all, we were working under constraints, didn't know all the factors, etc. etc.
 
I premarily asked, because it is the only refactoring with a presenter that does it that way.
All the others just call the overload taking a selection.
 
Didn't the original implementation have a selection recovery logic?
Could that be why?
 
10:41 PM
Might be, might not be.
 
welp, that's interesting.
Public Sub test()
    Dim foo As Class1
    Dim bar As Class1

    Set bar = New Class1
    SetItup foo, bar

    Debug.Print foo Is Nothing
    Debug.Print foo Is bar
End Sub

Private Sub SetItup(ByVal LHS As Class1, ByVal RHS As Class1)
    Set LHS = RHS
End Sub
SetItUp fails to sets it up.
hmm. removing the ByVal, that works.
 
What do you mean with fails?
Does it raise an error?
Or do you get True, False as result.
The latter would be the expected behaviour.
 
I get True,False
the MCVE is not good one - I get the same result even with ByRef in my original, I tried the ByVal next and had the same problem
 
What did you expect after passing a copy of the reference?
 
10:52 PM
OK, with ByRef it should work.
 
yeah, ByRef failed and I still get Nothing, so I tried ByVal next, and that did not work. Then I made the bad MVCE above but that shows that ByRef does work
trying to find a better MCVE
 
In your original case, did you assign to a property?
 
the LHS was a WithEvents variable, the RHS was a property from an interface
 
And the property on the RHS did not return Nothing for some reason, right?
 
Correct. i checked that
the LHS is Nothing, though
 
10:59 PM
Just checking
 
I was refactoring the code to be more dry and wrote the sub to do the setup code for a bunch of controls
original code looks like this:
Private Sub ConfigureButton(SourceButton As Access.CommandButton, ViewportTargetButton As Access.CommandButton)
    'Required to allow releasing of the button during its click event
    If Not SourceButton Is Nothing Then
        Set SourceButton = Nothing
    End If

    Set SourceButton = ViewportTargetButton

    Const Evented As String = "[Event Procedure]"
    SourceButton.OnClick = Evented
End Sub
and one of the calling code is: ConfigureButton NextButton, This.Viewport.NextButton
the sub will run without errors but once it returns the NextButton is still Nothing, even though the SourceButton was assigned at the end of the sub.
 
11:13 PM
Isn't that expected though? The code in the If statement is completely superfluous.
 
Nope it's not.
 
Brothers of the VBA cause!
2
Salutations!
 
Hi, Jelly!
 
I have a $5 dollar question.
 
@this Why's that? When you Set SourceButton = ViewportTargetButton, it should release the reference that it held previously due to the reassignment.
 
11:15 PM
@Comintern interested winning a starbucks?
 
Mmmmm... burned coffee.
 
haha./`
 
Anyway, the case is that if you've clicked on the next button, the click event of the next button will be the root of the VBA call stack. Trying to assign the button variable to a different button, you get an error. Setting it to Nothing avoids that problem.
 
Thats what Starbucks is for real...
 
IKR?
@this Is it inside a handler?
@Jelly What's the question?
 
11:17 PM
@Jelly Wait, I'm confused. They sell coffee? I sworn they sell liquid sugar
 
Has anyone been able to find a way to probe if a com object is valid or not (without wrapping the object is a try catch for com exceptions)?
 
@Comintern it's called by the click handler, yes.
 
@this OK, I missed that part.
 
define "valid"
 
@this liquid sugar burned coffee. It's all crap. but let's face it we all drink it lol
 
11:17 PM
not me.
 
@Jelly AFAIK, that's generally considered impossible.
 
I don't drink any coffee.
 
valid as in the com object has not been disconnected from its rcw
 
yeah, what Comintern said.
we can tell if it's in fact a COM object
but we can't tell if RCW's disconnected.
If this is a problem, you could consider creating a unique RCW for all your COM things.
 
The problem is that unless you have some form of IPC, there is no way for the caller to know if the server disconnects. And if there was, well, you wouldn't need either COM or RPC mechanisms.
 
11:19 PM
the simple scenerio would be to open solidworks (or excel), get the com object, close the application manually, so that object in the application is technically not valid i want to be able to determine without trying to catch exceptions...
 
can you just create your own instead of using user's?
 
what do you mean?
 
don't get the com object; new it up
 
create a new instance of excel?
 
11:20 PM
Like a second instance of the application. Or is this a plug-in type deal?
 
e.g. var foo = new SolidWorksApp()
yeah
 
no that's not a good solution. I want a generic one.
 
@this A very good example. Thanks for the read.
 
I can new solidworks instance but that solves this case
 
About the best you could do is get the process ID along with the application object, then check to see if the process is still running.
 
11:22 PM
imagine doing the same modeldoc2 (solidworks equivalent of workbooks) you can open and close workbooks
 
That doesn't guarantee the validity of it's objects though - it does give a good indication.
 
I could have sworn i have seen some CAD API where all objects have IsValid method which prompts the question in my head
everything in so points to the fact that there is no way of doing this (As opposed to doing a try catch blocking)
 
i don't think IsValid could possibly mean I'm still alive!
because if it's gone.... it's gone.
 
ok switching gear here
 
There is also the IsBadReadPtr function, but that isn't reliable, and only means the memory hasn't been released.
 
11:24 PM
ooohh
win api call?
 
Yes.
 
> Important This function is obsolete and should not be used. Despite its name, it does not guarantee that the pointer is valid or that the memory pointed to is safe to use. For more information, see Remarks on this page.
 
I wouldn't rely on it though. ^^
The problem is if the application does a large malloc and recycles it.
That's actually not uncommon.
 
reading remarks section...
"This function is typically used when working with pointers returned from third-party libraries, where you cannot determine the memory management behavior in the third-party DLL."
 
still wondering why unique RCW with try/catch wouldn't help you.
if you always get an unique RCW, you can tell that it's gone when you get a disconnect error in your catch.
and just get a new RCW.
 
11:29 PM
try and catch is the only foolproof way to do it, really.
 
there has been a case where instead of throwing an exception what is gets thrown is System.AccessViolationException
 
Remember also that you're typically in a different apartment, so there's always the possibility of a race condition in the validity test.
 
^
 
@Jelly That sounds more like a bug in the COM server than the caller.
 
stupid ass solidworks....
excuse my French
 
11:31 PM
What French? That's English.
:D
 
lol
 
If that's French, I'm fluent.
 
you Americans make me laugh with your flawless French...
lol
 
I'm sure it warms Mat's heart to know that he can speak his native tongue with everyone here.
 
Nuuhhh Canadian French is baptized French. Just like how American English is...
Jk
 
11:34 PM
Baptized?
I think henceafter I will refer to our Engleesh as "baptized English"
 
Yes. It's an English term to mock American English.
 
ah - TIL I thought that was a minced expression for bastardized.
 
oh shit
i think thats what it is
I have just being owned by my ignorance lol
 
oh so it's a new term. I'm keeping it anyway.
Everyone! Here in chat room, we will now speak baptized English! So keep it clean!
 
lol
i am going to try isBadREadPtr
 
11:37 PM
FWIW - you don't even need an API if the AV is a null ptr
e.g. Marshal.GetIUnknownForObject(obj) != IntPtr.Zero
 
thanks
i'll try that now
 
I'm putting a sticky note on my monitor that says "Remind @Jelly you told him so when he drops back in with a non-working IsBadReadPtr test."
 
@this fwiw, even in England, there's a dilema... Do I code in English (Colour), or Muricanish (Color)? The former grinds my gears less, until I have to interact with the framework and my #words don't gel with Microsoft's #words. FML.
 
@Jelly I've a near monopoly on that. Don't be thinking you can take it away easily either.
 
en-GB != en-US :-(
 
11:44 PM
@mansellan If it makes you feel any better, my OS defaults to en-gb.
 
feh. Just call it Culah
 
@Comintern It does :-)
 
@mansellan I more often than not end up typing colour for no British reason at all.
 
I haven't been able to find out where that "behaviour" is coming from.
 
^ Same for my own.
 
11:45 PM
U's are a thing.
bah, that doesn't work with or without an apostrophe!
 
hence why y'all are a thing
or maybe youse are a thing
 
lol
 
Back in Tunisia I was taught British English growing up but eventually switched to American English (just because of Silicon Valley). American English is easier to write but way harder to speak and the opposite is true for British English.
 
Why not write in American English while speaking British English? That'd mess with people.
 
11:47 PM
I did that.
I actually did that.
 
:+1: for that achievement alone.
 
When I passed my IELTS test
that's the British English language test
 
But did you try mixing them? I done put my drawers in my drawers!
 
Luckily, they did not sanction me for speaking with an American accent during the speaking test and I got 8.5/9.
 
Reminds me of a kid I knew. His parents are Chinese and English is his second language. He lived in Australia a couple years and when he came back he had a thick Aussie English accent. He couldn't understand why everyone thought it funny his accent had changed so much.
 
11:50 PM
Speaking of locale fun, I just tried Humanizer today. I knew it was a thing, but now I've made it a work thing. I gave them a star.
 
Nice!
 
I need a lift to the lift, but let me get my boot out of the boot first.
 
I'm wearing the trousers under my trousers.
 
@Jelly Can you switch back and forth between the two with your pronunciation?
 
(and thumbsed-up github.com/Humanizr/Humanizer/issues/571, which I need... I would PR it, but someone else just picked it up.
@Comintern wait, you're Russian?
(catching up with chat!)
 
11:52 PM
@mansellan Only to the extent that it messes with Iven.
 
^ starred
 
and sharing dirty limericks of questionable quality.
 
TBH, en-us needs a second round of adopting en-gb words. I particularly want "whinge" and "bollocks" to gain wider usage.
 
@Comintern yeah, but... IMO it's done surreptitiously. "Can we have that as a grid?", "Sure". "Can we have column header filters?", "Sure". "Can we have copy and paste?", "Sure". "Can we have a drag handle on the cells?", "Oh... FFS!"
 
@this this doesnt seem to work.
Debug.Print($"anotherWrapper.ModelObject: {Marshal.GetIUnknownForObject(anotherWrapper.ModelObject) != IntPtr.Zero}");
Debug.Print($"this.ModelObject: {Marshal.GetIUnknownForObject(this.ModelObject) != IntPtr.Zero }");
// prints:
// true
// true
@IvenBach between US English and British English?
 
11:57 PM
are 2 objects dead?
if not, then that's correct.
 
One dead, one is not
second is dead
well second throws an exception
The object invoked has disconnected from its clients. (Exception from HRESULT: 0x80010108 (RPC_E_DISCONNECTED))
 

« first day (1715 days earlier)      last day (1465 days later) »