|
HoboMan posted:so this is my first new app in several years. can anyone recommend a logging or error handling framework for a angular.net project? dunno if you're going to be dealing with datetime stuff, but if you are going to need to deal with dates/times over multiple timezones or deal with daylight savings then you'll want to think very hard about incorporating something like nodatime from a very early stage. you don't want to start by using DateTimeOffset etc then suddenly realise how poo poo the .net date time apis are
|
# ? Apr 15, 2019 21:00 |
|
|
# ? Dec 7, 2024 08:42 |
|
animist posted:https://github.com/orangeduck/Cello so preoccupied with whether they could didn’t stop to think whether they should
|
# ? Apr 15, 2019 21:02 |
|
god i hate writing boilerplate dtos
|
# ? Apr 15, 2019 21:03 |
|
eschaton posted:so preoccupied with whether they could "i wish i had c, but without static typing" --nobody, ever
|
# ? Apr 15, 2019 21:42 |
|
code:
e: code:
elite_garbage_man fucked around with this message at 23:02 on Apr 15, 2019 |
# ? Apr 15, 2019 22:53 |
|
code:
|
# ? Apr 15, 2019 23:07 |
|
imagine how much more amazing a C++ version could be, with template metaprogramming mixed in too
|
# ? Apr 16, 2019 02:23 |
|
Is there a modern use case for macros besides include guards or platform specific compilation?
|
# ? Apr 16, 2019 02:52 |
|
gonadic io posted:i'm having increasing amount of issues with discord's formatting especially on mobile. how dumb is it for my bot to dynamically generate a png or svg instead of responding in discord's half-assed markup? what the gently caress are you doing in discord
|
# ? Apr 16, 2019 02:58 |
|
Asleep Style posted:Is there a modern use case for macros besides include guards or platform specific compilation? https://troydhanson.github.io/uthash/
|
# ? Apr 16, 2019 03:19 |
|
Asleep Style posted:Is there a modern use case for macros besides include guards or platform specific compilation? https://github.com/orangeduck/Cello
|
# ? Apr 16, 2019 03:47 |
|
florida lan posted:what the gently caress are you doing in discord sounds like they’re attempting to use it op
|
# ? Apr 16, 2019 03:52 |
|
i definitely want to expand my chat client to be really big to make some bot's wacky multi-column layout legible, and then shrink it back down so that it's actually usable for chatting every single time the bot posts something that wouldn't be annoying at all
|
# ? Apr 16, 2019 04:28 |
|
Asleep Style posted:Is there a modern use case for macros besides include guards or platform specific compilation? absolutely you can do a lot of metaprogramming with macros that can actually be beneficial to your code, both for clarity and for safety as an example, if you need to do a lot of buffer processing, you can write alloc/free macros that sagely choose to create buffers under a certain size on the stack rather than the heap and significantly boost performance the GCC ({ … }) can also help by letting you write macros that return something reliably of course being purely text substitution they’re still not as powerful as Lisp macros
|
# ? Apr 16, 2019 05:18 |
|
ctps: turns out you shouldn't create hundreds of thousands of instances of HttpClient in a tight loop who knew
|
# ? Apr 16, 2019 10:21 |
|
dick traceroute posted:ctps: turns out you shouldn't create hundreds of thousands of instances of HttpClient in a tight loop aaaaaaaaaa
|
# ? Apr 16, 2019 10:44 |
|
macros are great for embedded stuff bit janitoring too, most manufacturers supply macro libraries for dealing with peripherals and whatnot meaning you can write something like this without function call overhead: code:
|
# ? Apr 16, 2019 10:59 |
|
the c preprocessor is so bad but I can't stop using and abusing it help
|
# ? Apr 16, 2019 11:04 |
|
Symbolic Butt posted:the c preprocessor is so bad but I can't stop using and abusing it Same but Rust's version: https://crates.io/crates/future-union
|
# ? Apr 16, 2019 11:09 |
|
dick traceroute posted:ctps: turns out you shouldn't create hundreds of thousands of instances of HttpClient in a tight loop It implements IDisposable but that's a trick, disposing it doesn't help!!!! SqlConnection on the other hand is fine with doing this e: "fine"
|
# ? Apr 16, 2019 12:00 |
|
Asleep Style posted:Is there a modern use case for macros besides include guards or platform specific compilation? https://github.com/sekrit-twc/zimg/blob/master/src/zimg/resize/x86/resize_impl_avx.cpp#L143 the holy trinity: template metaprogramming, assembler intrinsics, c preprocessor macros the macros actually do help slightly in making these unrolled loops somewhat more readable, i think. if you want to nerd out about optimization, image processing is one of the more accessible applications for it with quite a bit of high quality open source code. this particular library does some pretty cool poo poo. the template metaprogramming combined with assembler intrinsics is there to generate hand-vectorized codepaths for a whole bunch of different scenarios, and in some cases even have handwritten assembler that is generic over a bunch of different types. it will also generate a graph of these vectorized dsp filters to get from any arbitrary input to any arbitrary output (including resizing, bitdepth conversion with dithering and colorimetry changes including gamma). if you're sick of javascript being slow, maybe commit messages like this will make you feel better? code:
e2: quoted the wrong post lol TheFluff fucked around with this message at 12:27 on Apr 16, 2019 |
# ? Apr 16, 2019 12:03 |
|
nim has a cool macro system that lets you manipulate the AST using the language itself. sometimes I miss working on the geospatial database stuff I used to but I don’t miss that company. getting a C job immediately out of college and working on a SPARC64 based application loaded with macros and bitpacking made doing stuff in managed languages less... interesting
|
# ? Apr 16, 2019 12:11 |
|
pointsofdata posted:It implements IDisposable but that's a trick, disposing it doesn't help!!!! SqlConnection on the other hand is fine with doing this I actually feel like it shouldn't be idisposable Not that we had it in a using block... No joke, same day I found a set of tests with: singleton HttpClient (good) running in parallel (good) Altering default request headers on the client, breaking other tests in the process (Hella lol)
|
# ? Apr 16, 2019 12:12 |
|
dick traceroute posted:ctps: turns out you shouldn't create hundreds of thousands of instances of HttpClient in a tight loop the pit of success
|
# ? Apr 16, 2019 12:18 |
|
Thanks everybody, all of those examples are super helpful
|
# ? Apr 16, 2019 13:25 |
|
The last Chrome updated silently broke our application. lol. poo poo.
|
# ? Apr 16, 2019 14:00 |
|
Aramoro posted:The last Chrome updated silently broke our application. you write ublock?!
|
# ? Apr 16, 2019 14:02 |
|
dick traceroute posted:ctps: turns out you shouldn't create hundreds of thousands of instances of HttpClient in a tight loop lol same but with EF DbContext in our app... the Russians were aggressively recreating DbContext for EACH function call... which is what you do if you need EF to do work on other threads... but then they just did everything on main thread, so wow I got a huge performance gain by just using the scoped DbContext from the DI container lmao
|
# ? Apr 16, 2019 14:17 |
|
animist posted:https://github.com/orangeduck/Cello https://www.youtube.com/watch?v=srme0p3oxFo
|
# ? Apr 16, 2019 18:09 |
|
florida lan posted:what the gently caress are you doing in discord here's what it looks like on web when the screen is wide enough: here's what it looks like on discord's mobile app: other than the app just being poo poo (see how many of those names are just @invalid-user) i'd like to resolve this. markdown has support for tables but discord doesn't support it. some bots use monospaced code blocks like this: but if they're too wide then it line wraps and looks loving awful so yeah I was thinking about generating SVG/PNGs and that at least would not gently caress up the formatting and would in fact auto scale to the width of the user's screen if they clicked on it
|
# ? Apr 16, 2019 19:25 |
|
gonadic io posted:markdown has support for tables but discord doesn't support it no this is a lovely thing about "markdown": there is "markdown" (the original design) which doesn't include tables, and then a zillion "extensions" that do. saying it supports "markdown" doesnt really mean poo poo anymore.
|
# ? Apr 16, 2019 19:44 |
|
I realized just today that proper markdown doesn’t include a bullet among characters that denote a list item
|
# ? Apr 16, 2019 22:25 |
|
dev targeting react gets tripped up by responsive design, news at 11
|
# ? Apr 16, 2019 22:38 |
|
man, the imposter syndrome is real at my new job. i killed it at my last job and my new manager keeps talking about how smart i must be and how everyone at my old company only had the highest praise for me, but i don't know anything about dev process or achetecture. i can make lovely code slightly less poo poo and that's all really
|
# ? Apr 16, 2019 23:57 |
|
idk i feel like "make code less crap" is a pretty dece skill
|
# ? Apr 17, 2019 00:07 |
|
HoboMan posted:i don't know anything about dev process or achetecture. i can make lovely code slightly less poo poo and that's all really congratulations you’re in the top 1% of professional programmers
|
# ? Apr 17, 2019 04:30 |
|
Soricidus posted:congratulations you’re in the top 1% of professional programmers we should really pick that bar up off the floor someday.
|
# ? Apr 17, 2019 11:03 |
|
leper khan posted:we should really pick that bar up off the floor someday. no don't it's been there for so long it's integral to our architecture
|
# ? Apr 17, 2019 11:11 |
|
leper khan posted:we should really pick that bar up off the floor someday. well it's not today because the "authentication problem with the iis server" that has been keeping two people occupied for 2+ days turned out to be copy and pasting code from one app to another without understanding any of it resulting in attempts to access session variables that didn't exist and had zero exception handling or logging in place to actually flag this. nobody had even thought to work through the code from session start to check. the bar remains low....
|
# ? Apr 17, 2019 11:14 |
|
|
# ? Dec 7, 2024 08:42 |
|
the junior we hired today astounded me. i left him with: the structures seem sound - get it compiling and then we can start to test it turns out he achieved this by, whenever he encountered an error about a variable not being found, adding "var foo = null;". funnily enough it didn't work during testing
|
# ? Apr 17, 2019 11:49 |