|
rjmccall posted:hmm. i wouldn't call it horrible, but i do think it's fair to call the type system a hack because of how idiosyncratic it feels in practice. there are blogposts telling you how to structure your scala apis in order to get type inference to work better for your callers. i understand and sympathize with not wanting an even more complex type checker, but to me, scala's type system crosses the line of no longer being readily comprehensible to non-savants while still having some embarrassing lapses in its ability to type reasonable programs thanks for these posts, i still don't follow all the terminology (e.g. 'type abstraction') but they are closer to comprehensible than anything else i've found
|
# ? Oct 17, 2014 22:03 |
|
|
# ? May 20, 2024 07:57 |
|
Symbolic Butt posted:is it just me or ruby code rarely have any comments? at least this has been my experience with ruby code. "my code is elegant and self-evident why ever comment anything? " comments are lame, i'm a web "developer" wizard ninja cowboy
|
# ? Oct 17, 2014 22:38 |
|
no need for comments, just read the unit tests if you want to know what this code is for, what its contract is, what complexity guarantees it makes, etc just lol if you bother documenting your code except with other undocumented code
|
# ? Oct 18, 2014 00:03 |
|
oh poo poo i actually remember being in the blast radius of a queue-related mega-fuckup a while back and holy poo poo it was not fun for the people who had to actually clean up that particular exploded whale carcass an Oracle replication link between London and Hong Kong got hella backlogged and I think they had to halt trading for a while. You can't really do load-shedding with financial poo poo I mean I guess you can but then the FSA gets slightly upset
|
# ? Oct 18, 2014 01:08 |
|
Well you can if you're a retail bank and already so clusterfucked that people have just come to expect it of you. Mentioning no Royal banks in particular.
|
# ? Oct 18, 2014 01:10 |
|
But yeah, refusing to accept any transaction orders (or disabling your cash points) is just load shedding really.
|
# ? Oct 18, 2014 01:11 |
|
no, it's back-pressure it exerts back-pressure by demonstrating what a bad idea it is to continue to do business with you, thereby permanently reducing your future load in this particular case it wasn't even that, it just meant that the traders couldn't trade and keep their trades hedged correctly, so their portfolio would just take a massive poo poo and there was nothing they could do about it. (this wasn't RBS, this was a trading desk at an investment bank)
|
# ? Oct 18, 2014 01:17 |
|
we once DoSed the Android push service because we had bad backoff math in the token registration code for the Android Facebook client; copied from their sample at the time, I think. had to kill-switch notification stuff remotely while we pushed a fix, Google were unhappy when they called. I asked why they didn't just drop when things were excessive, but that didn't make them any happier.
|
# ? Oct 18, 2014 01:21 |
|
i'm playing spacechem right now and therefore i too can relate to queue chat imo just make a really long pipe so it won't fill up before level complete
|
# ? Oct 18, 2014 01:28 |
|
Mr Dog posted:(this wasn't RBS, this was a trading desk at an investment bank) yeah, I was just referencing RBS's repeated clusterfucks, because, well, RBS
|
# ? Oct 18, 2014 01:53 |
|
hepatizon posted:thanks for these posts, i still don't follow all the terminology (e.g. 'type abstraction') but they are closer to comprehensible than anything else i've found glad you're getting something out of it "abstraction" here just generalizes the idea of a function. an abstraction starts with an expression that's been written in terms of an unknown X and then "abstracts" it over X, producing something that can't be further evaluated until you tell it what X is, which is done by the corresponding "application". a value abstraction is an abstraction where X is some type of value, and (in a typed language) you have to say what type it is, and the application just says what value to use for X, at which point you can evaluate the sub-expression; in other words, it's just an ordinary function, and the corresponding application is just ordinary function call. a type abstraction is therefore an abstraction where X is some kind of type, and (sometimes) you have to say what kind it is, and the application just says what type to use for X; in other words, the abstraction makes something polymorphic, and the application produces a copy of the polymorphic thing which is specialized for a given type conventionally both are written like lambdas. if you're using greek, value abstractions get the lowercase lambda and type abstractions get the uppercase; if you're using ascii, the most common convention I've seen (due to Pierce) is that both get backslashes and you disambiguate in some other way, usually by leaving off the type kind or assuming that the reader can easily disambiguate a kind and a type. so e.g. you might write the polymorphic identity function as \T . \x:T . x, where the first clause starts a type abstraction binding T and the second clause starts a value abstraction binding x. in academic literature, type applications usually use square brackets instead of parentheses; so you might call that polymorphic identity function as id[Int](0) to make this somewhat more concrete, consider the following haskell code: code:
code:
|
# ? Oct 18, 2014 02:20 |
|
http://www.wilfred.me.uk/blog/2014/10/20/the-fastest-bigint-in-the-west/ posted:The slowest BigInt here is PHP. PHP implements its arbitrary size arithmetic in C. However, it doesn’t have a BigInt data type, so its arbitrary size numerical functions take and return strings! really? really? gonadic io fucked around with this message at 23:59 on Oct 20, 2014 |
# ? Oct 20, 2014 23:56 |
|
this doesn't matter because nobody uses bigints - tbc
gonadic io fucked around with this message at 23:59 on Oct 20, 2014 |
# ? Oct 20, 2014 23:57 |
|
Well, if you think about it, a bigint is just an array of bytes and a string is just an array of bytes.
|
# ? Oct 21, 2014 00:07 |
|
AlsoD posted:really? really? you know, I think it's not the only base 10 bignum library I've ever seen. ofc all libraries worth poo poo are base 256
|
# ? Oct 21, 2014 00:16 |
|
imo things like numeric types and data types and so on should all be handled by the processor architecture
|
# ? Oct 21, 2014 02:04 |
|
MALE SHOEGAZE posted:imo things like numeric types and data types and so on should all be handled by the processor architecture No register wide enough for your poo poo posts
|
# ? Oct 21, 2014 02:06 |
|
google put out a preview of Lollipop, including their new VM, ART. they tout its AOT compiler, which is intended to improve app startup speed. 3 of the 4 top Android apps start up more slowly, visibly so on the mid-range phone I saw.
|
# ? Oct 21, 2014 03:33 |
|
rjmccall posted:so e.g. you might write the polymorphic identity function as \T . \x:T . x, . . . or . . . here's a crazy thought, you could use a pseudo code that's also usually actually valid real code: Java code:
Java code:
|
# ? Oct 21, 2014 11:36 |
|
Max Facetime posted:. . . or . . . that's actually very similar to the ghc core or idris type theory core makes sense when there's a lot of lambdas
|
# ? Oct 21, 2014 11:39 |
|
Max Facetime posted:
and the craziest thing about that code there is: the tokens 'static', '<', '>', '(', ')', '{', 'return', ';', '}' are just syntax, so you might as well just use those because it makes for a clear syntax and the token 'identity' is just an extra symbol, which means all these other functions are the identity function too: Java code:
|
# ? Oct 21, 2014 11:52 |
|
there is something to be said for abstracting away from the details of the thing you are analyzing though. notation is often flawed, but minimalistic mathematical notation has upsides in that it does not bring with it any interfering mental model
|
# ? Oct 21, 2014 12:51 |
|
Max Facetime posted:and the craziest thing about that code there is: lol
|
# ? Oct 21, 2014 13:04 |
|
I bet ur lambda calc doesn't even have proper exception handling or multithreading either
|
# ? Oct 21, 2014 13:12 |
|
AlsoD posted:really? really? tell me php does bigint arithmetic using an adaptation of the by-hand long addition process tell me it literally carries the one
|
# ? Oct 21, 2014 14:19 |
|
suffix posted:i'm playing spacechem right now and therefore i too can relate to queue chat you wont get in to the high scores table like that!
|
# ? Oct 21, 2014 15:41 |
|
KARMA! posted:you wont get in to the high scores table like that! it's like 5 years after the game was released at this point, those high score tables must be impossible
|
# ? Oct 21, 2014 15:51 |
|
plus the high score solutions will seldom be terribly elegant, relying on fragile timing tuning. p. subjective granted, but playing spacechem trying to beat the records is a bit too deep into the sperg for most even when it comes to that game
|
# ? Oct 21, 2014 15:56 |
|
Max Facetime posted:. . . or . . . on top of what everybody else said, the lambda-calc syntax also reinforces my point about the essential similarity of the two kinds of abstraction, instead of making them look completely different also, lambda syntax is hilariously varied between real languages, and assuming that anybody is going to recognize one in particular, especially's java's, is a bad way to go also, you are literally so damaged by java that you can't stop yourself from putting unnecessary statics in your pseudocode, that is some shameful poo poo
|
# ? Oct 22, 2014 04:31 |
|
Maybe, like, the happy medium of syntax is somewhere between Java and whatever the gently caress that abstract art up there was (it's c#. As usual, the answer to anything at all itt is c#.)
|
# ? Oct 22, 2014 05:35 |
|
i really like c#'s lambda syntax and have no idea how the rest of my team got so sold on swift's current horror ok, that's not true, they wanted something that felt like it seamlessly scaled all the way down to bare braces and $0 syntax, but frankly that was probably a mistake
|
# ? Oct 22, 2014 05:53 |
|
AlsoD posted:really? really? lol yeah all the bcmath functions take and return numerical strings. this is actually really handy for some things and it wouldn't be a problem except the actual implementation is so slow. but imo that shouldn't be a concern for the ppl making or using the language; it's the job of the nerds who make interpreters and hardware to make things fast anyway when i took crypto in college i was the only guy that used PHP. i had to let my RSA script run overnight but it worked
|
# ? Oct 22, 2014 06:19 |
|
C++ code:
|
# ? Oct 22, 2014 06:29 |
|
rjmccall posted:i really like c#'s lambda syntax and have no idea how the rest of my team got so sold on swift's current horror it's absurdly terse but maybe pointless to obscure the number of arguments to an anonymous function
|
# ? Oct 22, 2014 07:04 |
|
Star War Sex Parrot posted:
i've come to decide that auto is really harmful beyond using it for iterators.
|
# ? Oct 22, 2014 07:07 |
|
you're just a software conservative.
|
# ? Oct 22, 2014 07:14 |
|
Bloody posted:(it's c#. As usual, the answer to anything at all itt is c#.)
|
# ? Oct 22, 2014 09:00 |
|
Soricidus posted:what is a bad language that nobody should ever use? Php python ruby Javascript Haskell erlang Java ocaml go f# scala there's probably more but that's a good start
|
# ? Oct 22, 2014 13:58 |
|
yo in the arse technica review of yosemite there was a mostly glowing review of swift, i don't know enough about programming to know what they were really talking about but something about it felt very off, can someone explain
|
# ? Oct 22, 2014 14:01 |
|
|
# ? May 20, 2024 07:57 |
|
Captain Foo posted:yo in the arse technica review of yosemite there was a mostly glowing review of swift, i don't know enough about programming to know what they were really talking about but something about it felt very off, can someone explain Swift is a bad language for idiots, hth
|
# ? Oct 22, 2014 14:02 |