[ 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: 70 KB, 413x413, Pure_Devil_Haskell.png [View same] [iqdb] [saucenao] [google]
5160856 No.5160856 [Reply] [Original]

Do you know any programming language /sci/?
What are your favorite ones?

Considering you are the math guys I think there could be many /sci/entists who like functional programming (Lisp, Haskell, Scheme..).

>> No.5160865

PHP
do it faggot

>> No.5160866

>>5160856
I should probably learn more. I only know C and Java.

>> No.5160870

>haskell

>>>/prog/1347344018/2

>> No.5160874

Forth, Prolog, Fortran, Algol, C, PHP, Pascal, APL

favorite: C

>> No.5160875

If you 'only' know C and Java, you can already do anything. You should practice your Java and make some more badass client-server applications, GUIs and Tomcat application servers.

I'm a data scientist, so I use those 'real' languages when I have to, but stay in statistical analysis land and program with R quite a bit. It has easy builtins for loading data sets and processing them, making reports and graphics.

Bash shell is sufficient to manipulate filesystems..

>> No.5160878

>>5160856
My favorite was always Visual Basic... I could make fully functional apps in minutes. To this day no RAD tool even comes close, imho.

I program in C# and C++ these days though. Java for web stuff.

>> No.5160891

>>5160874

Is it true that Fortran is very very fast in runtime?

>> No.5160909

Matlab for data, python for programs where the largest runtime is trivial, and C++ for data collection or when absolutely required.

>> No.5160910

I made a vector analysis program in python + open GL for A2 computing. python is generally a good place to start. avoid VB like the plague all it does is teach you to be a sloppy programmer.

>> No.5161068

>>5160891
> Is it true that Fortran is very very fast in runtime?
Yes.
The absence of pointers means that the compiler doesn't have to allow for aliasing, so Fortran is typically slightly faster than C or C++.

>> No.5161095

Know: C, C++, Python, some x86 ASM, JavaScript, and Java. I've also used PHP and R, but I'm not really an expert in them.

Favorite at the moment: Java.

Although I'm still learning it, I simply love it for its portability and OOP enforcement (although that's arguably not a good thing).

>> No.5161099
File: 250 KB, 681x1577, 1349045373105.png [View same] [iqdb] [saucenao] [google]
5161099

I've been learning c++ for a while but I'm a bit bored and want to do something. I'm a mathematician so I'm thinking haskell. any advice?

>> No.5161100

>>5160910
For starting I'd always suggest C++. It teaches you about how computers work, you can easily look at the ASM code generated, etc. Python has too much magic to be useful for teaching, but is very powerful if you don't plan to be a programmer or if you already know the shit.

>> No.5161105 [DELETED] 

>>5161095
>R
Yeah, you're a /sci/ fag.

Im amazed you don't list math lab in there.

>> No.5161107

>>5161095
>R
Yeah, you're a /sci/ fag.

Im amazed you don't list matlab in there.

>> No.5161146

>>5161107

Does R make someone a /sci/fag now? Cool. I used to evangelize about it when sci was new and no one seemed to give a crap because they could just pirate matlab.

these days i'm doing medical research where we prefer layman-readable codebases, and vector/matrix math built in.

>> No.5161152

>>5161100
>Python has ... much magic ... is very powerful if you don't plan to be a [ low-level-electronic-engineer ]

>> No.5161158

I can do Matlab but I'm a retard when it comes to anything else.

>> No.5161163

>Do you know any programming language /sci/?
Yes.
>What are your favorite ones?
C and C++.
>Considering you are the math guys I think there could be many /sci/entists who like functional programming (Lisp, Haskell, Scheme..).
I like functional languages - as toys. They're not practical for actually getting shit donw.

>> No.5161164

>>5161107
It's simply not that popular here. Sure I've heard of it, but I don't really like it or need it at all. Also, I'm a programmer, not a "scientist" by definition. Although I do a lot of AI.

>> No.5161165
File: 3 KB, 500x332, puredata.png [View same] [iqdb] [saucenao] [google]
5161165

I wouldn't want to use it for larger programs, but for small jobs, the visual system PureData uses is quite neat.

pic related

>> No.5161171

Anyone using Processing?

>> No.5161173

>>5161095
>although that's arguably not a good thing
It's one of the few languages that actually has a consistent and good model for OOP.

Most other modern programming languages have a mix of procedural programming and OOP.

Sometimes, java can be very verbose though. Im surprised you would prefer it over the compact python syntax. It's partly because of the static typic. Static typic requires much more glue than for example duck-typing.

And just compare:
HashTable<String, Value> table = new HashTable<String, Value>();

to pythons:

table = {}

Also, something like finding all negative numbers
in a list is as short as:
[n for n in list if n < 0]
in python.
Try doing that in less than 10 lines in java.

>> No.5161181

>>5161099
Haskell is interesting to study from a mathematical point of view and useful for pure symbolic computation, but a poor choice if you want to do any sort of automation (which makes up ~95% of what computers do) or numerical computations.

>> No.5161190

>>5161173
Python is a rather rad programming language, I agree. But I really like static typing and the whole design and environment of Java.

Python is simply perfect for stuff like my genetic algorithms, implementing neural networks, and other cool things, but there are areas where it lacks.

For instance, I can't program robots/AVRs with it (I use C++ for this anyway). Nor can I burn it to my Android phone in a few clicks and view my simulations in realtime while somewhere else. Also, can't make an OS or have any low-level interaction with it. But those two things you can't do in Java either, so it's a moot point.

Anyway, my point is that Java and Python aren't mutually exclusive. I'll probably have projects where I'll use both.

>> No.5161194

>>5161146
They have been preaching about R in my science class.

To me, its just yet another horrible language to add to the list after matlab.

If i really needed to do data-processing on a large scale, i think id build specialized software in a convenient programing language instead of trying to force myself to work with any of those.

>> No.5161212

>>5161194
I agree. There are mature C++/Java/Python libraries for anything you want to do.

>> No.5161215

>>5161190
I've been forced to do a lot of work in java in college. Particularly in a event based framework called Kompics.

Afterwards, when i was done with the courses, i tried to implement my own mini Kompics in python.
And hell if that wasn't 10 times easier to work with.

But maybe it's just me. Im not really a programmer, more of a scripter.

But in my opinion. Everything gets better when you get away from java. And i also prefer C, C++ is just.. too much bloat.

>> No.5161216

>>5161215
But yeah.. maybe im just tired of java.

>> No.5161227

>>5161216
>>5161215
I don't really know enough Java to comment on this. I'm just burning through examples... But I think I can bare with verbosity.

>> No.5161294

>>5161227
Well, i guess you should use whatever tool that lies right in your hand. And indeed, java is very pure when it comes to OOP.

>> No.5161372

Know (= can write idiomatic code): x86 ASM, Agda, Haskell, Scheme, C, Python
"know" (= can write decent code): C#, Java, C++, Perl, OCaml, lots of other shit

Favorite: Agda for mental masturbation, Haskell for anything else. Probably Rust for system programming when it will be finished in 2030.

>> No.5161931

>>5161372

I fucking envy you.

"know" (can write as fast as I think): Pascal
""know"" (can write with frequent accesses to the manual): Python, C, Haskell, LISP, Java
"""know""" (fucking around with Hello World and the manual): Perl, x86 ASM,

I fucking hate Pascal, that was for school. Taught me 75% of what I know of bad desing.