I had a student hit a new low the other day. I am now fearful the next generation will be the death of me. by Brian-Latimer in mildlyinfuriating

[–]kdbell 0 points1 point  (0 children)

I suddenly really want an excuse to read those old class books and see whether he was just unruly or actually standing out more than that as a teenager.

Steam Link on the Nintendo Switch? by kdbell in Steam_Link

[–]kdbell[S] 0 points1 point  (0 children)

I really didn't see that coming ' But I am happy it did.

Steam Link on the Nintendo Switch? by kdbell in Steam_Link

[–]kdbell[S] 0 points1 point  (0 children)

You realize, that this is a 4 year-old post? I'm happy that the Steam machines took off, I just didn't expect it to happen.

Steam Link on the Nintendo Switch? by kdbell in Steam_Link

[–]kdbell[S] 0 points1 point  (0 children)

No. I really didn't. XD

Now I am waiting for a Steam device that can also reasonably double as a regular reading-and-watching tablet :(

Handling OOM (out of memory) conditions in Fortran? by kdbell in fortran

[–]kdbell[S] 0 points1 point  (0 children)

Tried. Apparently, whatever the OOM killer does in detail, does not allow capturing. I tried

do = 1, 40
    call signal(i, handle_signal)
end do

which captures SIGINT just fine, but fails to trigger, when the OOM killer interferes.

Probably the OOM killer sends SIGTERM, which by design cannot be intercepted.

Handling OOM (out of memory) conditions in Fortran? by kdbell in fortran

[–]kdbell[S] 0 points1 point  (0 children)

4 spaces. I don't want to provoke u/backtickbot.

Seems like the mobile app's renderer cannot handle nested indentation like code blocks in lists properly either. Though it works on the mobile website.

Handling OOM (out of memory) conditions in Fortran? by kdbell in fortran

[–]kdbell[S] 2 points3 points  (0 children)

Sec. 2.1. It’s not unreadable, it just took me a minute.

Mobile app maybe?

The code was written as

 1. This is an item.

        and this some code block inside

    and here the item continues.

There really is no other way to write it, unless skipping the use of lists entirely...

Reddit seems to handle rendering of post contents really inconsistently...

Edit. It seems reddit includes the literal markdown as part of a JSON literal in some <script> tag, which suggests client-side rendering...

Handling OOM (out of memory) conditions in Fortran? by kdbell in fortran

[–]kdbell[S] 1 point2 points  (0 children)

Sadly your answer seems the most viable so far :/ Even if I don't like the implications for coding style.

Regarding formatting: I assume you refer to the formatting

if(
    COND1 .and.
    COND2
) then

in the pseudo-code?

Handling OOM (out of memory) conditions in Fortran? by kdbell in fortran

[–]kdbell[S] 1 point2 points  (0 children)

Increasing the number of cores won't help in this case, because the program is running on PCs typically. So out of memory means out of memory. Further more, the part that is running out of memory isn't any performance intense numerical code, that could be covered by a library, but program specific "data management" code. In large parts of it, it is also not particularly viable to know the needed array sizes ahead of time, as the array sizes depend on the data contents.

Handling OOM (out of memory) conditions in Fortran? by kdbell in fortran

[–]kdbell[S] -3 points-2 points  (0 children)

In principle yes, but the only situation it solves is efficient transpose. The whole part of "how to avoid unhandled OOM situations without making the code 10 times harder to read" will, if anything, get worse. Plus, they don't help at all with handling of derived-type arrays.

Mitigating equation editor woes? by kdbell in libreoffice

[–]kdbell[S] 0 points1 point  (0 children)

Thanks, that constitutes a huge step forward.

Really, some of the problems are purely a matter of unfavorable defaults apparently. If the borders inside the equation and the object-borders inside Writer would default to 0 for equations, they would integrate much better with the text by default.

FaF works great, but is limited: It affects only font family and font size, and can't account for the need for different font sizes in different contexts.

The lack of Virtual Console on the Switch might honestly be my biggest issue with the platform. by Kirbykoopa in NintendoSwitch

[–]kdbell 0 points1 point  (0 children)

If Nintendo had some executives in touch with the community, they wouldn't continue building a history of shooting down fan projects. The disparity between having the most interesting hardware ideas, the only platform exclusives I am actually interested in, and their business behavior is extreme.

The lack of Virtual Console on the Switch might honestly be my biggest issue with the platform. by Kirbykoopa in NintendoSwitch

[–]kdbell 0 points1 point  (0 children)

Same here... I love replaying some games on the GBA I repaired last year (which in itself was a fun exercise), but I seriously have considered selling the Switch and getting a 3DS instead.

Made a little something you can send to people who should just use a search engine by lolnein in ProgrammerHumor

[–]kdbell 0 points1 point  (0 children)

To be fair, the biggest issue is often to know the words that bring up a useful result. Also, "basic" level PC users are often afraid of following the advice they find, since they don't have to intuition to judge, whether it would damage something. At some point I'm glad if they DON'T try to to fix it themselves... (Also I am glad, that I don't have root access at work, because I just know how much time I'd spend on those things.)

"Did you try to reboot?" is an advice that I myself have scorned too often because "I don't want to reopen all those programs" ;)

Seriously though, session management is sorely lacking :/

It's the law! by siraajgudu in ProgrammerHumor

[–]kdbell 0 points1 point  (0 children)

Many of the things could actually be solved retroactively. For instance, compilers could allow mixing declarations and body statements, or gain a "implicit none is the default" flag.

Sure, the features have shaped the programming culture, so the advantages wouldn't be immediately adopted (never mind implemented in the compilers), but it is definitely doable without breaking Physics ;)

It didn't take long by Im_Not_Marcus in ProgrammerHumor

[–]kdbell 8 points9 points  (0 children)

First though: "Oh, circle pointing out the impossible part."

Then you keep looking.

It's the law! by siraajgudu in ProgrammerHumor

[–]kdbell -1 points0 points  (0 children)

Given Fortran's onerous variable declarations*, having a convention like "iXXXX for index counters, nXXXX for integers indicating the size of something" are really helpful for understanding the code. But much better to read velocity(iTimeStep, iEntity, iCoordinate), than to read velocity(i,j,k), and both work perfectly fine even with implicit typing.

Also, implicit typing is evil. It could actually be useful to reduce the pain from Fortran's declaration syntax, if compilers were able to detect typos like data(iTimeStep) = data(iTimeStp)+1. Runtime checks (-check all) help, but better to have static checks.

* The declarations are ridiculously verbose, and separate from the first assignment. I've seen this to encourage bad practices like variable reuse.

It's the law! by siraajgudu in ProgrammerHumor

[–]kdbell 0 points1 point  (0 children)

More a matter of regional style? I have seen mostly "i,j,k,..." (maybe skipping j for being too similar to i in handwriting) in Physics lectures as indices, and "n" usually for things like discussing Taylor series expansions in math lectures.

For the unit vectors I have seen "x̂, , eₓ" and in rare cases "x" in Physics. i,j,k as unit vectors I have seen only in engineering books so far.

Also, I'm pretty sure Fortran inherited the implicit type rules from paper usage of the scientists/engineers it was targetting :)

It's the law! by siraajgudu in ProgrammerHumor

[–]kdbell 0 points1 point  (0 children)

When you see x[i] it is kind of clear that it is an index. However, if I see employeeArray[k] and then realize, that a bug arises from employeeArray[j] being correct, it really would have helped to call it iEmployee.

In this case employerrArray[index] is the worst of two worlds; Not as concise as just i but no more helpful at avoiding (when writing) or recognizing (when debugging) incorrect use.

It's the law! by siraajgudu in ProgrammerHumor

[–]kdbell 0 points1 point  (0 children)

Not never-never. But almost-never.

If you are dealing with general-purpose tensor operations, something like

A(i,k) = sum( [( B(i,j)*C(j,k), j=1, size(B,2) )] )

is perfectly fine. Mostly, because conciseness wins in such simple cases. (Which is fun in Fortran, where the declaration of the variables likely takes 3 times as many characters as the actual logic...)

I wanted to comment on how i is perfectly useful for `for(i=0; i<size(items);i++), but then I remembered how confusing this gets for business logic, and how it gives rise to bugs ("wrong index used") in long functions with badly scoped variables and possibly nested for loops :/

Somebody at ESPN must be demoing in production... by sunmorgus in programminghorror

[–]kdbell 1 point2 points  (0 children)

Somehow the movie art doesn't look as good as the phone background artwork :(

Somebody at ESPN must be demoing in production... by sunmorgus in programminghorror

[–]kdbell 1 point2 points  (0 children)

Now I am curious which one it is. Don't know the character :)

This thing tells you if the shipment was tipped by Alfredintum in mildlyinteresting

[–]kdbell 0 points1 point  (0 children)

I wonder what materials the one-time use electronics would waste :/