1. 2

    I feel like this article needs some examples of extreme macro abuse such as the Unix v7 Bourne shell source.

    1. 3

      The Living Computer Museum has a Unix v7 manual you can read.

      Also, if you really want to try out Unix on you can sign up for an account on their mainframe that runs v7.

      1. 4

        The living computer museum in Seattle is the best place to go in the city. By far my favorite place by a mile.

        1. 1

          I can second that, I could spend hours there just looking at stuff in the mainframe room they have in the museum. Once I was given a somewhat behind the scenes look at a VAX CPU that was being repaired. Super cool.

          1. 3

            For some reason, I can’t help myself, I always buy a raspberry pi at the shop. If you know if any groups who go there for fun, I would love to join.

        2. 3

          We have many more old Unix manuals, including v1, v8 and v10: http://man.cat-v.org. There’s also a blit emulator in 9front (requires v8 running in an emulator).

          1. 1

            Off-topic, but who is serving/maintaining cat-v.org? I know Uriel used to but don’t know how it got to the new maintainer(s) after he passed.

            1. 1

              sl.

        1. 4

          What’s the ‘Stories with similar links’ widget at the bottom of this page?

          1. 5
            1. 3

              There was a previously submitted story with a similar URL that was matched with this function.

            1. 1

              This made my day.

              Thanks.

              1. 1

                Mine too! I really wanted to use the cool Unicode mangled URL he had at the end of the blog post, but lobsters wouldn’t accept it as valid.

              1. 7

                VS Code has way to much telemetry built in for my liking. Also, there’s pretty much no way to turn it off completely either.

                1. 3

                  I can’t read that page. I see it as a purple background with a faint red texture on it. Does chrome on Android have a high contrast feature?

                  1. 4

                    Ugh, with JavaScript disabled it’s even worse. The text isn’t even readable.

                    1. 4

                      Luckily Firefox has Reader View (and similar for other browsers.)

                      I’m not against making things look pretty, but no default way to read simply plain text is just unforgivable.

                      1. 3

                        Thanks for the feedback, I’ll go through it with our web team to improve things in the future! It’s a shame for our authors if their content cannot be read.

                    2. 3

                      There’s some sort of scroll monitoring script that turns the background white, do you have javascript enabled?

                      1. 1

                        Thanks for replying! The second time I tried the site, it suddenly turned white and I could read it.

                    1. 6

                      Might build a game with C and SDL. Was thinking of building Asteroids, without using any sprites.

                      1. 2

                        Sounds cool, so just drawing lines right to a buffer yourself? I got a project in mind to draw right to the buffer as well, but not even using SDL, we’ll see how that goes.

                        1. 1

                          Yeah. I contemplated also just using OpenGL. Would you use a graphics library, or would you skip even that?

                          1. 3

                            No library, just writing to whatever buffer the system lets me (using Handmade Hero for some inspiration/reference just to see if I can and to keep it simple.) But may go to OpenGL when I get other things working so I could use graphics hardware if I can.

                            1. 3

                              Honestly when it comes to C I think going with a library is your best bet. Even SDL can be a bit bulky when it comes to game development. I’ve found that Allegro works great for game dev in C.

                              1. 1

                                I would say don’t use hardware acceleration, use only software rendering. First, you are doing asteroids, so, it’s 2D, it and can be made with small resolution, so rendering will be fast enough. Second, you can create many weird effects with software rendering, that would be a bit harder using hardware acceleration. And finally, software rendering is fun.

                          1. 1

                            What about “author:name search query”?

                            1. 5

                              Before reading the article I was expecting a mention of MML but, no dice.

                              1. 2

                                Woah, I just wrote a big ranty comment then clicked on MML. I don’t think I’d seen that in 25 years… and I didn’t really know what it was at the time. wow. thanks.

                              1. 3

                                Right now:

                                • The Count of Monte Cristo - Project Gutenberg is a great resource for classics.

                                Future reading:

                                • The Rust Programming Language - My local library had this one!
                                • Low-Level Programming by Igor Zhirkov - Bought this a while ago and still haven’t found the time to setup the development environment for it.
                                1. 1

                                  Does anyone know what broken.net used to be? Right now it’s oddly enough just a simple website with the word “hello” and nothing else.

                                  1. 1

                                    Maybe that’s the entire point. It’s a broken implementation of a web server.

                                    EDIT: well, after some sleuthing I’ve found that it runs on nginx/1.13.6

                                    1. 2

                                      But the server works fine, spits out a valid page, HTTP 200 and everything. It’s just that the page is nothing more than literally “hello” in plaintext (not even HTML).

                                      1. 4

                                        I assume that it’s so reliable that when it breaks, probably the network is broken.

                                  1. 1

                                    The syntax isn’t really anything like Python’s though. :(

                                    const array = SliceArray(1, 2, 3, 4);
                                    // Outputs: [2, 3]
                                    array[[1,-1]]
                                    
                                    1. 1

                                      It’s not literally the same, but it mirrors the syntax extremely closely. The example you list there would be array[1:-1] in Python, and with Slice it is array[[1,-1]]. Any slice that you could write in Python will work in exactly the same in Slice if you substitute the colons with commas and use double brackets. You can’t change the meaning of colons in JavaScript, so this is as close as a JavaScript library can get.

                                    1. 1

                                      Hah! Thanks for this review. I cracked up at a few points:

                                      In the preface of the second edition it says that the first edition was reviewed “by a professional C programmer hired by the publisher.” That programmer said it should not be published. That programmer was right, but the publisher went ahead and published it anyway.

                                      Also

                                      If you browse search results for other books by Traister you’ll find a lot of questionable sounding titles: Making money with your microcomputer (1982), Leaping from BASIC to C++ (1994), […] Cave Exploring (1983)

                                      😂

                                      1. 1

                                        Cave Exploring sounds like it could be harmful to your health. Given Traister’s reputation in C programming.

                                      1. 8

                                        Fascinating read with good, detect work, Sir! :)

                                        My worries kicked in when you said it was at over 200 libraries. If it sounds true and is horribly wrong, then I thought it could still be polluting peoples’ minds as they start programming. Maybe they’ll think they’re not smart enough as the examples don’t run. Maybe they’ll get past that with bad habits that lead to data corruption, crashes, and/or hacks. Maybe others will correct their bad practices.

                                        I don’t know but the book at libraries ain’t good. Made me think about sending out emails to those in bigger areas to ask that they throw the book in the trash. Maybe send a recommendation for a good book for newcomers, too. What’s the best one for that you think? In that hypothetical scenario, I’d also note that the language doesn’t change a whole lot over time like most IT stuff. So, whatever they buy they won’t have to replace every year. Lots of small libraries avoid computer books if they obsolete too much.

                                        1. 10

                                          Maybe they’ll think they’re not smart enough as the examples don’t run.

                                          I couldn’t shake that thought the whole time I was reading it and it’s why I really detest sloppy tech books.

                                          As for the books in the library, I’m thinking of finding the copies (1st and 2nd edition!) in my alma mater’s library and at least leaving a warning note in them.

                                          1. 1

                                            Good idea. I might at least do a few on the list. Again, what’s the current, best recommendation for a beginner book in your mind in case they ask about one?

                                            1. 5

                                              Truthfully, I don’t know a good C book for beginners. I have not looked at such books in a long time. I learned from K&R, but I was also learning it in university from different books at the time. None of them stand out in my mind. (I don’t think K&R is a great fit for beginners, especially with modern C.)

                                              If anyone has suggestions, please feel free to comment.

                                              1. 4

                                                There is 21st century C, though it assumes some general programming experience.

                                                There is also Head First C, though I have no direct experience with it, as I read through the C# book in the same series, rather than the C book. I recall learning a lot from the book Head First C#, so that gives me some hope for Head First C.

                                                To be fair, I don’t know that C is a very good first programming language these days, unless you’re starting in a domain that doesn’t require working with care around allocations, or unless you have someone helping you learn.

                                                1. 4

                                                  To be fair, I don’t know that C is a very good first programming language these days

                                                  I hope most of us agree on that by now. :) I always encourage them to learn something like Python first just to get into the mental habits of breaking problems down, implementing solutions precisely, and debugging others’ code. That’s hard enough by itself to learn without the low-level stuff in there. Once comfortable with that, then learn the low-level stuff with a book on something like C language.

                                                  I guess I’m looking for best intro(s) to C to recommend for someone with some programming experience in a high-level language.

                                                  1. 3

                                                    21st Century C seemed like a decent introduction to C, and takes exactly that angle. It doesn’t have the abrasiveness of Learn C the Hard way, and starts out explaining the C environment so that you aren’t left ignorant of how to work with makefiles and the like.

                                                    It does recommend autotools, however.

                                                    1. 4

                                                      While it’s a great book, I see it more as a ‘refresher’ than an intro text to a novice. Would still recommend K&R 2nd ed. for essentials, followed by this to get up to date practices.

                                            2. 4

                                              My worries kicked in when you said it was at over 200 libraries. If it sounds true and is horribly wrong, then I thought it could still be polluting peoples’ minds as they start programming. Maybe they’ll think they’re not smart enough as the examples don’t run. Maybe they’ll get past that with bad habits that lead to data corruption, crashes, and/or hacks. Maybe others will correct their bad practices.

                                              The same is true for multiple other wrong books and other texts. Best to avoid anything by Herb Schildt, Yashwant Kanetkar, Zed Shaw, Richard Reese, many tutorials like Beej’s guide to C, etc.

                                              What’s the best one for that you think?

                                              K&R 2nd ed. was definitely the best 20 years ago. Now I don’t know, but perhaps “C How to Program” by Harvey Deitel and Paul Deitel or “C Programming: A Modern Approach” by Kim King. And of course “C: A Reference Manual” by Harbison and Steele for reference. Also books written by Richard Stevens for UNIX programming.

                                              1. 2

                                                Why exactly would you say Beej’s guide to C isn’t a good tutorial?

                                                1. 3

                                                  I’d actually like an explanation for all of those—assuming of course, that they aren’t all making the exact same mistake, which seems highly unlikely. I was under the impression that Zed Shaw, albeit controversial, wrote good introductory material.

                                                  1. 2

                                                    I don’t have the time to review them again. Now I think that I should write reviews them once and for all and then share every time they come up in a discussion. Like Ed’s thoughts on “Learn C The Hard Way”.

                                            1. 2

                                              Already got a solid desktop feed reader, but I’ll keep an eye on this for my wife’s sake. She’s always griping about how there’s never any decent news on her phone, but won’t consider using a feed reader. It might be worthwhile to borrow her phone while she’s sleeping, install the Android app once you have one available, and set up some feeds that aren’t full of clickbait.

                                              1. 1

                                                How well do you like Newsboat? Would you recommend it over Thunderbird as a feed reader?

                                                1. 3

                                                  I’ve been using Newsboat and the now-defunct Newbeuter that it forked from for about ten years. Back when I was posting a dozen stories a day on Lobsters, the majority came from tracking 400+ feeds. Coming from vim and mutt it feels very comfortable. I like that it has near-instant response to keystrokes and no images, I can very quickly skim through hundreds of posts for the handful that are interesting.

                                                  It does, unfortunately, have two bugs. One is a crash I’ve seen a few times about a corrupt doubly-linked list, the other is a recent annoyance with custom keys that I’ve just reported, so thanks for that reminder.

                                                  If it helps any, here’s my current config:

                                                  # no automatic reloading
                                                  refresh-on-startup no
                                                  auto-reload no
                                                  reload-time 360 # minutes
                                                  
                                                  # reloading
                                                  reload-threads 8
                                                  reload-only-visible-feeds no
                                                  show-read-feeds no
                                                  download-retries 4
                                                  
                                                  # notification
                                                  notify-screen yes
                                                  notify-xterm yes
                                                  
                                                  # storage
                                                  max-items 5000
                                                  
                                                  # display
                                                  article-sort-order date-desc
                                                  feedlist-format "%S%n %11u %t"
                                                  articlelist-format "%D %f %?T?;%-17T; ?%t"
                                                  datetime-format %m-%d
                                                  color background white black
                                                  color listnormal white black
                                                  color listfocus black white
                                                  color info black white
                                                  color article white black
                                                  
                                                  # interface
                                                  confirm-exit yes
                                                  bind-key k up
                                                  bind-key j down
                                                  unbind-key o
                                                  bind-key o open-in-browser-and-mark-read
                                                  bind-key O open-in-browser
                                                  bind-key a open-all-unread-in-browser-and-mark-read
                                                  
                                                  1. 2

                                                    I’ve never used Thunderbird as a feed reader. I don’t even use it for mail; when I want a graphical mail client I use Claws Mail. :)

                                                    1. 2

                                                      I was using Claws, too. Seemed faster, too.

                                                      1. 1

                                                        You should really try it sometime. It works great for all my needs as a windows user.

                                                        1. 1

                                                          Thanks, but I have a setup that works for me and I’m not inclined to tamper with it.

                                                        2. 1

                                                          I’ve used claws before but, I really like Thunderbird right now because it also integrates nicely with Firefox.

                                                    1. 23

                                                      I believe we are beginning to see the downfall of YouTube as we know it. They are really going way and beyond to ruin their own platform/reputation.

                                                      1. 8

                                                        That has been happening for couple years now. All the content that made youtube popular are nowadays shunned and banned by recommendation algos. In short, if it cannot be monetized by US linear TV standards, it cannot be found in search or recommendations. So unless you already have several hundred thousand followers (and ads enabled), your content is family friendly and you have used thousands of dollars worth of equipment there are no new viewers.

                                                        This did hit people filming motorcycle related videos pretty hard, as apparently that is very media unsexy content in US. Which happens to most of my youtube subscriptions, from most I watch every video they produce. And my youtube “home”/“recommended” section is full of everything that is not related in any way to my most watched stuff.

                                                        1. 7

                                                          yes. This is the straw that breaks the camels back. The blocking of help videos of a 3D modeller is going to be the downfall of YouTube. Unable to learn how to use their 3D modelling software, the masses will wander off to different venues in droves.

                                                          /s

                                                          (without snark: nobody outside of our little circle here cares about this. Not the advertisers, not youtube, not the general audience, not the press. The is entirely inconsequential to youtube’s future)

                                                          1. 4

                                                            You might compare it to gentrification. You cater to the middle ground, the cool stuff around the edges is pushed out, the really creative people abandon the platform, you’re left with the most generic content. Blender is just the latest victim of a broad trend.

                                                            Most people may not “care” about Blender specifically, but they should care about an opaque platform that caters to the IP needs of multinationals in overly broad ways and incentivizes some really messed up behavior.

                                                          2. 4

                                                            It will be awesome to see what the video hosting landscape will be like when PeerTube reaches its height of popularity!

                                                            1. 3

                                                              I was checking peertube yesterday and it’s a huge change from youtube user experience. A lot more involved, and a lot less intuitive. I have hard time imagining mass adoption with what I saw. Are there any good beginner friendly tutorials/intros to peertube out there?

                                                              1. 3

                                                                Take a look at https://d.tube/ too. It’s much closer to the youtube experience.

                                                                1. 1

                                                                  You can always checkout this I guess: https://joinpeertube.org/en/#how-it-works

                                                            1. 22

                                                              just hope you don’t have to do any string manipulation :)

                                                              1. 13

                                                                This. I have a good amount of experience writing C code and maintaining larger C applications, and C can be a real pain to deal with. Not to mention that it exposes a whole host of nasty security vulnerabilities. Finally, it seems a bit too low-level for these kinds of applications. I’m very confused by the choice of C here.

                                                                1. 3

                                                                  I’m guessing it’s because C is the main API for SQLite? I do I agree that C is an interesting choice here, maybe something more like Lua?

                                                                2. 4

                                                                  I agree. Writing secure C is hard. Sure, you can pledge your way out of it, but that doesn’t help if sensitive data is stolen. But what would be a reasonable alternative? Rust is probably too complex a language for the taste of OpenBSDers. Go?

                                                                  1. 2

                                                                    you can pledge your way out of it,

                                                                    You can’t. Their kernel and firmware still processes network-facing data. It might still do damage. How much is an unknown until the setup gets the kind of rigorous pentesting we see on Windows, Chrome, the SFI schemes, and recently x86 CPU’s. It does have a nice security by obscurity benefit on top of methods that provably increase work for attackers.

                                                                  2. 1

                                                                    There’s no string manipulation in HTTP servers, right?

                                                                    Right?

                                                                  1. 2

                                                                    This looks like a really interesting project! If I ever find an old android device lying around I think I’ll end up rooting it and installing this just to see what it’s like. The i3 WM part is going to be pretty cool to try out on a touch device.

                                                                    1. 2

                                                                      It happens to work on various models of Raspberry Pi, too. Though, yes, using it on a phone is probably the right way to try it out.

                                                                    1. 3

                                                                      This is great! I think I’ll definitely be using this in the future as an alternative to the CLI.

                                                                      1. 2

                                                                        This seems very relevant to the thread posted just the other day: https://lobste.rs/s/cpbngl/remote_data_access_is_hard_need_lobste_rs , which is asking for essentially a solution to the same problem, >15yrs later!

                                                                        I wonder if those modems still exist!

                                                                        1. 2

                                                                          Your local second-hand store is probably the best place to begin searching for a modem! I know mine is for sure.