|
the superior vcs (hg) solves the rewrite issue but marking commits as unpublished or published. As long as you don't push your history you can rewrite it but after that it's much more restrictive. (there's also a 3rd "don't push this commit" state to make it easy to manage wip stuff)
|
# ? Sep 7, 2018 10:27 |
|
|
# ? Dec 7, 2024 05:30 |
|
Luigi Thirty posted:you write one template function in C++ and suddenly your whole world is internal compiler errors when it breaks ascended brain: uses C++ templates for generics galaxy brain: code:
|
# ? Sep 7, 2018 13:42 |
|
n-nooooooo I'm trying to do horrible things in C++ I have two classes, Texture and Model3D. they inherit from an abstract base class/interface IHasName which defines a virtual IsNamed search predicate for lookups which the classes implement. I keep track of textures and models in two vector<IHasName *> containers with a template function FindInVectorByName that converts the pointers to the correct type before returning the search result, i.e. you call FindInVectorByName<Texture>(vector_of_textures, "poop") and it returns a Texture * I know you can't directly cast IHasName * to Model3D * or Texture * but I'd like to enforce type-safety on my vectors so I don't end up with textures in my model vector if I gently caress up somewhere. this seems like a bad way of doing things. I need a C++ scholar here to tell me how to do this correctly because I think this is a terrible programming and I'm ready to move to Belize Luigi Thirty fucked around with this message at 13:52 on Sep 7, 2018 |
# ? Sep 7, 2018 13:49 |
|
cjs: well, I'm hosed. In Go, I'm consuming JSON data off a websocket. This data has a price field that is a decimal with fractions of pennies, so could be -0.000345 or whatever. Go does not have a decimal type in stdlib. So, now I have to basically roll-my-own JSON parser so I can get this loving value into my (third-party) decimal type field without having to drop it into a float and lose precision. Now, you might be wondering if there is some means to override parts of the JSON parser to handle this particular field with special fixed-precision kidgloves, and there is, but it won't let me parse a number field as a string. It returns an error in that case. Thus, I'm back to re-implementing JSON parsing. Calgon, take me away...
|
# ? Sep 7, 2018 14:23 |
|
if you want a vector that only has Textures in it then make it a vector<Texture*>?? FindInVectorByName already has some template parameter T so just make its first function parameter a vector<T*> instead of a vector<IHasName*> if you really insist on not knowing what's in your vector then you're going to have to use dynamic_cast and just eat the associated cost
|
# ? Sep 7, 2018 14:25 |
|
Luigi Thirty posted:n-nooooooo You don't need the interface to do this because FindInVectorByName already knows the type. This could look like this: class Texture { // your IsNamed predicate here, not virtual }; class Model3d { // your IsNamed predicate here, also not virtual }; template< typename T > const T* FindInVectorByName< const vector< T >& myVec, const char* myName ) { // iterate through myvec, call IsNamed to find if it's what you're looking for } Zlodo fucked around with this message at 14:32 on Sep 7, 2018 |
# ? Sep 7, 2018 14:29 |
|
Zlodo posted:You don't need the interface to do this because FindInVectorByName alrady knows the type. please don't post java
|
# ? Sep 7, 2018 14:30 |
|
Lime posted:if you want a vector that only has Textures in it then make it a vector<Texture*>?? FindInVectorByName already has some template parameter T so just make its first function parameter a vector<T*> instead of a vector<IHasName*> knowing what's in my vectors would be nice Zlodo posted:You don't need the interface to do this because FindInVectorByName already knows the type. doh ok I don't need the interface at all thanks
|
# ? Sep 7, 2018 14:40 |
|
Finster Dexter posted:Go does not have a decimal type in stdlib. what?
|
# ? Sep 7, 2018 15:10 |
|
Shaggar posted:what?
|
# ? Sep 7, 2018 15:14 |
|
brap posted:can someone explain to me how a commit gets "lost" in git because that has never happened to me work in detached head mode or break a rebase
|
# ? Sep 7, 2018 15:18 |
|
people who're talking about what people *should* and *shouldn't* do with a vcs is lovely please never design anything 'why would you need to do this thing, it works on my machine' that's great shut up like you need some history rewriting ability because people commit poo poo that *should* not have been committed and has to be purged, you loving muppets
|
# ? Sep 7, 2018 15:20 |
|
Finster Dexter posted:In Go, I'm consuming JSON data off a websocket. why are you wasting time with this when you should be converting to .Net?
|
# ? Sep 7, 2018 15:21 |
|
then the complete ignorance of 'well dont commit those wip commits' i am sorry i'm using a version control system like at the point where you'e not doing an OT model and merging keystrokes you're already lying about the history what gives
|
# ? Sep 7, 2018 15:23 |
|
or if you push a branch and it never gets merged you're not allowed to delete it ever because that's rewriting history.
|
# ? Sep 7, 2018 15:27 |
|
anyhow i bought a game engine architecture book and a linear algebra book and i'm enjoying both. i think i'm going to use opengl to draw graphs of the linear algebra stuff i'm learning.
|
# ? Sep 7, 2018 15:27 |
|
Back at a previous job, I had a real conflict of interest with myself between people who would be out sick on the last day of a sprint and hadn't pushed their latest changes vs. people who endlessly did "WIP" and "fix" commits and made blames completely worthless. And stupid BitBucket didn't have a "squash and merge" button on PR's, like GitHub does. Really, though, a lot of the problem was the dogma that everything always had to be released at the end of the sprint and nobody ever just bumped a ticket in the event of an illness or whatever. Still, it just made PR's loving complicated.
|
# ? Sep 7, 2018 15:29 |
|
rewriting history on master should absolutely not be part of your normal workflow. if someone pushes some sensitive information that shouldn't be there, there should be a way to remove it, but it should involve contacting someone who administers the server, and also writing a retrospective on how that sensitive information got there to begin with and what process changes can be made to prevent a similar fuckup from happening in the future. do whatever you like on your local vcs, though. that one's yours. the thing everyone else cares about is what commits you're pushing to master, which should absolutely not be your half-broken wip commits
|
# ? Sep 7, 2018 15:33 |
|
I like mercurial's approach of tracking what is a public and a private repository (or branches) and only allowing rewrite on stuff that is not marked as public (in order to avoid breaking the workflow of others)
|
# ? Sep 7, 2018 15:57 |
|
MononcQc posted:I like mercurial's approach of tracking what is a public and a private repository (or branches) and only allowing rewrite on stuff that is not marked as public (in order to avoid breaking the workflow of others) yeah that sounds real good, would like that in git.
|
# ? Sep 7, 2018 16:00 |
|
but don’t you want to be able to see my ~~workflow~~?
|
# ? Sep 7, 2018 16:01 |
|
DONT THREAD ON ME posted:yeah that sounds real good, would like that in git. depending on your remote backend, you can disable force pushes for specific branches
|
# ? Sep 7, 2018 16:13 |
|
hi its me, I'm the guy making GBS threads up the history with all his individual commits because idgaf i am a trash man squash em all 2018 etc etc.
|
# ? Sep 7, 2018 16:50 |
|
i found out git headers are a great way to smuggle information about because they're pretty much unseen in all of the tooling
|
# ? Sep 7, 2018 16:52 |
|
incredible. why does anyone use go?
|
# ? Sep 7, 2018 16:54 |
|
MononcQc posted:I like mercurial's approach of tracking what is a public and a private repository (or branches) and only allowing rewrite on stuff that is not marked as public (in order to avoid breaking the workflow of others) mercurial was the first distributed version control i used, and it was pleasant, and i was bummed when git exploded in popularity. i've learned the core commands i need to get work done with git, but once in a while, i have to deal with its complexity, and it's such a time-waster trying to figure it out
|
# ? Sep 7, 2018 17:12 |
|
for me most of gits shittiness comes from the fact that I have two dev machines since I work from home regularly. long lived branches can be ugly to manage if I work on them on both machines a few times.
|
# ? Sep 7, 2018 17:17 |
|
jit bull transpile posted:for me most of gits shittiness comes from the fact that I have two dev machines since I work from home regularly. long lived branches can be ugly to manage if I work on them on both machines a few times. i've gotten to the point where i push just about everything to my personal fork of the relevant repo, so syncing to another system is just a git pull
|
# ? Sep 7, 2018 17:18 |
|
carry on then posted:i've gotten to the point where i push just about everything to my personal fork of the relevant repo, so syncing to another system is just a git pull same, but sometimes one of my machines will just start refusing to recognize there's new commits to pull and I have to do voodoo to get it working again.
|
# ? Sep 7, 2018 17:25 |
|
jit bull transpile posted:same, but sometimes one of my machines will just start refusing to recognize there's new commits to pull and I have to do voodoo to get it working again. try installing a glide wrapper
|
# ? Sep 7, 2018 18:33 |
|
Shaggar posted:incredible. why does anyone use go? C++ doesn't have a decimal type either
|
# ? Sep 7, 2018 18:48 |
|
Finster Dexter posted:cjs: well, I'm hosed. ?
|
# ? Sep 7, 2018 19:50 |
|
Luigi Thirty posted:try installing a glide wrapper
|
# ? Sep 7, 2018 20:04 |
|
Luigi Thirty posted:try installing a glide wrapper I'm not loving the computer.. why would I need a lubricated condom?
|
# ? Sep 7, 2018 20:22 |
|
Luigi Thirty posted:try installing a glide wrapper I didn't realise we were in the velocity thread
|
# ? Sep 7, 2018 20:25 |
|
eschaton posted:there’s an informative comparison of Veracity with other distributed version control systems on its site love the key feature of skein
|
# ? Sep 7, 2018 21:08 |
|
Luigi Thirty posted:knowing what's in my vectors would be nice also, for future reference, when working with base classes, you can use dynamic_cast and the if assign approach to enter specific type blocks (as long as you know all the types or don't care about anything but one or two) Something like this if you're stuck with msvc 6 C++ code:
|
# ? Sep 7, 2018 21:15 |
|
pseudorandom name posted:C++ doesn't have a decimal type either SQL does and the guy who set up the SQL server at work used the type to produce large zero precision numbers, i.e. numbers with up to 18 decimals, with none after the decimal place.
|
# ? Sep 7, 2018 21:15 |
|
apparently I compiled stlport without RTTI lol, rip _cast functions I’ll rebuild it with RTTI and see if it works
|
# ? Sep 7, 2018 21:20 |
|
|
# ? Dec 7, 2024 05:30 |
|
redleader posted:i've heard people say poo poo like "history should be immutable because if i'm chasing a bug i need to ~understand the thought process~ that the original developer went through. if they rewrite history, i won't be able to read the total history to ~understand~ how the bug was introduced". you haven't ever done or needed to do this, gently caress you i have definitely been annoyed before irl at giant squashed "add feature x" commits that touch 300 files, because i was trying to figure out why line n changed, and it was very likely a "oh bar needs to be baz now because the frobnicator failed when i ran the tests" commit originally remove the wip garbage commits if you must but ffs merge don't squash and rebase
|
# ? Sep 7, 2018 21:22 |