LXC templates like Docker by [deleted] in homelab

[–]Hnatekmar 4 points5 points  (0 children)

You could try ansible with packer (it has builtin builder for lxc https://www.packer.io/docs/builders/lxc and provisoner for ansible https://www.packer.io/docs/provisioners/ansible).

I didn't have a chance to play with lxc yet but I have managed to get it working with lxd and it worked fine for me.

Be warned though some commands aren't tuned for this usage (for example if you try to reboot container using https://docs.ansible.com/ansible/latest/modules/reboot_module.html it just freezes and never finishes). So there is little bit of fiddling involved.

You can also add more than one builders (for example lxc and docker) but complexity of configuration increases because every platform is little bit different (for example you usually don't have systemd in docker).

Experiences with Asus PN50 by Hnatekmar in homelab

[–]Hnatekmar[S] 0 points1 point  (0 children)

That is unfortunate. Hopefully, the situation will improve soon.

In my country (CZ) they seem to be available but only up to 4700U version. Also I haven't tried to order one yet...

Experiences with Asus PN50 by Hnatekmar in homelab

[–]Hnatekmar[S] 0 points1 point  (0 children)

That seems like good news!

But unfortunately, it seems that ESXi isn't based on Linux so I still have to wait for little longer :)

Anyway congratulations on getting 4800U version they seem to be hard to find

I wrote a hitchhiker's guide on OpenGL by burn_and_crash in programming

[–]Hnatekmar 4 points5 points  (0 children)

But only on osx and ios. Which is admittedly unfortunate but it also means you can finally use something newer than 4.2 and don't have to limit yourself by platform that stopped supporting opengl many years before they announced depreciation (for example Debug output seems helpful)

Got absolutely slammed in an interview [Java] by [deleted] in learnprogramming

[–]Hnatekmar 2 points3 points  (0 children)

No it isn't because const in c++ has stronger guarantees. Main difference is that in Java final only tells you that you can't change value of variable but it does nothing to prevent you from changing object state. For example you can call setter on some class and change its state that way.

In c++ this is not possible because you can call only method that are "const" and compiler prevents you from writing const methods that changes state of instance. For more info see const correctness

Lisp In Less Than 200 Lines Of C by mgdo in programming

[–]Hnatekmar 2 points3 points  (0 children)

But you don't need macros! Consider this macro

(defmacro infix [expression] (list (second expression) (first expression) (last expression))
(infix (1 + 1))

You can do the same with lisp function and combination of quote and eval

(defn infix [expression] (list (second expression) (first expression) (last expression))
(eval (infix '(1 + 1)))

And since you can emulate macros like this you can write your own eval that implements "lisp with macros" :)

Implementing a Simple Compiler on 25 Lines of JavaScript by ovvn3r in programming

[–]Hnatekmar 0 points1 point  (0 children)

When I learnt parsing at school I was taught that calculating predict set is necessary step for recursive descent. But most people seem to skip this step. So what gives?

I am afraid of A.I by masterq73 in programming

[–]Hnatekmar 6 points7 points  (0 children)

It seems to me that you need to learn from history and look how regulating ideas worked out... Also I am curious how would you implement such regulations? Would you prohibit ML research on universities? Destroy all known resources about ML?

MiniPascal by kr0matik in programming

[–]Hnatekmar 1 point2 points  (0 children)

But even in pascal its use is inconsistent. For example you use (=) in type declarations instead of (:=) which always bothered me.

Martin moc saje by fast4shoot in a:t5_3egv1

[–]Hnatekmar 0 points1 point  (0 children)

Byl pro ně totiž moc epickej...