/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?

Previous Thread:

Other urls found in this thread:

youtube.com/watch?v=I25UeVXrEHQ
linux.die.net/man/3/cprops
developer.gnome.org/glib
bookzz.org/s/?q=c programming a modern approach&yearFrom=&yearTo=&language=&extension=&t=0
en.wikipedia.org/wiki/Expressive_power_(computer_science)
twitter.com/SFWRedditGifs

...

Does Stallman speak decent German?

Friendly reminder that your C programs aren't worth shit if you don't use at least 4 levels of indirection.

>2001

Java is still better

16 years and Java hardly seems any different

how many layers of indirection are you on?

Have you actually used it in any way?

let's roll

please no hard one

that autistic fat commie hasn't written a lone of code in 3 decades. he doesn't know shit about programming.

fuck you for using his pic for this thread.

youtube.com/watch?v=I25UeVXrEHQ

hey im just a babby and making my first website (to get started) but I am trying to link my css and jQuery into my html file. what is wrong here?

something that's possible in asm please

Wrong thread?

>doesn't know shit about programming
Even though has built basically the foundation for everything modern? GNU ring any bells?

and yet the autistic fat commie is still more useful than you will ever be

>levels of indirection.
What is a level of indirection

It means how many times you can dereference a pointer before you hit the original stack pointer.

Also, what happens when you try to dereference beyond that?
Is it undefined behavior?

this kind of shit is worthless, toxic garbage and the community should shun it. i have nothing against lisp and i even like haskell, but advocating it on this fuzzy ineffable nonsense — this "oh trust me you'll get it when you learn it" horse shit — is antithetical to what should be in a convincing argument. it persuades people that are already on board and offers absolutely nothing to people that are even on the fence except condescension.

philosophers are able to express the nuances of different relatively abstract ontologies; programming languages are designed by humans and should be much, much easier to describe in relatively concrete terms.

if you can't articulate what other languages are lacking that lisp offers, or why haskell is better than java, then stop trying to push it.

he only said a few German words like "kostenlos" (gratis), other than that I don't think he knows German? I could be mistaken. His talk was in English

who here actually enjoys programming in Java every once and awhile?

roll

my textinput is wrong when using cout to print it to the console but if i save it to a file, it's working properly

should i be worried?

what's your favorite piece of software?

i think the webm project is great, plus its open source
>written in c, C++ and Shell

example
>mp4 file: 9.7 MB
>webm file with same quality: 3.2 MB

should we all convert mp4 to webm to avoid wasting space?

i think it's os x because it's great and it just works

org 0x100
use16

mov ax, 0
call print
inc ax
call print
dec ax
mov bx, 1
mov cx, 100
@@: add ax, bx
call print
xchg ax, bx
loop @b
mov ax, 0x4c00
int 0x21

print:
push ax
push bx
push 0
push ' '
push ','
mov bx, 10
@@: xor dx, dx
div bx
or dl, '0'
push dx
test ax, ax
jnz @b
mov ah, 0x02
@@: pop dx
test dl, dl
jz @f
int 0x21
jmp @b
@@: pop bx
pop ax
ret


well that was easy.
re-rolling.

Yes. But the syntax looks fine. Probably an issue with the file paths.

>image viewer
>in 8086
re-rolling

EVERYONE WRITE PHP CSS COMPILERS NOW DONT LET THE BROWSER TAKE ITS TIME BUILD YOUR OWN COMPILERS LIKE LESS COMPILERS AND STUFF FIND THEM ON GITHUB AND USE HTACCESS REWRITING RULES TO REDIRECT THE CSS FILES TO A COMPILER AND THEN COMPILE THEM

>benford's law
Never heard of this. What's the program supposed to do?

ok assuming I want to make a service where you can request to look at files of other peoples computers.
I've thought of a python script that gets automaticly put in the startup services, depending on the distro.
any better ways to do it?

>tfw 'programming' assembler 8051 in class and teacher is probably not a very good one

For more than a year we program basic stuff like chaser lights, pyramids and bar graphs. I get it, but I'm slow as fuck compared to C# and C (via CVI), which we also learn. E.g. I can complete any assignment, but only if time is unlimited. In case of a test or smth I'm pretty much fucked.

How do I get to do this easier besides writing actual code for the n-th time? What is the particular mindset I need for this to speed my assembler(((skills))) up?

>tfw you missed out on the mobile development gold rush
>even Tom Hanks has a best selling app before you

keep practice writing code it's that simple
I only really understand how to design and structure programs by coding coding research coding coding coding more research etc

you can still make good money making mobile apps but they have to be good I made lots of money making an eccomerce type of web business app

It's just nice to fantasize about making flappy bird or w/e where you're just suddenly a millionaire

you can still make lots of money making those simple addictive fun games look at Undertale or Dwarf Fortress you gotta be creative and unique

My bad guys, thanks for the reference.

>find a top 100 app in appstore
>refactor gui so no plagiarism
>add a new feature which people would actually like
>?????
>prophet

so much this look at all the pros and cons of top applications and you will find something unique to put together to make some coin

For C
cprops: linux.die.net/man/3/cprops
or
glib :developer.gnome.org/glib

Memery aside, I don't get all these people claiming Lisp will set your mind free. Your language is homoiconic and can do macros, sure, that's cute, but I fail to see what the fuck makes it so mind-blowing.

I'm probably not the best person to ask since I'm slow too. Then again I only recently started learning 8086, all google no teacher.
Just practice more I guess, do these challenges, find multiple ways to tackle the same problem, etc.

C++

Fuck off Bjarne nobody likes you.

What language is best for competitive programming? Should I use a (relatively) low level language like C++ for speed or a high level one like haskell or scheme for less boilerplate and more expressive power?

In programming competitions, you write what you know best, and you better have practiced it 1000 times before.

>competitive programming
As in what?

I think it is because you can write domain specific languages quickly with macros and layered abstraction (separation of concerns). This makes code more robust (errors affect less code) and prototyping becomes much easier.

#include
int main(void){
printf("Hello World!\n");
return 0;
}


Where do I learn more? This is the only program I can write without looking anything up.

I would choose python even though I know lisp or java better.
Lisp tend to be little verbose and require more thinking, java is just verbose and requires compiling.

With python you get interpreted language with kind of terse syntax which I feel is great for fast prototyping and hacky scripts.

But is it worth it to develop your skills in a high level language? Or are all (mainstream) languages equally good

I'm good with python and sql but want to move into more serious dev work

We have an account with Treehouse at work, so I have free tutorials for:
>Java + weeb dev
>C#
>Ruby (plus rails)
>Django/Flask
>JS
>HTML/CSS


What do I learn

C#

Is there a way to do this without using a lambda?
rleEncoder x = zip (map length $ group x) (map (take 1) $ group x)
rleDecoder = concat . map (\(x,y) -> replicate x y)

bookzz.org/s/?q=c programming a modern approach&yearFrom=&yearTo=&language=&extension=&t=0

>tfw scheme is literally easier than python
I still consider myself generally unable to program but it was kind of fun living the dream momentarily and writing some small programs (such as getting the sum of two user-inputted numbers)

working with git for the first time, can others see the contents of my local repository?

the image is missing Java
>chubby
>clumsy
>kind of a slut

are there any other sites like codecademy, but that you'd consider better? I think something interactive would work better for me than reading, also I'd like more language choices since codecademy seems to mostly be for webdev memes

those choices aren't very good IMO, but I guess Java

cringed pretty hard from this "post"

don't forget some sort of suit or bubble to represent the JVM

you mean a wheelchair

Please continue learning scheme! It's a wonderful language

this. but then also learn something statically typed so your brain doesn't get crippled by dynamic typing.

>Also, what happens when you try to dereference beyond that?
Pic related.

c# or java. everything else on your list is basically a meme

Theres java in the full image

>using "meme" in this retarded way
fuck off back to your home "website"

tfw no perl bf |female|
tfw no autistic R gf
tfw no bratty scala gf
tfw no resource hog VB gf

here's your (You)

>9gag.com
so that's where you came from? yeah, fuck off back to that shithole. whatever that is.

>9gag
You are disgusting.

We just started interfaces this week why do sent this fuckin method work it's the last one I need.

public int compareTo( Object obj )
{
Monster rhs = (Monster)obj;
if(myHeight > rhs.myHeight && myWeight > rhs.myWeight && myAge > rhs.myAge)
return 1;
else if(myHeight < rhs.myHeight && myWeight < rhs.myWeight && myAge < rhs.myAge)
return -1;
else
return 0;
}

Roses are red
Violets are blue
Java's for monkeys
Who don't poo in the loo

It's only returning 0 for some reason

...

I think 'expressive power' and 'elegance' are fairly well-defined.

this is too easy

>the community
good post. if not for this absolute retardation.

also laughed pretty hard at the part where you called Stall"man" a philosopher

rleDecoder = concatMap $ uncurry replicate

like,, maybe 5, or 6 right now. my dude

Why program anything unless you get money from it?

you are like a little baby

watch this

STRUCT

in the planning stage of my next project and have a conundrum on how to tackle a problem.

Basically, comparing very similar XML files and displaying the differences. Mainly focusing on console/report but might look into GUI.

I could use a library like XMLunit but not sure on performance. Maybe build tress and compare them against each other. I will care about order of that as the XML files are basically maps of a web app, just need to compare changes between versions

No. They're not. Because expressive power is very different depending on your goals. For some applications C and the likes are very expressive. For others higher level languages are more expressive.

As for elegant i don't even know what that supposed to mean. It sounds like a 'pretty code' thing.

Actually, that's not what 'expressive' power is usually taken to mean in PLT:
en.wikipedia.org/wiki/Expressive_power_(computer_science)

As for elegance, it essentially means 'minimal': you can express all of the necessary concepts by combining only a few atomic pieces (e.g., the half-dozen or so axioms of LISP).

Anyway, I can see you have a chip on your shoulder about this, so I'll leave you to it.

agreed lets all make business web apps together who is with me?

I suggest we program virtual reality for women clothes accessories we would make a ton of money

can't you just do this with diff?

how about you try them and then list the reasons they're better? perhaps its userbase is not the best with words

Man I really don't know if this is a stupid question but I need help.

I have XLM data in a clob in a db2 database. I am not trying to query particular parts of it, instead I just want the entire thing. I just need to grab and display the xml in a jsp. Is there any way to do this easily? The formatting of the XML isn't regular so I just want it posted in the same formatting it went in as.

Lisp > Fortran > Cobol

for fun and/or helping out your neighbor or yourself

e.g. adding support for some of your hardware to a free software project

I really like your vision! I also want a VR app that can create a "dream girlfriend" and input personalities of someone we know/knew. It would be fun interacting with her, like incorporating dress-up features from your app. Now, are you comfortable being the programmer and I run the business side?

Cool, I'll make the logo.

>X > Cobol

Really not saying much m8.

why compare these three? are they similar? I know the latter two are extremely old

does this even need to be mentioned?

Are you printing unicode characters? A screenshot would help