[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: 322
Thread images: 35

File: zsZMyq7.png (73KB, 2048x1024px) Image search: [Google]
zsZMyq7.png
73KB, 2048x1024px
Old thread: >>59001874

What are you working on, /g/?
>>
who /emacs/ here?

REPORT IN
>>
>>59007994
/vim/ master race

bow before me, subhuman
>>
File: 1461261200827.jpg (387KB, 798x1000px)
1461261200827.jpg
387KB, 798x1000px
> being this butthurt about a programming language
> PL is now a /pol/litical issue
>>
File: 1456362585698.jpg (180KB, 500x380px) Image search: [Google]
1456362585698.jpg
180KB, 500x380px
>le cuck XD
Gives you an idea of how old epic C haxxors are ITT
>>
>>59007994
I already have an operating system installed on my computer.
I don't need another one.
>>
>>59007972
"The most powerful programming language is Lisp. If you don't know Lisp (or its variant, Scheme), you don't know what it means for a programming language to be powerful and elegant. Once you learn Lisp, you will see what is lacking in most other languages." -Richard Stallman
>>
File: 1479450994333.jpg (75KB, 600x1136px) Image search: [Google]
1479450994333.jpg
75KB, 600x1136px
>>59007972
>These are the people """""""""defending""""""""" C
Really makes you think
>>
File: let me see your war face.jpg (17KB, 322x359px) Image search: [Google]
let me see your war face.jpg
17KB, 322x359px
FLAME WAR FLAME WAR FLAME WAR
>>
What's the point of C again?
>>
>>59008067
>>59007872
>>59007885
>>59007917
https://github.com/rust-lang/rust/issues/35981
There is even an issue on the rust-github complaining that the compiler doesn't remove bounds-checking well enough. And people agree this should be fixed/all bounds checks should be removed.
>>
Someone over the age of 15 should just make another thread
>>
>>59008081
Fuck off Spalter.
>>59008076
>being this illiterate
>>
>>59008076
Learn to read
>>
>>59008095
>>59008108
This has nothing to do with being illiterate. I have tried to argue with people whose only way of communicating seems to be greentexting, being completely incapable of forming complete coherent sentences.

You people have still not explained how the Heartbleed bug - which was simply a missing bounds-checking error - could not have happened with Rust.
>>
>>59008081
Why?
>>
>>59008081

#include <stdio.h>
#include <stdlib.h>

int main()
{

int age;
printf("How old are you? \n");
scanf(" %d"; &age);

if (age >= 15) {
printf("Make a new thread faggot!");
}
return 0;
}
>>
>>59008129
>I have tried to argue with people whose only way of communicating seems to be greentexting
>
>>
>>59008129
>how the Heartbleed bug - which was simply a missing bounds-checking error - could not have happened with Rust
Simple - Rust is so limited none of the low level optimisations that typically produce such bugs would have ever compiled.
>>
>>59008157
>>59008157
>>59008157
>>
>>59008140
>not actually creating a new thread
Missed opportunity senpai.
>>
>>59008181
New thread >>59008157
>>
>>59008129
Compiler bugs are much rarer than user land ones you illiterate fuck.

Bounds checking is removed for optimization purposes when it's provably not needed.
>>
File: 1478899482282.jpg (97KB, 960x800px) Image search: [Google]
1478899482282.jpg
97KB, 960x800px
>cuck :DDDDDDDDDDDDD
>>
>>59007994
GNU Nano for me, thanks
>>
python:
>>> False < 'a' 
True
>>
Muh vidya. Working on getting the main character to pole dance just right. Don't bash it's in 3D and everything :3
>>
>>59008067
Giving us a laugh now and again/killing our souls softly
>>
File: 34.png (37KB, 396x400px) Image search: [Google]
34.png
37KB, 396x400px
What maths do I need to learn to be a good programmer?
>>
>>59008218
post screencap or gtfo
>>
>>59008237
None.
>>
>>59008192
The "compiler bug" was that bounds check removing wasn't performed. Rust is designed to remove bounds checking. Which was the cause for Heartbleed. You illiterate fuck.
>>
>>59008010
Enjoy giving your money to niggers in Uganda
>>
>>59008237
Meh. Programming actually taught me a lot of the math I know. I was "homeschooled" so I didn't really learn shit. When I learned to program, I was picking up advanced math functions without even realizing it.
>>
>>59008067
building loonix kernel
>>
File: 1475259533535.jpg (82KB, 960x960px) Image search: [Google]
1475259533535.jpg
82KB, 960x960px
>>59008240
>objectifying my game this much
>>
>>59008067
Men with big dicks who know how to program, not cock cage faggots who enjoy being cucked by their language.
>>
File: saintignucius.jpg (31KB, 321x445px) Image search: [Google]
saintignucius.jpg
31KB, 321x445px
>>59007994
This is my emacs. There are many like it, but this one is mine.

My emacs is my best friend. It is my life. I must master it as I must master my life.

Without me, my emacs is useless. Without my emacs, I am useless. I must program my emacs true. I must write lisp straighter than my enemy who is trying to use vimL. I must M-x replace him before he :%s/ me. I will...

My emacs and I know that what counts in war is not the lines of code, the number of commits, nor the amount of contributors. We know that it is the ideas that count. We will think...

My emacs is human, even as I, because it is my life. Thus, I will learn it as a brother. I will learn its weaknesses, its strength, its parts, its extensions, its logic and its REPL. I will keep my emacs clean and ready, even as I am clean and ready. We will become part of each other. We will...

Before Stallman, I swear this creed. My emacs and I are the defenders of free software. We are the masters of our enemy. We are the saviors of my life.

So be it, until victory is GNU's and there is no enemy, but peace!
>>
>>59008237
x = sin(a), y = cos(a)

Think that's about it
>>
File: np.jpg (1KB, 34x39px) Image search: [Google]
np.jpg
1KB, 34x39px
>>59008010
>>59007994
Notepad reporting in.
>>
>>59008248
fn print_panics() {
let array = [0; 4];
println!("{}", array[4]);
}


lol
void print_out_of_bounds(void) {
uint8_t array[4] = {0};
printf("%u\r\n", array[4]);
}

// prints memory that's outside `array` (on the stack)


// thread '<main>' panicked at 'index out of bounds: the len is 4 but the index is 4', main.rs:3


H E A R T B L E E D
E
A
R
T

B
L
E
E
D
>>
>>59008249
what now?
>>
>>59008271
>objectifying a game about objectifying the main character
I see no problem with this.
>>
>>59008248
Are you fucking serious right about now? Or so you have simply no clue of what you are talking about?

Bounds checks must be removed for optimization but Rust enforces that they only be removed when they can cause no bugs. That compiler bug is only about the fact that opportunities for optimization that could be taken aren't.
>>
I need some advice /g/uys.

So I'm graduating this quarter with a bachelors in CS from a pretty good Cal state. I live in the LA area, so I've been able to apply to what seems like a fuck ton of jobs. I've already visited 2 companies for interviews and have been rejected from both. I'm worried that because I have no internship experience or on the job experience I'm not gonna get anything.

One of the companies said that I needed "more experience". Mind you, this was after a very lengthy interview process which included a take home coding project. The job was also described as being entry level, which is all I really apply for. I'd like to think I'm pretty good at not being autistic and presenting myself well at these interviews.

Am I just worried for no reason? Should I just keep using the shotgun approach and applying anywhere hiring "entry level" until something sticks?
>>
>>59008294
>not wanting to print cool things on the stack
hmmm
>>
>>59008245
Surely I need to learn the maths required for physics if I want to create moving objects with a velocity and acceleration with various different forces applied to it like gravity and friction.
>>
>>59008319
You don't want to become a game monkey.
>>
>>59008301
Vim is donationware, the cuck who made it wants you to prioritize niggers over your own people
>>
>>59008309
You already fucked up by making it all the way to graduation without any experience.

Best you can hope for now is to grunt out some kind of portfolio and spam every job board you can find.
>>
>>59008302
I'm just shy about posting anon :3
>>
>>59008283
>>59008337
Epic C programmer right there. How was summer?
>>
>>59008309
you must be truly desperate to come to /dpt/ for help
>>
I know coding but what books do I need to read to make some real professional programs?
>>
>>59008337
What if I simply ignore the 2 lines about Uganda on the startup screen?

His vile agenda is thus thwarted
>>
>>59008382
I figure that a bunch of neets on an anonymous rice paddy board is still better than anything I could get from pajeets
>>
>>59008402
>bunch of 14 year old NEETs
>bunch of street shitters
There are better options
>>
>>59008420
>like stackoverflow.com
please
>>
File: 12830560100.jpg (203KB, 1066x1094px) Image search: [Google]
12830560100.jpg
203KB, 1066x1094px
>>59007972
Java is the best programming language.
>>
>>59008481
At least stackoverflow is employed. Otherwise deal with pre teen autistic trash like >>59008283, >>59008337
>>
>>59008509
>stackoverflow is employed
>
>>
>>59008553
>you are employed
>
>>
>>59008572
I've posted on stackoverflow before.
>>
>>59008577
so that's why you posted >>59008553
>>
>>59008600
All according to keikaku.
>>
>>59008572
>you're are kys yourself
>
>>
>>59008577
wow! how did you manage to do it?
>>
>>59008616
Step 1: Be employed

Start with step 1.
>>
File: 1486586820925.jpg (22KB, 500x396px) Image search: [Google]
1486586820925.jpg
22KB, 500x396px
>>59008600
>>
>>59008218
do mocap

>anon why are pole dancing
>it's just for my video game mom
>>
>>59008625
if that's the case how did you post there as a NEET?
>>
>>59008636
Fuck the system.
>>
>>59008637
I cucked ur dad las month
>>
>>59008291
Fucking retard. x = r*cos(theta) and y = r*sin(theta), where r is the hypotenuse, and theta is measured from the x-axis!
>>
>>59008616
kek
>>
>>59007972
what python gui toolkit is the nicest?
>>
>>59008637
takes a cuck yo know a cuck
XD

>>59008664
Learcn C, python cuck
>>
>>59008664
>gui
cuck
>>
>>59008218
At least tell us what it's called so we can look for it
>>
>>59008664
just use tkinter
>>
>>59008654
....neeeeeerd
>>
>>59008699
alright, i was going to, but thought i'd ask just in case
>>
>>59008692
It's never coming out, at least not until I get fired from my fucking webdev job and can work on it full time
>>
>>59008703
>doesn't understand basic math
>>
>>59008291
and a = atan2(y, x) for good measure
>>
>>59008684
>implying you are tty master
>>
>>59008739
>says the python cuck nu-male
>>
>>59008739
GUIs are for nigger loving cucks, use a terminal made by the white man.
>>
>>59007994
Spacemacs!

I am not smart or patient enough to actually set up emacs.
>>
>>59008720
For shame!
>>
>>59008763
>like if you've never touched a gui in your life
>>
File: 1449543340963.jpg (7KB, 250x241px) Image search: [Google]
1449543340963.jpg
7KB, 250x241px
>cuck cuck cuck cuck cuck cuck cuck
what has this thread become jesus christ..
>>
Conway's game of life in Python. Got it down to 68 lines so far. How am I doing?
http://pastebin.com/cAH5pz50
>>
>>59008768
>nigger loving cucks

racism is wrong.
>>
File: 1446410964449.jpg (41KB, 400x250px)
1446410964449.jpg
41KB, 400x250px
This is a lot more shitposting than normal. What gives?
>>
>>59008027
I was like you but then I visited their website ...
>>
>>59008729
see
>>59008703
>>
>>59008796
>2D
I would love to see this implemented in more dimensions (and changing the rules based on the dimensions to prevent everything dying).
>>
>>59008805
take a good look at the OP

It's /dpt/-cuck edition
>>
File: 1485877794703.jpg (21KB, 393x360px) Image search: [Google]
1485877794703.jpg
21KB, 393x360px
Anyne might now a playlist where someone create a Java EE based website from scratch with a nice design and all? Not just a tiny web app that calculates shit. A real full website.
And if he explains what he's doing during the creation, it's even better.
>>
>>59008129
>defending cucklang
>>
File: 1470047710352.jpg (103KB, 334x338px) Image search: [Google]
1470047710352.jpg
103KB, 334x338px
nice thread
>>
>>59008844
>Java
Pajeet cuck. Get a C book and SICP
>>
File: 21632676.jpg (95KB, 400x400px) Image search: [Google]
21632676.jpg
95KB, 400x400px
>>
Is C the most uncucked pro white language, bros?
>>
>>59008208
>TypeError: '<' not supported between instances of 'bool' and 'str'
>>
>>59008873
Rust and go are for cucks. C is pro white, uncucked, and not controlled by the kikes.
>>
>>59008879
>python3
>>
>>59008890
Cucking is a sin and Rust is against christianity
>>
>>59008879
(< nil "a")
; Evaluation aborted on #<TYPE-ERROR expected-type: "REAL"datum: NIL>.
>>
>>59008796
>http://pastebin.com/cAH5pz50
Comment your code, mister
>>
>>59008306
>relying on bounds checking at RUN TIME (what are you going to do if it fails unexpectedly?) just because you're too stupid to sanitize user input
>>
>>59008901
>python2
>python
>>
>>59008873
It is from a time when POC and women were locked out of privileged positions reserved for white cis-gendered males by the patriarchy. So that useless and outdated language is for you.
>>
File: alt_right_robot.jpg (68KB, 600x596px) Image search: [Google]
alt_right_robot.jpg
68KB, 600x596px
>>59008805
>>
>>59008925
True. Learn C and uncuck yourself for the love of Jesus. Take the dark red pill deus vault
>>
Making a tic tac toe shit in python
I have a class that represents each spaces and that class has a method which updates the space
class Mark:
def __init__(self,x,y,S=0):
self.x = x
self.y = y
self.S = S
def __str__(self):
if self.S == 0:
return " "
if self.S == 1:
return P1L
if self.S == -1:
return P2L
def updatemark(self,i):
if self.S == 0:
self.S = i

The thing is, that it prints "" like self.S were 0 but it isn't, what the fuck is going on?
>>
>>59008805
>>59008930
4chan was always like this you retard nigger cucks
>>
>>59008796
Jesus Christ.
>>
>>59008947
>python
Learn C, web dev nu-male cuck
>>
>>59008923
>type in terminal python
>python2 opened
>python == python2
>>
>>59008856
Yeah okay but what about what I asked?
>>
>>59008930
>edit of an edit of an edit
forty cucks
>>
If C is the ayran noncucked language, what is ASM? God?
>>
>>59008963
>using outdated OS
>not installing gentoo
install gentoo
>>
>>59008968
I don't associate myself with cucked languages
>>
>>59008916
Never trust user input of course.
But panicking on a possible buffer overflow is the right behavior. Given panics can be configured to do pretty much whatever you want, I don't see how it's a problem.
>>
>>59008968
you should look into open source projects and study them. this is assuming you've already read books on the subject
>>
File: 5836d-emacs-vs-vim2.jpg (82KB, 569x400px) Image search: [Google]
5836d-emacs-vs-vim2.jpg
82KB, 569x400px
>>59007994
>>59008777

I love Spacemacs. I was a vim user for over 10 years, but I switched to Spacemacs this year. It's great.

It really blends the great parts of Emacs and Vim together.
>>
>>59008947
>using OOP to make tic tac toe
I hate you
>>
>>59008963
>enter 'python' on command line
>python3 repl starts
>gives type error
>>
At the moment:
C++ > Rust > C

Other languages need not apply in this comparison. If you disagree then you're delusional.
>>
I just started a C++ general =asylum from /pol/tard faggotry

>>59008974

>>59008974

>>59008974
>>
>>59008067

>Runs on every CPU architecture.
>Beats out nearly every language in terms of performance, to the point that it is sometimes used as a target for other languages to compile to.
>Has no requirements on a runtime environment of any kind, and therefore is suitable for systems applications, from kernels to virtual machines.
>Has extremely simple syntax, and is more suited for introducing beginners to systems programming compared to any other language.
>Doesn't do any funny business like name mangling, exceptions, etc... and is therefore ideal to be the basis for foreign function interfaces for other languages.

C is basically the ultimate glue to make everything else run smoothly.
>>
>>59008973
Shot a tall systems programmers know, as opposed to 4chin memesters
>>
>>59008987
>Not using OOP to make a tic tac toe
>>
>>59008991
This post is objectively true.

With luck Rust can overcome sepples but it ain't there yet.
>>
god i hate niggers so much
>>
anything but C is for niggers
>>
>>59008067
Isn't OpenSSL primarily maintained by one dude? I'd say security issues would happen regardless of language when you're that under-manned for a project as large as that one.
>>
File: tng_joke.gif (959KB, 448x352px) Image search: [Google]
tng_joke.gif
959KB, 448x352px
>>59008188
>>
File: 1486930629151.jpg (55KB, 615x820px) Image search: [Google]
1486930629151.jpg
55KB, 615x820px
https://github.com/dertuxmalwieder/fileweight
>>
>>59008996

>Runs on every CPU architecture.

*most commodity architectures* != every CPU architecture

>Has no requirements on a runtime environment of any kind, and therefore is suitable for systems applications, from kernels to virtual machines.

the requirement is a custom or standard memory model for every implementation

>Has extremely simple syntax, and is more suited for introducing beginners to systems programming compared to any other language.

C is good to learn for Linux development, but systems programming is best learned in assembly

>Doesn't do any funny business

C is infamous for funny business

>therefore ideal to be the basis for foreign function interfaces

this is true
>>
>>59009039
>github
SKW cuck!
>>
>>59008981
I did but I have a problem. I can code and all and understand most of wich parts does what in a Java EE project but when I want to start something myself from scratch (I finished a project but the base was made by a friend, I just had to code some models, controllers and some html pages (with spring boot)), I litteraly don't know what to do, where to start, what tI need to install, ...
I just sit there watching the blank page and go read another book because I think I don't know enough. And I'm pretty sure I know enough.
>>
>>59009039
cool, but completely useless

>>59009047
>"mostly commodity architectures"
No sane architecture exists that cannot have C ported to it

>the requirement is a custom or standard memory model for every implementation
should come standard in any sane architecture. memcpy/memmove/memcmp don't have to be implemented per the C spec
>>
Jesus Christ. Use whatever language you like.
>>
>>59009028
this. it's such a contrived example. user input should be sanitized explicitly regardless of the programming language. crashing a server, or anything else at runtime because you suck at programming is not ok.
>>
>>59008996
>Has extremely simple syntax, and is more suited for introducing beginners to systems programming compared to any other language
Should I switch from python?
>>
>>59009082
>>59009023
>>
>>59009023
ASM and C are nigger and cuck free languages.
>>
>>59009074
>cool, but completely useless
just like your dick
>>
>>59009089
Do you want an introduction to systems programming?
>>
>>59009039
>https://github.com/dertuxmalwieder/fileweight
What about for flash storage?
>>
Will C and ASM save america from niggers and cucks?
>>
>>59009107
By beating the nigger cattle
>>
>>59009014
Rust is an SJW language
>>
What a cancerous thread, right from post 1
>>
>>59009133
This
Rust will turn america SJW
>>
>>59009074
>No sane architecture exists that cannot have C ported to it

what are dataflow architectures?

what are tagged memory architectures?
>>
Real software engineers, unless they are working in the few niches that preclude it, will only work with a garbage collected language. Niches that preclude it include OSes, embedded, realtime, etc. If you're not doing that, C is a dangerous waste.
>>
if you have a big buffer and you're reading a part of it, it won't fail bounds checking if you read a bit too much, so you need to be aware of the issue of unsanitized user input regardless
>>
>>59009103
Why wouldn't Python suffice?
>>
Python is cuckold communist trash. C is not cucked and is pro white and not controlled by kikes.
>>
>>59009178
Not even garbage collected language can save you from data races
>>
>>59009190
For systems programming?
>>
>>59009047

>*most commodity architectures* != every CPU architecture
C runs on a lot of esoteric CPU architectures. I'd say anything still in use somewhere has a C compiler for it.

>the requirement is a custom or standard memory model for every implementation
C really only needs some sort of a stack to function.

>C is good to learn for Linux development, but systems programming is best learned in assembly
Which assembly? C's generic. I'd agree that at least some assembly should be learned, but systems programming in general is done in C.

>C is infamous for funny business
C is infamous for letting shit slide. Want to access any memory address you want? That's the MMU's problem.
>>
>>59007994
libreoffice fresh reporting in
>>
Why are pol shitters shilling C again?
>>
>>59009060
>>59008844
bump
>>
>>59009190
Python is not a *S*Y*S*T*E*M*S* programming language. Do you understand the distinction being made?
>>
>>59009240
C and ASM is for the white man, SJW languages like rust are fire niggers and numale cucks
>>
>>59009261
Jesus christ, go outside once in a while
>>
>>59009261
I unironically agree
>>
To everyone:
What got you interested in programming, where did you start?
>>
>>59009261
this
>>
>>59009270
Triggered cuck, don't forget to compliment Jamal for fucking your white wife.
>>
>>59009261
agreed, why do /v/tards comes here and try to say otherwise? you are wasting your time, cletus
>>
>>59009290

Most of /dpt/ does not have girlfriends/wives.
>>
Thank you to the anon who helped me with sscanf() in one of the previous threads

I got my program working

C seemed unpredictable at first but the more I use it the opposite is becoming apparent
>>
What are your thoughts on Agda and proof assistants in general? Has anyone had any experience with it?

>>59007994
I'm learning it, any tips?
>>
>>59009274
Same, use C to uncuck your program from SJWs, your fizzbuzz is backed by the power of right wing white heil hitler
>>
>>59009282
did a school project which involved some programming, i was impressed with what you can do with programming, and you don't need lots of resources like with physical businesses, you can make software products with just autism
>>
>>59009309
I have a perfect 10 ayran wife who I fuck hard every night, she will help me purge the niggers and jews.
>>
>>59009309
this
Jamal doesn't fuck their women, Jamal fucks them
>>
I added some comments to my game of life program:
http://pastebin.com/R3GMc93x
>>
>>59009201
>>59009250
Why can't you develop a kernel in python?
>>
>>59009334
This is bait.
>>
>>59009334
Python is the niggers of programming languages with their slow nigger brains
>>
>>59009282
Messing around with QBasic on the family pc.
>first playing games
>then modifying games
>finally writing my own programs
>>
>>59009315
Agda and proof assistants are for cucks
>>
>>59009334
Why can't you develop a kernel in QBasic?
>>
>>59009282
a teacher of mine in high school was a huge Lisp fanatic, and showed us cool things you could do with programming
>>
>>59009360
no, your for cucks
>>
>>59009282
I felt solidarity with technical genius of the my white ancestors across the world and wanted to harness the ingenuity of the Aryan mind to develop technical solutions to kikery and fight sjw cucks across the world, so I asked my dad to help me learn Applesoft BASIC when I was 7.
>>
>>59009370
With enough PEEK and POKE it might be possible.
>>
>>59007972
>Stormfag trash in /dpt/
It's been nice knowing you all
>>
File: 1478725752884.jpg (42KB, 480x470px) Image search: [Google]
1478725752884.jpg
42KB, 480x470px
>>59009381
Good story inspirational story
>>
How do we move stupid niggers from programming? Niggers and cucks are holding back whites and the kikes want to cuck whites with more Indian niggers while prairie niggers keep up their casino operations.
>>
>>59009407
Good riddance, faggot. If you can't either ignore the noise or revel in it, you don't belong on this site.
>>
>>59009344
No, I'm just starting. If you can print "Hello World" in every program, why can't you do whatever systems programming entails in every program also? Fedora's package manager is written in Python - doesn't that count for systems programming?
>>
>>59009407
4chan was always like this nigger
>>
>>59009414
Are they supposed to be squidkids?
>>
>>59009429
>203 posts
>90% of them are /pol/ autism
>>
>it was the stack the entire time
god damn
>>
>>59009438
The Python language is very restricted and doesn't let you fiddle with hardware. It sits on top of C, so if you want to write a kernel might as well use C.
>>
>>59009442
4chan was always /pol/
>>
>>59009334

No semantics for writing to arbitrary memory addresses, which is required for MMIO. Assumes the existence of a garbage collector, which would require that you already have some code in another language to manage your memory for you. As with the "Java OS" project that gets thrown around every so often when this topic comes up, basically all of the actual low level work is going to be done in pure assembly. By comparison, a kernel written in C, C++, or Rust needs very little assembly -- only enough to get a bootloader up and maybe to execute a few odd instructions that the compiler can't/won't generate due to being architecture specific (enable/disable interrupts, load page table register, explicit save/restore of registers, etc...).
>>
>>59009309
girlfriends?
You mean like.. 3d waifus?
>>
File: 1478585393158.jpg (109KB, 900x900px) Image search: [Google]
1478585393158.jpg
109KB, 900x900px
>>59009461
No fuck off back to your containment board
>>
>>59009441
>>>>>>>/v/
>>
>>59009461
No.
>>
>>59009475
#JeSuis/pol/
>>
>>59009475
>You will not post racicm outside /b/
Wait.. how does /pol/ even exist then?
>>
File: 1482554950186.jpg (292KB, 1120x744px) Image search: [Google]
1482554950186.jpg
292KB, 1120x744px
>>59009522
As a containment board
>>
>>59009462
Why would someone design a programming language that is as butchered as you make Python out to be?
>>
File: 1478898445015.jpg (307KB, 796x574px) Image search: [Google]
1478898445015.jpg
307KB, 796x574px
>>59009547
Go back, manchild pol trash
>>
>>59009438

>Fedora's package manager is written in Python - doesn't that count for systems programming?

The term "systems programming" is rather broad, and it does indeed consider certain userland utility programs, that might include a package manager. In general, however, when it is referred to in these threads, what we are typically referring to is freestanding programs (kernels/drivers), and system libraries that directly interface the OS' API.

>>59009544

Because not all programming is systems programming.
>>
>>59009544
>butchered
It's not though. It's just completely unsuitable for systems programming.
Why would you even think about doing that in python?
>>
post dick programs
/* >tfw no qt boy to lock up and feed hormones too */

#include <limits.h>
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[]) {

if (argc < 2) {
puts("zero length dicks don't exist unless you're a robot");
puts("usage: prtdick <length[positive integer]>");
return EXIT_FAILURE;
}

long dicklen;

if (!(dicklen = atoi(argv[1])) || (dicklen < 0) || (dicklen == LONG_MIN || dicklen == LONG_MAX)) {
puts("enter a positive integer for the length, and make sure that's it not your dick's or god's");
puts("usage: prtdick <length[POSITIVE INTEGER]>");
return EXIT_FAILURE;
}

putchar('8');

int i;

for (i = 0; i < dicklen; i++) {
putchar('=');
}

puts("D");

return EXIT_SUCCESS;
}
>>
File: habbo_raid_avatar.png (4KB, 225x403px) Image search: [Google]
habbo_raid_avatar.png
4KB, 225x403px
>>59009547

For a site that really prides itself on being white, 4chan seemed to rather love roleplaying as black people in its early years.
>>
>>59009593
Your error checking is completely wrong.
>>
>>59009593
You should iterate up to dicklen - 1 because the head should be a part of the size.
>>
>>59009593
/* >tfw no qt boy to lock up and feed hormones too */
/* >atoi */

#include <limits.h>
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[]) {

if (argc < 2) {
puts("zero length dicks don't exist unless you're a robot");
puts("usage: prtdick <length[positive integer]>");
return EXIT_FAILURE;
}

long dicklen;

if (!(dicklen = strtol(argv[1], NULL, 10)) || (dicklen < 0) || (dicklen == LONG_MIN || dicklen == LONG_MAX)) {
puts("enter a positive integer for the length, and make sure that's it not your dick's or god's");
puts("usage: prtdick <length[POSITIVE INTEGER]>");
return EXIT_FAILURE;
}

putchar('8');

int i;

for (i = 0; i < dicklen; i++) {
putchar('=');
}

puts("D");

return EXIT_SUCCESS;
}
>>
>>59009656
I thought for honest penis metrics, one should just measure from the base to the bottom of the tip
>>
>>59007972
>What are you working on, /g/?
I haven't started yet, still thinking about how to go about it. I want to add a feature to nemo (cinnamon's file manager) so that you can list directories in the cwd by size, as a file property column. The tricky part will be making sure that this feature doesn't kill responsiveness.
>>
>>59010274
>cinnamon's file manager
well, technically the file manager which comes default with mint cinnamon
nb
>>
When learning C++, I get the feeling that the language has evolved a ton over the years and there is so much deprecated garbage still required for backwards compatibility

I also get the same feeling with Rust. Why is that?
>>
>>59010596

>When learning C++, I get the feeling that the language has evolved a ton over the years and there is so much deprecated garbage still required for backwards compatibility
C++ was designed by committee with an original intended purpose that most C code compiles as is. You've basically hit the nail on the head here.

>I also get the same feeling with Rust. Why is that?
Rust was designed to have a similar feature set to "the good parts" of C++, including move semantics, RAII, etc... It's more or less about as convoluted as C++, just without the need for backwards compatibility with 99% of C.
>>
>>59010596
>considered poor style
what is the proper way then?
>>
>>59010626
just an expression on the last line

cuz you know, it's an expression based language (sometimes)
>>
>>59010626
fn foo(x: i32) -> i32 { x + 1 }


If you omit the semicolon on the last line it becomes the return vale of the function.
>>
>>59010274
That's neat. I approve of this course of action.
>>
>>59010625
>It's more or less about as convoluted as C++, just without the need for backwards compatibility with 99% of C.
So rust manages to be just as convoluted as C++? That is funny considering it is only a few years old
>>
>>59010685

Well keep in mind, Rust doesn't have a turing complete template system like C++... but it's ownership system for types is a royal pain in the ass for most people to understand.
>>
>>59010656
fucking disgusting
>>
>>59010717
>turing complete template system like C++
Stop trying to make that sound like a good thing.
>>
>>59010731

Never! I like stupidly flexible languages that let me break shit. As long as it lets me break shit in a way that's logically consistent with itself.
>>
>>59010765
Good job making your language literally undecidable to parse, you fucking idiot,
>>
>>59010777
>turing complete language
>good job making your program unpredictable
>>
>>59010786
Are you retarded or just pretending?
>>
File: 9999999999%FURRYIOUS.gif (495KB, 618x648px) Image search: [Google]
9999999999%FURRYIOUS.gif
495KB, 618x648px
REEEEEEEEEEEEEEEEE
WHY DOES COLUMN-MAJOR EXIST
YOU HAVE TO WRITE ALL YOUR MATRICES IN A WAY THAT DOESN'T MAKE SENSE MATHEMATICALLY
>>
>>59010777

The only thing missing is the ability to read and write values while the program is compiling. I'd love to make a TUI Tetris game that runs inside GCC.
>>
>>59010625
>literally smaller standard than even C
>perfectly consistent
>>>>>>>>>>>>more or less about as convoluted as C++
Into the filter you go.
>>
>>59010798
>the ability to read and write values while the program is compiling
You might be interested in Jai - if it's ever released...
>>
>>59010796
>doesn't understand transposition
>>
>>59010809
>>perfectly consistent

see pic
>>59010596
>>
>>59007994
fuck off GNUmale
I don't want GTK3 GPLv3+ embedded X sound, a 3D viewer, a web browser a butterfly, games, encryption.. OH FUCK IT YOU MIGHT AS WELL JUST ADD A MONOLITHIC KERNEL INSIDE OF IT AND MAKE IT SYSTEMD DEPENDENT.

in all seriousness use whatever you want but vi (original vi) and vim are superior choices
>>
File: unwrap().unwrap().unwrap().png (132KB, 1366x768px) Image search: [Google]
unwrap().unwrap().unwrap().png
132KB, 1366x768px
>>59010809
>>
>>59010831
I knew you were retarded already but thanks for demonstrating to what extent.
>>
>>59010824
>adding an extra step when instead programs could just not use fucking column major
>>
>>59010838
>is shown an example that contradicts his claim
>r-retard!
>>
>>59010837
You should be using `?` instead. Also non-sequitur.
>>
>>59010796

Column major exists because Fortran programmers are fucking weird. Every decent language does row major.

Just use C and don't do drugs.
>>
>>59010840
you wouldn't have this problem if you weren't using matrix libraries you lazy shit
>>
>>59010849
Thanks for confirming that you weren't merely tired or confused and that you are actually a full-blown clinically certified retard.
>>
>>59010833
>can compile emacs without most of that
Thank you Gentoo USE flags
>>
>>59010852
Typical tripfag incapable of understanding such HARD and EXOTIC concepts as cache.
>>
>>59010850
>>59010850
the entire code looks like shit. it doesn't help that it lacks whitespace (fp tards thinks this looks more elegant... just another reason why rust tards are fucked in the head) and it's inconsistent with its if statement formatting
>>
>>59010881
[citation needed]
>>
>>59010890
kill yourself
>>
>>59010852
Doesn't GLSL use column major too?

>>59010856
I'm not using matrix libraries.
But the existence and common usage of column major means that an extra step is added to figuring out how to implement something suggested by a guide; figuring out whether it needs to be transposed or not.

Which is simple enough if it's the only variable, but makes things twice as messy if there's other variables.
>>
Functional fags need to understand the extensibility problem
>>
>>59010913
OOPfags need to understand the bloat and complexity problem.
>>
>>59010910
http://stackoverflow.com/questions/17717600/confusion-between-c-and-opengl-matrix-order-row-major-vs-column-major
>>
I'm like literally retarded and I need help pls. This isn't homework I'm trying to understand how much memory I'll be using for stuff.

How can I math out how much memory an array of 400 ints (c#) will take up roughly I know its a 32 bit integer but I'm a pleb and don't really understand the math to convert that into something I know like megabytes. I tried converting it using googles conversion calc thing.

1 bit = .0125 bytes
32 bits = 1 int?
100 ints = 3200 bits
3200 bits = .4 kilobytes
400 ints = 1.6 kilobytes?
>>
>>59010963
bytes: 400 * sizeof(int)
bits: 400 * sizeof(int) * CHAR_BIT
>>
File: languages3.png (17KB, 522x384px) Image search: [Google]
languages3.png
17KB, 522x384px
Reminder
>>
>>59010977
if hasklel has such fast development why is there so little software written in it
>>
>>59010913
You mean the one that has been solved in Haskell?
>>
>>59010988
OOP programmers cannot into functional, I blame universities teaching Java and C#
>>
>>59010988
#Rekt
>>
>>59011007
>being this delusional
>>
>>59010993
>partial functions everywhere
>billions of language extensions to do anything
>disgusting macro system
>>
>>59010977
Good performance + Fast development = Rust.
>>
>>59011022
it's almost like computers aren't meant to be programmed with functional languages
>>
>>59011037
>no HKTs
Rust is already dead.
>>
>>59011037
>Rust
>Fast development
No
>>
>>59011071
[citation needed]
>>
Is there any lisp (preferably a scheme) where the gc can be stopped completely during certain segments? There MUST be a way to manually collect garbage in that case, but simply halting collection and manually invoking it is good enough.
>>
>>59011111
There's bone lisp.
>>
>>59011155
It doesn't look real, just a stub right now. Not even remotely usable. Nevermind the fact that the plan they have is nothing short of a joke.
>>
>>59011164
Then probably not, given garbage collection was invented for the original Lisp.
>>
>>59011093
You are clearly not a programmer
>>
>>59011190
I accept your surrender.
>>
File: fug.png (14KB, 872x236px)
fug.png
14KB, 872x236px
>>59010973
Okay another retard question I tried looking up casting an int to an enum and I got a ton of complicated responses that i didn't understand.

pic related.
>>
>>59011111
I don't know of a Lisp that can programmatically start and stop GC. In Racket you can turn GC off completely, but that's not really helpful. The closest thing I can think of is running
(collect-garbage 'incremental)
which will keep track of the unused data until the next major collection - it speeds things up at the cost of higher memory usage.
>>
how do I time a function in c?
no posix
>>
>>59011294
>average C toddler
>>
>>59011253
try making startAttributes a constant
>>
>>59011294
>no posix
gettimeofday() is the only good way to do it on a unix system

C is a small language and it is meant to be used with other apis
>>
>>59011294
kys

>>59011319
kys
>>
>>59011316
Oh, wow, thanks a lot I'm glad it was that easy of a fix. I guess its a good sign that I felt like that should have worked but it makes sense that it would have to be const in a language like c# I just never thought of that.

Thank you very much again.
>>
>>59011306
>>59011338
you ok buddy?
>>
>>59011037
Rust performance was debunked, its slower than php
>>
File: good_code.png (38KB, 455x695px) Image search: [Google]
good_code.png
38KB, 455x695px
>>
>>59008237
Inter-universal Teichmüller theory.
>>
>>59011356
source?
>>
>>59008991
truth
>>
>>59008237
all high school-tier math at minimum
>>
>>59010665
Mmm.. Ran into a slight problem though; specifically running
ncdu -o file ~

took about 30 mins on my machine..
>>
I finally got the lock-free queue from "Simple, Fast, and Practical Non-Blocking and Blocking Concurrent Queue Algorithms" working right.

The code is https://sstewartgallus.com/git?p=linted.git;a=blob;f=src/ada-core/src/linted-lock_free_queue.adb;h=8baa5b79ea4d9fddaa083f30a1f3b2968318290d;hb=560164b922249a14ba65d5c6028f8758829d2182 and is Ada SPARK.
>>
>>59011532
Specifically, it seems to get really bogged down by lots of small files.
>>
>>59011294
clock_t start = clock();
thing_to_time();
clock_t end = clock();

printf("Time: %f\n", (float)(end - start) / CLOCKS_PER_SEC);
>>
>>59011627
>lots of small files.
And by which I mean a few hundred thousand small files
>>
>>59009544
the majority of software does not need low-level hardware access so it dosen't get that.
>>
>>59008291
Pleb doesn't into quarternions.

>>59009074
C is a poor fit for GPUs, DSPs and highly concurrent processors like Green Array's Forth based GA144.

C is also a poor fit for running on top of the JVM.
>>
>>59011759
>GPUs
GPUs are too different from CPUs, so any conventional programming language is not going to work well on it.
Really though, bringing up GPUs is pretty fucking stupid.
>DSPs
Why?
>C is also a poor fit for running on top of the JVM.
>>sane
>>
>>59011532
>>59011627
>>59011681
RIP in pepperonis
>>
>>59007972
>>59008067
>>59008076
>>59008095
>>59008108
So does Rust perform bounds checking or not?
>>
>>59011903
Yeah.. I mean maybe you could have it take a count at boot or daily or something and then have a button to recalculate any folders which have been modified since the last calculation or something..

Still it would be nice if there were a faster method.

Maybe a background service which keeps track of things.
>>
>>59011964
So I deleted some old temp folders a patcher made, reducing the total files a few hundred k (~700 to 500k files) and it improved the run time from 30 mins to 15 mins.
I mean once a day that isn't too terrible, right?
>>
/g/ how do I ensure plenty of (you)s for my /dpt/ posts? It feels like I'm talking into a void sometimes.
>>
jumped from vba to clojure...am only slightly confused
>>
>>59011759

>GPUs
*cough* OpenCL *cough*

>>59012028

Good programmers should be able to jump from one language to another without too much difficulty.
>>
>>59007972
Rust actually isn't a meme language like Go
>>
File: ggg.png (2KB, 163x84px)
ggg.png
2KB, 163x84px
where's the new thread?
>>
>>59012006
the void is real
except for when it's not
>>
new thread: >>59012259
new thread: >>59012259
new thread: >>59012259
new thread: >>59012259
new thread: >>59012259
>>
Hey guys I'm learning the C++ language. What should I work on?
>>
>>59008237
Discrete math, linear algebra, relational algebra
>>
File: alt_right.png (614KB, 960x695px) Image search: [Google]
alt_right.png
614KB, 960x695px
>>59008249
Yfw I've literally donated for that and will keep on doing it?
Thread posts: 322
Thread images: 35


[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.