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

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

Thread replies: 255
Thread images: 34
File: fizzbuzz.jpg (111 KB, 1363x721) Image search: [Google]
fizzbuzz.jpg
111 KB, 1363x721
Brainfuck edition
>>
First for C
>>
OCaml is salvation. OCaml is truth. Convert, heathen!
>>
>>52335496
esoteric = fuccboi
>>
java
>>
File: 1451751832808.png (17 KB, 418x359) Image search: [Google]
1451751832808.png
17 KB, 418x359
>people in the last thread who didn't understand operator precendence
>in python of all languages
>>
File: 1452046560661.gif (6 KB, 133x63) Image search: [Google]
1452046560661.gif
6 KB, 133x63
Daily reminder to use Free Pascal. It's fast, portable and has a nice GUI builder.
Write once, compile anywhere!
http://www.freepascal.org/advantage.var
>>
File: 1452205269733.jpg (752 KB, 1920x1080) Image search: [Google]
1452205269733.jpg
752 KB, 1920x1080
>>
>>52335569
yeah, it does tick me off a bit when people try to sound smart when they clearly have no clue.
>>
>>52335602
Can you explain what the Units option in the installer is please? I don't want to enable it if I don't have to.
>>
>>52335603
really needs more enterprise tier challenges suitable for python/django and javaEE/spring environments.

if it doesn't involve an application context and an abstract factory it doesn't count
>>
>>52335617
It's the standard library.
Heavily recommended that you include it.
>>
>>52335694
Thanks.
>>
File: mascot-medal.jpg (20 KB, 300x450) Image search: [Google]
mascot-medal.jpg
20 KB, 300x450
>>52335496
A fizzbuzz in BF? You're officially /dpt/ autistic mascot.
>>
>>52335716
Also, don't forget to download Lazarus if you want to make GUI applications or want a pascal-tailored IDE.
>>
>>52335740
it's okay he got it from me
>>
File: 1445271545852.jpg (9 KB, 400x654) Image search: [Google]
1445271545852.jpg
9 KB, 400x654
I wrote my first scraper in python today, /dpt/ :3
>>
>>52335767
This. I'm not that autistic yet.

I am currently running a Mandelbrot pattern made in BF, and then after a Sierpinski triangle from an archive of BF programs
[ This program prints Sierpinski triangle on 80-column display. ]
>
+ +
+ +
[ < + +
+ +
+ + + +
> - ] >
+ + + + + + + +
[ >
+ + + +
< - ] >
> + + > > > + >
> > + <
< < < < < < < <
< [ - [ - > + <
] > [ - < + > > > . < < ] > > >
[ [
- > + +
+ + + +
+ + [ > + + + +
< - ] >
. < < [ - > + <
] + > [ - > + +
+ + + + + + + + < < + > ] > . [
- ] > ]
] + < < < [ - [
- > + < ] + > [
- < + > > > - [ - > + < ] + + >
[ - < - > ] < <
< ] < < < < ] + + + + + + + + +
+ . + + + . [ - ] < ] + + + + +
* * * * * M a d e * B y : * N Y Y R I K K I * 2 0 0 2 * * * * *
>>
>>52335780
was it less than a hundred lines?
>>
I do independent contract work for my boss on the side, and right now I'm working on:

1) A CRUD application for an access database, because access is too hard for the employees to learn

2) 15 variations of an excel dashboard to be used depending on different data sources, along with python scripts to parse csv files and import them properly

3) A pdf scraper

I don't know how much more of this I can take, guys
>>
>>52335843
Stop it anon. You'll damage your brain.
>>
>>52335602
It's slow, unportable, and powerless, but at least has a GUI builder!
>>
>>52335901
> slow
False
>unportable
False
>powerless
False.

Opinion discarded due to retardation.
>>
>>52335866
>>52335895
You forgot the image ):
>>
>>52335846
Yeah, it's pretty simple, like 20ish lines total, just a good exercise in learning requests and beautifulsoup
>>
how many lines of code can you write a day?

I'm talking about production quality code. Really struggling with getting down more than 200-300 lines.
>>
>>52335916
>slow
Benchmarkgames, it's 5x slower or worse than java.
>unportable
Look at the platforms supported. Definition of unportable.
>powerless
Compare with any modern language, even C++. It's like being stuck with C89. Couldn't be less powerful if it tried.

Shill harder next time.
>>
>>52335866
>A CRUD application
Dynamic, mobile-friendly, cloud-stored and with options for social media, I hope?
>>
>>52335961
With my busy days, I pump out about 100-200 lines a day, and they're spent mostly on memes
>>
>>52335971
>comparing multi threaded benchmarks to single threaded ones
I've already exposed your retardation, no need to embarrass yourself further.
>>
>>52335993
I compared everything with single-core. It's even worse with multicore, where java becomes over 20x faster. Keep embarrassing yourself though, shill.
>>
>>52335985
post code maymays
>>
>>52335961
It depends on the project. Some days I turn out only a few lines and sometimes a couple hundred to thousand.
>>
>>52336062
Over the past few weeks here:
>Brainfuck interpreter
>Ook! interpreter
>Bresenham's circle
>Meme triangle
>Meme swastika
>4chan post code executor
>4chan thread, threads, board images downloader
>4chan thread regex searcher
>4chan dubs & primes posts counter
Which one do you want to see m8?
>>
>>52335975
I said access, not mysql
>>
>>52336104
Oh forgot
>synacor VM implementation
>>
>>52335961
I always say its better to delete lines than create lines. That's why I've written negative lines of code every day for the past 20 years.
>>
>>52336104
meme triangle
>>
>>52336043
Why are you being intellectually dishonest?
>>
>>52335961
At work I can get out a few hundred a day, for shitty projects at home I can put out several thousand
>>
File: memetriangle.jpg (128 KB, 1067x535) Image search: [Google]
memetriangle.jpg
128 KB, 1067x535
>>52336175
>>
>>52335866
>Access Database

I'm so sorry... At least my boss let me pick any database I want. Heck, even the langauge. Heck, IM THE CTO since no one questions my tech decisions.
>>
File: mandelbrot.jpg (277 KB, 1041x441) Image search: [Google]
mandelbrot.jpg
277 KB, 1041x441
Dozing off, I'll leave this running over night. After this, I've got a Brainfuck Game of Life player
>>
>>52336181
Shilling belongs on >>>/b/
>>
Why do so many people here use python? There are so many better alternatives, the only reason to use python is if you're stupid and can't live without a library to do everything for you
>>
>>52336187
what range would you say you put on a working day if you had to guess?
100-300,300-600, 600-900 or 900+?
>>
>>52336237
>the only reason to use python is if you're stupid and can't live without a library to do everything for you
You just answered your own question.
>>
>>52336107
>windows server on Azure
>install Access on the server
>host an ASP.NET web API on server with connection to Access db
The cloud is always a solution, my friend.
>>
>>52336232
It is spouting falsehoods knowingly that belongs on >>>/b/.
>>
>>52336237
are you dumb? the libraries abstract common functionality, which is typically easy to implement on your own, but if you're building on top of that functionality, it helps to have the library so you can focus on the details of your own problem, rather than reinventing the wheel

also, it's quick to get programs up and running, so it suits the pacing of this board
>>
>>52336237
python is convenient, easy and quick

what is a better alternative? does it have better libraries? does the code look cleaner? is it quicker to write? is it better supported? No.

if you care about speed you're using the wrong tool.
>>
>>52335603
is this a roll? rolling, I guess.
>>
>>52336274
>does the code look cleaner? is it quicker to write? is it better supported?
Yes.
>>
What's fizzbuzz actually? I want to give it a shot.
>>
>>52336237
>Reinventing the wheel because IM HARD CORE
>import math? I write my own math module bitch.
>>
>>52336302
Fuck of faggot, filtered.
>>
>>52336302
The "Fizz-Buzz test" is an interview question designed to help filter out the 99.5% of programming job candidates who can't seem to program their way out of a wet paper bag. The text of the programming assignment is as follows:
>"Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”."
>>
>>52336240
On an average day I'd say probably around 300 lines.
>>
File: Sierpinski.jpg (29 KB, 707x551) Image search: [Google]
Sierpinski.jpg
29 KB, 707x551
Couldn't be bothered with mandelbrot
>>
>>52336302
for (i<=100) if i%3==0 print "fizz" else if i%5==0 print "buzz" else if i%15==0 print "fizzbuzz" else print i
>>
>>52336330
I actually googled it too right after posting, I'm going to try it out, seems easy enough.
>>
>>52336332
ok, I guess I'm not that bad after all.
>>
>>52336330
are they serious about that though?

99.5% seems pretty fucking high
>>
>>52336403
It's a meme, I wouldn't take it too seriously.
>>
>>52336349
Yes, it is basically the easiest possible programming test you could come up with. There is a single tricky point, which should be obvious to anyone who has half a brain.
>>
>>52336403
>reading comprehension
99.5% of programming job candidates who can't seem to program their way out of a wet paper bag
>>
>>52336347
Well, okay, you spoiled it a bit. I'm going to do it in VB because I'm a special snowflake, I assume no /g/entoomen here uses an ide made by microsoft. I had to use visual studio because of uni, now I manage 3 sites from home for a living.
>>
>>52336256
We actually use MS 365 in addition to having a physical server, so I could just open connections to a database hosted on there for every kind of operating system, but I think I'd rather cut my own dick off if given the choice
>>
>>52336446
holy christ fuck off
>>
>>52336403
99.5% is too high, but there are a surprising number of applicants who seem to think they, with no programming knowledge AT ALL, will pick it up on the job, because they are good with computers, or good with math, or because they are mentally deficient. Even worse if you work somewhere that doesn't do technical screening like this well.
>>
>>52336446
this:
>>52336456
>>
The head of my penis is about two times thicker than the shaft.
>>
>>52336482
That's what people in the trade call a mushroom.
>>
am looking over some source code with no comments, it's programming a board to do perform an arranged light display
 (define (blink)
(config-pin giod 12 pin-mode-out)
(config-pin giod 13 pin-mode-out)
(config-pin giod 14 pin-mode-out)
(config-pin giod 15 pin-mode-out)

can anyone decypher what giod stands for? I'm guessing it's the GPIO-output-pin identifier (pin 1, pin 2 etc) but I can't find anywhere referencing this
>>
>>52336303
If you're a hobbyist programmer, or a professional programmer writing code at home as a hobby, you shouldn't be using 3rd party libraries to do your work for you as that kind of defeats the point of having a hobby, no? If you don't enjoy the writing code part of programming, why are you programming without it being your job? I assume it's noone's job to make shitty python meme programs on /g/, at least.
>>
Wew lad

for (int i = 1; i <= 100; i++) {
if ((i % 3 != 0) && (i % 5 != 0)) {
std::cout << i;
} if (i % 3 == 0) {
std::cout << "Fizz";
} if (i % 5 == 0) {
std::cout << "Buzz";
}
std::cout << std::endl;

}
>>
>>52336482
My boyfriend's penis just gets bigger as it goes down.
>>
>>52336535
I remember when I made my first hello world, too! Don't worry buddy, you'll get better with time!
>>
>>52335961
I write one huge-ass line a day
>>
>>52336544
>performing 4 modulus calculations

It's shit.
>>
>>52336523
general input/output (something beginning with 'd')
>>
>>52336426
>reading comprehension
I didn't say of all programmers faggot
>>
>>52336544
you're doing it wrong LOL
>>
>>52336549
Yeah I bet it was fun importing that helloworld library
>>
>>52336566
destination? I think it is the pin identifier
>>
>>52336535
so let me get this straight: you're implying that there is no code that can be written in python that hasn't been written before?

And if not, then what is the better way of writing this previously unwritten bit of code:
1) Using well written and supported libraries that allow you to create this new and quite possibly successful program in a convenient way.
2) Rewriting this library first, and then spending a long time tuning it to make it as good as the already available version and then doing (1)

Silly you! Silly, stupid, cretinous idiot you! Of course doing (1) is better!
>>
>>52336609
Then why aren't you using purely C?
>>
>>52336562
I did it in a couple minutes. If you have an optimal solution feel free to post.

>>52336592
Well, I tested it before posting and it gives the correct answer.
>>
>>52336609
If you're writing release software (which you don't do in python) then sure, go ahead and use 3rd party libs. If you're programming as a hobby, why would you just import libraries instead of writing your own? So you can look at your program afterwards and go "Yeah, that's really cool, I don't know how it works but importing that library and writing 10 lines of my own code was really challenging and rewarding!"

It's even worse when these shitters post their stuff here expecting people to be impressed that they managed to type import a bunch of times
>>
>>52335603
rawl
>>
>>52336626
Because as I quite clearly mentioned, python provides a large number of well written libraries that let me get things done faster and more conveniently.

That was the whole point of that post. Read it again. Go on then son. Give it a go and then get back to me.
>>
Can we agree to write everything in Javascript and be done with it?
>>
>>52336649
your idiocy is tiring.

I don't like writing code that has already been written better by someone else. I write new code.

Which is better: spending your hobby programming new things or reinventing the wheel like you suggest?

Do you not understand?
>>
>>52336635
fizzbuzz x =
case (x `rem` 3, x `rem` 5) of
(0, 0) -> "FizzBuzz"
(0, _) -> "Fizz"
(_, 0) -> "Buzz"
(_, _) -> show x

main = mapM_ (putStrLn . fizzbuzz) [1..100]
>>
>>52336635
lol. this should be the correct output

     for(int i=1; i<101; i++){
if (i%15==0) std::cout << "fizzbuzz\n";
else if(i%3==0) std::cout << "fizz\n";
else if (i%5==0) std::cout << "buzz\n";
else std::cout << i << "\n";
}
>>
>>52336677
This language's syntax looks terrible.
Which functional language is this so that I can actively avoid it?
>>
>>52336654
>literally contradicting yourself this hard
Pythontards everyone!
>>
>>52336677
_ == 1

WOT
>>
>>52336694
Haskell. What don't you like about it?
>>
import fizzbuzz

fizzbuzz()
>>
>>52336707
(x, y) pattern-matches against 2 free variables.
(0, y) pattern-matches against 1 free variable as well as the value 0. Hence, (3, 5) doesn't match, but (0, -18) does, and will bind y to -18.
_ = don't care.
>>
>>52336566
>>52336605

we've done it, congrats guys
>>
File: Unbenannt.png (5 KB, 61x734) Image search: [Google]
Unbenannt.png
5 KB, 61x734
>>52335496
Rolling and
>that
for (int i = 1; i <= 100; i++)
if ((i % 3) == 0 )
if ((i%5)== 0)
Console.WriteLine("FizzBuzz");
else
Console.WriteLine("Fizz");
else
if ((i%5)== 0)
Console.WriteLine("Buzz");
else
Console.WriteLine(i);
>>
>>52336718
le symbols le hard to read xd
>>
>>52336729
ah I see how it works
>>
>>52336677
>Haskell

Well, I have learning haskell on my to-do list.

I thought of that solution too, just making two divisions. But I did it straight forwardly.

>>52336683
What? You don' need else m8. Mine check all conditionals (yeah, that's what else is for).

So if it's multiple of both 3 and 5 it outputs FizzBuzz.

http://ideone.com/Eu9FA2
>>
>>52336718
The names of what I assume to be standard functions mapM_ lead me to believe that they have some sort of arcane coding style.

Same with putStrLn. Clearly there is some sort of trickery in the language, possibly in the type system, that they seriously thought that "putStrLn" is better than "print".

I also hate how you have operators that look exactly like strings.
>>
unsigned char n, i;
for(i = 1; i < 101; i++) {
if(i % 3) {
n + 0x10;
}
if(i % 5) {
n++;
}
if(n & 0x11) {
printf("%s\n", "FizzBuzz");
} else if(n & 0x1) {
printf("%s\n", "Fizz");
} else if(n & 0x10) {
printf("%s\n", "Buzz");
} else {
printf("%d\n", i);
}
n = 0;
}
>>
>>52336753
oh I didn't see !=

carry on
>>
>it's a fizzbuzz thread

for fuck's sake
averaging two ints was better than this shit
>>
>>52336760
you know, I thought pretty much the exact same way before learning Haskell. The names are still sometimes ugly to look at but the semantics of the language are great and you can always just redefine the functions to a different name.
Oh, and the `rem` thing isn't an operator, the backticks turn it into an infix function.
>>
>>52336760
>The names of what I assume to be standard functions mapM_ lead me to believe that they have some sort of arcane coding style.
mapM_ is mapM that throws away the output. It's needed because main is a "procedure" (type IO ()).

>Same with putStrLn. Clearly there is some sort of trickery in the language, possibly in the type system, that they seriously thought that "putStrLn" is better than "print".
print works on more than strings. putStrLn is for "putting a string and starting a new line".

>I also hate how you have operators that look exactly like strings.
That's an artifact of the 4chan code tags. Any real Haskell syntax highlighting will give stuff in `` the same colour as any other operator.
>>
File: Naamloos.png (68 KB, 1920x1080) Image search: [Google]
Naamloos.png
68 KB, 1920x1080
Took me a while because I had to install visual studio to do it in vb as asshole anon spoiled it, but here it is. Simple as fuck. Am I Cisco-Certified now?
>>
>>52336753
you still goofd
>>
>>52335603
rolg
>>
>>52335603
Roll
>>
>>52336753
you can do it in the same amount of lines either way

    for(int i=1; i<101; i++){
if (i%3!=0 and i%5!=0) cout << i;
if(i%3==0) cout << "Fizz";
if (i%5==0) cout << "Buzz";
cout << '\n';
}
>>
File: 2199t6p.gif (345 KB, 173x270) Image search: [Google]
2199t6p.gif
345 KB, 173x270
>>52335603
k
>>
>>52336820
int avg1(int x, int y) {
int sum = (x / 2) + (y / 2);
int mod = (x % 2) + (y % 2);
int nsig = (sum < 0) - (sum > 0);
return sum + nsig * (nsig == mod) + mod / 2;
}

int avg2(int x, int y) {
int sum = (x / 2) + (y / 2);
int mod = (x % 2) + (y % 2);
sum -= (sum > 0) * (mod == -1);
sum += (sum < 0) * (mod == 1);
return sum + mod/2;
}

int32_t avg3(int32_t x, int32_t y) {
return ((int64_t)x+y)/2;
}

int avg4(int a, int b)
{
if ((a < 0 && b > 0) || (a > 0 && b < 0))
return (a+b)/2;
else
return a/2 + b/2 + (a%2 + b%2)/2;
}

int avg5(int a, int b)
{
int t = (unsigned)(a^b)>>((8*sizeof(int))-1);
return ((a/2+b/2+(a%2+b%2)/2)*!t) | (t*(((t*a)+b)/2));
}

int avg6(const int x, const int y)
{
if ((x > 0) == (y < 0))
return (x + y) / 2;
return x/2 + y/2 + (x%2 & y%2);
}
>>
>>52336334
for what purpose?
>>
I think I have found the joy of programming.
For the first time in years, I am truly happy.
>>
>>52336675
>written better by someone else
Your problem, and every python import babby's, is precisely this. "Someone else has already done it better than me so I won't even try, I'll just use their code". The reason they can do it better than you is because you're a fucking baby and won't even try to do it yourself. Why not try and write your own that's better than the existing ones? Do you think that if a python library exists it's perfect code and noone can write a better version? The only case of this is in really trivial stuff, which is stupid to use libraries for anyway when you can do it yourself in a couple of minutes.

With your mindset you may as well just copy and paste (Literally no different to importing libraries) all your code from someone on the internet who's already done it, because why bother reinventing the wheel right? Chances are with python if you're making something someone else has already done it before, and probably "better than you can" as you say.

Imagine a big solid stone wheel, you would be content to use that because it gets the job done, it's not like you could make a better one yourself right? And besides, why reinvent the wheel? Someone else looks at it and goes "I could just use this, or I could make a better version" and then creates a nice lightweight spoked wheel that works far better than your shitty copy+paste stone wheel

This is the difference between a python "programmer" and a programmer
>>
>>52336968
what is it?
>>
>>52336869
Huh?

>>52336913
Oh, I think you couldn't do that with the older standards. It stuck back then, I guess.
>>
File: splash_logo.png (90 KB, 450x300) Image search: [Google]
splash_logo.png
90 KB, 450x300
>>52336977
It's Pascal.
>>
import std.stdio;
import std.conv;

void main(string[] args)
{
foreach(int i; 1 .. 101)
{
writeln(i % 15 == 0 ? "Fizzbuzz" : i % 5 == 0 ? "Buzz" : i % 3 == 0 ? "Fizz" : to!string(i));
}
}

:^)
>>
>>52336968
happy little integers...
>>
>>52337005
I laughed.
>>
>>52337019
nice meme
>>
>>52336237
>prototyping
>automation scripts
>best analytical tools for medium sized data sets
>>
>>52337018
>perpetuating the python meme
>>
whats the best ide and why is it vim
>>
>>52337057
>NOT WRITING MACHINE CODE IN MICROSOFT WORD
>>
>>52337018
>uses a one-liner
>uses Allman style
why tho
>>
>>52337050
toppest kek
>>
>>52337053
u wot
>>52337083
>one-liner
cuz
>Allman
cuz
>>
>>52337069
>>
File: 1447396292065.jpg (126 KB, 1440x1080) Image search: [Google]
1447396292065.jpg
126 KB, 1440x1080
>>52337057
>vim is so great because there's no bloat
>just let me install these 50 different plugins to turn it into a poor-man's IDE with tons of bloat and conflicts and shit
>>
File: 1418158514594.jpg (45 KB, 711x273) Image search: [Google]
1418158514594.jpg
45 KB, 711x273
>>52337069
>not painting Skylake microcode on oil canvas, taking a Polaroid, and scanning the picture to get it on your computer
>>
>>52337118
>use visual studio
>still install 50 plugins
no conflicts tho
>>
>>52335569
python users are dumb as shit pisskids
>>
>>52335603
rolling
>>
>>52336743
now make it print Fizz for each 3 in a number and Buzz for each 5 in a number:

13 should now print Fizz, 33 FizzFizzFizz, 55 BuzzBuzzBuzz, 15 FizzBuzzBuzz... you get the idea.
>>
File: 1444612076641.jpg (1 MB, 1462x1462) Image search: [Google]
1444612076641.jpg
1 MB, 1462x1462
>>52337140
>not cutting a long sheet of paper such that when it's put through a shredder and recorded, the audio data compressed to MP3 320 kbps produces an AutoHotKey script to design an integrated circuit in Verilog
>>
>>52337159
>best argument here obviously
>>
This is going to sound retarded, but I can't seem to get Google to cooperate.

In C#, I want to get a character from the alphabet using an int.

How do I get "C" from "3"?

I was going to just make a list with each letter, but that seemed lazy and needless, not going to learn anything doing that.
>>
File: da0.png (9 KB, 273x312) Image search: [Google]
da0.png
9 KB, 273x312
>mfw readme files are 100 pages long
>>
>>52337223
http://www.asciitable.com/
>>
File: asciifull.gif (27 KB, 715x488) Image search: [Google]
asciifull.gif
27 KB, 715x488
>>52337223

>>52337224
>reading readme files
>>
I learned C++ in 2005. I believe the books I were using and the classes I took were using the 98 standard. Well in the last couple weeks I've started browsing /g/ and I've noticed people mentioning the 03, 11, and 14 standards.

How useful is my 98 knowledge now? What's changed? What are the big improvements?
Does C++ still let you get close to the hardware like before?

Also how efficient is octave?

I posted this in an old thread and didn't see the answer before it disappeared.
>>
>>52337223
use the ascii table.

for (int i = 0; i < str.length; i++)  
Console.Write(((int)str[i]).ToString());
>>
>>52337242
I linked you that presentation by Herb Sutter
Watch it
>>
>>52337242
This book by the creator of C++ covers the 11 standard http://mazonka.com/shared/Straustrup4th.pdf
>>
So what are all the abstract data types (not graphs of any type)?
I know there are lists, sets, maps, multisets, and muiltimaps. I'm sure there are more, but they seem less useful.
>>
>>52337223
you have to map the letters to numbers somehow, might as well use a list
>>
>>52337118
>>52337141
>>52337057
>not using notepad++ with a couple of keyboard shortcuts
I've written an entire 3D video game in notepad++, what's your excuse?
>>
>>52337224
>integrated search by keyword

or

 less readme | grep keyword 
>>
>>52337269
Deque, of which stack and queue are special cases
>>
>>52337242
I've been interviewing lately and everyone is asking questions about C++11. They're not necessarily using it, and we weren't using it at my last company, but it's probably a good thing to be aware of it at least.

The "old" C++ is still 90% of what's important anyway.
>>
File: 1448870372218.gif (3 MB, 550x309) Image search: [Google]
1448870372218.gif
3 MB, 550x309
>>52337271
>probably using something super high-level like C
>>
>>52337242
>Also how efficient is octave?
It's okay. Doing vector and matrix ops is where it shines. Anything else it performs like utter dogshit, just like MATLAB.
>>
>>52337280
deque is love
>>
>>52337280
They are data structues; just special cases of a list (ordered, repeats possible, singular value).
>>
>>52337297
>superhigh level
>C

pick one
>>
what's a good resource to get to grips with concurrency, preferably with a good theoretical background?
>>
>>52337326
I was 'avin a giggle
>>
>>52335603
fuck
>>
>>52337242
https://arch.b4k.co/g/thread/52331088/#52334870
>>
>>52337336
Concurrency is just about the least theoretical part of programming

It's really easy on paper, the hard part is getting it to play nice in real life
>>
Any decent dictionary API's?

Coming up with a password generator, and I want to be able to generate actual memorable words instead of just random characters.
>>
>>52337407
/etc/words or just a list of words downloaded from somewhere, stupud JS cuck.
>>
>>52337407
/usr/share/dict/words
>>
>>52337430
>Linux
>Implying

>>52337419
>JS
>Implying
>>
>>52337446
cuck
>>
>>52335603
rolling with the times
>>
>>52335936
you do understand that this is like the fizzbuzz of python right
>>
>>52335961
maybe a thousand max
haven't written much of anything in the past month though
lost the fire that I had going for a few months there
it'll come back in time, I just need something interesting to make
>>
>>52336974
> being this autistic
>>
>>52336974
>wall of text
>on 4chan

leave
>>
>>52337523
>A handful of lines is a "wall of text"
Sounds about right for a python baby, I'm sure you're only used to seeing a couple of lines of "import" in your texts

>>52337500
Good to see you've realised I'm right python baby
>>
Does anyone have any clue at all about this?

I'm looking all over. Ideally I'd love a JSON text file just filled up with a whole stack of English words, but I'd settle for anything honestly.
>>
>>52337259
I didn't see it. Did you link this one? This is what looked the most relevant on google.

https://channel9.msdn.com/Events/GoingNative/GoingNative-2012/C-11-VC-11-and-Beyond

Looks like he has a bunch of good videos. I'm going to check that out.

>>52337268
I had been meaning to dig through the Straustrup book on 98 but never got around to finding a copy. Thanks.

>>52337296
>The "old" C++ is still 90% of what's important anyway.
Glad to hear that. I haven't written anything since 2008 and it was this: http://sourceforge.net/projects/kdircbot/files/?source=navbar

I looked it up and someone else is using the name kdbot. There are tutorials and everything. I was like holy shit people are using it? I am so let down.

>>52337298
So if I built a digital signal processing equalizer that did lots of floating point multiply and add operations on individual components of a vector representing a PCM *.wav file, it would run pretty well? I'm trying to test something out before I design something for a FPGA and build it on that.
>>
what's the best 2d game engine

>inb4 I'm a major faggot
>>
>>52337588
SDL for 2d stuff but check out SFML as well
>>
>>52337588
>>>/vg/agdg

yes, you are.
>>
>>52337588
Unity
>>
>>52337242
C++11 has a lot of neat features that can make your life easier, but your C++98 knowledge will still mostly be applicable
>>
>>52337354
Thanks. Why couldn't I find it in the archive that 4chan links to. Last time I browsed 4chan we didn't have an archive or a catalog. I feel like a caveman.
>>
>>52337271
Why wouldn't you use an IDE for that?
>>
>>52337546
>it would run pretty well?
Well I did a class in uni last semester on dsp and we used MATLAB and everything was fairly quick. Very easy to code as well. So I'd say yeah. Just get in the practice of writing idiomatic MATLAB code. I'm going through some code right now where the person wrote MATLAB like it was C. It performs like dogshit.
>>
>>52337546
https://www.youtube.com/watch?v=xnqTKD8uD64
>>
File: g_in_a_nutshell.png (46 KB, 536x536) Image search: [Google]
g_in_a_nutshell.png
46 KB, 536x536
What's the next step after completing codeacedemy python course?

Just start doing projects?
>>
>>52337706
Kill yourself because you just wasted 5 hours of your life that you'll never get back
>>
>>52337701
What an autist. Seriously.
>>
>>52337612
SFML is best avoided.
>>
>>52337759
Herb is a great speaker, what are you on about
>>
>>52337706
>python
Oh boy, you fell for the meme.

Just import some libraries and post your epic generic 4chan image scraper #943285 here, that's about all you can do in python
>>
>>52337682
Cool. I'm digging through the Octave manual now. I came across a part while scanning through it where it says to add to vectors just do A+B instead of adding each element because it will optimize it for you using some special assembly instructions. I assume that's what you're talking about. Any other hints?

>>52337701
Thanks.
>>
>>52337336
Watch Stanford's CS107 Lectures 14-18 to get an idea of what's going on at the hardware level, and then just look up the documentation for the multithreading library in whatever language you're using.

It starts 25 minutes in to lecture 14, but it's taught in C, so if you haven't been exposed to it before you might get a little lost.
>>
>>52337763
What's bad about it?
>>
>when you're stuck for hours on one tiny little thing that should be super simple and should just work the way it is
fucking pisses me off
>>
>>52337706
>memecademy

you fell for it
>>
>>52337784
It's slow and can only be linked against in very specific circumstances, while also being available on less platforms than SDL. SFML1's last version even couldn't work on AMD hardware and that was never fixed - shows you the kind of people developing it.
>>
File: 1452085432800.jpg (56 KB, 1600x1064) Image search: [Google]
1452085432800.jpg
56 KB, 1600x1064
>>52337005
I like Pascal's logo but pls stop shilling already.
>>
>>52337706
>python
kill yourself
>>
>>52337808
Take a break
>>
>>52337808
jack off or something
>>
>>52337774
>I assume that's what you're talking about
Yeah, MATLAB (and Octave I'd assume) use special vector and matrix libraries (LAPACK) to optimize.
You can also do arithmetic between a every element in a vector and scalar using vector .op scalar notation. There is a lot more to it, but I haven't found any good guides on writing performant idiomatic code. Most should complete in less than a minute either way.
>>
>>52336446
you went from innocent to asshat real fast
>>
>>52335603
has anyone actually finished all of these challenges? care to post your solutions in a zip or public repository.
>>
>>52337955
I guarantee you can find an example of each one on github
>>
>>52337828
What's going on with Pascal? Is someone bringing it back? The first programming language I learned was Pascal in high school. My teacher had some old Borland compiler and the version of Pascal we used didn't even support OOP.

So from what I gather C++ 14 now supports threads. Is this right? I don't have to use boost any more to do threads?
>>
>>52338012
Yes. Many of the new features of the standard library originated with Boost. Of course, being in the standard library rather than Boost has made them significantly better to use.
>>
File: T2qJSgU.png (43 KB, 1176x408) Image search: [Google]
T2qJSgU.png
43 KB, 1176x408
Literally why?

It just seems to hate me using a text file in my "Resources" folder.

It obviously exists, and I set the build action to "Embedded resource" but it still isn't happy with me trying to use it.
>>
>>52338012
C++11 had threads and mutexes and the like. But MSVC doesn't support threads, at least not yet.
>>
File: needful.jpg (10 KB, 193x262) Image search: [Google]
needful.jpg
10 KB, 193x262
making a 4chan image downloader,
wget `sed -n '"$i"p' < files.tmp`

Something is fucked here and I'm not good enoguh at bash to know what. we're trying to pull a file url stored on line $i from the files.tmp list, and wget it. it's inside a while loop. I'm just fucking up my arguments.

please do the needful
>>
>>52338056
Sweet I never actually got around to learning multitasking because there wasn't a standard way of doing it.

>>52338074
What's the go to method for multitasking in MSVC then?

I'm so glad virtual machines have pci pass through now. I can run gaymen on a vm now and stay in Linux/BSD all day. I can't wait until save up for a PC to replace my broken one.
>>
>opengl tutorial uses a shitload of third party libraries
nigger, I'm here to learn opengl, not another library I'll probably never use.
Faggot.
>>
File: SqAsqlq.gif (2 MB, 400x248) Image search: [Google]
SqAsqlq.gif
2 MB, 400x248
>>52337808
>tfw a refactor works on the first try
>>
>>52338119
nvm im retarded using wget -i instead thanks for nothing shitlords
>>
>>52337745
>>52337768
>>52337816
>>52337829
These are all me.
>>
>>52338156
Boost. It has full threads, coroutines, and now fibers.
>>
>>52338207
>being this wrong
>>
>>52335603
Rolling for later
>>
>>52338303
Too easy. Rerolling.
>>
>>52338074
MSVC supports threads out the ass, what the hell are you talking about
I implemented an entire semester's worth of programming assignments in C++ for my class that focused on multithreaded programming and data structures.

In fact I dicked around just last week and wrote a min/max function using sleepsort() using pure C++11.
>>
>>52337706
>males
y-yeah
>>
File: Screenshot (13).png (134 KB, 1920x1080) Image search: [Google]
Screenshot (13).png
134 KB, 1920x1080
>>52338322
Didn't upload picture for some reason
>>
>>52338334
Why is your editor screaming at you?
>>
>>52335603
rolling
>>
>>52338324
post tits or GTFO
>>
>>52338342
What? It's not.
I put a breakpoint at the end because it's the easiest way to stop the program in the IDE.
>>
>>52335603
rolll
>>
>>52338008
thanks, ill take a look after ive had a serious attempt at each one.
>>
>>52338296
>not getting the joke

Autism.
>>
>>52338320
Are you fucking serious. Rerolling once more otherwise I'm just picking myself
>>
>>52338357
>>>/b/
>>
>>52338062
What's the actual filename of the resource?
>>
>>52338378
this isn't /brit/ lad
>>
>>52338324
Pls b in dondon??
>>
>>52337706
Bitch, if I had ideas I wouldn't be giving them to other people I'd be programming them myself.
>>
>>52335603
Roll
>>
>>52338324
Are you a grill? Mind if I warm my meat in you?
>>
>>52337706
learn django framework
>>
>>52335603
r0lll
>>
>>52338391
alri?!
>>
>>52335603
roll fuckos
>>
>>52338163
Unless you want to figuratively pull your fingernails out, you at least need GLEW and one of GLFW/SDL2/SFML etc.
>>
>>52338462
GLEW is deprecated and SFML is cancer incarnate.
>>
>>52338462
That's the thing, I use SDL2, but the nigger from the tutorial uses GLFW+ some obscure libraries nobody cares about.

Why not use SDL2? It does everything.
>>
>>52338438
what you doing up at this time you muggy git
>>
File: 1444519564740.png (280 B, 5x8) Image search: [Google]
1444519564740.png
280 B, 5x8
>>52338517
I'm actually one of the leaves, but for some reason I have been banned from /int/
>>
>>52338485
Hand-tuned opengl is much faster. You should use SDL to open the context and opengl to handle the actual rendering.
>>
>>52338542
>being a leaf
there's your reason

probably rubbish at programming as well
>>
>>52338587
"no"
>>
File: crying umaru.jpg (36 KB, 600x337) Image search: [Google]
crying umaru.jpg
36 KB, 600x337
Why does learning opengl have to be so hard?
Nearly every tutorial is written by idiots who cobble together dozens of libraries and have no idea what the fuck they're doing.
Thread replies: 255
Thread images: 34

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

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.