Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

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

Adbot
ADBOT LOVES YOU

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope
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.

gonadic io
Feb 16, 2011

>>=
Yeah but what colour was the search field?

Bloody
Mar 3, 2013

does yaml support optional parameters? how does that work if it does

HappyHippo
Nov 19, 2003
Do you have an Air Miles Card?

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:

boringcc: https://groups.google.com/forum/m/#!msg/boring-crypto/48qa1kWignU/o8GGp2K1DAAJ
friendly c: http://blog.regehr.org/archives/1180

:lol: 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!"

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal

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:

boringcc: https://groups.google.com/forum/m/#!msg/boring-crypto/48qa1kWignU/o8GGp2K1DAAJ
friendly c: http://blog.regehr.org/archives/1180

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

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
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.

quiggy
Aug 7, 2010

[in Russian] Oof.



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

HappyHippo
Nov 19, 2003
Do you have an Air Miles Card?

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.

quiggy
Aug 7, 2010

[in Russian] Oof.


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

Sapozhnik
Jan 2, 2005

Nap Ghost

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)

Sapozhnik
Jan 2, 2005

Nap Ghost
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.

hobbesmaster
Jan 28, 2008

Mr Dog posted:

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.

std::shared_ptr

you're welcome

Sapozhnik
Jan 2, 2005

Nap Ghost
c++ is bad

cinci zoo sniper
Mar 15, 2013




Lutha Mahtin
Oct 10, 2010

Your brokebrain sin is absolved...go and shitpost no more!

Wheany posted:

like seriously
button.addClickListener(
<ctrl-space>
and the ide will suggest "event -> {}"

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

HoboMan
Nov 4, 2010

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.

Arcsech
Aug 5, 2008

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

cinci zoo sniper
Mar 15, 2013




Arcsech posted:

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
this is moscow prosecutor office's website complaint form

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal

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.

yeah, quitting, that seems like a good thing to do asynchronously.

better than blocking network calls in a destructor...

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

kalstrams posted:

this is moscow prosecutor office's website complaint form

also finnish national railways online ticket store.

cinci zoo sniper
Mar 15, 2013




Wheany posted:

also finnish national railways online ticket store.
why

quiggy
Aug 7, 2010

[in Russian] Oof.


Mr Dog posted:

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)

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

skimothy milkerson
Nov 19, 2006

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

exactly

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope
maybe thery were afraid that people get really drunk and spend all their money on train tickets

Luigi Thirty
Apr 30, 2006

Emergency confection port.

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

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

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

hobbesmaster
Jan 28, 2008


i suspect theres some law that restricts the hours they can operate

Arcsech
Aug 5, 2008

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

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

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

VikingofRock
Aug 24, 2008




Okay so what are uintptr_t and ptrdiff_t for, and how do they fit into the picture alongside char * and void *?

hobbesmaster
Jan 28, 2008

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

Luigi Thirty
Apr 30, 2006

Emergency confection port.

current project is to get all my 3D scene frame loop junk out of main() because I'm a bad organizer yikes

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender
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.

Notorious b.s.d.
Jan 25, 2003

by Reene

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

  • it has much of a c stdlib to handle lovely platforms

  • it has its own timezone database

  • it has its own name resolver (with shockingly different behavior from nss!)

Notorious b.s.d.
Jan 25, 2003

by Reene

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

Sapozhnik
Jan 2, 2005

Nap Ghost

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

Luigi Thirty
Apr 30, 2006

Emergency confection port.

I too am ending up basically implementing all of C's string functions but in 68000 asm

Adbot
ADBOT LOVES YOU

Bloody
Mar 3, 2013

c has string functions?

  • Locked thread