|
low level langs are great for all the pearl-clutching about "ownership" they bring out. just let your gc take care of memory, and let finalizers take care of any other resources. ez and objectively, inarguably correct
|
# ? Sep 3, 2018 12:24 |
|
|
# ? Dec 3, 2024 15:48 |
|
redleader posted:low level langs are great for all the pearl-clutching about "ownership" they bring out. just let your gc take care of memory, and let finalizers take care of any other resources. ez and objectively, inarguably correct big big big disclaimer: don't forget to make your objs immutable, otherwise the ez correctness goes out of the window
|
# ? Sep 3, 2018 13:18 |
|
https://medium.com/@PaulDJohnston/serverless-best-practices-b3c97d551535 i see 3 possibilities a) this blag is awful b) ~~~serverless~~~ is awful c) both (a) and (b) honestly can't figure out which tho
|
# ? Sep 3, 2018 13:19 |
|
NihilCredo posted:https://medium.com/@PaulDJohnston/serverless-best-practices-b3c97d551535 That blog is pretty bad imo
|
# ? Sep 3, 2018 13:23 |
|
To expand (imo) : - Each function should do only one thing - correct - Functions don’t call other functions - correct - Use as few libraries in your functions as possible (preferably zero) - lmao what He talks about container cold start time but in the non-p-lang world importing a function from a library does not increase initialisation time. Maybe just a confused js dev here used to having comments slow down loops - Avoid using connection based services e.g. RDBMS - debatable I mean I kind of see where he's coming from in that it does limit scability to have your functions block on a single sql dB but also unless you're real real big they're nice to have for stuff that does need acid and you can't afford eventual consistency - One function per route (if using HTTP) - sure whatever It feels like this contradicts point one but sure code separation is nice - Learn to use messages and queues (async FTW) - I mean yeah this is literally the entire point - Data flows, not data lakes - see above - Just coding for scale is a mistake, you have to consider how it scales -??? Like I understand each word but this sentence is just meaningless and the paragraph afterwards doesn't help either Conclusion: reads like a "I just understood monads let me write a blog post comparing them to burritos" blog post. Points are either trivial (try to avoid depending on a single server connection when doing serverless!) or wrong.
|
# ? Sep 3, 2018 13:44 |
|
redleader posted:low level langs are great for all the pearl-clutching about "ownership" they bring out. just let your gc take care of memory, and let finalizers take care of any other resources. ez and objectively, inarguably correct I found them, the one person dumb enough to use finalizers that always fucks up everything.
|
# ? Sep 3, 2018 14:37 |
|
low level programming is good because you get to spend more time on irrelevant and fun bullshit and less time working on features. right?
|
# ? Sep 3, 2018 16:08 |
|
all programming is bad but yeah low level is less bad b/c you get less done
|
# ? Sep 3, 2018 16:14 |
|
i've been thinking a lot about how helpful the forums have been to me over my career and how sad it will be when i have to get my programming tips and discussion from hackernews and reddit. i think this place is swell. so, i finally got my poo poo together and created a real terrible programmers offsite. check it out: https://gophersland.com/
|
# ? Sep 3, 2018 17:25 |
|
DONT THREAD ON ME posted:i've been thinking a lot about how helpful the forums have been to me over my career and how sad it will be when i have to get my programming tips and discussion from hackernews and reddit. i think this place is swell. lmao
|
# ? Sep 3, 2018 17:43 |
|
DONT THREAD ON ME posted:i've been thinking a lot about how helpful the forums have been to me over my career and how sad it will be when i have to get my programming tips and discussion from hackernews and reddit. i think this place is swell.
|
# ? Sep 3, 2018 17:56 |
|
NihilCredo posted:big big big disclaimer: don't forget to make your objs immutable, otherwise the ez correctness goes out of the window rust shows that immutable vs mutable data structures for correctness vs performance is a false dichotomy you can do both just have mutable data structures and make them immutable/mutable in a scope you don't need a separate StringBuilder class
|
# ? Sep 3, 2018 20:03 |
|
i mean rust's str vs String is basically String vs StringBuilder in java
|
# ? Sep 3, 2018 20:12 |
|
not really str is a string slice and has no equivalent in java's std lib afaik edit: i know you're joking but people can get easily confused about it and i don't want them to lol
|
# ? Sep 3, 2018 20:27 |
|
Jabor posted:if the caller is going to be taking ownership, return a unique_ptr. if not then return a raw pointer or a reference. doesn't unique_ptr disallow copying, which the return would technically qualify as? its been a while but i remember something like that being the case
|
# ? Sep 3, 2018 20:54 |
|
unique_ptr disallows copying, because it is, well, unique. It doesn't disallow moving, because that means ownership transfer -> you can return it from a function just fine.
|
# ? Sep 3, 2018 21:01 |
|
I missed emulator chat, but heres my unfinished chip8 thing https://github.com/shameful/chip8plusplus Got tired of it after several of the places I was using for documentation had conflicting info on some instructions, and each implementation would have broken programs expecting the other one.
|
# ? Sep 3, 2018 22:57 |
|
i always wondered how much it would cost to have something crawl this site and provide a search engine that actually worked and included archives. something built on elastic or a similar service. i remember a long time ago there was a 3rd party search that was decent.
|
# ? Sep 3, 2018 23:00 |
|
dassaas, that's what the old search engine was.
|
# ? Sep 3, 2018 23:13 |
|
you can probably train neural nets on each poster. shaggar was the proof of concept
|
# ? Sep 3, 2018 23:53 |
|
akadajet posted:i always wondered how much it would cost to have something crawl this site and provide a search engine that actually worked and included archives. something built on elastic or a similar service. i remember a long time ago there was a 3rd party search that was decent. If you don't care about archives, googling with "site:forumsomethingawful.com" is quite needs-suiting
|
# ? Sep 4, 2018 00:54 |
|
Xarn posted:unique_ptr disallows copying, because it is, well, unique. aha yeah thats what I'm missing for whatever reason the code I worked on didn't have move semantics available yet
|
# ? Sep 4, 2018 02:08 |
|
cool so my Glide lighting and texturing were broken because: - I didn’t normalize normal vectors after transforming them - I was placing (U / (1/W)) where (U/W) should go now I have lambert shading and textured perspective-projected polygons it only took me 3 days to figure that bug out
|
# ? Sep 4, 2018 08:29 |
|
ctps: been getting carried away with metaprogramming in rust: https://github.com/djmcgill/atsamd21-rs/blob/master/hal/src/gpio.rs#L527 turns code:
code:
|
# ? Sep 4, 2018 12:42 |
|
im the spaces at the start of the doc comments
|
# ? Sep 4, 2018 12:43 |
|
someone made a macro diagram generator for rust and it’s fing awesome https://lukaslueg.github.io/macro_railroad_wasm_demo/
|
# ? Sep 4, 2018 13:13 |
|
i've got a gsm phone that runs micropython, heh
|
# ? Sep 4, 2018 14:17 |
|
am i an embedded dev now
|
# ? Sep 4, 2018 14:18 |
|
gonadic io posted:
Is this some serverless specific thing? This seems like an awful rule for most coding scenarios.
|
# ? Sep 4, 2018 14:33 |
|
Skyl3lazer posted:Is this some serverless specific thing? This seems like an awful rule for most coding scenarios. yeah i think so
|
# ? Sep 4, 2018 14:33 |
|
what is serverless and why does it still require servers
|
# ? Sep 4, 2018 14:55 |
|
its not a thing and also it requires servers. its like "non-blocking io" back when node js was a thing
|
# ? Sep 4, 2018 15:09 |
|
isn't "serverless" just when you get the client machine to do everything e.g. javascript
|
# ? Sep 4, 2018 15:26 |
|
anthonypants posted:isn't "serverless" just when you get the client machine to do everything e.g. javascript
|
# ? Sep 4, 2018 15:31 |
|
Bloody posted:what is serverless and why does it still require servers I don't think it's a real technical innovation; you upload your code and then the price model is more like pay-per-invocation (of e.g. API endpoints) than pay-per-(servers x time + bandwidth)
|
# ? Sep 4, 2018 15:34 |
|
"serverless" means "spin up a docker container in someone else's kubernetes deployment, run one (1) javascript function, and then terminate the container, every time I hit this REST endpoint"
|
# ? Sep 4, 2018 15:34 |
|
quote:With AWS Lambda, you pay only for what you use. You are charged based on the number of requests for your functions and the duration, the time it takes for your code to execute.
|
# ? Sep 4, 2018 15:36 |
|
So serverless really seems like a cloud cost model leading to a different programming model, which makes sense and is kinda neat. not something to get excited about unless you really care about the cost of a cloud deployment
|
# ? Sep 4, 2018 15:38 |
|
I care very much about the costs of my butt deployment
|
# ? Sep 4, 2018 15:46 |
|
|
# ? Dec 3, 2024 15:48 |
|
its useful when you have something that will get called very infrequently, or is some sort of special endpoint that you dont want integrated into your applications. especially if it just does stuff like call AWS API endpoints
|
# ? Sep 4, 2018 15:49 |