Jump to content
IGNORED

Programming


zlemflolia

Recommended Posts

 

Another programming paradigm that's pretty interesting but academic is declarative programming, like Prolog. In declarative programming you don't write "commands" but you give rules on relations between things.

Check this Sudoku solver written in 15 lines of code: http://programmablelife.blogspot.co.at/2012/07/adventures-in-declarative-programming.html

Interesting! But does the "actual" problem solving take place in the compiler, then?

 

Sort of, the interpreter tries to disprove the negated version of the claim the programmer is making. It goes pretty deeply into logic.

 

The programming is funnily backwards compared to conventional programming. For example if you want to get all the permutations of set S you ask something in the vein of "Supposing T is a permutation of S. What are the possible values of T" and Prolog then gives you all the possible permutations.

Link to comment
Share on other sites

  • Replies 467
  • Created
  • Last Reply

So we have a "no" and a "sort of". Next thing you know, is that we come to the conclusion this problem is undecidable.

 

But I guess I'm getting to much into being fuzzy ;-p

Link to comment
Share on other sites

Kinda. If a problem has multiple solutions you can force the program to "backtrack" to find a different solution. Or all solutions, if you're interested. It's kind of brute force, so don't think there's much "computational intelligence" involved in the executing phase, of the compilers phase. The problem is effectively solved - in an inductive way - during programming.

 

That's one of the reasons this question/asnwer project was such a mindfuck. I was basically forced to come up with an inductive solution for a natural language problem. Kinda like Chomsky's universal grammar is supposed to be an inductive solution to all natural languages. Complete mindfuck, I tells ya.

Link to comment
Share on other sites

I may have to start reading the full threads before answering them. :cisfor:

 

Anyway, I knew about Prolog a bit from school, but I studied it just recently to see if I could use it to generate SQL queries based on the knowledge of what kind of data was wanted. Then I decided that I was probably asking for trouble if I went that way. The possible problem cases would be hard to debug because the behavior of the code is not that obvious.

Link to comment
Share on other sites

Guest Iain C

Is anyone here into programming of any sort

 

If so what's your favorite language and what's the most complicated thing you've ever written

 

Haha, how did I guess that the MRA fuck-knuckle is a programmer?

Dude you've got to calm down on your recent caustic postings - it's not gone unnoticed by many here ...

I like you Pete but if you're going to threaten me make it concrete at least. He IS an MRA fuck-knuckle.

 

Sent from my Galaxy Nexus using Tapatalk 2

 

 

Link to comment
Share on other sites

 

 

I did a couple years of a CompSci degree. Java was the starting language, then C/C++. did some other shit on the side, couple of assemly languages, couple of scripting languages. I was really interested in AI-oriented stuff but I dropped out eventually.

 

now at work I code in SAS, which is a statistically-oriented collection of software systems that includes its own proprietary language. it's dogshit, seriously. they have something of a monopoly on this in the stats field so they have little motivation to improve any of their systems. I don't know what they funnel their exorbitant licensing fees into. most of the time when I code in SAS, I bypass the built-in language and use SQL instead via the proc sql invocation.

I use SAS a bit at work. Mainly use STATA though and am learning R. For Excel I do quite a bit of complex VBA stuff.

 

 

R is used by some of our methodology people for more pure mathematical analysis/modelling, but it's not used in actual survey operations teams for queries or daily tasks, for obvious reasons. I mean, from what I've heard/seen of R, it's more of a lab tool, no? btw there've been incidences where someone in Methodology has run really computationally-intensive code in R which has brought the entire NSW regional network to a standstill, lol.

 

what's STATA like?

 

STATA is alright but I probably only use 5% of its functionality. For dataset manipulation, regressions and bootstrapping it's pretty easy to right a couple of lines of code and produce all the output ready for the report.

 

R is extremely powerful, especially if you do want to multi-thread massively expensive models and simulations, however for the work I do (health economics and simulation) it's not particularly intuitive and it's like a very very complicated swiss army knife (at least that's how it feels). A lot of my work drifts into optimisation and bayesian stats and experts in this area love R so it's quite easy to find open-source packages to do complex stuff. The open-source/collaborative aspect of R is extremely appealing. All the pharma company statisticians have moved over to it.

Link to comment
Share on other sites

 

Is anyone here into programming of any sort

 

If so what's your favorite language and what's the most complicated thing you've ever written

 

Haha, how did I guess that the MRA fuck-knuckle is a programmer?

 

Quiet you white knight wet towel

Link to comment
Share on other sites

I would like to know what an MRA fuck-knuckle is.

 

 

edit*

 

I am being serious.

I made a thread once that advocated the rights of men ("MRA" = Men's Rights Advocate) and pointed out evidence of ways in which men are discriminated against like the draft in the US, the workplace death gap (90% male to 10% female conservatively) and discrimination against young boys in the US education system, and he just got very mad and outright denied any of this is true.

 

Anyway enough of this

 

-

 

I'm a CompSci major as well heading into my second year and have taken a Java class. I'm a bit behind on pure programming classes because I moved into the major late but I'm ahead in all math classes.

 

I've self studied a bit of C++ and started out with TI basic which got me into programming to begin with, making little dice programs on my calculator during class

 

I mainly make bots for video games nowadays in my free time and am building a platform for making them which allows them to be extremely humanlike and almost undetectable

 

 

Oh and to the guy who said he doesn't understand the reason for pointer and classes, classes are very useful for allowing portability of your functions. You don't want to have to copy and paste a function into your project every time you make something, just import the class and you can use it along with all other ones related to it. And for OOP (object oriented programming) it's just 100% necessary to use classes for creating objects obviously.

 

Pointers are great for extremely fast recursion without having to copy data. I can't think of many places where it's needed but there are some. The general guidelines with pointers are, never use them. They're only "needed" if you have to fuck around with passing some large data structure as an argument and don't want to waste time copying it, and in game modding. That's the extent of my knowledge on pointers as I've only self studied C++ and only really learned the things I "need" for my uses

Link to comment
Share on other sites

Oh and from what I've seen "R" looks really cool

 

I was trying to find some good interpolation algorithms for smoothing 2d paths and they always seemed to come up with sources in R

 

I've been facing a relatively major problem involving winapi timeslice inaccuracy for high frequency looped queries on mouse coordinates and I need to make up for that by interpolating smooth data between updates (which take 15ms to complete which is way too long for me)

Link to comment
Share on other sites

 

I'm a CompSci major

 

The general guidelines with pointers are, never use them.

 

:cerious:

 

Lol am I incorrect

 

If you can avoid them then do it unless it offers significant performance gains. The cases where they are absolutely necessary are rare

Link to comment
Share on other sites

?

I can not remember writing in C without the use of pointers. It's basically the oxygen of C.

 

And C++, I presume. That's basically just a bunch of extra libraries, right?

Link to comment
Share on other sites

Even if you want to use references all the time it isn't always feasible. You can't assign or return a NULL reference or you can't do pointer arithmetic on references. I never pass custom objects by value because why would you? You just need good ownership rules so you know who needs to free what at what point. I like using C++ because it's so powerful but it's a beast of a language. There are so many features and every codebase has vastly different style guides and usage patterns. It makes me want to wrap every library I use into a wrapper to get some consistency in my codebase.

 

My day job is programming websites, which is mostly very boring. These days I'm toying around with OpenGL (4 core), writing some utilities to help me play around with the math and pipeline. I don't have a computer science background and I'm not particularly smart or driven so it's taking a lot of time and pretty much everything I write needs a refactor before I even start typing but it's good fun. I think the modern OpenGL pipeline is quite beautiful.

 

And C++, I presume. That's basically just a bunch of extra libraries, right?

No, it's a lot more than that. It adds a lot of language features. A lot of them you wont find in other popular languages. C is a fairly simple and lean language, C++ is not.

Link to comment
Share on other sites

Guest tht tne

my cousin is coding an app to help colourblind people choose matching clothes, no idea which language

Link to comment
Share on other sites

 

 

 

I'm a CompSci major

 

The general guidelines with pointers are, never use them.

 

:cerious:

 

Lol am I incorrect

 

If you can avoid them then do it unless it offers significant performance gains. The cases where they are absolutely necessary are rare

 

 

 

accessing memory must be quite a rare thing then, lol. :cisfor:

 

 

 

ima outa hrrrr

Link to comment
Share on other sites

 

 

 

I'm a CompSci major

 

The general guidelines with pointers are, never use them.

 

:cerious:

 

Lol am I incorrect

 

If you can avoid them then do it unless it offers significant performance gains. The cases where they are absolutely necessary are rare

 

 

 

accessing memory must be quite a rare thing then, lol. :cisfor:

 

 

 

ima outa hrrrr

 

okay well obviously youre always using pointers but explicitly defining a pointer and using shit like pointer arithmetic instead of using offset operators is just stupid and as far as im aware should be avoided if you can. Then again I just started C++ so whatever I may be wrong lol

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.