Hacker Newsnew | past | comments | ask | show | jobs | submit | atmoz's commentslogin

I agree. Would be very nice if this was an option at least (that could be turned on by configuration). On the design considerations [1] they state:

> Previewing large files on selection is a wastage of processing power and time. A slow/faulty disk or over the network access makes the experience very painful.

You only need the first lines of the file, not the whole file, so this argument is not valid.

> It's also a risk to privacy and confidentiality. Users should see only what they explicitly want to see.

Not valid if preview is off by default. A hotkey could toggle preview mode.

Yes, you can open each file in a pager. Exit the pager, go to the next file and repeat. That is slow and painful. Being able to browse a code repository with file preview is the main reason I will probably not use this and stick with ranger. It's a deal breaker for me.

I really like that it's fast (I've tried using ranger on the USB Armory – it was very slow), and if preview was added as an option I would seriously reconsider.

[1]: https://github.com/jarun/nnn/wiki/nnn-design-considerations


Well, yes and no.

Not necessarily if you turn off your computer or use hibernation instead of sleep, AND you use full disk encryption. This will stop short-term attacks, like cold boot attacks and the like.

Of course, if they "borrow" your laptop for a while, opens it up, installing key loggers, modifying the firmware/hardware, and you do not notice this: you are f*ed.

I mean: even if you believe that "if someone has physical access to your computer, it's pretty much game over" you don't necessarily drop encryption and user password on the laptop and always put it in sleep mode.


What do you mean by adding images? Do you want to login via the browser and manage a media library?

Are creating RSS templates [1] considered as "handling the complexity", or is that too much hassle?

[1]: https://github.com/atmoz/atmoz-net/blob/master/.ply/feed.tem...


> What do you mean by adding images?

For me, lack of nice (ie. controllable, but 'automagic') image handling is a huge bug bear in nearly every cms out there, static or otherwise. Perhaps I didn't find the right platform/plugin...

In my case, I wanted to have 1 source image that was resized at various (author controllable) sizes and then saved them, while also generating supporting HTML (eg. 'srcset' to automatically swap between them). I ended up with a couple of ways to template it in [0]:

For a thumbnail:

<img src="{{image #thumb{w:50} }}">

For srcset:

<img src="{{image}}" srcset="{{image #srcset{w:'256,512,800',orig:'1152'} }}" sizes=...>

[0] https://github.com/ergo-cms/plugin-thumbnail. (Note the entire project itself stalled some time ago, and wouldn't recommend it here -- even though I do dogfood it)

EDIT: reorder wording


I think this is a task that is handled by an optional CMS, not the static site generator itself, though I agree it would be handy to have a little helper snippet to do that during build.

There are CMS solutions for static sites which will probably handle images, and all kinds of content, easily. Check out Dato[1], Siteleaf[2] or Netlify CMS[3].

Alternatively you can use external tools to prepare your images and simply rely on the standard HTML srcset within your static site generator of choice. I use RetroBatch[4] to prepare my images.

[1] https://www.datocms.com/

[2] https://www.siteleaf.com

[3] https://www.netlifycms.org/

[4] https://flyingmeat.com/retrobatch/


I see, so image resizing on build. I like the idea.

That should be doable. I may consider implementing something like that in my own SSG some day.


> What do you mean by adding images?

Exactly what cmroanirgo describes, also see my reply to epage (https://news.ycombinator.com/item?id=17961353) for that and my problems with rss, and some other things I didn't mention. For images, I ended up writing my own metalsmith plugin to resize images to different sizes and add all the attributes to the tags properly.


Shameless plug: If you want to organize your content with files and directories without any configuration files and all that fuzz, I created PLY[1] this summer.

All it does is convert .md files to .html and optionally uses nested Golang templates. There are some tricks behind the scenes, like support for tags and meta data (just like regular static site generators). Flexibility is concentrated into the templates, so no other files are needed.

I think the content (files) should reflect the structure of the webpage as close as possible when using a static site generator. When reducing complexity, we can go all the way down to the filesystem, where files and directories are the main building blocks. Content and design must be separated as much as possible.

I have not tested all static site generators out there, but the few that I tried did not satisfy my demands. So I just made my own (for fun and learning).

[1]: https://github.com/atmoz/ply


You might want to consider that the name PLY is already used for a popular Python parsing library [1].

[1] http://www.dabeaz.com/ply/


Thanks for the heads-up, if my project gets more popular and do not just rot in my github account I will consider changing it.


Go is apparently well suited to minimalist static site generators, see zas[1], zs[2], and z[3].

[1]: https://github.com/imdario/zas

[2]: https://github.com/zserge/zs

[3]: https://github.com/cjp/z


Reminds me of a similar incident in Norway, caught on tape: https://www.youtube.com/watch?v=Ho8o92Ro-Ig

Some CS students even made a game based on the hilarious video, where you play as the moose and must eat apples while defending against incoming lawnmowers: https://joelspeanuts.itch.io/elgspillet


Moose are huge and scary. I've heard more stories about smaller animals like badgers attacking the lawnmowers. Or at least making noises at the lawnmowers whenever it approached the lawn boundary where they were hiding.


Wow, that is probably exactly what happened. Funnily enough it looks very much like my parents place.


I just happened to deliver an assignment today about The Barabási-Albert Model. We use this book in class (you can read it online): http://networksciencebook.com

I had to plot the degree distribution against a power law. Looked something like this (taken from chapter 5): http://networksciencebook.com/images/ch-05/figure-5-4.jpg


Putting personal preference (taste, price, etc.) aside, I'm curious what other reasoning is behind your position of being "all for eating meat" (if any)?

I'm assuming here that by mentioning it in the same sentence as you say beef is bad for the environment, you are talking about being for meat production on a global scale, and not just for your personal preference.


yes I too would like to know the reason for being "all for eating meat". I think most reasonable people wouldn't eat meat (provided reasonable food alternatives) if they got to know the animals and how much they suffer. (just like most Americans would refuse to eat dogs or cats)


I just automated my laptop setup with Salt [1]. I want to keep using that instead of bash scripts (what Darch uses, by the looks of it).

I like the idea of having "images" with tempfs overlay. Is it possible to combine Salt with the image feature from Darch?

[1]: https://github.com/atmoz/workstation-formula


I'm not familiar with Salt, but it looks interesting!

Does Salt allow you to run from an already-built (but minimal) Arch installation? The base Darch images (godarch/arch) is bootstrapped manually.

Would I have to create a godarch/arch-salt image that is bootstrapped from salt files, so that you could further salt the image?

How would salt handle the inheritance that Docker provides?


Yes, have a look at how I bootstrap an Arch installation: https://github.com/atmoz/workstation-formula/blob/master/boo...

All you have to do is install Salt, and then you can run salt-call to apply states.

Yes, Salt states can depend on other states, and you could choose to apply only selected states.


By the sounds of it, you could do this currently.

1) Create a root image for your use that installs Salt in your Arch image. See here: https://github.com/pauldotknopf/darch-recipes/blob/master/ba...

2) For the rest of your recipes/layers, create a script/bash file like you would normally, but just pass execution to Salt.

I'll look into Salt more. Maybe there is a way to extend Darch to support different "executors" to support things like bash/Salt/Puppet/etc.


> you want to use "fix" instead of "on" to prevent an attacker from just turning it off again.

An attacker also must know you admin PIN (required to change this setting), so there is really no need to use "fix" instead of "on". To be able to toggle this off, you must reset your yubikey (paraphrasing the docs).


What editor are you using?

EDIT: Nevermind: http://orgmode.org/


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: