|
QuarkJets posted:You mean having the *privilege* of inserting Aboriginal characters
|
# ? Jan 8, 2023 15:12 |
|
|
# ? Jun 6, 2024 06:49 |
|
I'm honestly impressed the Aboriginals were even doing templating back when their language was developing
|
# ? Jan 8, 2023 15:27 |
|
I've seen that template technique before in C, but it just used GNU M4 or whatever and didn't get cute with weird characters. I guess using valid identifier characters keeps the syntax highlighter happy but any kind of IDE or analysis tool is going to break anyway.
|
# ? Jan 8, 2023 15:35 |
|
Volte posted:I've seen that template technique before in C, but it just used GNU M4 or whatever and didn't get cute with weird characters. I guess using valid identifier characters keeps the syntax highlighter happy but any kind of IDE or analysis tool is going to break anyway. Back in the day we used macros to instantiate container classes. HP codelibs
|
# ? Jan 8, 2023 15:41 |
|
Doesn't Go have real generics now, in what ways is their implementation stupid and broken
|
# ? Jan 8, 2023 15:45 |
|
repiv posted:Doesn't Go have real generics now, in what ways is their implementation stupid and broken your generic classes always do virtual calls for everything instead of getting specific implementations inlined and optimized
|
# ? Jan 8, 2023 15:48 |
|
repiv posted:Doesn't Go have real generics now, in what ways is their implementation stupid and broken
|
# ? Jan 8, 2023 15:49 |
|
Jabor posted:your generic classes always do virtual calls for everything instead of getting specific implementations inlined and optimized lol of course, they're obsessed with minimising compile times but refuse to have an "optimize extra hard" flag so the only way to make generics fit is to never expand/inline them
|
# ? Jan 8, 2023 15:56 |
|
Many years ago $OLDJOB sent me to GopherCon as part of a marketing and recruiting push and the keynote was from one of the language designers (some Googler pulling in a million a year but still dresses in Hawaiian shirts) talking about the elegant simplicity of the code generator, and I then realised the main design goal of Go is to be simple to implement by lazy Google engineers
|
# ? Jan 8, 2023 18:07 |
|
DoctorTristan posted:Unicode was a mistake Really, programming in real alphabets and words was the mistake, we should have taken a page from APL and just made anything that's not user facing I/O content be weird, bespoke symbology that requires a separate keyboard. This would have kept the priesthood of programming interact, preventing shenanigans like this under thread of Programmer Exile. Dijkstracula posted:and I then realised the main design goal of Go is to be simple to implement by lazy Google engineers Incorrect; the main design goal of all Google programming is to perform artificially hard tasks as a rationale for promotion. Being simple to implement for the slothful among us (everyone) is a laudable bonus.
|
# ? Jan 8, 2023 18:17 |
|
Volmarias posted:Incorrect; the main design goal of all Google programming is to perform artificially hard tasks as a rationale for promotion.
|
# ? Jan 8, 2023 19:15 |
|
Volmarias posted:
This would explain a lot. Go has such promise but they forgot that general purpose languages need general purpose features, and someone got a stick up their rear end about it.
|
# ? Jan 8, 2023 19:31 |
|
a friend of mine was one of the core tensorflow devs back in the 2010s and he'd always tell me about all the upstart internal competitors that seemingly popped up from nowhere to get people on other teams a promotion, so I can see it here too
|
# ? Jan 8, 2023 19:32 |
|
Jabor posted:your generic classes always do virtual calls for everything instead of getting specific implementations inlined and optimized It is even worse than just virtual calls, interfaces do virtual calls and generics manage to be slower (Actually generics can sometimes be monomorphized, the actual story is a bit more complex than that, this is a good article about them: https://planetscale.com/blog/generics-can-make-your-go-code-slower)
|
# ? Jan 8, 2023 20:07 |
|
The tensorflow api broke my illusion of Google only hiring good engineers
|
# ? Jan 8, 2023 21:18 |
|
repiv posted:Doesn't Go have real generics now, in what ways is their implementation stupid and broken Getting a strong impression that it's very much the same 'technically, yes' as multi-threading. Someone do please correct me if I'm wrong about go still being strictly one concurrent thread. It only has the barest sync primitives and no actual thread spawning call and parallelism with goroutines is "maybe?" I pointed and laughed at a language being designed SO HARD just to be JavaScript++ and set it aside in 2015. Seems justified. Ranzear fucked around with this message at 01:24 on Jan 9, 2023 |
# ? Jan 9, 2023 01:22 |
|
Per the article Xarn linked above, go generics are only actually compile-time generics for basic datatypes like int32 / float64. For every pointer-to-object type, the compiler generates a single dynamic void* implementation shared between all types that looks up the required vtables in a global shared cache at runtime. This makes it perform worse than just using a non-generic polymorphic function and accepting an interface pointer, since at least for those the vtables are passed in alongside the function arguments. RPATDO_LAMD fucked around with this message at 01:37 on Jan 9, 2023 |
# ? Jan 9, 2023 01:35 |
|
RPATDO_LAMD posted:Per the article Xarn linked above, go generics are only actually compile-time generics for basic datatypes like int32 / float64. Sounds like Smalltalk-80 and Objective-C method dispatch. Except that Smalltalk-80 did it that way for all types including ints/floats.
|
# ? Jan 9, 2023 01:59 |
|
Volmarias posted:Incorrect; the main design goal of all Google programming is to perform artificially hard tasks as a rationale for promotion. Being simple to implement for the slothful among us (everyone) is a laudable bonus. I'm pretty sure that Rob Pike actually said something along the lines of "Go exists because we can't trust programmers to be good enough to write C++" once upon a time
|
# ? Jan 9, 2023 02:49 |
|
Volmarias posted:Really, programming in real alphabets and words was the mistake, we should have taken a page from APL and just made anything that's not user facing I/O content be weird, bespoke symbology that requires a separate keyboard. This would have kept the priesthood of programming interact, preventing shenanigans like this under thread of Programmer Exile. I am loving this brute-force solution to SQL injection, just look at all the trouble in-band signalling caused telephone companies.
|
# ? Jan 9, 2023 03:04 |
|
Go is reasonably parallel these days and GOMAXPROCS doesn't default to one any more. This did reveal that goroutines aren't actually very good at parallelism, but you can just ignore them and do normal threading.
|
# ? Jan 9, 2023 03:37 |
|
Plorkyeran posted:Go is reasonably parallel these days and GOMAXPROCS doesn't default to one any more. This did reveal that goroutines aren't actually very good at parallelism, but you can just ignore them and do normal threading. My favorite part about go is that the one interesting feature the language has everyone just says, "oh yeah ignore that thing it's never really worked right or as expected"
|
# ? Jan 9, 2023 06:59 |
|
Plorkyeran posted:Go is reasonably parallel these days and GOMAXPROCS doesn't default to one any more. This did reveal that goroutines aren't actually very good at parallelism Every example I see on the internet boils down to "See? The numbers weren't printed in the order expected! Go is very clearly threaded." When this is challenged, the response is always "The scheduler determines the need for threading and you aren't doing enough work to cause it to invoke any, duh." But uh, also: Plorkyeran posted:you can just ignore them and do normal threading. No, you can't. They don't let you. There is literally no provided method. go will tell you to sit and spinwait and that goroutines are threads. Digging deeper with five extra years of being insufferable, I'm a little thrown as to what things yield. It's really unclear if waiting on a future or something like time.Sleep() yields. Syscalls clearly will, and a goroutine can claim a whole thread entirely to itself and never be forced to yield, but other than that... In prior releases, a goroutine that was looping forever could starve out other goroutines on the same thread, a serious problem when GOMAXPROCS provided only one user thread. In go 1.2, this is partially addressed: The scheduler is invoked occasionally upon entry to a function. This means that any loop that includes a (non-inlined) function call can be pre-empted, allowing other goroutines to run on the same thread. So I would guess it just yields at any scope change. What jumps out at me is the non-inlined parenthetical, so the only way to be sure is to intentionally break inlining entirely. This means it might yield on some given function all, or it might not and just blocks the thread for the duration, all depending on how the compiler feels about inlining. Maybe that's where the 'not enough work to thread' thing comes from. Inlining prevents yielding, and the smaller some test of threading is, the more likely it is to be inlined and never yield. I recall/assume that there is some mechanic in go's compiler to find concurrency/threadability boundaries, and those boundaries are likely tied to functions/scopes, but I would supposed that if it's not been yielded at one of those boundaries then it can't ever multithread anything. It probably doesn't help that the last five or six versions have some variation of 'more things will inline automatically' in their release notes, meaning even fewer yield points to find threadable code. The more your code is inlined, the worse it multithreads? I don't actually know, kinda just spitballing here. Some dingus on Stackoverflow posted:Your concern is a solved problem in go and you don't have to worry about it I like that all of this stems from hilarious hack of generics into go, but even async/await requires boilerplate. Fascinating what's 'solved' and what's left to users to cobble together.
|
# ? Jan 9, 2023 09:13 |
|
The Go thing I have to touch maxes out all of my cpu cores and does actually run faster if I let it do so rather than set GOMAXPROCS=1. It is actually sort of too good at maxing all of my cpu cores. Go's scheduler isn't big.LITTLE-aware so it'll regularly block power cores waiting for an efficiency core and you have to set manually set GOMAXPROCS to the number of power cores and hope that everything works out. Yet another dumb problem caused by them porting plan9 to run on top of other platforms rather than making Go cross-platform*. * This is not a literally true statement.
|
# ? Jan 9, 2023 22:02 |
|
I’m wondering if there’s implementations of programming languages where the keywords or other syntax aren’t latin ascii, outside of stuff like apl which isn’t from natural language. Like I almost assume cyrillic basic probably existed. Hangul java? Probably not. e: well poo poo: https://en.m.wikipedia.org/wiki/Non-English-based_programming_languages dougdrums fucked around with this message at 11:30 on Jan 10, 2023 |
# ? Jan 10, 2023 11:28 |
|
“C++” [url]https://ћпп.срб[/url] e: dougdrums fucked around with this message at 12:00 on Jan 10, 2023 |
# ? Jan 10, 2023 11:57 |
|
dougdrums posted:I’m wondering if there’s implementations of programming languages where the keywords or other syntax aren’t latin ascii, outside of stuff like apl which isn’t from natural language. Like I almost assume cyrillic basic probably existed. Hangul java? Probably not. Apple script has locale dependent language
|
# ? Jan 10, 2023 14:42 |
|
dougdrums posted:I’m wondering if there’s implementations of programming languages where the keywords or other syntax aren’t latin ascii, outside of stuff like apl which isn’t from natural language. Like I almost assume cyrillic basic probably existed. Hangul java? Probably not. lingua maxime similis latini hic est
|
# ? Jan 11, 2023 08:51 |
|
the concept of a splash screen, in general
|
# ? Jan 13, 2023 13:08 |
|
Hammerite posted:the concept of a splash screen, in general Better than Civ 5's "let's play the intro movie every time to disguise that it's a loading screen",
|
# ? Jan 13, 2023 20:39 |
|
Volmarias posted:Better than Civ 5's "let's play the intro movie every time to disguise that it's a loading screen", Thankfully you can disable the "intro" movie in Civ6.
|
# ? Jan 13, 2023 23:47 |
|
I think you can just delete it in Civ5 too
|
# ? Jan 14, 2023 03:33 |
|
RPATDO_LAMD posted:Following this commit, instead of one single extremely large structure For those of you who aren't up on this, NetHack is one of the oldest roguelikes around, being first released in 1987, so honestly I imagine any codebase starting back that far is just redolent with code smells. That's still fantastic though.
|
# ? Jan 17, 2023 19:16 |
|
https://twitter.com/JeroenFrijters/status/1615204074588180481
|
# ? Jan 17, 2023 19:18 |
|
The most horrifying part of that is calling a proportion a percentage
|
# ? Jan 17, 2023 19:22 |
|
cheetah7071 posted:The most horrifying part of that is calling a proportion a percentage
|
# ? Jan 17, 2023 19:33 |
|
cheetah7071 posted:The most horrifying part of that is calling a proportion a percentage That's me every time checking checking NHL goalie statistics: ".93 save /percentage/?" ... And honestly, with 11 cases the if chain maybe less hassle than writing it concisely.
|
# ? Jan 17, 2023 19:33 |
|
RPATDO_LAMD posted:Following this commit, instead of one single extremely large structure And the first file in the commit already has a bug. (Typo: "gv" for "gz".)
|
# ? Jan 17, 2023 19:40 |
|
|
# ? Jun 6, 2024 06:49 |
|
There's nothing wrong with this And it's still a percentage. 0.1 and 10% are the same thing: 10/100.
|
# ? Jan 17, 2023 19:46 |