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
Brain Candy
May 18, 2006

tef posted:

you can roll your own in 0mq, sure, but really, there are other options out there. HTTP makes a decent request-response protocol, and there is a poo poo ton of library support for it. if you use a good one, you can take advantage of http caches and load balancers.

also I have no idea how 0mq makes things 'scalable'. scaling an application is m often an operations problem, more than an implementation problem.

While glyph is certainly cool and all that, I don't want to do real-time stuff over http/xml/json. Maybe it's possible, but it seems to end in horrible disaster every time I've seen it tried. I dunno, sounds like this is just a different domain than you are thinking of.

In small potatoes land, if I'm doing an internal service and I can get away with setting up one server in the corner to do everything, I'm gonna do it. The combo of being efficient in binary and handling concurrency lets that one machine scale nicely.

Adbot
ADBOT LOVES YOU

Brain Candy
May 18, 2006

tef posted:

in small potatoes land, http is fine.

in big things, http has caches and load balancers.

in real time stuff, 0mq is probably doing stuff behind your back that you don't want.

The small potatoes stuff I was talking about is real time stuff :shobon:

in really big things, small efficiencies start becoming more important as dev time is relatively less valuable, a la protocol buffers.

eh, real time is like anything else, if something can get you 90% of the way you try that first.

Brain Candy
May 18, 2006

Shaggar posted:

yes people don't understand how to do safe concurrency and they make a mess of it. really the solution is to avoid it whenever possible.

yo, so this is totally true, and should be lasered onto the moon. But! if you are doing a non-trivial thing that needs threads, you need to do the math proof analysis thing to make sure you didn't gently caress something up. even if its informal. no amount of debugging/testing/logging can save you.

Brain Candy
May 18, 2006

PleasingFungus posted:

this legit hurts my head

I think I understand it after three reads, but it's still really a thing

wait, no, maybe I don't understand it after all

gently caress

Now that you think you understand, what does Fart<B extends Fart<B> & ButtInterface> do?
or you could read a thing : http://www.angelikalanger.com/GenericsFAQ/JavaGenericsFAQ.html (only click if you are stuck in the java ghetto like me)

Brain Candy
May 18, 2006

http://www.electric-cloud.com/blog/2010/03/08/how-scalable-is-scons/

:toot:

Brain Candy
May 18, 2006

it's more of a ding on the maturity of scons. old mistakes are new mistakes are old mistakes. you fixed your issue by invoking 'do it like make, goddamn it'

the best thing about scons is that you can write things in python. the worst thing about scons is that you have to write things in python.

Brain Candy
May 18, 2006

i inductively deduce from one example that the author is paid by the word and a pretentious jackass

Brain Candy
May 18, 2006

also, you know how algorithmic trading erased billions of dollars from the economy and no one knows why? well, now we should abandon all hope of understanding those systems so we make those kinds of mistakes faster

Brain Candy
May 18, 2006

please don't become a windows server janitor in TYOOL 2013

Brain Candy
May 18, 2006

if you don't have testing + build server, please evaluate your life choices

Brain Candy
May 18, 2006

you get what you measure

Brain Candy
May 18, 2006

java doesn't have lambdas

:negative:

Brain Candy
May 18, 2006

more sluggish than the c++ standard committee, gently caress you oracle

Brain Candy
May 18, 2006

worse than the people who delivered c++0x in 2011

Brain Candy
May 18, 2006

it does but then does it mean a string, a byte array, a pointer of some unknown type, please look at any other argument(s) and the seven character name to figure it out.

Brain Candy
May 18, 2006

JewKiller 3000 posted:

jesus christ i read farther in that thread, and there's someone about to graduate with a 4.0 in cs who doesn't know what a hashmap is, with the excuse "i only know java"

this person will get a job writing your medical billing software

Brain Candy
May 18, 2006

seriously, as a dumb baby, refactoring c++ is Not Nice. you have a minefield of corner cases that you hope people were not stupid enough to use. but they did, and you can't tell at a glance.

this isn't an excuse not to test or do code reviews or whatever but there are like 4+ languages in there that you may or may not be using. choice requires discipline to not be poo poo. you know the thing that programmers hate hate hate hate because its such a contrast to the freedom and power to being able to go from nothing to something in practically no time.

Brain Candy
May 18, 2006

DuckConference, sorry about your lots, language mismatch is such awful poo poo.

has UML ever been useful to anyone ever? why would anyone, except for managers/"architects" so they can pretend they had useful input, want to put code design in two places? seems like its dumb cs 101 comments all over again

Brain Candy
May 18, 2006

shrughes posted:

I'm convinced that people who poo poo on C++ are all dumb. This isn't because C++ is great, it's just that every time you see somebody complain about C++, it turns out that they only give specious arguments and vapid blather. What's the probability that we'll ever come across an existential C++ rant that isn't written by a dumb person? I'd say 0.3% right now.

What really happens when people make complaints like this? It's people seeing others doing stuff they don't understand, because they're too new or too stupid, and assume somebody else is the problem. Look at the complaint about rvalue references. This person can't see rvalue references improving people's lives and the robustness of programs, because he's ignorant and doesn't know what he's talking about.

Another recent rant about C++ was done by the 0mq guy. Anybody who's looked at the 0mq source code can tell you that it's complete poo poo, and it's not C++'s fault.

Here is the real fact about C++: It's not about C++. It's about making a language suitable for efficiently writing non-garbage collected efficient programs. If and when C++ sees a suitable replacement, it'll be a language that is at least as complicated. It might lose a few superficial complications that C++ has, thanks to its C legacy, but the superficial complications are not the real problem that C++ has or that C++ programmers have. It's the problem of writing code without garbage collection itself, and C++ only helps.

lol why don't you go gently caress yourself. here's is real fact, it is a language with warts from being formed over decades. there are some people who think c++ has problems, called the standards committee, you arrogant poo poo turd.

Brain Candy
May 18, 2006

that's a good quote, but theres deffo some crud in that link. it links esr. and like Posting Principle pointed out, the second bullet point is basically that things that were added in c++0xb are missing.

Brain Candy fucked around with this message at 17:17 on Aug 24, 2013

Brain Candy
May 18, 2006

mmm, yes, internal apis, java in the browser, and a framework for making mutable enterprisy structs, vital things.

Brain Candy
May 18, 2006

also, the other things about exceptions being too slow

1) You don't care
2) You care because the profiler said so
3) If the profiler said so, a ton of bad things are probably happening in your code
4) and they're in the structure of your program

"x is slow" is usually given without context to make it useful, and I'm not a fan, no sir.

Brain Candy
May 18, 2006


please don't quote sulk !!!

Brain Candy
May 18, 2006

guys, I think we urgently need to move this thread to brazil.

Brain Candy
May 18, 2006

MononcQc posted:

- optionally encrypt data for safe transmission over unsecured networks
- be supported by as many platforms and languages as possible (who gives a poo poo about a thing nobody can use)
- be conceptually simple enough, for the same reasons as above

if you don't want pretend encryption, I don't think you can do all of these without riding on something else

Brain Candy
May 18, 2006

MononcQc posted:

In this case, if you're a customer, you then have the choice to use many different protocols based on the log stream you have and how sensitive it is, and choose yourself the balance you want in all of the requirements listed above.

giving customers choice is bad. seriously. people pay other people money to solve specific problems, not to give them options. on your side you want to be able do all the things, they want ONE thing. a solution.

every time you give someone an airplane control console instead of a toaster, you are being bad at design. every time you make your drooling customer move their tiny little tyrannosarrus arms 'cause why the hell can't they do a tiny little of work so this other thing is less worse you are forgetting why you are paid.

Brain Candy
May 18, 2006

MononcQc posted:

So what you do is you create an API where you document easy simple defaults, let people do that. Hide some use cases behind a simple command line that they can learn in under 10 seconds. Then if they want more, you can sell that service, or expose different data formats that may be more appropriate for what you want to do. Or anyway, that's one way to do it.

and these people deserve to do more work, because gently caress them, they are the edge cases, why can't they help me out a little to make the world a better place. right?

MononcQc posted:

It's not because you have a toilet that a toddler can use that you require plumbing that a toddler can put together.
c'mon son, I'm talking about customer interaction and you think I'm arguing this?

Brain Candy
May 18, 2006

MononcQc posted:

man at this point I honestly don't know what would be simpler than doing '$ heroku addon:add <thing>' where you have <thing> be 'loggly' or 'papertrail' and you get some basic logging done for free, outside of making that decision for them in the first place. The basic logging offered stores ~2000 lines ('heroku logs') and can stream them, and anything else is documented -- the page I linked to is literally what the 'features' page links to under 'Heroku Logs'. And you have to visit that page to at least know how to write logs (write to stdout) and whatnot.

So what would be a better solution to you, outside the the google-like approach of "we're just gonna store all your poo poo for free forever" ? What's the behaviour you want to see there?

Mmmm, rtfm. Excuse me if I don't do that for a thing I don't care about.

Brain Candy
May 18, 2006

:psypop: tef is shaggar and mononcQc is fishmech. wtf is happening in this thread!?

Brain Candy
May 18, 2006

Otto Skorzeny posted:

the actual problem with the strategy pattern is that it is trivial and not worth discussing (all gof patterns are either trivial inclusive-or dumb, and most of them are papering over flaws of early c++ and java rather than actual language-agnostic designs)

and surprise, the performance analysis hasn't been updated since then either

can yospos come together and hate on people who use patterns as prescriptions rather than descriptions?

Brain Candy
May 18, 2006

just write a distributed map-reduce in Erlang. easy.

Brain Candy
May 18, 2006

i like config files when i do them

pros :
editable by human beings in text editors

cons :
editable by human beings in text editors
is white space significant?
are there literal quotes?
how the gently caress does this thing read umlats?
wait, how I make escape sequence?
poo poo pissssssssssss why am I worrying about line separators?!

Brain Candy
May 18, 2006

suffix posted:

well guess what, those xml interfaces are going to be just as broken and ad-hoc as any json parser.

like one of them ignores any encoding you specify and just reads everything as ISO-8859-15,
and one of them runs a bunch of perl regexes on the input and fails if you have whitespace in a self-closing tag,
and one of them just uses print statements and doesn't escape any output data.

the ability to have "UTF-8" as part of the header and to be able to say, "no gently caress you, it doesn't validate against the schema" is a beautiful thing.

you can't stop idiots from making undocumented formats that work as implemented. this doesn't mean you have to go back to the world where your programs eat literal garbage.

Brain Candy
May 18, 2006

Notorious b.s.d. posted:

xml solves a lot of hard problems, and if you don't understand why xml is good, it means you haven't figured out the problems yet

Brain Candy
May 18, 2006

i looked at the 8 page RFC for JSON. i looked at the errata too

http://www.ietf.org/rfc/rfc4627.txt?number=4627 posted:

A JSON text can be safely passed into JavaScript's eval() function
(which compiles and executes a string) if all the characters not
enclosed in strings are in the set of characters that form JSON
tokens. This can be quickly determined in JavaScript with two
regular expressions and calls to the test and replace methods.

var my_JSON_object = !(/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(
text.replace(/"(\\.|[^"\\])*"/g, ''))) &&
eval('(' + text + ')');

ahahahahhahahah

Brain Candy
May 18, 2006

tef posted:

read the bit about unicode


and of course we all know that json isn't a subset of javascript, right?

i went in expecting unicode literals, was not disappointed

Brain Candy
May 18, 2006

Bloody posted:

this is funny because im using gigabyte+ protobufs in a project

clearly it's impossible to use protobuffs by themselves. i'm guessing you encode each message into the filesystem like /foo/v4/bar/fartz/seg192131 that way you have all the coherent data under /foo/v4/bar.

Brain Candy
May 18, 2006

JewKiller 3000 posted:

1) yes but only in rare cases, and before you use it, think hard about whether you really need to
2) absolutely not

and this is the absolute opposite of every language i can get paid to code in :smith:

Brain Candy
May 18, 2006

Condiv posted:

i do know the difference between the two, i just think final should make not only the reference immutable, but the members of the object it refers to.

as for why, sometimes it's nice to have some guarantees that this function, or this piece of code, or whatever, can't gently caress around with the state of this object.

i agree, i wish const did this.

Adbot
ADBOT LOVES YOU

Brain Candy
May 18, 2006

Bloody posted:

wait what's wrong with mutability? why should i scrap an entire object and any children objects any time anything changes?

some day, which may never come to pass, people are going to do something weird like strap two CPUs together in a way that they share memory in the same process. or maybe in some distant future, people will work on codebases with an absurd number on lines of code, like 100,000.

when that day comes, you will understand.

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