Okay, let's be frank. Who here has looked at the technical vocabulary of our field and thought "This is a weird word for that concept. I could do better"?
Like, look at "library" (and I'm only partially saying this because looking up "MIDI file programming library" generally gives half programming results and half MIDI file archives). Why are a bunch of functions/classes not strung together by a program called a "library" and not, say, a "toolbox"? Heck, why aren't certain classes meant to be used as-is (or out-of-the-box) simply called "tools" or "tool classes"? Hell, why is it called a "class" and not a "blueprint"?
Ugh, my profession irritates me sometimes, I swear.
Wikipedia says we use the term library since some of the architectures of 'modern' computing imagined libraries / shelves full of subroutines that people could basically check out.
Okay, let's be frank. Who here has looked at the technical vocabulary of our field and thought "This is a weird word for that concept. I could do better"?
Like, look at "library" (and I'm only partially saying this because looking up "MIDI file programming library" generally gives half programming results and half MIDI file archives). Why are a bunch of functions/classes not strung together by a program called a "library" and not, say, a "toolbox"? Heck, why aren't certain classes meant to be used as-is (or out-of-the-box) simply called "tools" or "tool classes"? Hell, why is it called a "class" and not a "blueprint"?
Ugh, my profession irritates me sometimes, I swear.
I often have found myself getting caught on trying to understand nomenclature. For a long time, I had a hard time understanding and remembering what a "callback" was. Once I understood it, the term "handler" made more sense to me. Now every time I see "callback" I substitute it for "handler" in my head.
Wikipedia says we use the term library since some of the architectures of 'modern' computing imagined libraries / shelves full of subroutines that people could basically check out.
Wikipedia says we use the term library since some of the architectures of 'modern' computing imagined libraries / shelves full of subroutines that people could basically check out.
/modules/foo/CMakeLists.txt
/modules/foo/src/...
/modules/foo/test/test.cc
/test/CMakeLists.txt
/test/... (other test code)
Right now, I produce a module_foo library, a module_foo_test library that links against module_foo and the main test binary can link against that library, but because how googletest interacts with linking rules all the tests get dropped because they rely on c++ static initializers being run without being referenced
One option could be to explicitly reference test.cc in the main test binary's rule, but referenceing something like ../../modules/foo/test/test.cc is kinda ugly. --whole-archive does what I want (include all of the object files directly) but I don't know if I can just turn it on for the one library, though if I can't just do it for just the one I guess that's fine
/modules/foo/CMakeLists.txt
/modules/foo/src/...
/modules/foo/test/test.cc
/test/CMakeLists.txt
/test/... (other test code)
Right now, I produce a module_foo library, a module_foo_test library that links against module_foo and the main test binary can link against that library, but because how googletest interacts with linking rules all the tests get dropped because they rely on c++ static initializers being run without being referenced
One option could be to explicitly reference test.cc in the main test binary's rule, but referenceing something like ../../modules/foo/test/test.cc is kinda ugly. --whole-archive does what I want (include all of the object files directly) but I don't know if I can just turn it on for the one library, though if I can't just do it for just the one I guess that's fine
Yes I am a CMake person.
module_foo_test should be an OBJECT library so that all the .o get slammed into the final test executable instead of using an archive.
/modules/foo/CMakeLists.txt
/modules/foo/src/...
/modules/foo/test/test.cc
/test/CMakeLists.txt
/test/... (other test code)
Right now, I produce a module_foo library, a module_foo_test library that links against module_foo and the main test binary can link against that library, but because how googletest interacts with linking rules all the tests get dropped because they rely on c++ static initializers being run without being referenced
One option could be to explicitly reference test.cc in the main test binary's rule, but referenceing something like ../../modules/foo/test/test.cc is kinda ugly. --whole-archive does what I want (include all of the object files directly) but I don't know if I can just turn it on for the one library, though if I can't just do it for just the one I guess that's fine
Yes I am a CMake person.
module_foo_test should be an OBJECT library so that all the .o get slammed into the final test executable instead of using an archive.
Okay that fixes the link issue, but I'd like to be able to add some include paths and without calling target_link_libraries (which seems to cause issues with object libraries) target_include_directories seems to have no effect
Holy crap things have gotten massive. An Unreal Engine build on the ue5 experimental branch + a debug game editor build clocks in at 210 GB. Between that, a normal UE4 build and a hundred GB from having all of LLVM compiled in debug no wonder I'm out of space on that SSD
It probably would be significantly smaller if I just installed the prebuilt ones they make available but if they're gonna give me C++ source to a quality game engine I'm gonna compile it from source so I can poke around in it!
GnomeTankWhat the what?Portland, OregonRegistered Userregular
I have a serious love/hate relationship with Rust at this point. I love what it's trying to do, I think it's goals are great and it has some wonderful features...but I hate the syntax in a lot of cases. And I hate having to constantly fight the compiler and it's very obtuse error messages that assume you already know the Rusty-ass-rust way to do something.
Someone is going to take the next logical step here and write a language that provides a lot of Rusts data guarantees but without a compiler that hates you and wants you to get nothing practical done.
I have a serious love/hate relationship with Rust at this point. I love what it's trying to do, I think it's goals are great and it has some wonderful features...but I hate the syntax in a lot of cases. And I hate having to constantly fight the compiler and it's very obtuse error messages that assume you already know the Rusty-ass-rust way to do something.
Someone is going to take the next logical step here and write a language that provides a lot of Rusts data guarantees but without a compiler that hates you and wants you to get nothing practical done.
I was learning Rust for fun some months ago and one thing I found really hard to understand was the crate/packaging system. I like though how with borrowing/ownership, it makes you think about how memory is being allocated and used, even though it can be a bit tricky sometimes.
C# is a good language which is filled with baffling design omissions
Auto-properties are one of them. What is an autoproperty you ask? It's when you write this:
namespace MyProgram {
public class MyClass {
public string MyProperty { get; set; }
}
}
Now, this primarily exists so you can do things like make the setter private or whatever so you can make a read-only "variable-like" thing.
But here's an obvious thing you'd also like to do with this syntax: filter the setter in some way. In my specific case I'm doing COM-interop with VBA, and so to pass a sensible thing onto the JSON library I'd really like incoming DateTime's to be forced to be interpreted as Local - since this is what they are. Simple, literally does not change value change.
You would think that this would be allowed syntax:
namespace MyProgram {
public class MyClass {
public string MyProperty { get; set => FilterFunc(value); }
}
}
And you would be wrong. That one simple change suddenly explodes into this monstrosity:
namespace MyProgram {
public class MyClass {
private string _MyProperty;
public string MyProperty { get => _MyProperty; set => { _MyProperty = FilterFunc(value); } }
}
}
An extra variable, namespacing concerns, more brackets and whatever else. Just...why? Why do this?
0
Options
LuvTheMonkeyHigh Sierra SerenadeRegistered Userregular
That's changing in C# 10! New 'field' keyword added to access the backing field of auto-implemented properties without dropping to the full syntax:
class Person
{
public string Name { get; init => field = value.Trim(); }
public DateTime DateOfBirth { get; set => field = value.Date; }
}
I am sad that the Discriminated Unions proposal is not making it into C# 10, I'd really like to have that functionality.
Having spent a decent amount of my time at my new job working with Typescript on React. Going back to C# has me missing unions haaaaard. There's all this new wiring in my brain that just doesn't work.
GnomeTankWhat the what?Portland, OregonRegistered Userregular
Part of the reason that TypeScript works is that it has a wildly flexible type system. If it was too rigid you couldn't express the wild-west of interfaces that JavaScript allows.
Yeah, I've no idea how the types systems of either language works under the hood. But I can imagine that trying to shoehorn union types into a language that's been strictly typed from the bottom up can be no easy task.
There's just been a good few times over the last weeks where I'm coding with a solution in mind before realising that no, I can't do that part at all!
Hopefully it's just back end work for me for a while so I can get my knuckle dragging mojo back!
So how do you guys use git's cherry pick? We have 3 branches:
production
master
bug-fix
In bug-fix branch I made a change that needs to go to production today. Unfortunately it's been branched from master and contains stuff that isn't ready for production. So all I need is production to have the changes I made in bug-fix. Without causing issues on the next production deployment.
So how do you guys use git's cherry pick? We have 3 branches:
production
master
bug-fix
In bug-fix branch I made a change that needs to go to production today. Unfortunately it's been branched from master and contains stuff that isn't ready for production. So all I need is production to have the changes I made in bug-fix. Without causing issues on the next production deployment.
Sounds like you created your fix branch incorrectly, should be made off a release branch/tag and then the fix cherry-picked into it.
You can make your fix on the fix branch directly and then cherry-pick to master, but that tends to end up with more regressions from missed fixes. If you do it onto master (like your sorta have?) then cherry-pick it into your fix branch (off release branch/tag as mentioned) then you get the same result but without the ability to miss merging back into mainline.
You're very unlikely to miss putting the commit in your fix branch you're releasing right away. :P
0
Options
KakodaimonosCode fondlerHelping the 1% get richerRegistered Userregular
Save yourself a headache and create a branch (hotfix or whatever you want to call it) from production. Cherry pick the change from bug-fix into your newly created branch. If there's no merge issues, commit & push and then either merge or do a pull request from the hotfix branch you created into production.
Doing a cherry pick into the intermediate branch makes it easier if you have any merge conflicts that need resolved.
So how do you guys use git's cherry pick? We have 3 branches:
production
master
bug-fix
In bug-fix branch I made a change that needs to go to production today. Unfortunately it's been branched from master and contains stuff that isn't ready for production. So all I need is production to have the changes I made in bug-fix. Without causing issues on the next production deployment.
Sounds like you created your fix branch incorrectly, should be made off a release branch/tag and then the fix cherry-picked into it.
You can make your fix on the fix branch directly and then cherry-pick to master, but that tends to end up with more regressions from missed fixes. If you do it onto master (like your sorta have?) then cherry-pick it into your fix branch (off release branch/tag as mentioned) then you get the same result but without the ability to miss merging back into mainline.
You're very unlikely to miss putting the commit in your fix branch you're releasing right away. :P
Yeah the bug-fix branch was created off master because our production release was last night and I need to also push it to UAT for testing (we have CI/CD setup) and I didn't realize that there were possible breaking changes pushed to master in the last 12 hours lol.
Posts
That's great, Jaeger has to have my all time favourite logo. So much determination on his fuzzy little face.
http://steamcommunity.com/id/pablocampy
Like, look at "library" (and I'm only partially saying this because looking up "MIDI file programming library" generally gives half programming results and half MIDI file archives). Why are a bunch of functions/classes not strung together by a program called a "library" and not, say, a "toolbox"? Heck, why aren't certain classes meant to be used as-is (or out-of-the-box) simply called "tools" or "tool classes"? Hell, why is it called a "class" and not a "blueprint"?
Ugh, my profession irritates me sometimes, I swear.
https://en.wikipedia.org/wiki/Library_(computing)
I often have found myself getting caught on trying to understand nomenclature. For a long time, I had a hard time understanding and remembering what a "callback" was. Once I understood it, the term "handler" made more sense to me. Now every time I see "callback" I substitute it for "handler" in my head.
Was that back when they were stacks of cards?
"Aww, you're out of if/else?"
I have some code structured like this
/modules/foo/CMakeLists.txt
/modules/foo/src/...
/modules/foo/test/test.cc
/test/CMakeLists.txt
/test/... (other test code)
Right now, I produce a module_foo library, a module_foo_test library that links against module_foo and the main test binary can link against that library, but because how googletest interacts with linking rules all the tests get dropped because they rely on c++ static initializers being run without being referenced
One option could be to explicitly reference test.cc in the main test binary's rule, but referenceing something like ../../modules/foo/test/test.cc is kinda ugly. --whole-archive does what I want (include all of the object files directly) but I don't know if I can just turn it on for the one library, though if I can't just do it for just the one I guess that's fine
Yes I am a CMake person.
module_foo_test should be an OBJECT library so that all the .o get slammed into the final test executable instead of using an archive.
Okay that fixes the link issue, but I'd like to be able to add some include paths and without calling target_link_libraries (which seems to cause issues with object libraries) target_include_directories seems to have no effect
You will want to upgrade to CMake 3.12+ and those issues will go away
That demo really was something else though. First time in a while where I feel like I've been blown away by an engine.
http://steamcommunity.com/id/pablocampy
Yup, Unity for me because I do not have Terabytes of hard drive space to work with.
Someone is going to take the next logical step here and write a language that provides a lot of Rusts data guarantees but without a compiler that hates you and wants you to get nothing practical done.
I was learning Rust for fun some months ago and one thing I found really hard to understand was the crate/packaging system. I like though how with borrowing/ownership, it makes you think about how memory is being allocated and used, even though it can be a bit tricky sometimes.
Hello me, how are you doing?
http://steamcommunity.com/id/pablocampy
Auto-properties are one of them. What is an autoproperty you ask? It's when you write this:
Now, this primarily exists so you can do things like make the setter private or whatever so you can make a read-only "variable-like" thing.
But here's an obvious thing you'd also like to do with this syntax: filter the setter in some way. In my specific case I'm doing COM-interop with VBA, and so to pass a sensible thing onto the JSON library I'd really like incoming DateTime's to be forced to be interpreted as Local - since this is what they are. Simple, literally does not change value change.
You would think that this would be allowed syntax:
And you would be wrong. That one simple change suddenly explodes into this monstrosity:
An extra variable, namespacing concerns, more brackets and whatever else. Just...why? Why do this?
No that's for exceptions.
electricitylikesme does not deserve to catch that kind of guff.
Come on, you're not even trying with that pun.
http://steamcommunity.com/id/pablocampy
Having spent a decent amount of my time at my new job working with Typescript on React. Going back to C# has me missing unions haaaaard. There's all this new wiring in my brain that just doesn't work.
http://steamcommunity.com/id/pablocampy
There's just been a good few times over the last weeks where I'm coding with a solution in mind before realising that no, I can't do that part at all!
Hopefully it's just back end work for me for a while so I can get my knuckle dragging mojo back!
http://steamcommunity.com/id/pablocampy
production
master
bug-fix
In bug-fix branch I made a change that needs to go to production today. Unfortunately it's been branched from master and contains stuff that isn't ready for production. So all I need is production to have the changes I made in bug-fix. Without causing issues on the next production deployment.
git cherry-pick <bug-fix sha>
git checkout production
git cherry-pick -f
??? noo there's no way.
Sounds like you created your fix branch incorrectly, should be made off a release branch/tag and then the fix cherry-picked into it.
You can make your fix on the fix branch directly and then cherry-pick to master, but that tends to end up with more regressions from missed fixes. If you do it onto master (like your sorta have?) then cherry-pick it into your fix branch (off release branch/tag as mentioned) then you get the same result but without the ability to miss merging back into mainline.
You're very unlikely to miss putting the commit in your fix branch you're releasing right away. :P
Doing a cherry pick into the intermediate branch makes it easier if you have any merge conflicts that need resolved.
Yeah the bug-fix branch was created off master because our production release was last night and I need to also push it to UAT for testing (we have CI/CD setup) and I didn't realize that there were possible breaking changes pushed to master in the last 12 hours lol.