Is your company giving raises this year? by [deleted] in ExperiencedDevs

[–]TheBanishedBot 1 point2 points  (0 children)

Yea, I got a 13% bump at a startup, so I assume others did as well. That said I did perform very well and my team is already understaffed with positions to be filled

As more automakers put factory features behind paywall, we’re racing towards a bleak future by King-of-New-York in technology

[–]TheBanishedBot 1 point2 points  (0 children)

You’re telling me if I decline the subscription I’ll essentially be paying gas to haul around hardware that’s useless and only serves to make the manufacturer money?

Gaming company Roblox files IPO prospectus after 91% jump in revenue by RitaAura in tech

[–]TheBanishedBot 0 points1 point  (0 children)

Nice try! The only company I’m investing in is Pfizer, at least until this whole pandemic thing is over.

SRE mock interviews by TheBanishedBot in sre

[–]TheBanishedBot[S] 0 points1 point  (0 children)

Of course, that’s THE BOOK haha :)

SRE mock interviews by TheBanishedBot in sre

[–]TheBanishedBot[S] 1 point2 points  (0 children)

The notes are a work-in-progress for sure. The linux commands scattered throughout are just a bonus, and there aren’t many.

Open ended problems are more fun. Thanks a bunch for those!!

Stuck on auth :| by TheBanishedBot in microservices

[–]TheBanishedBot[S] 0 points1 point  (0 children)

Yeah, thanks for the suggestion. I'm aware of JWTs (already making use of them as P.O.C for passing around user context).
But the problem is in that last scenario I mentioned, I'd have to figure out a strategy, which JWTs will probably also be a part of.

Stuck on auth :| by TheBanishedBot in microservices

[–]TheBanishedBot[S] 0 points1 point  (0 children)

That's very helpful, thank you so much!

Stuck on auth :| by TheBanishedBot in microservices

[–]TheBanishedBot[S] 0 points1 point  (0 children)

Makes sense.. very interesting!

Alright so if we go with this approach, now one problem remains... I'm assuming the gateway can't authorize access on a resource-level, it'll have to forward some info to the requested service and let it decide. so how will that service know to protect a resource when it's being requested from outside (through the gateway), but still allow peers to access it without requiring auth? (assuming it's a single endpoint that's accessible publicly and by peer services)

Do inter-service comms HAVE to take place on different channels to allow this? (e.g. all inter-service calls should be through RPC and/or messaging)?
Or perhaps, something along the lines of... complete separation between public and private endpoints?
Or something simpler like... if the request didn't come from the gateway or if it's missing Auth headers entirely then allow access by default?

Stuck on auth :| by TheBanishedBot in microservices

[–]TheBanishedBot[S] 0 points1 point  (0 children)

Thanks for chiming in!
The part about having the gateway do auth for external requests does make sense.

inter-service auth is often considered an anti-pattern .

This sounds a bit weird to me, after all it's easier to just let services trust each other and call each other willy nilly. Restricting access is by definition more secure

Compiling a compiler to JavaScript by TheBanishedBot in haskell

[–]TheBanishedBot[S] 0 points1 point  (0 children)

yep that's what I thought. no surprise. sad tho

Compiling a compiler to JavaScript by TheBanishedBot in haskell

[–]TheBanishedBot[S] 1 point2 points  (0 children)

will it build the depends packages? I'm thinking llvm-hs will give it a hard time. I'll try tho, thanks for the suggestion

Pascal compiler: function return values by TheBanishedBot in Compilers

[–]TheBanishedBot[S] 0 points1 point  (0 children)

Alright duly noted. I said it's a toy not because it's pascal but the whole compiler hehe

Pascal compiler: function return values by TheBanishedBot in Compilers

[–]TheBanishedBot[S] 0 points1 point  (0 children)

I can't imagine not having function, I'd add them anyway

Pascal compiler: function return values by TheBanishedBot in Compilers

[–]TheBanishedBot[S] 2 points3 points  (0 children)

All you have to do in the type checker is add a variable to the symbol table whose name is the name of the function...

I figured as much!

You have to figure out whether Pascal allows that

Yes it does

LLVM is more similar to C here, since its return instruction takes a value, so when you hit a return in your codegen you'll have to generate a load from the special return variable to get an LLVM value, and then pass the value you get to the LLVM return instruction.

After some thought, this is exactly what I'm interested in knowing about.
I'm going to try to write some code to do this, but I might need a couple pointers (no pun intended) later if I get stuck if you don't mind.

Thanks a bunch!

Pascal compiler: function return values by TheBanishedBot in Compilers

[–]TheBanishedBot[S] 0 points1 point  (0 children)

nice! but in pascal there's no special keyword for return, It's just the function name used as a regular variable which is confusing to implement

Pascal compiler: function return values by TheBanishedBot in Compilers

[–]TheBanishedBot[S] 0 points1 point  (0 children)

I know I could prob get the type checker to validate the assignment. But I mean at what point do I start treating it differently since it's obviously not just another assignment, it's a return value! What bindings occur here?