Details
-
Skillsjs, php, node, linux, net, html, css, c
-
Github
Joined devRant on 4/4/2018
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
-
It's funny because I work in data systems and put in immense effort to make sure it's accurate. Where it's not then I make sure to phrase it as such.
For example if you can't collect everything then you say at least.
So many people do just cheat and put in rand which takes five minutes to fake their data where as I deal in real data.
It's a real fucking pox on "data science" or just programming anything reliant on data.
We scope out competitors and quite often it's 100% fake like this, It's really sad.
Several years ago I wrote websocket daemons by hand and before that I made my own socket.io to make sites interactive and to be able to talk to or interact with other users.
Then I see these people that ship mockups as the real deal and it's so sad. -
@lkjhgf253 Imagine you wake up and find some guy donning a white hat trying to mount you and he says don't worry ma'am I'm just doing penetration testing it's all ethical before winking and tipping his hat. Creepy as fuck.
-
@rhymiz The problem with ORM and usually in association with frameworks is it has become the entrypoint for idiots, who have DK and go around bullying those not as restricted to a very specific toolkit as they are.
To normal people, libraries, including ORM are just tools in the box, you don't think about them until you have a worthy opponent for them. To imbeciles ORM has to be brought up every turn without any specific problem in sight.
Some platforms have good ORM libraries but rarely thoroughly so because these things are huge complex lumbering systems with tradeoffs.
To add insult to injury most of these people also insist on awful libraries and frameworks. For example I do a lot of PHP. Not a great but if I need something simple it's quick and easy.
PHP has an absolutely awful ORM library called Doctrine. The name is apt. It might seem to make sense to give idiots ORM because they can't be trusted with SQL. In most cases it turns out they can't be trusted with ORM either. -
I'm in almost the identical situation. The main thing that makes it hard for me to fully focus on work is not having a proper work desk.
-
New line threats are horrendous sometimes but my favourite is try seeing how many linux scripts you can break creating files starting with or containing space and then - something or with newlines.
-
@netikras Wait a minute.
> Does sql share entities between different applications and keeps them in sync at all times
What's that? It sounds like the basic function of a database or the way you describe it distributed SHM or p2p caching.
Are you sure you're not talking about memcached / redis or something? -
@netikras You can implement transparent caching or whatever you need with SQL.
ORM is really just someone's specific library implementation. If you have simple needs and the ORM is well written then it might work out.
I've never encountered an ORM that does everything well though.
Quite often, they're catering to portability you don't need and worse is that they often conform the the lowest common denominator.
If I'm not that concerned about portability which is very often the case then ORM is notorious for not taking full advantage of any given DB system.
I tend to find people who want to turn on transparent caching at the click of a switch don't care about consistency very much whether they should or not. -
@netikras ORM still uses SQL. There's nothing ORM can do that SQL can't.
It's a misnomer as no one really means SQL on its own but SQL + some application programming language.
ORM is someones personal idea of that that should look like and often they block you off from the SQL side of the equation. Those that don't block you off entirely tend to struggle very hard to play nice together.
ORM being faster than SQL makes no sense when its still SQL. This seems to be a common mistake. For example people thinking VDOM is faster than DOM when it's still DOM. -
@molaram ORM translation isn't 121.
https://en.wikipedia.org/wiki/...
ORM is one high level abstraction but SQL or other remote commands or remote command structures are high level abstractions as well! ORM typically reduces those high level languages to a restricted less expressive form!
This problem isn't always SQL versus OOP. OOP, basic methods, object graphs, fluent interfaces, etc cant express everything conveniently SQL or not.
Everything your describing can also be very resource intensive. We're not talking bean counting though that can happen. Sometimes the difference between ORM and SQL can be the difference between using 1TB of RAM or 1GB of RAM. ORM can take up a million hours of CPU time where directly writing SQL might only take up a thousand.
Which AWS bill would you prefer? $1000 or $1000000? -
@SortOfTested I've heard that's very popular.
Have to feel for anyone working with it though, it doesn't look like it's meant for humans and is complete overkill for most cases. -
@mr-user Sometimes that's a hard problem. If you rename something there's no way to know for sure when doing a differential if it was renamed or removed and another table created even if the only difference is in name.
Rather than guessing, the simplest assumption is made, that the table that disappeared was dropped and the table added was created.
Migrations always need to be checked by hand. Say way as merge conflicts need to be fixed by hands.
The only way for an ORM to get it right might be to provide the same kind of thing as SVN or GIT for that case where you would tell the ORM to move the table and for it to maintain a record of that for migrations.
For example, ORM rename table_a table_b. A lot of ORMs don't provide this and with annotations it might be a case of do not want the ORM loading and saving classes.
The ORMs I make work internally so that's possible but its not worth it if I can just check and fix the migration instead. -
An ORM extends SQL and complements it rather than fully replaces it. It's not like ASM where you can get away with completely ignoring it if using C or higher level.
There are things that are way more convenient with SQL than ORM. The level of convenience provided by each is mixed based on use case. It's not all about performance.
I've made a few ORM libraries of varying levels of completeness myself often to cater to various use cases where they can work really well but for non-trivial cases SQL or some other query language becomes superior.
The special points of contention among people who don't like ORM are:
1. Many, even some of the most popular ones such as doctrine and eloquent aren't well engineered by my standards and can undermine even when they should work well.
2. People trying to push ORM on others and other high level abstractions tend to be evading having to learn the nitty gritty but high level abstractions aren't always a full substitute. -
Cybersecurity 101, someone breaks in, you're in trouble. You prevent a break in, nobody ever finds out.
-
@Wisecrack I'm drunk because I'm borderline alcoholic.
Do you have a logic to that (IE, downwards, overfit) or is it just if it's ambiguous and modulus gives two parts then that might give a container for ambiguity (not knowing out of two, bi, if this or that)?
Infinity is definitely the counterpart to 0 or is it. What about -inf and imaginary numbers?
Irrational numbers in computing are a problem. I often thought one solution is instead to make a system that preserves to the last minute something like 1 / 3 rather than the truncated result to at least preserve precision.
You could do the same with N / 0 I guess which would sort of make sense it being an abstract type. You don't know what's what until the last instance so you can't store the result of / 0 just store / 0 until the last point where a result is really needed. -
@Wisecrack / is opposite of * but yeh is < switches to multiplication... except not in that way.
I'm really bad at math when I'm drunk but I have seen cases where 0 and 1 are valid and others where not.
When / N < 1 reverses to be multiplication its the multiplication of one over the multiplier. IE 1 / 0.1 is really 1 * 10 but actually 1 / (1 / 10) so you're stuck with 1 / (1 / 0). Does that make an infinite loop we can use to kill the AI?
There's still the question of inf * 0 or 0 * inf.
If I do 2 * 6 it's the same as 6 * 2. I'm saying this number of that number. the total of two number sixes or the total of six number twos (that's a lot of shit).
But zero number of number infinity is zero. Infinity number of number zero is zero. No amount of zero stops being zero.
Does that mean zero takes precedent at least for multiplication? -
@Wisecrack That's where it get's messy.
5 / 2 = 2.5
The remainder is the .5 (times 2. times 0, what's inf * 0, everything * inf is inf, everything * 0 is zero?)
5 / 0 = infinity or infinity infinity.infinity
As far as I would imagine, whatever you do to infinity you're still left with infinity. Unless inf / inf = 0 is possible but we're not dividing by inf.
There's no no two ways about it?
If there's ambiguity then that goes back to suggesting it's an abstract type. -
@Wisecrack infinity is kind of indestructible I suppose. I mean does infinite - 1 make a difference?
Presumable the remainder of infinity would then always be infinity. But I'm not really good at the maths.
Normally the remainder is from what was there before after division. If you divide 1 by 0 then 1 < infinity, infinity can't remain from 1.
Though for values under one I have no idea if or how modulus would work. I'd assume an inversion. Division < 0 is really multiplication.
Can multiplication leave a remainder? I never saw an operator for it.
12 % 11 is saying from the lowest multiple of 11 that fits entirely in 21 how much is left over if taking that from 21.
0 goes into 12 or any number infinite times. The lowest multiple is the highest possible multiple.
You can't multiply 0 by anything to get 11. Don't multiply it because you can't and the number 12 is what you get. -
@webketje I'm not sure if assigning blame should have been that important, though trying to be fair or understand the cause is.
There's two ways to write libraries and then somewhere in between. One is that you might generally try to pass through much from the underlying library as possible but you still have to make some changes for the differences and the other is to wrap it more extensively to produce higher level specifics.
Given their methods seem to map to the common syscalls or standard lib calls underneath I get the impression they're going for passthru and trying to keep the conveniences lite.
That said, even though it's a bit extra, normalising results and errors is still quite lite and I don't think it scope creeps much.
Though this indeed is far broader than just node. Almost ever API/DB wrapper I use for example decides that not found is an error just as much as the NIC just fell out is and even further insists it has to be a HTTP error. -
@kescherRant Sadly it's depreciated.
There might be some reason, IE, if there's no explicit exists syscall.
Though bash can manage it. -
Immersed in your own cosmic fumes.
-
Should make a report that it's missing the option "Very Suck".
-
If you position the fan by the inlet blowing into it then it might help a bit as long as it's not blocked.
-
@Wisecrack I'm not sure what you mean but I think it's say to say by default zero by default is invalid. The same as when you make a class extending an abstract class but don't implement the missing method it needs.
Beyond that, zero tends to do one of two things, either entirely dominate the equation (/ or *) making 0 or infinity, same result no matter what otherwise have zero effect on the result no matter what (- +). In IEEE 754 you can have -0 and 0 though which people might not think about. I don't believe the sign is transferable other than onto 0 and inf so I don't think it matters for much.
So usually people just check for 0 before the equation then do what's appropriate to the context. That might be what's in your mind, to throw and error, return 0, 1, or something else. -
This is part of the learning curve. The one thing you can't control are people doing data entry.
You're on the wrong track however. Sanitisation should be a last resort. Validate instead. -
@Quirinus You see then there's a language discrepancy. People say infinity is not a number but that doesn't cause a problem in natural langauge. A banana isn't a number but zero banana's gives me zero even though banana's aren't numbers. Similar, zero amount of infinity is zero amount of infinity.
Often equations map to some real world example where there's probably more type polymorphism and valid means of handling that which eliminate the ambiguity or define the undefined but it might not work in pure algebra.
In a sense it's just not concrete because algebra doesn't know about the real world or its context. -
@Quirinus I guess it's a topic for debate but it's not strictly invalid.
Saying that, in many cases undefined or ambiguous is invalid even if there's a potentially valid result. There are often situations where division by zero returning one is valid and others where it is not.
I wouldn't call it subjective, rather contextual and possibly a problem with mathematical language having some limits.
In some cases 0 * Inf = 0 is valid and produces a valid result. In raw algebraic terms some might find that wrong but in practical terms for a given purpose it might work and sometimes might have higher validity than that.
I guess in some systems they might let you in different cases override division by zero and other cases a bit like operator overriding or even as part of it (would be extending the default as though an abstract override to give an impl for / 0 for example). -
@Quirinus Some systems can "handle" division by zero.
I'd assume 0 * (n / 0) ends up back at zero. Not sure if invalid or weird. You go from y being useless and unknown to n being useless and unknown. This case is probably valid if n is 0?
Zero amounts of infinity is zero, IE, no infinity. -
I've talked to red hat and it has been confirmed.
The official statement is that these packages are now only available if you pay.
Time to start looking for a new distro. RIP -
In layman's terms, the PSU is the whole computer. The CPU also means the whole computer. The hard drive also means the whole computer.
-
If you're really having problems working this stuff out for real this will save your life:
https://wolframalpha.com/input/...
https://wolframalpha.com/input/...
You can also always try with a for these things as well (IE google for online plotter).