Questions about tools for programming (compilers, IDE, etc.) For questions that involve programming, ask on Stack Overflow.

learn more… | top users | synonyms

0
votes
2answers
38 views

Linux beginner. What OS should I use? [closed]

I recently started JAVA programming and I would like to start learning Linux programming simultaneously. I run a mac and I am planning to use Oracle VM VirtualBox to boot linux. What kind of Linux OS ...
2
votes
1answer
26 views

Simplest way to add a data lookup to an HTML website on Ubuntu?

I want to learn how to make the simplest possible data lookup function on a website. I don't want to use any of the usual tools such as MySQL or a CMS or any other heavy framework. I set up an Ubuntu ...
1
vote
1answer
38 views

Why doesn't cc (the C compiler) and similar utilities use standard streams by default? [closed]

Background If think most of us agree that filters and pipes are the very foundation of Unix systems. Pipes and filters are very powerful tools. Almost all Unix utilities use the standard input and ...
2
votes
2answers
61 views

Trying to convert a simple C program into an AWK program

Hey guys a couple of weeks ago I wrote a C program that prompts the user for the name of a text file and then prompts the user for a word. The program then outputs the input text file with numbers to ...
1
vote
1answer
49 views

vim: Match WORD in current block with balanced brackets

When matching in vim there are words, WORDs and blocks among other things. Now for editing code, blocks are useful, words are somewhat useful, but WORDs are mostly useless, because they often include ...
-2
votes
1answer
28 views

C Program Problem [closed]

#include<stdio.h> int main(void) { int a; int count=0; for(a=1;a<=10;a=a+1) { if(a>3) count=count+1; } printf("%d numbers were greater than 3\n",count); return ...
-2
votes
1answer
29 views

help me with create shell script with bash scripting [closed]

I want to make the script to extract the users of linux server and check if "/home/$user/public_html/vb/includes/config.php" is exist , i want the script to check all the users in the server and ...
1
vote
1answer
51 views

`man` pages for languages other than C (e.g, python, R, javascript, etc)?

man pages are a phenomenal resource while programming in C on Linux. While looking at someone else's code, if you see something foreign you can immediate research it in another terminal with $ man 3 ...
2
votes
0answers
38 views

What is the background of the program segmentation?

Each program is separated into several segments like: code segment data segment stack segment heap segment But who was responsible for that progression? The compiler and linker has to support that ...
17
votes
3answers
1k views

Will my linux binary work on all distros?

I found a good replacement IDE for Delphi called Lazarus. But I don't have a question for programmers. Will the statically linked Linux binary work on all Linux distributions? I.e. it does not matter ...
1
vote
3answers
82 views

What is the reasoning/design choice behind the unix/linux file system structure?

I've recently switched from using windows and I'll now be running linux on my computer. In windows there's the program files folder. Most of a programs files go into its own folder there which to me ...
1
vote
2answers
344 views

Linux System calls in C on OSX

So I did a quick test and #include <sys/types.h> #include <unistd.h> #include <stdio.h> int main (int argc, char *argv[]) { printf("Hello World\n"); ...
1
vote
1answer
67 views

Is there a tool that automatically inserts and updates a script header block for e.g. shell or Python scripts?

I found scripts by a former admin who scripted quite nice things with Bash or Python. All his scripts are well formatted and equipped with a always similar looking "script header" or "code header", I ...
0
votes
0answers
76 views

GPS GNAT Ada source file (under Ubuntu 14.04) file open error?

My GNAT GPS Ada project has about 180 files in it. It compiles all files (some with warn/errs)--however, there are about 10 files it will not open in the editor. Not much of an error message--just ...
1
vote
1answer
55 views

Running a program and providing input

I have a program that runs from the command line. As soon as it runs, it asks for a text value and expects the return key to be pressed after that. Is that possible to create a bash script that runs ...
0
votes
1answer
29 views

How should I write a test environment for my program?

If I have a program, its input and the desired output, how do I automate the comparison of what I want the program to give me and what it actually gives me? For example: a=${./program < inputfile} ...
1
vote
0answers
53 views

Passing a parameter to a dstat plugin

I wrote a simple plugin (dstat_externalBackup.py) for dstat to monitor the filesystem free space and placed it in /usr/share/dstat and it works as intended. € dstat --externalBackup 3600 extern free ...
0
votes
1answer
107 views

Can I use LXC library in my c program?

Currently, I am designing a c program that will create multiple container and put different applications into them separately to achieve isolation. Is it possible to leverage LXC library to it? I ...
2
votes
1answer
47 views

Storing one bit of information in user space [closed]

I'm writing a program that collects network data. I need to store one bit of information, a simple yes/no, somewhere so another process may read it. I have several options: writing a 1 or 0 to a file, ...
0
votes
1answer
43 views

writing to ext4, 8GB partition vs 512MB partition

I have a question which is slightly programming related, but it mostly relates to how ext4 works. I have a program which writes 128MB to a file with changing random aligned offsets. I write 256KB ...
11
votes
1answer
875 views

When can I edit strings in an executable binary?

I have an executable binary; let's call it a.out. I can see the binary contains strings $ strings a.out ... /usr/share/foo .... I need to change the string /usr/share/foo to /usr/share/bar. Can I ...
-2
votes
1answer
271 views

how to return file descriptor in c [closed]

I am confusing with this. fp=fopen(filename,mode); what is the value fopen() return to fp. is that value is file descriptor integer? is fp called as stream ? if not how to return a ...
0
votes
2answers
55 views

What operating systems do experienced users use and why? [closed]

I was reading the Modern Operating Systems book and it says Many UNIX users, especially experienced programmers, prefer a command- based interface to a GUI, so nearly all UNIX systems support a ...
0
votes
1answer
104 views

How to use programs with MPI?

Is it possible to use programs with MPI for example blender? Is it a mpi program by only adding the source file "mpi.h" or is there any way to simply convert an existing program for the use with mpi? ...
2
votes
1answer
115 views

m4 macro using variable number of tabs to line up a column

This is the macro I have so far: define(`debug_macro', ` #ifndef $1_DEBUG #define $1_DEBUG'forloop(`i',`1',eval(5-(len($1)/4+ifelse(eval(len($1)%4 == 0)), `0', `1')),` ')dnl`0 #endif ') The goal ...
2
votes
0answers
142 views

How to determine the wordsize in Linux kernel programming? [closed]

In userspace code, the macro __WORDSIZE is used, included in <bits/wordsize.h>. However, when I do Linux kernel programming, the __WORDSIZE seems not available. If <bits/wordsize.h> is ...
1
vote
1answer
67 views

On shutdown, do un-mounting drives happen before shutdown signal handling?

So based on my understanding of the Unix/Linux shutdown process (which is highly limited I admit), I think at some point these steps happen: 1. mounted drives get unmounted 2. a termination signal ...
0
votes
2answers
2k views

How to update CodeBlocks in Kali Linux?

I installed CodeBlocks on Kali Linux but I got 10.05 version and I want to update it to 13.12, preferably via terminal. Also I would like to know how to update any application this way.
0
votes
1answer
902 views

NetBeans : Can't build Java project

I installed today on my old developer PC NetBeans (the newest) and I cloned my repo from BitBucket (I began coding with NetBeans on Windows 7). I tried to make a clean build, but the compiler has ...
8
votes
1answer
2k views

What does Unix programming mean, exactly? [closed]

I thought I understood what the term Unix programming meant, but now, after reading about it in a kernel/C programming context, I feel like I need to clarify the meaning of this term. It is not clear ...
0
votes
4answers
462 views

Compiling C/C++ code by way of including preprocessor build instructions in an actual C/C++ source file

So here's the thing, and it's really just conceptual so don't let it bug you: I've got reasons for not wanting to rely on a specific build system. I don't mean to dis anybody's favorite, but I really ...
1
vote
1answer
365 views

VT100 terminal emulation to use with a Java-based 8-bit computer emulator

I'm successfully using GNU Screen as serial terminal to "talk" to my Altair 8800 clone (http://altairclone.com/) using serial line. The command I use is: screen -istrip /dev/ttyUSB0 Screen does the ...
1
vote
1answer
290 views

Bash loop new user

I have to create 20 users on 10 servers. I want to create a script that will create 20 users for me on the server (that's easy with useradd) and encrypt the password. I have my variable $crypt=perl ...
3
votes
2answers
208 views

Is there an equivalent book/resource to “The Linux Programming Interface” for FreeBSD? [closed]

Most of you here are probably aware of the famous The Linux Programming Interface, which presents a truly masterful guide to the Linux and general POSIX APIs. I know that much of the general POSIX ...
1
vote
2answers
147 views

How many sections can I create in object file?

I'm following the course of Baking Pi – Operating Systems Development. In it they created another section .init. So can we create as many sections as we want (not just .data, .bss, .text) and can we ...
4
votes
2answers
296 views

Right-align comments in vim

I'm writing C code using vim and are searching for a possibility to right-align my comments so that they all end at col 80. To give a short example: int a = 80; /* initialize a */ int b = 7; /* ...
2
votes
1answer
115 views

How to have Kate spell check ignore run together words?

I use Kate editor for scientific programming (Fortran, Python, matlab) and would like to leave spell check on, but have it automatically ignore words that have been run together to create a variable ...
2
votes
1answer
161 views

Windowing system strictly for code editing? [closed]

I'm a usability obsessive and I can't help dreaming about how nice it would be to have a windowing system configured for nothing but editing code... mostly it would be ultra minimalist, with just ...
1
vote
1answer
58 views

How kernel allows a process to receive network data that do not belong to it? [closed]

Each process is assigned with port number when using network resource. A process can only send and receive network data from its assigned port number. How kernel allows security programs like IDS, ...
1
vote
1answer
1k views

Adding timestamp before each STDOUT line inside perlscript

In a perl script, I am capturing all the STDOUT and STDERR using the below code: open STDOUT, '>>', "$log_file" or die "Can't redirect STDOUT: $!"; open STDERR, ">&STDOUT" or die "Can't ...
4
votes
2answers
236 views

Concatenate all commentary about source files in a directory tree

I am working on a multitude of projects involving codes in Fortran. They are in a directory tree involving 10 to 20 folders, each of the codes is in a 'src' folder. What I am looking for is a simple ...
2
votes
1answer
258 views

Can you use LXC through C?

I want to use LXC to 'container' plugins my application is loading. Am I able to do this through C? I have been Googling a lot about it, but there don't seem to be any headers, only scripts that can ...
1
vote
2answers
148 views

What was the old linux game for programmers, simulating a life on a grid of pixels? [closed]

I remember about 10 years ago in the official Linux repository there was a program, simulating a life of creatures on a grid of pixels (each occupying one pixel). The point of the "game" was in ...
2
votes
2answers
325 views

What graphical programming language does OpenBox use primarily?

Is there a specific graphical language that OpenBox uses for most of it's apps, or one that it likes to run with? For example how KDE uses primarily QT for it's apps, and also includes a large ...
2
votes
2answers
1k views

Is the Unix Programmers Manual relevant for Linux?

I've been looking for an all around Linux Programmers manual but there isn't one... So that leads me to ask if the Unix Programmers Manual is relevant for Linux? The manual is here: ...
7
votes
2answers
4k views

Use the command bar in bash without I/O?

I really like the look of the output of bar But that script is only used for Input/Output operations. How can I use it as a replacement for sleep but with visual feedback? sleep 10
4
votes
4answers
10k views

Progressbar in bash to visualize the time to wait

In a bash script sometimes you need the user to wait some seconds for a background process to finish. I usually use for example: sleep 10 How can I add a kind of progressbar to the script, so the ...
0
votes
3answers
249 views

how to run more than one program in a single script?

I have about 6 programs I want to run one after the other. They all are in different directories with their respective data. I would like help with a script that I can use to run each program in a ...
0
votes
1answer
473 views

how to plot multiple graphs in one plot?

I want a plotting script that will plot multiple graphs on the same plot where the values of my data have the same x coordinate. This will help me the differences of each variable in the plot. I tried ...
1
vote
0answers
59 views

Where does backtick and single quote come from when denoting commands e.g. `prog'? [duplicate]

When referring to commands in tutorials, man pages, and articles I see authors use the backtick and single quote in this way: `./configure' `make' I believe I have seen gcc denote points of failure ...