|
I like programming. Programming is not terrible, it is in fact cool. Capitalization suggests this post is unironic
|
# ? Oct 20, 2015 10:47 |
|
|
# ? May 24, 2024 18:19 |
|
thanks. can't give this a proper reading now but i will later
|
# ? Oct 20, 2015 11:25 |
|
hackbunny posted:I like programming. Programming is not terrible, it is in fact cool. Capitalization suggests this post is unironic The missing trailing full stop puts the lie to your sincerity.
|
# ? Oct 20, 2015 12:42 |
|
my ideal of programming is the starship enterprise (NCC 1701 D). serious. I rewatched tng a few years ago and it honest to god made me rethink programming the enterprise's systems are so flexible! you can monitor, enable, disable, reroute any subsystem in real time! you can reconfigure everything, it's great. it's really hard to program like that, I realized, I just don't have the tools. one time I was so frustrated with multi-threading in C that I dreamed an environment where you'd spawn subprograms instead of threads, it just seemed a more natural model for C. inter-process communication would be absolute garbage of course, because C's type system is "let's give a name to this range of bytes in memory", so it would probably take a whole new language to have something better than UNIX where everything eventually has to fit in a pipe or file of some sort. thanks to octopus guy (sorry will never remember your nickname right) I found out that actually exists, as Erlang. I wish there were smaller scale versions of that, because a GUI application with background workers can get surprisingly complex! and I really wish sometimes I could just crash my workers (which each aggregate and transform data and events from several unreliable sources) and restart them. since I can't have that, I try to do the next best thing: comprehensive logging, even of impossible conditions (it may be impossible today, what about when someone changes the code, or the code of another component?), self-healing state (yes, it results in a lot of redundant code), and hidden ways in which user actions can automatically unfuck state I used to be all about assertions, obsessed with assertions, and assuming correctness to make "efficient" (and nearly impossible to debug) code ("if the code is in the correct state, then this pointer is actually a 16 bit variable stashed in the lower bits"). I'm still crazy for assertions but logging and self-healing state are the real stars of the show now
|
# ? Oct 20, 2015 13:01 |
|
Jabor posted:are you? whenever possible, yes I do keep optimizations off or low, but these applications are not exactly complex. reasoning about the compiled form while writing is typically quite doable. there aren't that many ways to poll one volatile address and then write a different volatile address when the first one has a specific bit cleared
|
# ? Oct 20, 2015 13:42 |
|
hackbunny posted:my ideal of programming is the starship enterprise (NCC 1701 D). serious. I rewatched tng a few years ago and it honest to god made me rethink programming I'm Wesley
|
# ? Oct 20, 2015 14:16 |
|
whaaaaat the gently caress c# okay so i have a system that continuously collects data and dispatches that data to objects through events. i've got a distributor, and it has a bunch of sinks. the sinks are all the same, except that they use a code:
code:
code:
nope they all wind up checking pred == 16
|
# ? Oct 20, 2015 15:29 |
|
I betchu ur lambda isn't being evaluated at the time you add it to the distributor so I has been changed to 16 for all lambdas before they are evaluated. if you are storing the lambda as a private field of type Func<int,bool> in the sink change it to an int and evaluate the lambda during the addsink call.
|
# ? Oct 20, 2015 15:33 |
|
or honestly just get rid of the lambda entirely and make it AddSink(int sinkId)
|
# ? Oct 20, 2015 15:34 |
|
it's a simplified example but yeah i can probably replace the params the lambda checks with poo poo that just gets pushed down and build the checking function later
|
# ? Oct 20, 2015 15:35 |
|
Bloody posted:are you compiling with optimizations turned off? http://www.microchip.com/pagehandler/en_us/devtools/mplabxc/
|
# ? Oct 20, 2015 15:41 |
|
|
# ? Oct 20, 2015 15:43 |
|
Bloody posted:whaaaaat the gently caress c# pretty sure you can make it work this way by copying the value of I into a scope local variable so that it gets properly closed. I still wouldn't do it this way though. produce the predicates with the enumerable range method or something
|
# ? Oct 20, 2015 16:35 |
|
Kilroy posted:I'm Wesley you could be Geordi in that simulation, it could be worse e: the simulation where you sacrifice him to save the enterprise, not the one where he makes out with the enterprise's warp drive designer hackbunny fucked around with this message at 16:43 on Oct 20, 2015 |
# ? Oct 20, 2015 16:39 |
|
I want to divert power to the shields in my programs, like mononcq does, drat it I'm envious
|
# ? Oct 20, 2015 16:48 |
|
fun fact: for 8-bit the "pro" is basically unoptimized, the "free" is de-optimized
|
# ? Oct 20, 2015 16:58 |
|
AWWNAW posted:pretty sure you can make it work this way by copying the value of I into a scope local variable so that it gets properly closed. I still wouldn't do it this way though. produce the predicates with the enumerable range method or something this is correct, it's a common issue with lambda capture you are capturing a reference to the same variable "i" in all of those lambdas which ends up as 16. creating a new variable every pass through the loop (like int i2 = i) and closing over that will do what you want, since now each lambda has its own variable to reference r# will warn you about this mistake, and I thought I heard that they were going to actually fix it in some new version of c# because it's such a common pitfall
|
# ? Oct 20, 2015 17:40 |
|
c++ makes you specify it explicitly and that's the only correct way
|
# ? Oct 20, 2015 17:54 |
|
One of the nice things about purity (both in languages and just as a design principle) is that you run into that sort of thing far less often.
|
# ? Oct 20, 2015 18:05 |
hackbunny posted:c++ makes you specify it explicitly and that's the only correct way c++ was right
|
|
# ? Oct 20, 2015 18:07 |
|
c++ is the light
|
# ? Oct 20, 2015 18:08 |
|
hackbunny posted:c++ is the light
|
# ? Oct 20, 2015 18:10 |
|
I was assigned a jira today. There was some issue where the user can manually enter some string parameters into the running program. It parses all these potential overrides and concats a massive string, manually inserting commas, and then later on delimits the string by comma and produces a list. Which is horrible. The issue was some of the parameters the user could enter could have comma separated lists inside them, so it was throwing everything off. I can fix the issue, but refactoring it would be so much work. This is how the code base got into this mess in the first place
|
# ? Oct 20, 2015 18:12 |
|
hackbunny posted:c++ makes you specify it explicitly and that's the only correct way I agree with this assessment. c++ actually does a lot of things right, especially most things from c++11 on. non-nullable refs by default are also pretty rad
|
# ? Oct 20, 2015 18:13 |
|
hackbunny posted:starshipenterprise.txt i believe the concept you are looking at is software coupling between programs instead of modules. middleware, activeMQ, ipc, and rmi are similar to what you are referring to, so this does exist in languages other than erlang. java supports ipc,rmi, and message passing for example. c# also supports interprocess communication with named pipes since . net 4.5 . the concept of an enterprise-esque system with multiple programs being coupled together to easily be rerouted is not that far off if you think about it. since ipc is socket-based, it would be the easiest way to implement a modulated process system. you would need a translation layer over your ipc implementation.
|
# ? Oct 20, 2015 18:35 |
|
hackbunny posted:c++ makes you specify it explicitly and that's the only correct way lua sticks the for variable inside the scope of the for loop. But yeah the C++ way is actually best.
|
# ? Oct 20, 2015 19:48 |
|
Barnyard Protein posted:MonocQc your story is very good. holy smokes.
|
# ? Oct 20, 2015 23:48 |
|
I finally got work. It's doing support. Updating queries and running batch jobs. Kill me. Gonna put the hammer down with some personal apps so I can get the gently caress out.
|
# ? Oct 21, 2015 03:42 |
|
Jabor posted:So most of the reason inheritance ruins things for everyone else is because people think it's "good enough" as code re-use thing. And so proper compositional code re-use often requires pointless boilerplate code to achieve, instead of someone coming up with a good syntax for it. code:
|
# ? Oct 21, 2015 06:00 |
|
Opulent Ceremony posted:We just merged the master branch into dev after someone made a needed quick fix on master to be quickly pushed to production. This merge stomped on a bunch of new work on a file that master hasn't seen changes to outside from having dev merged into it. Why did this happen and what are we doing wrong with git? also note that if you create a commit to reverse a merge you didn't mean to happen, you have to take explicit complicated steps to unfuck the history of the repository when you later finally decide to incorporate the merge which you can google. this is kind of an unfortunate pitfall but it is what it is.
|
# ? Oct 21, 2015 06:07 |
|
comedyblissoption posted:properly resolve merge conflicts Yea I figure I've been giving this guy the benefit of the doubt enough at this point, time to stop blaming git
|
# ? Oct 21, 2015 06:15 |
|
it's extremely easy to check if someone is just blindly saying "use my commit" just checkout the parent commit representing the branch he worked on and do a merge and resolve all conflicts using just "your" commit and see if the resulting merge commit is identical to what is checked in better yet, do the merge and resolve it (assuming it doesn't take much time) and see how it compares to how he did the merge git isn't going to save you if someone is blindly stomping on the work of other people whenever they do a merge. you'd have the exact same problem if someone resolved merge conflicts that way in SVN comedyblissoption fucked around with this message at 06:48 on Oct 21, 2015 |
# ? Oct 21, 2015 06:45 |
|
also stop using the git TFS plugin in visual studio it is absolute garbage. I evaluated it in early 2014 and it was almost loving unusable. it didn't even report the warnings/error the git CLI would spit at you and so you would have no idea why a command wasn't working. some of these warnings that the CLI would say that VS would suppress would be along the lines of "hey you can't checkout this new branch because you have uncommited changes in your current branch. please take corrective action" just use sourcetree for a git gui https://www.sourcetreeapp.com/ some other people like git extensions on windows
|
# ? Oct 21, 2015 06:48 |
|
if you go down the route of reversing a problem merge commit using the git reverse command, don't do so without reading the following and understanding it fully: http://stackoverflow.com/a/7101376 http://www.kernel.org/pub/software/scm/git/docs/howto/revert-a-faulty-merge.txt the other option is if there wasnt that much breakage you just re-implement the missing commits using cherry picks or meticulous re-implementation it's honestly much easier for people who don't understand what theyre doing to just force push away a bad merge commit before anyone gets the bad merge commit into their local repositories, but uh you also have to know what youre doing if youre using force push to destroy your public history and it's almost always the wrong thing to do
|
# ? Oct 21, 2015 06:56 |
|
Nitrocat posted:i believe the concept you are looking at is software coupling between programs instead of modules. can't exactly structure a mobile application in that way, can I. the iOS sandbox even specifically restricts you to a single process
|
# ? Oct 21, 2015 10:00 |
|
use pull requests instead of merges
|
# ? Oct 21, 2015 14:51 |
|
yeah, the key to successfully using git is to not have any chucklefucks on your project, or having some way to force them to contribute exclusively through pull requests
|
# ? Oct 21, 2015 14:53 |
|
git is a disaster and nobody should use it. distributed version control is an oxymoron and one of the worst software development concepts of the past 10 years. also I spent all morning tweaking shims and polyfills to make stuff work in IE8 and now I want to die but its still not as bad as using git
|
# ? Oct 21, 2015 15:40 |
|
yeah i voted for hg but the company i work for is obsessed with atlassian. what is bad about distributed? i mean for all practical purposes, except for being able to do stuff locally, its really similar to a centralized scm shaggar what do you use?
|
# ? Oct 21, 2015 15:55 |
|
|
# ? May 24, 2024 18:19 |
|
Barnyard Protein posted:yeah i voted for hg but the company i work for is obsessed with atlassian. what is bad about distributed? i mean for all practical purposes, except for being able to do stuff locally, its really similar to a centralized scm bitbucket supports hg though. in fact im using it right now
|
# ? Oct 21, 2015 15:56 |