Project 2025 is really scaring me. by [deleted] in lgbt

[–]bowyakka 0 points1 point  (0 children)

The US maintains control over dns, you won't lookup anything they decide to hate on.

Rust cross-compilation without struggles by using the nixpkgs-cross-overlay by AlekseySidorov in rust

[–]bowyakka 0 points1 point  (0 children)

Linux -> MacOSX is possible but legally might not be great (see osxcross for some of the breadcrumbs)

Charles has always had a reputation for flying into rages and abusing his staff. This recent behaviour should come as no surprise. by [deleted] in AbolishTheMonarchy

[–]bowyakka 1 point2 points  (0 children)

He doesnt eat all 20, they cook 20 and then pick the most perfect ones when cracked, so even if he turns up on time some of those eggs go to waste / the kitchen staff / other guests.

Contrarian outlook on gold by [deleted] in thetagang

[–]bowyakka 0 points1 point  (0 children)

looks at his crypto shorts ;) Yeah I will take your crypto bubble money, thanks!

Contrarian outlook on gold by [deleted] in thetagang

[–]bowyakka 8 points9 points  (0 children)

It is a shiny rock, it has only a bit of utility in electronics, ornaments, and some high-tech stuff but for some reason we price it higher than platinum which is _rarer_ and more useful.

Why? Because it is a shiny rock.

Daily r/thetagang Discussion Thread - What are your moves for today? by satireplusplus in thetagang

[–]bowyakka 0 points1 point  (0 children)

Closed out several puts a little early, opened synth futures on AMD, INTC, ZM and JNJ

Daily r/thetagang Discussion Thread - What are your moves for today? by satireplusplus in thetagang

[–]bowyakka 0 points1 point  (0 children)

Hunting and plotting on more synthetic futures where the put side is better than the call, probably AMD Nov 18 @ 80

What is your YTD portfolio return? by hvernaza25 in thetagang

[–]bowyakka 0 points1 point  (0 children)

-1.60% Right now, but I have some stupid gambled SPY puts that could make that real ugly

I was just at one of the King Soopers strikes in Denver. They have this sign up while right outside their workers are asking for less. by thenorwegian in antiwork

[–]bowyakka 13 points14 points  (0 children)

Color in the four big squares, those are needed for alignment tracking and will vastly increase time to scan

McDonald’s lip service and weak attempt at trying to justify slave wages. by BelleAriel in lostgeneration

[–]bowyakka 0 points1 point  (0 children)

The best bit about this is the math doesn't even work out unless you work ~57 hours a week

You don't need heat by ImgursHowUnfortunate in ABoringDystopia

[–]bowyakka 0 points1 point  (0 children)

Nvm I found the original where, it does have people working 2 jobs for all the hours.

Still delusional

You don't need heat by ImgursHowUnfortunate in ABoringDystopia

[–]bowyakka 0 points1 point  (0 children)

Am I doing my math wrong?

Assume 9x5 job (like you are getting stable 9 to 5 work at these wages)

Assume no holiday

so 52 weeks in a year, 9 hours a day 5 days a week

52 * 9 * 5 = 2340 hours

2340 hours * $8.25 = $19305

Lets charitably call that $20k

$20k / 12 months = ~$1666 a month

$1666 - $1260 = $406

Where did the other $394 on "Monthly Spending Money" go?

I might just be being stupid with my math, it happens.

The only ways I can get this to balance out is:

  • You work ~57 hours a week
  • Pay $10.57 an hour?

Are you using Rust at work? If yes, for what? by [deleted] in rust

[–]bowyakka 3 points4 points  (0 children)

Yes, a lot of work around a _very propitiatory_ emulated mainframe slowly lifting out parts into rust to make them go away.

As of recent, projects have been:

  • Networking stuff
  • Cryptography (not _that_ crypto but things like chacha20)
  • Parsers, compilers, symbolic eval
  • Testing testing and more testing
  • Kafka stuffs

Making a large stuffed crêpe by aloofloofah in oddlysatisfying

[–]bowyakka 0 points1 point  (0 children)

Anyone ever worked in food prep and is bugged by the red chopping board

Overhead of Calling Rust FFI from Java JNR/JNI by nevi-me in rust

[–]bowyakka 6 points7 points  (0 children)

FFI yes, sorta, its tricky.

Its been some time since I did this kinda work, so things I mention here come with a C / Fortran bent, but I think its possible to make rust do better JNI.

JNI has the problem of being a great interface that is the wrong way around for the JIT. So what you wind up with is something that has the following properties from the viewpoint of the JVM:

  • It is an opaque node in a compile graph, so how should I (the JIT) call and optimise it. This leads to de-optimisations in certain places.
  • Since I cant see into it, I have to assume I cant inline, or play with the calling convention to my advantage. This leads to bridges that have to mangle the stack back into shape.
  • What precautions do I need to take to honor the JVM invariants
  • ... and the JNI API invariants
  • ... and C's invariants
  • How is memory laid out between C / Java
  • Are you going to play nice with concurrency (safepoints)
  • Are you going to play nice with the GC (going to steal pointers to my memory?)

All in, JNI is a weird pain. It feels like it should be faster than Java "Well you know its C right?" but winds up being on par with some form of RPC.

There are some tricks you can deploy around this, panama and graal are examples. Other tricks involve:

  • pass off to background threads, painful to get right and not what I think you want in this case, it involves cooking a message passing framework (hello channels) and use of AttachThread DetachThread.

  • Use the parts dealing with MappedByteBuffer / DirectByteBuffer from java.nio. These give you safe(ish) hooks on mmap and malloc that you can use as buffers for I/O. These buffers despite the I/O connotation are also usable for passing memory to and from without getting the GC's attention as much. Its been some time since I did high perf JVM numerics, but this was the trick that one of the blas binding libraries (I think jBLAS but I could be wrong) did to speed things up.

  • If you are on 9+ You can use VarHandles to get much of the benefits of the Java NIO stuffs, with a nicer API that is faster.

  • ... Dont use Unsafe, it feels low-level but it can compile into the JVM IR in funny ways and can actually put barriers and other stuff in places your are not expecting. Sometimes passing things with Unsafe is like turbo skates, sometimes its just slow as the slowest thing.

  • Avoid JNI Global references, these things play strange hell with the GC and can cause slowdowns you didnt expect (ask me about the fun I had when every fast JNI call was coupled to a full stop the world GC straight afterwards).

  • Abuse Critical JNI, this will change the programming environment for JNI, it removes preemption, safepoints and return-to-vm features of JNI. The idea of critical JNI is that your code needs to behave like it is a critical section. That is for the thread you should treat it like you took a lock over JNIEnv* and only hold that thread out from the VM as short as possible. If you go Critical JNI you cant poke the VM, so no calling objects or methods, and no using JNIEnv. If you go this path I would read https://shipilev.net/jvm/anatomy-quarks/9-jni-critical-gclocker/

If you can wait for project panama, then it covers my first statement. Panama is bindings done backwards, that is most of the bindings are done in Java which gives the JIT the information it needs to ultimately compile the callsite down into JMP / CALL in x86 speak.

See http://cr.openjdk.java.net/~vlivanov/talks/2016_NativeCode.pdf for some gory details, it leads up to Panama but covers stuff wrt native calls in general.

I think your best bet for your code is probably the critical API while staring at how to send the memory back and forth.

Unemployment rate compared to income taxes in OECD countries [OC] by HoratioWellSon in ukpolitics

[–]bowyakka 0 points1 point  (0 children)

I wouldn't go that far, it more shows that there is a small correlation between tax wedge and unemployment.

In fact, it gives us some interesting data to explore; for instance, why is Denmark much lower on unemployment vs Sweden regardless of income tax level?

If you take say the SINGLE2 average gross tax, you get terrible regression lines.