|
AWWNAW posted:I used to get codeine syrup for sore throats from urgent care clinics but I’ve noticed in the past few years they just write me some antibiotics and tell me to take ibuprofen then I say “excuse me did you just tell me to go gently caress my self?” Oh were you the med student sitting in on my dr appt yesterday??
|
![]() |
|
![]()
|
# ? May 28, 2023 09:58 |
|
does anyone around here work with CUDA? I have some code for integrating depth images into a truncated signed distance field that was developed under cuda 8.0, and I'd like to use it with cuda 10.0, but something broke between 8.0 and 9.2. no build or runtime errors, but the image data doesn't get integrated into the device memory anymore (i.e. it doesn't work, for mysterious reasons). the project uses half floats pretty extensively so I suspect that there was a change to float-to-half conversion beyond the removal of the __float2half_rn() built-in. interesting in finding out if anyone else has run into this sort of thing, and where else to look for answers.
|
![]() |
|
jit bull transpile posted:yeah it's not the language itself that's a problem. it's the temple of moral degenerates who worship it that are. CanBuildFrom
|
![]() |
|
CPColin posted:They're in the OP of the interviewing thread. thanks!
|
![]() |
|
Oh yeahhhhh first, imagine a class called Result. You can create a new result, and the constructor has an argument where you can shove in a constant. So you can do: new Result(TypeFailed), new Result(TypePassed). This result has a getType function to retrieve the result as well. Now, imagine someone creates a class called ResultPassed, which inherits from Result. It also has a constructor where you can specify the constant. So although it is meant to represent a passed result, nobody is stopping you from doing new ResultPassed(TypeFailed). In the codebase, sometimes a passed result is checked by calling ResultPassed.getType(). Other times, a passed result is check by checking if the result object is of type ResultPassed. There is no consistency, and I've lost my will to live.
|
![]() |
|
floatman posted:Oh yeahhhhh this sounds bad
|
![]() |
|
floatman posted:Oh yeahhhhh this is why discriminated unions are good
|
![]() |
|
the discriminated union I'm talking about is between programmers and computers
|
![]() |
|
AggressivelyStupid posted:this sounds bad It's amazing that a user of the name "AggressivlyStupid" can identify that it is problematic, yet the "code craftsmanship culture" here apparently is all okay with it.
|
![]() |
|
yes, semantically a failed passed result is perfectly logical and furthermore,
|
![]() |
|
Working with Boost.ASIO and Boost.Beast this week. Yesterday I get a TLS server up and running and today HTTPS, I'm getting the distinct impression the API is worse than Perl in number of permutations of doing the same thing. Every example and usage is annoyingly different.
|
![]() |
|
MrMoo posted:Working with Boost.ASIO and Boost.Beast this week. Yesterday I get a TLS server up and running and today HTTPS, I'm getting the distinct impression the API is worse than Perl in number of permutations of doing the same thing. Every example and usage is annoyingly different. Asio is a piss template hell api. I'm sure it's very efficient and zero-overhead or whatever but the code you have to write to make things work is loving incomprehensible to anyone who hasn't spent hours studying the docs. I am not an asio expert, but one option to simplify things: figure out exactly what concurrency model you want to use, and just bake that into your code everywhere. Don't try to make things too flexible. Ie: if you're going to spawn a coroutine for every incoming connection, you're gonna need to plumb a yield_context& parameter through hella functions and you should just live with that. Once you've got the hang of asio, beast's http stuff feels straightforward but barebones. It's like, here's a struct with a field for each part of the http request. beast will serialize it on the wire for you. Go look at the RFC if you want to know how the connection-token and keep-alive header should be handled by your code.
|
![]() |
|
Illusive gently caress Man posted:Asio is a piss template hell api. I'm sure it's very efficient and zero-overhead or whatever but the code you have to write to make things work is loving incomprehensible to anyone who hasn't spent hours studying the docs. now see if you used rust it would be like that but memory-safe
|
![]() |
|
Kevin Mitnick P.E. posted:now see if you used rust it would be like that but memory-safe Also your code wouldn't compile until you'd spend hours reading the docs
|
![]() |
|
i have a basic parent/child relationship in a database where i need to perform a basic join, problem is that the database is turbofucked by horrible decisions. the parent has fields parent/child relationship 1 through 12 containing a reference to the child instead of just putting the reference to the parent on the child. im at a loss with this, any advice guys?
|
![]() |
|
terrible programmer status: risc-v business
|
![]() |
|
Maximum Leader posted:i have a basic parent/child relationship in a database where i need to perform a basic join, problem is that the database is turbofucked by horrible decisions. the parent has fields parent/child relationship 1 through 12 containing a reference to the child instead of just putting the reference to the parent on the child. im at a loss with this, any advice guys? fire your dba or whoever is responsible for that atrocity into the sun
|
![]() |
|
Maximum Leader posted:i have a basic parent/child relationship in a database where i need to perform a basic join, problem is that the database is turbofucked by horrible decisions. the parent has fields parent/child relationship 1 through 12 containing a reference to the child instead of just putting the reference to the parent on the child. im at a loss with this, any advice guys? have you considered blockchain
|
![]() |
|
Maybe regex
|
![]() |
|
Oneiros posted:fire your dba or whoever is responsible for that atrocity into the sun its jira so i cant really do anything about it, its not really critical but i would like to query the data i need Soricidus posted:have you considered blockchain dont worry, im always considering the blockchain
|
![]() |
|
Maximum Leader posted:i have a basic parent/child relationship in a database where i need to perform a basic join, problem is that the database is turbofucked by horrible decisions. the parent has fields parent/child relationship 1 through 12 containing a reference to the child instead of just putting the reference to the parent on the child. im at a loss with this, any advice guys? SQL code:
uncomment those unions - i needed to do that to bypass the waf (lmao) or, and i know you can't do this (because otherwise you wouldn't be asking), unfuck the schema. get business buy-in by making a big deal about the 12 child limit
|
![]() |
|
Maximum Leader posted:i have a basic parent/child relationship in a database where i need to perform a basic join, problem is that the database is turbofucked by horrible decisions. the parent has fields parent/child relationship 1 through 12 containing a reference to the child instead of just putting the reference to the parent on the child. im at a loss with this, any advice guys? code:
|
![]() |
|
Sagacity posted:
wait, in statements work with multiple columns?
|
![]() |
|
whoops
|
![]() |
|
Chalks posted:wait, in statements work with multiple columns? maybe in some dbs? i'm reasonably sure that sql server will error out
|
![]() |
|
redleader posted:or, and i know you can't do this (because otherwise you wouldn't be asking), unfuck the schema. get business buy-in by making a big deal about the 12 child limit congrats on the arrival of new columns child13...child99
|
![]() |
|
redleader posted:maybe in some dbs? i'm reasonably sure that sql server will error out it would be awesome if it did but it doesn't in work in any dbs i use ![]()
|
![]() |
|
ynohtna posted:congrats on the arrival of new columns child13...child99 hope springs eternal
|
![]() |
|
Sagacity posted:
for my next trick i will make this sql database performance .. disappear!
|
![]() |
|
Do a string concatenation then a substring index
|
![]() |
|
dump database to text and use grep then delete everything and quit your job
|
![]() |
|
Maximum Leader posted:i have a basic parent/child relationship in a database where i need to perform a basic join, problem is that the database is turbofucked by horrible decisions. the parent has fields parent/child relationship 1 through 12 containing a reference to the child instead of just putting the reference to the parent on the child. im at a loss with this, any advice guys? gross
|
![]() |
|
ynohtna posted:congrats on the arrival of new columns child13...child99
|
![]() |
|
Boiled Water posted:for my next trick i will make this sql database performance .. disappear! nah, any half decent query planner will optimise this to an inner join (that is, of course, if this code actually worked like it looks like it should)
|
![]() |
|
sql server has a pivot function that can maybe be used for this to shift your rowset to columns so that an in() will work but I'll be damned if I know how to use it you're already damned so maybe it will work for you though?
|
![]() |
|
redleader posted:nah, any half decent query planner will optimise this to an inner join (that is, of course, if this code actually worked like it looks like it should) i think we have firmly established this is not the case
|
![]() |
|
redleader posted:
thanks buddy, this worked except for the column alias. sqlite doesn't like when you reference a column alias for some reason. to put a cherry of terrible on top of this heaping pile of awful, i'm actually exporting csvs from jira, loading them into excel then using an sql addon to query the sheets. Sagacity posted:
i like the idea but im getting "sub-select returns 12 columns - expected 1" in sqlite. it doesn't really look like a join to me but maybe im missing something?
|
![]() |
|
Powerful Two-Hander posted:sql server has a pivot function that can maybe be used for this to shift your rowset to columns so that an in() will work but I'll be damned if I know how to use it SQL code:
either way OP said he wanted an actual join so this doesn't even do what i think he wants. if you only want columns from one of the tables though (that is, you're using the join only to check for existence in the related table), then you should usually use a semi-join instead (usually written as WHERE EXISTS (subquery goes here)). it's easier for the planner to optimize, it doesn't duplicate, and it's usually easier to write if you have a complex join condition. TheFluff fucked around with this message at 14:32 on Nov 28, 2018 |
![]() |
|
I think the solution is probably to restructure your database so it's not the worst. Maybe create a view of the bad data structure so that poo poo that looks at it still functions. If your database is fancy, you can even use triggers to allow inserts and updates on your view. Then promise yourself that you'll eventually get around to decommissioning this giant hack but never actually do it Chalks fucked around with this message at 15:28 on Nov 28, 2018 |
![]() |
|
![]()
|
# ? May 28, 2023 09:58 |
|
Luigi Thirty posted:terrible programmer status: risc-v business ![]()
|
![]() |