|
Members in Shoutbox
None.
Shoutbox Search
Shoutbox Commands
/w [name] > Whisper
/r > Reply to last whisper /me > Marks as action Shoutbox Information
Moderators may delete any and all shouts at will.
|
Global Shoutbox
Please log in to shout.
[2016-2-26. : 5:21 am] lil-Inferno -- jjf28jjf28 shouted: I like how IDEs are writing code using code which was probably written in said IDE which probably replaced code earlier written in another IDE which probably followed a similar pattern BUT THEN HOW DID FIRST IDE GET THERE???[2016-2-26. : 5:08 am] Dem0n -- jjf28jjf28 shouted: I like how IDEs are writing code using code which was probably written in said IDE which probably replaced code earlier written in another IDE which probably followed a similar pattern Yeah, I always wondered about what code IDEs would be written in[2016-2-26. : 5:06 am] jjf28 -- I like how IDEs are writing code using code which was probably written in said IDE which probably replaced code earlier written in another IDE which probably followed a similar pattern[2016-2-26. : 4:57 am] lil-Inferno -- LanthanideLanthanide shouted: I imagine that someone earning 100,000 NZ would feel about as wealthy as someone earning 60-70k USD And because 100,000 NZD is ~68k USD lel.[2016-2-26. : 3:54 am] Lanthanide -- just because food, clothing, housing, electricity, fuel are all more expensive here[2016-2-26. : 3:54 am] Lanthanide -- I imagine that someone earning 100,000 NZ would feel about as wealthy as someone earning 60-70k USD[2016-2-26. : 3:53 am] Lanthanide -- Mini Moose 2707Mini Moose 2707 shouted: Also, IIRC Lanthanide isn't making USD. (I could be wrong) yeah, NZD, which is currently roughly 65% of USD, but that's a misleading comparison (it was 85% not too long ago - various things priced in NZD were sometimes cheaper than you could buy them in US)[2016-2-26. : 3:49 am] Moose -- Mini Moose 2707Mini Moose 2707 shouted: Unless I were specifically working on a C++ project, though, I wouldn't touch that level of text parsing in C++ in a million years. ;o Or unless I needed very highly-optimized and fast text processing of very large text files. But even then, I'd probably learn text parsing for D at that point.[2016-2-26. : 3:45 am] Moose -- Unless I were specifically working on a C++ project, though, I wouldn't touch that level of text parsing in C++ in a million years. ;o[2016-2-26. : 3:41 am] jjf28 -- though I suppose the multi-line comments would be regex'd out already[2016-2-26. : 3:39 am] Moose -- Okay, so just regex everything on the line up to the first // and only parse that[2016-2-26. : 3:38 am] jjf28 -- anything that follows "//" (where the first slash is unescaped, and not within a double quote) to the end of the line needs to be ignored[2016-2-26. : 3:34 am] Moose -- Though if you want them printed unchanged, then you would have to send them to awk and have awk handle it.[2016-2-26. : 3:28 am] * jjf28 could devil's advocate this for days *[2016-2-26. : 3:28 am] jjf28 -- so it wouldn't process lines that had code followed by a trailing comment?[2016-2-26. : 3:23 am] Moose -- You could actually just grep -i for lines starting with whitespace followed by // and pipe that into awk's stdin and not even use awk for the // part of it.[2016-2-26. : 3:22 am] Moose -- Oh, that might be five more lines of awk. And to be fair, if you wrote that one-liner in a script, you probably wouldn't write it as such for readability.[2016-2-26. : 3:22 am] jjf28 -- it's for meta-chkdraft, planning on using this to find all quoted tabs, replacing those with \t's, then replacing all tabs with spaces (after merging with farty's fork)[2016-2-26. : 3:22 am] lil-Inferno -- jjf28jjf28 shouted: Roy neat, I mocked this up http://pastebin.com/imHSJuFH ; ended up needing to account for comments & stuff too Y'all write some ugly code LMAO[2016-2-26. : 3:21 am] jjf28 -- plus idk awk, but you would have to solve the comment problem (taking off // till new lines, and /* */'s) which could be difficult to impossible ![]() [2016-2-26. : 3:20 am] Moose -- Though I suppose if this is for CHKDraft or something, you didn't have much choice[2016-2-26. : 3:20 am] jjf28 -- Mini Moose 2707Mini Moose 2707 shouted: jjf28 322 lines of C++ to do a one-liner in awk. Classic. only 59 lines of new logic ![]() [2016-2-26. : 3:15 am] Moose -- jjf28jjf28 shouted: Roy neat, I mocked this up http://pastebin.com/imHSJuFH ; ended up needing to account for comments & stuff too 322 lines of C++ to do a one-liner in awk. Classic.[2016-2-26. : 3:14 am] jjf28 -- RoyRoy shouted: jjf28 Okay, I figured it out. This will match tabs inside quotes with C# balancing groups: (?<=(?<quote>")[^"\\]*(?:\\.[^"\\]*)*)\t(?=[^"\\]*(?:\\.[^"\\]*)*(?<-quote>")) neat, I mocked this up http://pastebin.com/imHSJuFH ; ended up needing to account for comments & stuff too[2016-2-26. : 3:10 am] Roy -- jjf28jjf28 shouted: speaking of regex or farlap or something, is there a nice way to find all tabs within quotes and change them to \t ? Okay, I figured it out. This will match tabs inside quotes with C# balancing groups: (?<=(?<quote>")[^"\\]*(?:\\.[^"\\]*)*)\t(?=[^"\\]*(?:\\.[^"\\]*)*(?<-quote>"))[2016-2-26. : 2:53 am] Moose -- lil-Infernolil-Inferno shouted: "Nearly 100% of Trump Fans Think the Invention of Dank Memes Was a Bad Idea" that's right[2016-2-26. : 2:50 am] lil-Inferno -- "Nearly 100% of Trump Fans Think the Invention of Dank Memes Was a Bad Idea"[2016-2-26. : 2:34 am] Roy -- jjf28jjf28 shouted: speaking of regex or farlap or something, is there a nice way to find all tabs within quotes and change them to \t ? Balancing groups would work well for that, which Farlap supports.[2016-2-26. : 1:53 am] Moose -- FaRTy1billionFaRTy1billion shouted: NudeRaider I said like a king, not that I would be a king ;o Vote for King 2016![2016-2-26. : 1:53 am] Moose -- dumbduckydumbducky shouted: Mini Moose 2707 Suppose I have a file of every character Then do this: Mini Moose 2707Mini Moose 2707 shouted: Alternatively, you could take the entire line, split it as an array by unescaped quotes and replace inside every second element. Same thing that was exploiting but without changing the field separator. Actually, now that I think about it, you might able to set the field separator with regex to be an unescaped quote, too. [2016-2-26. : 1:41 am] O)FaRTy1billion[MM] -- NudeRaiderNudeRaider shouted: FaRTy1billion yeah but that's pretty modest and not close to living like a king. I said like a king, not that I would be a king ;o Personally I'd be happy with that too, but I also kind of want to drive a sports car or something fancy like a Tesla. At the same time I really don't need a car at all and I'd be spending so much on something I don't need and just want for fun, so I probably wouldn't do it, even if I could unless money became completely a non-issue for me.[2016-2-26. : 1:40 am] dumbducky -- Mini Moose 2707Mini Moose 2707 shouted: dumbducky You have to use one that isn't in the file. Suppose I have a file of every character[2016-2-26. : 1:32 am] Moose -- Alternatively, you could take the entire line, split it as an array by unescaped quotes and replace inside every second element. Same thing that was exploiting but without changing the field separator. Actually, now that I think about it, you might able to set the field separator with regex to be an unescaped quote, too.[2016-2-26. : 1:00 am] Moose -- That's what makes it a dummy character, sorry for not being more clear.[2016-2-26. : 1:00 am] Moose -- dumbduckydumbducky shouted: What if the line actually contained the dummy character You have to use one that isn't in the file. |