[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: 330
Thread images: 25

File: 1498408261711.jpg (128KB, 600x1005px) Image search: [Google]
1498408261711.jpg
128KB, 600x1005px
Old thread: >>61082558

What are you working on, /g/?
>>
>>61089756
Distributed NVMe driver for concurrent access by multiple compute nodes in a PCIe cluster
>>
>>61089756

Game of Life in x86 Assembly: https://github.com/rpasta42/x86-life

Currently trying to make it work with higher width/height then 256, but I currently do all my calculations in 1 byte so it's a pain in the ass.

Chess Engine in Haskell: https://github.com/rpasta42/ChessKell

Super slow, so I'm trying to speed it up
>>
>>61089841
Have you checked the wiki for performance advice?
>>
>>61089756
C++ obsoletes all other languages, except Lisp/ML families, which is 80% academic BS.
>>
>>61089846

Most of advise isn't relevant.

I really need to cache result of previous move searches, and improve the alpha-beta pruning algorithm.
>>
>>61089888
C++ is obsolete
>>
File: Children of Jonestown.jpg (204KB, 1024x688px) Image search: [Google]
Children of Jonestown.jpg
204KB, 1024x688px
>>61089756
What can you do as an old guy if not code C++?

Think about your future.
>>
>>61089936
What language do you prefer?
>>
>>61089756
Dunno what's wrong here, can I get some help:

public void addVehicle(Vehicle v){
super(c)=tot;
this.ListV = new LinkedList<Vehicle>();
tot++;
this.ListV.add(v);
}
>>
>>61089888
>>61089936
If /g/ stopped pointless bikeshedding about languages, and put our collective minds together, we would cure cancer and HIV in a year.

But that would only help the afri and gayfags, so carry on your bike-shedding, kind sirs.
>>
>>61089967
>super(c)=tot;
Is this even legal syntax?
>>
>>61089963
I prefer Java to C++, and I am not a fan of Java.
>>
>>61089989
Java's only saving grace is its simplicity.
>>
Everytime I look at code or try to create a method my head starts feeling heavy and I get a bad headache

Help
>>
>>61089967
Sure can tell without an error message
>>
>>61089989
RAII and rule of zero makes working with C++ as ergonomic (albeit more verbose) as Java.
The benefit of that extra verbosity is a clearer semantic meaning.
But you get that without the cost of GC.

Java is obsoleted by C++.
>>
>>61090095
Even if that was the case, Rust made C++ obsolete already.
>>
>>61090118
Rust is way to premature still. I mean, it's a nice language, but having an incomplete standard library implementation is not acceptable.
>>
I decided to put my knowledge to use and make shitty mobile games for some quick money but l was wondering, how should l go with controls ?
>>
>>61090125
Having a bloated standard library and crippled template system is not acceptable either.
>>
>>61090064
have you been eating enough?
>>
>>61090134
>bloated
Implying

>crippled
Legacy reasons
>>
>>61089989
>>61090095
>>61090118
>>61090125
>>61090134
fucking oopfags
all your shitlangs are obsoleted by c with good macros
>>
>>61090118
Rust is just as bad to work with as C++.
Trade verbosity, for verbosity and a railroading BC
>>
File: puke-1.gif (3MB, 244x250px) Image search: [Google]
puke-1.gif
3MB, 244x250px
>>61090148
>C macro OOP
>>
>>61090118
I retract my statement.
C++ obsoletes all languages but Lisp/ML families and Rust. But Rust is still a baby. May someday obsolete C++. Has potential.
>>
>>61090148
C++ is the only language with good OOP because you can restrict it to the only thing it's any good for, RAII
>>
>>61090196
You don't need OOP to do RAII, only construct-destruct semantics.
>>
>>61089776
will it be released? or is it fully internal work?
>>
>>61089756
>>> def sum(x,y): return x + y
...
>>> def add(x): return sum(5,x)
...
>>> add(9)
14
>>>



how is this not effectively the same thing as partial application in a functional language?
>>
>>61090196
>good OOP
nani?
>>
>>61090208
Precisely.
>>
>>61090148
>macros
YES_THEY_ARE_VERY_NICE_INDEED
>>
>>61090159
this
>be blessed with a language that has no OOP
>try to put OOP into it
race traitors
>>
>>61090212
>will it be released
It's BSD, but at the moment it relies on a proprietary driver stack.

My previous version worked with a custom kernel module for pinning memory pages, but it scaled poorly (and I wanted it to work in a PCIe cluster).

>or is it fully internal work?
Currently it's a huge mess, I'm working on cleaning it up.
>>
>>61090148
Inversion of Control -- very great pattern for creating very generic code.

I've yet to see a C programmer pull off the same utility that inversion of control gets you without really awkward external tools.
>>
>>61090216
Because imperative languages require all args to be met.
And you cant do
sum add(5) = 10
>>
>>61090216
You can't do it in an expression context without a lambda
>>
>>61090060
I'd argue that. Scanner in and buffer are overly retarded to work with than cin/out. Comparing variables of different types are an absolute nightmare while c++ all you have to do is override. Strings in java are absolutely brutal.
>>
>>61090216
A) Your functions aren't values.
B) Your language can't generate pairs of functions with this kind of relationship on the fly.
>>
>>61090159
>>61090196
>>61090230
>>61090251
reminder that c is faster than c++ or rust, all three of which are way faster than java
reminder that while some small amount of abstraction is necessary, c reached that point already, and after that point any further abstraction is just bloat
>>
>>61090372
>c is faster than sepples
Only if you program sepples in a retarded way.

>c is sufficiently abstract
Only if you want to write portable assembly code.

I would know, I work with C code for a living, and it's fucked.
>>
>>61090330
You're right. Java's streams are way more retarded than C++ which was already pretty questionable.
God help you if you need to do arithmetic on non-primitives types.

Point is that C++ moved a lot of complexity out of the code and into the language. C and Java have simple syntactic primitives , unlike C++.
>>
>>61089989
>I prefer Java to C++, and I am not a fan of Java.
But ten billion Indians are. And I've nothing against Indians but fuck competing for $2/hour.
>>
>>61090414
>Point is that C++ moved a lot of complexity out of the code and into the language. C and Java have simple syntactic primitives , unlike C++.
This sums up Java+C vs C++ pretty well.
>>
>>61090385
Except C isn't even portable assembly. It's high-level PDP-11 Assembly which just has good compiler support on many other platforms.
It wasn't even until the late 80s that a typical computer computer was performant enough to act like a PDP-11 as C demanded, but the 68k and x86 basically cemented the C model as *the* model.
>>
File: 1498123577136.jpg (262KB, 2000x2000px) Image search: [Google]
1498123577136.jpg
262KB, 2000x2000px
>>61089756
We are making a web browser >>61078788

You are welcome to join
>>
>>61090385
>Only if you program sepples in a retarded way.
there's no non retarded way to program it
>Only if you want to write non retarded code.
ftfy
>>
>>61090476
>there's no non retarded way to program it
There is, go read some Scott Meyers and Herb Sutters, you uneducated pleb.
>>
>>61090414
>God help you if you need to do arithmetic on non-primitives types.
.plus(
this is a problem why exactly
>>
>>61090490
>go read some Dumb and Dumber
ftfy
>>
>>61090372
C++ can be as fast as C if you want it to be, you just might have to roll some of your own shit instead of using generic libraries.
Rust is as fast as C or C++ if you're doing the shit you should be doing anyway, unless you're in one of the particular rare environments where you're going to be skipping a lot of safety practices and runtime checks because you *really* need that speed, in which case you're probably spending hella money on programmer time to test the fuck out of that code.

>>61090414
>Point is that C++ moved a lot of complexity out of the code and into the language.
I agree. But when it's in the language, you get the cost of a greater learning curve when learning, with the benefit that you never have to worry about that shit again.
>>
Just rewrote my "random line selection" program as a filter in C.

<code>
// Filter version of the randline program

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

struct buffer {
char buf[255];
struct buffer *next;
};

struct buffer *head;
struct buffer *cur;

int main( int argc, char **argv ){
char buffer[255];
char c;
int i = 0;
head = (struct buffer *) malloc( sizeof( struct buffer ) );
cur = head;
// while block reads lines of file into buffer list
while( ((c = fgetc( stdin )) != EOF) && ++i ){
ungetc( c, stdin );
fgets( buffer, 255, stdin );
cur = (cur->next = (struct buffer *) malloc( sizeof( struct buffer ) ));
strcpy( cur->buf, buffer );
}
// Select and print random buffer
cur = head;
/*
srand( time( NULL ) );
int r = rand() % i;
*/
int r;
FILE *fp = fopen( "/dev/random", "r" );
fread( &r, 4, 1, fp );
fclose( fp );
r = r % i;
for( int j = 0; j <= r; j++ ){
cur = cur->next;
}
printf( "%s", cur->buf );
return 0;
}
</code>
>>
>>61090510
I bet you felt real clever typing that, didn't you?
>>
>>61090441
>>61090414
Why is it bad that a language is complex?
Why is it bad that there's a high bar for entry and it's not for lazy fuckups?
>>
>>61090520
Oh, fucking Christ, how do I do code blocks?

// Filter version of the randline program

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

struct buffer {
char buf[255];
struct buffer *next;
};

struct buffer *head;
struct buffer *cur;

int main( int argc, char **argv ){
char buffer[255];
char c;
int i = 0;
head = (struct buffer *) malloc( sizeof( struct buffer ) );
cur = head;
// while block reads lines of file into buffer list
while( ((c = fgetc( stdin )) != EOF) && ++i ){
ungetc( c, stdin );
fgets( buffer, 255, stdin );
cur = (cur->next = (struct buffer *) malloc( sizeof( struct buffer ) ));
strcpy( cur->buf, buffer );
}
// Select and print random buffer
cur = head;
/*
srand( time( NULL ) );
int r = rand() % i;
*/
int r;
FILE *fp = fopen( "/dev/random", "r" );
fread( &r, 4, 1, fp );
fclose( fp );
r = r % i;
for( int j = 0; j <= r; j++ ){
cur = cur->next;
}
printf( "%s", cur->buf );
return 0;
}
>>
>>61089888
Yeah, if you like bloat and think hating what you do is a good thing.
>>
>>61090529
I never said it's bad, just that it is.
It means that instead of learning to recognise idioms you have to learn language features instead. It may be harder to understand but it's also easier to recognise.
>>
>>61089958
> What can you do as an old guy if not code C++?

Uh, Fortran?
>>
i need to code up some sick gooey for a calculator i'm making to replace the piece of shit that is windows 10 calculator.

what language should i use and what gui framework?
>>
>>61090527
>I bet you felt real clever typing that, didn't you?
ftfy
>>
>>61090529
>Why is it bad that a language is complex?
My post said nothing about this.

>Why is it bad that there's a high bar for entry and it's not for lazy fuckups?
My post said nothing about this.


I merely pointed out that anon's observation is correct. Java and C have a different approach than C++. I happen to like C++ a lot more than both Java and C.
>>
>>61090473
>STILL zero(0) progress beyond idea guys and graphic design autists
>>
Finished polishing the error reporting for the Pascal compiler. I write some doc and then release 1.0.
>>
>>61090568
FreePascal and Lazarus for Cross platform
C# and .Net for Windows (Mono PITA)
Swift and Xcode for Mac
>>
>>610897
>>
>>61090500
If you care enough about your numbers to use bignumbs or complexes then you're probably doing more than adding them once.
>>
>>61090685
>doing non-int math under any circumstances
pleb
>>
>>61090473
>>61090586
>thinking you're gonna make a worthwhile browser that isn't fundamentally a reskin of Chromium or Firefox
Don't forget to tie some cryptocurrency to it, like that Brave browser.
>>
>>61090821
>I don't understand FP
wow. I didn't think we'd have people like this in /dpt/. ieee floating point is very easy to understand and use.
>>
>>61090851
Nobody was even talking about floats
>>
>>61090851
>FP
kill yourself fpfag
imperative is better
pleb
>>
>>61090876
Of course he was. He was talking about non-int.
>>61090880
I clearly wasn't talking about programming paradigms though.
>>
>>61090148
>good
>macros
you now what you have to do
>>
>>61090930
delete this;
>>
>>61090372
I can't hear you over my zero-cost happy path exceptions.
>>
still cant believe rust has macros, desu.
thought it was supposed to be a "modern" language
>>
>>61090968
reminder that all languages have macros
>>
what ide would you guys recommend for a beginner in C++?
>>
>>61090148
It's all fine and dandy unitl you see C that reimplements oop.
>longjumps are totally like exceptions, right?
>we don't need inheritance and objects, you fool! Why do you need that if you have structs, functions on structs and arrays of function pointers?
>>
>>61090980
Java and C# don't
>>
>>61090988
>Anonymous 06/26/17(Mon)16:55:43 No.610
QtCreator or CLion
>>
>>61090980
enums dont count lad
>>
>>61090968
Rust macros are of a different beast than C macros.
>>
>>61090988
visual studio
>>
>>61090988
CLion or vi/emacs.
>>
>>61090998
>using longjumps or exceptions instead of just fprintf'ing to stderr and either exiting or returning a documented default value to avoid crashing
oopfag pleb
>using arrays of function pointers instead of just structs and functions on structs
oopfag pleb
>thinking structs and functions on structs are oop
oopfag pleb
>>
>>61091010
>>61091041
gonna check these out, ty

>>61091031
i'd rather not use this one

btw, i don't want to use a text editor because i'm not sure how i would manage and compile different classes
>>
>>61090988
Code Blocks is the only right answer for an IDE.
>>
>>61091051
>either exiting or returning a documented default value to avoid crashing
>not instantly unwinding the stack
Lol I thought Cfag knew how to program for "performance"?
>>
>>61091063
i dunno, gnu coreutils is a pretty good ide
>>
File: tkinter.png (423KB, 578x453px) Image search: [Google]
tkinter.png
423KB, 578x453px
I have two transparent tkinter labels, one containing text the other an image, the image is only drawn in the parts where the text label is behind it. help?
I'm using python tkinter on windows 7 to draw the labels directly on the desktop without any window, so what you're seeing in the background is my regular desktop wallpaper, which might have something to do with it
>>
>>61091067
>instantly unwinding the stack
>unwinding the stack on exit at all
>not leaving that up to the os
>wasting cpu time cleaning up something that would get cleaned up anyway
oopfag pleb
>>
>>61091090
>crashing the program on error is good
Lmao Ctoddlers everyone!
>>
>>61091078
Not a modern/beginner friendly IDE
>>
>>61091051
>try to implement some generic function
>just (void *) and/or macro my shit up
>what is this "type safety" thing you are talking about?
>>
>>61091061
>btw, i don't want to use a text editor because i'm not sure how i would manage and compile different classes
gcc file1.cpp file2.cpp file3.cpp -o ./exec

You can put this into a Makefile and just type "make" instead, and if you ever get serious about programming, you'll have to learn how to use/write Makefiles. CLion, you'll be using CMake anyway.
And if you get serious about C++, you'll have to learn to manage and compile different classes anyway. It's a fundamental part of the language and ecosystem.
It'll take you an afternoon to learn it.
>>
>>61091100
see: >>61091051
>>
>>61090998
Cfags are known for half-assed and buggy handrolled implementations of features which are standard in other langs.
>>
>>61091111
welp, i'll probably learn it then, because i'm not willing to pay for an ide at the moment
>>
>>61091139
Are you a student? CLion is free for students for non-commercial use.
>>
>>61091111
>if you ever get serious about programming, you'll have to learn how to use/write Makefiles
not him buy make is ass though
it can't even use autodependencies that aren't constantly one build behind
>inb4 "this never ends up mattering"
that's beside the point
isn't there any alternative that can do automatic compilation the right way?
>>
>>61091168
>*but, not buy
>>
>>61091168
>it can't even use autodependencies that aren't constantly one build behind
It's funny, because I have a makefile that does exactly that. Maybe it's gnu specific though.
>>
>>61091102
>>try to implement some generic function
oopfag pleb
>>
>>61091161
yeah, we learned java in our class and as a final project i need to create a project using oo concepts in c++ (or anything that supports multiple inheritance) and i thought it would be nice to use this opportunity to learn c++
>>
>>61091194
>implements the same function over and over again
cfag pleb
>>
>>61091188
how
>>
>>61091194
>generic
>oop
pick one
>>
>>61091168
I know of Autotools and Cmake. I just personally just use Make. Google will probably help you here more than I can.

One big reason I recommended Make wasn't necessarily because it's the best tool, but it's ubiquitous.
>>
>>61091214
>he hasn't yet realized all types are interchangeable
>without generics, he would have to write the same function for multiple types, because he hasn't learned to see the bytes
oopfag pleb
>>
>>61091213
https://www.jetbrains.com/student/
>>
>>61091244
b-but the vtable lookups anon
>>
>>61091255
>generics
>vtable
>>
This is the Makefile of the project that I know work on. If make (at least GNU make) always considers the rules for the included files before actually including them. Never failed me.

# CONFIG

CC := g++
SRCDIR ?= src
BUILDDIR ?= build
DEPDIR ?= dep
BINDIR ?= bin
TESTSDIR ?= tests
SRCEXT ?= cpp
CFLAGS += -std=c++14 -g -O0 -ffast-math -ffunction-sections -fdata-sections
LDFLAGS += -Wl,--gc-sections -larmadillo -lyaml-cpp
INCLUDE += -I include

# /CONFIG

TARGET_SOURCES := ${wildcard ${SRCDIR}/target/*.${SRCEXT}}
TARGET_ELFS := ${patsubst ${SRCDIR}/target/%.${SRCEXT},bin/%,${TARGET_SOURCES}}

TEST_SOURCES := ${wildcard ${SRCDIR}/tests/*.${SRCEXT}}
TEST_ELFS := ${patsubst ${SRCDIR}/tests/%.${SRCEXT},tests/%,${TEST_SOURCES}}

LIB_SOURCES := ${wildcard ${SRCDIR}/*.${SRCEXT}}
SOURCES := ${TARGET_SOURCES} ${TEST_SOURCES} ${LIB_SOURCES}
OBJECTS := ${patsubst ${SRCDIR}/%.${SRCEXT},${BUILDDIR}/%.o,${SOURCES}}
LIB_OBJECTS := ${patsubst ${SRCDIR}/%.${SRCEXT},${BUILDDIR}/%.o,${LIB_SOURCES}}
DEPENDS := ${patsubst ${SRCDIR}/%.${SRCEXT},${DEPDIR}/%.d,${SOURCES}}

target: ${TARGET_ELFS}

tests: ${TEST_ELFS}

all: target tests

include ${DEPENDS}

${DEPDIR}/%.d: ${SRCDIR}/%.${SRCEXT}
@mkdir -p ${shell dirname $@} ; \
echo -n "`dirname '${patsubst ${SRCDIR}/%.${SRCEXT},${BUILDDIR}/%.o,$<}'`/" > $@; \
$(CC) -MM ${INCLUDE} $< >> $@
${BINDIR}/% : ${BUILDDIR}/target/%.o ${LIB_OBJECTS}
$(CC) ${LDFLAGS} $^ -o $@ ${CFLAGS}
${TESTSDIR}/% : ${BUILDDIR}/tests/%.o ${LIB_OBJECTS}
$(CC) ${LDFLAGS} $^ -o $@ ${CFLAGS}
${BUILDDIR}/%.o: ${SRCDIR}/%.${SRCEXT}
@mkdir -p `dirname $@` ;\
echo '$(CC) -c ${INCLUDE} ${CFLAGS} $< -o $@' ;\
$(CC) -c ${INCLUDE} ${CFLAGS} $< -o $@
dirs:
mkdir -p ${SRCDIR} ${BUILDDIR} ${DEPDIR} ${BINDIR} ${TESTSDIR} ${SRCDIR}/target ${SRCDIR}/tests

clean:
rm -rf ${BUILDDIR}/* \
${BINDIR}/* \
${TESTSDIR}/* \
$(DEPDIR)/*;

.PHONY: target tests all dirs clean

.SECONDARY: ${OBJECTS} ${TARGET_ELFS} ${TEST_ELFS}
>>
>>61091255
>he enjoys bringing up irrelevant concepts that aren't even from the same language
finally something we can both relate to
>>
>>61091254
thanks dude
i've got the license
>>
>>61091244
>he hasn't yet realized all types are interchangeable
>see the bytes
>claims C is a high level language
>>
File: icon.gif (59KB, 384x384px) Image search: [Google]
icon.gif
59KB, 384x384px
/dpt/ how do i program legs like these
>>
>>61091292
shit meant to reply to :>>61091219
>>
>>61091324
use your own handrolled functions to try to program normal legs instead of using a standard library in C.
>>
>>61091316
>he thinks there are any low level languages other than assembly
>he is this bad at words
>he also thinks being a high[ER] level language [THAN C] is actually a good thing
>he is this much of a oopfag pleb
>she is a gross bat
>if the bat face was gone i would do
>but the bat face is there so it's not
>>
monads - yes or no
>>
>>61091366
>muh "moan ads"
>>
File: gintama laugh.jpg (77KB, 720x338px) Image search: [Google]
gintama laugh.jpg
77KB, 720x338px
>>61091365
>assembly
>low level
>>
>>61091381
>he thinks assembly is not a low level language
>what he thinks is contrary to an objective fact that is not even a matter of opinion but merely a matter of formally accepted terminology
>>
>>61091402
ok """"person""""
>>
>>61091418
>he """"
>he is this much of a buttmad
>>
>hes unironically using a language without madules
>he has to meta-compile
>>
>hear all these snobby python kids talk about how python is the epitome of language design
>decide to try it out
>print is an operator not a function
>del is an operator not a function
>join() is backwards and called with the delimiter as the object


truly amazing
>>
>>61091381
Assembly languages are pretty much directly mapped to machinecode so you can't go lower than that.
>>
>>61091444
Atleast its an operator and not a macro like some languages...
>>
>>61091442
>>61091444
>he
>>
>>61091462
What arcane manner of ironic memeing is this?
>>
>>61091444

Try python 3.
>>
>>61091485
welcome to dpt
>>
>>61091444
why are you using python 2?
>>
>>61091454
Ironically, modern Assemblies are basically JIT by the processor's front side to a different language that more directly maps to the actual processor.
>>
>>61091444
>>61091500
>>61091511
>python transitions from 2 to 3
>these are the sorts of things that change
oh god
and on top of it all it's trapped in version hell?
fuck that shit
>>
>>61091540
Try ruby instead then
>>
>>61091454
>>61091525
>using assembly
>accepting the unfortunate middleman of a cpu
>not cutting out the middleman by building your program from scratch physically in real life
oopfag plebs
>>
>>61091562
my python panera bread membership hasn't expired yet I can't just go and get a new starbucks hwne
>>
>tfw we were born too early to experience cpu assisted processing alongside our actual brains
>>
>>61091589
that sounds really itchy
>>
>>61091567
FPGA life, yo.
Real programmers design their own processor.

Bonus points for implementing it with actual transistors and shit.
>>
So yeah, I need to update a scoreboard.txt file with a new score in C.

How can I do this without erasing the whole file? scoreboard.txt is already filled with 10 scores and I want to insert a new one, overwriting an existing score.

Basically, I have something like this (I know it's shitty for now):
  player pla[PLAYERS];
FILE *arq_scoreboard = fopen("scoreboard.txt", "wr");

for(int i = 0; i < PLAYERS && !feof(arq_scoreboard); i++) {
// read data in the format "string" "int"
fscanf(arq_scoreboard, "%s %d", pla[i].name, &pla[i].points);
if (pla[i].points < t->points) {
// wtf am I doing
strcpy(pla[i].name, name);
fputs(name, arq_scoreboard);
// scoreboard(); ignore this
return 1;
}
}


And yeah, I know that I probably shouldn't be using strcpy() and fputs there.
>>
>>61091562
>>>/wdg/
>>
>>61091614
I forgot to mention, but t->points is the score of the current player.
>>
>>61091602
nah lad.
they wouldnt be directly connected.
Itd be more like telepathy where the cpu does calculations and sends the results to you. But things would just work and any overflow you couldnt handle would get sent to RAM you could access as a sort of memory or information youd already "know".
>>
>>61091614
fopen("scoreboard.txt", "a+");
>>
>>61091723
This wouldn't be "overwriting an existing score" which is what he says he needs.
Apparently he wants to overwrite the score but only the one, leaving the rest of the file intact.
>>
>>61091723
Sorry, but that didn't work...

>>61091759
Yeah, it's exactly as you say.
>>
>>61091614
You could probably do what you want with a bunch of fseek and fpos nonsense, but it would be ugly and error-prone.
You probably have the right idea with just reading the whole file into an array. But the issue is you stop too soon. What you want is to keep the strcpy or something like it, but take out the fputs and return. And then you do another loop where you just overwrite the whole file by writing everything back to it, except with the one part changed.
>>
>>61091614
You gotta remember that when you're opening and writing a file you're effectively rewriting over a sequence of bytes, unless what you intend to replace is exactly the same length of what it was before you're probably gonna end up ruining whatever comes after the change you want to introduce.
The most simple solution would be to create a temporary file, rewriting line by line until you find the line you want to change, perform the change and then replace the original file with the temporary one.

If the score you want to replace is effectively the same length then you could perform some fseeks to find the position and rewrite there although I wouldn't recommend it.
>>
>>61091838
>>61091872
You're both saying similar things. I'll try finishing this with what you said in mind. Much appreciated.

In my .txt file, all the names have the same length (BEN, PET, ALC, etc.), but the points range from 0 to XXX.
>>
>>61091795
Well you are going to have to read in the whole file and write it back out. You can't be certain that the file will be be the same size, the number might be longer. Therefore the rest of the file after that point would need to be pushed down. Hence the whole read and rewrite.

You should probably be using a binary file unless this HAS to be readable. The alternative is 0 padding fixed width.
>>
what's the best way to do substring handling in C without any splicing functionality?

char s[20] = "test20and40";
std::atoi(s[4:5]); //what I want but obv not valid syntax
>>
Does D have operator overloading?
If so, how does it look for structs?
>>
>>61092026
s[5] = '\0';
std::atoi(s + 4);
>>
>>61092026
atoi(s + 4)
>>
>>61092026
>>61092125
>s[5] = '\0';
this part is unnecessary in this case, atoi stops at the first non-digit character and only fails if there are no digit characters preceding it
not sure if this is actually required by the standard, tested with gcc 5.4.0
>>
>>61092155
>>61092179
ok that is convenient
>>
>>61092155
Much more consise than the equivalent Haskell
>>
Should I skip C++ and learn Rust instead?
>>
File: 1469947317296.jpg (56KB, 920x730px) Image search: [Google]
1469947317296.jpg
56KB, 920x730px
>>61089756
could someone recommend me a place/book to read? im not computer illiterate but i havent written even the smallest bit of code in almost a decade, and i dont even know the questions to ask.
>>
>>61092248
dumb frogposter
>>
>>61092207
Rust is already more complicated.
>>
>>61092254
>literally within the same fucking minute
>>
File: sadbob.jpg (48KB, 500x335px) Image search: [Google]
sadbob.jpg
48KB, 500x335px
>>61092254
>>
>>61089756
Why does /g/ hates C++ so much? Too dumb for it?
>>
>>61092248
dumb frogposter
>>
>>61092307
C doesn't have OOP.
C++ has OOP.
C++ was made to be a better C.
But the consensus around these parts is that OOP is ass and anything that has it is made worse for it.
>>
>>61092307
It's easy to hate on C++, the language is full of holes. Problem is there's nothing better.
>>
>>61092307
Generally yes.
>>
>>61092337
Nobody here can even agree on what OOP means.
>>
>>61092307
No standard ABI.
What's the point of low level language if you can't use it from other languages.
>>
>>61092366
It doesn't matter what it is, it confuses me so it must be bad
>>
>>61092366
We can agree it's bad
>>
>>61092207
I don't think so.

Rust ecosystem is still undergoing maturation, and all the libraries for doing anything you'd actually want to do are under a constant state of flux, some of them to an unusable degree.

I honestly have no idea how they managed to write an OS in Rust. I'm not an OS expert, but maybe because most things in an OS end up being a roll-your-own necessity.
>>
>>61092307
Because using C makes them feel superior.
>>
I'm working on some control software for an Emotiv headset, I still don't decide what I'm going to do.

I'm also working on a image board type of site with nodejs and express.

I also want to start learning Rustlang.
>>
>>61092375
>No standard ABI.
C doesn't have a "standard ABI" either.
>>
Anyone here have experience with linq sql or whatever the fuck?

I'm creating a ezpz UI for a client right now using an asp.net gridview and this shit is fucky.

                Where="Entity == @Entity &amp;&amp; CompanyCode == @CompanyCode &amp;&amp; UserID.contains(@UserID)">
<WhereParameters>
<asp:SessionParameter DefaultValue="KM" Name="Entity" SessionField="Entity"
Type="String" />
<asp:SessionParameter DefaultValue="KM" Name="CompanyCode"
SessionField="CompanyCode" Type="String" />
<asp:ControlParameter ControlID="TxtUserID1" DefaultValue=" " Name="UserID" PropertyName="Text" Type="String" />


Need to get it so the default value passes a wildcard to the .contains method so that it returns all entries when UserID isn't specified.

Halp?
>>
File: heheh.png (149KB, 360x406px) Image search: [Google]
heheh.png
149KB, 360x406px
>He's still writing programs in C languages

How does it feel knowing you're becoming ever more irrelevant and unemployable each day.
>>
>>61092549
Who are you talking about?
>>
>>61092556
https://en.wikipedia.org/wiki/List_of_C-family_programming_languages
>>
>>61092514
System V's ABI standard is defined using C language as reference. Linux and other unixes implement ABI defined by System V, not sure about mac os.
It is trivial to have interface to library compiled from C. It's unpossible with sepples.
>>
>>61092563
WHO are you talking about?
>>
>>61092379
Not him but nothing about OOP confuses me, it's just bad.
An object is just a record with field visibility control and methods.
A class is just the type of an object.
Nothing new about inheritance either. Functional programming has subtypes so it's not a new or difficult concept that classes, being just types, can also be subtypes of other classes.
Traits are methods that exist independently of any class but can be given to classes or objects.
Mixins are just groupings of traits.
See, that's not confusing at all. It just sucks.
>>
>>61092567

it's possible with C++, you just have to extern C everything like a lunatic. It's ugly but it werks
>>
>>61092592
>having to write wrapper to your template / class messes instead of just programming in C
>>
>>61092570
Your gaping asshole dad
>>
>>61092606

I didn't say it was worth doing, I simply said it worked.
>>
File: haskelane.png (28KB, 287x81px) Image search: [Google]
haskelane.png
28KB, 287x81px
>>61092621
what the fuck do you even mean?
>>
>>61092629
>muh "moan ads"
>>
>>61092575
>nothing about OOP confuses me
>An object is just a record with field visibility control and methods.
>A class is just the type of an object.
>being this confused
>>
>>61092549
you from brit?
>>
>>61092677
>>An object is just a record with field visibility control and methods.
this is true isn't it?
>>
Why do modern C derived languages hate pointers so much?
One of the best things about C is that it's almost always clear when I'm mutating state outside of the local scope since I'm dereferencing a pointer.
Modern langs like Java, C# and D make dereferencing implicit. Even C++ loves using &references to obscure the fact that you're using a nonlocal variable.
Why?
>>
>>61092592
It's for name mangling, for symbols tables, usually header files for standard components such as stdlib, at least on Linux, already contain
#ifdef __cplusplus
checks and put externs there for you, all you have to do is just to include a header and link a corresponding library.

BTW. Happy pooing in the /dpt/ Designated Pajeet Thread. Only C and Haskell, only Poo in Loo.
>>
File: THIS IS NETRUNNER.png (275KB, 1920x1080px) Image search: [Google]
THIS IS NETRUNNER.png
275KB, 1920x1080px
>>61090586
WRONG
>>
>>61092695
No.
An object is just a record.
A class is just the type of an object, except that IT has field visibility control and methods. NOT the object itself.
>>
>>61089756
Done a few project euler problems today. Think I'm being clever, then see the solutions thread and realise how little I know.
>>
#![feature(associated_consts)]
use std::marker::PhantomData;

trait Bool {
const BOOL: bool;
}

struct T;
struct F;
struct And<L, R>(PhantomData<(L, R)>);
struct Or<L, R>(PhantomData<(L, R)>);
struct Not<B>(PhantomData<B>);

impl Bool for T {
const BOOL: bool = true;
}

impl Bool for F {
const BOOL: bool = false;
}

impl<L, R> Bool for And<L, R>
where
L: Bool,
R: Bool,
{
const BOOL: bool = L::BOOL && R::BOOL;
}

impl<L, R> Bool for Or<L, R>
where
L: Bool,
R: Bool,
{
const BOOL: bool = L::BOOL || R::BOOL;
}

impl<B> Bool for Not<B>
where
B: Bool,
{
const BOOL: bool = !B::BOOL;
}

fn main() {
let cond = (true || false) && !true;
type Cond = And<Or<T, F>, Not<T>>;

assert_eq!(cond, Cond::BOOL);
}
>>
>>61092836
Did you have something to say or what?
>>
>>61092836
literally why not just use BOOL
>>
>>61092836
Is that a Rust fizzbuzz?
>>
>>61092836
what language is this?
>>
>>61092889
C++20
>>
Randomness is so weird... I generated 60 booleans (not really, more involved than that, but it should have been equivalent) and got ~40 true and ~20 false, two times in a row... I was sure I had a bug, ran with N = 10000 and the weirdness disappeared.

>Click Here To Subscribe To This Blog
>>
>>61092889
cuck++
>>
>>61092907
click
>>
>>61092898
>fn main
Nice try Rustfag but even sepples isn't that ugly.
>>
>>61091444
>claims to be OOP
>globally scoped functions like map, filter and len instead of methods on iterables

>muh duck typing
>muh pythonic
>muh english words as operators
>muh None type that takes up 16 bytes
This language is a meme for children and >muh libraries scientists
>>
>>61092923
#define fn int

fn main() {
>>
>>61092926
>>globally scoped functions like map, filter and len instead of methods on iterables
with ufcs this doesn't even matter
>>
>>61092929
the code does not include anything, dumb rustfag.
>>
>>61092859
Just fishing for easy (You)s
>>
>>61092940
What is this Rust you speak of
>>
>>61092948
>>>/b/
>>
>>61092366
That's because people like to pretend there's OOP support in many popular languages like C++, Java etc. You can do oop in them just like you could in C but people read it as if those languages help you do it well. So there has come a distinction between pure OOP (smalltalk) and just OOP (Java). Very silly, clearly Java simply isn't OOP if it isn't pure. I wouldn't call C a functional programming language just because you can style your code that way.
So there's groups of people who look to the widely spread promises of OOP like encapsulation and program in languages that don't let them guarantee that at all where pure OOP would. Just programming in non-pure OOP doesn't get you anything but some minor things like their preferred calling convention (object.method(), instead of method(&object)).

There's also object oriented design which OOP aims to encourage. Which imo is a grand failure that has been proven over the years. It's the UML shit basically. Its a system that makes code very difficult to change and maintain compared to alternatives.

I think this last part is why people who don't do OOP hate it more than anything. It's the side that you have to face. You don't have to write your code in an OOP style but you may be required to interface with an unmaintainable, inefficient library with a complicated api (often for no reason). So it's easy to get resentful. But those who do OOP suffer the most obviously.
>>
>>61092940
g++ -include myheader.h main.cpp
or
g++ -Dfn=int main.cpp
who dumb now?
>>
>>61090988
Visual Studio for learning the language, Qt for using it.
>>
>>61092932
But it breaks oop as a paradigm anon. You can't call a method that doesn't belong to a function. Sure with ufcs you get the syntax but you clearly lose the OOP-ness of it.

It's equivalent to having global mutable state you change in arbitrary function calls in your functional programming paradigm program. It wouldn't be FP anymore.
>>
>>61093014
OOP isn't any good though
>>
>>61092932
>with ufcs this doesn't even matter
What do you mean? You cannot call [1,2,3].map(lambda x: x+1) in Python.
>>
>>61093033
I agree but why pretend you're doing oop when you're not?
>>
>>61092724
Because fucking up memory management is often a more serious and harder to catch bug than unintended mutation, which is easy as hell to pin down by stepping through with a debugger.
>>
>>61093033
>OOP isn't any good though
Why not? Proper OOP can be useful, Python's "OOP" is trash.
>>
>>61093070
>real OOP has never been tried!
>>
>>61093014
>OOP-ness
>P-ness
kek
>>
Guys
What if we made a paradigm where you couldn't mutate state
>>
>>61093078
What do you (((mean)))?
>>
>>61092724
Because some people aren't low level programmers but want the advantages low level programming gets.

But they often destroy the advantages at least partially in their abstractions.
>>
>>61093062
This isn't about manual memory management, but about the syntax and semantics of values and references coinciding.
>>
>>61093073
not him but:
>implying OOP must be bad because the post defending it can be compared to a well known defense of communism
>implying communism is bad
fuck you capitalist pig
>>
>>61093078
You mean a programming paradigm where everything had to compile down to no-op?
Like FP with no IO?
>>
>>61093093
>implying you must be a communist to hate capitalism
>>
>>61093041
that's because [1,2,3] isn't an object so you can't use a method on it. you can use the function version of map on this
>>
>>61093041
python doesn't have it, which is why it sucks
if it had it, it would be fine
>>
>>61093041
map is not an issue
[x + 1 for x in [1,2,3]]
>>
universal function calls are a lie. they don't belong to an object so they're not methods, so why would you pretend to be using a method? just because you like the syntax better? that's such a stupid reason, it's incorrect
>>
>>61093209
Following that logic, the only methods that should be part of your objects should be overridable ones.
After all, non-virtual methods are simply syntax sugar for static/free functions with an explicit self parameter.
>>
regarding post #61093230
1) wrong.
2) don't ever reply to me again.
>>
why have these threads become so fucking terrible lately?
>>
>>61093230
you couldn't be more wrong.

>>61093230
>the only methods that should be part of your objects should be overridable ones.
a method should be part of the procedural interface of the object. this is not the case with universal function calls.
universal function calls is like dot notation but for (abstract) data types.

>>61093230
>After all, non-virtual methods are simply syntax sugar for static/free functions with an explicit self parameter.
Nein! a method has specific semantics for breaking an object encapsulation while accessing that method doesn't. also, a method should be bound to its instance.
>>
>>61093311
because you are not listening to your senpais; learn Racket, read SICP, avoid C.
>>
>>61092724
Pointers I believe should be left for the low level aspect of code to promote and maintain performance. References are there to allow easier memory management when it comes to classes/structs. When dealing with objects, types using "."s is more readable than having a free prose of "->"s and the coder beforehand sets the contact without the compiler whether the data well be mutable or not rather than playing chicken.
>>
I need to convert a List to a Map in Java.

Can anyone help me please???
>>
>>61093795
First step is pooing in the loo
>>
File: list.png (29KB, 533x920px) Image search: [Google]
list.png
29KB, 533x920px
>>61093121
>[1,2,3] isn't an object
It's a list and you can do list operations on it. It is an object, but map is not a method on iterables. Shit design.
>>
>>61093795
Map m = new WhateverYouWantMap(list);
>>
File: github sjw gender politics.png (95KB, 1021x635px) Image search: [Google]
github sjw gender politics.png
95KB, 1021x635px
How does it feel knowing this is the new norm in software development?
>>
>>61093795

the question is too vague. Should the contents of the list be the keys or the values of the map? In either case, what should the corresponding keys/values be?
>>
>>61093167
The issue is that you cannot call "map", "filter", "len" and countless other functions as methods on iterables, like in any proper object oriented language. Python's OO is stupid.
>>
>>61093795
https://stackoverflow.com/questions/4138364/java-how-to-convert-list-to-map/20887747#20887747
>>
>>61093821
>most disagree
>>
>>61093811
>It's a list
it's a list, but it's not a list object
>>61093811
>It is an object
no it's not
>>
>>61093851

> <class 'list'>
>>
>>61093812
didn't work

Cannot resolve constructor 'HashMap(java.util.List)'


What's it mean?? PLEASE i need to do this soon or i might lose my job!
>>
>>61093868
rofl
>>
>>61093868
explain what you want to do nigger
>>
>>61093833
>merged
>>
>>61093868
Ok, I pushed an update, check whether it works now
>>
>>61090330
Yeah that was confusing as hell when I learned Java for the first time in my Comp 2 class in college. The FileReader >> BufferedReader classes are dumb. I don't like Java I/O at all but it's not a hard language honestly. I think it should be taught as the first object-oriented language before C++. It does not make C++ obsolete in any way though.
>>
>>61093851
>it's a list, but it's not a list object
[1,2,3].append(4)

append is a method call on a list object, no?
>>
>>61093890
I already told you I need to convert a List (specifically an arraylist) to a map (specifically a hashmap)

I just keep getting these confusing errors

My boss just told me I need to finish this user story by the end of the day PLEASE help me!!
>>
>>61093936
There are several ways to convert a list to a map, with different results. How am I supposed to know which one you need?
>>
I continue to prototype my top-N recommender system.
After the initial flop of using trust data in order to cluster users, I switched to cosine similarity and get much better results.
Trust is not so trustworthy, as it turns out.
>>
>>61093936
Maybe you should start by checking what a Map is
>>
File: lazarus.png (90KB, 450x300px) Image search: [Google]
lazarus.png
90KB, 450x300px
is it worth to learn free-pascal with lazarus?
>>
>>61090598

what exacly are you doing?
>>
>>61093924
You should look into the java.nio package. Makes it a little more comfortable to work with files and paths etc. (Java 8 required).
>>
>>61093936
You'll have to tell your boss it's impossible, no one has ever done it before
>>
>>61093936
Is it a list of tuples/pairs or what? Does the structure in your list even work for a map?
>>
>>61093988
>>61093956
>>61093949
alright i figured it out thanks a lot assholes

next time i'm going to reddit

here's what i did in case anyone else is struggling with this problem

public Map convertToMap(List list) {
Map<Integer, Object> map = new HashMap();

for (int i = 0; i < list.size(); i++) {
map.put(i, list.get(i));
}

return map;
}
>>
Done with release 1.0 of Pascal compiler. I think I'll do something else for the next week.
https://gitlab.com/abonnet/pasclang/tree/1.0
>>
>>61094038
This is really quality shitposting
>>
>>61094038
Glad to help
>>
>>61093795
I have no idea what you need but here's a thing.
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public final class ListToMap {
private ListToMap() {}
public static <T> Map<T, T> convert(List<T> list) {
Map<T, T> retval = new HashMap<T, T>();
T prev = null;
for (T t: list) {
if (!retval.containsKey(t)) {
retval.put(prev, t);
t = prev;
}
}
retval.put(prev, null);
return retval;
}
}

To use, for example if your list was a list of String:
Map<String, String> asMap = ListToMap.<String>convert(myList);

The resulting map will store the first element of the list under null, null under the last element of the list, and any in-between element of the list under its predecessor. So you can iterate over the map by starting at null and repeatedly using get until you're at null again. Each list element will appear only once when traversing the map in this way, no matter how many times it appeared in the list.
>>
>>61094038
Actually, you got it wrong, it should be like this
public Map convertToMap(List list) {
Map<Object, Integer> map = new HashMap();

for (int i = 0; i < list.size(); i++) {
map.put(list.get(i), i);
}

return map;
}
>>
>>61094038

lol moron, lrn2generics
>>
>think of a problem that should be hard to express in Haskell, or at least be extremely slow because of Haskell's lack of for loops
>about to shitpost in /dpt/ about it
>suddenly elegant solution comes to mind
fuck this language I cant shitpost about it
>>
>>61094127
Post example pls
>>
>>61094099
so it's a linked list inside of a map?
>>
>>61090159
moar
>>
>>61094145
Yes.
>>
>>61094131
Write a program that, for each integer ranging from 1 to 100, prints the word "Fizz" if it is divisible by 31st, "Buzz" if it is divisible by 5 and prints the number otherwise.
>>
>>61094104
That's a lot less useful. Especially because if a list entry appears at multiple indices, this will always only list it as being at the last one it was at.
>>
>>61094131
>iterate through a list of ints and add each element's index to itself ([1,1,1,1,1,1] -> [1,2,3,4,5,6]), or more generally write a version of map that also operates on the index of the element (mapIndex :: ((a, Int) -> b) -> [a] ->[b]
>transform a list by pairing up adjacent elements ([1,2,3,4,5,6] -> [(1,2), (3,4), (5,6)]
>>
How do I check if a polygon is behind or before a plane? I know how to check if a point is before or after a plane, that's easy. So do I just check all the vertices of the polygon?
>>
>>61094239
Use the normals
>>
>>61094099
>my roommate walked in on me once kneeling over the toilet and attempting to induce vomiting
>"what the hell are you doing"
>"trying to write java code"
>>
>>61094252
How do you mean?
>>
>>61094213
zip [0..] then map
>>
>>61094279
correct
>>
>>61094265
With normals you can check which side it is or if it intersects. Look into separation of convexes
>>
>>61094239
If you can assume no intersection you just need to check one point (any point) of the polygon.
If you accept intersection I suggest you check the bounding volume first and then sadly you're stuck with o(n) for the fine grain test. There's some complicated stuff you can do where you segment parts of the polygon into a hierarchy that lets you skip a lot of tests. Basically you bounding volume parts of the polygon and test against those before you test against the corresponding vertices of the passing bounding volume tests.
>>
>>61094316
flip (flip (map . uncurry) . zip [0..])


(Enum i, Num i) => (i -> a -> b) -> [a] -> [b]
>>
>>61094373
>uncurry
>>
>>61094409
surely uncurry is the opposite of pajeet
>>
File: frog.png (240KB, 483x564px) Image search: [Google]
frog.png
240KB, 483x564px
>>61094373
>flip
>flip
>zzzzip
>enum
>num
>enumnumnum
what the fuck
>>
>>61094427
this is why it must be curried
>>
Are defalut special member functions sufficient when managing smart pointers?
Specifically std::shared_ptrs?
>>
>>61094453
imap f xs = map (uncurry f) (zip [0..] xs)


is this more to your liking?
>>
>>61094493
what do you mean?
>>
>>61094493
>Are defalut special member functions sufficient when managing smart pointers?
yes, that's the point of smart pointers
>Specifically std::shared_ptrs?
the only thing to look out for here is you need to make sure your shared_ptrs don't form any kind of cycle because then they'll leak
>>
>>61094500
i didn't not like it to begin with, i just thought it was funny
it shows your shit is a toy language
nothing wrong with that, people of all ages need and deserve toys, you can't just live seriously 24/7
>>
>>61094630
Indexed map is quite a useful function
>>
File: 149781579407.jpg (201KB, 1920x1080px) Image search: [Google]
149781579407.jpg
201KB, 1920x1080px
just figuring out parsing using boost::spirit
>>
New thread:
>>61094702
>>61094702
>>61094702
>>
Making programming great again.
(use '[clojure.string :only (split)])

(defn idx-query [answer n x]
(mod (bit-xor x answer) n))

(defn first-query [seqs answer n x y]
(let [i (idx-query answer n x)
s (nth seqs i)]
(assoc-in seqs [i (count s)] y)))

(defn second-query [seqs answer n x y]
(let [i (idx-query answer n x)
s (nth seqs i)
a (nth s (mod y (count s)))]
(println a)
a))

(defn read-ints[]
(let [line (read-line)]
(if (empty? line) []
(map #(Integer/parseInt %) (split line #" ")))))

(let [nq (read-ints) n (first nq) q (second nq)]
(loop [seqs (vec (take n (repeat []))) answer 0]
(let [query (read-ints)]
(when (not-empty query)
(let [t (first query) x (second query) y (nth query 2)]
(cond
(= t 1) (recur (first-query seqs answer n x y) answer)
(= t 2) (recur seqs (second-query seqs answer n x y))))))))
>>
>>61094608
I knew this already but I wanted to ask for clarification. Thanks
>>
File: IMG_5509.jpg (364KB, 3000x2000px) Image search: [Google]
IMG_5509.jpg
364KB, 3000x2000px
HELLU
Is there a way to do game of life without a buffer of every pixel?
Was actually convinced I could manage to do it with an attiny13a on a ssd1309 oled with 128x64 pixels.
But 128*64/8 = 1024.
Thats exactly the flash memory of an attiny13a
>>
C++ debuggers for linux?

I use Atom as an editor. Ease of use is a top priority
>>
>>61094822
You can compress it.
>>61094827
Go go the next thread.
>>
>Thats exactly the flash memory of an attiny13a
in terms of bytes? Surely you can use bitfields instead of byte-sized bools
>>
>>61090473
I made a custom web client for the specific websites I like and it's better and more secure than any browser out there.

The major downside is I have to implement code for every single website and if they change the code breaks.
>>
>>61094827
c++ is windows and apple only
>>
>>61094939
>c++ is windows and apple only
y u misinformation tho
>>61094827
>C++ debuggers for linux?
gdb for general info on errors
valgrind for more specific info but only on memory errors
>>
>>61092514
Sure it does!

http://wiki.osdev.org/System_V_ABI

Any ABI that isn't the one above is quite simply pants-on-head retarded. It literally is that simple
>>
>>61093977
I played around with it. Really, I just don't know.
It's really nice in some ways -- it's like Visual Studio except works on all OSs. FreePascal is also really refreshing in its simplicity, yet has all the expressive power I deem essential in a language.
I think it'll be a language I revisit for personal desktop projects.
>>
>>61092907
>thinking the number of trues and falses will cancel each other out in finite time
>thinking the chance of a false is proportional to the size of the previous sequence of trues
>thinking fallaciously
>being innumerate
>2017

become educated fool
>>
>>61095067
>It literally is that simple
No, it's not, because that's not what standard means
>>
>>61095067
Wouldn't that just be a vendor API, not a standard API?

Ubiquitous, sure, but not standard....
>>
>>61095144
de facto standard
>>
>>61093325
Most Schemes are implemented in C or compile to C.
>>
>>61093821
Which project is this?
Need to add to my github shitstorm collection
>>
>>61094038
dude why do you even ask on 4chan when you know they're most likely gonna shitpost
Thread posts: 330
Thread images: 25


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