New around here? Register your SA Forums Account here!

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

DELETE CASCADE posted:

420 blazor it

Adbot
ADBOT LOVES YOU

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat

Nomnom Cookie posted:

i am imagining the lovechild of spring and lombok, freakish and terrifying but also impressive

it actually rules. you can define config values that are parsed either during compile or run time. it’s way more than Lombok, and it also handles the graalvm compilation via docker, if you want.

it makes your app start up suuuuper fast and reduces so much runtime.

anything can be done ahead of time since it uses bytecode recording. have a giant graphql handler that is generated from a bunch of beans? have it get generated during the build phase (it’s still regular java code) and then let the native compiler turn it into optimized code. it’s really cool.

Bloody
Mar 3, 2013

Shaggar posted:

they shouldn't be that slow, but you can also cache your reflection results. If you know what attributes will be where at compile time then don't use attributes, otherwise reflection is the only way to understand what attributes are in use at runtime.

we've got 1000+ instances of https://docs.microsoft.com/en-us/dotnet/api/system.xml.serialization.xmlenumattribute?view=netframework-4.8 littered around and i have to maintain backwards compat with any existing serialized xml but this is all knowable at compile time

Nomnom Cookie
Aug 30, 2009



CRIP EATIN BREAD posted:

it actually rules. you can define config values that are parsed either during compile or run time. it’s way more than Lombok, and it also handles the graalvm compilation via docker, if you want.

it makes your app start up suuuuper fast and reduces so much runtime.

anything can be done ahead of time since it uses bytecode recording. have a giant graphql handler that is generated from a bunch of beans? have it get generated during the build phase (it’s still regular java code) and then let the native compiler turn it into optimized code. it’s really cool.

CRIP EATIN BREAD posted:

it actually rules. you can define config values that are parsed either during compile or run time. it’s way more than Lombok, and it also handles the graalvm compilation via docker, if you want.

it makes your app start up suuuuper fast and reduces so much runtime.

anything can be done ahead of time since it uses bytecode recording. have a giant graphql handler that is generated from a bunch of beans? have it get generated during the build phase (it’s still regular java code) and then let the native compiler turn it into optimized code. it’s really cool.

freakish, terrifying, impressive. it ticks all the boxes

Shaggar
Apr 26, 2006

Bloody posted:

we've got 1000+ instances of https://docs.microsoft.com/en-us/dotnet/api/system.xml.serialization.xmlenumattribute?view=netframework-4.8 littered around and i have to maintain backwards compat with any existing serialized xml but this is all knowable at compile time

Are you reading the attributes yourself or is just sending it to xmlserailzier or whatever? cause .net's xml tools definitely didn't know about your code when they were compiled

Bloody
Mar 3, 2013

reading them myself for some reason

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.
oh a billion new posts over the weekend, which argument did we re-hash this time?

1. spaces/tabs
2. vim/emacs/sublime/vscode/notepad++
3. p-lang x is dumb/not dumb
4. all of the above

cjs: "Why has the site been in maintenance mode for almost 4 hours?" The Russians wrote a class that is essentially a singleton that divvies out database IDs and oh whatdoyouknow it's not remotely threadsafe, and we end up with a bunch of ID collisions under load. I'll put locks on it. I get to choose between performance and thread safety, I guess.

cinci zoo sniper
Mar 14, 2013




Finster Dexter posted:

oh a billion new posts over the weekend, which argument did we re-hash this time?

1. spaces/tabs
2. vim/emacs/sublime/vscode/notepad++
3. p-lang x is dumb/not dumb
4. all of the above

cjs: "Why has the site been in maintenance mode for almost 4 hours?" The Russians wrote a class that is essentially a singleton that divvies out database IDs and oh whatdoyouknow it's not remotely threadsafe, and we end up with a bunch of ID collisions under load. I'll put locks on it. I get to choose between performance and thread safety, I guess.

guids, arrays, and where to not find any of them or all

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.
lmbo the Russians' database ID class is part of a half-assed event-sourced db implementation. Half-assed because there is tons of code that updates the base record, rather than adding events to the events table. So, now I need to go through the code and figure out which fields I should just read from the base record and which I should read from the base + events. I am really hating these guys right now.

Shaggar
Apr 26, 2006

Bloody posted:

reading them myself for some reason

well you shouldn't do that! did you write your own xml serializer?

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

old grumpy coworker who hasn't earned a raise or learned a new thing since twice as long as I've worked at this place:

"say what you will about WebForms, but it was pretty cool. i had no experience at all in web development and i still knocked out that old site in a few days, and it just worked."

everybody else speaking together like huey, dewey and louie:

"it worked fine as long as it had exactly one user at a time. when people started seeing weird unexplained query results, you dismissed it as 'can't reproduce' until we discovered that the entire session state lived in a single global and the users were seeing each other's pages"

pseudorandom
Jun 16, 2010



Yam Slacker

Finster Dexter posted:

oh a billion new posts over the weekend, which argument did we re-hash this time?

1. spaces/tabs
2. vim/emacs/sublime/vscode/notepad++
3. p-lang x is dumb/not dumb
4. all of the above

it was a globally unique idiotic discussion.

Bloody
Mar 3, 2013

Shaggar posted:

well you shouldn't do that! did you write your own xml serializer?

i didnt! but yeah basically. looks like we built an xml ser/de out of system.xml.linq. it is very slow and very obtuse

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.

pseudorandom posted:

it was a globally unique idiotic discussion.

lol

simble
May 11, 2004

pseudorandom posted:

a globally unique idiotic discussion.

thread title pls

FlapYoJacks
Feb 12, 2009

pseudorandom posted:

it was a globally unique idiotic discussion.

Shaggar
Apr 26, 2006

pseudorandom posted:

it was a globally unique idiotic discussion.

:discourse:

Shaggar
Apr 26, 2006

Bloody posted:

i didnt! but yeah basically. looks like we built an xml ser/de out of system.xml.linq. it is very slow and very obtuse

system.xml.linq is how you do compile time serialization without attributes. sounds like u guys managed to mix linq and xmlserializer to get the worst of both worlds.

altho if ur model is marked up with xml attributes then just try using xmlserializer and see if it performs better than ur custom thing.

Xarn
Jun 26, 2015

pseudorandom posted:

it was a globally unique idiotic discussion.

:hmmyes:

animist
Aug 28, 2018

CRIP EATIN BREAD posted:

it actually rules. you can define config values that are parsed either during compile or run time. it’s way more than Lombok, and it also handles the graalvm compilation via docker, if you want.

it makes your app start up suuuuper fast and reduces so much runtime.

anything can be done ahead of time since it uses bytecode recording. have a giant graphql handler that is generated from a bunch of beans? have it get generated during the build phase (it’s still regular java code) and then let the native compiler turn it into optimized code. it’s really cool.

i thought graalvm had super-high memory usage because of how its JIT works? idk i read that somewhere

graalvm is super cool in general honestly, i feel like i don't hear about it much for how neat it is

Xarn
Jun 26, 2015

prisoner of waffles posted:

what kind of comment did you throw on it?

I guess it isn't too unclear when you assign to a variable including explicit capture of itself:

code:
std::function<int(int,int)> sum;
sum = [term,next,&sum](int a, int b)->int {
if(a>b)
    return 0;
else
    return term(a) + sum(next(a),b);
};

No std::function here, just nice lambdas

C++ code:
auto walk_tree = [](StageNode const* node) {
    auto walk_impl = [](StageNode const* node, auto const& walk_ref) -> void {
        for (auto const& child : node->children()) {
            walk_ref(child.get(), walk_ref);
        }
    };

    walk_impl(node, walk_impl);
};

Soricidus
Oct 20, 2010
freedom-hating statist shill

animist posted:

i thought graalvm had super-high memory usage because of how its JIT works? idk i read that somewhere

graalvm is super cool in general honestly, i feel like i don't hear about it much for how neat it is

graalvm has two big problems:

1. they inexplicably based it on java 8 just as the rest of the world finally managed to move on to java 11. they then confused everyone by trying to imply that java 11 includes graal when really it doesn’t.

2. in a typical oracle dick move, it’s pay-for-performance. the free version is deliberately crippled, but you can buy an enterprise license that has all the jit features enabled!

end result: it’s an interesting curiosity but i don’t personally know of anyone actually using it yet. maybe in a year or two if they catch up with the rest of java and pull their heads out of their asses on licensing but it’s oracle so lol to both

animist
Aug 28, 2018

Soricidus posted:

graalvm has two big problems:

1. they inexplicably based it on java 8 just as the rest of the world finally managed to move on to java 11. they then confused everyone by trying to imply that java 11 includes graal when really it doesn’t.

2. in a typical oracle dick move, it’s pay-for-performance. the free version is deliberately crippled, but you can buy an enterprise license that has all the jit features enabled!

end result: it’s an interesting curiosity but i don’t personally know of anyone actually using it yet. maybe in a year or two if they catch up with the rest of java and pull their heads out of their asses on licensing but it’s oracle so lol to both

oh i didn't know oracle had their claws that deep in it. RIP

redleader
Aug 18, 2005

Engage according to operational parameters
i imagine that client-side js state management is about as painful as state management in like a winforms desktop app

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat

Soricidus posted:

2. in a typical oracle dick move, it’s pay-for-performance. the free version is deliberately crippled, but you can buy an enterprise license that has all the jit features enabled!

This is true, but I foresee the native compilation to be the big draw instead of the polyglot JIT support.

Captain Foo
May 11, 2004

we vibin'
we slidin'
we breathin'
we dyin'

pseudorandom posted:

it was a globally unique idiotic discussion.

:eyepop:

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
RIPTerm Torn

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

pseudorandom posted:

it was a globally unique idiotic discussion.

Zlodo
Nov 24, 2006

pseudorandom posted:

it was an universally unique idiotic discussion.

:colbert:

Carthag Tuek
Oct 15, 2005

altid pamo når du går
veje du burd' kende
overleved' barneår
lig' til livets ende

not sure it was that unique tbh

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.
how do you know there are no colliding IDs generated on mars??!?!

mystes
May 31, 2006

Krankenstyle posted:

not sure it was that unique tbh
Oh poo poo maybe we called the default constructor?

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.

CRIP EATIN BREAD posted:

This is true, but I foresee the native compilation to be the big draw instead of the polyglot JIT support.
I'm not sure. Sure, your app starts faster but since it can't do any hotspot optimizations it'll actually run worse than a JIT. maybe useful for cloud functions or command-line tools but idk

polyglot is actually quite interesting. being able to call out from java to, say, some nodejs monstrosity with that call having essentially zero overhead (it's 'just a method call' that happens to go to bytecode that was compiled from javascript) is pretty cool and potentially very useful

Carthag Tuek
Oct 15, 2005

altid pamo når du går
veje du burd' kende
overleved' barneår
lig' til livets ende

mystes posted:

Oh poo poo maybe we called the default constructor?

lmao

gonadic io
Feb 16, 2011

>>=

mystes posted:

Oh poo poo maybe we called the default constructor?

animist
Aug 28, 2018

Sagacity posted:

I'm not sure. Sure, your app starts faster but since it can't do any hotspot optimizations it'll actually run worse than a JIT. maybe useful for cloud functions or command-line tools but idk

polyglot is actually quite interesting. being able to call out from java to, say, some nodejs monstrosity with that call having essentially zero overhead (it's 'just a method call' that happens to go to bytecode that was compiled from javascript) is pretty cool and potentially very useful

Yeah but have they ported nodejs libraries? I suspect most nodejs code won't work there, esp. native stuff

Deffon
Mar 28, 2010

Native compilation is the response to the complaints about Java microservices and functions - memory usage, start up time and executable size (if you include the size of the JRE).

The funny thing about this is that the most common Java web framework - Spring Boot - cannot support native compilation without heavy rewrites due to over usage of reflection magic.
GraalVM would have to store a great amount of Java specific metadata to make it work, which would punish other users who expected a lightweight VM.

Spring Fu is an experimental project that cuts down on reflection magic and offers a more fluent API for registrering beans without reflection.

Some people noticed the struggles with Spring Boot, and now advertise libraries that look like trimmed down versions of Spring Boot.
They use regular Java annotation processors to generate code that resolves bean dependencies at compile-time.
They use Java EE DI/JAX-RS annotations instead of the Spring specific alternative, but the most telling influence is that they all support adding extensions without code changes and they all read config from "application.properties" by default.
These frameworks includes Quarkus, Micronaut and Helidon.

Nomnom Cookie
Aug 30, 2009



Sagacity posted:

I'm not sure. Sure, your app starts faster but since it can't do any hotspot optimizations it'll actually run worse than a JIT. maybe useful for cloud functions or command-line tools but idk

polyglot is actually quite interesting. being able to call out from java to, say, some nodejs monstrosity with that call having essentially zero overhead (it's 'just a method call' that happens to go to bytecode that was compiled from javascript) is pretty cool and potentially very useful

dunno, graal gets a closed world to optimize in, which hotspot can never have. and the cpu cost of optimization passes is paid at build time so can do fancy things too expensive for jit. dunno how much there really is of that though

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
while true that JIT can have higher peak performance than graal native, from my experience it hasn't been very drastic.

meanwhile, memory usage is wayyyy lower in native compiled stuff.

Adbot
ADBOT LOVES YOU

prisoner of waffles
May 8, 2007

Ah! well a-day! what evil looks
Had I from old and young!
Instead of the cross, the fishmech
About my neck was hung.

cinci zoo sniper posted:

guids, arrays, and where to not find any of them or all

pseudorandom posted:

it was a globally unique idiotic discussion.
:golfclap:

Xarn posted:

No std::function here, just nice lambdas

C++ code:
auto walk_tree = [](StageNode const* node) {
    auto walk_impl = [](StageNode const* node, auto const& walk_ref) -> void {
        for (auto const& child : node->children()) {
            walk_ref(child.get(), walk_ref);
        }
    };

    walk_impl(node, walk_impl);
};

not terrible, but high syntactic pucker factor for me.

I assume in the real code you are capturing other stuff in the scope?

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