« first day (3413 days earlier)      last day (1528 days later) » 

4:01 PM
Oh yeah that happens when our servers go down
The websocket stays open so new messages come in fine
 
mr5
oh
p2p?
 
I guess dumpbin isn't a thing anymore?????????
 
what is dumpbin
only bin is pastebin
 
@mr5 no it's just websockets, but they stay open. Websockets are cool shit
 
I'm seeing some unexpected behavior when using the String.split() method. I expect it to split a string into substrings at any occurance of a white space character. So I expect "Abbey Street E.2 Buckfast Street" to be split into the 5 substrings "Abbey" "Street" "E.2" "Buckfast" and "Street" but I'm getting three substrings instead: "Abbey" "Street E.2 Buckfast" "Street". Can someone please explain this behavior and how to split this string into 5 substrings?
 
4:14 PM
what is your code?
what is your input?
 
mr5
Quick! Which comes first, coins or bills?
 
what is your output?
what is your desired output?
 
My code is:
 
@mr5 both? both. both! both is good
 
4:16 PM
```public static List<string[]> splitLines(List<string> fileLines)
{
List<string[]> list = new List<string[]>();

foreach (string line in fileLines)
{
list.Add(line.Split(" "));
}

return list;
}```
 
mr5
Coins!
Because coin purse!
 
The parameter are lines of the form Abbey Street E.2 Buckfast Street
 
mr5
!~> "Abbey Street E.2 Buckfast Street".Split(' ');
 
@Wietlol @mr5 I just realized the space between each word is actually a tab not a singl white space character
 
!=>"{void}"
 
4:19 PM
well... there you have it :D
!~> "Abbey Street E.2 Buckfast Street".Split(' ')
 
!=>["Abbey","Street","E.2","Buckfast","Street"]
 
mr5
Fff
 
you might want to split on regex and use the \s+ to match any sequence of whitespace characters
 
So it is actually "Abbey Street\tE.2\tBuckfast Street"
 
@mr5 and yes, ny's implementation makes a distinction between expressions and statements
 
4:21 PM
Only the first and last words have a white space character
 
is it a tabs separated data file perhaps?
 
Yay my new service works :)
 
yay
what service?
 
Yeah its a vim text file
 
that... is not really what I asked...
vim is a program, not a file or text format
 
4:22 PM
with three columns
 
mr5
WorkService probably
 
How do I post a picture here?
 
mr5
What do you call to a non Cool worm?
 
in the case of a TSV (tabs-separated-values) file, you might want to use CSVHelper instead
because simply splitting on newlines and then on tabs is not a valid approach to parse a TSV string
@MyWrathAcademia just paste an url
 
A service which serves a load of data to clients. We've had one for ages but the old version of it ran with a GUI (don't ask) and wouldn't work outside of a user-interactive context
 
4:24 PM
its on disk
 
And looks like this
 
which website can I paste the image on
 
upload on imgur?
 
screenshot
 
4:25 PM
or use the upload button
 
Press the upload button to the right of the send button
choose the file
 
But the new one is a proper windows service which doesn't need a user logged in to run. And it's just way faster too
 
mr5
@CaptainObvious -1 align numbers at right?
 
4:27 PM
so, the question is, do you want to separate the columns or each individual word?
 
I already wrote a library to get the second to last word in each line of that file but it doesn't work becasue the split method does not work the way I expect
 
How so?
 
I want:
 
"second to last"
what do you mean?
 
> Buckfast
 
4:29 PM
The split method works exactly as I expect. Splits a string into a bunch of strings where there is a <seperator> between them
 
> Abbot's
> Abbotswell
 
> Benhill
or
> Road
?
 
Okay, what are you doing to get them?
 
(from entry 8)
 
@Wietlol good spot. I would want Benhill on that line
 
4:30 PM
so, you want the first word from the last column?
 
The # at the end of the line makes it more complicated
 
        Alright... lunch time
 
in that case, you need to treat the columns as separates
 
@Wietlol exactly!
 
just split on tabs, then take the last (or third, which should be the same) and then split on spaces and take the first
 
4:31 PM
Sounds likew you need regex
 
NOOOOOOOOOOO
no
 
But yes
 
Match the second to last word that contains only letters. Done
ezpz
 
@CaptainObvious entry 11
BORKRKRKRKRK
 
4:33 PM
@CaptainObvious regex is not ezpz. I considered that first
 
Regex is ezpz
 
regex is ezpz, but you should not use it to do this
 
@Wietlol What is wrong with line 11
 
your regex returns "Adam"
while it should be "Robert"
 
Why
He said "second to last word"
Adam is second to last word
 
4:35 PM
> so, you want the first word from the last column?
> exactly!
 
Actually @Wietlol @CaptainObvious in entry 11 I rather have the concatenation of Robert and Adam
 
you wot?
 
@Wietol how do I split on tabs?
 
Split('\t')
 
Fine then
Everything between a tab but before the last word which contains only letters. Ezpz
 
4:38 PM
> Abbot's
BORK
 
Stop Wietlol you'll edgecase him to death
 
@JonathonChase those are from the example data
 
Take a look at entry 918 to 921:
 
@MyWrathAcademia I can recommend you to figure out by exactly what criteria you want to take the substring
 
Splitting at tabs, getting the third and then splitting at spaces wont work
 
4:40 PM
based on arithmetics, not based on knowledge of the names
 
The rules seem non-trivial enough that simple splitting and regex are probably not going to be effective.
 
I think splitting is still the way to go tho
 
The file is too inconsistent to programmatically do this
correctly
 
mr5
Perhaps you need an AI to parse this if the pattern is inconsistent
 
line
    .SplitOnTabs()[2]
    .SplitOnSpaces()
    .FilterOutNonWords()
    .DropLast() // perhaps check if size is > 1
    .JoinToString()
that should do the trick
NonWords might not exactly be what you want to filter
considering "(part)" also had to be filtered
@MyWrathAcademia but perhaps you should not filter stuff from it at all
 
4:44 PM
I only need a sample data set for what I'm doing. I don't have time to spend on processing a file and getting data into a format I want
Inconsistencies:
 
ye, it looks like you should not try to filter at all
just change the requirements :D
 
mr5
lemme teach my AI for this
teaching...
 
And there are 1000+ more lines like that
 
crashed...
 
@Wietlol so are you suggesting I don't use splitting for this?
 
4:47 PM
not on the spaces
just split on tabs, then take the third entry (third column)
use that string for whatever you need to do
if that is insufficient, make a list of patterns and match them against those strings
each pattern would try to match and return a string of the text you want to use or return nothing or null it it cant match it
then you can make a pattern, say "where the text ends with '<space>Street'"
or others like that
you can make a list of all your inputs, filter them based on those patterns and then see what you have left
from those, you can find new patterns and add them to your pattern list
 
mr5
@MyWrathAcademia how do you structure a single entry? What are their properties?
1st property, 2nd property, 3rd property
 
using this approach, you will eventually go through the entire list
but it cannot guarantee future input is processable
in some cases, this is a pretty viable solution
anyway, im out
laytar
 
I guess I used IIS Express today
 
4:59 PM
hey since Stack still hasn't recovered, anyone know a good place to replace it...just so I can stay on top of things?
 
5:29 PM
@Wietlol I was away implementing your suggestions and it worked great on the first run. Your recommendations are veruy logical and maintanable, just have to improve method naming of methods and variables now.
 
mr5
AI is done but this issue can just actually be solved by input.Split('\t'), where [0] = firstProp, [1] = secondProp, [2] = thirdProp
 
@Wietlol thankfully I don't have to implement your more complicated suggestion/solution:
42 mins ago, by Wietlol
if that is insufficient, make a list of patterns and match them against those strings
to
42 mins ago, by Wietlol
from those, you can find new patterns and add them to your pattern list
 
mr5
that's basically what an AI does
it's on the 'training phase'
 
@mr5 Machine learning?
 
mr5
yeah
 
5:33 PM
@mr5 Are you familiar with Machine learning?
do you use it?
 
mr5
yeah I made one using Dialogflow
 
Cool. Can you do machine learning using c#?
 
mr5
that one I used right now needs to be done in cloud unfortunately
but sure, it can be integrated into C#
but I wouldn't also recommend using this with that kind of problem as yours since it's overkill lol
 
6:00 PM
(
 
CS1026 ) expected
 
V.7
 
 
2 hours later…
8:12 PM
'sup
Fucking US keyboard
What the hell windows
Has anyone here ever built the aspnetcore repo?
 
@JonathonChase @HéctorÁlvarez
 
Jack, votekick Wiet
 
damnit Jack
 
I need to make a Jack command for wietbot
 
8:18 PM
Jack, payrespects
 
Wiet isn't even his full name
 
 
am I reading XKCD or CAD?
 
 
2 hours later…
user47589
10:29 PM
@Freerey yes
 
V.7
11:21 PM
@mr5 It was chilly made
I remember how we learned this stuff in engineering
 

« first day (3413 days earlier)      last day (1528 days later) »