FTDI (the company practically synonymous with TTL serial adapters) uses 3.5mm tip-ring-sleeve connectors for this. In other words, a common headphone jack.
I added one to my single-board computer enclosure, following FTDI's wiring. Now I can easily connect whenever I need to use the serial console, and a standard 3.5mm audio extension cable will let me reach across the room without moving my main computer. Replacement parts, if I ever need them, are cheap and easy to find.
That really sucks for hotplugging since TRS connectors sliding in basically make random connections before seating properly.
Granted, you shouldn't hotplug TTL serial, but everyone™ does it anyway. (In some situations you're even forced to, to avoid reverse powering something.)
I've been using this ftdi cable too for the last 15 years or so and, while trs isn't a great connector, I haven't had any issues in practice.
It works well for capturing serial logs, a console or software updates in development. The advantage i saw was that I could order 50 cables from a distributor and give one to everyone that works on the device.
If someone needs one on the other side of the world, they can get one from a local suppliers.
Hot plugging hasn't been a problem in my designs, I add a series resistors to the uart net and ESD protection if software developers will use it.
When I use it for other devices, like routers, SBCs and IP cameras I avoid hot plugging and leaving it connected when the device isn't powered.
My scenario is connecting terminal emulators to getty or u-boot, which I think is a common one. A blip of line noise when plugging in would be barely considered an annoyance, easily cleared by pressing Backspace.
But yes, if someone happens to be using their serial line for some kind of sensitive signaling, then I would agree that choosing a more isolated connector (or just avoiding hotplug) would make sense.
There's a small risk of CPUs and I/O pins getting fried if GND levels aren't equalized first and instead that equalizing force would go through those pins. One could argue that it's hardware designer's responsibility to save users from such things, but then again, using a better connector than TRS can be one of them.
Thing is, for a serial TTL connector to become ubiquitous, it needs to cover at least something like 99% of scenarios. Or maybe 95%. 3.5mm TRS ain't that, and thus just increases general diversity in connectors.
In my experience noise on hot-plugging the serial adapter is a complete nonissue. I'm sure it matters for you, sometimes. But for this kind of embedded work, I'd say it's important far, far less than 1% of the time.
In my experience with... it's maybe 20? ... embedded boards, junk during boot breaks the boot flow for about half of them. And attaching quickly after target powerup is very often the crux of the exercise, to get to the bootloader fast enough before it moves on, but also you don't have the shifters (or Vref pin) in place to be able to attach beforehand...
Since I once had the case where junk on the line (from a wiggly connection) caused Magic Sysrq requests I'm fully on your side. No junk tolerated for potential hot plug connections.
I'm aware of serial breaks, but this is the first I've heard of them being interpreted as SysRq by Linux. That could be handy. Thanks for the tip.
I assume the possibility of spurious Rx state is why FTDI chose to wire Rx to the tip pin of the female TRS connector: It's the last pin to make contact with anything when plugging in, and therefore least likely to be bridged to ground. I suppose the mechanical design of any particular jack would determine whether it's possible at all.
Using a male TRS 3.5mm audio connector is something you should do with care. When you hotplug that connector the plug's tip (T) may first make contact with the sleeve (S) of the receptible, then briefly hit the ring (R) until it finally lands on the tip connector. Same goes for the plug ring (R) which may have contact with the sleeve (S) of the receptible.
So expected are:
T → T
R → R
S → S
and what can happen briefly is:
T → S
T → R
R → S
Depending on what you're using the connector for, that can ruin your day. Likely this isn't an issue on serial connections, but I have seen people use that connector for power..
On audio systems this is typically not an issue, since tip and ring carry signals that on any gear worth anything should have an output stage that can easily handle a connection to ground.
Every vendor defines their audio jack connector serial port differently. It is very dangerous to use 3.5mm jack. There is no pinout standard of using 3.5mm.
Even as pure audio jack, the 3.5mm connector has two standards, with the difference on ground and mic.
Well, not every vendor does it differently, because there are far more vendors than possible wiring permutations on a 3-contact connector... but I understand what you mean.
The same issue applies to PCB header pins.
And the same goes for 25-pin D-sub connectors, which have been widely used as RS-232, parallel printer, and SCSI ports.
Voltages vary, too.
This is why we check before wiring them to other things.
Funny - in the retail industry, we use a 1/4" jack instead that runs straight RS232 level traffic (for "DEX" - data exchange - typically sending invoices to a merchant from a route driver, or pulling data from vending machines on a route).
........ and the DEX pinout has Rx/Tx in reverse (our tip receives and our ring transmits) in comparison to the FTDI TTL setup. Wellp!
A stdlib doesn't have to provide everything under the sun in order to be helpful here.
Languages with rich standard libraries provide enough common components that it's feasible to build things using only a small handful of external dependencies. Each of those can be carefully chosen, monitored, and potentially even audited, by an individual or small team.
That doesn't make the resulting software exploit-proof, of course, but it seems to me much less risky than an ecosystem where most programs pull in hundreds of dependencies, all of which receive far less scrutiny than a language's standard library.
> the 8 oz will be on sale but only if you buy at least 2 or 3, its incredibly frustrating.
Have you tested this by buying just one, and checking the price on the receipt?
I ask because someone once told me this was illegal in the US; that a shop was allowed to display the sale price only for a larger quantity, but they had to honor the same price per unit if you only bought one. (I think we were discussing produce at the time, in case that matters.) I've long wondered if that was true or just an urban legend.
My grocery store does both. If the label says "Sale: 2/$5, Was: $3.99" and I buy one, I get charged $2.50. If the label says "2/$5, Single item: $3" and I buy one, I get charged $3.
Most likely that pricing rule was/is at a more local level. The national level in the US doesn't have anything like that, but there are some states or cities or counties that can and do.
iirc yes it did not apply on purchase as well, on the label it is always also explicit about cost if not bought in those quantities(2 for 5 in any quantity is still sometimes the actual offering). I am assuming my memory is correct because its baked into my shopping experience to ensure i am reading the label correctly now.
Meijer is slowly becoming a bad offender of these types of things, Jewel has been horrifying for years, to the point where i avoid their store entirely. The final straw was this limit applied to gallons of milk.
The computers are not dumb. If you do not purchase the correct number of items, the discount is not applied. Also, if you do not have a member/loyalty account, you do not get those discounts. They now have a new level that requires you to have their app for "digital" coupons that are on top of the loyalty prices. There are many times where I don't input my number in until the very end, and then see it calculate all of the deductions. Sometimes it's not much, but I've seen it drop $30 from the "member" price discounts.
I thought this was obvious, but to spell it out: I was suggesting that they might not necessarily be programmed to apply a different price depending on quantity. An item might have a flat price of $1 each, but labeled on the shelf/bin as "special: five for $5" to encourage larger purchases.
I have personally encountered this. Meanwhile, I do not recall an example of buying a quantity smaller than suggested and being charged a higher price per item. Hence my question about labeling and law.
> Also, if you do not have a member/loyalty account, you do not get those discounts.
> An item might have a flat price of $1 each, but labeled on the shelf/bin as "special: five for $5" to encourage larger purchases.
That's not a special, that's just math. I've only ever seen that kind of nonsense from Amazon. I've seen Buy 3 for $5, while the individual is $1.99. If you buy one you pay $1.99, if you buy two you pay $3.98, but if you buy three, you end up paying $5. The receipt will show 3 @ $1.99 with a discount under the item bringing the total to $5. My store routinely has various meat offerings of Buy 1, get 2 free. If you ring up one, it shows the price. If you ring up 3, it shows all three items, but discount the cheapest two prices so you only pay for the single highest priced item.
Major chains are not going to be futzing around with gotcha tags. They know they'll be called out for it. It would be the bodega style places that I'd be suspect of that kind of shenanigans.
> I'm not talking about membership discounts.
Why not? It clearly shows two different prices. If you are not using a discount/loyalty card, you pay the full price. A lot of times I've seen when you use a line with a human checker they'll have a card on stand by (probably their own) to get the points while giving the buyer the lower prices.
> I ask because someone once told me this was illegal in the US; that a shop was allowed to display the sale price only for a larger quantity, but they had to honor the same price per unit if you only bought one.
No, WTF? That's not a thing, why would you even credit such obvious nonsense?
I'm pretty sure that conversion was done by the C library, just as stated in the article. Not by DOS. ASCII 0x0A '\n' is always one byte*, and C library implementations for DOS would insert an ASCII 0x0D '\r' byte before it at output time if the C FILE stream had been opened in text mode.
Note that printf(), which you use in your example, is a C library function that writes writes to a predefined text mode stream. So it follows the same rules.
I wasn't able to dig up the source code of a vintage DOS compiler's C library in a few minutes of looking, so I can't prove it right now, but this section of the C standard (7.21.2 - Streams) hints that my recollection is correct:
> Are the developers allowed to sell those keys for less than the Steam price?
I believe so. However, even if it's not I don't see any other platform allowing you to use their service and sidestep platform fees. Someone mentioned above that there might be limitations for the number of keys, but I'm not aware.
> Using The Steam Controller Completely Outside Of Steam
> [...] However, at least on the newly released Fedora KDE 44, the system does appear to detect it as a basic gamepad out of the box.
> [...] I installed LIMBO from GOG with GE-Proton and it worked great even with vibration.
More example games are described there as well. A few apparently get confused by the Steam Controller presenting itself as a game controller, a keyboard, and a mouse, but most seem to be fine.
Those tests were done on Linux. I wonder if it's any different on Windows.
The "played for less than two hours" refund policy is more of a compromise than great, IMHO.
It works well for games that are quick to run and enjoy. However, quite a few of the games I've played will easily burn two hours on loading, compiling shaders, watching unskippable branding animations (splash screens), tuning graphics settings, setting up key bindings, and working past miscellaneous bugs.
Steam's "play time" clock starts when the game executable is launched, and keeps running during all of that nonsense, even at title screens and menus. Some games have run past Valve's return window before I got even a minute of play time.
It would be nice if one of Steam's widely used APIs (Steamworks?) included a way for a game to register when it is actually being played, as opposed to loading or setting up or sitting at a pause screen. I think this would help with the return window problem, and finally make the played hours count on our Steam profiles somewhat accurate.
Counter-anecdote: I've played a game where the developer included a bug that gave other players arbitrary code execution on my PC and left it online while fixing the bug. I've never launched it since and had owned it less than 48 hours. Steam rejected my refund.
I always used the "doesn't work on my system". Though, most of the games I've refunded were really not working on Linux the way I'd like and I just didn't want to hack around or have to reboot into Windows for that game.
> The "played for less than two hours" refund policy is more of a compromise than great, IMHO.
Don't forget the two weeks since purchase, which is especially nefarious as Steam banks on people buying many games through sales that they will only play much later.
I requested a refund of Cyberpunk 2077 after 3 hours (and the second time I refunded the same game - I still didn't like it) and I got it no questions asked.
If a game takes more then five minutes to become fun then return it. I've returned plenty of games with under five minutes of play time, because I don't have the patience to purchase boredom.
Two hours is far more than enough to determine if a game is for you.
There are entire genres where that makes no sense. It would be like returning a book because the first page didn't immediately grab you. Not everything should be designed for attention deficit teenagers.
In the early days of NetHack, spoilers were not so widely known (the web didn't exist yet) and save scumming was more difficult* (few people had admin access on systems that could run it) compared to now.
I wonder how many players today will resist those temptations now that they're not only trivial to discover and execute, but also widely accepted in gaming culture.
I urge new players to resist spoilers and cheats for as long as they can. This game is full of wonderful details and interactions that are not at all obvious, and they make it exceptionally rewarding to progress when you do so by discovering them on your own.
Of course, my recommended approach will mean dying a lot. If you keep a journal of things you do and notice in each play-through, your eulogy will be more useful. :)
Take heart: Starting over means you're likely to encounter new things in the levels you've seen before, so it won't be boring.
...
*I don't recall why the save files seemed elusive back then. Perhaps the system on which I played put them someplace obscure that I lacked either the motivation or the knowledge to find. Or perhaps they were kept out of reach of the player by unix permissions, requiring setuid for the game to read them. Either way, I'm glad, because the challenge and mystery of playing with only what the game provided made it all the more interesting.
Nethack is pretty punishingly difficult even with spoilers, so trying to go spoilerless is not for the faint of heart. The game does try to allow spoilerless play but I'm not sure it's tremendously well designed in that regard. So I understand the appeal but I think this is advice is only good for people who want a truly difficult challenge.
Nethack runs as a setgid process that hides save files from users.
Kind of old fashioned now that almost every Unix system is a single user system. There are still public servers for those that want the temptation to be taken away from them.
As to spoilers... Everybody reads the spoilers. I doubt anyone has ever ascended spoiler-free.
A friend once showed me a post on rec.games.roguelike.nethack where someone was finally begging for a hint because they'd gone deep in the dungeon and couldn't figure out anything to do next. They couldn't find any staircases down, though they had found a weird vibrating square, and none of the many weird items they'd collected seemed to do anything to help.
This is one of the things that makes a spoiler free run hard to imagine. I think the Oracle can tell you about the ritual but geez it would take you forever to figure this stuff out
There is a story of a purported very deep spoiler-free run [1]. The person made a journal of everything the Oracle had to say (over multiple games) and was able to figure out a lot on their own as well.
The ! command. If you run as SUID anything, and the UNIX you had, had a SUID bug, then the shell command SUID as root. Scary when you were running on a "secure" version of UNIX, and it had a SUID bug.
On DOS, the ! Command, gave you access to the levels files, for which you could make a closet level.
I always started a few rounds as every role, and watched the hilarity begin with the stupid ways to kill yourself, which after a few months, were always hillariously fun to read.
Nethack is best played completely spoiled with the wiki open at all times. You'll miss the amazing interactions and stuff otherwise, and it is still challenging either way. It was basically made to be played by source divers in the days before wiki diving.
Savescumming is also just explore/wizard mode with more steps.
Play as you like. Just saying I did read spoilers as a kid when I played it and I feel I did not lose anything. I learned a lot of English and after all these years Nethack is still the most memorable game I played.
Last time I played, after many close calls, I finally got my hands on the amulet. Knowing that the journey back to daylight was likely to be at least as dangerous as the way I had come, I took a breath, saved, and set the game aside.
That was about seventeen years ago. I still have the save file. Today's announcement got me excited about the prospect of finally finishing my game, until I saw this:
> Existing saved games and bones files will not work with NetHack 5.0.0.
Drat.
Thankfully, NetHack is not one of those modern, commercial, online-only games that make it difficult to run old versions.
NetHack 5.0 changes thousands and upon thousands of things from the previous release, 3.6.7, which was 3 years ago. 17 years ago is an eternity in this game’s history. The versions may not have gone up hardly at all in that time, but the fix logs are enormous.
Adding up the line counts of the fix logs for the 3.6.X releases with 5.0, I get a total of 6814 lines. That’s bug fixes only. There’s a similarly large number of gameplay changes!
All that is to say, migrating your old save file through all of those changes would’ve been a ton of extra work to support. I know Dungeon Crawl Stone Soup can migrate old save files but they have a very carefully designed system for sunsetting removed features in a way that old save files can still use them.
This is a rough history from an outsider: the original developers (“DevTeam”) went quiet, and would not take in new talent. There was some new talent in the community, and momentum for code tidy up and new features. One group forked and called theirs nethack 4. There were other forks with a similar spirit, such as unnethack. Eventually, DevTeam decided to reach an accommodation with talent in the fork groups. Release 5 is a DevTeam release with input from what was new blood fifteen years ago.
The story is a bit more convoluted. After the 3.4.3 release in 2003, the DevTeam stopped releasing new versions. They were still responsive when contacted by e-mail, though. But then we also didn't know how the development version looked like.
In 2014 the dev version was leaked to the community and in the following discussions with the DevTeam on how to handle this, the DevTeam got the first shoot of new devs in a while which lead to the release of 3.6.0 in 2015. This version was a polished version of the dev version, also incorporating some of the popular community patches at the time. The 3.6 branch received regular bugfix and security updates (3.6.7 was released in 2023).
Since 3.6.0 there's a mirror repository of NetHack on GitHub. So the development version that was internally numbered 3.7.0 which would become 5.0.0 was always accessible and, contrary to the 3.4.3 era, could be played anytime and was also installed on the public servers to play.
I also have a Dungeon Crawl: Stone Soup with my first 3 runes around somewhere.
I'm aware I will probably lose it, but I'm also anxious to touch it. Maybe I should just get myself some good coffee tomorrow and get over with it. Biggest learning of that save is also how careful and defensive you have to play if you want to consistently get further.
DCSS has also changed so much, it's hardly the same game anymore. It's maybe a better game in many ways, but it's not the game I spent time getting to know and getting good at.
Maybe an early example of "forever games" like Minecraft which just keep getting expanded forever and move ever further from the game you knew.
As I recall from my game of many, many years ago, I got the amulet to the surface and was greeted with, “Oops, that’s the fake amulet. Go back down.” I’m pretty sure that’s the last time I played it.
I've never understood why something being so old is an excuse to spoil. Many people weren't old enough to be alive when it was last a cultural icon and may not have heard about it until this thread.
I never said being old is an excuse to spoil. My comment was solely in response to OP's comment, which specifically mentioned the fact that this is a thread about Nethack 5.0.0. The fact that we are in a thread about Nethack 5.0.0 is not relevant to the particular spoiler at hand.
Meh, imo spoilers only spoil experiences for people who take media too seriously.
When I consider watching a movie, one of the first things I do is read a complete plot summary, including the ending. When I do this and no longer want to watch the movie, in my mind, that’s not a sign that any experience was spoiled, but rather that it just wasn’t very interesting to begin with.
Conversely, I have played Nethack on and off for decades, have read countless spoilers about it, yet still haven’t won and still find it interesting.
I play a lot of experimental games where not knowing what the plot is is the point of the game. Doki Doki Literature Club is one such game. The experience is the point, not the plot.
Many films are meant to be experienced, not just read or watched. Otherwise what's the point of a movie when you can just read a screen play? Or what's the point of a screen play when you can just read a synopsis?
2) If you want to avoid spoilers, you should probably avoid discussion threads about the subject, because people will often discuss their experiences in such threads
I agree Nethack is not one of those games. People always pretended it was, though. They called "spoilers" what would be called documentation in most games. No one didn't use them (the "unspoiled" win mentioned elsewhere in the thread was a stretch even if you take them at their word). It was supposed to be theoretically possible to find out core game features from e.g. random rumors, but that was completely hypothetical - I'm pretty sure at no point in Nethack's development was it ever playtested with new players.
Not just random rumours, there are multiple specific mechanisms built into the game that explain core features, which a curious player can stumble on and then deliberately mine for information.
NetHack in many ways has common heritage with text-based adventure games of the 1970s and 80s, such as Zork. NetHack’s in-game currency is even a reference to Zork! Solving Zork without spoilers is also extremely difficult, despite lacking the tactical combat of NetHack. However, playing Zork with spoilers completely ruins the game, whereas NetHack is still a lot of fun even for highly spoiled players.
1. It doesn't have to be for the experience of the plot to be important.
2. Fair point but with a game like nethack I'd say a majority of folks are interested in discussing the development of nethack without necessarily discussing the plot. HN has no concept of spoiler tags nor topiced threads so it's not really easy to contain the discussion per-thread.
Besides even if you don't care about spoilers, a lot of people do, regardless of your thoughts on how you personally like to experience media.
I actually tend to live a remarkably spoiler free life, but that's mostly by avoiding threads that would give spoilers on things I care about.
Like, it's fine to care about spoilers, you just can't expect a random community that doesn't even have the concept of spoiler tags to accommodate your desire. Doubly so since that desire is competing with the desire of others to discuss the topic.
I'm also not even sure where you'd draw the distinction with a game like NetHack - how do you discuss a change on how to acquire Excalibur without discussing how to acquire Excalibur, or spoiling that you can reliably acquire it?
I agree, you can't expect this community to hide spoilers about stuff. I have seen random spoilers in topics that weren't even about media (in classic HN fashion, random tangents start to talk about books or movies). Sometimes they would attempt to mark a spoiler by adding a bunch of lines of spoiler, then the reader could just collapse the comment thread.
That said, I haven't played enough nethack to even understand the spoilers so I'll probably forget about it. I'm primarily in this thread because because my dad introduced nethack to me when I was a kid, so seeing 5.0 is an incredible accomplishment and the meta discussion about it is fascinating.
I think that particular spoiler has been well known for many years, and knowing it would actually save a new player a huge waste of effort without any significant drawbacks.
I don't see anything suspicious, but I browse with scripts and ads blocked, so it's possible that you encountered something that never reached me. Thanks for the warning. Unfortunately, it's too late to edit my comment.
I added one to my single-board computer enclosure, following FTDI's wiring. Now I can easily connect whenever I need to use the serial console, and a standard 3.5mm audio extension cable will let me reach across the room without moving my main computer. Replacement parts, if I ever need them, are cheap and easy to find.
Here's the pinout:
https://www.ftdichip.com/Support/Documents/DataSheets/Cables...
reply