[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: 314
Thread images: 37

File: 1481203747565.jpg (2MB, 2963x4172px) Image search: [Google]
1481203747565.jpg
2MB, 2963x4172px
What are you working on, /g/?

Old thread: >>58190194
>>
Functional programming thread:

>>58174033
>>
>>58197507
This thread is pathetic. It is not about programming. It's just a bunch of computers illiterates and first semesters memeing about whatever they just learned.

A quick search shows that most arguments used here are not original and have been copied from some trendy tech blog or other shit site.

The only real programming questions I have seen so far are from beginners(it's fine to be a beginner btw).

This entire site is shit and I don't know why anyone would regularly come here.
>>
Don't do it, /dpt/.

Don't take the copypasta bait.

>>58197507
Exploring the deepest, darkest orifices of Azure .NET integrations.
>>
>>58197615
>>>/r/eddit
>>
>>58197615
Linux
>>
File: 1482287377939.png (480KB, 600x849px) Image search: [Google]
1482287377939.png
480KB, 600x849px
Have you programmed in Mathematica today?
>>
>>58197615
It's comfy.
>>
Anyone have a link to a description of Aho and Peterson minimum string to cfg edit algorithm? I checked a bit but only find discussion of the algorithm, not the algorithm itself. Language of implementation is uneccessary I just a rough outline
>>
File: networking.png (140KB, 1919x989px) Image search: [Google]
networking.png
140KB, 1919x989px
Trying to fix a networking bug with my voip protocol.
>>
this board is for dishonest normies who like to pretend they're in it for something deeper than what they assume "normies" typically are.
>>
>>58197857
You don't really believe that yourself.
>>
I program in a common, popular language because:
>it's enjoyable to use
>it gets shit done quick with no fuss
>it has tons of jobs and pays well

I don't program in Java, Javascript, or PHP because:
>the available jobs do not outweigh the languages' annoying aspects
>>
File: Capture.png (4KB, 858x95px) Image search: [Google]
Capture.png
4KB, 858x95px
>"Thank you for your submission"
>"Overall, it is a high quality code, but can you please explain us the purpose and meaning of statement in line xxx of class xxx?
>the fuck are the on about
>look for that statement in my code
>pic related
I hate when it happens
>>
What do you see as being the big trend in programming languages going forward?
>>
File: inorder.jpg (19KB, 647x294px) Image search: [Google]
inorder.jpg
19KB, 647x294px
>>58197507
Trying out some Huffman witchcraft.
>>
>>58197954
Things that did not happen: the post.
>>
>>58197987
Truth is stranger than fiction: there was some genuine drooling retard around here a few weeks (maybe months? who knows) back who insisted that he could not program without making retarded variable names and debug print statements that were just swears and racial slurs and it wasn't fair that he couldn't get a job. He spent a chunk of the thread backpedaling about how he didn't want to "work for a company, anyway"
>>
>>58197948
>I don't program in Java, Javascript, or PHP because:
Those are all excellent languages. You have no clue what so ever.
>>
File: 1481932286983.jpg (594KB, 1944x1944px) Image search: [Google]
1481932286983.jpg
594KB, 1944x1944px
>>58197507
I'm supposed to be working on 3 project assignments including one in Haskell, but I'm too lazy and would rather do it a week before the deadline
>>
Should I learn JSON or .xml?
>>
>>58198564
Definitely JSON.
XML is crap.
>>
>>58198248
What's the Haskell assignment?
>>
>>58198564
neither, but if you have to pick one then json. if you intend to write anything web related, Android related, or Windows related you pretty much already know XML
>>
>>58198589

Not web-related.
I need a format to store lots of plain text and parse it easily with Python or Java.
>>
>>58198564
What is there to learn? It's simple
>>
>>58198636
For XML, you need to learn how to shit on the street
>>
>>58198636

i have only two days before i present my project.
and i noticed too late that i could use some kind of parsable text format.
>>
>>58198603
CSV honestly sounds closer to what you want if you're just storing a big array of text but JSON is much better than XML in 99% of cases
>>
>>58198588
a simple computer algebra system
the barest minimum would be parsing pre-tokenized expressions, variable substitution and partial differentiation, with extra credit given for additional functionality
>>
>>58198687
sounds fun, you can use Parsec to very easily lex+parse it too and get some extra credit
>>
Is it possible to make a high level language faster than C?
>>
>>58198758
Yes, C++ exists.
>>
>>58198777
C++ is not faster than C.
There are a lot of features which will cause slower code.
It doesn't even have restrict pointers in 2016.
>>
>>58198758
With a strong type system or some other way of hinting things to the compiler, you can do more optimizations. Other than that, C is so minimal that it's hard to do better, but it's not like adding high level features means you have to do worse.
>>
>>58198809
>restrict
All relevant compilers have it as an extension. Even MSVC.
>>
File: 1419264786464.png (593KB, 804x536px) Image search: [Google]
1419264786464.png
593KB, 804x536px
>>58197507
Let me preface this by saying I'm a retard.
I've been trying to make your standard two for-loops into a general-purpose function after noticing their abundance in the code.
void xyloop(void (*f)(int, int, ...)){
int x, y;
for(y=0; y<size[1]; y++){
for(x=0; x<size[0]; x++){
(*f)(x, y, ...);
}
}
}

Every function requires the x and y ints but, beyond that, their arguments vary.
How is it possible to pass extra arguments from the header to (*f)? The compiler doesn't like it as is.
>>
>>58198758
>>58198812
Basically, with a strong type system, safety, abstraction, and performance all go together.
>>
>>58198831
>Extensions
We're talking about standard C++. Extensions never count.
>>
>>58198872
>Basically, with a strong type system, safety, abstraction, and performance all go together.
... in theory.
It has never been demonstrated in practice.
>>
>>58198843
With code like that, it wouldn't be easy to make it call functions with different numbers of arguments and work in general.
I can think of some ways you can sort of do it, but it would require writing a lot of wrapper functions, or modifying the functions you would pass into it quite a bit.
It's probably not worth the effort.
>>
>>58198943
Which is more and more surprising. ATS is almost there but it has autistic syntax.
>>
File: Desktop.png (94KB, 1920x1080px) Image search: [Google]
Desktop.png
94KB, 1920x1080px
>>58197507
What do I do when this happens?
It werks if I include conf.h after my typedef struct {...} tallis_t;
So my include guards are stopping my struct definition?
>>
Hello /g/, I have a pthreads question. How can I have, say, 8 threads running, and have a new thread created every time one of the existing threads finishes execution, without continuously polling some mutexes or some shit?
>>
>>58198843
Can't 'forward' vararg arguments like that in C.
You could mandate that fn must take a va_list and then you can pass that along, but that would be highly inconvinient (and slow, espicially on x64).

If you make it a macro you could use __VA_ARGS__ which does do perfect forwarding.
>>
>>58198968
>autistic
Non-Algol like.
>>
>>58199049
>viewt@ype+
>not autistic
>>
>>58199030
why not just reuse the threads
>>
>>58199010
You have a dependency cycle.
You should probably structure your header files differently, so you don't get those, but the quickest fix to to chuck
typedef struct tallis_bot_struct tallis_t;
near the top of conf.h
>>
>>58199063
I can't even begin to imagine what was going through that dude's head when he came up with this shit
>>
>>58199130
The spawning of the new threads is not the part I have a problem with, I just don't know how to signal that a thread has finished doing useful things to main, so that main can do something about it. Btw it seems like condition variables will be the solution.
>>
>>58198809
it is in most cases because theres a lot of 0 cost abstractions
>>
>>58199376
>Muh magical pixie dust zero cost abstractions
Typical sepplesfag.
>>
File: 432.jpg (9KB, 225x225px) Image search: [Google]
432.jpg
9KB, 225x225px
Created Snake from scratch for the first time desu, pretty comfy and surprisingly easy.

Not so long ago I struggled with FizzBuzz.
>>
>>58199404
Stupid frogposter.
>>
>Ivan, write me fizzbuzz!
>No shit, tovarish!
aлг Физзбyзз
нaч
цeл a
нц для a oт 1 дo 100
ecли mod(a, 3) = 0
тo вывoд "физз"
вce
ecли mod(a, 5) = 0
тo вывoд "бyзз"
инaчe вывoд a
вce
вывoд нc
кц
>>
>>58197978
It's going fine, thank you for asking, but I've come across something I can't explain.

It turns out that a char and a bool have the same size. So why would I be interested in substituting a 1 byte character with 2 or more 1 byte boolean values? From a compression standpoint this make no sense at all.
>>
File: IMG_0285.jpg (698KB, 1702x2471px) Image search: [Google]
IMG_0285.jpg
698KB, 1702x2471px
Reminder
>>
File: 1453428197111.gif (2MB, 360x270px) Image search: [Google]
1453428197111.gif
2MB, 360x270px
>>58197615
Hey man, you are here again!
>>
>>58198965
>>58199041
Ah, sod it. I had been thinking of doing it with va_list.
Thanks for the effort. I also learnt a bit about the ellipses/ variable argument operator, doing this.
>>
>>58199528
I just answered my own question, but if anyone would like to add to it I'm all ears. Guess I should find out how to write a file one bit at a time.
>>
>>58199528
From a logical standpoint it does.

Char can be anything. Bool can only be true or false. It will fuck with you less.
>>
>>58199196
_t is reserved
>>
>>58197507
I'm between projects right now. I should decide what i want to do next.
>>
>>58199699
is true + true > true?
>>
>>58199707
By POSIX, not standard C.
>>
>>58199721
Both + and > are undefined for boolean values.
>>
>>58199721
I don't know, but true*true is still true, it's an AND gate pretty much.
>>
>>58199743
isn't + an OR gate?
>>
What if false + false == true?
>>
>>58199837
false
>>
File: last.png (297KB, 705x751px) Image search: [Google]
last.png
297KB, 705x751px
Still working on sixel crap.

Found out that mlterm support for HSL colors is completely broken, or it's expecting HSV for whatever reason when the standard says it's HSL, that reduces the available colors to 1m instead of 3.6m.

Now I'm unsure whether it should actually be HSV and I just read the standard wrong.
>>
>>58199721
Review your truth tables you pleb.
>>
>>58199831
It's exactly what it is, though you shouldn't get values greater than 1. So logically:

1 + 1 = 1
1 + 0 = 1
0 + 1 = 1
0 + 0 = 0

It makes more sense in real life transistors if you have voltages in parallel, where you can't get over a certain value. Basically, one or the other have to be on for there to be a true output. The only case where you get a false output is if both inputs are false. So your OR gate basically says: neither one nor the other.
>>
>>58199732
Couldnt you define it in a memelanguage like haskel
>>
>>58199907
You could but it wouldn't be particularly logical.
>>
>>58198034
Terry?
>>
>>58199907
This >>58199931. You can't do shit like
>is false greater than true
>is true greater than false
>if false and false, is it lesser than true
>if true and true, is it greater than false

because a boolean only has two values, and they're neither lesser or greater than the other.
>>
>>58200035
false is obviously less than true, duh.
>>
>>58200035
>boolean only has two values
Stop being oppressive. Think about all of the bi-booleans out there.
>>
>>58200089
only in Ctard logic.
>>
>>58199894
do you expect people to use your terminal?

what are your plans for the future regarding this project?

how long have you been programming?
>>
>>58200110
I'm pretty sure that boolean algebra also has that rule.
>>
>>58200134
>do you expect people to use your terminal?
I don't really care, I made it for myself because every other terminal was lacking this or that.

>what are your plans for the future regarding this project?
I use it myself, so it will stay alive as long as I am.

The plan is to make it work on Windows too, and improving the performance on macOS, and performance improvements in general.

The missing features I personally want are ReGIS support and font ligatures support.

>how long have you been programming?
More than 15 years, but this was a fairly easy project, really interesting tho.
>>
>>58200184
nope
>>
>>58200186
sweet meh

keep going
>>
>>58200186
Did you say you were making the terminal on OpenGL or something else?
>>
>>58199894
That's neat. Can you just cat an image and it'll appear inline? What does it use to display those images? Gtk? Qt?
>>
>>58200224
It uses Cairo and Pango for rendering, so whatever backend is selected for the platform.

Currently on macOS the performance is god-awful, I profiled it and the reason is that the Quartz backend is made of shit, probably because nobody gives a fuck.

Since that's the case I'm going to use the OpenGL backend on macOS.

I was working on Wayland support, which also requires using the OpenGL backend but the Mesa driver's implementation of EGL is buggy and eglSwapBuffers is failing for no reason, so I dropped the idea of supporting Wayland for now.

>>58200272
Nope, that's not how it works.

My terminal supports Sixels, which are a dead technology from the 80s, it's a standard format to print bitmap images in a terminal or printer, few terminal emulators support it, mostly from Japan.

Since the Sixel standard is retarded it only supports 1 million colors in RGB, so I addeda a small extension to the format that allows for true color, which can be queried from the terminal capability database.

Then I wrote a program that takes an image and prints out sixels, that's all there is to it.
>>
>>58200298
>Then I wrote a program that takes an image and prints out sixels, that's all there is to it.

Interdasting. Do you have the code online somwhere?
>>
>>58200298
Why not use Skia? It's battle hardened on OS X via chrome. Faster than Cairo too.
>>
>>58200320
https://github.com/meh/rust-sixel

>>58200327
C++, and font rendering in Skia is utter shit, and a terminal emulator renderer is 99% text.
>>
Ok, I want a serious answer here:
What is the best Algorithms textbook to get?

If I buy it, I want it to be THE ONE.
I do NOT want to waste money getting something that is collegiate fluff.
I want descriptions, explanations, and examples.

I want it to basically act as a reference guide for "What Algorithms Every Programmer Needs to Know and How They Work"

I am looking at this one:
https://smile.amazon.com/Algorithms-Robert-Sedgewick-ebook/dp/B004P8J1NA/ref=mt_kindle?_encoding=UTF8&me=
which seems to have rave reviews, 86% high, and only 5% bad.

But it seems like it's designed for Java.
If anyone has read it, does it overload you with Java bullshit, or is it mostly language-agnostic, but it just happens to USE Java?

What about SICP? Is that an actually good book?

Or how about Cormen's Introduction to Algorithms?
https://smile.amazon.com/Introduction-Algorithms-Thomas-H-Cormen-ebook/dp/B007CNRCAO/ref=sr_1_3?s=digital-text&ie=UTF8&qid=1482881963&sr=1-3&keywords=sicp
That has like 82% positive, but at the same time, some of the reviews show examples that seem SO language-agnostic that it's confusing.

How are Sedgewick's original Algorithms in C or Algorithms in C++?

They're not the newest from what I saw, but how are they?
They'd at least be in C/C++, but from there I can usually switch to other languages with less effort, because I get the C/C++ syntax better than, say, Java.

If I DID go with Sedgewick's own books, would I be better off with Algos in C or Algos in C++?

I want an unbiased view here.
I'm NOT a Maths major, so that's a first good criteria: Less Mathy, more codey.

Again, I don't want something that's obtuse, either.
>>
>>58200102
I heard quantum superpositions are neither, so wait until quantum computing goes mainstream. For now, let's say that there are only two.

>>58200184
>>58200089
They're converted to int since bool is an integral value. 0 and 1 respectively. In that logic, true is greater than false since 1 > 0, but that doesn't matter in boolean terms.
>>
>>58199262
http://man7.org/linux/man-pages/man3/pthread_create.3.html

if you want to stop the thread, you can kill somewhere in the thread's routine and use an exit status of some sort for the main thread to use
>>
>>58197853
Are you reimplementing pulseaudio in python?
>>
>>58200358
>font rendering in Skia is utter shit
What are you talking about? Skia just uses the system font renderer. Chrome uses Core Text and Windows uses DirectWrite.

Where did you pick up the skia text rendering is shit?
>>
>>58197615
Nice may may
>>
>>58200358
>>58200432
Also, from what I can tell your terminal emulator will be rendering nothing but bitmap fonts, so the point is moot anyways.
>>
>>58199528
Blame your compiler or standard library.

You can always define your own types and behaviours on how they're written and read from disk.
>>
>>58200432
Chrome for OS X uses Core Text rather.
>>
>>58197615
>This entire site is shit and I don't know why anyone would regularly come here.
dis
>>
>>58200466
see you tomorrow
>>
>>58200359
Introduction to Algorithms from MIT is usually touted as THE algorithms book. You're really not going to get the most perfect, most complete, most understandable algorithms book of all time no matter what you choose, so just pick one and understand what's inside that before you move onto something else.
>>
>>58200432
>>58200440
I need high performance in rendering small glyphs group without any layouting at all, and I need complete control over the fonts being picked.

When I looked at Skia it didn't provide what I needed at all, correct me if I'm wrong tho, but only if it also has C bindings, I'm not going to use anything C++.

The "faster" is pretty much moot because the only thing I actually use Cairo for are straight lines and rectangles, I just use it as a common surface thingy with some convenience.
>>
>>58200359
Check for yourself, Anon.

ftp://91.193.236.10/pub/docs/linux-support/computer%20science/data%20Structures%20&%20algorithms/%5BPearson%5D%20-%20Algorithms,%204th%20ed.%20-%20%5BSedgewick,%20Wayne%5D.pdf
>>
>>58200359
I don't think there is a THE ONE algo book.

There are plenty of "intro to algo" books but they only cover the basics.

Something like The Art of Programming might be what you want (because it tries to be THE ONE book but now it's like 5 books and still going) but I never read it fully so I can't really say how mathy/not mathy it is especially given the author.
>>
>>58200497
Like I say, why not render with bitmap fonts? Everything is monospaced anyways so it's not like there's going to be sub-pixel precision or anything.

Yes, Skia has C bindings.
>>
>>58200359
Algorithms are language agnostic, anon. You can implement them in any language bar HTML. Java just happens to have libraries and a built-in garbage collector so it's less bullshitty than C/C++ since you need to alloc and dealloc memory for those.

I say, get Sedgewick's and get it in whatever language you are comfortable with.
>>
>>58200556
1) noteveryone uses bitmap fonts
2) font handling when Unicode is involved is much more complex than that
3) font ligatures don't work with bitmap fonts
>>
>>58200089
>>58200110
Nope, in C anything different than zero is true.
>>
GPU Cryptography, specifically optimisation of well known crypto algorithms. Send help and any useful books as I'm not even a GPU programmer although I'm a C++ expert, if that helps.
>>
>>58200740
>C++ expert

I'm sorry, nothing can help you.
>>
>>58200740
>C++ expert
eh
>>
What's teh second best ide behind VS?
>>
for (int i = 30; i < 31; i++){


Will it run once or twice?
>>
>>58200432
>Where did you pick up the skia text rendering is shit?

Not him but have you ever used Google Chrome? No matter the platform the fonts always look like shit.
>>
File: last.png (629KB, 1225x775px) Image search: [Google]
last.png
629KB, 1225x775px
Yep, mlterm handling of HSL is definitely fucked.

Too bad nobody seems to ever use HSL and only goes for RGB.
>>
>>58200822
once
>>
>>58200830
Yes. I'm using it right now. Like I said earlier in the post, Chrome just uses the system standard font renderer. On OS X it uses Core Text, on Windows it uses DirectWrite, on Linux it uses whatever the fuck is used on linux these days.
>>
>>58200822
Once and a half.
>>
I'm so afraid of writing shitty broken code that I can't program effectively anymore
I fucking hate myself
>>
>>58200822
Unknown, because we don't know if anything is modifying i inside the body of the loop. There could also be a break or continue statement at the first line of the loop body which would effectively mean the loop runs zero times.
>>
>>58200861
relax my man. Take a step back. Learn some good code structuring patterns. Learn the ways of functional programming. Then dive back in, stronger than before.
>>
>>58200871
Wrong. It will run once. The body is irrelevant.
>>
>>58200861
Calm down man, you'll get there
>>
pub trait Platform {
type Window<'a>;
fn create_window<'a>(&'a self) -> Window<'a>;
}

>tfw no HKTs
>>
>>58200938
... FUCK YOU
>>
>>58200861
If you want it all to end but are too afraid to do it yourself, go hang out at a national park in the USA.
Preferably Yosemite.
>>
>>58200897
#include <stdio.h>
int main(void) {
for (int i = 30; i < 31; i++){
puts("Holy shit you are a faggot");
if (i == 29) break;
if (i == 30) i = 0;
}
}

What is the output if this program?
>>
>>58200487
Hmmm, I'll look into that

>>58200500
I'll skim this over and decide.
Seems more wordy than referencey, though.

>>58200507
I'll look at that too

>>58200609
Ok, I might do that. But I'll look at those other options too.


Thanks everyone
>>
>>58200938
>if (...) then ...;
It won't even compile :^)
>>
>>58200963
Holy shit you are a faggot.
I don't know what the program would print out though.
>>
File: Capture.png (120KB, 906x604px) Image search: [Google]
Capture.png
120KB, 906x604px
Working on a new terminal display for rogue-like development.

https://www.reddit.com/r/roguelikedev/comments/5kcors/java_asciipanel_working_on_a_new_fork_of/
>>
>>58200992
It will print out "Holy shit you are a faggot" 30 times
>>
>>58201054
Sorry, 31 times. It put the string before the if.

So, that'd be for 30 (1)
0 through 28 (29)
AND 1 for 29 (1)
>>
>>58201071
You were right the first time.
>>
I'm building poor man's PRTG with Syslog, SNMP, ping, etc. for monitoring the network

Matching syslog for devices that don't follow the standard and not being able to use the source address to match it sucks
>>
>>58201106
oh fuck, yeah.... damn.
>>
#include <stdio.h>
#include <stdlib.h>

#define YOU "faggot"

int main()
{
int XDd = 0;
printIt:
printf("I LOL'ed %d times already, %s\n", XDd++ + 1, YOU);
if(XDd != 100)
goto printIt;
else
goto eXiT;
eXiT:
return 0;
}
>>
I love C, reinventing the wheel and all the autistic stuff but how do you I know when my program is perfect?
>>
Tryina crack this samsung s3 phone. no code.
>>
>>58201193
>how do I know when my program is perfect?
When it's a high-intensity business program and no one else can read it, so you have secured yourself a permanent position in that organization's IT department

I suggest slowly refactoring all the important code to use Ternaries and goto's, then moving the goto's around.

You will be invincible, because they NEED you to operate it, since no one else knows what the fuck it does.
>>
>>58201235
Isn't this the purpose of Java and C#?
>>
>>58201269
Yes, but in reality C is much better at it.
>>
>>58201193
>when my program is perfect?
When it will make programming obsolete.
>>
File: stackoverflow.png (61KB, 1027x437px) Image search: [Google]
stackoverflow.png
61KB, 1027x437px
why are stack overflow user such insufferable cunts?
>>
>>58200795

Well if we're talking just IDEs, QtCreator is the first best, ahead of VS.

>>58201193

You don't. Even when it passes all tests, including well thought-out fuzz tests, and security audits, there is still the off chance that in some weird combination of inputs, it can be exploited. This sort of vulnerability may only surface 20 years down the road.

And don't think you're safe just using another language. Not all security vulnerabilities have anything to do with corrupting memory. Even a flaw in logic can be used to exploit a program.

Software will never be perfect unless it is so small that you can write a formal proof that it will be perfect.
>>
Hey guys newbie here, just started learning C, I think I might try a career in programming. Any pointers or things I should focus on?
>>
I am trying to learn lisp/scheme and further my comp sci knowledge in general, would these videos along with reading through sicp and doing exercises be a good idea?

https://www.youtube.com/playlist?list=PLE18841CABEA24090
>>
why is malloc so based
>>
>>58201358
>Software will never be perfect unless it is so small that you can write a formal proof that it will be perfect.

how does one do that?

is that the case in Haskell or?
>>
>>58201382
>Any pointers
Sure.

0xACDD
0xDABB
0xCCCC
>>
>>58201386
You're better off reading Realm of Racket and How to Design Programs instead of watching those videos or reading SICP. SICP is a very math-intensive book and it focuses less on the language as it does approximating square roots.
>>
>>58201461
You can formally prove that a C program meets a tight specification but it needs to be written in a style that's conducive to it (minimal side effects).
>>
>>58201461

>is that the case in Haskell or?
Remember what I said about logic errors? Just because your program compiles doesn't mean it does what you intended. If a program is sufficiently large, there will be at least one section of code that you wrote that does what you said, but not what you wanted, or does what you wanted, but fails to consider an edge case that can be exploited.

>>58201425
And why do you consider it to be based?
>>
>>58201473
Those are some pretty small pointers you have there.
>>
File: Capture.png (10KB, 979x512px) Image search: [Google]
Capture.png
10KB, 979x512px
I did it lads

I made my first fizz buzz

Now when can I program advanced global illumination lighting techniques in state of the art game engines?
>>
>>58201478
well that's fine by me, math is actually my real interest anyways. I am more interested in learning computer science somewhat in depth, at least moreso than I will as a CE major. Scheme programming is secondary, I already know java and ruby.
>>
>>58201910
Post source code.
>>
I have been piloting my Vim with the default 8-width tabs recently. I'm starting to like it.
>>
>>58201910

FizzBuzz is something you should be able to do within the first few days of programming. Lighting techniques in game engines... that'll probably take a few years. Dunno.
>>
faggots, the lot of you
>>
>>58201934
#include <stdio.h>
int main(void){for(int i=1;i<=100;i++){if((i%3==0)&&(i%5==0)){printf("fizzbuzz\n");}else if(i%3==0){printf("fizz\n");}else if(i%5==0){printf("buzz\n");}else{printf("%d\n",i);}}return 0;}
>>
Why don't you use property-based testing, /dpt/?
>>
>>58201872
For you.
>>
>>58202380
because I only write fartbuzzes
>>
>>58202420
Don't lie doggo, you're writing OCaml++
>>
>>58202461
haven't worked on my language in months. I can't be in control over a project or else I will drastically change direction half way through and want to restart
>>
>>58202492
*throws stick for you*
>>
File: 1452935417926.png (1MB, 1024x1387px) Image search: [Google]
1452935417926.png
1MB, 1024x1387px
>>58202561
>*emotes*
>>
>>58202565
>doesn't know the /dpt/ family
>>>/out/
>>
>>58202565
*downvotes you*
>>
>>58202579
*upvotes you and leaves a witty reply*
>>
>>58202595
you->~Anonymouse();
>>
ded
>>
Is there any way to write to a text file in binary bit by bit in C++?
>>
I have two functions that do the same thing different ways. How do I tell which one is faster?
>>
>>58202773
>calling a destructor on a pointer
>instead of just writing delete

I don't have enough "Absolutely Disgusting" pictures for this.
>>
File: absdelet.png (243KB, 400x489px) Image search: [Google]
absdelet.png
243KB, 400x489px
>>58203215
How bout this? I made it yesterday.
>>
>>58203183
yes
>>
>>58203200
1. Start timer.
2. Run a function N times, N depending on how long it takes. You want to do it enough to eliminate timing imprecision but you also don't want to be waiting for hours.
3. Stop timer.
4. Repeat for all the functions you want to test.
>>
>>58203246
Would you care to share your expertise?
>>
File: 5.png (41KB, 585x226px) Image search: [Google]
5.png
41KB, 585x226px
>>58203278
I don't have any but my subconsciousness knows how to build a computer from scratch
>>
can anyone here look at assembly code and see what the program is doing?
>>
Today I was unlocking a trans-optimized acropetal c-loop (bootlegged with a geniculate paralogous quatro-tapper). All went well until a temp surge wiped my umbilicus processor despite a Faraday-skinned ciliate cooler operating on neo-coolant.

After that, I said fuck it and have been drinking airag for about 6 hours while making some credits off some basic blackhat merc ops better suited for a script kiddie than an old hand like myself. Such is life.
>>
>>58203369
post it
>>
>>58199650
Make sure to call va_start every time you call the function that takes va_list, otherwise you'll be getting garbage.
>>
>>58203358
Nice died hair Kerr you fucking bitch
>>
>>58203715
No I mean in a general sense, can you look at a given piece of asm and more or less understand what it's doing?
>>
>>58203854
well yes that's what reverse engineering is
>>
>>58203868
That's cool. Asked because I was just curious, wanted to know if there was at least someone at that level here.
>>
>>58203877
I was a diehard frequentist who cut my teeth as a freelance nexus merc working on blackhat ops out of Tottori.

There are a couple others on this level, but most are iPhags or cracker jack scripters.
>>
Everybody who uses Haskell should really consider putting an end to their own life.
>>
>>58203371
Try oscillating the reflex parameters of the synapomorphic processors with an alternate cycle of 34 hertz compounded with zinc finger Ruhmkorff coils.

The sample dimorphism and oblique phialidic splaying should fuse the allopatric constructs without having to resort to a Bayesian harmonic uimbilicus synpatch. Even normies know that's a pretty roundabout way to stymie a BI telemetry packager.
>>
File: 1446141199768.png (459KB, 1280x720px) Image search: [Google]
1446141199768.png
459KB, 1280x720px
>>58203943
Yeah. You're right.
>>
>>58204030
I attempted this protocol first using a virtual sandbox shoveler and independent "froggy" cyberserum care package. As expected, this is a bad virus, probably the worst I've seen since my work as a freelance nexus merc working on blackhat ops out of Tottori.

I just had to reformat my harddrive, reset the diplomatic algorithm on my CPU, defragment my secondary echo transverser, repopulate my standard paramorph contractor with null terrahertz slipstarts. and reconfigure my wireless modem transponder setup with a Bayesian inference telemetry packager.

Needless to say, do NOT try this! You've been warned.
>>
>>58204112
Is this an encrypted language for private messaging in the open?
>>
how do you guys version your software and or what kind of scheme do you use for versions

im writing a c# desktop program to download anime and i want to get some sort of versioning for help in any sort of debugging from people i send it to to try out / some sort of notice that something changed, but the visual studio way of handling it is kind of shitty
>>
>>58204165
Start hitting the streets and grinding some pre-Shannon era computertonics and preclusion datametry. It's not easy so be warned; I've seen a few people lose their lives in this game, but I couldn't live any other way.
>>
>>58203200
look at the generated assembly for each function and compare the lengths and then look at all the opcodes and look up their resource use and time consumptions
>>
>>58204187
Depends on your lifecycle model.
I do an evolutionary delivery with major and minor milestones (critical parts of the program come on the first major milestone) and it goes like this

n.x.yy
n -> major milestone in the project
x -> version sent out for testing and reviewing, resets when n changes
y -> used for daily builds and smoke tests, each day it goes up, this is in order to know if too much time has elapsed since the project was last tested/reviewd

so for example 2.1.20 means it's the second major milestone, 20 days after it was last sent out for testing
>>
>>58204187
http://semver.org/
>>
>>58204270
Also in order for yy to make sense you need strict daily builds and smoke tests, it's pointless without them.
>>
>>58204187

http://stackoverflow.com/questions/3826580/what-rules-does-software-version-numbering-follow
>>
I changed my ff addon for 4chan images, try it /dpt/.
https://my.mixtape.moe/vdndnk.xpi
>>
>>58204295
>>58204282
>>58204270
so to be sure, you guys are saying you manually update the number yourself and don't use any automated numbering like the number of git commits or the day of the build or the number of builds
>>
Working on audio playback in my decentralized tv system with SDL mixer. Im also checking out those 16x2 screens so I can get some useful information on a screen.
>>
well, /dpt/?
>>58204471
>>
>>58204383
Yeah pretty much
>>
Setting up a React Redux project after using MobX for the past year. Dan Abramov is a gay nigger.
>>
>>58197507
>What are you working on, /g/?
Implementing garbage collection in C++ for shits and giggles
>>
File: 1464723576745.jpg (38KB, 362x346px) Image search: [Google]
1464723576745.jpg
38KB, 362x346px
>>58204892
>avoiding the only reason to use C++
>>
>>58205022
To be fair, garbage collection is fine when used appropriately. I assume he's not doing something stupid like global GC, but rather regional stuff, where you can totally avoid stop-the-world and whatnot.
>>
Thinking about how to make a data structure I can sort in place atomically. Tried googling and couldn't find something already done.
>>
>>58197615
>I don't know why anyone would regularly come here.

There's a reason why people regularly come here
>>
>>58205234
an array
>>
>>58205201
NonGC is the only reason to use C++
>>
>>58205276
If you can choose where it applies then I don't see the problem. You also retain the benefits of RAII as far as resource management goes, you just reduce costs of the actual memory management if you use GC where appropriate.

Obviously you should use simpler allocators if they work.
>>
File: 1404363077758.jpg (36KB, 481x394px) Image search: [Google]
1404363077758.jpg
36KB, 481x394px
>>58205242

No, vanilla arrays don't have that property unless I suppose you have affine types.

>In concurrent programming, an operation (or set of operations) is atomic, linearizable, indivisible or uninterruptible if it appears to the rest of the system to occur instantaneously.

https://en.wikipedia.org/wiki/Linearizability
>>
>>58205276
To be fair, it's much easier to make graphs and lock-free data structures with GC, so it would be interesting to have an optional one. Then again, there is https://github.com/hsutter/gcpp from Sutter, it kinda does this.
>>
>>58205299
You can make any sequence of operations atomic with a mutex as long as it's also transactional.

Now if you want it to be lock-free, that's different, and lock-free has a lot of different interpretations so you have to be more precise about what you want.
>>
>>58205288
The problem is if you're gonna use a GC then you shouldn't be using an awful language like C++
>>
>>58205369
Well it would obviously be nicer to actually check the regions with e.g. lifetimes or more generally universal quantification, neither of which are in C++.

If you mean a fully managed language then you're missing the point.
>>
>>58205355
>mutex

While true, I'm doing this to try to minimize contention. Performance will be in the shitter if I have to lock a mutex on every read. So yes, lock free, although blocking only on writes wouldn't horrible I'm guessing.

I know I'm probably going to have to use atomic pointers and just try to control visibility, but I'm not sure how to go around it. There might be a more clever way.
>>
File: clouds.png (607KB, 1024x819px) Image search: [Google]
clouds.png
607KB, 1024x819px
about to write a C++ library that reads from a certain file format and export relevant data from it as it is somewhat of a container format and I want to allow the user to specify things such as using SIMD for speedups and so on. What are some examples of some good well-designed libraries that you have used in C or C++ and what are some key practices I should take that makes you, the user, admire a libraries' interface.

Should the file be "mounted" and locked in or should the entire file just be loaded into memory? Should a prototype "visitor" object be used so the user just inherits from your ___visitor class and the entire file is just streamed in and calles the VisitFoo(...) VisitBar(...) functions of the user-provided visitor object?
>>
>>58205369
There are classes of concurrent problems which benefit massively from garbage collection. This has been a large part of why GC features have been entering the C++ ecosystem in the last few years.
>>
>>58205234
https://sydney.edu.au/engineering/it/~gramoli/doc/pubs/EuroPar2013.pdf
>>
>>58205526
>should the entire file just be loaded into memory
No
>>
>>58205478
Typically you spinlock on atomic instructions anyways so there's really not much difference. And you can simply make trying to acquire a mutex fail instead of blocking (and then spinlock yourself if necessary, or whatever).

Do you need this data structure for an application or is it the goal specifically? If the former, I would suggest looking at the big picture, because usually you have so many independent things you could be doing at once that trying to break them up any further is counterproductive. Just my two cents.
>>
>>58199528
Yep, that's the tricky part of compression, since the smallest datasize is 1 byte, you have to do some bit wizardry to save smaller than 1 byte data, without padding.
>>
File: souped.gif (109KB, 209x193px) Image search: [Google]
souped.gif
109KB, 209x193px
>>58205569
Should there be some FooReader object that takes a "Foovisitor" object and reads/iterates the entire file once. Basically a callback system so it just reads through a file once with a minimal buffer and it runs these callbacks for the appropriate data type.

It's just going to Read and never write so I figure this would be a good way to organize things but how about configuring compile-time stuff? Template trait-types that configure the FooReader? This is a lot of questions at once so id rather ask "what minimal libraries are organized the best to you" so I can just collect reference.
>>
>>58205555
I'm not sure if that will solve my problem the way I want, but I'll dig into that later. Even if I can't use it, it should still be worth the read. Thanks.

>>58205589
yeah, on things like CAS (although not all atomics are locking), but even there you only have to lock on write, no? Plus there is not a context switch (although I could use futexs, but w/e).

It IS for an application, but it is the ONLY shared mutable data, otherwise the problem would be 100% text book easy parallelism with a nice linear graph, so I figured I'd dump my effort into this. But the goal of building this whole thing anyway is to over engineer and learn, so even if it blows up it's not lost effort.
>>
>>58205536
Again, if you're going to use a GC you shouldn't be using an awful language like C++
>>
>>58205660
>It IS for an application, but it is the ONLY shared mutable data
I'm curious, how is sorting involved?

I can't really help with the specifics because in my field of interest (gamedev) you can get away with very little sharing. All I need is a deque in a ring buffer where the only thing that happens on other threads is taking things off one end. The deques are thread-local and the owning thread only ever touches the other end. It's pretty easy, which is nice.
>>
File: 1445286478183.jpg (647KB, 1520x1200px) Image search: [Google]
1445286478183.jpg
647KB, 1520x1200px
Learning Python and then gonna fuck around with tensor flow. Hoping to get some projects up and running to look good for internships next year.
>>
>>58205741
Gamedev sounds comfy. I love programming for performance's sake, even if I don't have to. I've heard of a lot of in house engines switching to job systems which I enjoyed learning about.

Like I said, I'm over-engineering something for it's own sake. I'm trying to build a server for a very specific purpose and trying not to use a traditional SQL database (that way I can statically compile it down to a single binary without dependencies). So all my writes are going into faux write-only log (I say faux because it's garbage collected after a certain time so it doesn't grow infinitely large over time). Then I have to track those updates on the actual program. There should only be a few hundred actual live transactions at a time, so it wont take long to rebuild history on restart. Now, I suppose I could do message passing and then just keep a sort in every thread as this whole thing is deterministic, but that seems a bit wasteful as all threads would be sort of "blocking" while they all follow along at home. Of course, they might be able to do this all in the time that an atomic write becomes visible due the latency to dirty caches but w/e.

Or in fewer words, I'm unemployed, bored, and I really need to find a job and change my hikikomori ways before I turn into Terry.
>>
>>58205745
noob here

What I would love to know is what projects do people make that help them get jobs like that? Because the only projects that I ever see are either the ones that people actually use and care about or the ones that you see in textbooks.

Are we talking /r/dailyprogrammer and "the programmer's idea book"? Are we talking about solutions to ProjectEuler/LeetKode problems or whatever that get posted to somebody's Github?

I don't get it.
>>
>>58205902
Ok, I spent an evening chatting with a relative who works at Google about this. Basically as far as projects go he recommended machine learning because it's an up and coming technology with big potential.

As far as specific projects, machine learning requires two things - a use and a way to get a lot of data. So a handwriting reader just needs a lot of writing samples and what they say in ASCII or whatever to train the model, which should eventually be able to read handwriting.

The project I'd put on my resume is one with an original use that I've come up with and implemented.

He told me to work through some common machine learning cases that have been done (eg a handwriting reader) that way when I come up with a case that hasn't been I can easily do it.
>>
>>58205902
>>58205999
Side note - other than that I think larger projects with a longer consistent dev time and a real use (so not a game) are best. The things you mentioned are practice and would help in technical interviews but certainly aren't what you'd show an interviewer as a personal project.

If you can perfect the program in a day it's probably not what you want.
>>
>>58205690
Why? Keep in mind this is just using a GC for a small set of resources, not for every resource acquired during the course of the program's lifetime.
>>
>>58205999
>He told me to work through some common machine learning cases that have been done (eg a handwriting reader) that way when I come up with a case that hasn't been I can easily do it.

Can you clarify this?
>>
>>58206060
The idea is to come up with an application for machine learning that hasn't been done before and gives you and easy method of acquiring a lot of data to train your model.

In the mean time practice simple applications for machine learning that have probably been done plenty of times just to familiarize yourself with the facets of machine learning. That way, once you come up with your original idea you can execute it well.
>>
>>58206084
So make a 4chan-post-bot?
>>
>>58206101
If it can use machine learning to shitpost, absolutely
>>
Is there a way to detect when native 4chan extension updates page?
>>
>>58206101
that sounds cool but if it were me who made it, i'd be embarrassed to use it on a resume
>>
>>58206157
yes
>>
>>58206164
How?
>>
>>58200897
>The body is irrelevant.
Umm
>>
Doing some JSON parsing and transformation and I've finally run up against the performance limit of chosen program architecture.

I'm doing transformations on a few gigs of JSON and its taking around 2-3 minutes.
Unfortunately my input stage is slow and I don't think I can speed it up without writing a whole lot of code. I might go a different intermediate format so that its faster when passing around the data to transform and avoid the object (de)serialization that I'm currently doing.
>>
>>58197507
4th year CS here

Currently doing an unpaid internship with a below 3.0 GPA. It's a really stupid phone app that's going to flop. There honestly isn't anything else out there for someone like me. I live in a city of around 500,000 in Canada. Also attending school online because I flunked out of physical university. How fucked am I?
>>
>>58206581
>he is c*nadian
you're pretty fucked
>>
File: triangle.png (132KB, 802x632px) Image search: [Google]
triangle.png
132KB, 802x632px
>It takes 886 loc to draw a triangle in Vulkan
I'm not even joking: https://vulkan-tutorial.com/code/hello_triangle.cpp .
Isn't it supposed to be a modern, simplified and streamlined OpenGL?
>>
>>58206765
>simplified and streamlined OpenGL
No. It's supposed to much more close to the metal, which means that you're going to be doing a lot of the driver used to take care of yourself.
If you're looking for a simpler interface and don't really care about the performance improvements, you should probably just keep using OpenGL.
>>
File: texture_on_square_colorized.png (59KB, 802x632px) Image search: [Google]
texture_on_square_colorized.png
59KB, 802x632px
>>58206765
It's 1441 just to draw a square with a texture on it: https://vulkan-tutorial.com/code/texture_mapping.cpp
And I thought OpenGL is dense.
>>
>>58206794
Well, that makes sense then.
>>
>>58200186
Hey meh, just wondering how are you so productive? I'm such a lazy ass fuck I feel I'm missing something in my brain or like it's some sort of trick.
>>
>>58197948
C#?
>>
Anyone know a database for lists of commonly necessary datasets

Sometimes I want to find the alphabet in array format properly listed, or a series of prime numbers, or maybe the days of the weeks and so on.

Being able to find them all in some website formatted correctly would be neat.

String[] daysOfMonth = {"JAN", "FEB"...
>>
>>58206795
isn't the readFile function broken? it first calls tellg() then seeks to 0 but wouldn't tellg() be at 0 after the file has been just opened?
>>
Given a set of objects in some sort of a container (don't think it matters) how would I ensure that each object/node has at least one other node connected to it and that you can reach any other node from any other particular node (whether directly or indirectly)?

what algorithm would I be looking for to connect them like so?
>>
>>58207009
Python has a number of string constants https://docs.python.org/2/library/string.html.
For number sequences OEIS is the best.
If I find them in some format but not quite what I need I just use python or something to reformat.
>>
>>58207036
The file is being opened with std::ios::ate which seeks to the end of the file.
>>
>>58207082
oh that makes sense, thanks for clearing that up
>>
should I learn c++, C# of F# as my first programming language? it's important that it's a microsoft shill language.
>>
>>58207231
C++ or C#.

I think C# is a great first language, but C++ is certainly fine, too.

Here's a good starter book:
http://csharpcourse.com/

Free PDF and code samples on page.

I wouldn't start your programming life with F#, or any other relatively unpopular languages, if only due to the fact that it's extremely different from the other languages you might want to soon learn.
>>
>>58198086
>PHP
>excellent language
No.

However, Java and Javascript serve their purpose well enough, but they're annoying to use.
>>
>>58207009
>String[] daysOfMonth = {"JAN", "FEB"
What the fuck?

In any case, some major languages include these in their standard libraries.
>>
File: fragezeichen yui.png (94KB, 396x395px) Image search: [Google]
fragezeichen yui.png
94KB, 396x395px
My solution to sequenced playback of musical notes is simply to do

->note_on();
->thread_sleep(note_length);
->note_off();


This works and sounds like music, but I wonder how time accurate it is. Is there anything else that music software does to ensure that notes are timed properly?
>>
>>58207278
thank you friend, I'm gonna try c#. I like singing in F# though.
>>
Watching the dong on second screen, finishing up UI lib on first one.
>>
>>58207438
I have a screen dedicated to watching dongs too.
>>
>>58207371
You probably should use a high-resolution timer, and calculate when you should wait to, instead of blindly hoping that you waited for the correct amount of time.
I don't know if whatever sleep function you're using may have spurious wakeups, or is interrupted by signals (which it probably is).
>>
>>58207371
How are you going to play polyphonic(or whatever it's called) melodies? Are you going to have a separate thread for every note currently playing? I think some kind of even loop would work better, something like
EventLoop loop;
loop.play(A, /*from*/ 1s, /*for*/3s);
loop.play(C, /*from*/ 2s, /*for*/1s);
Event e;
while (loop.get_event(&e)) {
switch(e.type()) {
START_NOTE: {
note_on(e.note());
break;
}
STOP_NOTE: {
note_off(e.note());
break;
}
}
}
>>
>>58207441

There's place in my heart for the one and only
>>
>>58207371
The timings are all up to the OS scheduler. Your thread is only guaranteed to sleep at least that amount of time; will often be a little longer. Expect to be off by even a few ms at times, which is definitely perceivable by human ears.
'Live' audio software (e.g. not a media player) runs a high-priority thread that never sleeps. Data is written non-stop to the output buffer. Input/instructions is collected up at regular intervals and sent to this thread in a non-blocking manner, and used to write the audio data.
>>
What is the best language to learn for freelance programming and why?
>>
>>58207516
It would probably be better to learn multiple languages and frameworks if you're looking to do that
>>
>>58207516
PHP or JS, because it's easy to find a contract.
>>
>>58207516
I'm gonna guess java, js, c#.
>>
>>58207516
java because website and android
php because wordpress

but... daily reminder that PHP a shit. A SHIT.
>In 2007 the interpreter had an integer overflow vulnerability. The fix started with if (size > INT_MAX) return NULL; and went downhill from there
http://use.perl.org/use.perl.org/_Aristotle/journal/33448.html
>>
>>58207516
Anything NOT functional should do laddie
>>
Anybody understand http requests? Is there a way from look at requests and responses to tell if you made a post on 4chan successfully?

I'm looking at requests and if you click post without solving captcha the POST returns sucess code 200 so I'm not sure how to tell if it actually worked.
>>
>>58207642
https://github.com/Floens/Clover
>>
File: test.png (2KB, 34x27px) Image search: [Google]
test.png
2KB, 34x27px
What PHP program is this? This is the icon
>>
>>58207691
PHPStorm?
>>
>>58207449
It's probably better just to & the waveforms if multiple notes are playing at once. Kinda like how additive synthesis works in general.
I'm not sure how you'd handle the separation or concurrent playback of multiple channels though.
>>
>>58207691
eclipse
>>
>>58207691
Looks like Eclipse
>>
>>58207673
Thanks.
I'm looking at ReplyHttpCall.java and the process method which seems to be what I want.
Its signature is Response response, String result but I can't figure out where these are coming from or what result is. I'll keep looking at it but if you understand it could you give me high level summary?
>>
>>58207743
>>58207739
>>58207702
thank you, I'll try both
>>
File: dependent if.png (5KB, 808x81px) Image search: [Google]
dependent if.png
5KB, 808x81px
question about idris
why isn't ifThenElse (in prelude) given a dependent type?

>>58207750
>>58207793
>>
File: projectdec28report.png (90KB, 1786x1057px) Image search: [Google]
projectdec28report.png
90KB, 1786x1057px
>>58197507
I'm working on my very own TUI library in C#.

I couldn't find a proper library for this so I started to develop my own,
>>
>>58207992
nigga, what do you have ncurses...
>Windows
...oh well.
>>
I'm in my office chilling and there's only two other people in today.
>>
>>58208027
Working in the Microsoft ecosystem has some drawbacks, yes.
>>
void
bitstrn(str, val, n)
size_t n;
char str[static n];
const void *val;
{
#ifdef __GNUC__
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
for (size_t i = 0; i < n; ++i)
#endif
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
for (size_t i = n; i--;)
#endif
#endif
for (size_t j = 8; j--;)
*str++ = (char []){'0','1'}[(_Bool)(((const unsigned char *)val)[i] & (1 << j))];
}


the good shit
>>
>>58207992
A FUCKING DO-WHILE LOOP
>>
>>58208073
>K&R C function declaration
>_Bool from C99
It's like you don't know what are you doing.
>Error: i is undefinded on non-gcc compiler
Yeah, you don't.
>>
>>58208073
https://en.wikipedia.org/wiki/SSE4#POPCNT_and_LZCNT
>>
>>58208127
using k&r style prototypes is the only way for a vla parameter to preceed its size argument, friend
obviously its undefined on non gnu compiler as endianness testing requires per compiler plumbing. its good if it wont compiler when endianness is unknown
>>
File: gcc.png (34KB, 799x154px) Image search: [Google]
gcc.png
34KB, 799x154px
What the fuck?
>>
>>58208172
compiler developers are sadists, this is well known
>>
>>58208172
>>
>>58208170
>>58208127
i mean the code is bit broke (vla sz should be n * CHAR_BIT and such, restrict qualifiers, &c) but that wasnt the point, honestly i was just giddy having typed out this monstrosity of obscure language use edge cases

its fixed now
>>
File: 1478122474520.png (15KB, 588x451px) Image search: [Google]
1478122474520.png
15KB, 588x451px
webscrapping is super easy with bs4 and requests

say, what other cool stuff I can do with them? I already made a 4chan downloader
>>
File: 1446307271627.png (171KB, 374x347px) Image search: [Google]
1446307271627.png
171KB, 374x347px
>>58197507
any recommended api for java based video recorder?
I'm working on OpenCV but anyone tried VLCJ or something else?
>>
>>58208239
scrape forums for amateur noods and secksy picks
>>
>>58208127
>>58208170

what im saying is you a scrub and basically ive brutally owned you by pointing out the flaws in your abortion of an argument
>>
>>58208203
What a cool guy.
>>
>>58208203

Those shoes look like they were made for women.
>>
New thread:

>>58208426
>>58208426
>>58208426
>>
>>58208410

>like shoes conform to your cis-bi gendered standards
Thread posts: 314
Thread images: 37


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