|
commented code might have old invalid variable names
|
# ? Jan 29, 2019 16:50 |
|
|
# ? Apr 25, 2024 00:05 |
|
Krankenstyle posted:commented code might have old invalid variable names It doesn't have to compile, just parse
|
# ? Jan 29, 2019 16:55 |
|
what if the commented code scenario is something like // don't change the following code to this, i know you'll be tempted but don't: // {garbage code that looks good but performs horribly or has a weird bug} {actual working code that looks whack but is better for reasons}
|
# ? Jan 29, 2019 17:00 |
|
ratbert90 posted:Just lol if you don't have at a minimum a Jenkins server + sonarqube. I even have a docker-compose to bring them both up in only a few minutes. Jenkins + Sonarqube is what we're using just now but due to an SVN server no one wants to own we're stuck analysing the release branch only. We're planning a move to GIT but trying to get agreement on 1) how much history to truncate and 2) who is going to own it this time.
|
# ? Jan 29, 2019 17:08 |
|
Cold on a Cob posted:what if the commented code scenario is something like then you will get a false positive, there is really nothing you can do about that
|
# ? Jan 29, 2019 17:28 |
|
Just comment out the code a second time.code:
|
# ? Jan 29, 2019 17:32 |
|
Cold on a Cob posted:what if the commented code scenario is something like I've definitely done that one before. Probably after I tried to "fix" the offending line a couple times and made it worse.
|
# ? Jan 29, 2019 17:33 |
|
gonadic io posted:It doesn't have to compile, just parse oh yeah
|
# ? Jan 29, 2019 18:11 |
|
ThePeavstenator posted:*through sobs* Please...you can't just call anything you want a monad
|
# ? Jan 29, 2019 18:15 |
|
Aramoro posted:Jenkins + Sonarqube is what we're using just now but due to an SVN server no one wants to own we're stuck analysing the release branch only. We're planning a move to GIT but trying to get agreement on 1) how much history to truncate and 2) who is going to own it this time. Who cares? SVN2GIT is a thing. Copy all the history.
|
# ? Jan 29, 2019 19:08 |
|
ratbert90 posted:Who cares? Ask ESR
|
# ? Jan 29, 2019 19:19 |
|
gonadic io posted:It doesn't have to compile, just parse Krankenstyle posted:oh yeah even then it's not trivial, macros and defines can be pretty arbitrary maybe it's okay for a quick pass with a simple parser though, false positives are much worse than false negatives for that anyway I might put something like that in our git hook
|
# ? Jan 29, 2019 19:45 |
|
even better: just delete all comments that arent in the language-appropriate documentation format
|
# ? Jan 29, 2019 20:14 |
|
use machine learning and train an agent on a large corpus of code in your language and non-code comments
|
# ? Jan 29, 2019 21:53 |
|
Krankenstyle posted:even better: just delete all comments that arent in the language-appropriate documentation format im actually starting to like this idea unironically
|
# ? Jan 29, 2019 22:14 |
|
I had to leave a comment once saying // Don't put this transaction in a using block... It gets reassigned in a method below Still there iirc
|
# ? Jan 29, 2019 22:51 |
|
on one of my work projects:code:
|
# ? Jan 29, 2019 23:19 |
|
also about comment parse chat: you said c++ so I'm assuming you know that you can use clang's libraries to parse C++ and grab comment blocks, right? you can even find out where comments are attached (a function, a line in a function, etc).
|
# ? Jan 29, 2019 23:23 |
|
ratbert90 posted:Who cares? SVN2GIT is a thing. Copy all the history. SVN2GIT shits itself trying to import the whole repo. The repo is about 15gb, 65k commits. It works if we truncate part of the history and don't take tags, we just need to decide where to cut it.
|
# ? Jan 29, 2019 23:44 |
|
sounds like you need ESR to hurry up
|
# ? Jan 29, 2019 23:47 |
|
CRIP EATIN BREAD posted:also about comment parse chat: merely finding comments is the easy part. c++'s grammar may be a mess but it's not that much of a mess. the hard part is then deciding if a comment is allowed or not
|
# ? Jan 30, 2019 00:20 |
|
this thread really got me into checking out rust i have not read such a pleasant intro book to a programming language ever, they actually thought about getting people to use it but not in a weird placating monkey cheese way really nice (only on chap 3 but still)
|
# ? Jan 30, 2019 00:49 |
|
Share Bear posted:this thread really got me into checking out rust i did a little utility in rust at work today and i think i scared my coworker away from it. i was parsing string from a file, putting them in a hash map, and using them as keys in an adjacency list graph and was nothing but borrow errors and shoving cloned() in places i probably should have just used Rc from the get go
|
# ? Jan 30, 2019 01:09 |
|
gonadic io posted:Ctps: I have an acyclic graph in DOT format with about 8000 edges. Graphviz chokes on it. (maybe would be okay if I just left it longer?) i've run into this problem before and went and found a better visualization thingy only to realize upon inspection that more than like 1k lines is just garbage salad and pointless to visualize in the first place unless it is an extremely nicely structured graph definitely do the latter thing
|
# ? Jan 30, 2019 01:21 |
|
gonadic io posted:i did a little utility in rust at work today and i think i scared my coworker away from it. i was parsing string from a file, putting them in a hash map, and using them as keys in an adjacency list graph and was nothing but borrow errors and shoving cloned() in places that's chapter 4
|
# ? Jan 30, 2019 01:22 |
|
Now that the deal is finalized I can actually talk about it. My company was bought by Shell.
|
# ? Jan 30, 2019 01:29 |
|
ratbert90 posted:Now that the deal is finalized I can actually talk about it. yu got your $150.00?
|
# ? Jan 30, 2019 01:29 |
|
gonadic io posted:yu got your $150.00? I made a bit less than $350,000
|
# ? Jan 30, 2019 01:30 |
|
that's uh, pretty good for someone that iirc did an actual irl "cya poo poo lords" on their previous job like what, 9 months ago? Nice one. edit: buy a text book on, idk, management or something and mail it to your old boss
|
# ? Jan 30, 2019 01:37 |
|
yeah i hope you up your contracting rates accordingly given that you're worth >1.2k/day e: wait i think my math is wrong gonadic io fucked around with this message at 01:44 on Jan 30, 2019 |
# ? Jan 30, 2019 01:39 |
|
Aramoro posted:SVN2GIT shits itself trying to import the whole repo. The repo is about 15gb, 65k commits. It works if we truncate part of the history and don't take tags, we just need to decide where to cut it. ooc, is that 15gb just the trunk, or all of trunk/tags/branches? Also, tags are completely different in git than they are in svn (from what I remember of svn) so you may not even need/want those.
|
# ? Jan 30, 2019 01:44 |
|
I’m drinking an old fashion on the company dime right now. Life is good gents.
|
# ? Jan 30, 2019 03:06 |
|
ratbert90 posted:I made a bit less than $350,000 nice. also I don't make enough money
|
# ? Jan 30, 2019 03:11 |
|
Shaggar posted:nice. also I don't make enough money move away from maine, realize why people like bikes bitch
|
# ? Jan 30, 2019 03:14 |
|
Powerful Two-Hander posted:that's uh, pretty good for someone that iirc did an actual irl "cya poo poo lords" on their previous job like what, 9 months ago? Nice one. Yeah, but I had worked here 5 years ago and the CEO likes me. My boss has had 3 old fashions and now we are about to toast. I left Michigan this morning with 18F weather for this. 70F and sunny. Cheers mates.
|
# ? Jan 30, 2019 03:37 |
|
ratbert90 posted:Now that the deal is finalized I can actually talk about it. grats on destroying the environment and public health for figgies i guess but gently caress, that's some decent figgies. i'd compromise my principles for that sort of cash
|
# ? Jan 30, 2019 03:44 |
|
redleader posted:grats on destroying the environment and public health for figgies i guess They want EV chargers at every gas station. My company is at least trying to help the environment.
|
# ? Jan 30, 2019 03:50 |
|
so my OS has to dump from protected mode to VIRTUAL 8086 MODE in order to make interrupt calls all interrupts in VIRTUAL 8086 MODE result in GPFs, which I have to handle with a supervisor program the supervisor fucks with the stack frame to emulate an interrupt call, then RETs into the BIOS' interrupt handler and then certain privileged instructions which the BIOS calls also result in GPFs and have to be emulated by the supervisor this is fun I'm definitely not cursing intel at all times
|
# ? Jan 30, 2019 06:50 |
Congrats ratbert90 on becoming a YOSPOS success story and living the dream
|
|
# ? Jan 30, 2019 07:30 |
|
|
# ? Apr 25, 2024 00:05 |
|
ratbert90 posted:I made a bit less than $350,000 Ah, the coveted six and a half figgies?
|
# ? Jan 30, 2019 10:18 |