112
votes
9answers
4k views

Seeking clarification on apparent contradictions regarding weakly typed languages

I think I understand strong typing, but every time I look for examples for what is weak typing I end up finding examples of programming languages that simply coerce/convert types automatically. For ...
57
votes
9answers
5k views

How to reliably guess the encoding between MacRoman, CP1252, Latin1, UTF-8, and ASCII

At work it seems like no week ever passes without some encoding-related conniption, calamity, or catastrophe. The problem usually derives from programmers who think they can reliably process a “text” ...
51
votes
10answers
29k views

How can I download all emails with attachments from Gmail?

How do I connect to Gmail and determine which messages have attachments? I then want to download each attachment, printing out the Subject: and From: for each message as I process it.
39
votes
35answers
13k views

Why learn Perl, Python, Ruby if the company is using C++, C# or Java as the application language?

I wonder why would a C++, C#, Java developer want to learn a dynamic language? Assuming the company won't switch its main development language from C++/C#/Java to a dynamic one what use is there for ...
38
votes
6answers
2k views

Converting to and from Hindu calendar

How can I convert unix time to Hindu calendar­Wikipedia time and the other way round in php, Perl or Python or Java? I know I can convert to Hebrew and Jewish. But Hindu is not an option. To be ...
18
votes
1answer
260 views

Why does (.*)* make two matches and select nothing in group $1?

This arose from a discussion on formalizing regular expressions syntax. I've seen this behavior with several regular expression parsers, hence I tagged it language-agnostic. Take the following ...
15
votes
19answers
2k views

Does it make sense to rewrite Perl and shell scripts in java?

I have a bunch of scripts - some in perl and some in bash - which are used for: Creating a database (tables, indexes, constraints, views) Parsing spreadsheets and loading the data into the database ...
14
votes
9answers
769 views

Linking languages

I asked a question earlier about which language to use for an AI prototype. The consensus seemed to be that if I want it to be fast, I need to use a language like Java or C++, but that Python / Perl / ...
14
votes
5answers
610 views

IDE(s) for Polyglot programming

I'm working in Java, C ,Perl, and Bash (and a little python) on a project that all work together (mostly via RESTfull interfaces) and am looking for an IDE suited to Polyglot programming? What IDE ...
13
votes
10answers
1k views

Can Someone Explain Threads to Me? [closed]

I have been considering adding threaded procedures to my application to speed up execution, but the problem is that I honestly have no idea how to use threads, or what is considered "thread safe". For ...
13
votes
6answers
1k views

Is there any Java Library to operate on unix config files like http.conf

There are very good Perl libraries (e.g. Apache::Admin::Config) to operate on traditional unix config files like httpd.conf. Anyone know if there is good Java libraries to do the similar task? I know ...
12
votes
6answers
2k views

Examples of program that writes programs [closed]

Where can I find such programs? I think yacc and lex are this kind of programs? I'd like to see example codes especially in C language.
12
votes
3answers
3k views

Perl or Java Sentiment Analysis

I was wondering if anybody knew of any good Perl modules and/or Java classes for sentiment analysis. I have read about LingPipe, but the program would eventually need to be used for commercial use so ...
11
votes
2answers
3k views

Why do regular expressions in Java and Perl act differently?

My understanding is that Java's implementation of regular expressions is based on Perl's. However, in the following example, if I execute the same regex with the same string, Java and Perl return ...
11
votes
4answers
6k views

How are nested capturing groups numbered in regular expressions?

Is there a defined behavior for how regular expressions should handle the capturing behavior of nested parentheses? More specifically, can you reasonably expect that different engines will capture ...

1 2 3 4 5 21
15 30 50 per page