[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math


View post   

File: 201 KB, 638x878, prolanguage.jpg [View same] [iqdb] [saucenao] [google]
2256000 No.2256000 [Reply] [Original]

what is /sci/'s preferred choice of programming language?
I use C++ and Matlab (which is not on the pic).

>> No.2256007

Lisp and perl

C for low level

>> No.2256009

QBASIC

come at me bro

>> No.2256010

C and Java.
Haters be hating.

>> No.2256011

Assembly for code that's got to execute fast, C++ to hod it all together in big projects.

>> No.2256012

assembler

>> No.2256014

Fucking TIBASIC. I programmed the shit out of a quadratic equation solver for my 84.

Also I've fucked around a little with Python, but I hear everything worth doing is done in C or C++. But honestly, I have spent maybe a week or two on it at the most.

>> No.2256022

Mathematica, and python

>> No.2256024
File: 35 KB, 640x480, y-combinator.jpg [View same] [iqdb] [saucenao] [google]
2256024

Haskell.
Erlang.
Scheme.
Lisp.

>> No.2256029

>>2256000

Much agreed. Matlab for random homework problems, labs, and design projects. C++ for any actual programs.

>> No.2256032

anyone here with experience doin mex on c++

>> No.2256034

inb4 brainfuck
inb4 cobol

>> No.2256037

For scientific work (not software engineering mind you). Everything that can be done in c/c++ and matlab can be done in python in a quarter of the time, unless I am writing some code to be distibuted and shared amongst my colleagues, its much faster to write a one-off python script for data processing/capture, statistical analysis, instrument control, etc.

For everything else there is Mathematica.

>> No.2256040

>>2256009
no no. not trolling anyone. i was just curious because a lot of the same work can be done on multiple languages.

>> No.2256050

Python. Nothing I do justifies something complex like the c derivatives

>> No.2256052
File: 856 KB, 5000x5000, Cereal_Guy_in_HD_by_CrusierPL.png [View same] [iqdb] [saucenao] [google]
2256052

Java

>> No.2256062

I thought question was preferred choice.
Not optimal choice given occupation.

>> No.2256089

>>2256062
If you're not choosing the language depending on what you wish to accomplish with it, you're doing it wrong.

That said, C for almost everything, with assembly if I'm playing around with specific hardware or embedded systems and C++ or Java if I absolutely have to.

>> No.2256103

wonder how Ruby would be characterized in OP's image.

>> No.2256113

Ruby because I learned it before Python and have not yet had reason to learn a second scripting language in depth.

>> No.2256114

I program directly in opcodes.
Assemblers are for pussies

>> No.2256117
File: 28 KB, 460x388, japanese-car.jpg [View same] [iqdb] [saucenao] [google]
2256117

>>2256103

>> No.2256135

>>2256114

I turn on each transistor manually.
Opcodes are for pussies.

>> No.2256144

TI basic

>> No.2256169
File: 79 KB, 500x500, 84plus-se-big.gif [View same] [iqdb] [saucenao] [google]
2256169

TI-basic
Z80 assembly

>> No.2256189

Anyone use cobol anymore?

>> No.2256236

>what is /sci/'s preferred choice of programming language?

choice would imply understanding of more than one language, right ?

and most scifags just learned one or two ...

>> No.2256762

>>2256236

Once you know one or two, it's a lot easier to learn another one. The only hard part is relearning all of the libraries.

On the other hand, you could switch over to computer science and have to reset your brain, like >>2256024.

>> No.2256771

amiga basic

>> No.2256778

I just know how to run basic bash commands.

Learning a programming language is on the to-do list. I'll probably start with Python, just for the hey of it.

>> No.2256792

HTML

>> No.2256794
File: 15 KB, 523x398, wot-no.jpg [View same] [iqdb] [saucenao] [google]
2256794

Wot no Fortran?

>> No.2256817
File: 4 KB, 220x178, 1289724175981.png [View same] [iqdb] [saucenao] [google]
2256817

>>2256792
>implying txt isn't better

>> No.2256820

>>2256817

text isn't a programming language, dumbasss. it's just typing, you don't need to memorize anything.

>> No.2256821

Python and Java

>> No.2256837
File: 81 KB, 400x365, 1291463410803.jpg [View same] [iqdb] [saucenao] [google]
2256837

>>2256820
>your face when i can write hello world in notepad

>> No.2256842
File: 2 KB, 64x80, ftepvr.jpg [View same] [iqdb] [saucenao] [google]
2256842

perl

>> No.2256843

>>2256794
Nobody's preferred language is Fortran. Fortran is the Devil. The F stands for FFFFFFFF--.

>> No.2256844

Depends on the task.

>> No.2256855
File: 18 KB, 280x228, 1292271003570.jpg [View same] [iqdb] [saucenao] [google]
2256855

I use HTML!

>> No.2256869

Python is my preference, but the only programming I do these days is for math, so I use Matlab.

>> No.2256901

>>2256012
Assembler and C/C++ is for men.
The rest is for kids.

>> No.2256924

lisp, perl or java for my own work

c and fortran for research projects under profs

>> No.2256933

C++! everything else is just a makeshift!

>> No.2256949

Turing.

>> No.2256961

>>2256792

>HTML
>programming language
>HyperText Markup Language
>markup language
>programming language

fullretard.jpg

>> No.2256964

>>2256169

Basically this, except I mostly use Axe instead of z80 assembly now. All of the speed with none of the fulloffuck.jpg moments.

>> No.2256968

>>2256961

HTML5 supports actual programming, stop being a faggot.

>> No.2256971

>>2256968

Nope, all of the "actual programming" features of HTML5 are ether javascript or server-side scripting languages like php. HTML is still just the markup.

>> No.2256980

PHP isn't slow

>> No.2256986

C & C++

>> No.2257218

Binary.

>> No.2257235

>>2257218
>i can't program

>> No.2257239

>>2256037
>For scientific work (not software engineering mind you). Everything that can be done in c/c++
C and C++ are the worst languages you can use for scientific programming. Even with double float types you have very limited precision to work with. Languages like Python and Perl have infinite floating point precision.

>> No.2257245

>>2257239
I program in python and c, and I'd like you to support your claim of infinite precision.

>> No.2257249
File: 4 KB, 251x205, 1293031363162.jpg [View same] [iqdb] [saucenao] [google]
2257249

>>2257239
maybe you should read his post again...

>> No.2257252

As an engineer (structural), the only thing I have ever used/needed is Matlab. In California Matlab has become the first language people learn and is used in every class.

>> No.2257257

I know C++, C#, vb.net (shut up), JAVA, php (again, shut up).

>> No.2257262

I'm coding in C++ and Python :P

>> No.2257264

>>2257249
>maybe you should read his post again...
ow, whoops, I read the thread than too quickly pulled out a quote to support my post

>> No.2257266

>>2257239
>C and C++ are the worst languages you can use for scientific programming. Even with double float types you have very limited precision to work with. Languages like Python and Perl have infinite floating point precision.
Wat

>> No.2257277
File: 54 KB, 256x353, reaction link laughing.jpg [View same] [iqdb] [saucenao] [google]
2257277

>>2257239 C++ doesn't have infinite precision
Sir, you might want to inform yourself about what classes and such are for.

Pic related. This is what I just did. No kidding.

>> No.2257283

>>2256135
I fab my own ics for each project. You jelly?

>> No.2257294

Python and Fortran

>> No.2257299

>>2257283
I use radiation to create my own copper.

>> No.2257309
File: 170 KB, 400x400, what_the_fuck_am_i_reading.jpg [View same] [iqdb] [saucenao] [google]
2257309

>>2257239
> infinite floating point precision

I think you mean "arbitrary"...

>> No.2257316

Currently I only know Matlab, but I will probably be using C++ next year in writing some engineering simulation of colliding particles/objects.

>> No.2257338

>>2257239

I'm being trolled, yeah, but have you ever tried to run something time-critical on python? Like, solving DFT equations? I guess not, b/c you would know there are no alternatives to C++ and Fortran.

Like someone said, I can't have a favorite programming language since I only hacked stuff in Fortran, C and very little python. But I know what I never want to do again, and that is F77. That's just evil.

>> No.2257352

>>2257338
not who you're replying to, and I agree that Python isn't the fastest language, but check this:

http://docs.scipy.org/doc/numpy/reference/routines.fft.html

>> No.2257357

C and Python.

>> No.2257363

>>2257352

If the integral routines weren't such a bitch, we might switch to it for educational purposes - but as a workhorse, impossible. A colleague uses it for creating input files, though. It's nice for stuff like that, and it is a great scripting language, but that's it. And nothing wrong with that.

>> No.2257373

i program in BASIC and i can't understand why people don't like the GO TO and GOSUB + RETURN commands....

>> No.2257378

>>2257363
You might want to try inline c/c++/fortran code, or wrappers for time-critical applications. The good thing about Python is interactivity and ease of development, plus the huge number of useful libraries. The CASA project, a system for radioastronomical data processing by NRAO is written in Python, offers interactivity using ipython and I suppose uses wrappers for the critical parts.

http://www.scipy.org/PerformancePython
http://docs.scipy.org/doc/numpy/user/c-info.python-as-glue.html
http://www.scipy.org/Cookbook/C_Extensions/NumPy_arrays
http://projects.scipy.org/numpy/wiki/NumPyRefactoring
http://wiki.python.org/moin/IntegratingPythonWithOtherLanguages

>> No.2257441

>>2256037
As a control engineer, I must disagree. There exist some half-completed python libraries to aid in control theory applications, but for anything beyond undergraduate homework problems, the built-in functions of MATLAB (and perhaps Octave to a certain degree) are quite necessary. It would be foolish for me to rewrite the entire Control Systems Toolbox in Python.

>> No.2257474

Am I the only one who prefers C# due to functionality and it being less complex than C++.

>> No.2257489

>>2256000
C, C++, Java.
CS BS and Math BS here.
>CS BS Degree.
>Starting salary 90k/year.
>Feels good man.

>> No.2257494

>>2257239
>C and C++ are the worst languages you can use for scientific programming. Even with double float types you have very limited precision to work with. Languages like Python and Perl have infinite floating point precision.
What do you think the python interpreter is implemented in?

Why do you think you're restricted to using double and can't use your own arbitrary precision floating point class type?

>> No.2257559

I develop software for a number of different projects at work. It seems that every project workgroup has their own favorite language which I get to support. I have had to develop control, data acquisition, data display, and data analysis software in Pascal (Delphi), C (Turbo C and vxWorks), C++ (MFC, gcc, etc...), Basic, Ladder Logic (really), Matlib (actually Octave) and Python. My latest project is a control system in LabView.

I'm just the software development hired gun. Tell me what language you want it in, and you'll get it. Too bad there is no one best language. Life would be simpler if there was.

I personally prefer Python. Unfortunately, my customers don't.

>> No.2257560

python

also actionscript but thats just for shoving together games

>> No.2257623

>>2257239
> Even with double float types you have very limited precision to work with
If you are running into precision problems with doubles, then you need a numerical analyst and improved algorithms, not more bits.

Also, most physicists use C, C++, or Fortran, so they can't be that bad. (A few are moving to Java because of faster development cycles, but the myths about Java performance are hard to dispel.)

>> No.2257649

C++ Simply for the well documented Windows interface.

I would try C#, but if I'm writing a program that's working on a commercial OS I'll want it to be fast, and a language with a garbage collector will never be sufficiently fast in my eyes.

>> No.2257684

>>2256014
nice job wasting your life programming a quad solver when there's 3 ways to solve it with an 84, one graphically and two programmed already.

I use C and python but I'm not making anything too complex either

>> No.2257939

LUA

>> No.2257973

>>2257649
You know that interface is in C right? Of course that also means C++ works as well, but just saying.

>> No.2258028

Try making a complex game and editor in java...


I usually work in C, but i made an exception for this and I'm not liking how the GC is handling my memory and how i have to access OpenGL for a few methods... like instead of sending a float array i have to go through a ByteBuffer which in the end is making my GC have a fun trip through the program

>> No.2258036

I use Python and PHP. I never do anything mathematical though.

feelsbatman.

>> No.2258073
File: 37 KB, 500x453, 1246752979641.jpg [View same] [iqdb] [saucenao] [google]
2258073

Programing: C++
Numerical calculator: Matlab (it's not worth calling a programing language)
Symbolic calculator: http://www.wolframalpha.com/input/; Matlab if there's no internet connection.

>> No.2258094

>no assembly
python
C
C++
Java
all are useful for different things, none are perfect. Deal with it

>> No.2258521

>Java
>useful

best be trolling

>> No.2258676

>>2258521

Java is good for getting real paying programming jobs. Unfortunately, those jobs involve sitting in a soulless cube, connecting the company web pages to the company data base, day after day, while all life and hope is slowly drained out of you. Then your job is outsourced to India, and you wind up living in your car. So yes, Java is actually useful for something.

>> No.2258685

Python, C, Lua, depending on the situation and usually a mixture of two of those. Sometimes I even devise a new minilanguage and toolkits to compile it down to C right there on-the-spot depending on the situation. I love making minilanguages.

>> No.2261002

>>2258521

>> No.2261006

>>2257649
>and a language with a garbage collector will never be sufficiently fast in my eyes

HAHAHHAHAAHAHA omg. garbage collector IS faster. Of course, C and C++ are still faster but it's because of other reasons.

>> No.2261010

BASIC

10 PRINT "FUCK YOU TROLL"
20 GOTO 10

>> No.2261011

C for low level stuff.
C++ for robotics.
C#/Java for everything where performance is not a major feature. It's much better for the programmer.

>> No.2261043
File: 93 KB, 460x327, wargames.jpg [View same] [iqdb] [saucenao] [google]
2261043

i can do HTML and Java (script) for websites.

and GML for games and programs

>> No.2261046

I use Ruby for web application development. I don't really program much else, such such I haven't used any other languages in a long time.

>> No.2261049

C, C++, Javascript, Java & Php.

>> No.2261050
File: 7 KB, 159x140, trolll.jpg [View same] [iqdb] [saucenao] [google]
2261050

>>2261043
>Java (script) for websites

>Game maker language

>> No.2261067

>>2256189
COBOL is still widely used in financial application. Search wiki for it and you're gonna me amazed.

Personally I'm learning assembly. It's so precise, so elegant.
Other than that I programed in basic once and some turbo pascal.

>> No.2261071

C for when I need something that runs small
C++ While dealing with graphical shit
Java for common applications
Haskel for some dense shit

>> No.2261139

>>2261067
>Personally I'm learning assembly.

That's a waste of time. Or do you do it as a hobby? Fire up some emulator for old system, put on "superhits of the 80s" CD and take a virtual time trip?

>> No.2261160

C++ when I need speed ( inb4 assembler and C. Relics belong in museum )

C# when I need fancy GUI ( Often I combine C# for GUI with C++ for processing. Works like charm )

Python when I need to put something small together really fast.

>> No.2262244

C++ for desktop applications.
PHP for web development.

>> No.2262573

>>2261139
> That's a waste of time.

Assembly is worth learning simply to understand what is actually going on with the CPU. My first languages were BASIC then 6502 assembler then C. Being able to program in assembler made learning C pretty straightforward. People who've only ever used high-level languages often have a lot of trouble with C.

Also, you really need to use assembler if you want to develop for 8-bit microcontrollers. Using C on a PIC10/12/16 is pretty inefficient (banked memory, no stack).

>> No.2262578

PHP is a web language. At least you know your cars

>> No.2262586

I've dicked around with Haskell a bit, nothing noteworthy has come of it.

>> No.2262588

>>2262244
This.
Plus "PHP for small scripts etc".

>> No.2262591

Use the right tool for the job.

Python for algorithm design. (MATLAB/Octave for algorithms that lend themselves to the use of matrices)
C++ for speed.

>> No.2262606

>>2262588
Woops, forgot Mathematica

>> No.2262640

> assembly is a waste

are compilers doing brilliant shit with the SIMD registers nowadays? other than the glaringly obvious places to use them, that is

>> No.2262654

>>2256010
This. C is great for low-level programming, particularly because it's what most *nix systems and early Windows APIs use, and Java is great for high-level programming because of its fuckhuge library. The only problem is that it's Java.

>> No.2262675

Matlab and Python.

>> No.2262894
File: 55 KB, 780x585, amiga_snap.png [View same] [iqdb] [saucenao] [google]
2262894

AMOS

>> No.2262902

Perl is the BEST scripting language.

>> No.2262923
File: 30 KB, 355x342, 1264577798660.jpg [View same] [iqdb] [saucenao] [google]
2262923

Assembly coupled with C is wonderful.

>>2262902
>implying Lua isn't the best scripting language

Sorry, bro

>> No.2262959

For what I do, Fortran

>> No.2262997

>>2256843

-1ortran?

>> No.2263077

>>2257649

>and a language with a garbage collector will never be sufficiently fast in my eyes

And yet the only way to make some complex applications performant at all is to write a custom garbage collector for them. This is of course retarded because that garbage collector will never have and advantage over a well built general purpose one.

Good GC's allow you to directly allocate and deallocate memory in the few situations where it would be beneficial.

So basically, your nuderstanding of garbage collectors is retarded and your conclusions are completley wrong.

>> No.2263087

>>2262654

>programming because of its fuckhuge library

And yet the .Net library is better in every way.

>> No.2263112

C++ for speed of trivial command line apps.

Due to the poor design of C++ it is a nightmare to create anything performant with sufficient complexity.

Herp, Chrome is written in C++. Except, it has had thousands of developers working on the different aspects over it for many years. And it still is incomplete and full of bugs and security holes. Yeah for C++.

>> No.2264978

python, matlab, c++

>> No.2265031

The lack of love for Prolog makes me sad. No one on /sci/ does natural language processing or expert systems?

>> No.2265049

>>2265031
Probably because only 1/50 participants in /sci/ are of the homosexual variety.

>> No.2265526
File: 6 KB, 446x361, 1281658681257.gif [View same] [iqdb] [saucenao] [google]
2265526

>>2263112

>> No.2265541

Java.

Learning C++ in my free time.

>> No.2265603

Python, because it's easy and none of my applications need speed.

>> No.2266281

so what does lua come under?

>> No.2266286

>>2265049
>implying /sci/ isn't full of engineers

>> No.2266294

Fortran, like every true Physicist.

If I REALLY have to do objects, I use C++.

I also use python and R, mostly for graphing stuff.

>> No.2266317

>>2266294
>Fortran, like every true Physicist.

*shudder*

I use Mathematica for most of my scratchwork. Once I am in need for more performance, I switch to C++.

>> No.2266324

>>2266317
Mathematica is faggot tier, yes I require a bloated idiot-proof gui to do calculations.

>> No.2266332

>>2266324
It's all about the speed and extensibility of the language. Also, there is no real GUI to Mathematica, it's basically a worksheet coupled with console-like commands. Apart from that, the numerical integration routines in Mathematica are extremely flexible. And we can do parallel computing with a few simple commands - which is, as I said, great for doing scrathwork.

Maybe you can do most of your math by hand, that's great. But once leave the realm, where you can do analytic integration, Mathematica is a great tool.

>> No.2266379

>>2266317
I hope you don't use Mathematica for numerical computation, because that's beyond retarded.

>> No.2266388

>>2266379
And why would that be?

>> No.2266394

>>2266388
Because Mathematica is a software optimized for symbolic computation. It's pathetically slow for anything involving numbers.

If you really want to use something that works out of the box, at least use MATLAB or its clones.

>> No.2266405

>>2266394
Suppose you have a VERY complicated integrand .. and you wan't to take a look at several numerical integration strategies - from adaptive Monte Carlo to straight trapezoidal rule. How many likes of codes does it take to visualize both the integrand and the sampled points from the integration .. in MATLAB?

I can do that in Mathematica in about 4 lines. Also, speed is not too much of an issue here .. since I can always run the computations parallel on all the 15 machines I have access to .. can Matlab to that (as easy as 3 lines or so)?

Sure, if my project seems to be working, I will probably fork it off into some C++, but why would I do this at this early stage?

>> No.2266416

I've developed my own language based on fuzzy logic.

I use it mostly for hacking into computer systems.

>> No.2266417

>>2266405
I'm pretty sure MATLAB is capable of parallelization and that there are plenty of libraries for numerical integration. More than you could find for Mathematica, that's for sure.

>> No.2266419

>>2266405
In which case, sure you'd trust mathefatica's computation result over matlab. Good Luck with that one anon.

>> No.2266432

>>2266417
Of course there are ways to do these things in other packages. The point is that I don't feel like wasting too much time in investigating other methods when Mathematica can do this with way less effort.

Also, you guys underestimate its numerical capabilities. Sure, it's not the fastest thing around, but espescially the integration routines work great in regards of efficiently sampling the integrand - which again gives an additional speed boost compared to quasi-Monte-Carlo sampling, which most other packages do ..

>> No.2266605

oh wow this thread still going strong
>12/26/10(Sun)04:10 No.2256000

>> No.2266652

>>2256000

Learning Lisp as a first language, I know a tiny bit of Python from fucking around with it in High School