Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

Manslaughter posted:

For some reason the x() and y() being functions is what frustrates me most.

That's just standard C++.

Adbot
ADBOT LOVES YOU

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

Suspicious Dish posted:

all lovely arguments eventually reduce to definitions and philosophy

The good ones start with them.

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

contrapants posted:

I put this in the company /etc/bashrc years ago:

code:
[ `date '+%m%d'` != '0401' ] && alias emacs=vim

so, on april fools, emacs users can actually use emacs?

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

Maybe someone should hire a manager for Linus that does this for every email he sends. I wonder how much less hostile the ML would become.

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

Internet Janitor posted:

https://www.visualstudio.com/en-us/visual-studio-homepage-vs.aspx / http://www.eclipse.org/

Maybe I'm the coding horror, but it's amazing to me that someone could go to the immense amount of effort these projects entail without apparently considering that the machinery necessary to maintain and manipulate large class libraries suggests that they aren't a good representation for code. Is all this inconvenience in every line of code really justified by convenience in library depth every once in a while?

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

NihilCredo posted:

I also get the impression that 3/4ths of the fancy stuff vim users brag about can usually be done just as fast with a regex ("I can type a command to replace all the text between braces!").

And becoming fluent with regex is both easier and far, far more applicable than becoming comfortable with vim.

Learning regex is sort of a prerequisite for being good at vim, given that one of the location commands is "regex", so you can say "change everything up to the nth match of this regex" if you want.

As for your example, I dunno, "ci}" and start typing is pretty fast. I think I'm pretty fluent in regex and it would take a little thought to come up with the equivalent regex, not to mention that I probably need to pull down a menu and go into a separate dialog for it in another editor, and I haven't encountered any editors other than vim/emacs (with evil-mode, natch) that let me see a live preview of the results of my selection/replacement in the text itself. When Sublime was my primary editor I frequently found myself hitting rubular and pasting a chunk of text in there to try things out.

The classics aren't for everyone, to be sure, but I feel like once I had the foundation pieces (understanding vim commands as a fluent language rather than isolated key sequences was a big one) each additional thing I learned was more like a multiplier, enhancing all the things I already knew rather than just adding on.

But people who just cargo cult it because they heard a lot of famous hackers use them, and then never actually learn the parts that make it rewarding, are just wasting everyone's time.

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

sarehu posted:

When I was in college, I was a whore that had summer job money so when there was a sale on 20" 1680x1050 FW-something-something Dell monitors, I got one. And then, I put it in vertical mode. And my roommate didn't even notice! I was so mad.

I am pretty sure you got the same one I did - 2008FPW. They were using the same LCD elements as the Apple Cinema Display and there was some sale or other that made them fantastically cheap.

I still have mine. It still works, although the color is kind of faded when you put it next to current tech, and if it hasn't had a real signal sent to it for a while it takes a while to warm up (no, seriously, it has massive screen jitter until it's been used for 20 minutes or so).

I can't throw it out though because it still basically works fine. Best 400 bucks or whatever it was I spent.

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

Soricidus posted:

Or ... you could just modify a config file to make it use a repository you control?

Yeah, that'll totally stop the binary from adding its own extra flavor to whatever it downloads.

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

YeOldeButchere posted:

For a while after spending some time writing nothing but C, I was incapable of writing the word "print" without it turning into "printf". I would realize I'm about to type "print", tell myself that this time I wouldn't add an "f" at the end, and yet it always ended up there. It honestly felt weird.

When riding a bicycle, step 1 of making the bicycle not go somewhere is to not look at the thing you're trying to avoid.

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

JawnV6 posted:

On every pixel, dynamically construct a string, then throw it at the compiler with the expectation that after it fails the local scope lookup, it searches the entire namespace for whatever garbage you managed to spell out. This is idiomatic ruby?

I'm the implementation of clamp that allocates an array and sorts it.

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...
IDE regex replacement is usually not nearly as powerful or easy to use as vim/emacs', though.

And personally I like emacs because it's sort of like an OS-agnostic shell. I can get terminals in there, a bunch of apps that work great in text-mode are in there, and since my config is synced across all my machines I get the same experience on any machine after a couple of git clones.

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...
I don't know if you've ever used emacs because to say that it has "zero discoverability" suggests that you've never touched it.

Yes, emacs has some crazy keyboard shortcuts for you and you can of course assign your own to things you do a lot. But it also has, essentially, a command line (M-x) which lets you type some words which you think might describe the task you want to do, and it helpfully shows you the keyboard combo for those commands (if one exists). I have a lot of things in my emacs that I only access through that interface.

Imagine if, instead of hunting through menus to find the option for "open debugger window" (was that in View, or Window, or Debug? Which submenu of those menus might it be in?) you just typed "debug window" and every command that contained those words showed up.

Wondering what a certain variable in the editor does, or a function, or whatever? There's a help page for it. It's trivial to document any of the extensions, which is why it calls itself a "self-documenting text editor".

Yes there's a learning curve. every editor has one. I just decided to invest that time and energy into an editor which so far has stood the test of time and will probably still be around and still have a working version for whatever OSes we're using in 20 years. Assuming we're still editing text then, I guess.

I still use Visual Studio for C# and I still use Xcode for Swift because yes those are much better integrated with the development workflows for their languages, but those aren't the only text files I ever have to manipulate. Emacs works with Clojure like a dream. And occasionally I need to edit a configuration file, in XML or some other format. I'm sure as hell not doing that in visual studio.

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...
By the way when you try to get a bunch of devs who previously used the "we store everything on one dude's computer and he has a share you can get the source from" method of version control, SVN is a culture shock too. The previous way was "working" in that situation too, and when we moved to SVN we had people essentially doing what you describe: oh, I have some modifications so SVN won't let me check out without merging, I'll just zip up my source and copy it over top of everything after checking out.

At least three times we had someone essentially just revert the whole repo to a previous state so they could check in a two line change.

E: also, this was a software development consulting company.

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

qntm posted:

What is "millisAtNoon"?

More importantly, why is that an improvement over "millisAtMidnight"?

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

This actually seems fine? Breaks out of the loop if try() returns true, and assigns it to succeed.

I mean, "succeed" is kind of a useless variable there, and I don't think you can call a method try() in a language where that's a keyword, but...

As stupid sayings translated into code go, at least it actually does what it's supposed to do.

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

CPColin posted:

Except you're always trying at least once, but the saying says to try only if you don't succeed first.

How can you succeed if you don't try in the first place? Trying the first time is implied.

e: oh look, a second page.

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

Hollow Talk posted:


Racket seems to be a semi-popular learning language as well.

It's not a bad scripting language either.

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

sarehu posted:

The dude was editing comments on his blog posting that he didn't like into childish personal attacks, I think the banninators had the right idea.

Yeah, childish personal attacks like "Otters are super loving cute you guys".

I took a look at the other, unedited, posts of one of the more prolific posters that was affected by these edits and I can't see how that could have been anything but an improvement.

He can do whatever he wants with comments on his own blog, those posters don't have some sort of right to have their hateful garbage immortalized on his site.

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...
The US Treasury's website silently truncates passwords to 16 characters on your signup form.

The login page requires you to enter your password on one of those stupid onscreen keyboards.

It's case insensitive.

When I hit "submit", my password manager was able to grab the resulting password.

:bang:

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

quote:

If you think about it most of the time the changes we make break code. We just make it so it doesn't.
:2bong:

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...
It turns out that the whiny petulant child, in the process of throwing his tantrum and taking his ball and going home, also unpublished every module that he had contributor access to, not just his own modules.

But, you know, this wasn't a kneejerk reaction on his part.

n.e:

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...
:10bux: says someone used a tutorial as a template when designing the schema

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

jiggerypokery posted:

I am crying. Troll or not it is absolute gold. http://serverfault.com/questions/769357/recovering-from-a-rm-rf Imagine if that is his real name too.

It's gone now, but yeah, I think my advice to him would be to look into another industry, because he is probably done in this one.

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...
It doesn't look like the linked stackoverflow came to any conclusion about the problem either.

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

john donne posted:

code:

//Loop backwards, because comparing to zero is faster.
for (int j = customerPurchases.Count-1; j >= 0; --j)

A little knowledge is a dangerous thing.

Adbot
ADBOT LOVES YOU

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

Cuntpunch posted:

The assumption you're making is that all coders indent the else:

code:

if (foo)
{

}
else
{

}
is also a pretty common pattern



Not to say it doesn't lead to confusing the complexity of lots of if-else nesting in C-likes

Your code style still runs into the same problem, there's no functional difference between using Allman style or whatever you call } else {.

Unless for some ungodly reason you don't indent your else block in which case you definitely belong in this thread.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply