« first day (2235 days earlier)      last day (1253 days later) » 

8:08 AM
I will never do TDD ever :p
 
8:33 AM
Bonjour!
 
8:51 AM
Morning
 
Morning (especially @Stargateur)
2
 
@Stargateur IMO the secret to TDD (which no one mentions as far as I'm aware of) is timing. If you're in the phase of your software, where you mainly introduce dependency updates, feature improvements which are straightforward, or bug fixes which does not require new features along with it, then TDD is great and insanely helpful and valuable.
But if you're in the early phase of the software (or a specific new feature), where you experiment with everything, you have no idea how things will turn out and you need the flexibility to tear down half of what you already implemented and start all-over-again, then TDD is actually your worst enemy and it is anything but helpful. So, as always, choose your weapons wisely, depending on your situation.
 
9:11 AM
I like situations.
 
@PeterVaro I like test, I don't like TDD
 
@Stargateur As I said, there's nothing wrong with it, it is for maintenance kind of work, not for experiments or early design phases. There's no silver bullet. Just out of curiosity, what exactly is that you don't like about it?
 
@PeterVaro well, first I like test but I stand with Dijkstra about them, I think TDD doesn't improve code, but only encourage people to make the test work, this mean people think even less to make good code, or to not use bad practice. I continued the serie of this uncle bob (very US name :p) youtu.be/58jGpV2Cg50?t=2738. And I can't agree with this code, there is a lot of thing to improve, avoid side effect avoid multiple exit point, avoid use size++ or --size. I mean I could continue ...
 
I do TT LSD : that is local sporadic TDD. I use TDD on isolated problems, when I feel it's useful.
 
there is in these 15 lines of code a lot of problem that he don't care or even accept to recognize as problem, all he care was the test was passing
also he advice no bracket on if
I think it's more important to learn to make better code, test are secondary, your code should be build to avoid bug
test are only a plus
that exactly why I like rust BTW, it's allow be to force my code to be correct
also he is saying we didn't have any big progress in coding since 40 years, I couldn't disagree more
 
9:22 AM
@Stargateur I believe that's the baseline for me. If you can't have that, it doesn't matter what else you do with the code base, what trendy best practices you follow. I thought this goes without saying ;)
That being said, I naturally agree with you that people whose sole purpose is to make tests pass are people I don't really want to work with...
@DenysSéguret What do you have in mind?
 
@PeterVaro drugs
4
 
@PeterVaro but that not at all what TDD advice, for example in the video he "return true" for isEmpty, I don't think that good, I could imagine a way to make a structure name "SizeOfMyStack" that will handle my size, a little extreme, but I think it's better to try to have a way to compile time check that my code is correct than have 150 prewrite test that will maybe warn me I break the code but that still force me to debug
 
@PeterVaro Hum, that's how I somewhat felt when going through that Clean Code book a long time ago. Parts of it felt very dogmatic from what I can recall.
 
@DenysSéguret :upside_down_smile:
 
in the video he said, "how many time you spend debuging" well, almost zero and I have very few tests....
I maybe the only one here that have no idea how to use gdb
@DenysSéguret drugs is not a solution, it's THE solution
I'm talking about coffee of course
 
9:26 AM
@Stargateur I have used it a few times, but I am almost sure I don't know how to use it efficiently.
 
@Stargateur Always think about in context: for languages, say Python, it makes perfect sense to test the hell out of a single property, because of the insane runtime flexibility and hackability of the language things could change in various ways. In Rust, I write 90% less test code than with Python. And that's natural, because I push as much as I can on the type system, because the language has this feature and it is damn good at that (even though, not perfect.. yes, I'm looking at you GAT)
 
@PeterVaro yes, but you shouldn't write any pythin thing that are bigger than <insert_here_a_resonable_size>, C have less compile time check than Rust, I write a lot of C program without need of a lot debug time, because I follow rule that help me write good code, rule I improve myself overtime.
 
@Jason CC is so full of shit IMO :)
2
 
even in the lesson 1 of this uncle bob he ask "where do you put variable in C ?" "in top", no, no, and no. I feel a lot of people like uncle bob are not so bad programmer but fail to learn better code practice and instead use thing like TDD. I think it's a mistake to think TDD or test is the future
 
@Stargateur Agreed with the Python part, not with the C part though. When I actively wrote C, I wrote loads of tests, much more than with Rust, but of course far less than with dynamic languages. Even when I used the standard on a daily basis, I was still not that confident that what I write will not have weird behaviour on an obscure platform.
@Stargateur Well, that just demonstrates the inability of this Uncle Bob character to evolve. It feels like he stuck in the 90s
 
9:39 AM
@PeterVaro well, he use JAVA :p but I don't like much its advice about code, but I like a lot its opinion on company relation with code and its advice about deal with manager as a dev
 
9:55 AM
@PeterVaro GAT
 
Rust is beautiful but it's far from perfect, and it's not just about GAT. Rust is only the best language so far.
 
Rust 2.0: better strong without - in crate name
 
10:33 AM
@Stargateur I've learnt one thing and one thing alone during the last 5-7 years working for various startups and tech companies: if you are serious about engineering and craftsmanship, you don't want to work for a company where there's no technical representative in the upper management (CxO level person, or "Director" or "Head")
If you don't have that, that company will ALWAYS make the worst decisions when it comes to managing engineers
and will always prefer shortcuts and quick and easy wins (from a business perspective) over anything else
@DenysSéguret I couldn't help myself but agree with you. I love writing Rust, but at the same time, loads of things just feels clunky. And I'm not necessarily talking about purely the syntax, but an overall feel, you know when you have a thought like 'Oh I wish this wasn't a workaround' or 'I'd prefer this without the bloat'
There are still plenty of inconsistencies and rough edges.
But as you said, this is the best we came up with so far. I couldn't think of a more enjoyable language at this point.
 
my issue is that github.com/rust-lang/rust/issues number is still growing
I feel like the compiler don't get refactor, just get patch and patch and ugly fix to make it work
I would like we do a "stop new big feature and clean all"
and I mean clean is clean, no, todo, no fixme, we take 5 years if needed we clean all
 
Fearless Refactoring
 
10:54 AM
@Stargateur On the one hand, I would very much support that, actually.. On the other hand though, I would like to see all the major improvements of const contexts, GAT, and proper macro syntax (and removal of decl- and proc-macros)
 
@PeterVaro I mean we need to decide what feature we finish, and really stop trying adding new feature
 
Agreed.
I would vote first and foremost for a proper macro-system. Once you have that, you can emulate a myriad of features (if not all) implemented first as macros and then later on they can be implemented as standalone features
 
 
3 hours later…
2:08 PM
Hello guys, is anyone else using the GCC toolchain on Windows and debugging with GDB and the C/C++ for Visual Studio Code extension? During debugging, it does not show String, OsString, Vec, ArrayVec etc. like an array, instead I see some implementation details like an "inner" member or some pointer and a count member. Not even slices work! Is it just not supported? Does everyone just use LLDB instead?
 
2:23 PM
@purefanatic Is your setup using rust-gdb for debugging? Without a bit of extra settings found in this script, Rust structs won't be pretty-printed.
 
@E_net4isbeingimpersonated I recall installing or using rust-gdb as well, and it worked great on my end, although I'm using neovim. It's been some time since I've used it to debug though.
I thought someone at first made a joke about this compiling down to multiplication in C, but it actually … works?
int multiply(int a, int b) {
    char x[a][b];
    return sizeof x;
}
 
@Jason It is true indeed.
 
@purefanatic I'm using GDB, mainly because of the brilliant GDB-dashboard module. As Enet said, you need rust-gdb if you only want to look at a String as if it was a string-literal. Otherwise, as you noticed, it will show you all the internals -- sometimes that could be very, very useful though
 
Never underestimate the things a compiler can (and will) do to overwhelm you.
 
@E_net4isbeingimpersonated I use Mingw-w64's GDB, does that matter too?
 
2:34 PM
@purefanatic Maybe, but I would not know. Some people have had to upgrade the debugger for things to work.
 
@E_net4isbeingimpersonated Ah I didn't even understand what you were referring to at first. How would I include this script in my Visual Studio Code?
 
It would depend on how that extension works. If there isn't a setting somewhere for configuring gdb, perhaps you may want to try a different extension.
 
@Jason Well it depends on variable length arrays, a feature that MSVC never supported and that is not required by C11 anymore because it was never a good idea anyways...
 
2:55 PM
@purefanatic Ok, perhaps I have deciphered how "I" installed it.
> rust-gdb and rust-lldb are wrapper scripts that will start GDB or LLDB with Rust pretty printers enabled. They are part of any recent Rust installation on Linux and Mac OS X.
I'm not sure of much help that is. The author mentions the following on their blog post, but looking at the feed.xml it was published in 2015:
> On Windows rust-gdb is not installed by default because GDB has sometimes been rather unstable on this platform. You can still give it a try by running the rust-gdb script file found in src/etc/ in a MinGW shell.
 
3:11 PM
@Jason So I guess you have rust-gdb in your launch.json instead of just gdb? I think I might need to emulate the behaviour of this script as Windows will not launch any .sh for me...
 
@purefanatic There's a thread on the issue that I just stumbled upon github.com/rust-lang/rust/issues/29658
 
3:31 PM
Time to regret posting answers.
 
@purefanatic No, I'm on Linux and using neovim. I don't think I've used vscode to debug before.
 
3:46 PM
@Jason don't use VLA, sizeof is size_t not int
omg I just read what you said
my heart is bleeding
 
@Stargateur Ha, ah, I'm not very familiar with C to be honest. Funny enough @purefanatic pointed that out as well.
@Stargateur You have summoned gdb issues. I didn't know getting it to work on Windows was that complicated.
 

« first day (2235 days earlier)      last day (1253 days later) »