« first day (292 days earlier)      last day (2888 days later) » 

12:00 AM
RELOAD!
[retailcoder/Rubberduck] 5 commits. 4 opened issues. 3 closed issues. 6 issue comments.
 
@Duga That's all??
@Phrancis well... the only other way I can think of involves streaming the whole "source" into a string, and then appending the string to the "destination" file. Would that work?
 
12:25 AM
@Mat'sMug my thought exactly!
 
more RD commits coming tonight!
are we a hyperactive project?
 
No, I'd call you a normally-active project!
Your project is very healthy.
 
that's good to read
 
You make commits frequently, open issues, close issues, comments on issues.... you release quite often and you're getting followers and stars on Github.
 
there's so much to do though..
 
12:29 AM
oh, I know that feeling!
 
and some of that code is...... bleh
 
there will always be "bleh" :)
 
except after 1.3 we'll also have "ful kod"
 
lol
Looking at this makes me happy: chat.stackexchange.com/…
Especially fun to see how often you give stars to your stars ^^
 
haha can't help it!
and it makes me even happier than it makes you happy :)
@Duga has been a beyond-awesome tool so far, thanks for all the effort you put in
3
 
12:38 AM
I have to give a lot of credit to skiwi for starting it. It was a really good idea for a bot!
And who knows how it will look a year from now?
 
if Rubberduck keeps its pace, you'll need a new server!
 
12:53 AM
@Mat'sMug As long as I can put a new line at the end of the first file, so the second doesn't begin appending on the same line, it should work OK. I can probably make it work line-by-line too, just been struggling as you can tell
 
just put a new line at the start of the string you've read from the first one!
 
Is TS still the right tool to use for that? ^^
I just want to get this thing working so we can actually use it
 
what's TS?
 
Theoretical Star?
 
that was my initial thought, but then theoretical stars don't quite read/write files....
 
1:00 AM
they're theoretical, remember?
In theory, they can do anything
 
and I thought stars only twinkled
 
1:11 AM
@Phrancis I would definitely try to write the whole stream at once. I know it's possible, but then again...
> Make it work
Make it right
Then make it fast
 
in that order
 
1:29 AM
ah, didn't know that
@RubberDuck should I switch back to GrammarIsFun, create a Refactorings branch, or just work off Next now?
hmm
I'll keep GrammarIsFun for grammar rebuilds. And working directly in Next doesn't feel quite right (or sounds like a good way to cause conflicts).
OTOH if I create a Refactorings branch, I can work on rename, merge into Next once done, and then implement more refactorings back into that branch
nevermind, I'm creating a new branch.
:)
</rubberducking>
 
@Mat'sMug TextStream
 
ah!
 
SFTAA
(Sorry For The Ambiguous Acronym)
 
@Phrancis yes! I'd use the stream to read the entire source file into a string, and then append vbNewLine & thatString to the other file
 
GENIUS!
 
1:36 AM
lol
I like that "click!" moment ;)
 
Is it basically just a simple TextStream.Write(HelloFile.txt) in short?
 
well, not really
the stream is for reading
 
FSO.Write?
 
read
I'd write with "normal" IO code
Open filename For Append As #filenumber
2
Print #filenumber Thatstring
Close filenumber
 
1:40 AM
Hm. That's new to me, might need to RTFM on that stuff
 
Dim filenumber As Long
filenumber = FreeFile
 
@Mat'sMug Do me a favor and pin that momentarily so I can go back to it tomorrow from work?
Merci
 
de rien!
@Duga looks like MS fixed something in the Team Explorer... or I somehow learned how to publish & push a branch from the Team Explorer!
not going to bother with comments & string literals
KISS
 
2:08 AM
 
> weird changes that just appeared out of nowhere
 
/s/changes/changeset
 
> added RenameDialog
 
oh, facepalm
I renamed ModuleScope to QualifiedModuleName, and affected a number of files...
 
> actually... not so weird. Renamed QualifiedMemberName.ModuleScope to QualifiedMemberName.QualifiedModuleName, per codereview.stackexchange.com/a/84893/23788
 
 
2 hours later…
4:24 AM
ah-ha! here's the damned selection bug in action!
at least I know where/what the bug is with selection - it's not in the rename refactoring code :)
calling it a day
 
> refactor/rename successfully acquires target.
 
 
7 hours later…
11:27 AM
I made some changes to the GitProvider. It needs tested better before I commit it.
 
12:14 PM
@RubberDuck For branching?
 
Yeah. I created an actual branch class.
It's really just a dumbed down version of LibGit2Sharp's class.
Only I had the presence of mind to create an interface too...
smh
 
Tonight I implement the actual renaming. It sucks that I haven't figured out how to change a token in the parse tree.
bbl
 
12:37 PM
 
 
1 hour later…
1:48 PM
That's what I get for writing a through answer on SO....
1
Q: VBA Complocated Getter, Setter syntax

sgp667Hi I'm rather new to VBA I need to create an object with relativelly complicated Getter and Setter. To do this I am constantly checking with MSDN but clearly I am not understanding something because VBE keep highlighting lines starting and closing: Property (it appaently needs Get or Let??), Get(...

@MichalKrzych linked to your blog there ^
 
2:06 PM
@Duga this one is a serious GitHub contributor!
> Scala compiler plugin for static code analysis
 
2:21 PM
Yeah. I saw that.
 
 
2 hours later…
4:01 PM
Quiet today. Everyone's working too hard.
 
indeed!
forecasting invoicing for the rest of fiscal 2015...
 
4:16 PM
Fun stuff.
 
5:14 PM
Not really ;)
Writing the VBA to save the plans & forecasts into a SQL Server db was much more fun..
 
OMG, sales meetings are boring.
Sales techniques to try to mitigate the massive price increase they're about to roll out. Fun.
 
5:39 PM
So, I have an Access table with a CONTRACT_PURCHASE_DATE text column with data like 20150325 (don't ask, not my data)
Is there a "smart" way to convert those to actual dates in a select other than doing clumsy string functions?
Actually, it seems to sort OK as text, might not need to convert it
 
5:59 PM
Waiting for SSIS packages to execute is excruciating.
 
Sounds like it
Whoops
 
@RubberDuck My ETL runs in 55 minutes now.. about a dozen packages total.. I think.
 
@Mat'sMug That must do doing some pretty heavy lifting.
The big process I have takes about 15-20 minutes.
And that's the big one.
 
Processing the entire invoicing history, and extracting 3x 20 rows for each record to get the size-level breakdowns... runs in 50 minutes - that's my big one ;)
I mean 20 rows, but there are 3 columns to process like that for each row
750K appx
I need to start only staging the new invoices
 
What's the hardware on your server like? That seems a bit slow still.
If you don't mind me asking.
 
6:14 PM
It's a VM with 16GB RAM
A script component is doing the sz-extraction
 
Ahhhhh. Okay. Gotchya. That's why it runs so "slow" in mind.
They did right by us when they got us this server.
One of the few things they've done right.
cough source control.....
 
how much RAM would a decent SSIS server need?
 
6:31 PM
Depends on the load I guess.
I think a lot of the reason ours runs so fast is the sheer number of processors.
24 virtual. So, that's what? 4 physical?
 
logs on to virtual box...
2 processors @ 2.5GHz
well there you go
 
Yeah... 24 cores @2.8.
Makes a difference. =)
 
holy [insert word here]
 
I've seen it redlined before.
I had to hijack some people's processes and tune them.
 
6:57 PM
Open foo For Append As #bar
What's the #bar for?
 
weird syntax of the ancients
Its from the old Macro language.
It predates VBA.
 
Ew.
 
no
it's the file number you're opening
you can have up to 255 files opened at once
 
Weird. o_O
 
Is that what it is? I shy away from that stuff and tend to use the FileSystemObject.
 
7:07 PM
you get a file number using the FreeFile keyword
and assign it to a variable, here bar
so bar = FreeFile, and then you can Open foo For Append As #bar
 
For i = LBound(FileArray) To UBound(FileArray)
    Debug.Print ("Processing: " & FileArray(i))
    Open (InputDirPath & FileArray(i)) For Append As #FileNumber
    Print #FileNumber, TextString
    Close #FileNumber
    Debug.Print ("Appended to " & OutputFileName & ": " & FileArray(i))
Next i
^^ Does that look right?
Surely I need to put OutputFileName somewhere but not sure where?
 
after Open ;)
 
7:24 PM
OK. What does Print #FileNumber, TextString actually do? Put the file content into the variable?
 
it writes to the specified file
 
So, TextString should instead be OutputFileName ?
 
no
it's Print #[FileNumber], [WhatToPrint]
 
o.o
 
Print #1, "Hello, World" will write "Hello, World" to file #1
 
7:30 PM
OK so I need to actually open my output file for append, and read the input file with FSO and put it in the string var, then print that ...
Right?
 
yup!
 
OOOOOOOOOOOOOOOOOOOOOOHHHHHH
 
you can't write to a file without opening it
 
Makes so much more sense that way
 
and Close without any file number specified, closes all opened files - keep that in mind if you ever deal with multiple files opened at once
 
7:33 PM
@Phrancis Not to muddy the waters, but why are you reading the file with an FSO and writing to one with the native methods?
 
Because it's my first time writing VBA?
 
lol
lies!
because the mug suggested him to do that
 
Well, OK I've written a couple simple subs but nothing with IO
 
FSO stream-read into a string, then append the string to the other file
 
^that
 
7:35 PM
Does it even need to read into a string?
Okay, now I'm curious...
> Sub Write(Text As String)
Member of Scripting.TextStream
Write a string to the stream
Yes... you have to change the text stream to a string to write it to another text stream.
That seems odd to me.
 
I've never worked with FSO
 
 FileToWriteTo.OpenAsTextStream(ForWriting).Write(FileToRead.OpenAsTextStream().ReadAll)
Should be that easy.
Haven't had to in a while.
 
and would that append or overwrite?
 
oops overwrite
WriteLine appends to the end of the stream.
ahhhhh no. Wait.
FileToWriteTo.OpenAsTextStream(ForAppending).WriteLine(FileToRead.OpenAsTextStream(ForReading).ReadAll)
The golf way.....
It would be better to read the file into an intermediate string of course.
Now I want to write @Phrancis script in three beautifully obfuscated LoC...
 
7:59 PM
And... output file is still blank :|
 
Look at how many cards I can hold in my hand!
 
WHOA
And now... permission denied (haven't changed anything... wtf)
 
Sounds like the file didn't get closed.
 
Is there a way to see what files are open in memory?
 
...... uhhhhhh idk.
 
8:13 PM
Type Close in the immediate pane; count is 0 ;)
 
Smart Mug ^
 
Um, that closed the outer file but the inner file is still open.............?
Or maybe it's something else
WTF VBA
 
WTF File IO is more like it.
@Phrancis this works really well for me.
Public Sub test()
    Dim fso As New FileSystemObject

    Const path As String = "C:\Users\username\path\to\file\"

    Dim helloWorld As TextStream
    Set helloWorld = fso.CreateTextFile(Filename:=path & "helloworld.txt", OverWrite:=True, Unicode:=False)

    helloWorld.WriteLine fso.GetFile(path & "hello.txt").OpenAsTextStream(ForReading).ReadAll
    helloWorld.WriteLine fso.GetFile(path & "world.txt").OpenAsTextStream(ForReading).ReadAll

    helloWorld.Close
End Sub
 
8:34 PM
Alright, got someone pressing me to finish this, I did not realize there were actual open customer issues that need this data... @ducky you won't mind if I copy your code?
 
Nope. Not at all.
Just remember you have to open and close the destination file outside of your loop.
 
Did it actually append content from the two files together? Do I need to print a vbNewLine too?
 
WriteLine automatically adds the newline. And the code I posted does append.
 
I need to go to Ohio and buy you a beer sometime
 
The OverWrite:=True line just tells it to create a new file if the destination file already exists.
@Phrancis I would love to have a beer with you some time.
Perhaps the next time I'm in Indiana we can finangle it.
I need to get @Mat'sMug on a Google Hangout and actually meet him too. =;)-
Where's @Duga? =(
 
8:41 PM
if I ever go to the US, I'll make sure I stop somewhere in OH
 
Trip to Canada sounds like a nice family vacation actually...
 
come with @Phrancis!
 
It is. And Montreal is a fun fun fun place in the Summer
Especially the JazzFest
 
just not exactly a fun fun fun place to freakin' park a car
lol
 
@Mat'sMug Sounds like downtown Columbus. lol
 
8:49 PM
@RubberDuck Here!
 
@Duga Hey there!
 
Is something wrong?
 
How goes the robot revolution?
@SimonAndréForsberg No. I just noticed Duga wasn't in the room.
I've gotten used to seeing that blue icon up there is all. lol
 
@RubberDuck Well... did you do any github activity to make her appear?
ok :)
I don't know how SE Chat handles those icons up there actually
 
LOL. I'll just have to go make a few commits next time.
 
8:50 PM
yes ^^
or visit this chat room if you miss her so much:

 Duga's Neighborhood

It's a beautiful bot in the neighborhood. Would you be mine, w...
 
in Duga's Playground, 52 mins ago, by Duga
The time is 2015-03-25T20:00:00Z and @Duga is alive
 
@SimonAndréForsberg is rubberduck the only active project today still?
 
> Duga is alive
 
@Mat'sMug nope. skiwi has started an experimental LibGDX project today that has some commits.
 
@Mat'sMug Well, I have some changes to make to VBEX, but I'm not quite there yet.
 
8:53 PM
I have not done any commits in a while though.
 
I'm not happy with my new Tree implementation yet.
 
I am however working on figuring out a challenging Project Euler: projecteuler.net/problem=391
 
It's easy to navigate from leaf to root, but root to leaf is still too difficult.
 
try making a tree walker ;)
 
Well, that's the thing. I did for my original implementation, but I'm having a hard time properly encapsulating and iterating the internal dict.
I seem to get one or the other, and I'm not quite happy with it yet.
It's all in one class now though.
Just Tree.
TreeFactory.Create(key, value, ParamArray [Tree])
is where I want to get to.
Okay. Project is all done.. except the part where I need to tear apart my co-worker's packages.
I'll save that for tomorrow. Night all.
 
9:00 PM
later!
 
9:27 PM
Stream.WriteLine FSO.GetFile((InputDirPath & FileArray(i))).OpenAsTextStream(ForReading).ReadAll
^^ Getting invalid procedure call or argument
Would I need to copy (InputDirPath & FileArray(i)) into a string or something?
Nope
 
9:54 PM
Is there a way to tell if the error is with FSO or TextStream? I added watches on everything but not sure what to look for...
Mar 17 at 21:09, by Blackhawk
OH MY GOD, I WORK WITH HELP VAMPIRES
^^ I feel like this is about me right now
Actually, your code (adapted with my own file names & path) also fires an invalid call or argument... :\
 
hmm
usually not cramming everything into a single statement makes debugging easier ;)
 
Public Sub test()
    Dim FSO As Object
    Set FSO = CreateObject("Scripting.FileSystemObject")

    Const path As String = "C:\test\"

    Dim helloWorld As Object
    Set helloWorld = FSO.CreateTextFile(FileName:=path & "helloworld.txt", OverWrite:=True, Unicode:=False)

    helloWorld.WriteLine FSO.GetFile("C:\test\Product_ID_update.txt").OpenAsTextStream(ForReading).ReadAll 'INVALID CALL OR ARGUMENT
    helloWorld.WriteLine FSO.GetFile("C:\test\RPT-4475.txt").OpenAsTextStream(ForReading).ReadAll
 
try assigning an object variable to FSO.GetFile("C:\test\Product_ID_update.txt")
then call OpenAsTextStream(ForReading) on it
and assign the result of that to another object variable
then call ReadAll and assign the result of that to a String
then write that string to helloWorld
one of these steps is failing
TTGH
 
10:13 PM
TTFGH too
 
10:31 PM
Invalid call? Heh... Wtf?
Does it get through the first one?
 
11:06 PM
No it errors right as it's getting ready to execute the WriteLine
Worked on your machine as is?
 
11:58 PM
I'll probably do what Mat said and see where it goes.
 

« first day (292 days earlier)      last day (2888 days later) »