1. 4

    Moving! New flat, new cat, and a place to practice woodworking at home. Can’t wait!

    1. 6

      Does anyone know of any good resources to undertake the creation of a custom chip? I’ve dabbled in FPGAs and VHDL before but don’t really understand how you go from that to a custom buildable chip.

      1. 2

        Same here. I would like to replicate the function of some old 80s custom chips, but I’m not sure where to start other than “VHDL.” It seems like the OpenROAD project is named as a major EDA component of this initiative, but I’m also unclear on how I’d use it.

        Lots of reading ahead!

      1. 21

        Hi, this is my crazy Linux OS project. I wasn’t really prepared for this to be shared today, so documentation is a bit lacking. I’m happy to answer any questions.

        I just updated the screenshot on the wiki, now featuring the oasis netsurf frontend. I also added a script to build QEMU images using builds.sr.ht. The latest one is available here: https://patchouli.sr.ht/builds.sr.ht/artifacts/~mcf/226248/1b6626238a895943/oasis-qemu.tar.xz

        If you want to try it out, just extract the tarball and run ./run (graphics mode) or ./run -s (serial mode). More information can be found in README.md alongside the image (including how to rebuild from source), which is also available in the home directories inside the image.

        1. 6

          Has any thought been placed on the security downsides of using static linking? Since Linux doesn’t support static PIE binaries, ASLR is made ineffectual with statically-compiled applications.

          1. 10

            Linux doesn’t support static PIE binaries

            musl and gcc fully support static PIE. If you have a toolchain that supports it, you just need to put -fPIE in your CFLAGS and -static-pie in your LDFLAGS.

            This used to be the default actually, but I just changed it in case someone might try to build with a toolchain from musl.cc, which does not build libc.a with -fPIE so it can’t be linked into a static PIE.

            1. 1

              Awesome! I didn’t know musl supported static PIE. I haven’t really paid much attention to musl (and if I’m being honest, Linux in general.)

          2. 5

            I’m really a big fan of what you have done, everything fits together in such a tidy way, thanks so much!

            1. 1

              I thought it was neat to see both your projects on the same day because they solve some similar problems in different ways. Both are really neat.

              1. 1

                This one isn’t my project, but I agree it solves similar problems in a more idealistic way.

                1. 2

                  That was ambiguous. I meant both your as in you and the other person.

            2. 3

              Looks neat. As I understand it, your model is closer to a firmware image than a traditional Linux distro (i.e. you build a set of components you want and install them as an atomic set). I can see that being really useful for cloud / server deployments.

              Are you using anything like crunchgen to get some of the benefits of dynamic linking in your programs, or do they all carry copies of the same libraries? I’d love to see a system that generated a single binary for all of the programs in the image, did dead-code elimination and link-time optimisation across the entire thing.

              (Totally unrelated, but I’m oddly pleased by all of the things using NetSurf suddenly. I remember using it on RiscOS back when AltaVista was an exciting new competitor to Yahoo! and Lycos)

              1. 3

                Thanks! Yeah, that seems like a fair comparison. The idea for that stemmed from dissatisfaction with how typical Linux distributions split up source packages into several binary packages (if they even do that at all). With this approach, you select the contents based on whatever criteria you want. Anything that doesn’t get selected doesn’t even get built. Due to the use of static linking, you don’t really have to worry about runtime dependencies. This gives you a lot of control depending on your use case. For example, on my VPS, I use something like

                fs = {
                	-- I need development files from these libraries to rebuild the kernel
                	{'linux-headers', 'musl', 'ncurses', 'elftoolchain', 'libressl', 'zlib'},
                	-- I want the st terminfo file, but I don't need st itself
                	{'st', include={'^share/terminfo/'}},
                	{
                		sets.core, sets.extra,
                		'acme-client', 'dnssec-rr', 'make', 'nginx', 'nsd', 'pounce',
                		exclude={'^include/', 'lib/.*%.a$'},
                	},
                }
                

                On my desktop, I use fs = {exclude={}}, which builds every package, excluding nothing.

                I’m not using anything like crunchgen, so everything carries a copy of everything it links to. However, due to the use of lightweight packages, most binaries are really small anyway. Only a few packages such as mpv or mupdf which link in a lot of libraries have huge binaries (and by huge I still mean < 10M).

                Yes, I’m a big fan of NetSurf. It’s quite a capable browser considering their resources. Unfortunately, more and more sites require the monstrosity that is the modern web browser, so I installed firefox via pkgsrc for those.

                1. 1

                  on my VPS

                  How do you install your custom image on your VPS? I ask because most VPS providers give you a selection of OS images (built with varying levels of care) that you have to start with.

                  1. 4

                    I started with a Debian image and used that to install oasis on a separate partition. Then I used a rescue image to move/expand oasis to fill the whole drive. I don’t remember the exact procedure I used, it was a few years ago.

                    1. 2

                      Several providers allow you to upload an ISO, Vultr for example, AWS also allows it I think

                      1. 1

                        On top of supporting providers, there’s tricks to get OS’s onto VMs of unsupporting providers. I’ll be even more impressed when I see someone get something running with an unsupported ISA. I already have an idea about how that might happen.

                  2. 1

                    Velox seems to be a window manager, not a display server, unless there’s something I missed?

                    Forgive me, I misread the description.

                  1. 13

                    I really dislike that the base protocol is all written in javascript. I know this a volunteer project, but it’s clearly aiming at becoming a basis for the decentralized internet of the future and not just a personal project. Right now starting a dat/hypercore project in another language is a lot harder than it should be, and that will imo kill the project.

                    1. 13

                      This Rust implementation looks like it is under active development: https://github.com/Frando/hypercore-protocol-rs

                      I encourage people who don’t like Javascript to chip in there, or get something going in their preferred language. The more implementations, the merrier!

                      1. 2

                        A lot of activity is also happening on https://github.com/datrs/ – after I stepped away from the project in 2019 activity quieted down for a while. But recently things have picked up again thanks to Frando & Bruno.

                        In January a milestone was achieved: datrs running on an Android phone talking to the JS impl on Windows. This is really exciting and the project is in very capable hands!

                        1. 1

                          Is the protocol fairly stable nowadays? Or is it changing/evolving? How hard is it to keep up with upstream?

                    1. 3

                      Continue working on my programmable RTS game (think age of empires with programmable units and buildings). Started a low-volume (1 email every 2-3 weeks) newsletter about it this last weekend to help me with motivation.

                      1. 2

                        Very nice!

                        For a project I’m developing (a programmable RTS game), I am writing a VM and this may actually come in handy, performance will be very important so I may end up writing some really low level code there. (I know there is no need for this probably, but I really love getting really close to the CPU, I’m fascinated by KolibriOS for example)

                        1. 1

                          Here’s what tree -dL 1 looks like at $HOME

                          .
                          ├── downloads
                          ├── bin    // local bin folder
                          ├── books  // pdfs, ebooks, docs
                          ├── build  // Build folder for external projects
                          ├── docs   // Documents
                          ├── music
                          ├── org    // personal org files
                          ├── proj   // personal code projects
                          

                          It’s actually a lot less clean than this, but this is what it’s supposed to look like (plus $WORK folder which I keep separate from proj)

                          1. 1

                            I’d expand this with two additions and a minor fix:

                            • use poetry to do dependency management and handle virtual environments

                              This allows you to freeze dependencies with a lock file, and it simplifies the virtualenv flow a lot. This could be a way faster solution than using a docker container during development. Poetry also allows you to specify development-only dependencies like pytest and Coverage

                            • use pdoc3 to automatically generate documentation. Could be made available as two make targets:

                              • html - Generates the documentation and writes it to disk. This could also be run with github actions
                              • live - Runs a local server which automatically refreshes the documentation in your browser while you work
                            • Make the targets in the Makefile into .PHONY targets

                            1. 15

                              As the original author of pdoc, please reconsider using pdoc3, which is a hostile fork with subtle swastikas embedded in their homepage.

                              1. 3

                                Wow. That’s awful. I’m sorry they did that to you.

                                1. 1

                                  Wow, that’s messed up. That guy’s avatar is a swastika too. His stupid answer about it being a ‘misunderstanding’ is so typical of that kind of edge lord type, he’s clearly an asshole. Is there a way to report Github accounts?

                                  1. 1

                                    There is a link to block or report a user from that user’s profile page on Github. Regarding this particular user however the icon when viewed in larger sizes seems to be a detail of a pattern (repeated in miniature) so that there’s probably enough interpretive wiggle room for either GH or the user to argue it’s not “actually” a swastika.

                                    1. 2

                                      Yeah, but combine that with BurntSushi’s issue, and you start seeing an obvious pattern (pun not intended) of behavior.

                                  2. 1

                                    Wow, that sucks dude. I simply assumed the fork happened due to inactivity of pdoc. Attempting to remove pdoc from the python wiki, the change of license, his response to #87 clearly shows you he is not acting in good faith.

                                    My initial reaction to the use of the swastika was to think of it in the original religious context. His defense of it seemed kinda respectful even (#193, #64). I asked my family about it and they immediately called bullshit. This led me to discover his response to #87, the fact that #1675 ever happened, and the fact that he most likely is from Slovenia and therefore most likely not a hindu nor buddhist himself. I now no longer believe his use of the swastika is defendable at all.

                                    1. 4

                                      Yes. These are exactly the kind of tactics used by these people. If you’re curious, you can learn more by reading their playbook: https://m.huffpost.com/us/entry/us_5a2ece19e4b0ce3b344492f2

                                    2. 0

                                      I understand some of the complaints, I understand the whole relicensing and stealing the project must suck for you and I’m sorry for that, absolutely not defending that part. But I think the whole swastika thing has been blown out of proportion. Don’t get me wrong, it’s a symbol that right now, at least in the west, carries a negative connotation, and you’re completely in your right to want to avoid being associated with it, but it’s a really old symbol1 used for a very long time with a completely different meaning and still used with than meaning in asia. I think it’s unfair to criticise that part.

                                      1. 4

                                        I know the history. I stand by my criticism. I think it’s pretty plain that this person is acting in bad faith.

                                        1. 0

                                          Yes I agree that he is probably acting in bad faith. But I don’t think the swastikas are part of the bad faith. Wanted to make sure to give some context for the swastika symbol as the other subthread was talking about reporting him specifically because he has a swastika as his profile picture and focusing on that.

                                          1. 4

                                            But I don’t think the swastikas are part of the bad faith.

                                            I do. The very fact that we are debating this is exactly the point. If this person were genuine, it would be crystal clear.

                                            1. 1

                                              To add one more data point, the project website’s footer has the swastikas too, and let’s just say I do not think the choice of juxtaposed quote is coincidental.

                                              Fucking sucks to have your project hijacked by the worst kind of people imaginable, my condolences :(

                                              1. 0

                                                Ew. (I agree they are, and also offer condolences.) I’m feeling a little bit thick as regards the quote, though. What’s wrong with it? Was Yourdon some kind of nazi-adjacent scumbag?

                                                1. 3

                                                  AFAIK nothing wrong with Yourdon, and I imagine the quote was innocent enough in its original context and time. It’s just that here in 2020 (as an American, but I imagine this is true for lots of European readers as well) I associate certain connotations with the word “undocumented,” i.e. undocumented immigrants.

                                                  It fits into this guy’s general pattern of lamely attempted plausible deniability, but particularly given everything else, appropriating a quote that just happens to call an “undocumented” thing “despicable” right next to those swastikas sets off major alarm bells for me.

                                                  1. 1

                                                    That seems entirely likely. My brain just didn’t draw that line. Thanks for explaining.

                                  1. 2

                                    I’ve mostly used Arch these past few years without any issue. My desktop right now has NixOS though

                                    1. 3

                                      Working from home, travelling to see the family for the week (and more if we get further lockdowns), but most interestingly, I’ll be rewriting an existing Vue.js frontend to Svelte (https://svelte.dev), which is making my all giddy just thinking about it

                                      1. 1

                                        When I’ve done frontend in these past few years I’ve mostly used React, what does svelte bring to the table?

                                        1. 2

                                          Small bundle sizes due to Svelte being a compiler instead of only a library, but what I like most is that the code you write actually looks reasonable, and doesn’t look like you’re frantically trying to work around JavaScript’s shortcomings. Check out this login form for example — it’s fully reactive: https://marisa.cloud/aun/tome-svelte/src/branch/master/src/pages/Login.svelte

                                          1. 1

                                            ++ on the small bundle sizes, and when paired with rollup it’s definitely been a space savings for us. I’m really looking forward to it getting official Typescript support.

                                      1. 12

                                        The “quarantine” here in Barcelona, Spain has actually been kind of good for me, doing lots of things I didn’t have time for before. Hope I can create a routine so I can continue doing it after all of this ends.

                                        Personal

                                        • Have started doing exercise three times a day and meditating twice a day.
                                        • Have started playing the mandolin.
                                        • Studying Japanese.
                                        • Start work on my blog.
                                        • Maybe continue learning 3D modeling with Blender.
                                        • Understanding more of NixOS.

                                        Work

                                        • Nothing very interesting, working on a project that should be finished in two weeks.
                                        1. 1

                                          It’s sad that it took a pandemic to bring this about but both my wife and I are very much enjoying the imposed 100% WFH time.

                                          Amazing what you can do when you get back 2+ hours a day of not commuting.

                                        1. 3

                                          Have a “Calçotada” (Catalan Onion Festival) with some friends from school. Keep learning Vulkan for a project I’m working on.

                                          1. 1

                                            Last week I bought an iPhone Xr after 5 years with a One Plus 2. Five years ago I trusted Google more than Apple, that’s no longer the case, and if I don’t want any headache with things not working and I don’t want Google Apple is the only real alternative these days.

                                            1. 1

                                              Home Battlestation (terrible picture, sorry hahaha)

                                              • Ryzen 3900X and GTX 2070S, 32GB RAM
                                              • After a long time with 3 screens I downgraded to 2 and then 1. I feel like it helps me focus a lot more.
                                              • NIU40 ortho keyboard with Aqua Zilents 62g with a custom layout, keycaps are stolen from a filco majestouch while waiting for my SA Granite set
                                              • Also shown, my work laptop, a dell XPS 13”
                                              • Music setup: Arturia Minilab mkII, KRK RoKit 5 monitors, audio technica LP120XUSB turntable
                                              • Some electronics lab equipment, Rigol DS1054, hakko soldering iron, a generic power supply

                                              This desktop has double boot with Windows (playing, music prod) and NixOS. The screenshot is not from this desktop as I’ve recently set it up and it isn’t still the way I want it, the end goal is more like the setup at my work laptop:

                                              • i3 with custom keybinds (closer to home row)
                                              • emacs with evil mode (love vim, but hate vimscript)
                                              • fish shell in Kitty terminal
                                              1. 4

                                                5 days old account, with three (pretty basic and devoid of content) posts pointing to the same commercial domain, and an invite to the founder of that company. Please don’t use lobste.rs for advertising, we do NOT like this. Either participate in the community or get out.

                                                1. 2

                                                  Joined! Really excited about this year!

                                                  1. 10

                                                    https://barcelona.rustfest.eu

                                                    RustFest number 6 \o/

                                                    1. 1

                                                      Ah shit, and it’s in my city. How did I miss this?

                                                      1. 1

                                                        You might be able to get a leftover ticket or at least drop by the impl days on Monday.

                                                    1. 2

                                                      Starting my new job on Monday, so getting ready for that. Relaxing, selling some things I don’t need (double-neck guitar, why did I ever buy you?) and Japanese learning. I also may program a bit to help a friend with some reverse engineering.

                                                      1. 1

                                                        Meh, doesn’t work on Firefox 68. What browser requirements does it have?

                                                        1. 2

                                                          Works great on Firefox 70.

                                                          1. 2

                                                            This is WebGL so most incompatibilities are due to drivers. What’s your setup?

                                                            1. 1

                                                              OK, found something: It worked when I shrunk my window slightly! (Which I only discovered by trying a different browser profile.) If my window is wide enough for the canvas element to be 1463 pixels wide, I get a black screen; at 1462 and smaller, it works.

                                                              In fact, it seems to break at certain aspect ratios; if I have the window at 1462 width and 731 height (internal dimensions), it works, but shrinking the window vertically breaks it! That’s exactly a ratio of 2.

                                                              So I guess the browser requirement in effect is: Don’t make your viewport more than twice as wide as it is tall. >_>

                                                              1. 2

                                                                Weird, no matter how I resize it works fine for me. Firefox Nightly 72.0a1, latest nvidia drivers. Is anything outputed to the console?

                                                                1. 1

                                                                  If I start the window square, it works, and the only console output is Google Analytics having been blocked. If I then start shrinking the window vertically, when it reaches an aspect ratio of 2 I get a screenful of these in various combinations:

                                                                  Error: WebGL warning: texImage2D: Requested size at this level is unsupported. script.js:566:8
                                                                  Error: WebGL warning: clear: Framebuffer not complete. (status: 0x8cd6) COLOR_ATTACHMENT0Attachment has no width or height. script.js:572:8
                                                                  Error: WebGL warning: clear: Framebuffer must be complete. script.js:572:8
                                                                  Error: WebGL warning: drawElements: Framebuffer not complete. (status: 0x8cd6) COLOR_ATTACHMENT0Attachment has no width or height. script.js:461:12
                                                                  Error: WebGL warning: drawElements: Framebuffer must be complete. script.js:461:12
                                                                  
                                                                  1. 2

                                                                    Yeah, it looks like a driver problem. It tries to complete the buffer with a texImage2D that isn’t supported by your driver/opengl setup. Or maybe it’s falling back to WebGL1 but then using features that are unavailable to WebGL1.

                                                            2. 1

                                                              Works on vimb 3.5.0 (after :set webgl=true)

                                                            1. 13

                                                              Next monday I start at my new job, and in a month I take the JLPT N5 (Japanese Language Proficiency Test), started studying a month and a half ago and it’s been an amazing experience. I’ll spend most of my time studying japanese this week before I am too busy with my new job.

                                                              1. 5

                                                                That’s awesome! I recently started studying, with a dream to get to N1 before I die…

                                                                What is your study plan?

                                                                1. 5

                                                                  I’m using JLTP more as a motivation than a goal, my objective is to be able to go to Japan and be able to have a normal conversation with just about everyone.

                                                                  Right now what I’m doing is vocabulary and kanji learning in the morning and grammar in the afternoon. I have a teacher at preply.com (really recommended), will not disclose the teacher here but if you are interested I can send it to you in a PM. She teaches me grammar basics and we have conversation practice. Then I got the “Dictionary of basic japanese grammar” and some other books and I deep dive into grammar topics myself in the afternoons while reading japanese texts, practicing writing and listening to japanese radio/tv.