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

learn more… | top users | synonyms

-4
votes
0answers
38 views

Can I decentely code C# on Linux? [on hold]

I'm about to learn C# for my studies, and I was wondering if it was viable to code on Linux ? Today, I can't bear Windows anymore, and I would rather code on Linux. So, is it practical, is the ...
1
vote
0answers
58 views

BASH dd problem

i am trying to learn bash and now im trying to do a script for burning isos. I made the number "4" command to make sure the variables were right. the message i get when i complete my program and ...
-2
votes
1answer
66 views

What is the Lua language used in Conky script?

I've been experimenting with Linux on a spare PC using Crunchbang so that I can try changing things and tinker. The Conky system monitor is fun to work with and changes are immediately seen, so it's a ...
4
votes
2answers
332 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
2answers
15k views

What is the command or hotkey for stopping a running program in DrJava?

I installed DrJava about a week ago. Its been working fine so far but I ran into an infinite loop and wanted a way to stop the program from running without having to force DrJava to quit. Is there a ...
0
votes
2answers
43 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 ...
1
vote
1answer
31 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
45 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 ...
20
votes
5answers
2k views

Is automake and autoconf the standard way to compile code?

I sometimes compile apps from source and I've either been using: ./configure make sudo make install But recently, I came across ./autogen.sh which generates the configure and make scripts for me ...
2
votes
2answers
78 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
51 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 ...
15
votes
5answers
13k views

Use of O_DIRECT on Linux

If this question is too programmer oriented, let me know. I wonder if there are people familiar with the O_DIRECT flag for the open() system call on Linux 2.6? Linus disparages its use, however high ...
2
votes
2answers
5k views

Extract name of file without extension in shell script [duplicate]

Possible Duplicate: Best way to remove file extension from a string? How to rename multiple files by removing the extension? I have a metric boatload of .txt files I'd like to load into a ...
-2
votes
1answer
30 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
30 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
59 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
39 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 ...
15
votes
1answer
473 views

What is AT&T’s Link Editor Command Language?

The man page for ld makes reference to AT&T’s Link Editor Command Language, however a Google search does not offer a satisfactory explanation as to what AT&T’s Link Editor Command Language is ...
18
votes
3answers
2k 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
90 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
462 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"); printf("%d\n",...
5
votes
11answers
13k views

Which programming language is best to begin with as a total beginner? [closed]

Ok here is the deal after playing with Linux distros for best part of 4 years, I have a great urge learn some coding. However I'm a bit undecided as to which programming language to begin with. Word ...
3
votes
1answer
9k views

How to install Scala?

Please note: I have to use the source package, not the prebuilt package from the repo (it is broken, at least IDEA complains). From the page: http://www.scala-lang.org/downloads I downloaded scala....
1
vote
1answer
434 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
75 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 ...
1
vote
1answer
56 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
30 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} ...
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.
1
vote
0answers
63 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
156 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 ...
7
votes
2answers
5k 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
11k 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 ...
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
51 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
5answers
52k views

Best distro for programming [duplicate]

Possible Duplicate: Linux distribution geared towards developers I don't know if this question qualifies to be a question to be asked here. But can anyone tell me what's the best (linux) ...
12
votes
1answer
1k 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
430 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
59 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 ...
4
votes
1answer
407 views

Is there a Linux for an MSM7227 tablet with USB keyboard and touchscreen stylus drivers?

I have a ZTE V9C 7" tablet with 800MHz MSM7227 processor, Snapdragon family (ARM architecture?), Android 2.3, and I want to have a (very lightweight) Linux running on it (I know Android uses a Linux ...
0
votes
1answer
141 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
137 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 ...
19
votes
4answers
10k views

Binary compatibility between Mac OS X and Linux

Brace yourselves, this question will likely appear naive and/or foolish, seeing as I am relatively new to the inner workings of unix like systems, and programming in general. Ready? Ok! I will go ...
2
votes
0answers
156 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
77 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 ...
1
vote
3answers
675 views

Managed code programming languages in Linux

Is there a .NET-like managed code programming environment in Linux? I've heard of Mono, but I don't see it extensively used -- even now Python can be seen used in most open source projects. Edit: ...
0
votes
1answer
1k 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 ...
0
votes
4answers
525 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 ...
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 ...
3
votes
2answers
246 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
1answer
371 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 -...