1. 6

    Looking to convert my static site from Hugo to Zola

    1. 5

      What’s next, Verne?

      ;)

      1. 1

        what does that even mean

        1. 2

          Hugo, Zola, and Verne are literary figures

          1. 1

            French literary figures, at that. It shames me that Verne was the only one I could remember off the top of my head, but I see him as a spiritual successor to Hugo at least.

      2. 2

        I’d like to throw in Pelican in to the ring as well! I’ve tried pretty much every status site generator and for many reasons Pelican is still the best.

        1. 1

          I think I will try that, as I already found a problem with Zola

          https://github.com/getzola/zola/issues/925

        2. 1

          Zola looks very neat. I wonder what a conversion from Jekyll->Zola would look like for my site.

          1. 1

            Curious to hear how this goes. From a cursory glance, it looks like Hugo and Zola are fairly similar

            1. 1

              I was considering this as well, but I actually ended up on eleventy, and I’m really happy with it. Specifically, it feels customizable in ways that neither Hugo nor Zola are. Might be worth a look!

              1. 1

                I dont use any JavaScript software. Personally I feel that JavaScript isnt appropriate for applications outside the browser.

            1. 4

              I agree with basically everything in these slides, and have seen or experienced first hand a lot of what he mentions. I do have a question, though.

              Let’s say you have an experiment that generates a large amount of data, say 50GB. Where do you put that so that it’s freely available? It doesn’t seem like putting it in git along with the code is a good solution. I’m also not going to throw it on my personal Dropbox and host it for the rest of eternity.

              A quick search reveals that my university provides a Dropbox-like service, but it appears that you need some kind of permissions for access i.e. a random stranger can’t access the data without wading through the BS of getting access. (Note: I’m not saying that you shouldn’t be able to have private data, just that lots of research data has no reason to be private and there should be an easily accessible depot of this data).

              On top of that, I’ve never heard of this service that my university provides. I suspect that a top-down effort from the university would make a big difference here e.g. all data used for publications, theses, etc must be uploaded to a university-run research data storage depot. I also suspect that more people would use these open-data services if the university actually advertised them.

              Now, time for an anecdote to drive home the point of the slides.

              I do experiments that measure that coordinate several pieces of equipment. At one point I was starting on a new experiment, picking up where someone else had left off years ago. I got the experiment back up and running to the point where I could collect data, but I noticed that the data looked wrong (the decay I was measuring had a lifetime larger than expected). I discovered that someone had missed a factor of 2 in the program that runs the experiment. In a moment of panic I started to wonder whether our group had published data based on this program. It turns out this particular experiment/program was never used (the lead on it had graduated before using it), so the crisis was averted in this case.

              1. 1

                bittorrent would be pretty okay…

                1. 4

                  Hm I wonder what the seeding rate would be here. I imagine in most cases there’s less than one concurrent downloader, and if they don’t seed, it reduces to hosting it on a web server.

                  1. 1

                    http://academictorrents.com/ is something I’ve used in the past when I’ve had a need, but strictly speaking I’m not an academic - and it does kind of depend on hitting a critical mass of people willing to seed.

                  2. 1

                    This is what Dat aims to solve, but yes bittorrent is also nice.

                  1. 3

                    Biology field uses Java a lot, specifically ImageJ and Fiji.

                    1. 2

                      I teach a physics lab that uses ImageJ/Fiji :) The students use it to measure the positions of silica beads in different solutions to determine the diffusion constant of the beads in those solutions.

                    1. 2

                      You could pace schedules. You could ensure that no one works more than eight hours a day. You could let people off 20 minutes early to avoid rush hour. You could make it as easy as possible for parents to take the day off when their kids are sick. You could make people feel like they’re important, because people are important.

                      My employer is very good with this. We suck with methods and tools though. Software is still crappy. This year the CEO withheld the “software quality award” to make that clear.

                      1. 2

                        Nothing says “we value you work and recognize that you’re doing your best” quite like being scolded by the CEO…

                        1. 5

                          It’s the year of BSD in the Browser

                          1. 3

                            This comes up in every WASM thread, but confuses me massively. pledge is useful and good, but it is nothing like WASM.

                            1. 1

                              Yeah, it wasn’t a particularly insightful comment as I couldn’t quite articulate why this didn’t sit right with me. I’ll give myself more percolation time in the future.

                              1. 3

                                It’s okay, others have posted that before. I think pledge + WASM would be great, with pledge providing the process-level sandbox, enforced by the kernel and WASM the fine grained sandboxes.

                          1. 5

                            An interesting topic to research, but a shame they botched the statistics (and benchmarking in general). These results are not believable.

                            For information on system calls see: POSIX Abstractions in Modern Operating Systems

                            The issue of hardware variability was not covered: http://shape-of-code.coding-guidelines.com/2015/02/24/hardware-variability-may-be-greater-than-algorithmic-improvement/

                            and there are lots of OS specific variability issues; they should have at least rebooted multiple times and rerun the benchmark.

                            As for picking the top 5 out of 10,000 measurements. Shoot that man!

                            1. 1

                              Thank you for this. I saw this link on another site and only skimmed it so I was kind of baffled that the (claimed) results could be the case.

                            1. 3

                              So if I’m understanding it correctly, the idea is that they want to prevent certain (future) employees from handling sensitive customer data because the countries they live in (Russia, China) have a history of pressuring their citizens into committing espionage?

                              Again, if I’m understanding correctly, the other side is saying that they’ve more or less arbitrarily singled out these two countries?

                              1. 8

                                That’s how I understand it.

                                General comment: this isn’t off-topic for “practices,” please stop downvoting. This is something we should really discuss, from the decision itself to the gitlab decision to have a public thread to announce and discuss this. Based on the thread it looks like a lot of internal people were blindsided by this (including Candice, who someone above said was Director of Compliance?!) so presumably it’s very much an executive-level thing.

                                This is wild.

                              1. 16

                                I’m using zola, and I think it’s brilliant!

                                Ticks the boxes for all your desires. It’s fast, contained in a single binary, has a live updating local server, documentation is good and allows extra custom configuration properties for custom things in themes.

                                My personal website is built using Zola, here’s it’s source.

                                1. 3

                                  I think this is the one! Thanks!

                                  1. 3

                                    I’ve been testing zola right now, in particular the sam theme, against a lot of website analyzers (accessibility, performance, w3c validators, ecological impact,..) and it’s pretty good, I think I’m gonna start using it, it looks simple and mature while providing all the features I wish (code formatting, RSS, …).

                                    1. 1

                                      Exactly! And it’s easy to modify, and somewhat extensible for additional features you might want.

                                    2. 2

                                      I use Zola as well. I think one of the biggest downsides is how few themes there are. In principle it’s not much work to modify an existing theme, but it’s still one more thing you need to do when setting up your blog.

                                      1. 1

                                        You’re right. I wanted to build a custom theme anyway to personalize things, so that wasn’t much of a problem for me.

                                    1. 4

                                      I never would have guessed in a million years that Gnome Shell was partially written in JavaScript (I don’t mention that for performance, the article states several times that JavaScript wasn’t really the main performance issue). I especially liked the section about mistakes made along the way.

                                      P.S. - The Ubuntu Podcast is fun to listen to, thanks!

                                      1. 2

                                        You can pop open a JS shell to interact with your window management. It’s pretty fantastic.

                                        1. 2

                                          Not a criticism of their choice, but does anyone know why they picker Javascript, rather than a scripting language that is more popular in the unix world, such as Python?

                                          1. 1

                                            JS is vastly more popular.

                                            1. 1

                                              In general yes, but probably not among UNIX users that would write GNOME Shell extensions.

                                            2. 1

                                              A mix of universality (see web) and performance (see v8), I’d imagine.

                                              1. 1

                                                They don’t use V8 but the JS engine from Mozilla instead.

                                                The real question for me is why they decided to bundle the JS inside the data section of ELF files, hampering the hackabilty of Gnome Shell

                                          2. 0

                                            Yeah, the gnome toolkit has had a home-grown JS engine for a long time. It’s probably a naive interpreter (as opposed to the highly-optimized beasts in modern web browsers) and I believe the JS implementation is many years out of date. It’s basically just an embedded scripting language for their ecosystem.

                                            1. 3

                                              I don’t think it’s home grown. Based on dependencies it’s a wrapper around Mozilla’s Spider Monkey (js60).

                                              1. 1

                                                Ah, thanks for correcting me.

                                          1. 9

                                            This absolutely accords with my experiences in two tours at Apple (iTunes and Maps). Their business and the scope of their ambitions has significantly exceeded their existing cultural practices. Small teams; the secrecy; and the culture of information-as-leverage are three examples of practices that are basically maladaptive to the very different company Apple is now.

                                            1. 5

                                              iTunes! Truly the belly of the beast (not being sarcastic, reformed Apple folks will understand). I can’t agree more. I was in Product Security (only as a summer intern), which was quite a vantage point from which to view most of the bugs in or out of a release, which ones were security-relevant, and which were snatched up and moved into some secret division by the powers that be.

                                              1. 7

                                                I wrote the video processing pipeline that fed (and may still be feeding) the iTunes Store. It was a hell of a thing.

                                                1. 3

                                                  I’ve always wondered how it feels to know that you wrote something that literally millions of people use every day.

                                                  1. 26

                                                    So, here’s an anecdote. The initial video pipeline was a series of python scripts driving C and C++ code, that used a single large filesystem to take the provider mezzanine formatted video sources (either files from their post houses, or tape captures we did internally), and walk them through the processing graph. It was clunky, but Apple runs their teams small, and we had a hard deadline, when His Nibs was going to get up on stage and announce the product.

                                                    Like, we ran our processing on Powermac G5s, in a machine room next to my office. We got a shipment of them, imaged them up, and then my boss and I went over to on-site support and asked for RAM for a G5 – they said, “how much do you need?” and my boss said, “all of it.” We Froggered back across DeAnza with two backpacks full of RAM modules worth hundreds of thousands of dollars at Apple’s rates. As I said, we had a hard deadline.

                                                    So this got us through launch (“51 movies rounds up to 100!”), and while we were rebuilding the workflow management parts of the system to match the increasing volume of incoming assets, one of my jobs was to keep track of the highest priority transcodes and make sure that a) they were good enough to sell and b) they met our SLAs with the various providers. Our largest property was “The Suite Life Of Zach and Cody”, a Disney Channel tween thing, and so I’d be around when it became available to guarantee, for instance, that the MPEG-2 didn’t have bogus frames that would stall out the hacked DVD player we were using to convert the transport streams to something QuickTime could ingest natively. Like I said, it was a high-pressure hack job.

                                                    One night, I shepherded the latest “Suite Life” through the system, logged out of the VPN, and went to bed. The next morning, before I was fully awake, I got a call from my grandboss, who asked me, in his inimitable French way, what exactly the fuck was happening?

                                                    I opened the client, and saw hundreds of reviews of this latest episode, that were uniformly negative: “what is this where is Zach” or “grossssssssss” or “I didn’t buy this what’s happening?”. I logged in and checked the file – it was about 22 minutes in size, parsed fine, what’s the issue? I got to work, and my grandboss’ boss called me in to his office, and turned his computer around. Where “The Suite Life” was supposed to be was instead an episode of an R-rated animated sitcom called “Drawn Together”, that prominently featured coprophagy and strongly implied beastiality.

                                                    He had gotten the call from Steve who had gotten the call from his peer at Disney; to their credit, my management ran a post-mortem, after I found the right file, which I had (of course) fat-fingered the ID of. But that was the kind of thing that kept me up at nights.

                                                    1. 7

                                                      the hacked DVD player we were using to convert the transport streams to something QuickTime could ingest natively (don’t ask).

                                                      Oh, come on, you can’t “don’t ask” us on something like that.

                                                      1. 9

                                                        At the time, we didn’t have access to any software that passed legal muster to convert MPEG-2 data into anything else. So the DVD player team gave us a build that would read the MPEG-2 streams and play them back, but would also tee both the raw 420 YUV frames and the uncompressed audio to disk. It was glorious/horrible.

                                                        ETA we weren’t ripping DVDs, but rather, using the DVD player engine to read files off of disk.

                                                        1. 2

                                                          Given how elaborately hacky it all sounded, upon hearing “hacked DVD player” I’d half-expected that a hacked hardware DVD player was somehow involved.

                                                          1. 3

                                                            We were Not Allowed, because of legal, but I had a build of Handbrake that outputted ProRes for transcoding. Also, DVDs make for terrible mezzanine files. It was all over the place, man. We had a Pelican case with a custom foam interior for moving Xserve RAID disk sets around. All kinds of insane analog video analysis gear, bought in a panic.

                                                      2. 2

                                                        This is gold. Also, my name is Zach and my brother’s name is Cody (we predate the show). I’m sorry we gave you so much trouble lol

                                                      3. 11

                                                        Been there. Feels kinda bad when there’s an outage and you know what you should have done differently to not disappoint a million people a minute. (And it’s even more frustrating when you already knew what to do better, but feature work was prioritized ahead of it. But that’s above my pay grade, as it were.)

                                                        I mostly don’t get a sense of pride seeing the stuff in use. I’m too familiar with it. But I’ll tell you what’s a real rush for me: Migrating traffic from an old system to a newly written one and watching the metrics as thousands of requests per second start showing up on the new one and drain off of the old one, without anyone on the outside knowing what’s happening. It’s kind of like if you swapped out the engines on an aircraft in flight. That’s pretty cool.

                                                        1. 2

                                                          You get queasy when you think about how overloaded your QA people were?

                                                          1. 2

                                                            Not millions, but a corollary was that a document that I wrote that outlined what Apple’s preferred mezzanine formats were, along with the rationale for them, was copied and redistributed by Amazon as their requirements. I sort of want to meet someone who was at Amazon then and see if some of my more, uh, idiosyncratic? requirements caused them as much trouble as it caused us.

                                                      4. 3

                                                        Based on my experiences at Apple and Microsoft, this is just standard practice for giant mass-market software projects. The “closed, not a regression” thing used to drive me crazy at Microsoft. It makes no sense whatsoever!

                                                      1. 8

                                                        Attending Rust Belt Rust. It’s going great!

                                                        1. 1

                                                          Hey, I’m here too!

                                                          1. 1

                                                            Awesome! Hope you’re enjoying yourself :)

                                                        1. 1

                                                          I’m debugging a metamorphic testing framework I’m writing for Rust, learning to sew a little bit, and maybe playing some disc golf if the weather permits (80F on Thursday, high 30s on Friday O_O).

                                                          1. 12

                                                            Since we’re discussing how this is off topic, I’ll make an off-topic comment about how the copy of this site is very easy to read (with respect to colors and typography).

                                                            1. 3

                                                              The content is good too. The author’s reference to Shenzhen as “Big Rock Candy Mountain” elicited one of those spontaneous cubicle giggles that outs me as obviously NOT reading documentation… :(

                                                              1. 3

                                                                Documentation used to be written to elicit giggles. Not all of it, but a part of quality documentation

                                                            1. 1

                                                              Any visual/spatial thinkers out there? How do you take notes?

                                                              1. 1

                                                                I wish there was a piece of software that organized notes into graphs so you could arbitrarily link notes together based on tags and such. There’s Tinderbox for macOS, but it’s $250…

                                                              1. 18

                                                                It’s nice to see someone else abusing Python for the sake of fun. I’ve blogged in the past about many hacks, including: let, attempting to make call/cc, worlds, pattern matching with with, and dispatching with with. Basically, yes, yes, yes, more of this kind of stuff! It makes languages really fun.

                                                                1. 6

                                                                  I’ll join this party :) I figured out how to make Rust-like macros in Python by stuffing things in type-annotations, which you can read here.

                                                                  1. 1

                                                                    I don’t write much Python these days, but as a Schemer interested in macros, I used to try out all sorts of stuff. There was one really good attempt: MetaPython which hasn’t had a release since 2009. I think that was the one I felt worked best, so if you’re still interested, you might play with it.

                                                                    Also, this is awesome! And, I don’t know much rust, but I did not realize that what I would call “pragmas” are powered by macros (in hindsight this makes total sense!), making them accessible for all sorts of hackery and wizardry. Thanks for sharing!

                                                                    1. 2

                                                                      … but as a Schemer interested in macros

                                                                      Do you know about Hy?

                                                                      1. 1

                                                                        I do! A long time ago I had a similar project called Ruse, which aimed to be a compliant Scheme on top of Python 2, which fizzled before I prepped it for release. I’m happy that someone else, independently, thought the idea of a Lisp targetting Python was good. :)

                                                                  2. 3

                                                                    It sounds like you’d enjoy my (now quite old) blog post about abusing encodings in Python: http://benjiyork.com/blog/2008/02/programmable-python-syntax-via-source.html

                                                                    1. 3

                                                                      Thanks, that is amazing.

                                                                      Very relatedly, I blogged about sourefiles using built in rot13 with a starting comment #encoding: rot13 that then have all Sourcecode encoded: https://frederik-braun.com/rot13-encoding-in-python.html

                                                                    2. 1

                                                                      I think you might enjoy the complete works of Oleg Kiselyov, full of mind-bending trickery in Scheme, ML and others. I sometimes wish I could just set aside a year and thoroughly study and understand what Oleg is publishing.

                                                                      1. 2

                                                                        I sometimes wish I could just set aside a year and thoroughly study and understand what Oleg is publishing.

                                                                        I sometimes ask the question, legitimately, “What would Oleg do?” – Yes, aware. But similar to you, completely understudied due to time.

                                                                    1. 4

                                                                      I’m working on an astrophysics simulation! My friend is a postdoc doing theoretical astrophysics, and he recruited me to help him with a simulation. We experimented with a version that used multiprocessing to do some of the computation in parallel, but abandoned that idea for the “production” version. I’m still tinkering on that as an exercise in learning how to profile, optimize algorithms, etc.

                                                                      The tricky part about this simulation is that some of it needs to run sequentially and some of it can be done in parallel. I currently have a main process and a bunch of worker processes that use Events to communicate when the parallel part should start and when the sequential part (which happens in the main process) should resume. It’s not very efficient because the execution time of each time step is limited by the slowest worker process (each worker is modeling a different physical process), so there’s a lot of CPU time spent doing absolutely nothing.

                                                                      1. 14

                                                                        My two cents: keep it minimal, focus on content and not on fancy themes.

                                                                        For my personal website I keep it as simple as I can and I’m quite satisfied. https://github.com/dacav/App-PFT/blob/master/share/templates/terminal.html rendering as https://dacav.roundhousecode.com/

                                                                        1. 1

                                                                          I also tried to keep it minimal: https://soc.github.io/

                                                                          1. 1

                                                                            I really like that you have things organized into a grid, it makes it so that I don’t have to do a separate search once I’m already on the site.

                                                                            1. 1

                                                                              Thanks! It took a substantial amount of time to get the dimensions to 2. :-)

                                                                          2. 1

                                                                            I agree with this. It’s roughly what I’ve done with my site as well: https://c.har.li/e/

                                                                            1. 1

                                                                              I really like the look of your site!

                                                                            1. 2

                                                                              Interesting that the original implementation was written in Common Lisp, and that reference counting added so much overhead to the C++ version. I wonder if a Rust implementation would suffer the same way, or if the borrow checker could shift some of that overhead to compile time.

                                                                              1. 3

                                                                                I literally LOLed when I read the name

                                                                                1. 2

                                                                                  But more seriously: This looks like a well-designed shell replacement. I wonder if it’ll catch on

                                                                                  1. 1

                                                                                    I don’t get it, could you explain?

                                                                                    1. 2

                                                                                      There’s a famous painting by Magritte involving a pipe.

                                                                                  1. 2

                                                                                    Looks like a slam dunk for a lot of users currently on Git. It’s also written by the competition. Any pro-Git people want to counter any of it?

                                                                                    1. 18

                                                                                      I’m not really pro-git but I some of the strawman arguments can be easily countered.

                                                                                      Fossil is more efficient? Then how comes that git scales better? And git does not scale that well either if you look at what Microsoft had to do to it for 300GB. Describing Gitlab has “a third-party extension to Git wrapping it in many features, making it roughly Fossil-equivalent, though much more resource hungry and hence more costly” is so wrong it’s funny. At least, compare with Gitea.

                                                                                      The article discusses the design philosophies but never considers Torvalds design criteria like speed.

                                                                                      Fossil uses the most popular database in the world? You could also say git uses an even more popular one called “file system”.

                                                                                      Git is POSIX only? Git certainly has more windows users than fossil has users in total.

                                                                                      Fossil has many check-outs per repository? Git also.

                                                                                      Fossil remembers what you actually did? Git can do that just as well. Git provides a choice where fossil is opinionated.

                                                                                      In general, this is a one-sided pro-fossil page. Not surprising given the domain. It tells you a lot about the design philosophy behind fossil and is valuable because of that. It is not an honest comparison though.

                                                                                      1. 11

                                                                                        Honestly? I don’t actually care which SCM system I use, as long as it talks to GitHub, because that’s where all my code and all my employer’s code lives.

                                                                                        Furthermore, I use maybe three or four Git commands 99.9% of the time and I have them memorized (and aliased!), so why would I ever switch?

                                                                                        People complain about Git’s UI and I wonder what it is they’re doing that I don’t do that makes it such a big deal for them. I’m not saying they’re wrong, but I kind of suspect that most devs are more like me, they treat SCM as a black box utility, like the CPU or the memory, and that’s why we’re moving toward a monoculture, because it just doesn’t matter to most people.

                                                                                        1. 11

                                                                                          Not a pro-Git, but when I considered switching to Fossil there was no (easy) equivalent of git rebase -i.

                                                                                          That was probably my biggest complaint.

                                                                                          1. 4

                                                                                            The article explains that this is a deliberate design choice.

                                                                                            1. 22

                                                                                              That choice is a total dealbreaker for me. I never use SCM to record development history as it happened, with all the stumbles, experiments, dead-ends, and “oops, forgot a semicolon in the previous commit”. I use it to produce sets of changes that are easy to review and revert if necessary.

                                                                                              1. 11

                                                                                                I agree, except that I absolutely do use local SCM to record all of that nonsense history, so I have the freedom to try different approaches and make mistakes without losing work. Obviously I don’t push all that crap; I clean it up with rebase -i before letting anyone else see it. It baffles me how this could be considered bad practice at all, much less “history written by the victors”.

                                                                                                (Edit: I wonder if people are just talking past each other here — perhaps the anti-rebasers think you would rebase after pushing, which would be very rude — and the benefits of rebasing locally while working just don’t occur to them.)

                                                                                                1. 5

                                                                                                  I’ve used fossil in the past and my workflow was to have two trees: one with a “history as it really happened” and one that I rsync the completed work to and commit for a “clean” history. The latter gets shared and later rsynced over the other messy repo since I didn’t care about how I got to the end state.

                                                                                                  1. 3

                                                                                                    I did something like that in the olden SVN days. cp -R . ../asdfaasdf was my git stash.

                                                                                                2. 8

                                                                                                  I liked every part of the post except the rebase commentary. Everywhere else it does a great job of comparing fossil to git in terms of design motivation vis-à-vis team size. But for rebasing the criticism waxes philosophical without acknowledging different perspectives.

                                                                                                  One commentator characterized Git as recording history according to the victors, whereas Fossil records history as it actually happened.

                                                                                                  To me, a rebasing workflow is analogous to compare-and-swap operations, making development lock-free. I make a change, I try to check in the change, if that fails I back off and retry. The history of my retries is no more permanent than the history of transaction rollbacks in a SQL database.

                                                                                                  I can see why that history might be useful for small teams, who observe the progress of each other’s branches. But right now at work I have 15 branches on deck, blocked on other teams or on hold while I work on something higher priority. My team doesn’t care about any of those branches until I send them for code review, and they don’t care about any versions of my change except the last one.

                                                                                                  Depending on the time of day, dozens to hundreds of mainline merges are submitted per second. No one cares about the fully accurate history of every developer’s workflow, the deluge of finalized commits is plenty.

                                                                                                  Now with all that said, I am 100% convinced by this post to use fossil for personal projects. I have notes I’d love to publish as blog posts, but no motivation to operate a web app, build a static site, or use some hosted solution. And I often do wish I could go back and see my thought process for personal code that I pick up again after months, sometimes years.

                                                                                              2. 9

                                                                                                This recent lobste.rs comment by the “game of trees” author illustrates some downsides, mostly related to scaling.