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
Shaggar
Apr 26, 2006
yo, just use whatever memory you need to make performance reliably quick, don't leak, and stick each unit of work in its own thread. chances are nothing you do will ever be affected by the mythological gc pausing problem.

guis in android Linux are bad because: bad hardware, bad programmers, bad jvm.

Adbot
ADBOT LOVES YOU

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

shaggar was right

Bloody
Mar 3, 2013

MeramJert posted:

shaggar was right

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

Cybernetic Vermin posted:

the perfection of gc is one of those slightly annoying nerd myths that i think mostly exists because people like absolutes, when very few absolutes exist. gc is deeply flawed, and has the very distinct downside of being an all-or-nothing proposition if it is to work well and be easy to work with. pretty clearly desirable for robust software, but a source of many problems and often not at all desirable.

i sort of hold that a lot of the runtime design (and the languages built on its assumptions) today operates on a slightly incorrect level, in that any application using an appreciable amount of memory (from say 200 megs and up) will have a small number of different classes/types, living in a fairly small number of collections (possibly implicit collections in the form of object graphs), but will still be treated as units, carrying their own tagging/vtables/metadata. the baseline assumption really should be that atomic pieces of data are owned by a collection, which carries the common metadata, and lifetime-manages, its contents. ideally every piece of data is only referred to from one place, and very commonly this is easy to achieve, and makes a lot of management superfluous. the relative minority of objects that are not numerous belong to a singleton collection, which is more overhead than they would otherwise have, but averages better across a reasonably sized application

unfortunately that type of thing is extremely unlikely to be brought about, since displacing existing design thought of an object graph of entirely independent tiny pieces of data would be a monumental undertaking

the situation you call out as ideal — monomorphic data referenced from a unique location — has most of the guarantees necessary to inline storage into the "container", which is (1) generally a superior design for performance and (2) a feature of quite a number of languages already. external tagging alone can be done in a slightly broader set of cases because inlined storage requires a non-recursive type, but i think you'd agree that that's not in the interesting subset

it's very difficult to do even external tagging implicitly in most OO languages, though, because you have to prove that the object is never used polymorphically (including by the GC if applicable, and designing the GC metadata to express specific types instead of just object/non-object makes GC much more expensive). you can do it with user annotations that say that the type isn't polymorphic, ofc, but once you've got that, you should really just go the step further and make the annotations inline the storage

MeruFM
Jul 27, 2010

Shaggar posted:

yo, just use whatever memory you need to make performance reliably quick, don't leak, and stick each unit of work in its own thread. chances are nothing you do will ever be affected by the mythological gc pausing problem.

guis in android Linux are bad because: bad hardware, bad programmers, bad jvm.

This sounds about right.
I cannot imaging GC being so bad that it needs to stop the entire machine for several seconds.
Are they passing around a global array/hash so big that the OS starts loading it to virtual memory?

Shaggar
Apr 26, 2006
I think that's how p-lang development is done

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

MeruFM posted:

This sounds about right.
I cannot imaging GC being so bad that it needs to stop the entire machine for several seconds.
Are they passing around a global array/hash so big that the OS starts loading it to virtual memory?

in the days of jdk 1.0, it could definitely happen :corsair:

Scaevolus
Apr 16, 2007

Mr Dog posted:

well you can always just write native code on Android, though the user interface APIs are all Java-only so you have to have at least some Java in your app.

Dalvik is pretty rubbish though, google doesn't make money on responsive user interfaces, they make money barcoding every aspect of your life so they can sell ads

you can actually do Native Activities in Android apps since 2.3, which covers ~99% of android users.

Bloody
Mar 3, 2013

Shaggar posted:

I think that's how p-lang development is done

Soricidus
Oct 21, 2010
freedom-hating statist shill

Shaggar posted:

that's how p-lang development is done

qwerasdf
Oct 1, 2006
(Eat shit)

Shaggar posted:

development is done

Bloody
Mar 3, 2013

Shaggar posted:

that's how

Scaevolus
Apr 16, 2007

javascript is a truly great language
code:
> 2147483648 & 2147483649
-2147483648

shrughes
Oct 11, 2008

(call/cc call/cc)
you could have picked an actual bad example. that's the behavior you'd expect. or do you think ~5 should return 0x...FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA?

suffix
Jul 27, 2013

Wheeee!

shrughes posted:

you could have picked an actual bad example. that's the behavior you'd expect. or do you think ~5 should return 0x...FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA?

Python code:
>>> 2147483648 & 2147483649
2147483648
>>> ~5
-6
wfm

Bloody
Mar 3, 2013

2147483648 & 2147483649
-2147483648
~5
-6

Bloody
Mar 3, 2013

something something type promotion|coercion|im gay

shrughes
Oct 11, 2008

(call/cc call/cc)
the main problem with 32-bit signed bitwise ops is that it encourages the development of javascript crypto

Cybernetic Vermin
Apr 18, 2005

otoh the prevailing cryptos appear to be written in c with the expected results

ffs theo, we are not about to put up with your shithead ways if your software isn't secure

qwerasdf
Oct 1, 2006
(Eat shit)
More new features going into C#, because you asked: (not sold on the $butt garbage, though)

https://roslyn.codeplex.com/wikipage?title=Language%20Feature%20Status&referringTitle=Documentation


Also

http://msdn.microsoft.com/en-US/vstudio/dotnetnative


Microsoft owns, hail Satya(n)

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...
i don't get how .NET Native differs from NGen. I do, however, look forward to the massive speed boost/memory gains in all of our server code. for free.

dictionary initializers look awful

using static members is cute. it's almost like non-member functions with namespaces! but everything is still an object you guys

Bloody
Mar 3, 2013

binary literals? about loving time! why are binary literals restricted to being like... a gcc non-standards tihng

MononcQc
May 29, 2007

Bloody posted:

binary literals? about loving time! why are binary literals restricted to being like... a gcc non-standards tihng

Erlang has them with pattern matching :smug: Go on wikipedia or a RFC and just dump the spec directly in there.

code:
%% BMP file header, using native (little) endianness
<<"BM", _Size:32, _Reserved1:16, _Reserved2:16,
  _Offset:32,
  %% Bitmap information
  _HeaderSize:32, Width:32/native, Height:32/native,
  _ColorPlanes:16, ColorDepth:16/native,   0,0,0,0, % compression,
  _BitmapSize:32, _HorizontalPPM:32, _VerticalPPM:32,
  _Colors:32, _ImportantColors:32,
  %% Actual bitmap data
  Bitmap/binary>> = Bin,
[{width, Width}, {height, Height},
 {color_depth, ColorDepth}, {bitmap, Bitmap}].

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
whoa

weird
Jun 4, 2012

by zen death robot

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

Cybernetic Vermin posted:

otoh the prevailing cryptos appear to be written in c with the expected results

ffs theo, we are not about to put up with your shithead ways if your software isn't secure

youve got to be loving kidding me

and of course i had to learn it from yospos first

Kuvo
Oct 27, 2008

Blame it on the misfortune of your bark!
Fun Shoe

qwerasdf posted:

More new features going into C#, because you asked: (not sold on the $butt garbage, though)

https://roslyn.codeplex.com/wikipage?title=Language%20Feature%20Status&referringTitle=Documentation

i wish there were more examples for those new features

also i will suck a hobos dick if it gets that ?. operator into the spec

Kuvo fucked around with this message at 17:34 on Apr 9, 2014

gonadic io
Feb 16, 2011

>>=

Kuvo posted:

i wish there were more examples for those new features

also i will suck a hobos dick if it gets that ?. operator into the spec

um excuse me it should actually be written as >>= :smuggo:

double riveting
Jul 5, 2013

look at them go

shrughes posted:

the main problem with 32-bit signed bitwise ops is that it encourages the development of javascript crypto

you know, you can do bigint arithmetic just fine with floats. :smuggo:

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror

Kuvo posted:

also i will suck a hobos dick if it gets that ?. operator into the spec

aaa that's such a good idea

i haven't wanted something in php so bad since short array syntax

Workaday Wizard
Oct 23, 2009

by Pragmatica
what's the thread oponion on haxe

did anybody ever use it in a real thing, if so how was it?

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

AlsoD posted:

um excuse me it should actually be written as >>= :smuggo:

yeah csharp already has monad syntax it's called linq

or use fsharp

gonadic io
Feb 16, 2011

>>=

Malcolm XML posted:

yeah csharp already has monad syntax it's called linq

or use fsharp

you can't use linq for possibly-null objects or futures though right, isn't linq for streams only?

qwerasdf
Oct 1, 2006
(Eat shit)

Kuvo posted:

i wish there were more examples for those new features

Granted

http://stackoverflow.com/questions/22881465/what-do-these-new-c-sharp-6-features-do/22881736#22881736

get out of fyad
Mar 27, 2013
This week in Stupid C# Tricks

code:
//In static class TupleExtensions
public static void Split<T1,T2>(this Tuple<T1, T2> tuple, out T1 first, out T2 second)
{
   first = tuple.Item1;
   second = tuple.Item2;
}

//In MyClass
public static Tuple<string, int> Yospos()
{
   return new Tuple<string, int>("hail satan", 666);
}

public static void Bitch()
{
   Yospos().Split(out var a, out var b);
   Console.WriteLine(a);
   Console.WriteLine(b);
}

coffeetable
Feb 5, 2006

TELL ME AGAIN HOW GREAT BRITAIN WOULD BE IF IT WAS RULED BY THE MERCILESS JACKBOOT OF PRINCE CHARLES

YES I DO TALK TO PLANTS ACTUALLY
coding horrors thread is currently defending JS automatic semicolon insertion

:psyduck:

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

AlsoD posted:

you can't use linq for possibly-null objects or futures though right, isn't linq for streams only?

iirc fsharp implements options as a special type that uses null as nothing

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.
Edit: double posting phone

Maluco Marinero fucked around with this message at 11:39 on Apr 10, 2014

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.

coffeetable posted:

coding horrors thread is currently defending JS automatic semicolon insertion

:psyduck:

Of all the JS features for COBOL posters to un-ironically defend, automatic semicolon insertion would be the last thing I'd think of.

Adbot
ADBOT LOVES YOU

spongeh
Mar 22, 2009

BREADAGRAM OF PROTECTION
a lot of the js hipster types will defend ASI saying the rules are simple and that semicolons make their code look all dirty and unclean. you should just learn the rules and not make mistakes of missing them anywhere, ever.

i believe the npm codebase in node is full of terrible stuff like this. they also do variable declarations/arrays like so:

code:

var a = 1
    , b = 2
    , c = 3

var arr = ['string'
 , 'another string'
 , 'this is terrible'
]

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