|
VikingofRock posted:Could you elaborate on your CI setup? I've been improving the tests for my astronomy research C++ code, and I think a good next step would be setting up some CI. This is especially important now because more undergrads are contributing code to it and they are likely to mess things up due to inexperience. doing valgrind (or even asan) gatekeeping is probably too slow unless your project is tiny, but it makes sense to have a periodic valgrind/asan build that just runs your normal test suite, or at least a stripped-down version of your test suite
|
# ? Oct 10, 2017 07:52 |
|
|
# ? May 30, 2024 06:13 |
gonadic io posted:starting from scratch, no prior code. starting to building on an empty (green) field ah. yeah i imagine that rough in c or c++ comedy option: this is how i Imagine lisp programming, working your way up from a pair of parentheses
|
|
# ? Oct 10, 2017 07:55 |
rjmccall posted:doing valgrind (or even asan) gatekeeping is probably too slow unless your project is tiny, but it makes sense to have a periodic valgrind/asan build that just runs your normal test suite, or at least a stripped-down version of your test suite That's sort of what I was thinking--run valgrind on the test suite. Is there anything else I should be throwing at the code to check it?
|
|
# ? Oct 10, 2017 07:55 |
|
cinci zoo sniper posted:ah. yeah i imagine that rough in c or c++ class Main { ____public static void main(String[] args) { ________ ____} } e: im dumb and couldn't figure out how to both preserve spaces and display the cursor smiley
|
# ? Oct 10, 2017 08:02 |
|
VikingofRock posted:Could you elaborate on your CI setup? I've been improving the tests for my astronomy research C++ code, and I think a good next step would be setting up some CI. This is especially important now because more undergrads are contributing code to it and they are likely to mess things up due to inexperience. To ensure the code is Valgrind clean, I run the tests under Valgrind, duh (Actually, I run it under Clang's sanitizers, because the full set of tests can take days even without any extra slowdown, so Valgrind's 2 orders of magnitude would kill me) Anyway, in my current paid project (also research, sup buddy), we have 2 different granularities, per commit and per ~2 weeks. Per commit we compile and run unit tests with various compilers, and then also compile and run the unit tests with Clang's sanitizers. The commits are not gated, but you are expected to fix poo poo after you get a nastygram about all the things you broke. Then, every ~2 weeks or before we branch a release, we run full test suite (basically all inputs that our customers have given back to us because they contained bug). It takes ages to run, but can catch some bugs our unit tests don't. We are thinking about also having static analysis run after commit, but small team + different priorities means that we don't have time to set it up properly, and so far we are pretty okay with our current setup (also jacked up warnings). In my non-paid OSS project I have AppVeyor and TravisCI compile and run unit tests. I would love to add sanitizers/Valgrind, but I can't be arsed to figure out how to use them under Travis
|
# ? Oct 10, 2017 08:05 |
|
why do you program?
|
# ? Oct 10, 2017 08:09 |
|
gonadic io posted:class Main {
|
# ? Oct 10, 2017 08:13 |
|
BONGHITZ posted:why do you program? i really really like it. honestly it makes me feel smart when things come together and a problem is solved. like a cross between a soduku puzzle and writing a novel. that's not something i'd admit irl but surely this safe space can accept my need to feel smart. i prefer hobby programming because you can just do whatever interests you but work programming is fine
|
# ? Oct 10, 2017 08:38 |
|
VikingofRock posted:That's sort of what I was thinking--run valgrind on the test suite. Is there anything else I should be throwing at the code to check it? asan catches a subtly different set of bugs from valgrind and is a lot cheaper. tsan is great if you use threads. ubsan is cheap enough to be part of your normal debug-mode ci. static analysis tools you can always write more tooling. a lot of projects would benefit from some project- or framework-specific static analysis. just think about the common bugs that people make, think about whether you could reasonably catch those bugs statically. but before you actually write that analysis, consider whether you can actually just fix the original api to define the problem away rjmccall fucked around with this message at 08:42 on Oct 10, 2017 |
# ? Oct 10, 2017 08:39 |
|
gonadic io posted:i really really like it. honestly it makes me feel smart when things come together and a problem is solved. except I kinda prefer work programming* * I haven't had to deal with large corp bullshit for couple of years
|
# ? Oct 10, 2017 08:53 |
|
test suite? i think you'll find that this is the terrible programmers thread
|
# ? Oct 10, 2017 08:56 |
i like programming because i like process of problem solving, also seeing how things work. not sure if i like hobby programming more than work programming, since ive done barely any of the former *** "programming" as in scientific scripts, data analysis, etc is what i do for work or "work", not something "real" (or even just web)
|
|
# ? Oct 10, 2017 09:00 |
redleader posted:test suite? i think you'll find that this is the terrible programmers thread ill let u know i version my sql scripts in git
|
|
# ? Oct 10, 2017 09:01 |
|
BONGHITZ posted:why do you program? i aint good at arguin' i cant draw good and ah dont english well neither
|
# ? Oct 10, 2017 09:27 |
|
BONGHITZ posted:why do you program? i'm terrible on every conceivable level so it's basically made for me
|
# ? Oct 10, 2017 10:14 |
|
BONGHITZ posted:why do you program? i'm a miserable pile of illogical secretions
|
# ? Oct 10, 2017 10:40 |
|
VikingofRock posted:That's sort of what I was thinking--run valgrind on the test suite. Is there anything else I should be throwing at the code to check it? the hardcore option (extremely time and resource intensive) is: run the code through KLEE (white box testing tool) to generate test cases run the test cases through AFL (instrumentation-driven fuzzer) to find the corner cases KLEE can't (disclaimer: I have used KLEE and AFL in isolation, but never together) KLEE on its own can also be used to test your implementation against a known good reference implementation. it has, however, a lot of limitations on the kind of inputs it can generate, so it's not always appropriate. it's also an academic project with all that it entails the main weakness of both tools is that they require access to the full program for perfect coverage, so any external dependencies should be compiled with them as well, but often this just isn't feasible. AFL's randomized nature, however, compensates a lot what do you write your unit tests in?
|
# ? Oct 10, 2017 10:51 |
|
BONGHITZ posted:why do you program? it's an addiction I get paid for
|
# ? Oct 10, 2017 10:52 |
|
rjmccall posted:i have no idea what you're trying to describe here. a non-fifo queue that does some sort of uniquing? i guess a keyed cache if i thought about it a little more
|
# ? Oct 10, 2017 11:05 |
|
hackbunny posted:the hardcore option (extremely time and resource intensive) is: Please note that if you do something so exotic as to calculate a non-trivial hash over symbolic inputs and then branch over it, KLEE will never finish running. To explain, KLEE is a symbolic executor. That means that it executes the code as written, except you mark some part of the memory as symbolic, so when it hits a branch that depends on values in the symbolic memory, it goes down both ways of the execution, applying the constraints. You can then either mark some regions as error-if-reached, or just use its built-in knowledge (ie. dereferencing null pointers is a bad idea), and if it manages to find execution path that leads to an error, it notifies you of the execution path and gives you a value for the symbolic memory that will lead to program to the same place. It also has some extras, like optionally notifying on integer overflow, kinda-sorta understanding files and so on. And yeah, back when I worked with it, it had all the signs of massively PITA academic project: super-old dependencies, vague installation steps, rather sparse documentation (I've ended up figuring things out by reading code and sometimes posting to the mailing list) and so on. hackbunny posted:what do you write your unit tests in?
|
# ? Oct 10, 2017 11:07 |
|
ynohtna posted:i'm a miserable pile of illogical secretions
|
# ? Oct 10, 2017 11:44 |
|
Xarn posted:You can then either mark some regions as error-if-reached, or just use its built-in knowledge (ie. dereferencing null pointers is a bad idea), and if it manages to find execution path that leads to an error, it notifies you of the execution path and gives you a value for the symbolic memory that will lead to program to the same place. you don't really use KLEE to find errors, though, you use it to create a minimal set of inputs that will get 100% test coverage (which, counterintuitively, isn't very useful on its own)
|
# ? Oct 10, 2017 12:08 |
|
hackbunny posted:you don't really use KLEE to find errors, though, you use it to create a minimal set of inputs that will get 100% test coverage (which, counterintuitively, isn't very useful on its own) True, but 100% path coverage according to KLEE doesn't really mean exercising all paths anyway, as the last time* I used KLEE it didn't consider ie overflowing as a separate path, so you still want it to check these for you. Alsoit likes to get stuck in trivially identical paths (ask me about letting it run for a week over piece of engine control code and it ended up trying to generate all possible messages + checksums it could receive over a bus ), *Admittedly that was pretty long ago, I ended up hacking-in overflow detection just to find out that somebody else up-streamed it around the same time...
|
# ? Oct 10, 2017 12:40 |
|
Sapozhnik posted:cool now port the build to meson and groan at how much time you could have saved I'm actually going to attempt this. Part of the refactoring was making all the makefiles use a central, globally selectable general rules file, and supplying some parameters to it (eg objects to build, target) per directory. I'm thinking I can basically supply an alternate rules file that will just generate the meson.build files, but this would mean that users have to do an extra configure step before building a target. Right now I can do 'make app1 & make app2 & make app3' from the build directory where the recipes for the apps can vary wildly. I'm still learning about meson, but I don't see any obvious way to be able to do this in the system.
|
# ? Oct 10, 2017 12:48 |
|
BONGHITZ posted:why do you program? I just do, ok? For fucks sake dad just leave me alone, you wouldn't understand. It pays magnificently and I get to talk to nerds all day.
|
# ? Oct 10, 2017 14:29 |
|
god drat sourcetree gets more broken with every release
|
# ? Oct 10, 2017 14:38 |
|
St Evan Echoes posted:god drat sourcetree gets more broken with every release its trash but i dont know anything better
|
# ? Oct 10, 2017 14:41 |
St Evan Echoes posted:god drat sourcetree gets more broken with every release aye, i used to like it but it has become more sluggish and "courageous" with every release so i ended up with just slamming git integration switch on in every tool that matters (intellij, visual studio, st3), and use gitkraken if i really really can't help it
|
|
# ? Oct 10, 2017 14:43 |
Maximum Leader posted:its trash but i dont know anything better try gitkraken. not necessarily better, but was a breath of fresh air after sourcetree speaking of git integration in dev tools, visual studio is so bad about it it's not even funny
|
|
# ? Oct 10, 2017 14:44 |
|
i starting using github desktop, but it has essentially no features and is a useless pile of Electron (pretty ui though)
|
# ? Oct 10, 2017 14:54 |
gonadic io posted:i starting using github desktop, but it has essentially no features and is a useless pile of Electron (pretty ui though) i tried it and i didn't like it too much, probably because electron stuff often lags on my pc. well i guess it helps to mainly work in bitbucket (and i prolly tried some super early beta)
|
|
# ? Oct 10, 2017 14:56 |
|
cinci zoo sniper posted:try gitkraken. not necessarily better, but was a breath of fresh air after sourcetree gitkraken is pretty good but i think it constantly runs git fetch or smth. it tanks my repo performance anyway
|
# ? Oct 10, 2017 14:58 |
|
excel 2007 was the last program i ever used that somehow broke the "click/drag title bar to unmaximise and move", until sourcetree managed it a couple months ago
|
# ? Oct 10, 2017 15:07 |
|
sourcetree has a bug in macos where it slowly consumes file handles until it tanks your system. sometimes even if you shut it down the handles still aren't freed up and you have to reboot
|
# ? Oct 10, 2017 15:26 |
St Evan Echoes posted:gitkraken is pretty good but i think it constantly runs git fetch or smth. it tanks my repo performance anyway , i never tried it with a repo exceeding single digit megabytes
|
|
# ? Oct 10, 2017 15:30 |
|
you could make a lot of money selling a well-performing graphical git tool to idiots
|
# ? Oct 10, 2017 15:48 |
CRIP EATIN BREAD posted:you could make a lot of money selling a well-performing graphical git tool to idiots *sights drawing keyboard*
|
|
# ? Oct 10, 2017 15:53 |
|
CRIP EATIN BREAD posted:you could make a lot of money selling a well-performing graphical git tool to idiots being an idiot that needs such a tool i might actually do this i've not made a gui that's not javafx or html though, so i don't know about "well-performing"
|
# ? Oct 10, 2017 16:33 |
HoboMan posted:being an idiot that needs such a tool i might actually do this javafx is ok-performing for a visual git thing, i think? just dont make another node.exe for the love of god
|
|
# ? Oct 10, 2017 16:36 |
|
|
# ? May 30, 2024 06:13 |
|
BONGHITZ posted:why do you program? Maximum Leader posted:its trash but i dont know anything better
|
# ? Oct 10, 2017 17:02 |