|
Bruegels Fuckbooks posted:But.... why? Why the gently caress? A massive chunk is generated, if that helps you start working through it.
|
# ? Aug 16, 2015 02:26 |
|
|
# ? May 27, 2024 04:50 |
|
Subjunctive posted:You wouldn't believe me if I told you. I'd believe you.
|
# ? Aug 16, 2015 03:05 |
|
Suspicious Dish posted:I'd believe you. Nobody would believe that you believed me. E: Though really, Chrome is 70MB and *Twitter* is 60MB. Apps are big. Subjunctive fucked around with this message at 03:11 on Aug 16, 2015 |
# ? Aug 16, 2015 03:06 |
|
Subjunctive posted:Nobody would believe that you believed me. I still remember having a 14.4 modem, 500 mb hard drive and 75 mhz processor. This new world is loving scary.
|
# ? Aug 16, 2015 03:16 |
|
Hell, I just built Hello, World in rust with Release flags and it's 2.4MB, though that links the standard library. Even a C file with only an empty main function is 124KB after compiling it.
Linear Zoetrope fucked around with this message at 03:25 on Aug 16, 2015 |
# ? Aug 16, 2015 03:20 |
|
"How is the FB app so big? It has lots of code in it." Thanks, post. I couldn't have guessed that much myself.
|
# ? Aug 16, 2015 03:55 |
|
Knowing how big our app is, I'd believe it. Though just skimming the class names, 90% of them are some kind of _FB*MutationCall, which I presume is either autogenerated classes from an API definition, or it's just architected with a large number of small subclasses for those operations instead of expressing the differences between them in some other fashion.
|
# ? Aug 16, 2015 03:56 |
|
Is there something special about Java classes that makes them so heavy-weight in terms of code size?
|
# ? Aug 16, 2015 03:58 |
|
Those are Objective-C classes. It seems that any problem expands to fill the limits of its constraints. It does not matter how much hardware muscle is really needed to post cat pics and send messages with your friends (which, by the way, is apparently such a massive undertaking that it requires a separate app). People will use every bit available if they have enough engineers. This is why I only use Facebook in the browser. I do not need this making GBS threads up my phone.
|
# ? Aug 16, 2015 04:01 |
|
The real answer is that performance costs money (in that it costs programmer-hours and you're paying those programmers for those hours). The first bits of performance improvements are very cheap (because they're local changes like "adding a cache" or "not doing this really dumb thing here"), the very last bits are very expensive (because they require structuring your app in such a way that makes all your future changes take longer to do). As computers get faster, the need to spend that money on performance decreases. It's not that people want to use every last computing resource - it's that optimizing an app to use less resources than is available is much lower priority than most other things you could do with that amount of programmer time.
|
# ? Aug 16, 2015 04:15 |
|
Often more important, optimization is time, meaning that the thing you're building gets to market later. But also, there is often a choice between spending code size, runtime speed, or data transferred. If we can write some code to ship cover image previews in 200 bytes versus blank until the extra full request finishes, we're gonna write that code. Similarly, if shipping another image decoder lets us shave a bit off every photo people download, we're gonna ship that decoder and the glue code to go with it. (See also SPDY and such meaning another network stack.) Code size is the least precious resource, way less important to conserve than network latency or data, programmer time, user-perceived performance, reliability, or developer productivity. Until you run out of it, of course...
|
# ? Aug 16, 2015 04:27 |
|
Getting the fat bundle to fit under 100mb *was* a bit of a time sink.
|
# ? Aug 16, 2015 04:49 |
|
Subjunctive posted:Often more important, optimization is time, meaning that the thing you're building gets to market later. Depends. That's only once you're already the only game in town. In the F2P world, we have empirical proof that download size and launch time are among the most important. As I can watch in near real time as we make changes and more or less people kill the app before even seeing what it is. Two years ago one of the best things we did for revenue was add background downloading and getting the initial install under 50megs for Google to single serve it or Apple to let it download on 3G.
|
# ? Aug 16, 2015 05:24 |
|
Oh, certainly, it can affect adoption, and I remember many many hours spent agonizing about how to keep Firefox under 5MB so we would lose fewer people to mid-download distraction. We do care about download size for the FB app (the cell-network threshold as one example), and even more so on Android, but in our context code size is often better to spend than most other things, which is how apps get big.
|
# ? Aug 16, 2015 05:36 |
Jsor posted:Hell, I just built Hello, World in rust with Release flags and it's 2.4MB, though that links the standard library. Even a C file with only an empty main function is 124KB after compiling it. The difference probably comes from static linking with Rust vs. dynamic linking with C. Another difference is that rustc embeds HP Lovecraft quotes in every executable, which hopefully will get changed soon because that is pretty cringeworthy.
|
|
# ? Aug 16, 2015 06:20 |
|
VikingofRock posted:The difference probably comes from static linking with Rust vs. dynamic linking with C. Another difference is that rustc embeds HP Lovecraft quotes in every executable, which hopefully will get changed soon because that is pretty cringeworthy. Oh yeah, I know why Rust's are bigger, I wasn't comparing the two, I was just saying that executables in general are big, even 124KB is "quite a bit" if you want to compare it to ancient computers. I didn't know about the Lovecraft thing, though... E: Looks like the Lovecraft stuff was removed in January. Linear Zoetrope fucked around with this message at 06:37 on Aug 16, 2015 |
# ? Aug 16, 2015 06:32 |
|
Pavlov posted:APL got brought up a few pages ago. Apparently it's a convention to use greek letters as variables. I'd like to think that somewhere right now, a programming intern is hearing "No no, that's not a 'w' that an omega." The greek letters are mostly builtin operators or special keywords. Unary Iota generates a range 1…N. Binary Rho is "reshape", for restructuring matrices and lists. Alpha and Omega typically indicate the first and last argument to a function, respectively, etc. You won't know them if you don't learn them, but if you're actually programming in APL you'll see and use these operators and symbols every day.
|
# ? Aug 16, 2015 06:44 |
|
Jsor posted:Oh yeah, I know why Rust's are bigger, I wasn't comparing the two, I was just saying that executables in general are big, even 124KB is "quite a bit" if you want to compare it to ancient computers. I mean part of it is you're basically shipping a runtime/std library. I know Swift adds a minimum of around ~2mb on not-newest OSes that don't ship the base of the language with the OS. Subjunctive posted:Oh, certainly, it can affect adoption, and I remember many many hours spent agonizing about how to keep Firefox under 5MB so we would lose fewer people to mid-download distraction. We do care about download size for the FB app (the cell-network threshold as one example), and even more so on Android, but in our context code size is often better to spend than most other things, which is how apps get big. You're also talking about binary size, which is something that hits users every two weeks at most (for ideal FB release adoption). On iOS, where the numbers don't drop hard until after you can't install over cellular (100mb), there's a case for making the binary bigger if you can add code that makes every cold start/interaction faster. ultramiraculous fucked around with this message at 12:11 on Aug 16, 2015 |
# ? Aug 16, 2015 07:18 |
Jsor posted:E: Looks like the Lovecraft stuff was removed in January. Ah, looks like you are right. My bad!
|
|
# ? Aug 16, 2015 08:44 |
|
comedyblissoption posted:is it a requirement to only use terse 1-2 character identifiers in APL or is it just an insufferable programming style It's the latter, although the "style guide" for K explicitly recommends it. This is how the creator of K likes to write C code. Definitely a thing for this thread. e: you know, it's so TERSE® and EFFICIENT® that I can just quote it: code:
NihilCredo fucked around with this message at 13:44 on Aug 16, 2015 |
# ? Aug 16, 2015 09:31 |
|
comedyblissoption posted:It will also raise questions on what does it mean when there's just a single space Yes, that should be a compiler error.
|
# ? Aug 16, 2015 13:13 |
|
NihilCredo posted:It's the latter, although the "style guide" for K explicitly recommends it. This is a beast of terrifying beauty.
|
# ? Aug 16, 2015 17:02 |
|
NihilCredo posted:It's the latter, although the "style guide" for K explicitly recommends it. I see some PROT_READ in there, but it's being eaten by some... APL.. or something
|
# ? Aug 16, 2015 18:14 |
|
even the filename is tersely labelled as "a.c"
|
# ? Aug 16, 2015 18:45 |
|
comedyblissoption posted:even the filename is tersely labelled as "a.c" Well, what else am I going to compile into a.out, smart guy?
|
# ? Aug 16, 2015 18:47 |
|
I will comment though that I find the code actually more readable w/ 1-2 letter variable names when the context is small and the context is obvious like in the common haskell coding style.
|
# ? Aug 16, 2015 18:54 |
|
comedyblissoption posted:I will comment though that I find the code actually more readable w/ 1-2 letter variable names when the context is small and the context is obvious like in the common haskell coding style. didn't we just do this? or was that in the terrible programmer thread, I always get these two mixed up
|
# ? Aug 16, 2015 18:58 |
|
Soricidus posted:didn't we just do this? or was that in the terrible programmer thread, I always get these two mixed up we just did this
|
# ? Aug 16, 2015 19:01 |
|
Yes, we agreed that APL is art.
|
# ? Aug 16, 2015 19:02 |
|
comedyblissoption posted:I will comment though that I find the code actually more readable w/ 1-2 letter variable names when the context is small and the context is obvious like in the common haskell coding style. code:
But that APL code should be destroyed and the creator shot.
|
# ? Aug 16, 2015 19:37 |
|
Jsor posted:Hell, I just built Hello, World in rust with Release flags and it's 2.4MB, though that links the standard library. Even a C file with only an empty main function is 124KB after compiling it. Build the Rust with -O -C lto and the C with (assuming gcc) -O2 -flto -static and I think you'll find there's not much difference, or even that the Rust executable is smaller. (of course the Rust executable isn't statically linking libc, but with LTO and no dependency on a lot of the libc stuff like malloc it probably works out to about the same)
|
# ? Aug 16, 2015 20:42 |
|
VikingofRock posted:What if you are a Japanese company, writing an API aimed at Japanese programmers? But the language itself is comprised of English keywords, often in place of language-neutral symbols, as are all classes and method names. It also assumes that capitalized identifiers are constants. Neither of these things were done to promote accessibility of the language outside the Japanese community. It was just the natural way to build a programming language for someone well versed in a number of existing languages. Ruby did make some interesting multiligualization decisions though. It eschewed multibyte Unicode (specifically UCS-2 and UTF-16) as a default "internal" encoding in favor of equal support for ASCII, EUC-JP, Shift JIS, and UTF-8 at the runtime level. Since Ruby 1.9, each String object instance has an associated encoding, with methods to safely translate between encodings. Only recent did UTF-8 become the default source encoding. ExcessBLarg! fucked around with this message at 22:04 on Aug 16, 2015 |
# ? Aug 16, 2015 21:57 |
|
Suspicious Dish posted:Is there something special about Java classes that makes them so heavy-weight in terms of code size?
|
# ? Aug 16, 2015 23:49 |
|
It's always a good time to remember FizzBuzzEnterpriseEdition.
|
# ? Aug 17, 2015 00:31 |
|
ExcessBLarg! posted:Ruby did make some interesting multiligualization decisions though. It eschewed multibyte Unicode (specifically UCS-2 and UTF-16) as a default "internal" encoding in favor of equal support for ASCII, EUC-JP, Shift JIS, and UTF-8 at the runtime level. Since Ruby 1.9, each String object instance has an associated encoding, with methods to safely translate between encodings. Only recent did UTF-8 become the default source encoding. To be fair you never want to use UTF-16.
|
# ? Aug 17, 2015 01:12 |
|
Dylan16807 posted:To be fair you never want to use UTF-16. It used to be fine but then they went and put 💩 outside the bmp and suddenly surrogate pairs stopped being purely hypothetical
|
# ? Aug 17, 2015 01:19 |
|
Dylan16807 posted:To be fair you never want to use UTF-16.
|
# ? Aug 17, 2015 02:18 |
|
Pavlov posted:APL got brought up a few pages ago. Apparently it's a convention to use greek letters as variables. I'd like to think that somewhere right now, a programming intern is hearing "No no, that's not a 'w' that an omega." Actually, in APL, it is not valid to use Greek letters for variable or function names. It is valid for function parameter names, kind of, because the two parameters permitted for a function are always called ⍺ and ⍵. This means that APL can look kind of funny because everything that uses built-in operations is written very succintly using symbols, but user-defined functions and variables often have user-readable names. Here's an example written by a colleague of mine: https://raw.githubusercontent.com/dybber/aplbench/master/benchmarks/rodinia-hotspot/tail/hotspot.apl The weird a-like symbol denotes a line comment if you are curious. The curly braces denote lambdas, kind of.
|
# ? Aug 17, 2015 07:15 |
|
Suspicious Dish posted:Is there something special about Java classes that makes them so heavy-weight in terms of code size? what do you mean heavyweight? I did a POC for work, and it had 10 classes each of 1k each = fully working program in 10k java is tiny when compared to VB/ C# I once did a desktop App in VB.net that when compiled was 8MB with 8MB runtime download increase. We then redid the whole app in VB6 at my pushing, and compiled it was 4mb and 4mb runtime, so just reverting to a previous vb version halved the size. its the MFC that make it large. the default libraries there should be tools available to allow removal of unused code once the compilation is complete then you would find a lot of larger programs are now a lot smaller.
|
# ? Aug 17, 2015 07:29 |
|
|
# ? May 27, 2024 04:50 |
|
Oh, nice, an Android library to help you figure out your user's phone from their model number ("Moto X," not "XT1049."). Oh, wait.
|
# ? Aug 17, 2015 18:39 |