|
echinopsis posted:so what do ya do? janitor websites or handle transcations I'm a programmer but I'm involved with other projects. but that doesn't mean that I don't have to look into magento sometimes and write quick scripts to put out fires. and that involves talking to the remote team who are magento certified developers finding programmers here is hard, even harder to find people willing to work with this magento stuff
|
# ? Aug 23, 2016 13:28 |
|
|
# ? May 24, 2024 18:32 |
|
loving Christ, we just had a discussion where a ui mockup was shown with an idea about how we could search and filter products. Someone suggested an existing component that we could use and somehow we ended up discussing whether the component's performance is good enough if there are 50000 results. I said the maybe we will [have performance issues], who knows, we are sitting in a teleconference and haven't even installed the component and people are already trying to optimize it.
|
# ? Aug 23, 2016 13:47 |
|
Yeah but what colour was the search field?
|
# ? Aug 23, 2016 14:22 |
|
does yaml support optional parameters? how does that work if it does
|
# ? Aug 23, 2016 15:21 |
|
hackbunny posted:so it seems object oriented C, and especially my beloved use of superclasses at non-zero offsets, is technically broken as it violates strict aliasing. basically nobody can agree on what C code compiles to anymore. there are two proposals for dialects of C that make intuitive sense and privilege the programmer's needs over the compiler writer's: good luck with that. the whole c/c++ community is dominated by the concerns of the compiler writers. "but what about this subtle undefined behavior which caused a major security breach?" "taking advantage of that allowed us to improve our performance by 2% on this benchmark!! there's no way we can remove that! it's your job to know the spec inside out like we do!"
|
# ? Aug 23, 2016 15:34 |
|
hackbunny posted:so it seems object oriented C, and especially my beloved use of superclasses at non-zero offsets, is technically broken as it violates strict aliasing. basically nobody can agree on what C code compiles to anymore. there are two proposals for dialects of C that make intuitive sense and privilege the programmer's needs over the compiler writer's: this is the sort of stuff i don't bother worrying about because i figure that if a compiler change breaks my code, it'll probably break everything i depend on as well down to the os kernel, so no one will ever even know
|
# ? Aug 23, 2016 15:37 |
|
Honestly if you want easily-verified correctness at the cost of not getting all those miniscule-improvement compiler optimizations, you should just go ahead and write your code in Rust or something similar where making it hard to write subtly-wrong code is an explicit design goal of the language. "C but without some of the undefined behaviour" is still going to be bad for writing correct, safe code, even if it's a slight improvement over "C today" in that regard.
|
# ? Aug 23, 2016 15:45 |
|
quote:As a starting point, we imagine that friendly C is like the current C standard, but replacing many occurrences of X has undefined behavior with X results in an unspecified value. That adjustment alone can produce a much friendlier language. wait this confuses me, what's the difference between these two quote:The value of a pointer to an object whose lifetime has ended remains the same as it was when the object was alive. also fuckin' lmao at this
|
# ? Aug 23, 2016 15:58 |
|
quiggy posted:wait this confuses me, what's the difference between these two undefined behavior can do anything at all, such as crashing the program or skipping a null check in later code. unspecified value is just what it says it is, you get a value that is unknown, but the compiler isn't free to gently caress with anything else.
|
# ? Aug 23, 2016 16:06 |
|
HappyHippo posted:undefined behavior can do anything at all, such as crashing the program or skipping a null check in later code. unspecified value is just what it says it is, you get a value that is unknown, but the compiler isn't free to gently caress with anything else. oh duh. it's still early
|
# ? Aug 23, 2016 16:07 |
|
quiggy posted:also fuckin' lmao at this I think that means if you have void *ptr; and then call free(ptr); then it is ptr itself that is not permitted to change as a result, not *ptr which of course could be anything (including pages that have now been unmapped from your address space)
|
# ? Aug 23, 2016 16:11 |
|
it would still be nice if you could implicitly cast "whatever_t **" to "void **" because then you could define something like int xmalloc(void **ptr, size_t nbytes); void xfree(void **ptr); which would allow xmalloc to return an error code and xfree to defensively set *ptr to NULL.
|
# ? Aug 23, 2016 16:14 |
|
Mr Dog posted:it would still be nice if you could implicitly cast "whatever_t **" to "void **" because then you could define something like std::shared_ptr you're welcome
|
# ? Aug 23, 2016 16:15 |
|
c++ is bad
|
# ? Aug 23, 2016 16:16 |
|
|
# ? Aug 23, 2016 16:21 |
|
Wheany posted:like seriously yeah it even flagged my existing calls of like ear.addFartListener({boilerplate to override one method}) with a "convert to lambda" lint popup. but wow, there is some parser magic going on here that i do not understand at all anybody have a good introduction to the lambda calculus? i've read about it multiple times but i still don't think i quite understand all the aspects of it
|
# ? Aug 23, 2016 16:51 |
|
the clusterfuck that is this new project continues. turns out some mysterious bugs were being caused by a race condition between the app logging the user out and it quitting. yeah, quitting, that seems like a good thing to do asynchronously.
|
# ? Aug 23, 2016 16:53 |
|
lol reminds me of a online bill pay system i had to use once that would refuse to take payments outside of standard business hours (eastern time) for some reason dont remember what it was for. some government or bank thing i think
|
# ? Aug 23, 2016 16:53 |
Arcsech posted:lol
|
|
# ? Aug 23, 2016 16:56 |
|
HoboMan posted:the clusterfuck that is this new project continues. turns out some mysterious bugs were being caused by a race condition between the app logging the user out and it quitting. better than blocking network calls in a destructor...
|
# ? Aug 23, 2016 16:56 |
|
kalstrams posted:this is moscow prosecutor office's website complaint form also finnish national railways online ticket store.
|
# ? Aug 23, 2016 18:19 |
Wheany posted:also finnish national railways online ticket store.
|
|
# ? Aug 23, 2016 18:23 |
|
Mr Dog posted:I think that means if you have isn't this already the case? it's why it's considered good form to immediately set your pointer to NULL after freeing the memory
|
# ? Aug 23, 2016 18:32 |
|
|
# ? Aug 23, 2016 18:34 |
|
exactly
|
# ? Aug 23, 2016 18:56 |
|
maybe thery were afraid that people get really drunk and spend all their money on train tickets
|
# ? Aug 23, 2016 18:57 |
|
Wheany posted:maybe thery were afraid that people get really drunk and spend all their money on train tickets that would imply that Finns have money to spend
|
# ? Aug 23, 2016 19:00 |
|
my old debit card provider used to turn off their online services between midnight and like 3 or 4 in the morning must have been a really thorough backup plan
|
# ? Aug 23, 2016 19:01 |
|
i suspect theres some law that restricts the hours they can operate
|
# ? Aug 23, 2016 19:01 |
|
hobbesmaster posted:i suspect theres some law that restricts the hours they can operate i always figured it was either that or the web form just sends an email to some poor sod who then has to fill in a paper form by hand, because that seems like the most government/bank way of doing things
|
# ? Aug 23, 2016 19:04 |
|
quiggy posted:wait this confuses me, what's the difference between these two an unspecified value raises a warning when you try to use it ("undef" value in llvm) code with undefined behavior has undefined behavior. the most popular implementation of undefined behavior is to consider the code unreachable and delete it ("unreachable" instruction in llvm) quiggy posted:also fuckin' lmao at this yeah C developers treat pointers as memory locations but modern C compilers treat them as object pointers (possibly interior pointers). the only concession made by the standard to classic C semantics is that you can compute a pointer to one element after the end of an array (but ofc not dereference it) this was done so that when you write a value to a location, the compiler can cache that value and doesn't have to emit a fetch to retrieve the value. when you write to a different location of the same type, the compiler throws away the cached value because pointers may point to the same place, unless they are qualified with "restrict" meaning they always refer to different locations (even when they don't), or unless they are pointers returned by malloc (which is assumed to always return unique pointers). when you write to a different location of a different type, though, that "must" be a different object, so the cached value can be kept. that's why modern C compilers will yell at you if you try to cast a pointer to a type to a pointer of a different type ("strict aliasing violation"). the escape hatch is char */unsigned char *, which is allowed to alias and let you access objects as raw memory (ironically int8_t and uint8_t are not guaranteed to be safe for aliasing). the greatest irony of all is that you can no longer write parts of the standard C runtime library, like memcpy, in standard C (well, you can, just not in an efficient way that copies whole words instead of bytes) quiggy posted:isn't this already the case? it's why it's considered good form to immediately set your pointer to NULL after freeing the memory apparently even exceedingly well-written sqlite uses pointers to freed memory (although of course does not reference them). basically people treat pointers like they were uintptr_t integers, but they aren't. you can use uintptr_t explicitly but then you lose array-like arithmetics
|
# ? Aug 23, 2016 19:16 |
Okay so what are uintptr_t and ptrdiff_t for, and how do they fit into the picture alongside char * and void *?
|
|
# ? Aug 23, 2016 19:22 |
|
VikingofRock posted:Okay so what are uintptr_t and ptrdiff_t for, and how do they fit into the picture alongside char * and void *? well, ptrdiff_t is obviously useful for arrays
|
# ? Aug 23, 2016 20:20 |
|
current project is to get all my 3D scene frame loop junk out of main() because I'm a bad organizer yikes
|
# ? Aug 23, 2016 21:06 |
|
one time im pretty sure I wrote a function that returned "a null terminated array of null terminated arrays of null terminated char*s" and that's one reason I'm glad I write c++ now.
|
# ? Aug 23, 2016 21:42 |
|
MALE SHOEGAZE posted:loving owned for like 5 hours in stage because i didn't know java has its own CA trust process java duplicates like half of unix inside
|
# ? Aug 23, 2016 22:32 |
|
my stepdads beer posted:people bitch and whine about containers and flatpak et al but java doing its own dumb ssl stuff is terrible and gets a pass because?? write once, debug everywhere i hate that java does its own ssl and timezones, but the java ssl and timezone behavior is both very well documented and highly consistent. windows is neither. i would rather have to make special updates to java CA trusts and tzdata than try to port code from unix into windows' brain-damaged view of the world
|
# ? Aug 23, 2016 22:32 |
|
MALE SHOEGAZE posted:loving owned for like 5 hours in stage because i didn't know java has its own CA trust process man chuck tingle has really gone downhill lately
|
# ? Aug 23, 2016 23:00 |
|
I too am ending up basically implementing all of C's string functions but in 68000 asm
|
# ? Aug 23, 2016 23:52 |
|
|
# ? May 24, 2024 18:32 |
|
c has string functions?
|
# ? Aug 24, 2016 01:22 |