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.
 
  • Post
  • Reply
Athas
Aug 6, 2007

fuck that joker

Plorkyeran posted:

okay, but again, you can read and write english. are you aware that there are people who use computers (and yes, even developer tools) who often have to resort to jamming poo poo into google translate?

I am going to be elitist enough to claim that, with exceptions, there is no need to localise development tools. I think that if you want to use a linker, then you need to learn the main international language (English) first. The exceptions are very end-user oriented programming tools (e.g. just like I don't mind localising office suites), or educational tools aimed at children who may not have had a chance to learn English yet.

Adbot
ADBOT LOVES YOU

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
elitist is not the word that I would use to describe that attitude

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003
opening up my german command line and typing af -l to list some files

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
wasn't applescript's "natural language" interface translated into many different languages? can't quite figure out how to search for that without getting results about javascript, but iirc you could do the "tell application finder to move all files to trash" in french or german if you wanted

Kazinsal
Dec 13, 2011


pokeyman posted:

wasn't applescript's "natural language" interface translated into many different languages? can't quite figure out how to search for that without getting results about javascript, but iirc you could do the "tell application finder to move all files to trash" in french or german if you wanted

yeah, I remember it being that way in the past but I don't know if it still is. probably not enough people using frapplescript by the OS X era to continue extending new stuff to fit it

I imagine the parsers required to do things like "get colour of pixel 17 in row 5 of bitmap image in application MacDraw document 2" in half a dozen different languages would get out of hand pretty fast

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

Xarn posted:

Localization is good. I just don't give a poo poo about proper pluralization and similar details.

it’s differently important in different languages

sometimes it’s more about word choice too

quote:

But please, please, please, have your errors also emit a unique ID that people can google, so that they don't have to guess on what the original error message was.

VMS got this absolutely right

a minimal system will emit subsystem and error code and parameters and that’s it

a system with localizations installed will still emit that, but also formatted human-readable text

I know they did this with the help system too, and I think the native command line implementation mechanisms also did it, eg you define a flag and then map that to English, Japanese, etc. and your code sees the flag no matter what language the user’s working in

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?
AppleScript originally supported “dialects” and you could just “translate” a script simply by changing a pop-up; a script was represented as verbs taking direct objects, indirect objects, etc. and could parse and generate properly human-like grammar for it

then when a developer provided a dictionary for their app, they defined not just the nouns and verbs to expose but how to represent them grammatically in different languages, so AppleScript could do the same trick for arbitrary developer-provided object models

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



https://macscripter.net/viewtopic.php?id=24589&action=new

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
dialects! that's the word


ah nifty. that predates my use of mac so I guess I had stuffed this vaguely remembered fun fact away for later

redleader
Aug 18, 2005

Engage according to operational parameters

Plorkyeran posted:

fsync() doesn't actually reliably report errors and fsync() reporting success could actually just mean that your write was discarded.

yeah but think about how much faster your computer can be if all its code is written assuming that the computer never fails or dies

Soricidus
Oct 21, 2010
freedom-hating statist shill
yes, programmers whose code touches data that matters should be aware of the pitfalls, but I’m pretty sure they both are already

Xarn
Jun 26, 2015

eschaton posted:

it’s differently important in different languages

sometimes it’s more about word choice too


I am probably biased by the fact that my language has grammatical genders that modify the verbs, so being 100% grammatically correct would require literal omniscience :v:

If you want to say that a group of people walked (somewhere), then you say "šli" ("walked", Czech likes to omit the subjects). However, if that group of people consisted of only women, then you must use "šly" to be gramatically correct...

matti
Mar 31, 2019

another issue is that the technical terminology may just not exist and it'll read super stilted if you try localize it

but yeah i imagine localization is very important in east asia and such, europeans opinions are kinda null

mystes
May 31, 2006

How would you search for and copy and paste code from stack overflow if everyone was using a different dialect?

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

mystes posted:

How would you search for and copy and paste code from stack overflow if everyone was using a different dialect?

trying to learn some android dev (rip me) has made me realize how much of an unconscious "reject bad stack overflow answers"muscle I'd developed for things I actually know about. love it when the accepted answer and the highest voted answer are both wrong, but the ninth comment on answer six is bang on

Private Speech
Mar 30, 2011

I HAVE EVEN MORE WORTHLESS BEANIE BABIES IN MY COLLECTION THAN I HAVE WORTHLESS POSTS IN THE BEANIE BABY THREAD YET I STILL HAVE THE TEMERITY TO CRITICIZE OTHERS' COLLECTIONS

IF YOU SEE ME TALKING ABOUT BEANIE BABIES, PLEASE TELL ME TO

EAT. SHIT.


pokeyman posted:

trying to learn some android dev (rip me) has made me realize how much of an unconscious "reject bad stack overflow answers"muscle I'd developed for things I actually know about. love it when the accepted answer and the highest voted answer are both wrong, but the ninth comment on answer six is bang on

that's definitely at least in part an android thing, the SO for it is absolutely dire

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



the tex one is surprisingly good (unlike the language)

there's a ton of package maintainers and they give very patient and detailed answers even when you ask super dumb questions

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
"the answer is always wrong or out of date" is just Android development in general, has nothing to do with Stack Overflow

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Private Speech posted:

that's definitely at least in part an android thing, the SO for it is absolutely dire

Suspicious Dish posted:

"the answer is always wrong or out of date" is just Android development in general, has nothing to do with Stack Overflow

this is what I'd been told, but I had to see it to believe it I guess. between official docs, official blogs, stack overflow, rando blogs, and our years-old codebase started by people who didn't know any android (i can of course empathize), I continually struggle to find the correct way to do basically anything

oh this isn't the terrible programmers thread, whoops

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

there was once Android sample code from Google that backed off linearly instead of exponentially in access to a service, which made its way into a popular app because hey, I guess they really want people to get registered quickly (and nice infra flex) but resulted in a DDOS of the push system. or so I have heard

pseudorandom name
May 6, 2007

Xarn posted:

I give absolutely zero fucks if I see "copying 1 file(s)", "copying 1 file", or "copying 1 files".

the fun thing is when you have cout << n << “つのファイルをコピーしています。” << endl; and it needs to be localized to cout << “Copying “ << n << “ file(s).” << endl;

Sapozhnik
Jan 2, 2005

Nap Ghost

pseudorandom name posted:

the fun thing is when you have cout << n << “つのファイルをコピーしています。” << endl; and it needs to be localized to cout << “Copying “ << n << “ file(s).” << endl;

In that case the program will probably poo poo the bed when presented with UTF-8 input since it is inevitably hardcoded to expect shit_jis

matti
Mar 31, 2019

man sticking anything but ascii in a translation file is just bad news

Private Speech
Mar 30, 2011

I HAVE EVEN MORE WORTHLESS BEANIE BABIES IN MY COLLECTION THAN I HAVE WORTHLESS POSTS IN THE BEANIE BABY THREAD YET I STILL HAVE THE TEMERITY TO CRITICIZE OTHERS' COLLECTIONS

IF YOU SEE ME TALKING ABOUT BEANIE BABIES, PLEASE TELL ME TO

EAT. SHIT.


pseudorandom name posted:

the fun thing is when you have cout << n << “つのファイルをコピーしています。” << endl; and it needs to be localized to cout << “Copying “ << n << “ file(s).” << endl;

in that particular example could do

cout << n << "file(s) to copy" << endl;

but yeah it's not great

Soricidus
Oct 21, 2010
freedom-hating statist shill

pokeyman posted:

I continually struggle to find the correct way to do basically anything

step one is not to touch android, op

pseudorandom name
May 6, 2007

Private Speech posted:

in that particular example could do

cout << n << "file(s) to copy" << endl;

but yeah it's not great

well pretend I used an example with two interpolations having different types and in the opposite order for the different languages

Falcorum
Oct 21, 2010

Suspicious Dish posted:

"the answer is always wrong or out of date" is just Android development in general, has nothing to do with Stack Overflow

big fan of things added in android sdk 29 getting deprecated in sdk 30

Pendragon
Jun 18, 2003

HE'S WATCHING YOU

Falcorum posted:

big fan of things added in android sdk 29 getting deprecated in sdk 30

please tell me this actually happened

Xarn
Jun 26, 2015
Pffft, wake me up when they add stuff already deprecated.

Sweeper
Nov 29, 2007
The Joe Buck of Posting
Dinosaur Gum
does anyone actually use call/cc on a regular basis and how does it not become extremely confusing to figure out control flow

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

Sweeper posted:

does anyone actually use call/cc on a regular basis and how does it not become extremely confusing to figure out control flow

do you mean the literal lisp-and-friends form call-cc, or similar concepts? because a stateful iterator is a reasonably common approach in a lot of langs. for instance, python's generators/iterator protocol generally is pretty much call/cc

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



static vars???!!!??!?!

Sweeper
Nov 29, 2007
The Joe Buck of Posting
Dinosaur Gum

Phobeste posted:

do you mean the literal lisp-and-friends form call-cc, or similar concepts? because a stateful iterator is a reasonably common approach in a lot of langs. for instance, python's generators/iterator protocol generally is pretty much call/cc

I mean more generally call/cc, generators are cool and good and a good concept to have come out of continuations.

I was reading up on delimited continuations (also seem neat, but maybe also a bit confusing to me right now) and if I have to read another quote saying continuations are “the rest of the program” I’m gonna delete my computer

call/cc feels like a control “operator” which feels to me like no one can come up with why I would want to use it in the first place. tbh I’m probably just too dumb to use it and should stick to writing functions and writing the word return to break out of my loops instead of aborting the current continuation

Sweeper
Nov 29, 2007
The Joe Buck of Posting
Dinosaur Gum
seems like a structure which you have to use very carefully in limited contexts because being able to “reset” your program to some arbitrary past point in the program at some point in the future seems super hard to follow

exceptions, also bad

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

Sweeper posted:

seems like a structure which you have to use very carefully in limited contexts because being able to “reset” your program to some arbitrary past point in the program at some point in the future seems super hard to follow

i guess, but is it again that different from generators? like you can do this:

Python code:
def iterator():
    for number in range(10):
        yield number

first = iterator()
print(next(first))
print(next(first))
first = iterator() # is this "resetting" your program to some arbitrary past point?
maybe i'm the one misunderstanding some details of call/cc though

Destroyenator
Dec 27, 2004

Don't ask me lady, I live in beer
i think the point is that in those languages you have powerful macros so you can build the exception system or generators or whatever you want on top of call/cc and wouldn’t be using it directly

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
lisp does not have call/cc. scheme, which is not lisp, has a call-with-current-continuation that provides unrestricted continuations, which most people agree are a terrible idea

you can use unrestricted continuations to implement a lot of very reasonable control-flow structures as library routines, like coroutines and exceptions, where ordinary code outside of the library executes in structured, repeatable ways. this is what the overwhelming majority of uses of continuations look like. but these things can also be implemented on top of more modest facilities, and meanwhile you can also use continuations to re-run arbitrary other code, and that possibility has terrible consequences for both program comprehension (when actually used) and the language implementation

Sweeper
Nov 29, 2007
The Joe Buck of Posting
Dinosaur Gum

rjmccall posted:

lisp does not have call/cc. scheme, which is not lisp, has a call-with-current-continuation that provides unrestricted continuations, which most people agree are a terrible idea

you can use unrestricted continuations to implement a lot of very reasonable control-flow structures as library routines, like coroutines and exceptions, where ordinary code outside of the library executes in structured, repeatable ways. this is what the overwhelming majority of uses of continuations look like. but these things can also be implemented on top of more modest facilities, and meanwhile you can also use continuations to re-run arbitrary other code, and that possibility has terrible consequences for both program comprehension (when actually used) and the language implementation

I guess what I’ve found when reading about call/cc is few people saying “this thing is nuts don’t use it” and lots of words to justify what isn’t a hard to understand concept, but what does seem complicated and unneeded. as you say there are things you can implement with call/cc that are good, but definitely don’t need the full facility of it so why was it made and why does anyone talk about it other than to say “oof don’t use that it’s cruft we have better ideas now”

is it something people are actively interested in using to write more understandable software or is it something that exists and people like to mentally masturbate with? maybe I need to read up on the history a bit more and get a better understanding for the context

no one walks around saying setjmp/longjmp are good ideas, but they are significantly less powerful. maybe I’m just reading the wrong stuff

Falcorum
Oct 21, 2010

Pendragon posted:

please tell me this actually happened

see https://developer.android.com/reference/android/view/WindowInsets#getSystemGestureInsets(), there's a few more of those related to gesture navigation as well

edit: if I recall correctly, a similar situation happened with 23 -> 24 in regards to some networking functions too

Falcorum fucked around with this message at 21:20 on Oct 18, 2020

Adbot
ADBOT LOVES YOU

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

Sweeper posted:

I guess what I’ve found when reading about call/cc is few people saying “this thing is nuts don’t use it” and lots of words to justify what isn’t a hard to understand concept, but what does seem complicated and unneeded. as you say there are things you can implement with call/cc that are good, but definitely don’t need the full facility of it so why was it made and why does anyone talk about it other than to say “oof don’t use that it’s cruft we have better ideas now”

the languages with this feature are largely irrelevant and even in those languages people don’t generally work with continuations directly so it’s just not something anybody feels a need to write “don’t use this” blog posts about since people already aren’t using it

continuations are a useful tool in formalizing program semantics, which is why people know about them. it’s the whole thing where well-meaning programmers write inaccurate explainers about the hardest things they remember from their undergrad cs classes

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply