|
YeOldeButchere posted:Calling through a function pointer uses the exact same ABI as a direct call, all registers and the stack are set in the exact same way, except that the target for the call is stored in a register or known memory location instead of being (most likely) hardcoded with the call instruction. Subjunctive posted:But what's in the switch blocks? Calls through that struct of function pointers? Calling through a vtable in a switch statement is not exactly an edge case.
|
# ? Nov 9, 2015 23:44 |
|
|
# ? Jun 7, 2024 05:38 |
|
i wish -Bsymbolic-functions was default behavior everywhere
|
# ? Nov 10, 2015 04:23 |
|
Zemyla posted:A couple years back, WordPress (who is super insistent about having a capital P in the middle) pushed an update with a function called capital_P_dangit, which automatically changes instances of Wordpress (lowercase p) to WordPress (capital P). This broke several people's URLs and was massively unpopular, and yet took 5 months for them to revert the simple change. A quick trip down the rabbithole later: quote:* Resolution set to wontfix And just think, he could have wasted that time fixing one of the thousands of security holes Wordṕress had at the time.
|
# ? Nov 11, 2015 17:52 |
|
Wordρress
|
# ? Nov 11, 2015 20:12 |
|
The central web service folks where I work started offering wordpress earlier this year, to help scientists get their stuff online. It hasn't been compromised yet, which might be a record but on the other hand I don't know if anyone's actually using it.
|
# ? Nov 11, 2015 20:31 |
|
fleshweasel posted:I don't see what is inadequate about the types of data JSON supports. It seems a more reasonable than XML on that count actually. No support for NaN or Inf? You can add a custom serializer but it slows everything the gently caress down.
|
# ? Nov 11, 2015 20:43 |
|
http://shaunlebron.github.io/parinfer/index.html Maybe I'm the coding horror, but it's amazing to me that someone could go to the immense amount of effort this project entails without apparently considering that the machinery necessary to maintain and manipulate s-expressions suggests that they aren't a good representation for code. Is all this inconvenience in every line of code really justified by convenience in writing macros every once in a while?
|
# ? Nov 11, 2015 23:26 |
|
Internet Janitor posted:http://shaunlebron.github.io/parinfer/index.html Seems like the guy just enjoys experimenting to me. I don't personally find s-expressions arduous to write so I don't really see the practical use of this project, but programmers are notorious tinkerers.
|
# ? Nov 12, 2015 00:53 |
|
jony neuemonic posted:Seems like the guy just enjoys experimenting to me. Now if someone could find a way to let me comment a line of SQL without the need to move parentheses or commas around, that would be useful.
|
# ? Nov 12, 2015 06:16 |
|
wait, people actually write SQL and don't just generate it?
|
# ? Nov 12, 2015 06:41 |
|
Yes
|
# ? Nov 12, 2015 06:42 |
|
I like doing queries, developing schemas not so much. But there's something cool about having tons of data that you can extract meaning from with a couple selects.
|
# ? Nov 12, 2015 07:08 |
|
Suspicious Dish posted:wait, people actually write SQL and don't just generate it? Somebody has to write the chunks the ORM chains together. Speaking of horrors and SQL: when talking about an API for their software, a vendor referred to their "SQL API"-- "here's our schema, these are the things that will stay stable, write something that reads and writes to the same DB tables as us!" I mean, it's hard to make a PHP webapp return json or soap, so let's just go all the way around any app-level data validation and slamfuck our data into your tablespace. ...they didn't get the sale.
|
# ? Nov 12, 2015 07:11 |
|
Sometimes you want something that's just not easy to force your ORM to do like joining a table on itself, window functions, etc.
|
# ? Nov 12, 2015 07:20 |
|
I also enjoy writing SQL, so maybe I'm the horror after all.
|
# ? Nov 12, 2015 07:23 |
|
jony neuemonic posted:I also enjoy writing SQL, so maybe I'm the horror after all. Same here. Any time I write a new feature, I start with "OK, how much of this business logic can I just write as a query/sproc?", because I know it won't break from random code changes and also it's often orders of magnitude faster. Persistence ignorance sure sounds nice, but in this particular case I think tight coupling offers far more advantages.
|
# ? Nov 12, 2015 08:51 |
|
In principle, an SQL interface is something you could reasonably guarantee with views, and honestly it is a lot more extensible for a data service to expose a general queryable interface than to provide some extremely limited and probably also extremely inefficient abstract interface through stored procedures / rpc calls. In practice, as a client I'd want to know that that data service is really paying attention to the exact set of queries I'm emitting, and as the service I'm not sure I'd ever be that comfortable putting my life in the hands of the query optimizer.
|
# ? Nov 12, 2015 08:53 |
|
Boss: First we're going to copy all of the data to a temporary table, then we're going to switch the view to point to the temporary table, then we're going to write the new data to the primary table, then we're going to switch the view to point back to the primary table. That way the user won't see a partial update. loinburger: Why not just use a transaction? Boss: I don't want to use a transaction. loinburger: Why not? Boss: I just don't. ***** Co-worker: I'm going to rewrite all of the batch processing code to use RxJava. loinburger: We can incorporate RxJava without rewriting everything... Co-worker: Yeah, but the current batch processing code doesn't have enough unit tests. loinburger: I agree, so we could write some more unit tests for it... Co-worker: No, I want to rewrite all of the code. loinburger: This is sort of insane. Hey Client, do you have an opinion on this? Client: I've got unlimited money and no deadline, so I don't really give a poo poo. ***** So now I've decided to teach myself iOS programming until my co-worker finishes with the refactor or until they fire me. loinburger fucked around with this message at 15:58 on Nov 12, 2015 |
# ? Nov 12, 2015 15:50 |
|
loinburger posted:Client: I've got unlimited money and no deadline, so I don't really give a poo poo. Can I have your client?
|
# ? Nov 12, 2015 16:44 |
|
I don't understand why he's paying us to write a program that he apparently doesn't even want, but why look a gift horse in the mouth.
|
# ? Nov 12, 2015 16:56 |
|
Calling it right now: in two months they will have never wanted it, and you are wasting time writing useless features noone wants instead of this new feature they now have paid you to write for two months, to which you will say .
Karate Bastard fucked around with this message at 18:41 on Nov 12, 2015 |
# ? Nov 12, 2015 18:23 |
|
I just dug up one of my first programs from school. It involved a deck of cards. I wrote a separate class for each card that implemented a common Suit/Number interface.
|
# ? Nov 12, 2015 19:13 |
|
In coding non-horrors, I once saw a savagely optimized Notepad replacement written in assembly, and then later I couldn't find it again! But now I did: SavageEd It has a 14 KB executable and supports Unix-style line endings.
|
# ? Nov 12, 2015 19:41 |
|
sarehu posted:In coding non-horrors, I once saw a savagely optimized Notepad replacement written in assembly, and then later I couldn't find it again! But now I did: Well, I know what I'll run on my next floppy disk OS install
|
# ? Nov 12, 2015 19:55 |
|
loinburger posted:Client: I've got unlimited money and no deadline, so I don't really give a poo poo. Yeah baby, I like it when you talk dirty to me.
|
# ? Nov 12, 2015 20:52 |
|
Internet Janitor posted:https://www.visualstudio.com/en-us/visual-studio-homepage-vs.aspx / http://www.eclipse.org/
|
# ? Nov 13, 2015 00:55 |
|
I've never had an auto-brace that didn't surprise me regularly. Both in what it would figure out and what it wouldn't. It just adds a layer of unexpectedness similar to wondering what autocorrect is going to do next time I try to type the acronym for serial peripheral interface. Probably api, because why not. That said, VS/C#'s auto-whitespace is the bees knees.
|
# ? Nov 13, 2015 01:14 |
|
Bognar posted:Can I have your client?
|
# ? Nov 13, 2015 05:46 |
|
The guy before me programmed an entire back-end to our product in Python. That's not the horror. He did it all in VIM while ignoring PEP8 completely.
|
# ? Nov 13, 2015 17:41 |
|
https://pypi.python.org/pypi/PythonTidy doesn't work? I mean, it'll gently caress your diffs in the ear but one annoying merge isn't a high price to pay.
|
# ? Nov 13, 2015 18:51 |
|
What's wrong with Vim?
|
# ? Nov 13, 2015 18:51 |
|
Vim is a honeypot for people with poor state. Edit: Taste! Poor taste! But also state.
|
# ? Nov 13, 2015 19:04 |
|
ExcessBLarg! posted:What's wrong with Vim? Nothing really, but it sure as hell didn't warn him about anything. Tons of small warnings as well. The whole thing is a mess and go through a lint party before too long.
|
# ? Nov 13, 2015 20:00 |
|
ratbert90 posted:The guy before me programmed an entire back-end to our product in Python. e: nope, dumb; thought you said "reprogrammed".
|
# ? Nov 13, 2015 21:34 |
|
sarehu posted:Vim is a honeypot for people with poor state. It's the "well Eclipse just did whatever" people who tend to have really oddly formatted code.
|
# ? Nov 13, 2015 22:10 |
ratbert90 posted:The guy before me programmed an entire back-end to our product in Python. Introduce him to syntastic with pylint.
|
|
# ? Nov 13, 2015 22:13 |
|
Storysmith posted:Somebody has to write the chunks the ORM chains together. I worked with commercial .NET software that bragged in its documentation about its separation of business logic from presentation logic. The first example they provided was an XSLT template with embedded SQL queries.
|
# ? Nov 13, 2015 22:54 |
|
VikingofRock posted:Introduce him to syntastic with pylint. I would if he was still working at this place. He was fired for being a incompetent jackass with a passion for writing purposefully obscure code as a means to make himself indispensable.
|
# ? Nov 14, 2015 00:34 |
|
ExcessBLarg! posted:Funny, I've had the opposite experience. People who use Vim have managed to get themselves over a major learning hurdle. That dedication correlates with being conscientious about coding style. I've had the opposite experience, where they haven't gotten over the hurdle after months and still spend half their time fighting the editor and googling "vim how do I search". Yet they keep using it because it's somehow 'more pro'
|
# ? Nov 14, 2015 15:27 |
|
|
# ? Jun 7, 2024 05:38 |
|
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.
|
# ? Nov 14, 2015 17:12 |