Jump to content

Recommended Posts

  On 6/4/2013 at 2:58 PM, th555 said:

 

  On 6/4/2013 at 2:24 PM, mokz said:

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.

electro mini-album Megacity Rainfall
"cacas in igne, heus"  - Emperor Nero, AD 64

Link to comment
https://forum.watmm.com/topic/79152-programming/page/2/#findComment-2017031
Share on other sites

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
https://forum.watmm.com/topic/79152-programming/page/2/#findComment-2017039
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.

Edited by goDel
Link to comment
https://forum.watmm.com/topic/79152-programming/page/2/#findComment-2017055
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.

electro mini-album Megacity Rainfall
"cacas in igne, heus"  - Emperor Nero, AD 64

Link to comment
https://forum.watmm.com/topic/79152-programming/page/2/#findComment-2017068
Share on other sites

Guest Iain C
  On 6/4/2013 at 1:35 PM, mcbpete said:
  On 6/4/2013 at 12:09 PM, Iain C said:
  On 6/4/2013 at 1:21 AM, Zeffolia said:

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
https://forum.watmm.com/topic/79152-programming/page/2/#findComment-2017291
Share on other sites

No-one is threatening anyone. Jeez man, you really need to calm down a bit and stop jumping down peoples throats ...

I haven't eaten a Wagon Wheel since 07/11/07... ilovecubus.co.uk - 25ml of mp3 taken twice daily.

Link to comment
https://forum.watmm.com/topic/79152-programming/page/2/#findComment-2017296
Share on other sites

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

 

 

edit*

 

I am being serious.

Edited by thanks robert moses

through the years, a man peoples a space with images of provinces, kingdoms, mountains, bays, ships, islands, fishes, rooms, tools, stars, horses and people. shortly before his death, he discovers that the patient labyrinth of lines traces the image of his own face.

Link to comment
https://forum.watmm.com/topic/79152-programming/page/2/#findComment-2017414
Share on other sites

  On 6/4/2013 at 2:19 PM, usagi said:

 

  On 6/4/2013 at 1:44 PM, jhonny said:

 

  On 6/4/2013 at 7:54 AM, usagi said:

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.

Edited by jhonny
Link to comment
https://forum.watmm.com/topic/79152-programming/page/2/#findComment-2017415
Share on other sites

  On 6/4/2013 at 12:09 PM, Iain C said:

 

  On 6/4/2013 at 1:21 AM, Zeffolia said:

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
https://forum.watmm.com/topic/79152-programming/page/2/#findComment-2017470
Share on other sites

  On 6/4/2013 at 9:10 PM, thanks robert moses said:

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
https://forum.watmm.com/topic/79152-programming/page/2/#findComment-2017484
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)

Edited by Zeffolia
Link to comment
https://forum.watmm.com/topic/79152-programming/page/2/#findComment-2017490
Share on other sites

  On 6/4/2013 at 10:23 PM, phling said:

 

  On 6/4/2013 at 10:04 PM, Zeffolia said:

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
https://forum.watmm.com/topic/79152-programming/page/2/#findComment-2017533
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
https://forum.watmm.com/topic/79152-programming/page/2/#findComment-2017537
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.

 

  On 6/4/2013 at 10:49 PM, goDel said:

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.

Edited by Ego
Link to comment
https://forum.watmm.com/topic/79152-programming/page/2/#findComment-2017545
Share on other sites

 

  On 6/4/2013 at 10:47 PM, Zeffolia said:

 

  On 6/4/2013 at 10:23 PM, phling said:

 

  On 6/4/2013 at 10:04 PM, Zeffolia said:

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

Edited by Guest
Link to comment
https://forum.watmm.com/topic/79152-programming/page/2/#findComment-2017555
Share on other sites

  On 6/4/2013 at 11:01 PM, phling said:

 

  On 6/4/2013 at 10:47 PM, Zeffolia said:

 

  On 6/4/2013 at 10:23 PM, phling said:

 

  On 6/4/2013 at 10:04 PM, Zeffolia said:

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
https://forum.watmm.com/topic/79152-programming/page/2/#findComment-2017577
Share on other sites

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   1 Member

×
×