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
JawnV6
Jul 4, 2004

So hot ...

ratbert90 posted:

I'm going insane seeing poo poo like this:

C++ code:

ret = fcntl(fd_sock, F_SETFL, O_NONBLOCK);
if (ret < 0) {
    return ret;
}
return 0;

But the compiler ought to suss that one out and only do one bx lr? When I'm developing I'll let those slide because it's easier to paste new calls in without worrying who's last like some json comma janitor.

Munkeymon posted:

One of my TAs in a freshman course told us on day one or two that his favorite thing to do to unlocked screens in the CS building was add vbell to their PS1, rather than do the replace desktop with a screenshot of the desktop prank.
https://twitter.com/johnregehr/status/901196527384657920

Adbot
ADBOT LOVES YOU

Steve French
Sep 8, 2003

For dual monitors: adjust one to be one or two notches more blue and the other to be one or two notches more red. Do this once every week or two.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

ratbert90 posted:

I'm going insane seeing poo poo like this:

C++ code:

ret = fcntl(fd_sock, F_SETFL, O_NONBLOCK);
if (ret < 0) {
    return ret;
}
return 0;


This can be shortened to:

code:
return min(fcntl(fd_sock, F_SETFL, O_NONBLOCK), 0.0f);

McGlockenshire
Dec 16, 2005

GOLLOCKS!

Steve French posted:

For dual monitors: adjust one to be one or two notches more blue and the other to be one or two notches more red. Do this once every week or two.

Why bother doing it at the monitor level? If you're managing a web application, just use CSS hue rotate filters that can randomly apply on every page load. We irritated a few users that way a few April Fools' ago.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Steve French posted:

For dual monitors: adjust one to be one or two notches more blue and the other to be one or two notches more red. Do this once every week or two.

:catstare: you monster

Steve French
Sep 8, 2003

McGlockenshire posted:

Why bother doing it at the monitor level? If you're managing a web application, just use CSS hue rotate filters that can randomly apply on every page load. We irritated a few users that way a few April Fools' ago.

Because if you don't do it at the monitor level the target will notice.

Jeb Bush 2012
Apr 4, 2007

A mathematician, like a painter or poet, is a maker of patterns. If his patterns are more permanent than theirs, it is because they are made with ideas.
one of my friends committed some (mildly obfuscated) code to his corporate repo that checked if a) the current date was at least 6 months from the time he committed it and b) your username was that of one specific guy he knew, and if so changed your terminal font to comic sans

sarehu
Apr 20, 2007

(call/cc call/cc)

ratbert90 posted:

I'm going insane seeing poo poo like this:

C++ code:


ret = fcntl(fd_sock, F_SETFL, O_NONBLOCK);
if (ret < 0) {
    return ret;
}
return 0;


The bug here is that it's not testing for -1 specifically. The author does a half-decent job of corralling fcntl's return values into its function's tighter interface -- using only zero for success -- but it assumes that negative values less than -1 can't be returned (indicating success).

On OS X and in POSIX you're guaranteed -1 for error, and, for success, any value that's not -1.

lifg
Dec 4, 2000
<this tag left blank>
Muldoon
My last act at one job was to set the dev user login to randomly (1/100) echo "You've been eaten by a Grue" and log out.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

sarehu posted:

The bug here is that it's not testing for -1 specifically. The author does a half-decent job of corralling fcntl's return values into its function's tighter interface -- using only zero for success -- but it assumes that negative values less than -1 can't be returned (indicating success).

On OS X and in POSIX you're guaranteed -1 for error, and, for success, any value that's not -1.

No? The return value for fcntl is extremely well-defined and always positive in case of success.

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

Thermopyle posted:

You know, I just thought of why I don't like YAML at all.

It's got its own rules that I've got to remember for no reason

this is why I hate markdown

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Hammerite posted:

this is why I hate markdown

Which flavor do you hate most though?

Soricidus
Oct 21, 2010
freedom-hating statist shill

Suspicious Dish posted:

No? The return value for fcntl is extremely well-defined and always positive in case of success.

"Process IDs are returned as positive values; process group IDs are returned as negative values"

Soricidus fucked around with this message at 00:35 on Sep 13, 2017

sarehu
Apr 20, 2007

(call/cc call/cc)

Suspicious Dish posted:

No? The return value for fcntl is extremely well-defined and always positive in case of success.

That's for Linux, not POSIX.

Steve French
Sep 8, 2003

Munkeymon posted:

Which flavor do you hate most though?

JIRA is the worst because it isn't markdown, and instead they have their own really weird bullshit that almost never works the way I expect. There's even a UI element to format text as code and the markup it generates doesn't do that.

Markdown is good because it doesn't require you to remember some special loving syntax for every website, for the most part. I know there are different flavors, but different flavors haven't been a big issue for me and having slightly different versions of the same thing sure beats having completely different things.

MAD ABOUT JIRA

Bongo Bill
Jan 17, 2012

Jira can go to hell, just in general.

Ellie Crabcakes
Feb 1, 2008

Stop emailing my boyfriend Gay Crungus

Bongo Bill posted:

Jira can go to hell, just in general.
Maybe Jira for me is just the rebound after a series of bad relationships, but I don't have a problem with it. What's your preferred?

Bongo Bill
Jan 17, 2012

John Big Booty posted:

Maybe Jira for me is just the rebound after a series of bad relationships, but I don't have a problem with it. What's your preferred?

I use Pivotal Tracker at work most of the time. I like that the interface is not cluttered with a large amount of micromanagement enablers.

Ellie Crabcakes
Feb 1, 2008

Stop emailing my boyfriend Gay Crungus

Bongo Bill posted:

I use Pivotal Tracker at work most of the time. I like that the interface is not cluttered with a large amount of micromanagement enablers.
I might give that a go next time. I imagine it's at least faster than Jira.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
http://blog.mecheye.net/2017/09/i-dont-know-who-the-web-audio-api-is-designed-for/

lovely api meets lovely rant article. i hate the web.

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe
bbcodes already existed and there is nothing wrong with them; they work fine. but for some reason someone had to go and make a new thing, for no good reason (because as noted, bbcodes are fine), and it's worse than bbcode. because whereas bbcode requires you to be explicit about marking up your posts and doesn't dick around with them if you don't take explicit steps to add markup, markdown just assumes it knows what's best and interprets stuff you wrote as markup

and if you try to search for how to stop it from, I don't know, interpreting asterisks as "make this bold" all you get is self-congratulatory articles about how easy markdown is to use and general guides saying "do this to get that text effect" and nothing about how to AVOID making it happen, because the geniuses who made the drat thing didn't think about how easy it is to trigger their "simple and obvious" syntax unintentionally

It's me, I'm the guy who's mad as hell about Markdown. It's poo poo and it has no reason to exist

SupSuper
Apr 8, 2009

At the Heart of the city is an Alien horror, so vile and so powerful that not even death can claim it.
The idea behind Markdown was to turn all those READMEs with === and *** you had lying around into actual formatting while still preserving the readable plain-text.

Too bad that idea immediately went out the window as soon as everyone extended the crap out of it to make yet another lovely markup language.

Loutre
Jan 14, 2004

✓COMFY
✓CLASSY
✓HORNY
✓PEPSI
Dunno if there are any other SSAS/MDX developers here, but I have wanted to share this I found at my last company:

A 13,000 line cube calculation script. They had merged two entirely unrelated (minus a couple dimensions) cubes, and felt the need to manually write scope statements setting each attribute of each dimension to null for each measure in each measure group, one line at a time. I was hired to take over the cube after the only person who had ever looked at it died in a car accident. The cube also had billions of records, over a thousand partitions, and took over 2 weeks for a full process. The QA process required that I full process the cube before it went to testing, then full process again before any change was deployed - after a full week long automated testing procedure. There was no source control system in place, and we had one dev environment for processing the cube on.

I literally made the requested changes my first day in the company, then couldn't do anything further to the cube for months. This had become expected by the cube's users, and they preferred it to any of my proposals to split the cube back and teach them how to use Excel. :gonk:

Jewel
May 2, 2009

My "favorite" part of markdown (at least github and reddit's variants) is that, if I type

A sentence like this
and another on a new line

It gets condensed into a "A sentence like thisand another on a new line" unless I do the magic "actually give me a newline you idiot" command, which is.. adding two empty spaces after each line. Who the gently caress wants to type this way.

Steve French
Sep 8, 2003

I have never seen that behavior, so I am skeptical. Are you on windows or some other poo poo?

e: I took what may have been a typo in your comment at face value and possibly shouldn't have. I thought you were saying it results in no white space at all where the newline should be, which is definitely not the case.

The fact that it doesn't actually render the newline by default is a good feature, IMO.

re: bbcode: one of the nice things about markdown is that the documents can be read reasonably well in plain text or rendered format. Nobody wants to fuckin read bbcode source documentation.

Steve French fucked around with this message at 11:33 on Sep 13, 2017

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

Steve French posted:

I have never seen that behavior, so I am skeptical. Are you on windows or some other poo poo?

Jewel is talking about a flavour or flavours of Markdown used on websites, presumably rendered as HTML by the server, so I don't see how it could have anything to do with OS.

Steve French
Sep 8, 2003

Hammerite posted:

Jewel is talking about a flavour or flavours of Markdown used on websites, presumably rendered as HTML by the server, so I don't see how it could have anything to do with OS.

Read my edit. The only thing I could think of that could maybe have caused the difference in behavior that I observe personally is the difference in line breaks across platforms. Like my edit says, I realized the lack of a space was probably accidental; that markdown most certainly does not render without a space on github. I don't know or care about Reddit.

(It was an attempt to give the benefit of the doubt; while a stretch I wouldn't put it past GitHub to choke on carriage returns in some weird way and cause that space to not be there in the rendered output.)

Steve French fucked around with this message at 11:53 on Sep 13, 2017

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



SupSuper posted:

Too bad that idea immediately went out the window as soon as everyone extended the crap out of it to make yet another lovely markup language.

Yeah, that's basically what I was getting at. As soon as you want more than *bold* or _italics_(?) then you get to learn a new bespoke snowflake. Didn't the original guy not help by being a poo poo about licensing his ~super valuable IP (that started as a blog post)~ or something?

Loutre posted:

Dunno if there are any other SSAS/MDX developers here, but I have wanted to share this I found at my last company:

A 13,000 line cube calculation script. They had merged two entirely unrelated (minus a couple dimensions) cubes, and felt the need to manually write scope statements setting each attribute of each dimension to null for each measure in each measure group, one line at a time. I was hired to take over the cube after the only person who had ever looked at it died in a car accident. The cube also had billions of records, over a thousand partitions, and took over 2 weeks for a full process. The QA process required that I full process the cube before it went to testing, then full process again before any change was deployed - after a full week long automated testing procedure. There was no source control system in place, and we had one dev environment for processing the cube on.

I literally made the requested changes my first day in the company, then couldn't do anything further to the cube for months. This had become expected by the cube's users, and they preferred it to any of my proposals to split the cube back and teach them how to use Excel. :gonk:

Gonna assume divine retribution there.

Loutre
Jan 14, 2004

✓COMFY
✓CLASSY
✓HORNY
✓PEPSI

Munkeymon posted:

Gonna assume divine retribution there.

He actually died to a bus hitting a piece of concrete, careening out of control, and swerving in to a random peaceful alleyway, where only he was injured in any way.

I guess my lesson is to not take jobs that are literally cursed by demons.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Munkeymon posted:

Didn't the original guy not help by being a poo poo about licensing his ~super valuable IP (that started as a blog post)~ or something?

Someone started a "standardization" project and called it Common Markdown without asking Markdown maker if they could use the name "Markdown". (If you want to be pedantic, I believe wannabe standardizer sent a email to Markdown maker asking permission, waited some amount of time, then assumed no response meant go ahead.) Then Markdown maker gave explicit non-permission to use the name, so Common Markdown became CommonMark. Then everyone lived happily ever after with a ubiquitous syntax that compiles to a consistent output no matter where it's used.

But yes, the official Markdown specification is a perl script and you comply by matching its output.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.




One nitpick: you never use the frequency you declare in your examples.

E: I thought the graph thing was neat once I figured it out but I'm just a dipshit webdev so :shrug:

Munkeymon fucked around with this message at 15:23 on Sep 13, 2017

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Hammerite posted:

Jewel is talking about a flavour or flavours of Markdown used on websites, presumably rendered as HTML by the server, so I don't see how it could have anything to do with OS.

That double space thing is part of the original markdown spec.

necrotic
Aug 2, 2005
I owe my brother big time for this!
Yes, it allows you to write a plain-text file at 80/120/whatever width but then "render" it with those lines joined as a single paragraph. It's good.

necrotic
Aug 2, 2005
I owe my brother big time for this!
Markdown is meh in general but better than most alternatives, and is also ubiquitous now so... gently caress it.

CPColin
Sep 9, 2003

Big ol' smile.
One neat thing about CommonMark is that they publish the examples from the spec as JSON, so your implementation can fetch them and test itself against them.

Ranzear
Jul 25, 2013


I had very little issue getting it working for Caliber.Online. Here's some of my discovered quirks though:

As noted, most things are either overfeatured or underfeatured. There is no in-between. You're either configuring your own high/low/bandpass out of the BiquadFilter or, like he mentioned, trying to tell if the almost obscenely vague compressor node is even doing anything at all.

ScriptProcessor is a loving joke. It's almost as bad as get/putImageData in terms of being a horribly underoptimized garbage noob trap. It's deprecated, but still the only real option for some tweaks.

There is no built-in anti-pop on stop/start, but it also seems like when you do a hard volume ramp with a delayed stop to suppress it the API will just cut the sound with a pop anyway.

BiquadFilter really really hates being altered as a distance-configured lowpass, making the whole browser chug if you adjust it even once per frame. I had to make four of them with fixed values and just swap them out in the graph as 'bands' of lowpass per distance. Also BiquadFilter runs like hot garbage on linux chrome; I really should make a toggle for it.

I could not get a simple loving impulse response sample to work. It just would not happen no matter what .wav or .mp3 format I put it in.

All told though, the 3D panning is loving solid. I just wish I could do lowpass-over-distance in a dynamic way. Maybe Biquad is just the wrong node for it.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
why couldn't all of that functionality be provided in a third-party .js library a la three.js where bugs could be fixed though

we didn't include three.js in browsers, the browser guys gave you low-level functionality and said "build your own engine". here, they give you a lovely fmod clone and say "use this, trust us, you don't want to make your own audio samples"

also i fixed the frequency issue. i just forgot, oops

Suspicious Dish fucked around with this message at 18:27 on Sep 13, 2017

Ranzear
Jul 25, 2013

For my purposes it was quite alright. Early on I had a very specific set of things that it had graph nodes for: Pitch, Speed, Pan, Compress, Gain.

I wanted to use an IRS for echo, that turned into the 'wait, does this node even work?' fiascos. I gave up.

Later I wanted to add lowpass with distance. That's when I found out Biquad really hated having its frequency changed mid-playback.

Here, have some horror:
code:
	this.close = this.context.createDynamicsCompressor();
	this.close.connect(this.context.destination);

	this.closeish = this.context.createBiquadFilter();
	this.closeish.type = "lowpass";
	this.closeish.frequency.value = 9000;
	this.closeish.connect(this.close);

	this.near = this.context.createBiquadFilter();
	this.near.type = "lowpass";
	this.near.frequency.value = 6000;
	this.near.connect(this.close);

	this.nearish = this.context.createBiquadFilter();
	this.nearish.type = "lowpass";
	this.nearish.frequency.value = 3000;
	this.nearish.connect(this.close);

	this.far = this.context.createBiquadFilter();
	this.far.type = "lowpass";
	this.far.frequency.value = 1500;
	this.far.connect(this.close);
gently caress it. It works.

Except for, y'know, randomly going back to horrible popping and stuttering every few months, or just failing to play half the sounds on Linux, or ...

VikingofRock
Aug 24, 2008




I supply my READMEs as TeX files.

Adbot
ADBOT LOVES YOU

Master_Odin
Apr 15, 2010

My spear never misses its mark...

ladies

VikingofRock posted:

I supply my READMEs as TeX files.
At least you can also put newlines in that allow easier reading in a text editor but when parsed form a continuous line.

I just wish pypi would allow either reST or markdown (and maybe asciidoc) for readmes.

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