194 reputation
111
bio website jacksblackboard.blogspot.it
location Montereale Valcellina (Italy)
age 22
visits member for 2 years
seen yesterday

I'm a Computer Science student at the Scuola Superiore of the University of Udine. I've been interested in Computer Science since my third high-school year, and thus I've decided to apply to join one of the Schools of Excellence, and succeeded in this task.


Oct
6
comment Is w command safe for users?
If you don't want to let bash save those commands in the history just begin the command with a space: $echo 'a' a $ echo 'b' b $!echo echo 'a' a (note that echo 'b' was not recorded in the history).
Jul
5
comment Who is responsible for the Linux kernel?
@trysis I am Italian. Simpatico is a false friend with sympathetic. It means likable/pleasing/enjoyable/funny. The translation for symmpathetic would be comprensivo. In that sentence it would be probably better to say "everything is compatible with everything else", but simpatico does not carry such a meaning.
Jul
4
comment Who is responsible for the Linux kernel?
"everything is simpatico with everything else" is this an American way of saying? The word simpatico there doesn't really fit. Did you mean "everything goes along/fits well/matches with everything else", or something like that?
Jun
26
comment Removing lines that are common to the outputs produced by two commands
No, it isn't related. The decorate-sort-undecorate pattern is used when you want to sort a sequence using a different type of comparison then the one defined by the type of the elements. You create a sequence of pairs with the new "key" as first element and sort that instead, dropping the key afterwards. In this case you aren't doing anything like that. (btw: that pattern is "obsolete", in the sense that you don't have to do that explicitly anymore).
Jun
19
comment Can I “drag” a file into a window without a file manager?
You don't need the second fix. Simply copy the Dragbox directory into the PYTHONPATH somewhere (like in the python2 site-packages, either system or per-user). That line is executed only when dragbox cannot import that package.
May
27
comment Quickest way to rename files, without retyping directory path
Why are you using sudo for moving a file between two directories in your home?
May
5
comment Threads vs (Forked) Processes
"handling multi-thread scheduling is tricky and was frequently done incorrectly" citation needed. Implementing user-space threads isn't a problem. The problem with user-space threads is that if a thread does a blocking syscall all the threads gets blocked. The only way to avoid this is by using system level threads.
Feb
21
comment python vs bc in evaluating 6^6^6
Side note: in python the 6**6**6 expression is actually computed at compile time. However since you are launching the file directly instead of importing it from a module, this shouldn't matter. To see the difference put 10**12345678 into an a.py file and try to import it from the interactive interpreter. Then close the interpreter, restart it and import a again. The first time it should take an noticeable amount of time (because python is compiling the module), while the second time it loads the .pyc, which should be instantaneous,
Dec
3
comment Why is the root directory denoted by a / sign?
Because the empty string would have been a horrible choice!
Nov
6
comment Why does no one use the true Bourne shell as /bin/sh?
@strugee Those aren't the only differences. For example sh doesn't have tilde and brace expansion, some built-ins are missing(e.g. pushd and popd, select) no arithmetic expansion. A lot of variables are missing, e.g. PIPESTATUS.
Nov
5
comment Why does no one use the true Bourne shell as /bin/sh?
@strugee ""lack of features" - why would this be a problem? " Yes, good point... why do programmers use useless things like assembly/C/high level languages when anything you can do with them you can already do writing machine language directly? Fact is: features = increase in speed of development + increased maintainability = less costs = better Using sh is exactly like using bash except that it is: slower, programs are longer and it is harder to maintain.
Oct
7
comment Why is Linux's filesystem designed as a single directory tree?
I've always wondered why Windows chose that weird naming scheme. It seems quite logical to have all in a single file-system tree, with other drives mounted as subdirectories, instead of having a forest. "Simple is better than complex" and a forest is more complex than a single tree.
Sep
9
comment How to compile the C compiler from scratch, then compile Unix/Linux from scratch
Write a simple assembler directly in machine language, then write a c compiler/interpreter in assembler and use it to compile gcc. Then use the compiled gcc to compile gcc again.
Aug
23
comment What does “cd &” mean?
" I used cd * because the folder name is long for me, sorry for being lazy". Simply type cd <TAB> and the name of the unique folder will be expanded automatically.
Jul
20
comment Why do most distributions chain UEFI and grub?
None of those looks like an advantage to me. Even if the boot sequence/system is easier you still have to write and test it while the more complicated version is already in use by decades. The boot time isn't a strong point in any case, especially if the boot time is only slightly faster(and not faster, say, by an order of magnitude). Since the functionality is the same, except for few details that the users wont even notice, it isn't worth the effort. If you consider it important you can provide the patches and tests for the distros you use...
Jul
20
comment Why do most distributions chain UEFI and grub?
Can you list a single advantage that your system has over using grub? In your question you didn't list any. Also keep in mind that backward compatibility is a huge issue in software development/hardware etc. and adding code to support something that is not needed means simply more work to do to test and maintain the code.
Jul
9
comment Having multi lines in bash command substitution
@OlivierDulac That's exactly the point I wanted to make! Using a single space or multiple spaces to separate options/different commands doesn't make a difference, hence the indentation after the newline doesn't have any effect. If you put the line break inside one command(or option) than indentation does matter.
Jul
8
comment Having multi lines in bash command substitution
@Coffe_Mug It works only if commaaaaaaaaaaaaaand is actually command with a lot of options and | maybe pipes etc. Otherwise it doesn't work with indentation.Try echo $(ec\<NEWLINEHERE>ho a), works while echo $(ec\<NEWLINE HERE><INDENTATION HERE>ho a) produce ec: command not found. While echo $(echo Hello,\<NEWLINE HERE> World)[note the space after newline] and echo $(echo Hello,<NEWLINE HERE><INDENTATION HERE> World) do exactly the same things.
Jul
2
comment Why is my tar file bigger than the directory backed up
As a theoretical note: it's easy to show that, given any data-compressing algorithm, there exists texts such that the resulting output is at least as long as the original text. Otherwise, given a string of any length, X you could compress it to Y, a string of length strictly less than the length of X. This means that any file could be compressed, by multiple applications of the algorithm, to the empty file, which is absurd since data-compressing algorithms must be bijective/reversible. Hence it's not strange for archives to have bigger size than the original data.
Jun
23
comment Why using more threads makes it slower than using less threads
Your example is misleading. It would be better to say something like: "You have a corridor that you can fit four people down, side by side and it is used by you and other people for different tasks. There is a referee that decides who can go through the corridor. Then the most efficient number of people is bigger than 4 and less than some number, where your people start to queue[highly context dependent]." Usually having some threads more than the number of CPUs performs better than using exactly 4 threads. If you are the only one using the CPU, then 4 is the best number.