[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
/dpt/ - Daily Programming Thread
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 255
Thread images: 20
File: K&R himegoto waifux2.png (1 MB, 1000x1400) Image search: [Google]
K&R himegoto waifux2.png
1 MB, 1000x1400
old thread: >>54590561

What are you working on, /g/?
>>
>>54600081
Rewriting the Linux kernel in Haskell.
>>
>>54600081
1st for the only language worth using from 2020 onward, C++
>>
>>54600156
C22 is just around the corner anon~
>>
Hey /dpt/,
What is the feature you'd most like to see in the next C standard?
>>
>>54600283
garbage collection and reflection
>>
>>54600283
ur mom
>>
>>54600283
native networking
>>
>>54600283
>>54600295
oh and dynamic types
>>
>>54600295
don't forget xml serialization tho
>>
>>54600283
Why ruin something that's already perfect?
>>
>>54600283
Much more abstraction, garbage collection, removal of memory management.
>>
>>54600283
C standards only ever include things that were already widely implemented as extensions, like the featureset in GNU C.

I want function literals and nested functions because lambdas.
>>
File: 2016-05-17_10-53-46.gif (231 KB, 916x916) Image search: [Google]
2016-05-17_10-53-46.gif
231 KB, 916x916
I finally managed to get my quadtree and collision detection working! The collision detection is still kind of weak, I need to tweak it some more. Please excuse the poor .gif quality. Figuring out how to recursively render a quadtree's structure and overlap that onto the background as nodes are being created and destroyed was neat.
>>
>>54600414
What the fuck are those red boxes?

Background is pixelated as fuck.

Spaceship looks like a dickhead made of old caulk.

Orange thing is clearly hacking and can't even move, shit auto-aim AI.

2/10, not even trying.
>>
>>54600394
>I'm a webshit and want memes
>>>/wdg/
>>
>>54600441
please enjoy my excellent high-quality™ demo graphics, thank you
>>
>>54600164
C2x, they postponed it again last time.
>>
Going to be working on sentiment analysis soon. Can anyone suggest some programming-oriented reading material?

Also what lang should I be using
>>
>>54600240
>dereferencing null

>>54600252
That's not moving the goalposts. It's up to you to prove to me that you can make a null reference and the best way to do that is to do it.
>>
>>54600701
Are you actually writing the algorithms to do the machine learning or are you going to be leveraging pre-existing sentiment analysis APIs?
>>
Bring back unsigned integers
>>
>>54600701
NLP with Python I guess
>>
What's wrong with C#? It's free ad in freeduhm now and not likely to get license/patents issues with ms if you use it. At the very least it feels nicer than Java.
>>
>>54600739
>>54600739
Are there really languages with no unsigned?
>>
>>54600830
Java.
>>
>>54600830
I remember when I thought like you, those were good times.
>>
>>54600283
C++
>>
>>54600707
#include <stdio.h>

void g(int &x)
{
printf("lad... %p\n", &x);
}

void f(int *x)
{
g(*x);
}

int main(void)
{
f(0);
}
>>
>>54600988
f will segfault when you try to dereference x.
>>
>>54600992
f doesn't dereference x
>>
When creating function pointers, can I declare them as having no arguments and then have them point to a function with 5 arguments?
>>
>>54601004
>g(*x);
>>
>>54601012
You can cast them any way you want, just like any other pointer.
>>
>>54601027
What's the proper way to cast a function pointer?
(void (*)(int, int)) /* ? */
>>
>>54601016
>meme arrows
how about you test that "segfault" assumption, dummy? then, I can tell you what the standard says about it
>>
>>54601049
Not him, but what does the standard say about it?
>>
>>54600081

how would you go about solving this with no calculator or computer?

Consider the following method:

public int goFigure(int x)
{
if (x < 100)
x = goFigure(x + 10);
return (x - 1);
}

What does goFigure(60) return?
>>
in order to draw a frame. Does you gpu have to render every object and draw it to the screen in order of furthest vertex to nearest?
>>
>>54601089
109
>>
>>54601049
Okay, so it's undefined behaviour.

You cannot have a null reference without exploiting undefined behaviour or aliasing, happy?
>>
>>54601118
no
>>
>>54601118
No, they use a depth buffer.
>>
>>54600441
This is a programming thread, not a marketing thread. Holy fuck, just leave.
>>
>>54601089
by doing math

109
>>
>>54601177
You're a marketing thread, nerd.
>>
>>54601193

what math

do you write a summation?
>>
>>54601226
just pull out a calculator and keep adding 10 until you hit your base case of return x - 1.
>>
I am going back to school for comp sci. I did a lot of programming in high school, and thus far I have worked with java, VB, Basic, c++, c#, and python. I still have a ways to go before I get my BS.

Be real senpai, how much do programmers, and engineers make? Am I making a mistake?
>>
>>54601289
>>54601119
>>54601193

it's 95 dumbshits
>>
>>54601308
>Going back to school
Are you a dropout? Or did you get a previous Bachelor's?
>Doing it for the money
You're not gonna make much and you're not gonna have a good time unless you have some research under your belt about what you think you want to do with a CS degree.
>>
https://www.reddit.com/r/lisp/comments/4jsbdj/i_had_this_tattoo_for_a_while_now_id_thought_id/

do you have any programming tattoos, /dpt/?
>>
>>54601308
Depends on where you live, anon.

Here in Houston, I'm making ~$45k in a fairly entry-level position, and our cost of living is pretty damn low.

In San Fran or New York you'd be making like $80-90k, due to rent prices and other commodities.
>>
>>54601361
>linking reddit

Fuck off.
>>
I'm writing a toy compiler for a toy language.

I'd like a target language that's low level enough to not have any overhead if I don't want it (no GC, no runtime checks, no bloated shit, thats my source language job). C is a simple target for a quick & dirty toy compiler, but it's kind of messy and probably overkill, IR would be the "correct" choice but that's boring and annoying since I'm really gonna be targeting just x64, and if I use an IR or directly x64 ASM I have to write all the actually hard stuff like register allocations and optimizations.

So what's the laziest low level language I can compile to? go? rust? nim? terra? Why isn't there a good *really low level* language for fucks sake
>>
>>54600283
defer keyword and lambdas
>>
>>54601362
Seattle

>>54601342
I dropped out, because i got a job doing nuclear waste clean up, and wmd disposal. At one point I was making 100k, but after cut after cut after cut, i am making ~36k. I dont wanna be "in it for the money" but my landlord is in it for the money...
>>
>>54601061
it says it's not dereferencing
>>54601129
>Okay
oh, but didn't you say it dereferences x?
>so it's undefined behaviour
are you sure this time? you seem to jump to conclusions without actually really thinking about the problem
>cannot have a null reference without exploiting undefined behaviour or aliasing
again, you sound very sure about this, but as we've seen you're also quick to backpedal
got anything to support your claims?
>>
>>54601401
>C is overkill
How? It's a nice high level language that's pretty fast. Easier than writing something that compiles to hurt-me-more rust.
>*really low level* language
There is only assembly.
>>
>>54601401
Any language you compile to is going to be messy. Go is garbage collected and has runtime type information etc.. You don't have to do any register or optimization stuff with LLVM IR AFAIK. I would use C.
>>
What is best programming language to use if I want to make a website?
>>
>>54601421
>I dont wanna be "in it for the money" but my landlord is in it for the money...
That's nice but do you actually ENJOY programming? Do you go out of your way to learn things? If so you'll be fine. If not just save yourself a lot of money and get a job in finance or insurance or something.
>>
>>54601451
>>>/g/wdg
>>
>>54601444
>There is only XUL
ftfy
>>
>>54601421
>Seattle
I'm not sure what the climate is like up there, but aren't many tech companies moving way out into the surrounding towns due to the fucked highway infrastructure? Boeing rings a bell here.

I'm sure the average income is higher there anyway, just google software developer salaries in your area.
>>
>>54600283
>>54600394
I feel like yeah, lambdas should definitely be in C. Any reasons why they wouldn't be, other than not wanting to add complexity to the language?
>>
>>54601401
>C is overkill
>IR is correct choice
you got that backwards
>>
>>54601440
It does dereference x, but dereferencing null is undefined behaviour.
>A pointer whose value is null does not point to an object or a function (dereferencing a null pointer is undefined behavior)

A reference is defined as an alias to an object. References being implemented as pointers is an implementation detail, and therefore being able to have a null reference is only due to undefined or implementation-defined behaviour (assuming that the standard is consistent).
>>
>>54601491
>Any reasons
not compatible with function pointers
>>
>>54601491
Not wanting to add complexity to the language. If you implement lambdas then you probably are going to be looking to implement closures (because lambdas are basically useless without closures) and closures are very complex and very outside of C's domain.
>>
>>54601543
Only if it's a closure.

>>54601572
That's not an argument for why C can't have lambdas without variable capture, though. Would still make life a lot easier.
>>
What's the best open source license and why is it MIT?
>>
>>54601637
MIT
>>
>>54601444
>>54601445
>>54601501

fuck me, looks like I'm going with C then. Is the C11 standard the least retarded way to learn it?
>>
>>54600441
Wow what a dick this guy is
>>
>>54601620
What do you mean it would make life a lot easier? Show me some code that would be made easier with closureless lambdas? Shit's fucking useless just make a typical function.
>>
>>54601669
You're a fucking dick, asshole.

What's your favorite programming language, and why?
>>
can someone help me in C please ?
I'm working on an arduino project with LED matrix and I'm stuck
>>
>>54601637
The best license is MIT with the added clause "The Software shall be used for Good, not Evil.", so it can't be used in GPL software.

https://bugs.php.net/bug.php?id=63520
>>
>>54601717
What part are you having trouble with senpai?
>>
>>54601645
But why?
>>
>>54601719
>GPL is Evil
>M$ garbage is Good
lemme guess, MIT is "more free"?
>>
>>54601682
1) function has to be defined away from where it's used
2) pollutes the namespace
>>
>>54601645
>>54601637
>>54601719
Enjoy being cucked by corporations taking your code, perverting it, and then eclipsing it.
>>
>>54601719
>Wanting to be compliant with the cancer that is GPL.
>>
>>54601796
So do you wangdows or freebsd?
>>
>>54601540
>It does dereference x
but it doesn't; are you going to ask me to prove it to you next? you should already know by now that the big dick playa delivers :^)
>A reference is defined as an alias to an object
that's how they're useful, there's not much you can do with a null reference
>assuming that the standard is consistent
well, hasty assumptions are the ones that got you here in the first place
>>
>>54601749
Because the author is allowed to use the code however they see fit.

>>54601762
That's freedom.

GPL is anti-freedom. It's forced re-sharing.
>>
>>54601756
non issues
>>
>>54601815
OSX for development.
Linux for deployment.
>>
>>54601748
I have a matrix and I want to move a led with switchs but I can't manage how to do it

http://pastebin.com/sfbAuCXg omg I'm going to loose my mind
>>
>>54601838
GPL prevents others from using your software to take away other people's freedom.

In order to have a free society, laws must be put into place so that nobody may deprive others of their rights to life, liberty, or security of person.
>>
>>54601823
How is *x (where x is a pointer) not dereferencing x?

The compiler may do inlining and optimize &*x to just be x, therefore preventing the segfault, but that's what you get when something is undefined behaviour.

>>54601856
Subjectively. Are there any objective issues with adding lambdas that don't do variable capture?
>>
>>54601874
>you are more free if I force you to do this thing

GPL is more restrictive(read: less free) than MIT.
>>
>>54601862
>switches
Why aren't you using a lookup table for the patterns you want to display on your matrix display?
>>
>I want the freedom to deprive my users of their freedom therefore GPL is non-free cancer
lol
>>
>>54601862
>2016
>not writing identifiers in English
>>
File: 1461935993454.jpg (111 KB, 717x587) Image search: [Google]
1461935993454.jpg
111 KB, 717x587
>>54601620
>he can't implement a lambda with a struct, void** and a function pointer
>>
>>54601908
The freedom to do evil is true freedom.
>>
>>54601895
>lookup table
I am trying to do a connect 4
And I don't even know what is a lookup table
>>
>>54601892
This is a false definition of freedom. Anarchy is not freedom.
>>
>>54601838
What does it offer over no licence?
>>
>>54601944
You're talking about closures and not lambdas. Lambda (outside of the lambda calculus meaning) is a synonym of "anonymous function". By specifying "lambda without variable capture" I mean something that only requires a function pointer.
>>
>>54601944
That is not a lambda but an anemic and clunky closure.
>>
>>54601401
C is not overkill at all. If you really want to be lazy then don't compile down to anything at all, just interpret it.
Yes, IR is the correct choice if you're concerned about C being messy but even C would not be that bad at all.

>Why isn't there a good *really low level* language for fucks sake
If you're so against IR, why not just write assembly?
>>
>The freedom to do evil is true freedom.
>>
>>54601964

But a license that forces your hand (see: GPL) is definitely freedom™
>>
>>54601908
>>54601964
I want my users to have the freedom to not be forced to reshare their modifications to my code.

I welcome their modifications, but I'm not going to compel them to release their work.
>>
>>54602023
Only if they want to redistribute. You can privately modify GPL software for your own use as much as you want.
>>
>>54602023

wow u sound like an evil despot.
>>
>>54602012
Nice argument there buddy.
>>
>>54602038
What use is code that I cannot redistribute?

I'm not a hobbyist NEET.
>>
File: excel.png (2 KB, 187x143) Image search: [Google]
excel.png
2 KB, 187x143
Python user here. I'm trying to import data from a .csv-file. I want to create groups in a dict, and each of the groups should point to 1 or more subgroups. See pic related, from which I'd like the group 0 to contain subgroups 0 and 1, but group 1 should only contain a subgroup 0, etc.

Here's my shitty code that doesn't run:

importModel = open("C:\pathtofile\\testNodes.csv")
importModel_csv = csv.reader(importModel)
next(importLogicModel_csv, None)
groupDict = {}
subgroupDict = {}

#create groups
for row in importModel_csv:
groupCurrent = row[0]
#create subgroups in groups
for row in importModel_csv:
nodeCurrent = row[1]
nodeDict[nodeCurrent] = {}
groupDict[groupCurrent] = nodeDict[nodeCurrent]
print groupDict


The output I get is
{'0': {}}
; the output I'd like is
{'0': {'0','1'}, '1': {'0'}, '2': {'0'}, '3': {'0'}}
. Where am I going wrong, /dpt/?
>>
>>54601692
>What's your favorite programming language, and why?
I don't have a favorite.
>>
>>54601983
You cannot hold me liable for any issues my code causes, nor is any warranty implied.

Pretty much the only important thing an open-source license needs.
>>
>>54602017
What terrible things are you forced to do? Not abuse your users?

Then again you're a fan of F# aka OCAML no-freedom edition so there we go.
>>
>>54602052
I can't see any non-scummy reason to want to modify free software and then release the binaries without the modified source.
>>
>>54602058
Fuck me, I did the code wrong. The parts saying "node" are supposed to say "subgroup".
>>
>>54602072
The only non-scummy reason I can think of is a pathetic one: they don't want people to judge their code.
>>
>>54601455
Yes, i do enjoy coding. Even when I cant figure something out and I wanna hit my head against a wall. I like programming robots, i have one that drives around while quoting Agent Smith from the matrix.
>>
>>54602097
That too.
>>
>>54602072

So I can make money off the hard work of other people.

Pretty simple, desu.

>>54602069

I'm a pretty big fan of anything that oppresses.
>>
Im looking for a website that was posted on /g/, it was a game-like assembly debugging puzzle where you advance levels to unlock a prize in the end. It was really nice looking and had differet assembly instruction sets each level.
Google did not help and so i turn to you
>>
>>54602150
I'm not familiar with that one but maybe you'd be interested in TIS-100?
>>
>>54600283
memes
>>
>>54602214
Yeah first thing google showed to me. Ill look into it, but the one im looking for had the code layed infront of you( actual assembly instructions)
>>
File: trumpeatin.jpg (33 KB, 540x540) Image search: [Google]
trumpeatin.jpg
33 KB, 540x540
Quick question for those that know of both C# and python.

I'm making a bot that has to open X amounts of chrome webdriver instances. Currently I've written this in C# and it works. Problem is we found out (for other reasons) that the server we will run this bot from is easier to get linux on, which overall I believe would be faster than running WIN2012 (correct me if I am wrong). Also we have to connect each instance of chrome to a specific external IP (we got enough). Any way, the code currently uses methods, threading and is almost solely made up of loops of methods. My question is, is threading done as easily in python and it is in C#? Thank you in advance.
>>
>>54602072
https://en.wikipedia.org/wiki/Trade_secret
>>
>>54601877
>How is *x (where x is a pointer) not dereferencing x?
how does the following compile?
struct X;
extern void by_ref(X& x);

void by_ptr(X *x)
{
by_ref(*x);
}

isn't "by_ref(*x)" dereferencing an incomplete type? or maybe not every "*" means dereference?
>may do inlining and optimize &*x to just be x, therefore preventing the segfault
not "may", "must"; the following is guaranteed by the standard to be correct in both C and C++
#include <stdio.h>

int main(void)
{
int *p = NULL;
printf("%p %p\n", &*p, &p[0]);
}

>is undefined behaviour
why are you still acting like you don't know the size of my dick, anon?
>>
>>54602100
Boom, done, you'll be fine. When you go back, join a computer club of some sort even if they're filled with the worst kinds of people (redditkiddies, facebook surface-dwellers, memesters, etc); even if you don't score an internship or something, having CS-themed stories to tell during an interview is a big plus to getting a job that pays and not just some pajeet-tier codemonkey position.
>>
>>54602276
For what its worth, you can run C# on Linux, but you'll have to change the way you're calling the instances of the process to a platform-agnostic standard.
>>
>>54602287
>Trade secrets
>that you put on the Internet in obfuscated form
You're an idiot if you do that.
>>
>>54602058
send help pls
>>
>>54602288
>how does the following compile?
Because *x dereferences into an lvalue reference &X.
>or maybe not every "*" means dereference?
Only if you take "dereference" literally; it's a misnomer in C++, as you have shown.

>not "may", "must"; the following is guaranteed by the standard to be correct in both C and C++
Not contesting that.

You may be right in both cases, but neither involves null so it's irrelevant.
>>
Haven't done any programming in 2 days, because studying for my uni exams(not prog. related obv.)

I feel a little guilty.
>>
>>54600081

How old were you when you first understood object oriented programming
>>
>>54602425

just carry a graphing calculator with you at all times
>>
>>54602432
16.
>>
>>54602432
I believe I was 28 (I'm 26 as of writing this tho ;_;).
>>
>>54602449
Now tell me how to see into the future.
>>
>>54602432
14 - high school java class
>>
>>54602288
>>54602410
I guess I didn't read the second example carefully. I'll change my wording: the second involves creating a transient null reference that can only legally used with & to take its address. You can't use it to initialize a reference or access members.

That is rather inconsistent of the C++ standard, IMO. I may be technically wrong but only because I expected ISO to be smarter.
>>
>>54602432
>tfw still don't understand the point of OOP.
>>
I only know C and I want to try some web development.
How does one write a backend for a website?
>>
File: perv.webm (3 MB, 1280x720) Image search: [Google]
perv.webm
3 MB, 1280x720
>>54600372
C is very far from perfection.

>>54600283
Nothing, there is no point to add anything to C now, the language is obsolete and very niche. If you want an imperative statically typed programming language with good support for most of abstraction techniques but still suitable for system programming, you already have plenty: C++, Objective-C, D, Go, Vala, Rust, Ark, Crystal, ...

>>54601451
clacklisp

>>54601401
Forth, Battlestar

>>54601944
A Lambda procedure is an anonymous procedure but more importantly it's an expression (obviously, otherwise it would be useless) which is necessary for declarative programming where everything is an expression.

A closure is a procedure that capture it's free variables and it's not necessary an lambda.

eg in speudo C:

// lambda (doesn't capture anything)
f = int (int x) { return x + x; };

// closure
int addY (int x)
{
return x + y; // state of y is captured.
}

// lambda + closure
f = int (int x) { return x + y; };


>>54602150
https://microcorruption.com
http://corewars.org/
http://www.koth.org/pmars/
>>
>>54602526

CGI. It's 110 years old, so there's plenty of tutorials.
>>
>>54602549
Wait, so I just create a CLI program that spews stuff to stdout whenever it is run?
>>
>>54602519
>too retarded to understand OOP
>>
>>54602542
>https://microcorruption.com
Thats the one, thanks
>>
>>54602519
At this point there isn't one. Some of its constituents may have uses (like encapsulation for hiding implementation details/fixing an ABI) but its claim to "managing state" has been snatched away by pure FP and linear type systems.
>>
>>54602587
Pretty much. If you want GET parameters, just fetch an environment variable. Want to do POST, read from stdin.
>>
using expat to parse a tiled xml file, if I have the encoding as XML, then it's easy, I just have to look at the tile element. I want to use the other formats that are available, however.

This is a portion of the .tmx file that has the tile data in CSV (comma seperated values):

  <data encoding="csv">
9,9,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,9,9,
9,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,9,
2,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,2,
3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,
2,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,2,
3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,
2,6,0,0,0,0,0,0,0,7,7,7,7,0,0,0,0,0,6,2,
3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,
2,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,2,
3,3,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,3,3,
2,6,0,0,0,0,6,0,0,0,0,0,0,6,0,0,0,0,6,2,
3,3,0,0,0,0,6,0,0,0,0,0,6,6,0,0,0,0,3,3,
2,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,2,
1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,
3,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,3
</data>


if you want to understand how expat is used to read xml files: http://stackoverflow.com/questions/609376/geting-xml-data-using-xml-parser-expat

how do I get a hold of those numbers?
>>
>>54602639
Is it possible to do this without showing an ugly program.cgi?variable in the url?
>>
>>54602542
I don't think you understand the point of C. You're just using buzzwords. C is not defined by being "imperative and static."

C is solid, stable, and well supported. The features of C++ and things like it are bloat unsuitable for systems programming outside of the 80's due to memory speed limitations becoming orders of magnitude more significant.
>>
What is the difference between 4chan and Reddit?
>>
>>54602485
>transient null reference
>only legally used with & to take its address
oh, "transient", a special kind of reference, unlike in >>54600988 where it was also only used to take its address, right?
>rather inconsistent
agreed on that
>expected ISO to be smarter
they thought so too, "let's not say outright that null references are illegal, just play games and put it in a note, which is not-normative, and can't be taken as ultimate source of truth anyway"
>>
>>54602711
At least we're both arguing for the same reason.
>>
>>54602708
>What is the difference between lists and trees?
>>
>>54602542
>speudo C
as in C for spergs?
>>
>>54602726
well, it's something :)
>>
>>54601341
>what is recursion
>>
Every day I wish I had studied computer science instead of chemistry.

Can someone please tell me good reasons why comp sci/programming jobs are shit? I need to feel better
>>
>>54601341
holy shit you are right, now i feel stupid
>>
>>54602790
It's only shit if you're a dumb computer janitor scrub who gets paid to create CRUD webdev interfaces all day.
>>
>>54602790
But you can learn computer science on your own(at least the undergrad part), you just won't get a degree.

Also I doubt grad CS has much to do with software development or a regular programming job, but that's just a hunch, I don't actually know.

Chemistry is god tier imo, not in terms of jobs, I don't know how chem jobs are either, but because I've always thought it was just cool and wanted to study something science relating.
>>
>>54600283
Dynamic typing, currying, and HM type inference. And native 1024 bit floats.

>>54602790
Really you'll only get shit jobs if you're shit or for some odd reason don't recognize mobility when you have it. The CS world is teeming with jobs right now.
>>
File: 1449700279793.png (74 KB, 300x256) Image search: [Google]
1449700279793.png
74 KB, 300x256
>>54602875
>Dynamic typing
>HM type inference
>>
>>54602900
Both are optional. It has to fit into the C standard so you'll have the option of static typing anyway.
>>
File: pepe_fu.jpg (24 KB, 495x495) Image search: [Google]
pepe_fu.jpg
24 KB, 495x495
>>54600441
kys
>>
>>54602900
>1024 bit floats
>taking it seriously
>>
File: cl.jpg (12 KB, 195x245) Image search: [Google]
cl.jpg
12 KB, 195x245
I'm trying to write TWOP in terms of ZEROP and SUB2 in Common Lisp.
>>
Any of you ever worked on a bigger project in Android Studio? We're developing a tiny app for a university course, and it's already SO FUCKING SLOW. Cant even imagine how unstable this gets if you work on a big mess, like facebooks app. Do the people involved just want to kill themselves at that point?
>>
>>54603058
I'm an idiot. This should be correct.
4 --> SUB2 --> ZEROP = TWOP
>>
File: img.jpg (1 MB, 2000x1333) Image search: [Google]
img.jpg
1 MB, 2000x1333
Did I do good gee?
>>
>>54603237
i3 lenovo
it's OK anon
if it's arch or gentoo it's perfect
>>
>>54603237
>X220
You did excellent.
>>
>>54603237
Depends, what other books do you have?
>>
>>54602685
anybody?

>>54602695
Not him, but I mainly use C and Java/C#, depending on what I want to do.
>>
What is point of using json in server client communication if you have to use stringify() and change JSON to normal string anyway

?
>>
File: 20160517_140256.jpg (1000 KB, 2560x1536) Image search: [Google]
20160517_140256.jpg
1000 KB, 2560x1536
>>54603237
Post your memes.
>>
What's the /dpt/ approved x86 assembly book? I wanna be able to read what my compiler is spitting out.
>>
File: images.jpg (18 KB, 305x400) Image search: [Google]
images.jpg
18 KB, 305x400
>>54603383

Not going to go to the trouble of photographing my desk but I have this one.

I've got an awful feeling that I'm in over my head.
>>
>>54603543
To the trash and read SICP instead. You'll learn real thing.
>>
>>54603336
As opposed to implementing a poorly defined, custom, ad-hoc format?
>>
>>54603528
interested in this too, decided to go with x64 codegen for my shitty compiler
>>
Is there anything like Netty for C?
>>
Is it possible to get a job as a C or C++ programmer these days?

Maybe I'm just living in the wrong country (Norway), but 99% of the job ads here are for C# and Java.
>>
>>54600283
Lambda functions, or at least defining functions within functions, so we can do stuff like
qsort(array, 10, sizeof(int), (void *arg1, void *arg2){
int *a = arg1, *b = arg2;
if (a > b) return 1;
if (a < b) return -1;
return 0;
});


Case and designated initialiser ranges. I can understand why they may not want these.
switch (c) {
case 'a' ... 'z':
do_something();
}

bool is_lower[UCHAR_MAX] = {
['a' ... 'z'] = true;
}


Deprecation/removal of C11 annex K. Pretty much everyone agrees that it's shit and isn't going to implement it.

## __VA_ARGS__ 'eating' commas. It allows for variable macros to have 0 arguments.

http://en.cppreference.com/w/c/experimental/dynamic to be included in the standard.

Forward declarations in function arguments
int fn(size_t n; int array[static n], size_t n)

it allows function arguments to be expressed in a more natural way.
>>
>>54603750
>a > b
>a < b
I clearly meant
*a > *b
*a < *b
>>
>>54603773
>clearly
>>
File: pythonlogo.jpg (46 KB, 680x459) Image search: [Google]
pythonlogo.jpg
46 KB, 680x459
So i started learning Python and i like it so far, it's the first language i'm learning, it's not too hard but still not very easy to someone who just stepped into programming, my question is, how much more difficult are Java and C++?
>>
>>54603620

I don't even want to spend the effort of searching through my extensive reaction image collection to find an image that conveys you are trying to ruse me
>>
>>54603789
drop python right now and learn java
>>
Does PowerShell ever get any love in these threads?
>>
>>54603789
When you're at the C++ stage, you'll laugh at others still in their python stage.
>>
>>54603750
I do like functions within functions. The lack of it really makes recursion less appealing to write in C.
>inb4 muh iteration
Is exactly the same as recursion when compiled with -O2
>>
>>54603818
>you are trying to ruse me
I ain't rusing you. Stay ignorant, it's your choice.
>>
>>54603858
Is C++ really hard? what if i'm very very weak with math, should i avoid C++?
>>
>>54603885
>if i'm very very weak with math, should i avoid C++?
avoid programming
>>
>>54603858
When you're at the C stage you'll laugh at others in their C++ stage.
>>
I know Python fairly well, and have some Java programming experience from a large project I worked on, want to pick up C. Can I jump into network programming immediately? If so would pic related be a good book? It's pre-ANSI C but I'm not retarded so I figure I can still learn from it.
>>
i want to pair program with a trap then fuck her ass whilst holding her penis

n-no homo
>>
>>54603789
python is pretty idiot proof so if you managed to work you're way through it with ease you will do good with java. C++ is a bit of a different story but if you're determined enough you'll do fine
>>
File: 1258642070877.jpg (2 KB, 120x126) Image search: [Google]
1258642070877.jpg
2 KB, 120x126
>>54603863

>le have you read your SICP today meme
>>
>>54603789
Same as you, guy. Pirated PyCharm and DL'd the MIT lectures. I have the latter playing while I skim ThinkPy.pdf and the Python wiki.

It's pretty easy thus far (Str/Int Ops and Statements). My only problem is that I can't think of a single case in which I would apply what I've learned in real life, ie why use
print ('4 * 3')

when I could just use the calc on my phone.
>>
>>54603930
>thinking network paradigms of a 1970s mainframe OS programmed in ASM applies to computers in 2017
>>
>>54603956
SICP is a good book that teach good things.
>>
>>54603935
I want to pair program with a trap while they sit on my lap.
>>
>>54603744
Yes. Look for jobs directly from product developers, such as Atmel or Funcom.

Generic IT job postings are flooded by consultancy companies who want C#/Java devs.
>>
>>54603992
Aha, okay. Thanks.
>>
>>54603988
what if its a biological girl with a big clit?
>>
Why is C the comfiest language? Every time I write in C I feel safe, as if I'm being nurtured by my grandmother while wearing adult diapers.
>>
>>54603929
>he's still in his C stage
>>
>>54604006
>biological girl
disgusting.
>>
>>54604008
autism
>>54604018
autism
>>54604006
autism
>>
>>54603984
That book is published 1990, dumbshit.
>>
>>54603108
Android Studio is very slow. The problem can be remedied somewhat if you turn on the power save mode in the IDE, but it's even then it's still much slower than Eclipse. The only good thing about Android Studio is that it has seamless integration with the SDK and you don't have to download plugins.
>>
What does /g/ think about programming competitions ? are they a waste of time?

does it correlate with being a good programmer?
>>
What does m do b you guys think of lua? Is it a good scripting language?
>>
File: 1461549226989.jpg (106 KB, 960x731) Image search: [Google]
1461549226989.jpg
106 KB, 960x731
>tfw at my type theory stage and just disappointed at the state of everything in programming
>>
>>54604083
You win competitions on the merits of how flashy and fancy your app is, and sometimes by how many people you know in the judge's table.

The actual quality of code has nothing to do with winning.
>>
>>54603936
>you're
speaking from experience?
>>
>>54604083
I think Google did a study and they don't necessarily mean they are a good programmer.
>>
>>54604083
yes and yes
>>
>>54604101
I don't think he's talking about hackathons.
>>
>>54604094
Sorry about that. Meant to type what do you guys think of lua?
>>
>>54604126
hackathons is literally who can write a 10line py script the first imo desu
>>
>>54604104
fug
>>
>>54604133
Lua is cool.
>>
>>54604138
Again, not hackathons. Think coding challenges instead. You're given a problems to solve in an hour, and the more you solve the more points you get.
>>
>>54604083
Competitions like the google code jam or such are usually more about how good you are at creating algorithms which does not necessarily mean being good at writing maintainable code (which really is a more useful trait if you want to be employed) but in some sense yeah, you're probably a good programmer if you place high in it.

Hackathons usually are fucking pointless and/or rigged though, just ways for companies to exploit idiots by saying anything written for the competition belongs to them and then letting someone who works for the company take home the prize anyway.
>>
>>54604138
How can someone be so retarded. Are you ESL?
>>
>>54604040
based
>>
>>54603826
really?
>>
>>54604244
really
you learn jack shit about program logic in python. learn java instead for the basic fundamentals of programming
>>
>>54602519
the only scenario I can see OOP being useful is when building software with an enterprise development style team, if everything is abstracted into parts it's hard for one idiot to fuck too much up
>>
>>54604244
Don't do that. He's just autistic and trying to reduce the competition.
>>
>>54604083
They are fun and useful. It definitely correlates with being a good programmer.

>>54604113
Not at all. What they found was that if two people score equally well on programming exercises, then the person who didn't practice for competitions was better at their job.

This is not really a surprise, since the dude who didn't practice would only get better at solving them if he did.
>>
>>54604305
That's got nothing to do with OOP, though.
>>
>>54604305
>the only scenario I can see OOP being useful is when building software with an enterprise development style team
typical brainwashed nigger with short sighted programming imagination and ability.
>>
>>54604322
I'm sure there's other benefits, but I'm not privy to them, it's never been a paradigm I've enjoyed but my experience is limited
>>54604362
ok
>>
Q: Why do Indians program in Java?
A: Poo backwards is OOP
>>
>>54604412
Well, this is my take on OOP nowadays: >>54602627
>>
>>54604415
oop in ool
>>
>>54604480
detangised
>>
Motherboard finished dying. Using a laptop from ~2005 running windows XP, with MSYS2, for development.

I had hoped this would happen much later, so I could wait for the second generation Zen and have better means to predict how things will pan out. At this point I might just get Zen, or stomach my disgust and further line Intel's pockets if Zen is a severe failure. Maybe I just won't buy anything at all.

Strangely, I don't feel much of anything. Apathy.
>>
>>54603789
Java and Python are basically dialects of the same language.

If you know one well, you can write in the other pretty easily.
>>
>>54600081
Fuck off this programming fag meme.
>>
>>54604538
it's a kind of strange feel
>>
/g/ want to learn to program what do?
>>
>>54604648
read K&R and buy a skirt
>>
>>54604648
By an entry level programming book of whatever language you want to learn and read it 4 hours ever day.
>>
>>54604665
epic my man
>>
>>54604665
Why do I have to buy a skirt?
>>
>>54604694
Because dressing like a schoolgirl improves programming ability! It's a scientific fact!
>>
I fucking hate VxWorks and their shitty documentation.

>>54602695

>The features of C++ and things like it are bloat unsuitable for systems programming outside of the 80's due to memory speed limitations becoming orders of magnitude more significant
>due to memory speed limitations becoming orders of magnitude more significant

What features of C++ do you think will cause issues with memory access times?
Thread replies: 255
Thread images: 20

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

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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.