[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: 324
Thread images: 59

File: 1479251666868.jpg (103KB, 908x1280px) Image search: [Google]
1479251666868.jpg
103KB, 908x1280px
the elusive programmer (male) edition!
old thread: >>60641703

What are you working on, /g/?
>>
>>60651640
>Shitposting in the OP
>Pushing your literal fag agenda
Delete this shit.
>>
First for C
>>
>>60651640
I wanna fug her
>>
File: 1492957175322.jpg (44KB, 314x336px) Image search: [Google]
1492957175322.jpg
44KB, 314x336px
>>
>>60651649
Go make your own thread if you don't like this one.
>>
>>60651640
cute girl ()
>>
>>60651675
I can see some progress anon.
>>
File: 1496106608252.jpg (105KB, 908x1280px) Image search: [Google]
1496106608252.jpg
105KB, 908x1280px
>>60651640
c̝̘̞̹̳̬̥̐̄ͭ̇͂͞u̘̻̱̳̰̇͛͑ͬ̏t̃̆̐͝ḙ̪̯̜̼͂͛ͮ̄͂ ̡̹̜̮͇̖̉̐͒̊̂͗͂g̯͈̮̦͒ͫͦ̏̏i̪̖̣̱͎ŗ̥̗̳̙̜͕͂̒̓͂l̂̓̇̏͊̓ͬ
>>
>>60651691
Creating duplicate threads almost never helps. I'm just calling out OP, and hope the janitor gets off his ass and cleans this shit up.
As you can see, because of this garbage, literally 100% of this thread is shitposting, including this post.
>>
>>60651706
The only shitposting here is you.
>>
Trying to design a system an Action Repository
>>
>>60651649
He's literally a programmer
>>
File: 1462064552392.gif (478KB, 400x400px) Image search: [Google]
1462064552392.gif
478KB, 400x400px
>>60651704
>>
Which do you suppose is faster? ("seen" is initial array structure before it becomes populated):
seen = [""]
j = "".join(sorted(seen[index] + COINS[k]))

seen = [("",)*8]
j = seen[index][:k] + (seen[index][k] + COINS[k],) + seen[index][k+1:]

seen = [()]
j = tuple(sorted(seen[index] + (COINS[k],)))
>>
>>60651640
Are artificial neural networks programmed with software programming or is it more of a hardware aspect like actual neural networks in the brain?
>>
>>60651755
the one written in C
>>
>>60651640
Lisp is the most powerful programming language.
>>
>>60651791
Doesn't look exactly like C syntax, unless C has oprrator overloading because it looks like he's trying to concatenate strings or arrays with the addition operator.
>>
>>60651834
you should really read things twice before posting a reply
>>
>>60651755
Why don't you just benchmark them?
>>
File: 1494893713714.png (129KB, 314x278px) Image search: [Google]
1494893713714.png
129KB, 314x278px
>>60651704
>fuck up file transfer
>make legitimately good phone lock screen
>>
>>60651791
It still applies to C. View it as pseudocode.
>>60651878
I already have. I'm asking what the naive assumption would be.
>>
>>60651876
Why, he's concatenating a 2 dimensional array with another two dimensional array with a one dimensional array. But it doesn't look like C.
>>
File: >her.png (273KB, 294x442px) Image search: [Google]
>her.png
273KB, 294x442px
>>60651670
>her
>>
Compiler for Pseudo Pascal targetting LLVM. I'm pretty much done with front-end stuff, I had the type checker done and then realized the syntax was fucked. The language itself looks like that:
program
var x : integer;
function times (p,q : integer) : integer;
begin
times := p * q
end;

function fact (n : integer) : integer;
var r : integer ;
begin
r := 1 ;
while n > 0 do
begin
r := times(r,n);
n := n-1
end ;
fact := r
end;

begin
x := readln ();
writeln (fact (x))
end.
>>
File: gold star.png (14KB, 621x621px) Image search: [Google]
gold star.png
14KB, 621x621px
>>60651965
> :=
>>
>>60651979
That IS the Pascal assignment operator though. It's also used in computer algebra software.
>>
>>60652052
no really
>>
>>60651965
So what does LLVM do that everyone and their mom can now build a fucking language?
>>
File: mokou.png (146KB, 460x360px) Image search: [Google]
mokou.png
146KB, 460x360px
>>60651640
Nth for Fortran.
>>
>>60652079
more like NP for Fortran
>>
>>60652071
The C++ interface allows you to build IR from your source, you can see the builder here http://llvm.org/docs/doxygen/html/classllvm_1_1IRBuilder.html. It's still some work (especially on the semantic side) but the real strength comes from the fact it has the architectural optimizations (usual middle end stuff) done for you.
>>
File: clearly 2.png (110KB, 1287x729px) Image search: [Google]
clearly 2.png
110KB, 1287x729px
>>60651941
>>60651912
>>60651834
>>60651876
>>60651791
this is clearly python

>>60651755
two appears to be the most efficient method, at least on COINS arrays that hold a single item and k/index values of 0
>>
>>60652109
Also I plan to try to use raw LLD to link executables but this might be borderline insanity. There's always the back-up plan of using a host C compiler to link .o files anyways.
>>
In C/C++, how would one go about parsing a text file to get settings for a game?

Here is an example, (parts of) the settings file from Duke Nukem 3D

[Setup]
;Setup File for Duke Nukem 3D
SetupVersion = "1.4"
;
;
[Screen Setup]
;
;
ScreenMode = 1
ScreenWidth = 640
ScreenHeight = 480
;
;
Shadows = 1
Password = ""
Detail = 1
Tilt = 1
Messages = 1
Out = 0
ScreenSize = 8
ScreenGamma = 24
;
;
[KeyDefinitions]
;
;
Move_Forward = "W" "Kpad8"
Move_Backward = "S" "Kpad2"
>>
>>60652204
That's basically implementing a finite automaton for a simple regular language.
>>
Is there a standard state machine markdown language? Or will I have to design one?
>>
got a java exam coming up
i'm pretty decent at coding but my crux is terminology
what's the best way to brush up on everything?
>>
>>60651825
What is a ``Powerful" programming language?
>>
>>60652204
If your asking out of curiousity. well it's pretty involved in C, less so in C++.

If you're asking because you wanna parse config files - shit nigga just use Lua (assuming you'll be using it for more than just config files.
>>
>>60652204
this:
>>60652235

anyways, read file line by line and store the lines that dont begin with ';'

store each value found after a '=' symbol somewhere in memory and your done
>>
>>60651941
anon is saying that if it was written in C instead of the language other anon was using it'd be faster
>>
>>60652248
it has electrolytes. its what logic circuits crave.
>>
>>60652248
lisp is turing complete i garuantee
>>
>>60652204
fstream has a byte viewing mode.
>>
I've been getting interested in "coding challenges" lately. I feel like they can be a fun way to practice some more advanced stuff and functional programming. How does one into them?
>>
>>60652235
I did not understand any of that. What I am asking, is how can I read a .txt file in C, but have the program know to skip semicolons, know what section it is in based on the [] it just passed, and then set whatever is on the left of the = to whatever is on the right of the =.

>>60652289
I use lua but I didn't really want to use it for config as well

>>60652311
i'll look into that
>>
>>60652315
just do it™
>>
>>60652309
>lisp is turing complete i garuantee
so is basically anything thats not html, json, sql, xml, css, etc
>>
>>60652071
Basically compiler writers only have to make the compiler output LLVM IR which can then be compiled to machine code on any LLVM supporting system. Thus people don't have to rely on JVM to create relatively cross-platform languages, they can instead create cross-platform languages which compile to native code.
>>
>>60652315
if you have a decent search term history with google with alot of java and python related queries, then google "python pass by reference" and you will get an invitation to google foobar
>>
>>60652204
You search for tokens before the "=" in the string which will pertain to some variable in your program, and you assign the value to the right of the "=" to the variable. You can roll your own string tokenisation function which lets you split a string based on a character and use the "=" as the character to split on, thus giving you both sides. Everything else is ignored.
>>
>>60652114
>two appears to be the most efficient method
Those timings don't do it justice, as the elements don't grow. It completely eliminates the overhead of sorting. But of course the naive thing to do is rely on builtin sorting methods where sorting is applicable - I see this time and time again in algorithms.
>>
>>60652316
>I use lua but I didn't really want to use it for config as well

Why not, i mean it's far easier than reinventing the wheel. It's already loaded, it's already part of your code. and it's stupid easy to use for config files - so why not?
>>
File: 1490336659494.png (537KB, 732x743px) Image search: [Google]
1490336659494.png
537KB, 732x743px
>>60652353
>using google search
>allow tracking cookies, scripts, and domains
>>
>>60652437
tracking cookies dont matter. They track by IP. my browser clears everything every time it closes and I dont use an account with google. After enough java and python queries they begin offering it to anyone at the IP address.
>>
>>60652424
who cares?

anon posted 3 sets of 2 lines of code and asked which set of 2 was quickest and theres the answer, set 2.
>>
>>60652448
I have a dynamic IP, all people do on my ISP. That would mean random people get "offered" whatever this crap is. It would also mean random devices on the LAN would be given this "offer" depending when google deems a search relevant. So you're either bullshitting, or you're browsing habits are not as anonymous as you think. I'm guessing it's the latter, given that you willingly use google, and probably are signed into their various services, which keep track of browsing habits on their side even if you clear your browser.
>>
>>60652309
"T*ring complete" doesn't mean "powerful".
>>
File: shinobu.png (313KB, 2276x1280px) Image search: [Google]
shinobu.png
313KB, 2276x1280px
Ayo /g/uys, I wrote an image scraper for 4chan in C, feel free to look over my code. I'm just a week or two into learning C. so critiwues are welcomed, and if anyone is interested in using it I'd be pleased!
>>
>>60652544
fuck I'm retarded here

https://github.com/Ethan-ks/fsic
>>
File: 1486367945055.jpg (102KB, 640x640px) Image search: [Google]
1486367945055.jpg
102KB, 640x640px
>>60652544
What a cute software
>>
>>60652559
>Having "4chan" anywhere on your github
>>
how do I make my own programming language
>>
>>60652633
parsers my man
>>
File: 1431432030106.jpg (13KB, 228x238px) Image search: [Google]
1431432030106.jpg
13KB, 228x238px
>>60652559
>>60652544
>Functions inside header files
>>
>>60652633
Start by defining how it will be anime-like.
>>
>>60652559
>>60652544
do you not know what the purpose of header files are
>>
>>60652647
>>60652697
w w-what
>>
Been reading the Rust book, it seems like a decent language so far
>>
Has anyone ever stopped to realize how stupid it is that people are forced to forward declare all extern functions twice?
>>
>>60652647
Like I said, I'm only two weeks into C, please educate me! What should header files be used for? And should every single function I used be defined in the main .c file?
>>
>>60652539

No, but it is a minimum requirement.
>>
>>60652633
First decide what major features you want from it and which paradigm(s) it will allow you to program in. Then think about the core semantic actions, define a grammar that allows you to perform these actions the most concisely/clearly possible, implement the front-end (parser, type checker, error handler). You can then decide whether you want it to be interpreted and use a host language to execute your syntax tree (in which case your implementation is an interpreter) or rewrite it in a lower/different language (then it's a compiler). Popular languages to compiler to are assembly, C or LLVM IR. Finally, write useful software/ecosystem for your language and shill it on 4chan.
>>
>>60652733
For each "module" (set of functions, structures, etc) define a .h and a .c file with the same basename. Provide function prototypes in the .h file, and function definitions in the .c file. Include the .h file in both the corresponding .c file and in main.c.
>>
>>60652733
Header files are usually just used to share function declarations between files. Actual implementations of functions go in .c files.
Usually it's done like
// file1.h
int myfn(int arg);

// file1.c
int myfn(int arg)
{
return arg + 1;
}

// file2.c
#include "file1.h"
int main()
{
int a = myfn(1);
}
>>
>>60652733

Header files (.h): typedefs, macros, and function signatures.
Source files (.c): actual function definitions.
>>
I am trying to model the following:

Create a static int method for partialsubsequences that are positive and take an int array.
Have three variables.
count =0;
first =0;
second =0;

While the array hasn't reached the end of index, do the following:
1.while [count] array is>0:
first++;
In.readnext Index();
2.while [count] array is <=0:
In.readnext Index();
3.while [count] array is >0:
second++;
In.readNext Index();


if first >second:
second=0;
do 3rd step;
else:
first = second;
do 3rd step


how do I do this,make more methods?
>>
>>60652753
>core semantic actions

what is this
>>
>>60652559
>Misusing header files
>cmake over regular make or gprbuild
>moderately decent error handling
5/10
>>
>>60652733
C (and many other language) compiles each source file into an object file before linking it as an executable. In these object files go the actual data that come from your source file such as instructions, global variables, read only data etc. Anything that will directly be in that object file should be in source files. Anything that is required by the developer/compiler/contributor should go in the header instead. This goes for function declarations (and not definitions!) since the compiler needs to know how to call functions from other translation units (the translation unit is the C abstraction of the object file).
>>
>>60652786
You're too stupid to make a programming language, much less interpret it in software.
>>
>>60652733
>>60652708
you declare functions in the header, that is you only put the prototype

// foo.h
int bar(int x);


in the .c file you put the definition (some people call it the implementation)

// foo.c
int bar(int x){
/* do shit */
}


generally in the header you want to only provide function definitions, structs, and macros that clients of the header (other parts of the code) will use.

Read up on how to compile multiple .c files and link them, though using cmake it does that stuff for you. But you should learn how to do it without cmake as well or you'll be clueless as to how compilation works.
>>
>>60652788
>>moderately decent error handling

define good error handling
>>
>>60652765
How does file2.c know what the function in file1.h actually does without either including file1.c
>>
>>60652786
The idea behind your abstract syntax.
What action is each node supposed to correspond to.
>>
>>60652802
can you explain what a "semantic action" even is
>>
>>60652815
can you give a practical concrete example
>>
>>60652813
It doesn't NEED to know what the function does. It just needs to know how to interface with it.
>>
>>60652823
>>60652815
Your program can be seen as a tree, what is each node supposed to do?
>>
>>60652813
it doesn't need to know that. they are compiled seperately then the linker will make the function call "link" to the object code from the other file.
>>
Are there any software engineer positions that don't use Java?
And how much Java should someone know before applying? I don't know what an employer would expect me to be able to do as an entry level/junior position.
I'm graduating as a computer engineer but there are a lot less jobs so I'm just trying to get prepared in case.
>>
>>60652809
>print_usage (...);
>exit (1);
Don't do this, as an example
>>
>>60652958
That guy wasn't me, but do you mean I should just be more specific or am I specifically doing something frowned upon? Thank you and every other helpful person in this thread btw
>>
>>60652983
I mean print_usage terminates your program, and you can see why this is a problem since you forgot and call exit again on line 58.
>>
>>60651640
why the FUCK won't this compile?
#include <stdio.h>

int main(void)
{
int user_input;
printf("Ayy nigga, enter a number:");
scanf("%i",&user_input);
printf("%i is the ascii code for %c"user_input,user_input);
return 0;
}
>>
>>60653163
you forgot a comma
>>
>>60653163
>"%i is the ascii code for %c"user_input,user_input
"%i is the ascii code for %c" , user_input,user_input
>>
>>60653163
>printf("%i is the ascii code for %c"user_input,user_input);
That literally took me a second
>>
>>60653194
>>60653181
topkek i don't know how i missed that ty f@ms
>>
why is while ([count] a >0) illegal?
>>
>>60653214
Yeah, and it only took you three seconds when you lost your virginity to that ladyboy from Thailand. Whats your point?
>>
>>60653237
Hey I am not the retard that didn't spot the comma
>>
>>60653217
1. read error message
2. google error message
3. fix it

go forth pajeet, into the wild
>>
>>60653251
>>60653249
sir why are you treating me this way i am did the needful.
>>
>>60653235
I'm pretty sure that the bracketed expression must be AFTER the array base.
>>
>>60653397
My friend. Thank you very much.
You just helped me on a simple problem I have overseen since three hours in the middle of the night.
Thank you.
>>
File: dlang_chan.jpg (139KB, 470x545px) Image search: [Google]
dlang_chan.jpg
139KB, 470x545px
Threadly reminder that dlang-chan is not dead; she's going to have her GC tumor removed (eventually); she's super duper cute; and she's a blast to write in! Say something nice about her, /dpt/!

>Features
https://dlang.org/comparison.html
>Standard library
https://dlang.org/phobos/index.html
>GC
https://dlang.org/spec/garbage.html
https://dlang.org/blog/2017/03/20/dont-fear-the-reaper/
https://dlang.org/blog/2017/04/28/automem-hands-free-raii-for-d/
>Books
https://wiki.dlang.org/Books

>>60651640
It's so fucking slow on holidays. Just goes to show you how many normalfags there are.
>>
>>60653637
Kill yourself, you fucking necrophilia spammer.
>>
File: 1491077085233.png (162KB, 600x480px) Image search: [Google]
1491077085233.png
162KB, 600x480px
>>60653690
How can it be necrophilia if she's not dead~?
>>
>>60653709
I have no reason to believe that D is not dead.
>>
>his shitty pajeetlang can't even into classes
(define (reassoc key value tuples)
(cons (list key value)
(filter (lambda (tuple) (not (eq? (car tuple) key)))
tuples)))

(define (in-range? value range)
(and (>= value (car range))
(or (not (cdr range)) (<= value (cdr range)))))

(define (in-arity? value func)
(in-range? value (procedure-arity func)))

(define (do-as-object object fields methods name . args)
(let*
((called-arity (1+ (length args)))
(field-tuple (assoc name fields))
(field
(if field-tuple (cadr field-tuple)
#f))
(method-tuple (assoc name methods))
(method
(if method-tuple (cadr method-tuple)
#f)))
(cond
((and method
(in-arity? called-arity method))
(apply method (cons object args)))
((and field-tuple (= called-arity 1)) field)
((= called-arity 2)
(make-object
(reassoc name (car args) fields)
methods))
(#t #f))))

(define (make-object fields methods)
(letrec
((self
(lambda (name . args)
(apply do-as-object
(append (list self fields methods name) args)))))
self))

(define (make-class . methods)
(lambda init-args
(apply (make-object (list) methods)
(cons (quote init) init-args))))

(define (oop-example)
(display "Should output 12 and then 13")
(newline)
(let*
((counter-class
(make-class
(list (quote init)
(lambda (self start)
(self (quote value) start)))
(list (quote increment)
(lambda (self)
(self (quote value)
(1+ (self (quote value))))))
(list (quote get)
(lambda (self)
(self (quote value))))))
(counter (counter-class 12)))
(display (counter (quote get)))
(newline)
(set! counter (counter (quote increment)))
(display (counter (quote get)))
(newline)))
>>
>>60653791
Welp that post came out wrong~
I meant to stop being willfully ignorant and living on memes
>>
>>60653767
Welcome back Poojeet
Your POO-in-loo ideals are still unwelcome here but that being said I see you've vastly improved your Scheme-fu
Keep trying sempai~ At this rate you're sure to make something of value one day!
>>
>>60653801
D has long since passed its opportunity to be popular. It's dead on its feet at this point.
The garbage collector doomed it to fail, and even though you delirious fucks keep going on about how it will removed soon™, it's already been fucking 15 years.
>>
File: 1494081413904.jpg (2MB, 1920x3272px) Image search: [Google]
1494081413904.jpg
2MB, 1920x3272px
>>60652544
>>60652559
Okay I made some changes, would one of you kind folks mind telling me what I have surely done horribly wrong? By the way regarding the compilation thing, I only added Cmake stuff to make it easier for others to install, I mostly use straight gcc as I'd rather understand how it works.
>>
>>60653637
>>60653842
Both of you faggots please explain to me how the fuck you expect a language that supports dynamic allocation to work at all without a garbage collector
>inb4 managing it manually
*VOMITS FUCKING PROFUSELY*
>>
>>60653850
I'm not even going to read that, you made it 5x more complex since the last time I opened it.
>>
>>60651640
I can't find the motivation to write a program.
What should I do to stay productive? Any ideas to write a program?
Or should I try and get creative / write my own ideas.
>>
>>60653791
>>60653801
>memes
>>>/v/

>>60653836
>sempai
>m
>>>/b/
>>
static int longestPositiveSubsequence(int[] a){
int first =0;
int second =0;
int count=0;
while (In.available()==1){
if(first<second){
continue; //should skip this whole body of this if
while(a[count] >0){
first++;
In.readInt();
count++;
}
while(a[count] <=0){
In.readInt();
}
while(a[count] >0){
second++;
In.readInt();
count++;
}
}
if(first>second){
second = 0;
while(a[count] >0 && (first >second)){
second++;
In.readInt();
count++;
}
}else{
first = second;
}
}return first;
}



does this make sense to you?
I have a lingering problem with the continue and where to place it, but the gist is, if the "first" is bigger than the "second", skip the 1st if body and check the other one until the "second" has become bigger than than the "first" and replaces it.
repeat it until I have the longest indices of consecutive positive numbers in an array.
>>
File: eggy.jpg (59KB, 500x526px) Image search: [Google]
eggy.jpg
59KB, 500x526px
>>60653882
> >>>/
>>>/trash/
>>
>>60653842
not popular != dead
Please stop deploying poor logic in /dpt/. Thank you~!

>>60653867
RAII, faggot
And a GC isn't inherently bad. dlang-chan, as she stands now, handles everything pretty well. For code segments that need efficient, you can disable the GC for them. You'll lose some language features however. But that's what dlang-chan's parents are trying to fix: making the GC completely optional in the standard library, Phobos.
>>
File: a90.png (24KB, 200x200px) Image search: [Google]
a90.png
24KB, 200x200px
>>60653887
>longestPositiveSubsequence
Why are you reading input in this function?
>>
>>60653872
I literally just moved all the .h files to .c files and created a header with some declerations, I made no actual changes
>>
>>60653919
It should read the next index of the array that has been created after I opened a textfile with various numbers with different digits and negative and positive numbers.
>>
>>60653908
>RAII, faggot
yo okay YO but what if

what if in acquired resources you stored information on how they were acquired

and then you had the GC automatically do whatever the opposite of that is when it gets to them

Hmm, but sometimes "the opposite" might not be a process that can be generated automatically, depending on what you're trying to do...

Golly gosh, if only there were a way to configure the GC so it takes care of non-memory resources automatically, but using a process you supply manually!

OH WAIT
>Finalizers, faggot.
>>
>>60653977
Your grammar is fucking terrible; so is your post formatting. Also I hope you do realize that I'm not against GCs, and that you would use RAII in the absence of one.
>>
File: 1390766376449.jpg (15KB, 480x360px) Image search: [Google]
1390766376449.jpg
15KB, 480x360px
I just finished a pull request for a moderately popular (~900 stars) repository. This is an actual code change, not just a documentation change.

I hope it gets accepted.
>>
>>60653889
>>60653919
>ribbit.jpg
>rabbit.png
>>>/v/
>>
>>60654015
I regularly reject pull requests and copy their code into my next commit and they can't do shit.
>>
>>60654008
>Your grammar is fucking terrible;
It isn't, actually.

>so is your post formatting
That's on purpose. :^)

>Also I hope you do realize that I'm not against GCs,
Oh okay

>and that you would use RAII in the absence of one.
Yeah, but still:
*VOMITS FUCKING PROFUSELY*
nothing personnel kid
>>
File: 1439774389679.jpg (33KB, 502x476px) Image search: [Google]
1439774389679.jpg
33KB, 502x476px
>>60654015
I hope it does too, anon! Good luck!
>>
File: ygge.jpg (60KB, 500x526px) Image search: [Google]
ygge.jpg
60KB, 500x526px
>>60654019
> >>>/
>>>/trash/
>>
>>60653850
is it better to have a 500 line main with everything in it or 5 seperate 50-100 line files with functions split up like I have them?
>>
>>60654057
dumb frogposter
>>
>>60654052
How to go about splitting off things into functions is very subjective and takes a lot of experience/taste to do well.
Having enormous functions which do a million things can be very hard to read and reason about, but splitting everything into tiny functions does basically the same thing.
Just try do what you think is appropriate.
>>
/---\ 60654041
>>>/b/

>>60654057
>ribbit the reddit frog
>>>/r/abbit/
>>
>>60654057
Kill yourself you stupid frogposter, avatarfagging is against the rules.
>>
>>60654077
more specifically, I don't mean how to split functions up, but whether or not to put functions, which would be split up anyway, into their own .c files, or put them all together in the main.c
>>
>>60653977

>what if in acquired resources you stored information on how they were acquired
>and then you had the GC automatically do whatever the opposite of that is when it gets to them
>Hmm, but sometimes "the opposite" might not be a process that can be generated automatically, depending on what you're trying to do...
Gonna need to go into some specifics there.

>Golly gosh, if only there were a way to configure the GC so it takes care of non-memory resources automatically, but using a process you supply manually!
Yes, but can it be done deterministically? The benefit to RAII is that this happens not only automatically, but immediately upon the resource in question going out of scope.
>>
File: 1485473684854.png (408KB, 824x792px) Image search: [Google]
1485473684854.png
408KB, 824x792px
>>60654015
It feels awesome when you get your shit accepted into someone else's repository.
After you do it several times, the feeling wears off, and you have to start doing more potent shit (larger/more complex PRs).
>>
File: mlady.png (207KB, 474x432px) Image search: [Google]
mlady.png
207KB, 474x432px
>>60654093
>/---\ 60654041
> >>>/
>>>/trash/
threadly reminder that this man didn't deserve to be born and his mother never loved him
>>
>RAII can be done """"deterministically""""
That would involve an algorithm which solves the halting problem for Turing machines.
>>
>>60654137
(i meant the guy i was quoting not the guy in the picture)
>>
>>60654110
>fr*gposting is """""""""""""""""""""""""""""""""""""""""""""""""""avatarfagging"""""""""""""""""""""""""""""""""""""""""""""""""""
Are you genuinely fucking brain dead?
>>
>>60654165
You mustn't have been here yesterday.
>>
>>60654173
Prove that your previous post isn't absolutely retarded without using cryptic messages. I'll take my words back if you can do that.
>>
<><><><> 60654184
I don't want reddit stink nearby. Fuck off.
>>>/v/
>>
>>60654191
No one gives a shit what you want, you failed abortion.
>>
I'm doing some research on raymarching and demoscenes but it's hard to find tutorials and such.

My main language is C, what should I know to make something? Also, are there any resources that you guys know? I have found so far:
http://www.rgba.org/
https://www.pouet.net/
http://iquilezles.org/

Anything else I should know? I mean, I think I have to learn OpenGL or something to get stuff done, but I'm not sure if I can do similar stuff with ncurses?
>>
>>60654184
And there you are avatarfagging again.
Fucking kill yourself, you cancerous fuck.
>>
>>60654184
A single frogpost is as cancerous as a nuclear explosion
>>
>>60654292
>reaction images are avatarfagging
>being this retarded
You probably use FP langs too you autistic chodemonkey
>>
@6-6---06
He is right this time. Your fr*gposting kind can fuck off to some other website.
>>
File: hjmgtfrd.jpg (89KB, 1280x720px) Image search: [Google]
hjmgtfrd.jpg
89KB, 1280x720px
>>60654315
FUCKING DIE FROG NIGGER
>>
>>60654317
No, fuck you.
>>
>ITT: people triggered by a picture
lmao
>>
>>60654345
this
>posts facebook meme
>>
>>60654366
>meme
>>>/v/
>>
File: file.png (90KB, 890x938px) Image search: [Google]
file.png
90KB, 890x938px
I got all of the text currently on 4chan now I'm going to make tripcodes with the individual words.
>>
Have you ever used proof by induction outside of school?
>>
>>60654375
>ITP: people triggered by a word
lmao
>>
>>60654387
Yes.
>>
>>60654345
It's righteous anger, frogposters don't belong here
>>
>>60654412
Are you 12?
>>
File: m.jpg (606KB, 1395x858px) Image search: [Google]
m.jpg
606KB, 1395x858px
>>60654417
Leave, frogposter. You're the one who's 12, because you post frogs.
>>
>>60654409
For what?
>>
File: 1493563363403.gif (3MB, 740x416px) Image search: [Google]
1493563363403.gif
3MB, 740x416px
>>60654417
>Posts le funnay reddit/facebook maymays
>Tries to call someone else 12
>>
>>60654429
I never posted frogs. You're posting sirno

Also, you type like a 12 year old.
>>
File: macfags btfo.png (557KB, 800x1026px) Image search: [Google]
macfags btfo.png
557KB, 800x1026px
>>60654441
Get banned frogposter
Pic related: you are not a very good programmer because you use windows
(I know this about you because you post frogs -- do not act so surprised!)
>>
>>60654436
For proofs about any inductive data structure. If you can't handle at least induction on natural numbers you honestly don't deserve to be posting here.
>>
>>60654461
Niga lmao, I specifically said I never posted any pepes. You're just mad about some old image macro some other faggot posted and are getting out of hand.

Please contain your sperg. I just wanted to get answers from my question. Not autism. Grow up. People post whatever they want.
>>
File: 1493404720443.jpg (89KB, 885x903px) Image search: [Google]
1493404720443.jpg
89KB, 885x903px
>>60654461
>Pic related
All of those are trash though, so that's a statement with no weight to it.
>>
>>60654468
Kek. I knew I was going to be attacked for asking that. I'm legitimately curious if people use it when writing software.
>>
File: baby-on-computer.jpg (78KB, 960x640px) Image search: [Google]
baby-on-computer.jpg
78KB, 960x640px
>>60653767
Will this work with Java?
>>
File: U ARNT ANIME.png (2MB, 1395x1713px) Image search: [Google]
U ARNT ANIME.png
2MB, 1395x1713px
>>60654480
Leave, frogposter
>>60654481
Leave, frogposter

(pic related)
>>
>>60654487
I do, I'm sure other people do too.
You don't have to, but if you can't handle it, then that's just a sign of something being deeply wrong with you (assuming you're over 18).
>>
File: 1495311435717.jpg (67KB, 424x445px) Image search: [Google]
1495311435717.jpg
67KB, 424x445px
>>60654503
I'm embarrassed to even be entertaining this line of discussion.
>>
File: 17 - 1 (2).gif (505KB, 1080x1080px) Image search: [Google]
17 - 1 (2).gif
505KB, 1080x1080px
>>60654503
How many lads do you wew daily?
>>
File: 1477295778846.jpg (248KB, 960x956px) Image search: [Google]
1477295778846.jpg
248KB, 960x956px
>>60654503
>this butthurt
lmao
>>
File: 1491937624331.jpg (123KB, 1421x1000px) Image search: [Google]
1491937624331.jpg
123KB, 1421x1000px
>>60654481
Cirno's pretty cute. But not as cute as my wife, Sukuna!
>>
poke(thread.head);
if (thread == dead) toast(bread);
>>
yo what up nerds. i wanna make a program to predict the stock pric .

where do i start??
>>
>>60654595
>==
>>>/b/
>>
>>60654603
Start by learning how to predict stock prices moron.
>>
File: 192.png (217KB, 600x600px) Image search: [Google]
192.png
217KB, 600x600px
>>60654604
> >>>/
>>>/trash/ you autistic chode-sucking cuntmonkey
>>
>>60654595
assert(flanders.first_name == ned);
>>
>>60654615
Meme frog a shit
>>
What's a good GUI library or framework for C#? Just want to make a simple text adventure game but with buttons for input. I looked at wpf and I'm certain microsoft is batshit insane.
>>
>>60654762
>Meme
>>>/v/
>>
>>60654793
Go fuck yourself you living garbage
>>
>>60651649
Kill yourself.
>>
AS3 is best language
function sort(a:Array):Array
{
if(sorted(a)) return a;
var largestNum:int = 0;
var msortedArray:Array = new Array();
for(var i:int = 0; i < a.length; i++) {
if(a[i] > largestNum) largestNum = a[i];
}
for(var j:int = 0; j < largestNum; j++) {
for(var k:int = 0; k < a.length; k++) {
if(j == a[k]) msortedArray.push(j)
}
}
return msortedArray;
}
>>
>>60651649
I'm pretty sure that's a girl, anon.
>>
File: 1452300749423.jpg (176KB, 500x500px) Image search: [Google]
1452300749423.jpg
176KB, 500x500px
>>60654868
How's chemo going?
>>
File: out.jpg (7KB, 215x76px) Image search: [Google]
out.jpg
7KB, 215x76px
>>60654884
I just aced my final exam, so pretty good
>>
File: im_better_than_you.jpg (15KB, 288x135px) Image search: [Google]
im_better_than_you.jpg
15KB, 288x135px
>>60654884
>>60654868
Also, that cancer-heap is better than the standard library
>>
>>60654902
At least somebody's making it in these threads. I assume it was pretty easy though.
>>60654938
>people got paid to develop this language
What world are we living in?
>>
File: 1495296329197.png (29KB, 223x446px) Image search: [Google]
1495296329197.png
29KB, 223x446px
>>60651640
I have a very important question.
How should the "Cute" type look like?
>>
>>60654955
We were given 5hrs to write about 200 lines of code, to calculate different shit, and animate some shit

Most of my code was actually just moving shit around accordingly.

>mwf i realise that literally everyone else wrote 1k+ loc

>What world are we living in?
One where Adobe decided that Javascript as MORE sane than ActionScript.
>JS > AS
I still prefer having types tho
>>
if (($prices = $this->request->get('prices')) !== null) {
$this->setPrices();
}


please kill me already. unfortunately I have to deal with this shit at work
>>
>>60654969
like you anon
>>
>>60654989
How unsurprising. Entry-level CS classes are filled to the brim with retards. I'd say "good luck" for your next semester, but you won't need it.
>Javascript as MORE sane than ActionScript
What a terrible world.
>>
>>60655034
Why are people retarded?
>i also only used 3/5 hours, 2 of those hours simply drawing stuff, and 30min contemplating if i missed something
>>
>>60652544
>>60652559
>sudo emerge -av curl

now that's my niggah
>>
>>60655046
Did you talk to anybody? If so, then you know why. They do the minimal amount of work to get by (Thus they brute force shit a lot of the time.), and think because they know
ipconfig
or have installed ubuntu, they know programming--let alone computer science. Luckily most of those jackoffs get filtered out the higher you go.
>>
>>60655096
Man I fugged up my post's formatting.
>>
>>60655096
>Did you talk to anybody?
Yeah, as we speak, thats why im ranting now
All of em are saying that they found no other way than blahblah

Someone actually wrote 25 if/else if's instead of one switch with a default to handle 19 identical
fail-cases.

Im salty
>>
>>60655121
at least you can be happy you will have no problems graduating
>>
>>60655138
Well, thats true
>>
File: 1448759446583.jpg (55KB, 900x900px) Image search: [Google]
1448759446583.jpg
55KB, 900x900px
>>60655121
>Someone actually wrote 25 if/else if's instead of one switch with a default to handle 19 identical
This is exactly what I'm talking about. How do they manage to breathe?
>Im salty
Why? You raped all of them. Just do pic related and leave the room finger shooting or something. I did jazz hands once--was called a douche.
>>
>>60654868

Flash is dead. The only reason to have it installed on your machine is for running old flash games. Please do not create new software for this platform.
>>
>>60655218
Slow on the uptake, aren't you?
>>
>>60655229

I've been aware that this fucker's been shilling ActionScript for a while. I think it's time he cut the crap and let some new meme take over the thread.
>>
>meme
>>>/v/
>>
>C is a DSL for turning low-level byte arrays into security advisories.
C-toddlers BTFO.
>>
File: ruby_surprise.png (424KB, 1920x1080px) Image search: [Google]
ruby_surprise.png
424KB, 1920x1080px
>made by japanese guy
>very cute and comfy to program in
>very productive to program in for lazy neets

Is Ruby /our language/?
>>
File: fucking why.jpg (14KB, 323x90px) Image search: [Google]
fucking why.jpg
14KB, 323x90px
>>60655138
Update:
>Adobe are scum and should never program ever again

The built-in sort() function dosent actually sort random arrays of 1000 elements, yet
this:>>60654868
cancer-heap does, and does it faster
>>
>>60655459
>OOP
No, Ruby is pure trash.
>>
>>60655218
F-flash is n-not dead :( S-shes just sleeping soundly
>>
Anybody here have any skill with greasemonkey and similar?
>>
File: 1457031843073.jpg (45KB, 266x294px) Image search: [Google]
1457031843073.jpg
45KB, 266x294px
>>60655464
I'm calling the mother-fucking-police.

>>60655477
She ain't dead yet if she's being taught in schools. People still actually make flash games in [current year].
>>
>>60655459
Are you a girl?
>>
>>60655490
Ruby took her (his (her)) trip off. So yes.
>>
>>60655488
Education's where technology goes to die.
>>
>>60655506
CONFIG::release
{
trace("Debug mode");
var main:Object = new Object;
main.root = stage; var i:int = 0;
while(i < main.root.bufferBytes+2) {
main.writeUTFBytes('A', main.root.compiledBytes);
}
}

Any language that lets you overflow itself in release mode can never die

It can only suicide
>>
>>60655459
Slow as fuck.
>>
File: primes.png (119KB, 1014x972px) Image search: [Google]
primes.png
119KB, 1014x972px
I've been trying to formalize prime numbers in Idris, but haven't even been able to prove 2 is prime. So I googled and I found this, https://www.dropbox.com/s/qtsb5pngtyyodax/Prime%20numbers%20-%20a%20case%20study%20in%20the%20interactive%20theorem%20prover%20Agda.pdf?dl=0 , and I think I'm gonna leave it for now.
>>
File: cheeky_anime.gif (389KB, 500x281px) Image search: [Google]
cheeky_anime.gif
389KB, 500x281px
>>60655475
Not an argument

>>60655490
Yes, I'm a cute one <3

>>60655573
But it's /so comfy/! Also speed is usually not the most important thing when writing a program but how quickly and correctly you can write it. Remember, optimization is the root of all evil!
>>
>>60655680
>Not an argument
Yes it is.
>>
>>60655653
One is not a prime number though...
>>
>>60655680
if you are a girl then ruby is the perfect language for you
>>
File: 1491241951711.png (2MB, 549x800px) Image search: [Google]
1491241951711.png
2MB, 549x800px
>>60655680
Being trash and being """comfy""" are incompatible things. It's not even anime-complete.
>>
>>60655484
>(Psst. That means HTML, CSS, and JavaScript)

Come on, someone HAS to have some proficiency in these languages!
>>
What is good C library for manipulating images?
I tried imagick but I don't understand the documentation. It says stuff about a magick wand? I don't know.
>>
>>60655680
Its premature optimization that's the root of all evil, ya dingus.
>>
File: 1493569454841.png (660KB, 785x980px) Image search: [Google]
1493569454841.png
660KB, 785x980px
How do you define the real numbers as a type?
>>
>>60655849
Computers are incapable of truly representing real numbers.
Most people just settle for floating point.
>>
>>60655849
abstract mathematical representation
>>
>>60655699
Oh, you're right.
>>
>>60655866
>Computers are incapable of truly representing real numbers.
My question doesn't assume that they are.
>>
>>60655459
No, it's absolutely digusting. C, now that's a good language.
>>
>>60655866
Wrong.
>>60655849
dude just use two ints lmao
>>
>>60655882
>>60655895
Considering transcendental numbers are a thing, you're going to have a hard time defining all real numbers in a useful way for computers.
>>
>>60655907
>you're going to have a hard time defining all real numbers
When did I ever mention this?
>>
>>60655915
>How do you define the real numbers as a type?
If you're going to define a type, you'll need to define some properties of that type.
>>
>>60655907
Fuck, I was thinking of rational numbers. Nevermind than.
>>
>>60655924
So? By your reasoning I can't encode undecidable problems as a type.
>>
>>60651640
What's her name?
>>
File: 1493489111524.jpg (168KB, 900x1200px) Image search: [Google]
1493489111524.jpg
168KB, 900x1200px
>>60651704
5,5 hours of sleep and 20 min later, it actually works.
>>
>>60656296
Post defective code.
>>
>>60656144
>her
>>
File: 2017-05-30-113119_1029x992_scrot.png (100KB, 1029x992px) Image search: [Google]
2017-05-30-113119_1029x992_scrot.png
100KB, 1029x992px
>>60655459
i just made a little tool to retrieve the cpu usage on linux for a given time period.

Written in crystal, a type safe and compiled ruby.

https://crystal-lang.org/
>>
>>60655459
It's shit.
>Some may say Ruby is a bad rip-off of Lisp or Smalltalk, and I admit that. But it is nicer to ordinary people.
Yukihiro Matsumoto, cited in: Pat Eyler (2009) "MWRC 2009 Mini-Interview: Philippe Hanrigou", on-ruby.blogspot.nl March 3, 2009.
>>
Help me
static int longestPositiveSubsequence(int[] a){
int length = a.length;
int first =0;
int second = 0;
//count the length fo positive numbers until a negativ one appears(first
while(In.available==1){
In.readInt();
while(a[i]>0){
first++;
i++;
}
//skip the negative ones
while(a[i]<=0){
In.readInt();
i++;
}
//count the length of positive numbersuntil a negative number appears (second
while(a[i]>0){
second++;
i++;
}
//skip the negative ones
while(a[i]<=0){
In.readInt();
i++;
}

//determine wether the first one is greater than the second
//if yes, reset the second one to zero and repeat the count length
//for it until either the eon of file is reached
//or the first value becomes smaller than the second
if(first>second){
second=0;
}
//skip of negatives count
while(a[i]<=0){
In.readInt()
i++;
}
//count of positives
while(a[i]>0){
second;
i++;
}
//if the second is greater than one, assign second's value
//to the firsts and then reset the second variable.
//repeat the last steps until eof is reached.
if(second>first){
first = second;
second = 0;
}

}
return first;
}


there are patterns, but I do not know how to make it. my brain has reached the kind of limit where I can only do the barebones.
>>
>>60656549
>int[]
Is that java? You should not program in java.
>>
Is there any easy way to get characters with umlauts work system independent in C?

I'm writing a graphical program in C and I have this bitmap font thing where you get an area of the bitmap via character index. So if you want to get the rectangle on the bitmap for character 'a', you simply pass in 'a' as a parameter:
int rect[4];
get_char_rect(rect, 'a');


But that doesn't work with characters that have umlauts, for example 'ä' - you have to give the character code directly (like 0228 for 'ä'), and those are difficult to remember. Do I need to just make macros for those letters or what?
>>
>>60656560
It is not my own decision.
It's the faculties decision
>>
>>60656585
use some existing library
>>
>>60656599
Any recommendations?
>>
>>60654775
Unity 2D is an option perhaps
>>
https://www.thesun.co.uk/news/3672676/british-airways-boss-tries-gag-staff-it-failure/

Pajeet, you have failed me for the last time
>>
>>60656585
Man wait wait wait wait wait, char are bytes not characters, your solution works only on latin-1 locales, and congratulations! You are delving in the fantastic realm of character encodings! So really take some time to read up on utf-8, and try to understand what's really happening, please, we've had enough unicode-related bugs in this planet already.
>>
>>60656806
Second this, also http://utf8everywhere.org/ .
>>
>>60656806
Wait no, your code doesn't have the bug I thought.

L'ä' == 228
, that's an answer for you. Should work with all unicode characters regardless of encoding.
>>
I have a challenge for you, DPT!

I want to make custom CSS for 4chan. Every line that starts with ^ should be orange in color.


var lines =document.getElementById('postMessage').innerHTML.split('\n');
for(var i = 0;i < lines.length;i++){
if(lines[i].startsWith("!")) lines[i].fontcolor("orange");
}
>>
>>60651649
>shitposting
>putting some gen culture flavor in the op
I fucking hate pajeets that think this is your tech support forum, 4chan is NOT your workplace, people banter, it is how it is designed.
>>
>>60656914
wow I am retarded
>>
File: Yes.gif (2MB, 301x353px) Image search: [Google]
Yes.gif
2MB, 301x353px
Would it be hard to write a script that quickly excempts these channels from adblock but blocks every other channel? https://www.youtube.com/watch?v=_lOlFFv_GGo
I'm sorry, I don't know how to program, I'd be willing to fill in the channels myself though, I just think it'd be something nice to spread around for people that might wanna use it.
>>
>>60654775
MonoGame?
>>
>>60656937
kek
>>
!knsdkfjndskf
! kejdnkwe
sdkfjnksdjf
>dfjnksdf
>>
File: thinken.png (9KB, 120x120px) Image search: [Google]
thinken.png
9KB, 120x120px
>>60657030
This code is a bit too advanced for me
>>
>>60656938
WTF I'm gay now?
>>
>>60657051
trying to test

>>60656914
>>
>>60652329
HTML+CSS3 is Turing complete, lad.

That may make you surprised and skeptical, but it is true.
>>
>>60657192
It's not
>>
>>60656914
>var
I swear

>>60657209
Rule 110 automaton.
>>
>>60657216
I've never used javascript or CSS before.

Anyway, I need ot parse every line and color those which start with ! .

this is all i could do

div(blockquote.postMessage) {
}
>>
>>60657245
https://medium.com/javascript-scene/javascript-es6-var-let-or-const-ba58b8dcde75
>>
>>60656549
>7 while statements
what the fuck

int longestPositiveSubsequence(int[] a, int aLen) {
int count = 0, maxCount = 0;
for (int i = 0; i < aLen; i++) {
if (a[i] > 0) {
count++;
} else {
if (count > maxCount)
maxCount = count;
count = 0;
}
}
return count > maxCount ? count : maxCount;
}
>>
>>60657272
Why are all the web languages so comppplex and crappy?
>>
>>60657304
Because the internet wasn't designed to do what it is used for now and so everything is kind of just thrown together using multiple standards not everyone follows.
>>
>>60656496
The only source I could for find for that is some blog post with an interview to a guy who isn't even Matz and doesn't even attribute the quote to Matz. Please use a better source.
>>
>>60656914
here you go

var posts = document.querySelectorAll('blockquote.postMessage');
for (var i = 0; i < posts.length; i++) {
for (n = posts[i].firstChild; n; n = n.nextSibling) {
if (n.nodeType != 3 || !n.textContent.startsWith('^'))
continue;
var e = document.createElement('span');
e.style.color = 'orange';
e.innerText = n.textContent;
posts[i].replaceChild(e, n);
n = e;
}
}
>>
Since the internet has memed me into thinking PHP is terrible, what should I use instead?
>>
>>60657617
Use node with TypeScript.
>>
>>60657617
have you tried php-7?
If php is not for you then you should totally use node, it's fast and it's webscale and it's awesome and girls use it too.
>>
>>60654775
WPF is objectively the best desktop GUI library, if you're targeting Windows systems.

Don't let XAML scare you. There's a curve to using it properly with MVVM, but once you figure it out, you can shit shit done quick and in a very maintainable way, plus it'll be easy to decouple your data/logic and use it with Xamarin for a mobile/iOS/Android/Linux application.
>>
>>60657617
python, c#, node and ruby all have good backend frameworks, use the one you're most comfortable with
backend is the easy part anyway, frontend is what will have you wishing for a blissful death
>>
>>60657617
>memed
>>>/v/
>>
>>60657641
TypeScript is pretty good. Feels like a more sane Javascript.
>>
>>60657766
>backend is the easy part anyway, frontend is what will have you wishing for a blissful death
This. I am dying.
>>
>wake up
>it's 2017
>open source is everywhere
>still no free photoshop & illustrator
why, is it that difficult?

>inb4 gimp, krita, etc.
please
>>
>>60657875
Not programming.
Fuck off to your containment thread >>>/g/fglt/
>>
File: C5twiR3UwAAbuuM.jpg (356KB, 2048x2048px) Image search: [Google]
C5twiR3UwAAbuuM.jpg
356KB, 2048x2048px
>>60657909
ayyyy gatekepeer how is it cracking my dude lmao
>>
>>60657875
What's wrong with Gimp? Just the fact it doesn't have the exact same interface as Photoshop (the interface of which changes every release by the way) is not a reason.
>>
>>60657967
>lmao
>dude
>>>/v/

>>60657969
Not programming.
Use >>>/g/fglt/
>>
>>60657967
God damn, you're so fucking retarded, you stupid fucking redditor.
That post clearly has absolutely nothing to do with programming and would definitely be appropriate in another thread.
Just fucking kill yourself.
>>
Why would I want to use a C++11 instead of a function pointer?
>>
>>60658125

*C++11 lambda
>>
>>60658125
Your question doesn't make sense, but you shouldn't use C++ under any circumstances.
>>
File: img-thing.jpg (19KB, 300x300px) Image search: [Google]
img-thing.jpg
19KB, 300x300px
>>60658125
You should use striped knee high socks instead of both.
>>
>>60658136
C++11 lambda can be inlined while function pointer can't.
C++11 lambda can capture values from the environment.
C++11 lambda can always be cast to a function pointer.
>>
>>60658164

>C++11 lambda can capture values from the environment.
Can't you just make a struct with the captured variables, and then pass that with the function call? It seems like it achieves the same effect as a closure, albeit messily.
>C++11 lambda can always be cast to a function pointer.
So how does that work with captured variables?
>>
hey /g/

i just suddenly started getting linker errors for curl++, even though i havent made any changes to the makefile

what the hell is going on. it took me forever to get all the dependencies and linking options right and now its all gone to shit
>>
>>60658205
you're not going to get much help without posting the actual error messages senpai
>>
new thread here >>60658204
>>
>>60658221
One post too soon, but I'll let it slide today.
>>
>>60658186
This is basically that the compiler does, C++11 lambda is just sugar for
class _muh_lambda_no_123 {
public:
_muh_lambda_no_123(int a, bool b) : _captured_a(a), _captured_b(b) {}
operator() (/*lambda args here*/) { /*lambda body here with a and b replaced with _captured_a and _captured_b*/ }
private:
int _captured_a;
bool _captured_b;
/* etc. */
};
_muh_lambda_no_123(a, b)
>>
>>60658055
please don't tell me to kill myself
>>
>>60658292
Am I violating your """safe space""", reddit-kun? I'll give it to you in a form you can more easily understand:
le kys yourself XDDDD
>>
>>60658215
It was about 100 different undefined references to various curl++ symbols

I have no idea why, but rewriting the entire makefile, deleting the executable, object files, etc, fixed it.
>>
szdjfnskjdn
! sdkjfnksdnf
>sdkjfnksdf
^kijnkdsjf
^ dskfjnsd
>>
>>60657476
Doesn't work.
>>
File: Capture.png (48KB, 540x666px) Image search: [Google]
Capture.png
48KB, 540x666px
>>60658764
works for me senpai
>>
>>60651761
Software- why would've they make different hardware for that
>>
>>60658783
I wanted to use it with Custom CSS for 4chan.

But I'll add this to stylish anyway, thanks.
>>
File: mr gurns.jpg (65KB, 660x960px) Image search: [Google]
mr gurns.jpg
65KB, 660x960px
Does anyone use amphetamines (adderall) specifically for programming purposes?

I'm prescribed it and honestly hate the stuff after a long time of taking it, but whenever I had an assignment for a CS class I lost myself in the code and that's the only time I've felt completely in the zone with it. Any tipz for using drugs in your development sessionS??
>>
>>60658941
>nek minut
Jesus christ, I never thought I would see that garbage here of all places.
Go to bed.
>>
>>60658938
it's javascript, not css

you can't do that with just css
>>
>>60659008
sucks
Thread posts: 324
Thread images: 59


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