[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

/dpt/ - Daily Programming Thread

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 335
Thread images: 40

File: CWQ3U5vWoAAgjuR.jpg (39KB, 600x419px) Image search: [Google]
CWQ3U5vWoAAgjuR.jpg
39KB, 600x419px
Kaljaaaaaaa edition

Old: >>59418657
>>
C is the most productive and practical programming language today.
>>
>>59423393
You mean Russian.
>>
>>59423406
>Productive
Factually incorrect
>>
Reminder that you're not a programmer if you'd be screwed if your language disappeared.
>>
>>59423390
JS is a really good, useful and extensible language in its heart.

If you're complaining about === in 2017 it's you who's the retarded kid
>>
>no animinos
>>
>>59423438
I can program solely with logic gates.
>>
>>59423444
>dynamic typing
It's garbage.
>>
>>59423393
125 byte compiled hello world
nasm -f bin filename
this

org 0x00010000

Elf64_Ehdr:
db 0x7F, "ELF" ; e_ident[EI_MAG0 -> EI_MAG3]
db 0x02 ; e_ident[EI_CLASS] (64-bit)
db 0x01 ; e_ident[EI_DATA] (litte-endian)
_start:
inc ebx
mov ecx, msg
jmp _mid
db 0x00

dw 0x0002 ; e_type (executable)
dw 0x003E ; e_machine (x86_64)
dd 0x00000001 ; e_version

dq _start ; e_entry
dq Elf64_Phdr - $$ ; e_phoff
_mid:
mov al, 4
mov dl, len
int 0x80 ; e_shoff
xor al, al
inc al
int 0x80
dw Elf64_Ehdrsz ; e_ehsize
dw Elf64_Phdrsz ; e_phentsize
Elf64_Phdr:
dd 0x01 ; e_phnum, p_type
dd 0x05 ; e_shentsize, p_flags ;; modifyable
dq 0x00 ; e_shnum, p_offset
dq $$ ; e_shstrndx, p_vaddr


Elf64_Ehdrsz equ $ - Elf64_Ehdr

dq 99 ; p_paddr
dq filesz ; p_filesz
dq filesz ; p_memsz
dq 0x0000 ; p_align

Elf64_Phdrsz equ $ - Elf64_Phdr

msg equ $
db "Hello, World", 0xA
len equ $ - msg

filesz equ $ - $$
>>
File: 1486343646104.gif (29KB, 482x800px) Image search: [Google]
1486343646104.gif
29KB, 482x800px
>>59423456
Haskellfag identified
>>
>>59423459
What do you think her (his) favorite programming language is?
>>
>>59423459
oops wrong image DELET DELET DELET
>>
Are coeffects worth learning about?
>>
>>59423458
Your shit is fucking bloated.
>>
#include <limits.h>

if (a < INT_MAX)
a += 1;

I wonder if any compiler with optimization throws the if clause away, that'd be some nasty shit desu. Because why not? INT_MAX+1 is undefined, so "if" is clearly unnecessary
>>
>>59423458
>org 0x00010000
but why?
>>
>>59423459
>that balls strap

I didn't want to fap so soon anon
>>
How do I optimize a number cruncher?
>>59423459
That's fucking lewd dude.
>>
>>59423444
It's not just ===, it's everything about javascript that's fucked and just crappy duct tape patches over the god awful original parser.

>JS is a really good, useful and extensible
It is none of those things.

>in its heart.
As long it meant well, all that's important. Right?
>>
File: whichRxORAkka.png (190KB, 1762x684px) Image search: [Google]
whichRxORAkka.png
190KB, 1762x684px
Should I learn either? If so, which one?
>>
>>59423507
JavaScript was originally intended to be Scheme (or maybe Lisp) in the browser.

It failed at that.
>>
>>59423482
>fucking bloated
>custom ELF header
>125 byte executable
lmao

>>59423491
it shits the bed with anything lower, anything higher is fine
>>
>>59423178
Usually, what would be undefined behaviour in C is prevented by the type system, garbage collection, omitted features, etc. of higher level languages. Rust is one exception - safe Rust prevents all undefined behaviour with only some bounds checks and things like that. And you can dip to the unsafe fragment if you want to drop the bounds checks, but potentially incur undefined behaviour.
>>
>>59423538
http://www.muppetlabs.com/~breadbox/software/tiny/teensy.html
>>
>>59423538
>it shits the bed with anything lower
is that a NASM issue or an ELF issue?

The ELF header should be the first thing in the file, right?

So then why offset by 0x10000? Does that insert 0x10000 zeroes before the header?
>>
>>59423487
No, having a == INT_MAX is perfectly valid. It would just not increment when it's INT_MAX, no undefined behavior here.
>>
>>59423507
>>59423537
http://javascript.crockford.com/javascript.html
>>
File: js.jpg (792KB, 3264x1836px) Image search: [Google]
js.jpg
792KB, 3264x1836px
>>59423574
>>
>>59423554
that only returns 42, and isn't 64-bit, this prints hello world and is 64-bit

>>59423555
I don't properly understand it, but it's an offset on the page it's loaded into
when it's compiled, the first thing is the ELF header, and there aren't any leading zeroes
>>
>>59423580
Yeah, that's exactly what I meant when I said "in its heart".
>>
File: 1489461249483.jpg (41KB, 600x300px) Image search: [Google]
1489461249483.jpg
41KB, 600x300px
>>59423393
Reminder you're not a true programmer if you work with other people on project, you're just a replaceable cog in a machine if so. Work by yourself, you are the machine.
>>
>>59423589
You could say the same for most languages. Try harder.
>>
>>59423596
You can just read the book you yourself posted for the arguments
>>
File: uriel.png (109KB, 500x375px) Image search: [Google]
uriel.png
109KB, 500x375px
I already miss him. 《〠_〠》 Who will I look to now to protect me from harmful software?
>>
Well, we are stuck with javascript anyway
>>
>>59423604
The same book would be much larger for other languages.
>>
>>59423574
A javascript apologist with his history lesson is irrelevant.

>b-but it wanted to be lisp
Fine, but a lisp is easier to implement and that explain the 20 million other retarded things.

Fuck javascript.
>>
>>59423609
Look to rms.
>>
>>59423618
Maybe

The key idea is that things that are great about Javascript aren't the same things that are great about other languages

>>59423620
He's on the technical committee

Stop bully
>>
Bjarne, hvorfor skapte du et så forferdelig programmeringsspråk?
>>
>>59423609
>already
He died 5 years ago and they started shitposting half a year later.

Get over it.
>>
>>59423585
>I don't properly understand it, but it's an offset on the page it's loaded into
>when it's compiled, the first thing is the ELF header, and there aren't any leading zeroes

I haven't ran your code, but I assembled two copies, one with "org 0x0" and one with "org 0x1ABCD".
Using the "readelf -a" shows that both binaries have different entry points, "0x600" and "0x1abd300" respectively.

However, these are virtual addresses anyway, so I just don't understand why it makes a difference. Are very "low" virtual addresses reserved by the OS on each process?
>>
>>59423652
Fuck javascript and fuck him. I hope he dies with a that up his ass.
>>
>>59423652
Other languages have features that are greater than anything JavaScript has.
>>
File: stop.jpg (70KB, 572x497px) Image search: [Google]
stop.jpg
70KB, 572x497px
>>59423683
>>
>>59423716
>bullying
>gatekeeping
>elitism
Are these the new /dpt/ memes?
>>
>>59423702
do they work in browser tho
>>
>>59423732
Yes.
>>
>>59423727
Bullying has always been a anime poster meme, it's usually accompanied with yuru images to show that not bullying people can be cute.
>>
File: 1464833019555.jpg (50KB, 504x446px) Image search: [Google]
1464833019555.jpg
50KB, 504x446px
>>59423762
>4chan has reached the point where people are now called "anime poster" because this isn't assumed
multiculturalism and immigration have destroyed this website
>>
>>59423664
>5 years
has it really been that long?
>>
>>59423777
this, refugees need to assimilate or gtfo
>>
>>59423682
>I haven't ran your code, but I assembled two copies, one with "org 0x0" and one with "org 0x1ABCD".
>Using the "readelf -a" shows that both binaries have different entry points, "0x600" and "0x1abd300" respectively.
both segfault, 0x1A000 doesn't though
>However, these are virtual addresses anyway, so I just don't understand why it makes a difference. Are very "low" virtual addresses reserved by the OS on each process?
based on this I'd have to assume so, since another executable built with nasm -f elf64 starts at 0x4000b0, gcc at 0x400470, 0x400450, or 0x400450
so there has to be some part of the page that is unusable, or is used by the operating system for accounting (e.g. /proc/)
>>
>>59423777
I've been here forever, it was a response to the post style. Not in any way anti anime.

Get your shit together.
>>
File: rum_raisin_flavor.png (402KB, 500x451px) Image search: [Google]
rum_raisin_flavor.png
402KB, 500x451px
>>59423777
>4chan has reached the point where people are now called "anime poster" because this isn't assumed
This website should have died a long time ago. Simpsons-chan.
>>
>>59423805
Is there any way to see what virtual memory linux will reserve?

I checked /proc/xxxx/maps for a bunch of my processes, and none of them have entries before 0x400000
>>
>>59423805
>>59423845
Just glanced at posts but you may find the reason for the behavior by looking at fs/exec.c or fs/binfmt_elf.c
>>
I'm trying to make a masm program which reads a user's input as a string, and then parses each char to print an error message if the user enters any non-numbers (i have an idea bout how to do this, compare each char value to ascii) but I need to get the singular char value in order to compute.

this is what I have, but with the user_input being "12ab" it prints out "00", as well as any user_input of any length will print out "00", am I using loadsb incoreectly when trying to load each char into the eax register? My goal is to load each char into eax, compute, than increment to the next char until the loop reaches the end of the string

    ;if user enters non-digit number: display error message, jmp get_input
;user input is byte user_input,
cld ;set direction to forward
mov esi, offset user_string ;esi = source index
mov ecx, LENGTHOF user_string ;set search count
mov edi, esi ;set destination index
L1:
lodsb ;load [esi] into eax
mwritedec eax ;mwritedec is a macro that prints decimal, trying to get each char into eax register
;ex: if user inputs "be45", eax will have the value of "b", then "e", then "4", then "5"
stosb ;store eax into [edi]
loop L1

>>
>>59423879
Thanks for the tip

>fs/exec.c or fs/binfmt_elf.c
Those files are pretty large, any ideas on what I should be looking for?
>>
What are coeffects?
>>
>>59423845
I'm not sure if there is, or what comes before virtual address 0x400000, but I'll take the other anon's advice to see if there's any reason for it

>>59423879
thanks anon
>>
>>59423935
CIA niggers

Avoid
>>
File: languages3.png (17KB, 522x384px) Image search: [Google]
languages3.png
17KB, 522x384px
Reminder
>>
File: 1467763101771.jpg (33KB, 500x326px) Image search: [Google]
1467763101771.jpg
33KB, 500x326px
I'm graduating university in two months.

What programming skills should I start learning?

Don't say algorithms, data structures, programming language, regex, version control systems, object oriented programming, function programming, or Linux. I've been programming for 7 years or so, and I've got at least the minimum amount of knowledge about this stuff.

What's recent and what'll get me a job? Specifically interested in cloud technology, web frameworks, web development, testing frameworks, and libraries. Tensorflow? Is anyone doing work with that?
>>
>>59424158
functional programming
>>
>>59423914
>>59423943
A passing thought, what about mmap_min_addr?
>>
File: meme.png (7KB, 555x223px) Image search: [Google]
meme.png
7KB, 555x223px
>>59424089
reminder
>>
File: 1462747190886.gif (172KB, 500x506px) Image search: [Google]
1462747190886.gif
172KB, 500x506px
>>59424171
Yeah, meant to say that.
Said "function programming" instead. Derp.
>>
>>59424187
>my language is garbage b-but more people use it
>>
All /dpt/ posters are women pretending to be men (some of whom pretend to be women), prove me wrong
>>
>>59423914
I found it at line 84 in fs/binfmt_elf.c:
#define ELF_PAGESTART(_v) ((_v) & ~(unsigned long)(ELF_MIN_ALIGN-1))

ELF_MIN_ALIGN is a macro for PAGE_SIZE, which is 4096 bytes by default, and the above macro is just the twos compliment for it, so 0xFFFFF000 or -0x1000
this would make sense for `org 0x1000` in the assembly, but that seems like it would be the last entry in the page.
so _v would have to be something >= 0x400000 because of the page size
I'll look some more and see if there's a reason for this
>>
>>59424158
why is "recent" a factor? If you look at job postings in my area there's more openings for people experienced with Java or PHP than trendy JavaScript frameworks or sub-phd machine learning
>>
>>59423885
please
>>
>>59424173
>>59424239
Looks promising!

I found a couple functions in fs/binfmt_elf.c: "load_elf_interp" and "load_elf_binary". Both of these are large functions that could be handling this virtual address stuff. They both make reference to a macro called "BAD_ADDR", but I'm not sure if that's relevant to this problem.
>>
>>59424418
http://stackoverflow.com/questions/14314021/why-linux-gnu-linker-chose-address-0x400000 says a little about ld's involvement in this, but it doesn't explain why this is
>>
>>59424258
That's an interesting point.

Yet I still feel like I've been stuck in the stone age, and that's partly becuase /g/ is still arguing about vim vs emacs.

It's a fun argument to have, and CLI editors are still more A E S T H E T I C than guis like Visual Code, but I want to be the trendy hipster.
>>
>>59424418
>>59424480
http://stackoverflow.com/questions/39689516/why-is-address-0x400000-chosen-as-a-start-of-text-segment-in-x86-64-abi
>[...] why was it moved to exactly 0x400000 (4MiB)? Here, I came empty so, summarizing what I've read in the ABI specs, I can only guess that it felt "just right":
>It's large enough to catch any likely incorrect structure offset, allowing for larger data units that amd64 operates on, yet small enough to not waste much of the valuable starting 2GiB of address space.
> It's equal to the largest practical page size to date and is a multiple of all other virtual memory unit sizes one can think of.
>>
File: test (2).png (716KB, 811x599px) Image search: [Google]
test (2).png
716KB, 811x599px
>>59424158
Quantum computing.
>>
>>59424499
>>59424525
also, continuing on the point in the stackoverflow answer, the entry address on a 32-bit system is 0x8048000, based on a binary whose entry point is 0x8048300 and looking around in /proc
>>
File: nani128.jpg (46KB, 600x600px) Image search: [Google]
nani128.jpg
46KB, 600x600px
>>59421233
if rvalues have no storage, how come I can access individual array members in a string literal that's not associated with any lvalue?

this works for some reason
eg.
while (1) printf("%c ", "abcdefg"[rand() % 7]);
>>
http://blog.librarything.com/thingology/2006/06/introducing-thingisbn/
>gives no information on how to use the API programmatically
>moderate levels of reeeee
>>
>>59424525
>>59424559
Thanks for the links

I see why they chose 0x4000000, but I'm trying to figure out why the program simply won't run for some starting addresses, but runs perfectly fine for others
>>
>>59424552
sauce?
>>
>>59424620
It says right there "Topological Quantum Computing" by Pachos
>>
>>59424639
I mean the qt blushing girl
>>
>>59424568
not him, but i think string literals are stored in static readonly memory. While you can't assign to it, it's also not a result of some expression, therefore you can index into it (i think)
>>
>>59424089
>Go
>Slow development
>Low performance

>Python
>Not in "fast development"

kek
>>
>>59423393
Any language other than a Lisp is garbage. Languages like Liskell and Lisp Flavored Erlang get a pass, but they are degenerate.
>>
I'm putting together a resume and in order to get my Github contributions up I've been submitting pull requests to projects without licenses to add a license.

I thought this would go well and give me a lot of activity and contributions on my GH but mostly people aren't thrilled with my PRs. Responses range from nothing to flaming me. Well these people have public projects without licenses, they deserve flaming instead of me.
>>
>>59424873
No, you're a scumbag.
Worse than people who only do PRs to fix offensive language.
>>
>>59424158
A lot of companies are using AWS so you could learn about that. It's highly dependant on what people are requiring for positions around you though.
>>
I remember there being a way to hide files in linux. it had something to do with some new kernel features added some years ago, something about capabilities and/or cgroups... you could even hide files from root itself.
can someone help me find this?
>>
>>59424922
Use a dot in front of the filename.
>>
>>59424872
go back to ycombinatorddit
>>
>>59424922
sounds like the kind of thing that would involve LSM rather than cgroups
>>
>>59424993
go back to the trash can
>>
>>59424795
Yeah it's called the bss zone. Basically everything in a program is in memory, you just can't always write to it.
>>
Writing a webserver without I/O
>>
>>59425075
Disregard that I'm an idiot. Strings are stored in rodata.
>>
>>59425089
Write a program without using your eyes
>>
>>59425143
>implying blind programmers don't exists
>>
>>59425151
I didn't imply they didn't. I am asking you to write a program without using your eyes.
>>
>>59424922
could also have something to do with namespaces... but still, after some heavy googling, I can't find shit

edit:
>One example is where each process can be launched with its own, private /tmp directory, invisible to other processes, and which works seamlessly with existing application code, to eliminate an entire class of security threats.

>>59424943
...

>>59425061
no idea what LSM is... I only know what the acronym means
>>
>>59425193
>LSM
in simplest terms it's just another thing for the kernel to test (in addition to unix permissions) before giving a process access to a resource. The unix model allows making directory contents invisible to other users, but insists that root must have full access to everything. LSM allows for other security models that don't necessarily have that constraint, and from what I know about SELinux it could probably be configured to do what you want. It's not very googleable because no one wants to do this.
>>
Is it better to store constant variables of a function inside the scope of the function or within the scope of the class?
>>
>>59425314
If only one particular function needs to know about those constants, then that data should be stored in the function.
>>
>>59425314
In general put variables in the smallest scope they are used in
>>
In Java, you use a Scanner instance to obtain keyboard input, so people will write something along:


Scanner keyboard = new Scanner(System.in);

// more code

int value = keyboard.nextInt();



A beginner might want to memorize the above snippet for later reuse.

Rather than memorizing the code, it is essential to understand what the code does and why it does what it does in a certain way.

So, instead of memorizing the code, it is better to memorize:

When I need input from a keyboard, I need some object that can acquire that input
When I need a certain value, I use one of the methods of the object above to obtain what I need

This abstract concept transfers well across many languages. Once understood, all that needs to be done is to translate the concept into the actual implementation in the required language. Be it Java, C#, C++, or any other language.

Another example:

I want to iterate through an array:


for(int i = 0; i <= myArray.length, i++) {
// do something with myArray[i]
}



Again, the actual code is secondary. I only need to know that I need a way to access each and every element in the array. How exactly I do that depends on the language implementation.

This abstract or conceptual learning becomes even more important with data structures and algorithms. It is hardly ever necessary to be able to recite the implementation of any algorithm in any language, but it is very important to understand the algorithm on a conceptual level so that it can be implemented in any given language.
>>
File: wew2.jpg (118KB, 1100x698px) Image search: [Google]
wew2.jpg
118KB, 1100x698px
What's the fastest way to out yourself as a pajeet?

>programming is 95% memorizing your libraries
>>
>>59425346
>>59425381
Gotcha senpai. I have a habit of putting them in bigger scope because as the program grows, sometimes I redeclare stuff I have already declared in other functions.
>>
>>59425399
write the logic for a minesweeper game

Libraries won't help you there for the logic
>>
>>59425398
In Lisp this is just
(let* ((x (read-line))
(y (parse-integer x :junk-allowed t))))

and
(loop for i across myArray)
>>
File: Untitled1.png (2MB, 1600x900px) Image search: [Google]
Untitled1.png
2MB, 1600x900px
What books should I get to increase my understanding of programming to be employable? Graduating soon with BSc in BioChem but field looks bleak. I have experience with python and java and I know the basics but want to expand my knowledge and get experience to move towards computational biology and bioinformatics.
>>
>>59425455
Learn R.
>>
>>59424158
.net (c#)
>>
>>59425455
honestly, if you know how to fizzbuzz and the like with python and java, you're employable. too many morons out there cant do the basics.
>>
>>59425565
Come on. Fizzbuzz is what? 3 conditional if/else statements. That doesn't make you employable or anyone who took a class in programming 101 in high school is employable.
>>
>>59425593
Can you invert a binary tree? If so, you're good enough for Google!
>>
>>59423406
definitely not
>>
>>59425611
Invert a binary with a pre-built function? Or write a function to invert a binary tree? There is a difference.
>>
>>59425682
The latter.
>>
>>59424525
>meeb
>geeb
>>
>>59423406
C is about as productive as moving a gallon of water with a teaspoon
>>
File: 1483170252839.jpg (15KB, 422x349px) Image search: [Google]
1483170252839.jpg
15KB, 422x349px
>>59425682
>>59425699
Pls no bully. I just need some book recommendations.
>>
>>59425593
it's an exaggeration but you go the other way and give others too much credit. Plenty of retards with a BS in CS can't do fizzbuzz-like problems without google because they copied all their homework and had weak sauce exams (the "better" the uni, the easier the exams)
>>
>>59425743
Who is bullying you you oversensitive faggot? Don't worry, I am bullying you now. Learn Lisp.
>>
>>59425455
My prajeet sense is tingling
>>
>making a little program that takes a program as input and steals its console output, so basically a drag and drop console
>got the stealing part working
>sends to console fine
>send it to textbox
>errors asking me to multithread
;_; this never goes well
>>
>>59425764
MIT teaches CS with Python.
I am filled with despair.
>>
>>59425399
fuck memorizing libraries, just have the docs open at all times, with time you'll memorize (and perhaps with completion), no reason to memorize upfront
>>
>>59425764
>Plenty of retards with a BS in CS can't do fizzbuzz-like problems
I refuse to believe this. Fizzbuzz is pure logic, you can just think it out in simple terms. What about all the math you have to take for CS?
>>
>>59426219
You can think it out, but if you've practically never written a line of code without your classmate's version or stack overflow open on your phone it might be tricky to translate to pseudocode, enough that you at least look bad compared to the ones who actually know what they're doing.
Math is even easier to get through without learning, most of my profs were jaded enough to give "study guides" for the exams that consisted of the exact questions that would be on the exam. That includes the 400-level classes.
>>
>>59426219
For most of them I'm sure it's just a case of not knowing the modulus operator exists, it's not exactly commonly used.
>>
>>59426219
>>59426292
Fizzbuzz is a "trick" question. If you don't have experience writing code, you are going to try test the conditions, equal /3 then equal /5 and then /3 and /5 because that is how the question presents the conditions when the conditions are supposed to be tested in the reverse matter that it is presented.

All it is supposed to show is that you can read a scenario and comprehend all the requirements at once.
>>
>>59426333
How does a sophisticated coder solve this problem?
>>
>>59426399
Write a library specifically for fizzbuzzing.
>>
>>59423393
Rewriting Linux in C--
>>
>>59425864
Your point? MIT is trash.
>>
>>59426326
if quotient is int
do block
>>
>>59426458
This doesn't seem to compile?
>>
>>59426443
>t. High School dropout
>>
>>59426443
>MIT is trash
Ebin
>>
>>59426477
whom are you quoting?
>>59426485
But it truly is.
>>
>>59426491
>not knowing the t. meme
sage
>>
>>59426514
Don't be fucking naive.
>>
>>59426514
who are you quoting is the older meme
>>
>>59426491
>But it truly is.
t. NEET
>>
>>59426555
Are you that triggered to know the truth?
>>
>>59426582
Are you triggered by the fact you have no education?
>>
>>59426520
That's not how you spell that word
>>
>>59426595
I'm not sure I understand what you're trying to say here.
>>
>>59426606
Are you that triggered to know the truth?
>>
>>59426600
I'm pretty sure that's how you spell it in my country.
>>
>>59426622
What an absurd question.
>>
>>59426640
About as absurd as MIT being trash.
>>
>>59426624
Why are you boasting about your country's low literacy?
>>
>>59426648
Yes, it is. Did you not read the other posts?
>>
>>59426658
>Yes, it is
According to you a worthless NEET.
>>
>>59426666
Only in your head.
>>
>>59426676
Yes. Only in your head is MIT trash.
>>
>>59426685
I didn't even imply that let alone outright state it.
>>
>>59426699
Okay keep your ranting while the real world passes you. I am sure you saying MIT is trash on 4chan will really hurt MIT's reputation.
>>
>>59426704
Why would you think I'm out to "hurt MIT's reputation"? I'm motivated by simply telling the truth, I don't need anything else.
>>
>>59426753
>I'm motivated by simply telling the truth
According to you and no one else
>>
File: Quwawawawawawa.gif (2MB, 400x225px) Image search: [Google]
Quwawawawawawa.gif
2MB, 400x225px
>>59424620
>>
>>59425399

"Hello, I'm caulling frum Microsoft, is yur computer running slow?"
>>
>>59424089

Python and Ruby fall under the category of fast development, perhaps moreso than Haskell.
>>
in java, what are the default keywords (public private static)?
>>
>>59427256
public = your members are sluts who let anyone inside and change them
private = they are pure and protected
static = they are straight forward and dont force you through an instance hoop
>>
>>59427256

>default
The default level of access for Java methods is its own access control level

https://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html

Nothing is static by default.
>>
>>59427304
For example, in C, auto is default so ommiting is ok.
But const isn't default, so it's required to type.

Which keywords are like auto in C.
>>
>>59427352
why would you ever auto in C?
Its the language for explicit autism.
Use C++ if youre lazy/love implicit typing.
>>
How to make a 20 element in which the first ten are initialized like { element 1, element 2, ...} in java?
>>
>>59427368
But which keyword in java are like auto in C?
>>
>>59427379
*20 element array
>>
>linked lists in lisp are faster than java's arrays
really makes you think
>>
>>59427368
Auto doesn't do the same thing in c and c++
>>
>>59427379
google it pajeet
>>59427384
java doesnt have it to my knowledge
google diamond syntax
>>
>>59427396
That's exactly what he said
>>
>>59427404
you're useless.
you can't answer a question properly.
>>
>>59427352
int used to be the implicit type for anything not explicitly typed, be it a return value or a variable. Not allowed anymore since C99.
>>
>>59427504
doesn't that delete backwards compatibility?
>>
File: Untitled.png (8KB, 394x561px) Image search: [Google]
Untitled.png
8KB, 394x561px
Really stupid question guys.

I made a new branch C from B. Is there a way to pull the latest shit from D onto my branch? I don't care if 100% of the stuff I've done is overwritten.

Pls no bully. And no this isn't for anything important so if it's dumb, trust me I know.
>>
>>59427656
As long as your compiler supports C89, it's fine.
>>
>>59427656
>backwards compatibility
Yes, but the they expected compilers to still allow it (but with warnings) to ease the transition from C89 to C99. It's a "quality of implementation" issue.
>>
>>59427706
I think you forgot to specify the VCS you use.
In git, if you want to apply every commit that happened between B and D, you'd merge or rebase your branch on D (the head of the main branch). If you just want to apply the D commit on C, use cherry-pick while working on the C branch:
git checkout [branch of C]
git cherry-pick [D commit ID]
>>
>>59427771
Using bitbucket/sourceTree.

I'm sure this is a horrible way of doing it but what would happen if I made a pull request from D to C? Would that fuck my life up?
>>
>>59427789
You confuse many things.
SourceTree is a GUI for VCS, not the VCS itself. In that case, either mercurial or git.
A pull request is not a command, it's basically a public message where you ask for a merge of your branch changes to another branch (generally a public branch) and request for comments on that operation. If you just want to keep your branch and yet retrieve the changes of the public branch, just merge the public branch into your private branch.
>>
>>59427836
Well sorry I thought that bitbucket would have implied that it was git, given that's the default. So no, I haven't confused anything.

I also know what a pull request is.

I suggested it because a pull request would allow me to see the changes BEFORE anything takes place to see if it will fuck anything up or not.
>>
>>59427895
What I'm getting at is I know ways it *can* be done. I just want to know what the best/easiest way to do it is
>>
>>59427903
Then I'd say rebase the branch containing C on the branch containing D. The D branch won't change at all, and the C branch will get all the commits from B to D, including the changes on the C branch. You don't have to be afraid, you can always revert if something goes wrong. Pull requests are definitely not made for that.
>>
>>59427895
>I suggested it because a pull request would allow me to see the changes BEFORE anything takes place to see if it will fuck anything up or not.
git diff
>>
>>59427929
>>59427936
ty senpaitachi
>>
I have some basic knowledge of C++ and python and I would like to contribute to some project to learn more and get some experience, can you guys suggest me something? Is there any place where I can find a list of projects that accept volunteers? I heard that UT4 has a lot of community contributions but maybe a game like that is too advanced for me.
>>
>>59427981
https://github.com/trending/c++
>>
I need some help on a database import problem.

At my internship, I'm connected to a database that's already filled with some shit. I created a local database and the application created all the tables I need.
Thing is, how do I export the databse from my internship to the database I just created ?

I'm using pgAdmin to manage the database I created but I don't know what they use to manage theirs. Probably console commands.
>>
P = NP
Q.E.D.
>>
>>59428344
Use pg_dump to export the data and then pgsql db < dump to import it.

https://www.postgresql.org/docs/9.1/static/backup-dump.html
>>
>>59428435

Where's the proof?
>>
best book to learn about data structures? is it g going in with an oop background?
>>
@59428589
Can your retarded brain not comprehend human language?
>>
Post your IQ
137 here
>>
>>59424187
not considering C as "production" tier only shows how little you know.
>>
>>59428459
Man, you're talking to a retarded. I just tried it in the console and it didn't work.
I'm installing phpMyAdmin right now since it's the SQL client I'm the most used to.
I'll connect the databse to it and just export it. If that makes sense (?)
>>
>>59428861
150
>>
>>59428867
considering a language to be "production" tier only shows how little you know.
>>
>>59428861
>tfw to smart too know my IQ
>>
>>59428861
Where can I test it? It's probably higher than 137 though.
>>
Reminder python is the best hobbyist language
>>
>>59428886
isn't PMA MySQL only?
>>
>>59428927
>hobbyist language
That isn't even a valid thing to say.
>>
>>59428929
I don't know. Like I said, I'm at an internship so before that I only worked with a project that was already configured.
Right now I'm seeing the database I need to export in pgAdmin. But I don't know how to it from there.
I created my other database too but I also don't know how to export.
>>
>>59429022
jesus hell
>>
say I have a number, a = 2^b
I know a is a power of 2.
how do I find b?
>>
>>59429052
log2
>>
>>59429037
Like I said, you're speaking with a retard.
>>
>>59429052
>You will immediately cease and not continue to access the site if you are under the age of 18.
>>
>>59429052

Logarithm with base 2 and antilogarithm 'a'.
How old are you?
>>
>>59429068
how do I log2 at compile time?
I need to do this in a c++ template clusterfuck
>>
>Visual Studio 2012 Express: installation takes ~3gb
>Visual Studio 2015 Express: installation takes ~12gb
What went wrong?
>>
>>59429091
C++11 constexpr.
Google it
>>
>>59423393
baileys in my double double working from home

who /alcoholic/ programmer here?
>>
>>59429091
constexpr size_t log2(const size_t n)
{
return ( (n<2) ? 1 : 1+log2(n/2));
}
>>
>>59429096
VS2012 didn't have enough SQL Server bloat
>>
>>59424158

aws serverless stack
microservices architecture
deployment design for said architecture
you heard it here first
>>
>>59428867
C isn't used as much these days faggot.
>>
>>59429170
C isn't used for web backends yes but it's used for actual software and libraries.
But what would you know about software millenial scum.
>>
File: How to spot a NEET.png (54KB, 784x182px) Image search: [Google]
How to spot a NEET.png
54KB, 784x182px
>Anime
>"Pajeet" xD
>to intelligent to use libraries
>>
>>59429184
That's where C++ is used. Get a job.
>>
File: 1488916987250.jpg (32KB, 552x446px) Image search: [Google]
1488916987250.jpg
32KB, 552x446px
>>59429184
Why are c tards so insecure about Web devs when clearly it's a different niche just like c?
>>
File: 1453576167641.jpg (40KB, 535x577px) Image search: [Google]
1453576167641.jpg
40KB, 535x577px
>>59429068
>>59429078
>>59429087
mfw GCSE maths never taught me stuff like this and I didn't take it at A level because I thought I wouldn't need it
>>
>>59429216
I just use Lisp for everything.
>>
Writing an ssh scanner in C. can input a password attempt file, a range of IP addresses, a range of ports, a username attempt file ("root", "admin", etc.), and you can stipulate the number of threads you want to run on

This is legal right?
>>
>>59429309
Lisp is nice actually. Sucks it doesn't perform well.
>>
File: 2017-03-16-070014_568x52_scrot.png (3KB, 568x52px) Image search: [Google]
2017-03-16-070014_568x52_scrot.png
3KB, 568x52px
aparently I can't even do pic related in Java
how the fuck am I supposed to do it then?

I can't switch langs, its for a shitty shcool project.
>>
>>59429320
Depends on how you use it.
>>
>>59429323
I hate the "new" keywords in general
>>
>>59429323
Does Player have a constructor that takes a Name, a Date, and an integer?
>>
>>59429335
I mean it's legal to create this right?
>>
>>59429349
Totally. You should try this on public wifi
>>
>>59429349
Yes, of course.

As long as you don't use it for anything nefarious.
>>
>>59429132
what is aws anyway
i've tried to wrap my head around it before but it just seems like regular hosting with a bunch of buzzwords ontop
>>
>>59429321
You're really only going to have trouble with numeric code IIRC. And of course, there's the garbage collection. But it compiles to native code, and if the large binaries frighten you, there is ECL.
>>
>>59429321
You don't know how to make it perform.
>>
>>59429320
>number of threads
Use epoll, it's more efficient.
>>
>>59429375
>it just seems like regular hosting with a bunch of buzzwords ontop
That's what all of the major cloud hosting services are.

AWS, Bluemix, Azure, etc. are cloud hosting on steroids. Anything you want to do, you can host as an individual component without needing a VM, like a database or a web service. Of course, you can host VMs if you want, but there's no point in doing that if you just need something specific that you were going to run on that VM.
>>
>>59429375
It essentially is a bunch of buzzwords for established stuff.
>>
C was a mistake
ML was robbed
>>
>>59429489
You're clinically retarded.
>>
>>59429404
VM clusters help with scaling in a timely manner. One neat thing about these super clouds is you can scale up and down dynamically. Even without your intervention
>>
>practiced 'fizzbuzz' for interview
>interviewer shit-head 20 years my junior smugly asks me to fazzbazz
CS hiring is fucking ridiculous so sick of this, get me the hell away from it
>>
>>59429348
Apparently
>>
File: 1484043737881.jpg (31KB, 202x219px) Image search: [Google]
1484043737881.jpg
31KB, 202x219px
It's not safe to write kernel modules on my personal system, is it? From what I've read, it sounds like there's a lot that can go wrong.
>>
>>59428762
bump
>>
>>59429543
Somebody pls help me.
>>
>>59429635
Everyone in your class is gonna laugh at your inability to write simple code and you're gonna commit suicide.
>>
>>59429647
Pls just help.
>>
>>59429543
Then what do you mean you "can't do" what you posted an image of?
>>
>>59429684
It says illegal start of type.
>>
File: 1474225715209.png (212KB, 367x506px) Image search: [Google]
1474225715209.png
212KB, 367x506px
>>59429533
>fazzbazz
>>
>>59429708
could be fucking anything

post your entire method block
>>
>>59429712
how can you be expected to win this game if the rules keep changing
>>
>>59429533
>>59429712
What's a fazzbazz?
>>
>>59429683
>>59429635
Whats the error you get?
>>
>>59429568
You can brick your system.
>>
>>59429723
>>59429737
>>
File: 1455566808527.png (139KB, 277x251px) Image search: [Google]
1455566808527.png
139KB, 277x251px
>>59429772
>>
>>59429772
That's not your entire method block, dipshit.

Use pastebin or something.

Also, use an IDE. Java + being a special snowflake doesn't mix well.
>>
>>59429772
Whats the constructor for Name?
>>
>>59429096
>Visual Studio 2017 Enterprise: installation takes ~2.7gb
>>
>>59429813
>>
I'm writing collision detection for a realtime program, currently doing oriented bounding box - triangle mesh stuff.

I am using Tomas Akenine-Möller's algorithm for the job and it works fine for the most part, but when ever the triangles get too big (larger that a side of the box for instance), they don't get detected. Any idea what that could be about?

The example code I've been eyeing is this:
http://fileadmin.cs.lth.se/cs/Personal/Tomas_Akenine-Moller/code/tribox3.txt
>>
>>59429830
Post the entire error log. Copy and paste it from top to bottom into pastebin.com and share it here.
>>
File: dunecat.jpg (30KB, 439x392px) Image search: [Google]
dunecat.jpg
30KB, 439x392px
Employed Haskell programmer reporting in :)
>>
File: Selection_20170316_14:59:10.png (9KB, 429x99px) Image search: [Google]
Selection_20170316_14:59:10.png
9KB, 429x99px
>>59429170
>>
File: cry_anime.jpg (79KB, 919x898px) Image search: [Google]
cry_anime.jpg
79KB, 919x898px
>>59429888
Unemployed C programmer reporting in. :(
>>
>>59429888
What language do you use at work?
>>
>>59429863
http://0x0.st/tSB.txt
>>
>Python is slow
Is this just a meme like they say about java?
>>
>>59429888
I highly doubt that, dumb anime poster
>>
>>59429917
I'd bet my left dick that you forgot a brace, bracket, or parenthesis somewhere.
>>
>>59429915
English
"Would you like fries with that, Sir?"
>>
Trying to program snake in assembly 8086 for a school project, it's not fucking working, I don't know why and it's triggering me.


So far I have managed to make a character appear on-screen, move it in all directions and created borders on the sides of the console.
ATM I'm trying to make it so the dot will not cease moving after you input a direction, until you input a new direction.


I T D O E S N 'T W O RK and I don't know why and it's making me hate life.


Once I finish that up, gotta figure out some random generator that will place apples across the console at random and somehow make the snake grow once it eats an apple.
>>
>>59429933
Pls help me.
>>
>>59430000
Then post your entire page of code, and use an IDE.
>>
>>59429919
No, Python is actually slow; it doesn't even optimize for tail recursion. This is fine though because you shouldn't be doing speed critical things in Python anyway.
>>
File: 1486954792917.jpg (886KB, 3024x2268px) Image search: [Google]
1486954792917.jpg
886KB, 3024x2268px
>>59430000
well that was a fuckin gay waste of a get
>>
>>59429772
Player 3 you end it with a fucking : not a ;
>>
>>59430026
Is vidya fine? I'm not planning on anything complex like UE4 stuff.
>>
File: 1488822636673.jpg (76KB, 887x686px) Image search: [Google]
1488822636673.jpg
76KB, 887x686px
>>59429938
Laughed way harder than I should
>>
>>59430063
>tar

Holy shit, kill yourself.
>>
File: BEE.png (856KB, 1070x1070px) Image search: [Google]
BEE.png
856KB, 1070x1070px
>>59429938
holy shit
>>
>>59430048
>you shouldn't be doing speed critical things in Python anyway.
Finish reading the rest of that anon's sentence.
>>
>>59430075
So I can't even make a simple doom clone or a platformer in python?
>>
>>59430071
I'm sorry, I thought you cared about things that matterd.
>>
>>59430085
Platformer is pushing it for Python.

>Simple DOOM clone
>Simple
There's that stupid fucking word again.
>>
>>59430106
What's a language similar to python I can use for vidya? I like python as a language.
>>
>>59430063
>>59430101
I'm not unzipping an archive uploaded by some random faghole on /dpt/. Put your shit in a pastebin or gist so I can click it and read it.
>>
Writing a javascript framework formally proven in Coq. No I/Ô.
>>
>>59430120
/agdg/ ->
>>
>>59430122
>>59430101
>>59430063
The error has been pointed out already.
>>
>>59430120
Just stop using Python or use PyGame at once
>>
>>59430140
>100 errors after fix
>>
>>59430120
Nothing similar to Python.

>Gaymes
C# (Unity)
C++ (UE4, idTech 4)
C (idTech 3 and previous)

>>>/vg/agdg/
>>
>>59430134
I'm not talking about making games, I'm talking about languages which can be used to make games. This belongs here.

>>59430141
>PyGame at once
You told me python was shit for vidya, how is pygame going to be any better.
>>
>>59430148
Then post it properly, fuck.
>>
This is why we use IDEs
>>
>>59430174
what ide that works on linux
i tried eclipse
but it was too slow and complex
vim was easier to learn
>>
>>59430158
I wasn't that guy. If you want to use Python so bad, fucking use it. Just do not expect good performance. Not that games need good performance though, do they?
>>
>>59430192
emacs
>>
>>59430171
I just posted my entire code.
Are you on windows?
Is that why you can't open a .tar
I even did a zip.
>>
>>59430148
>>59430140


>>59430063
The issue is that you're trying to access members of an array at the class level, instead of at the method level:


public class foo{
int[] x = new int[3];
public static void main(String[] args){
x[0] = 1; // allowable
}
x[0] = 3; // not allowable, not oop.

}


put it in your main method or a constructor, not your class definition.
>>
New:
>>59430216
>>59430216
>>59430216
>>
>>59430192
NetBeans
>>
>>59430206
First off I pointed your fucking problem out here.
>>59430036

Secondly. No one is going to unzip your shitty school assignment.

Ghostbin the code.
>>
>>59430204
>emacs
>Java IDE
If you want to spend the next 16 hours setting it up, maybe.
>>
>>59430192
>eclipse
wew lad
>>
>>59430235
That was not the problem. This was:
>>59430213
>>
>>59430206
I'm not going to unzip some random archive by someone on /dpt/.
>>
>>59430235
>hasn't read that even after fixing :, it still gives the same amount of errors
>>
>>59430241
Still better than Eclipse or NetBeans.
>>
>>59430263
Are you even backtracing your errors?
>>
>>59430263
See this: >>59430213
>>
>>59430260
Don't say it wasn't the problem.
Compile it with the : and see what happens.
>>
>>59430282
>>59430281
That seems to be the error. Thanks!
I cut it down to 14 errors now.
>>
>>59430292
There were multiple problems but the first was trying to access array members at class level.
>>
>>59430292
Fucking troll, why do you waste your time doing this?
I bet you're the one asking for some ultra specific delivery method.
>>
>>59430316
Called off work and shit posting from clover.

Practicing for them NEET bucks
>>
anime thred:

>>59430383
>>
>>59425398
Wrong! Scanner isn't just for keyboard input. It's for input in general.
>>
>>59430120
It will be fine for small games, like say a tetris, snake or mario clone, but beyond that you'll probably hit some problems.
>>
>>59424158
>>59429132
I'm gonna throw Docker into this as well.

It's really taking off.
>>
>>59429320
nmap is a thing
>>
>>59429323
You can, unless you're doing something wrong with the constructors of `Name` and `Date`.

Post link to more complete source and provide any compiler messages that you are seeing.
Thread posts: 335
Thread images: 40


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.