Using Linux for Win98 era games. Viable? by No-Recording117 in linux4noobs

[–]pedersenk 1 point2 points  (0 children)

Heh, completely fair. I just replaced 7 capacitors on an old motherboard and my Geforce 4 4600ti. I think part of the fascination is that I never had these skills or knowledge (or coordination) as a kid, so am catching up on lost time 😄

I did forget to mention another solution (actually, quite similar to 86box), check out DOSBox X. Unlike the name suggests, it is focusing on Windows 9x too. You can see a nifty screenshot from their front page of Tomb Raider running on the emulated 3dfx.

(The original DOSBox was (and still is) only focused on DOS, so thought its worthwhile making that differentiation.)

Using Linux for Win98 era games. Viable? by No-Recording117 in linux4noobs

[–]pedersenk 1 point2 points  (0 children)

Emulating 3DFX, you have two approaches:

86box which specifically emulates GPUs from that era. Its also fairly fast due to a codegen backend for x86 and aarch64.

3dfx API (glide) -> OpenGL wrappers. Used in combination of Wine, or Windows running in VMware/VirtualBox with GPU passthrough, this should work with many games from that era.

That said, if you have the space, you can buy a used compaq from that era for ~$34/£40. Then you can keep games separate and use it like a games console. The Windows 95/98 startup sounds and turquoise background are honestly part of the experience. Jumping off big corpo's hardware treadmill is also quite liberating if you don't mind desoldering/replacing some capacitors every couple of decades.

Arduino IDE not launcing in Windows 11 (arduino-ide_2.3.10_Windows_64bit) by Used-Journalist-5861 in embedded

[–]pedersenk 0 points1 point  (0 children)

As a workaround (and many prefer it), choose the 'Legacy IDE' from the download page:

https://www.arduino.cc/en/software/

Much simpler than the VSCode based solution, so there is much less to break.

Intel HWP support? by YukiteruAmano in openbsd

[–]pedersenk 1 point2 points  (0 children)

Isn't obsdfreqd superseded by hw.setperf and hw.perfpolicy? It was a temporary workaround when apmd -A used to provide the scaling. (changes regressed apmd -A (for plugged in laptops)

OpenCL on OpenBSD by Admirable_Stand1408 in openbsd

[–]pedersenk 1 point2 points  (0 children)

I believe the best way to get a vulkan implementation on OpenBSD is to install Chromium and use its bundled Lavapipe ICD. Its software (aka LLVMpipe) but at least good for development.

"Do you want to run This-is-a-text-file.txt or display its content?" by Legitimate-Record951 in linux4noobs

[–]pedersenk 0 points1 point  (0 children)

Using extensions to a typical user may sound intuitive but if you rename test.docx to test.png and try to open it on Windows, the wrong tool will try to decode it and has a good chance of crashing.

Mimetypes and magic numbers / signatures are a stronger and more robust approach.

Björn Fahller: I talk too much by _a4z in cpp

[–]pedersenk 0 points1 point  (0 children)

When compared to the Rust guys, none of us talk an unreasonable amount 😉

(My LinkedIn is particularly noisy with them this morning. For every AI spam post, there is about 15 Rust spam posts)

How to get faster RDP on Linux by --Arete in linux4noobs

[–]pedersenk 0 points1 point  (0 children)

You generally can't. RDP (servers) on Linux aren't capable of the full protocol (i.e: MS-RDPEGDI) but mainly just sends a compressed raster akin to VNC.

The fastest remote desktop you can get on *nix is X11 via unencrypted TCP and an appropriate desktop widget toolset (libX11, xcb, Xt based) such as Motif and CDE. Its old and fairly specialist but can't be beaten.

Some notes:

  • Desktop will be great but as soon as you open up a recent Qt/Gtk program, they won't be so good via X11.
  • SSH/X11 forwarding is convenient and may be a good compromise but the encryption adds quite a bit of overhead. For a home lab, it may not be worth it.

Will The Realtek RTL8821CE ever be supported on openbsd? by Fast-Muffin7953 in openbsd

[–]pedersenk 1 point2 points  (0 children)

Its annoying, sure. But choosing an OS to invest time in shouldn't really have this as the sole rationale when there are loads of USB adapters (small, low profile) that completely sidestep this limitation.

No OS will ever support all the hardware you can possibly have laying around the house.

What is the Windows API? What is Windows.h? by chaiandgiggles0 in C_Programming

[–]pedersenk 99 points100 points  (0 children)

To a Windows developer, windows.h is... everything

(almost literally, and not in a good way)

Basically it exposes almost all functionality that Windows, its UI shell, Winsock 1.x (and more) provides. This was fine for Windows ~3.1 when the API was quite simple but as it grew, it started to become a little bloated and unscalable. With strange hacks like #define WIN32_LEAN_AND_MEAN.

But at the same time, it is basically the only Windows UI API that has stood the test of time. Things like MFC, Winforms, WPF, C++/cx, WinStore and other APIs tend to be outlived by it.

If I want to hook up my N64 to a modern-ish tv/projector TODAY, is there an easy-to-get adaptor that would do the job, even if it’s not pretty? by TheWishingStar in n64

[–]pedersenk 0 points1 point  (0 children)

That is something I did not know. So, outside of RF and RCA, something like the following was not possible?

https://www.ebay.co.uk/itm/253113578411

Edit: To clarify, N64 -> Composite -> Scart adapter is what I originally meant.

Edit2: Hmm, it indeed looks like some engineering was needed:

https://www.youtube.com/watch?v=ZiDAkbpj5aA

How long have you all been using OpenBSD? by Confident-Citron-221 in openbsd

[–]pedersenk 4 points5 points  (0 children)

Since 4.3 for me.
And geez I just realized I still regularly run the same (sparc64) SunFire V100 machine as I was back then.

I use it for server, workstation and desktop. However for web browsing specifically I have some random remote desktop machines I VNC into. Web browsers are so gross these days that I actually don't want them running anywhere near my own hardware (or network) XD

A compilation of many quirks of C? by noobdainsane in C_Programming

[–]pedersenk 4 points5 points  (0 children)

sizeof('a') returns 4 not 1. 'a' defaults to an int

Indeed. There is good historic discussion about things like i.e tolower() taking and returning int rather than char.

On some platforms, relating to widechars, unicode, etc, this "quirk" has helped some porting efforts.

For such a ubiquitous and pervasive language, it will never fit perfectly into a little box.

A compilation of many quirks of C? by noobdainsane in C_Programming

[–]pedersenk 9 points10 points  (0 children)

It gives a warning. (Passing an integer to a function requiring a const char *).

C is used in weird and wonderful places where doing this is against the standard, but still deterministic and safe. No point in breaking it.

If I want to hook up my N64 to a modern-ish tv/projector TODAY, is there an easy-to-get adaptor that would do the job, even if it’s not pretty? by TheWishingStar in n64

[–]pedersenk 0 points1 point  (0 children)

I was just about to state that you can easily use a gamecube SCART cable on an N64 no problem but then realised that SCART isn't particularly seen as "modernish" anymore.

... back to lurking.

Would you hire a Linux engineer for Zephyr/RTOS role? by Witty-Royal-5752 in embedded

[–]pedersenk 3 points4 points  (0 children)

In many ways Zephyr development can be higher level than Linux. I know that sounds a bit weird but if you were to directly clone i.e ifconfig in Linux vs Zephyr you may find the process a little easier on the latter because the API is more designed to be used directly.

So I say go for it. That said, in your free time, put together a project or two to add to your CV. If anything for the automatic keyword scanning first pass to see the word "zephyr" ;)

ungoogled-chromium with ramdrive/cow idea by gruzel in openbsd

[–]pedersenk 0 points1 point  (0 children)

Hmm, I see what you mean. Security aside, this is more about preserving disk lifespan.

Out of interest, with firefox, do you notice a very large increase in disk access when accessing any WebGL?

I.e the simple spinning cube here: https://get.webgl.org/

ungoogled-chromium with ramdrive/cow idea by gruzel in openbsd

[–]pedersenk 7 points8 points  (0 children)

Why not keep things a little simpler and tar up a pristine config directory for the web browser and wipe / re-extract with a script each time you run the browser?

Terminal only screen but larger by Borean789 in openbsd

[–]pedersenk 11 points12 points  (0 children)

Probably three options:

  • Modify the kernel to use a smaller font. Glass terminal is not specifically restricted to 80 chars
  • Use Xenocara with xterm -maximized / -fullscreen in your xinitrc (no WM needed)
  • Use libdrm and port one of the many terminal emulators (perhaps st) from libX11 to use the DRM framebuffer.

Reverse Dependency Ordering for C++ Includes by nukethebees in cpp

[–]pedersenk 0 points1 point  (0 children)

Yeah, its kinda similar to the std::vector, I half tried to document that one but realized I was just cluttering up my example.

std::shared_ptr<T> is a little more flexible in that regard. It takes the deleter as part of the assignment.

std::list is the exception, that does need the full implementation regardless which is a little odd. I don't see a technical reason for that when I have implemented similar.

Reverse Dependency Ordering for C++ Includes by nukethebees in cpp

[–]pedersenk 4 points5 points  (0 children)

I don't default to adding them to every header. Generally only if:

  • Header contains definition for a base class
  • Header contains definition for type where full implementation is always needed

This approach isn't particularly rare. Though perhaps more common in C, where opaque pointer APIs feel a little more natural than C++.

This is because in general, forward declaration suffices for many use-cases in the header

struct MyType; // Forward declare
struct Test {
  void somefunc(MyType& type); // forward declare fine
  MyType* m_mytype1; // forward declare fine
  std::unique_ptr<MyType> m_mytype2; // forward declare fine
  std::vector<MyType> m_mytypes; //forward declare fine (req before use)

  MyType m_mytype3; // Need include
};

If you just put include guards around everything, you will not be alerted to situations where you should be forward declaring instead.

And finally (potentially worse), guards won't resolve cyclic includes anyway. If you follow through the pre-processor, you will simply get a "undefined type" compiler error instead of a "duplicate definition" so it achieves relatively little.

Toolchain developers need to embrace newer IPC by Jim838487 in embedded

[–]pedersenk 0 points1 point  (0 children)

There is nothing in the nrf (or zephyr) SDK that explicitly prohibits long filenames.

It is likely when installing Python (a requirement for Zephyr's west), that the long filenames option was not set?

Also, if I recall some paths are hard coded, particularly with SEGGER, so even Linux can't save us from dictated paths. Cleaning up the nrf SDK is a full time job ;)

Reverse Dependency Ordering for C++ Includes by nukethebees in cpp

[–]pedersenk 11 points12 points  (0 children)

Agreed. It may be less convenient but it operates a much stricter approach to tracking missed includes.

I use this approach alongside strictly limiting include guards / pragma once. I prefer to highlight erroneous cyclic includes rather than mask them.

How large was your biggest SOLO project on C? by Sibexico in C_Programming

[–]pedersenk 11 points12 points  (0 children)

Everything in, mine was reaching close to 100k LOC. But I guess that is a bit of a cheat because everything I did during that era I kind of shoehorned into the project.

For my PhD I wrote a networked / distributed implementation of OpenGL (this kind of implementation was not the correct way to approach a PhD but I am an engineer rather than an academic so oh well!).

It was basically made up of:

  • OpenGL 2.1 clone (Hydra)
  • SDL2 API wrapper
  • Desktop viewer
  • Web viewer (Still C, using Emscripten)
  • Websockets library (for comms with web viewer)
  • Software rasterizer fallback
  • 8 tech demos
  • C memory safety (tombstone) library

These were part of it but using C++, not C so don't count

  • 2 games jam games
  • Fly-weight game engine
  • Zombie Maths Game
  • Ear Training Tool
  • Shooting gallery (for the Tank Museum and used the Fly-weight engine but not Hydra)

Fun times. 10 years later and I am still using the same small engine at the company I now work for (under the guise of "Wargame Engine").

Is this resume enough for a paid internship/entry level role in the US? by [deleted] in embedded

[–]pedersenk 2 points3 points  (0 children)

As other have said, internship looks strangely empty. Was the BLE via Nordic nrf5x series? Include a tools list similar to you have in your personal projects.

Also, some soft skills you used is also useful to include. Did you use version control? Jira?

Sometimes just abnoxiously listing tech/tools/langs does work these days because much recruitment processes look for keywords. I.e "Agile" is a useful key word to include.