• What are you working on? v67 - March 2017
    3,527 replies, posted
[QUOTE=DrDevil;52855818]Or use the git large file thingy[/QUOTE] You referring to this? [url]https://github.com/Microsoft/GVFS[/url] Edit: Oh shit pageking. I uhhh made this last year at GGJ [url]https://globalgamejam.org/2017/games/composer[/url] [IMG]https://ggj.s3.amazonaws.com/styles/feature_image__wide/games/screenshots/16245010_1363991943645379_839379003_o.png?itok=eRR4qtNt&timestamp=1485133185[/IMG]
[QUOTE=Handsome Matt;52856177]Pretty sure he means [URL="https://git-lfs.github.com/"]Git Large File Storage[/URL][/QUOTE] It looks interesting, but is this intended for things like workspace folders and stuff? I see the part about using pointers to files but how is the new data uploaded?
[QUOTE=Handsome Matt;52856546]Mainly intended for just large binary files, normally they would be stored in the Git repository itself which makes it slow and very large, instead a pointer file is stored instead and the actual file is elsewhere to be downloaded. The point of the extension is to make it seamless with the Git flow so you just upload new data like usual and GitHub's servers take care of it.[/QUOTE] I use BitBucket. I don't feel like paying for GitHub's private repositories and I like Mercurial.
[QUOTE=Adelle Zhu;52856681]I use BitBucket. I don't feel like paying for GitHub's private repositories and I like Mercurial.[/QUOTE] The [URL="https://www.mercurial-scm.org/wiki/LargefilesExtension"]LargefilesExtensio[/URL][URL="https://archive.is/7Gwg5"]n[/URL] is probably equivalent, but [URL="https://bitbucket.org/site/master/issues/3843/largefiles-support-bb-3903"]Bitbucket never added support[/URL][URL="https://archive.is/HKsNn"].[/URL]
I've used Git Large File Storage with Bitbucket and it worked perfectly. [url]https://confluence.atlassian.com/bitbucket/git-large-file-storage-in-bitbucket-829078514.html[/url]
Personally I think it would be better if the VCS core systems were upgraded to handle these files better. If I'm not mistaken, Hg's reflog format (and almost any other diffing format for that matter) already supports uncompressed raw blobs implicitly. Shallow clones are more of a problem, since Hg right now doesn't support snapshot transmission afaict. You could [I]probably[/I] still walk the history backwards until you have 'keyframes' for each file, but that's not efficient at all. The protocol is still flexible enough to allow fallback to the slow transfer from [I]0[/I] though, in which case the client would roll up the relevant changesets locally to save drive space. Anything else is supported by the existing protocol, I think.
This is hundreds of files I'm talking about here.
[QUOTE=Adelle Zhu;52857926]This is hundreds of files I'm talking about here.[/QUOTE] I'm pretty sure the industry standard in that case is Perforce :v: (:suicide:) DVCSs need a FastDL protocol extension. Keep the old system as fallback but also allow blob retrieval from a separate cache server.
We host our own [url=https://about.gitlab.com/]GitLab[/url] server in our office that also has Git Large File Storage enabled by default. They also support unlimited private repos for personal use so maybe give that a go?
Okay fuck it. I'll stick with Google Drive for now. It works for what I need it to do. In other news, I'm considering learning C#. I'm coming from Python but I feel the pain of a lack of low level interfaces. And GUI is a pain in the ass in Python and Qt. Python is also becoming too slow for my purposes. The software I designed for the lab I work in is slow and feels clunky, but I guess everyone has to start somewhere.
[QUOTE=Adelle Zhu;52859470]Okay fuck it. I'll stick with Google Drive for now. It works for what I need it to do. In other news, I'm considering learning C#. I'm coming from Python but I feel the pain of a lack of low level interfaces. And GUI is a pain in the ass in Python and Qt. Python is also becoming too slow for my purposes. The software I designed for the lab I work in is slow and feels clunky, but I guess everyone has to start somewhere.[/QUOTE] I'm not sure C# is really that great if you're looking for something low-ish-level. The trend is more in the opposite direction. Calling native code (C) is still somewhat messy in C# too, but at least you don't have to mess with any other language to do so. Calling native C++ is a problem by default, to say the least. GUI development in C# is pretty alright though. It could be better, but it works as long as you use VS.
"allocating 2TB of virtual address space in every 64-bit process is fine" -- someone at microsoft, apparently I love having to debug this shit. [editline]6th November 2017[/editline] (It's used for CFG, and it doesn't actually commit any memory for the unused regions, so ~in theory~ it shouldn't be a problem) It does seem to wind up slowly allocating more and more memory for the page tables for some reason though, slowly using up 6GB+. Someone didn't really think this through.
[QUOTE=Adelle Zhu;52859470]Okay fuck it. I'll stick with Google Drive for now. It works for what I need it to do. In other news, I'm considering learning C#. I'm coming from Python but I feel the pain of a lack of low level interfaces. And GUI is a pain in the ass in Python and Qt. Python is also becoming too slow for my purposes. The software I designed for the lab I work in is slow and feels clunky, but I guess everyone has to start somewhere.[/QUOTE] If you like low-level, don't go C#. If you want to build some nice desktop GUI, go for it.
[QUOTE=Adelle Zhu;52859470]Okay fuck it. I'll stick with Google Drive for now. It works for what I need it to do. In other news, I'm considering learning C#. I'm coming from Python but I feel the pain of a lack of low level interfaces. And GUI is a pain in the ass in Python and Qt. Python is also becoming too slow for my purposes. The software I designed for the lab I work in is slow and feels clunky, but I guess everyone has to start somewhere.[/QUOTE] Have you considered: [url]http://cython.org/[/url] ? It may be a useful step on the way if there are specific things you wish to speed up, and you can stick to python for the bits which don't need to be super fast :v:
[QUOTE=Adelle Zhu;52859470]Okay fuck it. I'll stick with Google Drive for now. It works for what I need it to do. In other news, I'm considering learning C#. I'm coming from Python but I feel the pain of a lack of low level interfaces. And GUI is a pain in the ass in Python and Qt. Python is also becoming too slow for my purposes. The software I designed for the lab I work in is slow and feels clunky, but I guess everyone has to start somewhere.[/QUOTE] I forget if you are experienced in C++ or not, but: if you need to speed things up I found writing code that has to be performant in C++ then exporting it via [URL="https://github.com/pybind/pybind11"]pybind11[/URL] into a python module works well. pybind11 is way less of a PITA than boost::python, both in terms of header/file bloat in your project and in terms of how easy it is to setup and use. shoutout to python though, still my go-to for scripting and quick tasks. I'm hoping to get to finish it this week, but I should have a python script working soon that will let me remove the godawful hungarian syntax from this code. Someone went so far as to add "C_" in front of every class (plus their accompanying header and source file) since its clearly so difficult to recognize when something is a class or not, and since I love confusion I'm making sure to remove that and the "mf_" in front of every member function.
[QUOTE=paindoc;52862268]I forget if you are experienced in C++ or not, but: if you need to speed things up I found writing code that has to be performant in C++ then exporting it via [URL="https://github.com/pybind/pybind11"]pybind11[/URL] into a python module works well. pybind11 is way less of a PITA than boost::python, both in terms of header/file bloat in your project and in terms of how easy it is to setup and use. shoutout to python though, still my go-to for scripting and quick tasks. I'm hoping to get to finish it this week, but I should have a python script working soon that will let me remove the godawful hungarian syntax from this code. Someone went so far as to add "C_" in front of every class (plus their accompanying header and source file) since its clearly so difficult to recognize when something is a class or not, and since I love confusion I'm making sure to remove that and the "mf_" in front of every member function.[/QUOTE] I've only used Java, Python and web stuff. I think I'm just gonna dive into C#. I can use it for a whole bunch of things.
[QUOTE=Socram;52844768]I use ST every day, and tend to think it the best balance of usability and power in the git UI world. That being said, is the full screening bug/top bar dragging/windowing bug on Windows that has been reported a million times and marked resolved ever going to get looked at and fixed? Serious question... I understand there are a million issues on ya'lls plate at any one time, but this seems like a really fundamental one that has been around for ages. (Scratch that, issue is open again but unassigned SRCTREEWIN-6983] [/QUOTE] already fixed in 2.4 which is in beta right now. you can [URL="http://product-downloads.atlassian.com/software/sourcetree/windows/beta/SourceTreeSetup-2.4.0-beta-0.exe"]download here [/URL]if you'd like. [URL="https://www.sourcetreeapp.com/update/windows/beta/ReleaseNotes_2.4.0-beta-0.html"]release notes here[/URL] -- there's a bit of perf fixes in this release so let me know if it works better. [QUOTE=Socram;52844768]And more general question, why do you guys keep overhauling the UI and changing icons?[/QUOTE] Sourcetree's UI didn't match the rest of the Atlassian products. We also make UI changes to surface specific features too. For example, in the old UI creating a repo on a remote account was... uh..[URL="https://blog.sourcetreeapp.com/files/2017/01/image2017-1-25_13-29-19.png"]difficult[/URL]. But there's other stuff we added with the UI changes too like per-monitor DPI support, and [URL="https://blog.sourcetreeapp.com/2017/01/27/sourcetree-for-windows-2-0-is-now-in-beta/"]readability improvements[/URL]. [editline]6th November 2017[/editline] [QUOTE=Karmah;52846652]Couldn't agree more. The only thing I wish the official git app had was showing all the branches and commits in a diagram like ST has[/QUOTE] ST can also squash and rebase visually, which the github app doesn't even try to touch with a 10ft pole (and for a good reason).
I just wish SourceTree didn't randomly start crashing on startup, and that it removed old files from previous updates.
Polygon filling is going about as well as could be expected... [img]https://i.imgur.com/kCHKB4r.png[/img] Edit: Figured it out. Do you see what's wrong with this line? [code] if(&points[i - 1].y <= &points[i].y) [/code] Changing it to this: [code] if((&points[i - 1])->y <= (&points[i])->y) [/code] Fixes it. I know operator precedence gets weird in C++ when you're dereferencing things or whatever... but that's not what I don't understand. What I don't understand is why it compiled in the first place, since I should have been using '->' to access y, and it rightly doesn't let me use '.' after I put parenthesis around (&points[i])? I guess it was doing &(points[i].y), but isn't that also wrong?
I think you were comparing the addresses of the y member, can't be sure without knowing what points[] is.
[QUOTE=Adelle Zhu;52863009]I've only used Java, Python and web stuff. I think I'm just gonna dive into C#. I can use it for a whole bunch of things.[/QUOTE] I've been doing c# for a while now because of my education, and I absolutely love it. Also Visual Studio is pretty nice to use
[QUOTE=Kybalt;52865236]Polygon filling is going about as well as could be expected... [img]https://i.imgur.com/kCHKB4r.png[/img] Edit: Figured it out. Do you see what's wrong with this line? [code] if(&points[i - 1].y <= &points[i].y) [/code] Changing it to this: [code] if((&points[i - 1])->y <= (&points[i])->y) [/code] Fixes it. I know operator precedence gets weird in C++ when you're dereferencing things or whatever... but that's not what I don't understand. What I don't understand is why it compiled in the first place, since I should have been using '->' to access y, and it rightly doesn't let me use '.' after I put parenthesis around (&points[i])? I guess it was doing &(points[i].y), but isn't that also wrong?[/QUOTE] What is "points"? What are point objects? What are you doing once you see how point Y coordinates compare? I'm willing to bet a few bucks something in <algorithm> can help you here. &points[i] = address of point at i &(points[i].y) = address of variable y in point at i (&points[i])->y = break this down into two parts, &points[i] = address of thing at i. Which means you need to use -> to access elements, since you're now dealing with pointers. Why aren't you just using the regular access syntax? is this a C-style pointer array or a std::vector or std::array? At first you were checking if the address of the element at i - 1 is less than the address of the element at i: I [I]think[/I] this should always be true in debug mode since the vector will just store data in an entirely linear and contiguous fashion, but this could change in release mode due to optimizations and such. I could also be completely incorrect on this point. This all smells like C-style C++ code, which given how much of it I see at work may be becoming one of my triggers [editline]edited[/editline] I don't like shooting for a minimum viable product, even if I have to for the sake of contract funds and such: there are lots of things in this codebase I want to fix, from 1200-line long constructors to C-style arrays and classes that practically generate dangling pointers + memory leaks as their primary feature.
So in class today we had a test that was literally he gave us a broken program and we had to make it work. Same professor as before, we're programming for the MSP430 microcontroller right now. Went as well as expected. I noticed that on a line it said: [code] P1DIR = 0x08; [/code] Now, the program was supposed to be defining a switch as BIT3, aka 0x08, so I was like, uhm, no, this is wrong, we should be setting up P1IN to 0x08. But the test said we can't add lines or anything like that, just altering lines. So upon clarification with another error I had found before, he didn't want us basically to change the "left side" of lines. Which is stupid but I kinda understand why, makes it easier to grade I suppose. Unbeknownst to him, this little error would ruin the test for everyone. Pushbutton 1 would [U][I]/never/[/I][/U] work because the if statement to evaluate its condition was going to be referencing something that hadn't even been given an initialisation to 0. So, basically no one's code was ever going to work because the msp430 didn't even know anything was on pin 1.3. Fast forward an hour and a half later, the test was supposed to be done in 30 minutes, no one could figure out what was wrong, he was looking over shoulders and couldn't figure it out either. Then he realised it, "oh, okay everyone, line 17 is supposed to say P1IN = 0x08, you can change that one! I'll give you all free points on that one." Then he asked me what I had done, since I had just got mine fully debugged and was turning it in. "How did you get it to work if you didn't change it to P1IN?" he then asks me, surprised that I had turned it in. [code] P1DIR &= ~0x08; [/code] I don't fucking know mate, you're the professor, you tell me. I just figured maybe since P1IN was classically used with positive assignment, and P1DIR was used with positive assignment, if I told it to do an inverse it might just work as an input instead because the opposite of out is in. I was grasping for straws to be honest, I have no idea why it worked, or if it even [I]should[/I] work. I just know that it worked. Fucking professor can't even write broken code right.
Yesterday after struggling a whole lot with bone children, I found a tutorial that showed the important part that I was missing (Correct matrix multiplication). And with that, bone animations finally works: [vid]https://giant.gfycat.com/PalatableBiodegradableKoi.webm[/vid] Now to make it in a useful way instead of hacking it together in a "At least it works"-way.
Well I feel a little humbled. After spending the past few days perusing papers implementing equations "Uniform Representation of the Gravitational Potential and its Derivatives", I have found that I made a simple mistake. Granted, the implementations are all in sorta awful languages (BASIC, FORTRAN, and Matlab), but I probably shouldn't have assumed that [I]they[/I] were slightly wrong and I was right. I kept plugging in values to my gravity model and getting really really tiny answers back - and the accelerations returned would be incorrect in direction too (where I expected accel only in X, I'd get it in Y, etc). The correct version is simple: [cpp] const Vect central_body_term = (-planet_mu / std::pow(pos_mag, 3.0)) * position; const Number a_x = central_body_term[0] + (g1 - g4 * s_); const Number a_y = central_body_term[1] + (g2 - g4 * t_); const Number a_z = central_body_term[2] + (g3 - g4 * u_); [/cpp] The central body term is the vital part, and is what I [I]really[/I] fucked up. g1-g4 are effectively just "detail" components of the final acceleration value - they really just exist to correct the central body term. The central body term is just your usual gravitational force (Gravity constant * Planet mass / distance squared), but dividing by a unit vector (dividing by distance cubed instead of squared) then multiplying by the current position of the satellite in its orbit gives the base accel as a vector instead of a scalar value. Then we just add our refining values and there we go, we have what we need to plot trajectories within kilometers of the lunar surface. I was finding an entirely incorrect "central_body_term": instead I treated it as multiplicative scaling factor for g1-g4, not an additive baseline factor. [cpp] const Number scale_factor = -planet_mu / (planet_radius * pos_mag); [/cpp] I don't even know how I got to this. It doesn't really even make sense - instead of doing (G*M / orbit radius^2) I'm dividing by (Planet radius * orbit radius). And at some point, I should have suspected that I was doing things wrong given that g1-g4 were quite small and no one else did what I did. But no. I know best :s: [sp]a lot of this could have been easily avoided if scientists were better about naming their variables, they're brilliant at math and science but using three-letter variables and obsfuscated acronyms is just something they always seem to do![/sp]
Did some speed-shadering trying to imitate an [url=http://kingsanda.tumblr.com/image/167236041347]image[/url] I found online. My result: [url=https://www.shadertoy.com/view/MtjyWV] [t]https://my.mixtape.moe/rcbiwu.png[/t] [/url] [url=https://www.shadertoy.com/view/MtjyWV]VHS Prism[/url] The perspective is a bit off, and I couldn't get the grainy effect the way I wanted it to, but I'm overall satisfied. I've spent 2 hours making it.
[QUOTE=DrDevil;52871156][B][U]2 hours[/U][/B][/QUOTE] :wideeye: :scream:
Preview on my next shader [t]https://my.mixtape.moe/rneqwt.png[/t] That's some volumetric light ray... in SPACE!
Those are really cool shaders. I suck at authoring my own unique ones; so far I've mostly just done basic things or derived my shaders from research papers Hopefully one day when I graduate :surrender:
[QUOTE=Karmah;52873818]Those are really cool shaders. I suck at authoring my own unique ones; so far I've mostly just done basic things or derived my shaders from research papers Hopefully one day when I graduate :surrender:[/QUOTE] Well, some of the stuff I use is heavily inspired by other work. For example, I took the function to generate the stars from another shadertoy submission (with appropriate attribution of course, and a link back to their submission). It looked kinda nice, but he had the star density constant over the entire canvas, which made it very bland and unappealing. So I applied a varying density field and random colorization to it, and presto, it actually looks surprisingly amazing!
Sorry, you need to Log In to post a reply to this thread.