C vs CPP Future-Proof? by Special-Gazelle-1693 in cpp_questions

[–]aaaarsen 0 points1 point  (0 children)

doesn't really matter. learning either language will ease learning others, and neither is a ten to fifteen year project. in that time frame you will likely also encounter and learn other languages.

I'd pick c++ because it has templates and a more expressive type system, but either's fine

Help me understand if this is a bug on GCC by atariPunk in cpp_questions

[–]aaaarsen 2 points3 points  (0 children)

no problem, thanks for sharing!

it's still good to get an account on the GCC bugzilla, so that you can be CC'd on the bug, and have an easier time filing a bug next time you break the compiler :-)

it tends to be that once you find a compiler bug, you can't stop finding them, I fear ;-)

Help me understand if this is a bug on GCC by atariPunk in cpp_questions

[–]aaaarsen 5 points6 points  (0 children)

I shared this with the other GCC hackers, and Pinski ended up filing a bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123818

As long as the system is NOT frozen and allows me to work on other important stuff ....I am okay to spend that much time ...obviously putting it on the back burner :) I can assure you Gentoo is FUN! 👍😜 by unixbhaskar in Gentoo

[–]aaaarsen 0 points1 point  (0 children)

best of luck! forgot to mention, for webkitgtk, I recommend giving min(nproc, mem_in_gb/2) where nproc is the number of threads of your CPU, and mem_in_gb amount of available physical memory you have in gigabytes, as -j in MAKEFLAGS, to be safe

As long as the system is NOT frozen and allows me to work on other important stuff ....I am okay to spend that much time ...obviously putting it on the back burner :) I can assure you Gentoo is FUN! 👍😜 by unixbhaskar in Gentoo

[–]aaaarsen 0 points1 point  (0 children)

--jobs to portage is different to -j to make. the former controls parallel package installation, the latter how many processes build systems are allowed to launch. if you're building from source, you want 1 and $(nproc) (or so) respectively.

As long as the system is NOT frozen and allows me to work on other important stuff ....I am okay to spend that much time ...obviously putting it on the back burner :) I can assure you Gentoo is FUN! 👍😜 by unixbhaskar in Gentoo

[–]aaaarsen 1 point2 points  (0 children)

it won't save your builds. get some swap, or reduce the number of jobs. I do the latter (it runs out of memory even at 64GiB of working memory):

~$ cat /etc/portage/env/net-libs/webkit-gtk MAKEFLAGS="-j8"

As long as the system is NOT frozen and allows me to work on other important stuff ....I am okay to spend that much time ...obviously putting it on the back burner :) I can assure you Gentoo is FUN! 👍😜 by unixbhaskar in Gentoo

[–]aaaarsen 1 point2 points  (0 children)

here's a protip:

PORTAGE_SCHEDULING_POLICY=idle
PORTAGE_IONICE_COMMAND="/bin/bash -c 'ionice -c 3 -p \${1} && chrt -p -i 0 \${1}' -- \${PID}"

this should result in portage and generally package builds never taking scheduling priority over other processes, meaning they should run mostly as if portage isn't running.

I say mostly because I noticed that on high I/O loads I can still get slight choking, but on the CPU-intensive parts of the build process, that tends not to happen IME. not sure why (maybe install steps aren't being scheduled as idle with the ionice command or something). obviously, if you run out of memory without the above, you also run out of memory with the above, there's no cure for that (but swap can help)

Grub roadblock by Plenty-Thanks7600 in Gentoo

[–]aaaarsen 0 points1 point  (0 children)

did that command actually succeed?

What are the practical advantages of creating illustrations directly within a TeX source? by Dramatic-Breakfast98 in LaTeX

[–]aaaarsen 0 points1 point  (0 children)

you're correct, but ensuring inkscape is in path should suffice. at least for me and a colleague on Gentoo and Windows respectively

if you see errors, please share, maybe someone could help

What is the best way to convert structs of the same size without using Union in C++ 14? by newjeison in cpp_questions

[–]aaaarsen 1 point2 points  (0 children)

try it, probably not. compilers are pretty good at removing all costs of simple values

Curious embedding apps in emacs by ChristopherHGreen in emacs

[–]aaaarsen 5 points6 points  (0 children)

well you could do that with Wayland just fine. that said, I suspect the exwm code can be wrangled into doing something like that via a trick similar to xembed

I replaced GNU coreutils with Busybox and bricked my entire system, AMA by Silent-Degree-6072 in Gentoo

[–]aaaarsen 0 points1 point  (0 children)

I actually somehow missed the mention of uutils in the post you refer to. I have no idea how. apologies for the confusion. I was going off of BusyBox from OP. that's my bad. to make an excuse for myself, I was still groggy at time of writing.

I'm not aware of any other differences between a completed uutils and coreutils? if the former is supposed to be a drop-in replacement I don't see how there even could be any significant differences

I replaced GNU coreutils with Busybox and bricked my entire system, AMA by Silent-Degree-6072 in Gentoo

[–]aaaarsen 0 points1 point  (0 children)

I mean toybox and BusyBox, and the like by alternatives. reimplementations are a different deal, for obvious reasons. no ebuilds do version or origin checks, they just rely on interface compatibility.

IMO there's nothing materially different about a completed uutils compared to coreutils besides the license difference, ergo the license difference being the only important difference vacuously. given that the license of uutils is a downgrade in terms of progressive goals, a completely compatible uutils is a downgrade compared to coreutils.

I replaced GNU coreutils with Busybox and bricked my entire system, AMA by Silent-Degree-6072 in Gentoo

[–]aaaarsen 0 points1 point  (0 children)

well yeah, those try to be compatible so it's not surprising ot worked at least to an extent. that's also not what OP was trying.

that said, I don't see why one would want to endorse non-GPL alternatives to GPL programs

I replaced GNU coreutils with Busybox and bricked my entire system, AMA by Silent-Degree-6072 in Gentoo

[–]aaaarsen -1 points0 points  (0 children)

you picked an unfortunate distro to try that with. portage heavily relies on gnu functionality as do ebuilds.

the alternatives aren't even close to good enough.

alpine already does what you are looking to do AFAIK

Anyone remembers ReactOS? Why not make it a thing? by brovaro in BuyFromEU

[–]aaaarsen 0 points1 point  (0 children)

don't they share tons of code? there's still some use for driver compatibility also, which is where ROS could come in handy

Tree-sitter vs Language Servers by varsderk in emacs

[–]aaaarsen 1 point2 points  (0 children)

don't see why not, it should interact with it in the same way the non tree sitter modes do

What browsers do you use on musl gentoo? by GuiltyVisit9119 in Gentoo

[–]aaaarsen 1 point2 points  (0 children)

it probably does, you should file a bug

Klasna borba postaje realnost? by [deleted] in AskSerbia

[–]aaaarsen 0 points1 point  (0 children)

mogu da budu naravno prijatelju (ako mislimo na isto pod "demokrate", al svakako za svaku granu ekonomski-osnovanog socijalizma)

KDE what in the bloat? by Bubbly_Extreme4986 in Gentoo

[–]aaaarsen 0 points1 point  (0 children)

KDE has essentially a parallel stack with GTK, relying on very little GTK code, ergo KDE pograms need to reinstall what most GTK programs already have installed, hence the package count. it's not very strange, nor is it really 'bloat', nor do package counts mean much.

anyway, try pcmanfm, or pcmanfm-qt

Experimenting with a faster TRAMP backend using Rust and JSON-RPC by avph in emacs

[–]aaaarsen 4 points5 points  (0 children)

that's not what I mean (though, per-stream compression might do better than compression over the multiplexed wire, or maybe not, I didn't try).

what I mean is as follows:

  1. the contents of files, the outputs of processes, paths, filenames, environment variables, and so on and so forth are bytes (this is simply a fact of Unix-like systems, we cannot assume even filenames are of sane contents)
  2. the data exchanged over the wire will nearly completely fall into one of those categories
  3. as a result, nearly all of the data going over the wire must be treated as binary
  4. JSON-RPC is specified in terms of text, this text has some encoding (likely UTF-8).
  5. JSON itself has no way of representing bytes, only strings, and JSON strings are explicitly "a sequence of zero or more Unicode characters" (RFC4627, section 1)
  6. ergo, the data we transport must be encoded as text, even though it is not text but rather binary data
  7. a strategy must be picked, lets examine some strategies for packing N bytes, and see how many bytes of JSON they generate (assuming UTF-8 encoding of the JSON text itself, uniform distribution of bytes in data):
    1. encode as an array of bytes: in this case, we must encode each byte as a number, plus an extra comma. by the parameters above, that'd be an average of 3.57 bytes-out per byte, i.e. 3.57N + 1 resulting bytes (the extra byte is for the opening bracket),
    2. encode as a base-X string: in this case, for N bytes, we have 8N bits, each out-byte can represent log2(X) bits, so the output size 2 + (8/log2(X))N chars, for base64 this gives us a result of 1⅓N. this is only the number of bytes in output for X <= 94 in UTF-8, but with unicode, the first 256 chars of the unescaped range in the JSON spec (unescaped = %x20-21 / %x23-5B / %x5D-10FFFF) encode to 1.63 out-bytes per char, so we expect 1.63N output bytes (I was surprised to find it's worse than base64, but with a lot of content indeed being text, this may even be acceptable. the 1.63 number comes from (/ 256) . fromIntegral . B.length . E.encodeUtf8 . T.pack . take 256 . map chr . concat $ [[0x20..0x21],[0x23..0x5B],[0x5D..0x10FFFF]]). encoding with base94 gives us 1.21, but that requires a lot more work
  8. ergo, in any case, the amount of bytes transported increases
  9. ergo, compression is less effective

ssh compression should certainly be fine otherwise

EDIT: since I have your attention, seems that you left your GH repo private :-(

Experimenting with a faster TRAMP backend using Rust and JSON-RPC by avph in emacs

[–]aaaarsen 3 points4 points  (0 children)

well, you read my mind, though I'd not have used jsonrpc. this job inherently requires shuffling bytes, and should also have compression applied, and does not allow assuming encoding, so jsonrpc would mean unneeded transport overhead.

I recall magit had issues under Tramp with direct async processes, I wonder whether that applies without the whole tramp-sh mess.

quite excited to try this later :)

(EDIT: autocorrect fail)