[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: 335
Thread images: 38

File: DPT.png (389KB, 934x1000px) Image search: [Google]
DPT.png
389KB, 934x1000px
Old thread: >>55623304

What are you working on /g/?
>>
How much do you personally earn annually with your functional programming job?
>>
File: doge the freg.png (60KB, 500x371px) Image search: [Google]
doge the freg.png
60KB, 500x371px
Trying to understand time
>>
File: ?.png (7KB, 120x120px) Image search: [Google]
?.png
7KB, 120x120px
>>55632242
how do i decide on a good github nickname?

my name is kinda odd (european name), and i don't know if that might be a problem
>>
>>55632242
Fuck your stupid anime shit
>>
>>55632275
http://pimp.name/hacker-name-generator/
>>
>>55632275
Make sure to use something that contains "feminist", "sjw" or something related to "girls can code". If you're really on to it, make it a mixture of all of them.
>>
>>55632275
why should it be a problem? what does "european name" even mean?
>>
>>55632275
SpreadEm69
>>
>>55632268
I make 70k at entry level, but I'm OOP familia
>>
>>55632319
His name is probably something like Jaroslaw Kczkckztzt
>>
>>55632319
His name is Adolf. So it gets blocked by neopets
>>
>>55632319
what if my name has "Stalin Stevens" ? or any other dictator name as first name?

not even kidding here
>>
>>55632351
My last name is close to that, it even includes polish letters, feels bad m8.
>>
>>55632358
what about it? unless your name is literally Adolf Heitler or Mao Zheng-zum-Dum LongDong you are fine.
>>
>>55632242

moving on from my days of using PajeetLang
>>
File: 2016-07-18_08-56-13.webm (1MB, 514x606px) Image search: [Google]
2016-07-18_08-56-13.webm
1MB, 514x606px
>>55632242
Nothing useful.

>>55632337
I'll try that.

I dicked around with a GUI for it, because I am really really fucking bored.

I guess I could add multiple image generation algorithms.

Webm related.
>>
File: python-hilter1.jpg (52KB, 654x480px) Image search: [Google]
python-hilter1.jpg
52KB, 654x480px
>>55632408
>tfw my name is Adolf Heitler
>>
>>55632480
post the images generated
>>
File: img_1920x1080.png (556KB, 1920x1080px) Image search: [Google]
img_1920x1080.png
556KB, 1920x1080px
>>55632523
They look like this, more or less.

Based on another anon's method from last thread: >>55630520

I could create various generation algorithms and just have a selector to choose what kind of image to generate.
>>
>>55632548
>I could create various generation algorithms and just have a selector to choose what kind of image to generate.
how cool is that?
>>
>>55632408
what about Mao ZeLong Wang?
>>
>>55632548
Also, it says max image size for this one is 16MB, but it only came out 556KB because of PNG mechanics.

Anyone know how to actually estimate?

I guess I won't be able to really know unless I take the average optimization based on the usual runs with a particular image generation algorithm...because I'm pretty sure a PNG could technically be 8 bytes per pixel.
>>
>>55632480
I was tempted to add some generation code myself but I'm really fucking awful at maths, it's the reason I stopped with gamedev.

I'm just dicking around with learning SQL now for an idea I had, not that I'll actually take my idea anywhere because I absolutely despise front end web dev, so I'll probably just write the backend then throw it in the pile of other things I made that now gather dust.

Here's my code for making gifs with ImageMagick (it just wraps the existing random image gen code)

Write("Insert size as space seperated integers X Y: ");
int[] inputSize = Array.ConvertAll(ReadLine().Split(' '), int.Parse);
Write("Insert number of frames: ");
int inputFrames = int.Parse(ReadLine());
Random rand = new Random();
Array vals = Enum.GetValues(typeof(KnownColor));
using (MagickImageCollection collection = new MagickImageCollection())
{
for (int f = 0; f < inputFrames; f++)
{
using (Bitmap bmp = new Bitmap(inputSize[0], inputSize[1]))
{
for (int i = 0; i < inputSize[0]; i++)
for (int j = 0; j < inputSize[1]; j++)
bmp.SetPixel(i, j, Color.FromKnownColor((KnownColor)vals.GetValue(rand.Next(vals.Length))));
collection.Add(new MagickImage(bmp));
collection[f].AnimationDelay = 5;
}
}
collection.Optimize();
collection.Write($@"C:\TestGif_{inputSize[0]}_{inputSize[1]}.gif");
}


you just need to grab "Magick.NET-Q16-AnyCPU" from NuGet and you're good to go.
>>
>>55632616
So that Magick library is just shoving multiple bitmaps into a .gif?

>
collection.Optimze();

lol

I suppose you could go without if you don't want your code to take the extra step.

I might play with that library for a bit. Gotta love NuGet.
>>
File: 1468850701783.png (6KB, 1920x1080px) Image search: [Google]
1468850701783.png
6KB, 1920x1080px
>>55632548
>not optimizing png
>>
>>55632649
As far as I know yeah, it's an image manipulation library so it does a whole heap of stuff.

Never used it before, but I was bored so I quickly grabbed it and Intellisense'd my way through that quick messy implementation.

As far as I can tell the
.Optimize()
call does a fair bit of work, there's also
.OptimizePlus()
which tries to remove frames and the like where it can if it improves the end quality.

If I were able to even understand (let alone implement) something like Perlin noise I'd probably take the time out to improve that little thing and make it do more advanced stuff, but I had an idea for a replacement for "up-for-grabs.net" which wasn't so lazy and had an actual backend. But I really don't like front end web stuff so I'm struggling to find the motivation to bother, instead I sit here writing garbage that just gets Ctrl+A -> Del'd at the end of the day.

It's either that or I spend more time shitposting here.
>>
I got a Java Software Engineer job all I do is write Arrays to go through large list of company information and putting information in software
>>
File: gif_640x480x60 frames.gif (2MB, 640x480px) Image search: [Google]
gif_640x480x60 frames.gif
2MB, 640x480px
>>55632650
I will need to figure out how to do this programmatically.

Thank you for optimizing my PNG.

>>55632719
Welp, I did 60 frames at 640x480 and it took quite a while to create, about 30 seconds.

Pic related.
>>
File: difference.png (13KB, 1920x1080px) Image search: [Google]
difference.png
13KB, 1920x1080px
>>55632650
>>
>>55632781
I'd probably multithread the frames and wrap the
.Optimize()
call in a Stopwatch to see how much time it's eating up.
>>
File: gif_640x480x60 frames.gif (2MB, 640x480px) Image search: [Google]
gif_640x480x60 frames.gif
2MB, 640x480px
>>55632819
I'll do that.

Here's an epilepsy simulator. I suppose I could force color compliments to be extra trippy.
>>
>>55632650
>>55632841
Also, some values are transparent.

Do you know which of the
KnownColor
enum values it is?
>>
>>55632817
but you can't see the difference in naked eye.

what's the point?
>>
Anyone here use Android Studio? Anyone here program for Android purely using the SDK?
Thinking of going SDK only because AS sucks ASS.

But I really wanted something where I could just download a project from github and run gradle and pop out the APK.
>>
>>55632867
>But I really wanted something where I could just download a project from github and run gradle and pop out the APK.
Then just use the SDK via command line.
>>
>>55632841
>>55632781

You could also try passing it through ffmpeg instead if you want to get more into less space. There are a few ffmpeg wrappers for .NET I think.
>>
>>55632867
Android programming is hard there is so much stuff to learn
>>
File: 1468795976864.jpg (475KB, 852x973px) Image search: [Google]
1468795976864.jpg
475KB, 852x973px
Post most anime girls holding programming books, please.
>>
>>55632867
Why not use C# and Unity to make Android apps?

Shit's easy as hell.
>>
>>55632841
looks like a ZX spectrum loading screen
>>
File: qrelixC.png (227KB, 2611x855px) Image search: [Google]
qrelixC.png
227KB, 2611x855px
>fucktons of tedious UI code for 10 lines of image generation algorithm
>probably doing file-size maths horribly wrong
>can already think of 40 things to improve the UX with hints and unobtrusive notifications

So this is why we only do backend in /dpt/. Less work, less stress, less perfectionism-flavored autism.

>>55632867
>>55632928
Or use Xamarin. It's free now.
>>
>>55632928
Because I hate that non-native glue crap, I don't even mind Java. I'm going to do more of a social app that doesn't need a lot of fancy shit, just going to make calls to a rest api.
>>
>>55632957
>Same line attributes
>No MVVM
I rate you 3/10 gimme my image code back.

But no really why did you bother putting that much directly into a timesink? I can't stand WPF anymore, too much effort to get stuff done. I just write Libs and then hook em up to a CLI for testing before throwing em in the garbage.
>>
what gives you guys motivation to program? I am at a point where I am pretty decent but I lose all interest when I encounter difficult problems and then really difficult programs and get errors and bugs all over the place which makes me not want to program because I don't just get it naturally and requires so much effort
>>
>>55632986
>why did you bother putting that much directly into a timesink
Bored at work.

I need a cute dominatrix to force me to learn proper MVVM. I really want to use it, but I can't be assed to go out of my way and learn it. I'm stuck in old WinForms methodology.
>>
>>55632997
Nothing, which is why I'm sat here shitposting instead of working on my project.

For most everyone else it's a paycheck or autism.
>>
>>55633005
For me it's that juicy paycheck autism wombo
>>
>>55632997
If you use a good IDE, 75% of your problems are solved automatically, or at least the solutions are suggested with one-click fixes.
>>
>>55633021
If you're good, 75% of the problems don't even show up.
>>
>>55633003
MVVMLight, I never actually took the time out to learn MVVM properly because I got sick of WPF.

Web apps are where it's at, I just need to find a hobbyist frontend dev to team up with.
>>
>>55633021
I do use a good IDE Netbeans but I still encounter the weirdest fucking errors doing anything complex with large databases or networking server side
>>
>>55633051
>MVVMLight
Interesting, I have PluralSight so I'll look into this.

I suppose that'll help me with transition into Xamarin and MVC.NET stuff.
>>
>>55633084
MVVMLight is mainly just for disposing of all the boilerplate that goes into writing MVVM stuff.

Unfortunately doesn't really avoid the problem of having to actually understand the application of MVVM to a problem, but hey it's a start.
>>
File: should have been a weebm.gif (3MB, 240x239px) Image search: [Google]
should have been a weebm.gif
3MB, 240x239px
Cats.
>>
>>55633493
Cats are much better than black women and women in general
>>
How do I get into programming? What do different languages do?
>>
thinking of writing pseudo type signatures in the comments above my Scheme functions like
; function-name :: (Num) -> (Num)

like what Haskell looks like
so I can remember what a function does when I read it months/years later

will people make fun of me if they read my code and see this? will I get bullied by other lispers?
>>
>>55632242
Someone that is hired either as junior or senior programmer.

Is there any task that I can test my skills on ? I mean, I think I can program (C++, OOP and many others stuff I know) but I am not sure if I am able to do something that would make me employable.

I need some sort of advice. What is the daily / weekly / monthly task that is achievable by junior developers ?
>>
>>55633567
Learn Haskell
>>
>>55633621
>>55633567
This. Haskell will guarantee your employment.
>>
how could i improve this?

#include <iostream>
#include <cstdlib>
#include <string>
#include <windows.h>

using namespace std;

int main()
{
HANDLE h = GetStdHandle( STD_OUTPUT_HANDLE );
SetConsoleTextAttribute(h,FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE );
while (true)
{
string y ;
cin >> y ;
SetConsoleTextAttribute(h,FOREGROUND_GREEN | FOREGROUND_INTENSITY );
cout << ">newfag" << endl;
SetConsoleTextAttribute(h,FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE );




}

system("PAUSE");
return 0;
}
>>
>>55633638
stop using seeples
>>
>>55633535

I dunno, man. I'm pretty fond of black women.
>>
>>55633684
You'll grow out of it
>>
>>55633638
make a backup, delete windows and install any linux distro
now import it and come again
>>
File: diversity_studio.png (62KB, 1210x763px) Image search: [Google]
diversity_studio.png
62KB, 1210x763px
>download Visual Studio
>see this
>a single white person
>it's a tranny

When will this meme end?
>>
>>55633803
Jesus fucking Christ. Stop browsing /pol/, it's killing all your braincells.
>>
>>55633803
Bowl cut squad
>>
>>55633638
write a wrapper library for windows.h

>>55633803
Did you not see the comparison between the NASA google doodle and that actual NASA team?
>>
>>55633877
No, please post it so I can have a giggle
>>
File: googledoodle.jpg (310KB, 710x648px) Image search: [Google]
googledoodle.jpg
310KB, 710x648px
>>55633877
>>55633944
I'm guessing this one.

I like how they add "color" to everything to be politically correct, like smearing dogshit on white bedsheets.
>>
File: juno nasa google.jpg (61KB, 960x560px) Image search: [Google]
juno nasa google.jpg
61KB, 960x560px
>>55633638
Can someone explain to me why C programmers avoid enums like the plague?

>>55633944
pic
apparently they'd need 18 people in order for it to be accurate to have just 1 non-wihite
>>
>>55634080
>Can someone explain to me why C programmers avoid enums like the plague?

Microsoft monkeys know no better.
>>
>>55633803
Jesus fucking christ that's bad. I honestly feel sorry for white males just getting into this field. It's hard enough to find a worthwhile job even without the "righteous" discrimination agenda that's being pushed these days.
>>
>>55633803
These are many black peoples.

However, why the hell would you use VS or windows in general? It's inferior.
>>
File: c_for_cucks.png (200KB, 840x1050px) Image search: [Google]
c_for_cucks.png
200KB, 840x1050px
>>55633803
>>
File: logoLarge.gif (10KB, 354x520px) Image search: [Google]
logoLarge.gif
10KB, 354x520px
is learning pic related worth it?
>>
>>55633760
kek
>>
>>55634227
lol no
>>
>>55634243
why? it's a interpreted gui framework that works on every single platform. that is very attractive by itself
>>
Can anyone lend a helping hand? :-)

No sound plays like this, with the line commented out. If I uncomment the line, both sounds play. What gives?

static void playSound() {
try {
AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(new File("C:\\Users\\John\\workspace\\ConsoleTimer\\gong.wav").getAbsoluteFile());

Clip clip = AudioSystem.getClip();
clip.open(audioInputStream);
clip.start();

//Toolkit.getDefaultToolkit().beep();

} catch(Exception ex) {
System.out.println("Error with playing sound.");

ex.printStackTrace();
}
}
>>
File: 1452530670374.jpg (248KB, 2560x1600px) Image search: [Google]
1452530670374.jpg
248KB, 2560x1600px
>>55634227
>tcl
*tickles*

But seriously, tk is pretty good, tcl not so.
>>
what should I learn to start a career in software development without going to school?
>>
>>55634338
Pick a language, find a textbook online, and go through it front to back. Learn git, create a GitHub account, and start creating stuff.

Read a new book about programming, databases, etc. every month. Apply what you learn from the books to your personal projects.

Try to make the projects meaningful so you don't lose interest. Find a local programming club and make connections.
>>
How would /dpt go about implementing a neural network or genetic algorithm to find the lowest rarity by drop rate and highest attack tempering recipes using this information ?

http://www.oocities.org/xo_pitseleh/lom2.html

Assuming I've also got the details of the actual calculations and mechanics as they are in the game.
>>
>>55634372
>neural network or genetic algorithm to find the lowest rarity by drop rate and highest attack tempering recipes using this information ?
Tired of these memer kids.
>>
>>55634372
>neural network or genetic algorithm
calm down with the memes

those aren't necessary here
>>
>>55634440

Oh, assuming I've already got a method for testing the fitness of a recipe what would you recommend here to generate new recipes?
>>
>>55632306
>Fire Saint
I kinda like it, but it repeats itself quite often and uses "fire" a lot.
>>
What's the best programming language?
>>
>>55632958
Holy shit go learn Retrofit! It will make REST apis your bitch.
>>
File: baka_big.png (2MB, 2000x2000px) Image search: [Google]
baka_big.png
2MB, 2000x2000px
>>55634518
Can you not?
>>
>>55634518
What's the best real world language?
>>
>>55634518
Haskell
>>
>>55634518
yes
>>
>>55634518
The one the hacker 4Chan uses
>>
>>55634518
z80 assembly
>>
>>55634573
requesting that gif of the news anchor asking "Who is this 4Chan"
>>
>>55634543
All of the languages exist in the real world.

Whatcha mean?
>>
>>55634484

Apparently the 2 calling genetic algorithms / neural networks to solve this problem "Memes" cannot suggest alternatives.

<3
>>
File: 1409873479189.gif (1MB, 250x333px) Image search: [Google]
1409873479189.gif
1MB, 250x333px
>>55634589
>>
File: 4chan.gif (1MB, 250x333px) Image search: [Google]
4chan.gif
1MB, 250x333px
>>55634589
It's literally the first result on google.
>>
>>55634607
>>55634613
Don't tell me that hacker got out?
>>
File: 1455297682398.gif (4MB, 444x250px) Image search: [Google]
1455297682398.gif
4MB, 444x250px
>>55634518
>gif related
>>
What is the best way to learn memory in C++ , I can barely understand pointers and that stuff is there a really good book or tutorial on this and also on the win32 api?
>>
>>55634372
Use the neet library on hackage: https://hackage.haskell.org/package/neet

It's a genetic algorithm for neural networks.
>>
>>55634656
>literally has a NEET library
you can't make this shit up
>>
>>55634653
>can barely understand pointers
>trying to grasp C++

It's common knowledge you should know C before dwelling into C++. A C++ programmer who doesn't know C is a joke.
>>
>>55633720

Probably not.
>>
>>55634523
thanks m80, looks interesting
>>
>>55632957
>free

W E W
E
W
>>
>>55634718
there are actual boards for turd lovers like you, not sure why you pick this place but then i'm already making a mistake in replying to you
>>
>>55633803

Oh so white people get triggered too when they're not adequately represented in media. Wow really makes you think.
>>
>>55632957

Try doing both backend and frontend, and then the client thinks they know database structure better than you.
>>
>>55634706
you can know C++ without knowing much of C

The fact that your code and software will probably be utterly shit it's another story though.
>>
>>55634723
It's free as in free beer AND free as in freedom.
>>
>>55634706
>>55634765
not him, but really?

I heard it's better to learn C++ first because doing it the other way around (C to C++) gives you bad habits that are hard to shake off
>>
tfw no ideas for projects and dying inside
>>
>>55634781
>gives you bad habits that are hard to shake off
I would say this is an argument for learning C first.
>>
>>55634781
Idiomatic C++ is completely different from C code.

In C, everything is dynamically allocated manually and every non-trivial structure is a pointer.
>>
>>55634794
make an ideas thread on /biz/, they usually know some things
>>
>>55634742
>there are actual boards for turd lovers like you

which boards?
>>
>>55634794
>Go to a freelancing website
>Search the jobs over there
>Pick an interesting one
>Do it
>>
>>55634656

Haskell is a bit too slow for my liking on this problem.

I'm looking at each chromosome being represented as a little less than 2 bytes (7 bits to be exact) and each resulting containing anywhere from 90 to 180 chromosomes.
>>
>>55634781
I'd say it's the other way around. I've seen too much messes of inheritance designs that just scream "I've never used structs or function pointers in C".

>>55634809
b8
>>
>>55634818
/hc/
/s/
/sci/
/an/
take your pick
>>
>>55634794
Make a programming project idea generator.
>>
>>55634818
Offtopic question, for how long have you been posting here? Just wondering
>>
>>55634824

This. I'm always shocked when I read some turd say they have no ideas when you can get paid to implement someone else's ideas, and even use your own creativity to make that idea even better.
>>
>>55634901
Since yesterday
>>
>>55634911
I am asking seriously ;_;
>>
>>55634194
Probably because, despite being a mountainous, buggy piece of shit, Visual Studio is still the best IDE/Debugger out there. Also because Windows is most popular for consumer products.
>>
>>55634653
There's not that much to get although they're normally explained like shit. You need to stop thinking of pointers as extensions of another object (even though that's how they're used). At the most basic pointers are just like every other type/object; they require X amount of memory and store a value in that memory. The value just happens to be a memory address. That's literally all they are and nothing more complicated than that.

A good analogy are windows shortcuts. The shortcut isn't the actual program you're launching; its just a reference to the program. The shortcut itself though still requires some harddrive space to be stored, although normally much less than the actual program does. Just replace shortcut with pointer and program to object and that's essentially what's going on when you use pointers.
>>
>>55634917
cuntface has been here for about 6 months, I wish cuntface would leave now as it has worn out its welcome by a long shot
>>
>>55634928
>Visual Studio is still the best IDE/Debugger out there
Lol what?

>Also because Windows is most popular for consumer products
And?
>>
>>55634928
>Visual Studio is still the best IDE/Debugger out there
This.

Every time I go to use another IDE, I always end up going back to VS. That debugger makes my dick moist.
>>
>>55634948
>Lol what?
Do you want me to repeat myself, or what? I'm mostly talking about C/C++ development, if that clarifies anything. Name a better one. The only thing I can think of is a very, very "riced" Emacs (https://tuhdo.github.io/c-ide.html) but I'd still argue that VS is more complete and usable.

>And? [Why does it matter that Windows is the most popular for consumer products?]
Because, fucktard, that's a big reason to develop on Windows and use Visual Studio. You have a bigger audience for your product.

Let me summarize your response: "Huh? Wut?" It was very fucking persuasive.
>>
>>55635055
>I'm mostly talking about C/C++ development
Same, the VS debugger was one of the worst I ever tried.

>Name a better one
Everything other than it.

>Because, fucktard, that's a big reason to develop on Windows and use Visual Studio. You have a bigger audience for your product.
You are supposed to program for your personal pleasure. And if you want to release something for windows just use mingw or whatever
>>
>>55635098
>linuxfag is upset that visual studio is industry standard
>>
>>55635131
It is not though.
>>
>>55634841

I'm thinking I might generate a large population and then sort / breed + mutate them according to fitness. Discarding most of the least fit members and breeding / mutating the rest.

When the population is under a certain number of members from discarding. I'll test the deviance between the most fit member and least fit member against the desired fitness level. If the deviance is within a certain threshold my result is the most fit member. If it isn't within that threshold I'll seed it with more randomly generated members up to the initial population level.
>>
>>55635098
>The VS debugger was one of the worst I ever tried.
Nice anecdote. Tell me about your superior debugger(s) that you use.
>Everything other than [VS's debugger is better than it]
Great job being persuasive, again. You can't even name a single one.
>You are supposed to program for your personal pleasure.
Not necessarily. Some people need to make a living, even if they agree with the principles of FOSS (which I do, I even run Debian stable as my primary OS, you fuckwit).
>if you want to release something for windows just use mingw or whatever
This is an option, but has nothing to do with what we were talking about. VS and Windows are still attractive to develop on for the reasons previously given.

You are such a fucking moron, I can't believe it.
>>
>>55635143
He is sort of right though. It's standard for businesses who do the absolute shit type of B2B CRUD """programming""". Anyone who actually gives a fuck is using C++, Python or other good free languages.
>>
>>55635143
>being this in denial
did you give in to the gnu meme or something
Notice how many windows software comes with the visual studio redistributable(if they didnt statically link it)
>>
>>55635098
>You are supposed to program for your personal pleasure.
Some people have a job anon.
>>
>>55635192
are you associating visual studio with .net (C#,VB,F#) because it's a standard environment for C++
>>
>>55635185
>Great job being persuasive, again. You can't even name a single one.
As I said, every single one, even gdb by itself, same for every gdb frontend.

>Not necessarily
You and people like you are the reason why the world is shit.

>>55635199
I do not use windows software anymore. But your argument does not say much really.

>>55635192
We are talking about IDEs, not languages.
>>
>>55635229
>We are talking about IDEs, not languages.
Fair enough but in winshit land, things usually go the way of C#/.NET
>>
>>55635229
>he gave in too hard to the gnu meme
>>
>>55635244
GNU is not a meme you shitposter.
>>
>>55635261
It's not a meme it's a GNU/meme
>>
Let's face it Microsoft is a problem. It's got too much sway and too much of a monopoly in the business / home computer area. There really needs to be legal actions taken to cut it down and make more room for innovation / competition from the "Little guys" that they buyout or destroy.
>>
>>55635261
why are you getting upset that visual studio is an industry standard.
why are you so militantly defending "your way" on an anonymous image board

Someone could make a damn 5 hour video about how to work visual studio's debugger and you'd still try and militantly defend your way.

You can even use visual studio or visual studio code for linux dev it's just an environment to make code. You can even plug in clang or some other compiler into it.

http://programmers.stackexchange.com/questions/5972/what-are-the-most-popular-ides-per-language
>>
>>55635313
welcome to /g/, circa 2008
or even slashdot and similar sites, circa 1998
>>
>>55635313
>>55635329

>this company is a success and has software that has a huge market share
>why dont people use vim like meeeee I hate microsoft
>we should file a lawsuit for "being too good"
>>
>>55635321
>why are you getting upset
I am not.

>that visual studio is an industry standard.
Because it is not?

>why are you so militantly defending "your way" on an anonymous image board
What?

>http://programmers.stackexchange.com/questions/5972/what-are-the-most-popular-ides-per-language
I do not get what this has to do with anything.
Moreover the first reply said "VIM".
>>
>>55635358
>Moreover the first reply said "VIM".

read

you're cherry picking for your dumb argument now
>>
>>55635369
I don't really understand why you linked me to this page anyway.
>>
http://poal.me/7qqaud
>>
>>55635229
>[every debugger is better than Visual Studio's]
K. Definitely disagree. "What can be asserted without evidence can be dismissed without evidence"
>You and people like you are the reason why the world is shit.
Sorry that I'm not at Stallman-levels of hacktivism, ass hat. I support the FOSS community as much as I can, and I hope that a better debugger comes out for GNU/Linux. As it stands, they're all shittier than the already shitty VS. When I make something, I want the best tools for the job, and that happens to be VS in my experience at at this moment in time. Programming tools in general are unpolished and lacking, though.
>>
>>55635350

Translation
>The company abused shady business practices and deals to lock the market into using mostly one supplier.
> With the power they gained from above they continuously use it to either absorb or destroy anything that becomes threatening or any innovation that doesn't come from them.

The problem isn't that they are a "Industry standard". It is that there is little to no such thing as competition.

>>55635329
I'm actually circa 2006 or so if you choose to explain the issue that way.
>>
>>55635467
typo
"... in my experience AND at this moment in time..."*
>>
>>55634901

2 whole months.
>>
>>55635467
> they're all shittier than the already shitty VS
gdb
valgrind
>>
>>55635467
>What can be asserted without evidence can be dismissed without evidence
"Visual Studio is still the best IDE/Debugger out there" <-- great evidence, huh?

>and I hope that a better debugger comes out for GNU/Linux
It's name is gdb.

>When I make something, I want the best tools for the job
Yet you select the worst.
>>
>>55635490
I'm sure that it's much more than that. At least 6 months.
>>
Anyone here have some knowledge about reverse engineering with radare2? When disassembling a win32 executable it outputs a few thousand instructions and says the rest is filled with the hex value FF. When i use objdump for disassembling it doesn't show the FF values in addition of having an additional offset of 10000 in hex. Should i continue with objdump instead of radare2?

Also there are still some bad instructions in the objdump disassembly, can i safely ignore those when reverse engineering?
>>
what makes the vs debugger so "shitty"

its been nothing but good to me.
the auto/locals/watch list and the immediate window.
being able to edit variables on the fly and switch between hex and dec display mode and unwinding my stack to jump to any point on the callstack and picking any thread to trace and keeping track of memory allocations and finding out which function is eating up the most time or allocating the most stack.

what makes gdb so holy.

You can use the gdb bugger on visual studio too you know
>>
>>55635505

OSGTP has been around for a rather long time.. Most of us who have been on /g for years use anonymous tags.
>>
>>55635532
>OSGTP has been around for a rather long time
Here is the thing, I am asking because I do not remember any trip like that from the past, only for the last few months that I returned to /g/ after about 1-2 years break.
>>
File: gamecode.png (86KB, 1600x900px) Image search: [Google]
gamecode.png
86KB, 1600x900px
How can I format the code for printing out my inventory so that it lines up properly in Python 3.

elif command == "I" or command == "i":
inv_counter = 0
print ("\nid Name \t Discription \t Attack \t Deffense \t Health\n")
for item in self.player.invintory:
print("%d: %s" % (inv_counter, item[0]))
inv_counter = 1 + inv_counter

>>
>>55635473
>I'm actually circa 2006 or so if you choose to explain the issue that way.
Honestly anon, people are the problem. Cutting them down to size has been tried already, but as long as Tardcopter Smith and his wife's son keep buying winshit, there's not much point complaining, it's like getting mad at people for drinking coke then complaining about type2 diabetes. Just look at them and laugh and feel smug and superior like the rest of us.
>>
>>55635557
>OSGTP

I know it's been at least a year. I remember the tag from back in 2015 when that one guy kept posting this every thread

N I G G E R
I
G
G
E
R
>>
>>55635628
>OSGTP
>back in 2015
But 4chan's 18+
>>
>>55635639

I'm sorry for being 8 years over the minimum.
>>
>>55635639
He's probably some 45 year old retard, they're usually the types who get turned on by sheboons because they've gone round the block a few times and normal human women don't do it any more. Kind of like bestiality in mature ladies.
>>
Hey everyone. I am playing with pointers in c++. I don't really understand the point of pointers. Whats something that I can do with pointers that is helpful or useful?
>>
>>55635603
these spelling errors gave me cancer
>>
>>55635658
He didn't ask you
>>
>>55635498
>great evidence, huh?
I suppose it's a subjective argument we're having. I have used GDB quite a bit, and I know it has basically all the same features as Visual Studio, but I feel that it's far less intuitive, even with a frontend. I suppose with enough time and use, it could be just as intuitive for others. Feel free to use what's most comfortable to you. Congrats on somewhat persuading me.

>>55635528
>what makes the vs debugger so "shitty"
It's slow as fuck, a resource hog, and shits itself when you do anything remotely large or complicated AKA it's unstable as fuck.
>>
Finally got ghc-mod working.
No more endless atom error popups
>>
>>55635696
>tripfag pretending to be a fag pretending to be a tripfag
Amazing. Have a (you) for being so lonely
>>
File: 1466329334062.jpg (24KB, 258x263px) Image search: [Google]
1466329334062.jpg
24KB, 258x263px
>>55635730
>tripfag
>>
File: tmp_26187-tatsv2-1847324208.png (2MB, 1920x1080px) Image search: [Google]
tmp_26187-tatsv2-1847324208.png
2MB, 1920x1080px
>>55635683
Sorry coding drunk and I'm dyslexic.
>>
>>55635696

The (you) "But 4chan's 18+" would imply he was..

>>55635603
https://pypi.python.org/pypi/tabulate
>>
>>55635717
>It's slow as fuck, a resource hog, and shits itself when you do anything remotely large or complicated AKA it's unstable as fuck.
literally none of these things have ever happened to me but these same things depend on so many user-related variables considering there are much more satisfied people with the debugger than otherwise.

Visual Studio debugger and WinDBG have been such a defacto in reverse engineering malware but you can have your testimony of visual studio's debugger
>>
>>55635760
Thanks
>>
Which one is favored?

String[] months = new String[12];

>months[0] = "January";
>months[11] = "December";

OR

String[] months = new String[13];

>months[1] = "January";
>months[12] = "December";
>>
>>55635810
char months[][] = {
"January", "Febuary...
>>
File: PhD in Incompetence.png (125KB, 813x600px) Image search: [Google]
PhD in Incompetence.png
125KB, 813x600px
>>55635810
I honestly cannot believe you're asking this question.
Please go back to compsci university and stay there.
>>
>Go into an interview
>Okay you have to make an entire library with all these different functions dealing with all these networking specifics
>Finish about half of it
>Interviewer tells me my code is shit and to never come back
>>
>>55635852
Post code or enjoy several >rekt
>>
>>55635746
>implying I don't know it's you
Keep trying, we can all see through it.
>>
>>55635852
If this happens again, tell them you need to use the toilet on the way out then take a shit in the basin and smear it on the mirrors.
>>
>>55635852

Never code libraries in interviews. A lot of places will take the code from the interview use it in production and not give you the job to get free work.
>>
>>55635904
anon, the company isn't going to suffer, just the poor janitor who's going to have to clean your shit, he didn't deserve this
>>
>>55635827
It'd be funnier if it worked.

>>55635832
>asking about standards is somehow wrong
>>
>>55632917
>私、Cになります!
>>
>>55635505

Okay, I lied, it's been 3 months.
>>
I love, and hate template metaprogramming.
>>
>>55635953
Change languages
>>
>>55635918
You never get over an hour.
Anything a nervous guy in an unfamiliar PC can do in an hour could be done by one of their guys in half that time.
>>
>>55635752
>posting mucha art in black and white
you mother fucker
>>
>>55633611
Just use Haskell already.
>>
>>55635962
I'm thinking about getting it tatted on my left side rib cage so I made it black and white
>>
>>55635925
it does work, C is just inconsistent about stack allocated char arrays initializers.

char *months[] = {
>>
>>55635940
underrated post
>>
>>55635918
>>55635852
This.

Also read this guy's blog
http://www.daedtech.com/my-candidate-description/
>>
>>55633611
>will people make fun of me if they read my code and see this? will I get bullied by other lispers?
Yes. Common Lisp has its own standard syntax for type declarations. CL programmers will bully you for using Scheme, and then bully you for declaring your types as a crude form of documentation instead of writing actual docstrings, and then they'll lecture you for thinking in terms of types in the first place, because Lisp programmers consider static typing a premature optimization. And then when they've thoroughly ruined you they'll go back to their mind palaces to practice tea ceremonies with their tulpas.
>>
>>55635925

It can work and be useful..

char* months[2][12] = {
{"January", "Febuary", "March", "April", "May", "June", "July", "August",
"September", "October", "Nevember", "December"},
{"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}
};
>>
>>55632242

I'm trying to parse the javascript from a website into python

This website stores objects in a giant array with dictionaries full of dictionaries full of list objects, but appears to be pretty much syntax compatible with Python except for a few minor differences

I paste this giant block of shit into my python editor, but all it gives me is "syntax error"

How do I figure out what the syntax error is?
>>
>>55635918
>>55636039
It was for 35 an hour I had to do it for technical part
>>
>>55636068
At this point, why wouldn't you just use the index + 1 as the month number?
>>
File: 1466357136698.jpg (213KB, 853x910px) Image search: [Google]
1466357136698.jpg
213KB, 853x910px
>>55636064
>static typing
>a premature optimization
>>
>>55636064
Methods REQUIRE you to specify the types in order to dispatch (unless you use eql dispatching but that is haram)
>>
>>55636084

You have to convert index + 1 to the equivalent ascii / unicode output every time you wish to get the numeric date output. It requires a tiny bit of extra processing (Doesn't matter in this trivial case).

Basically if you use index + 1 you should store the results into a lookup table and only do it one time at the start of the program.
>>
>want to make a shitty webserver for my router
>know Go
>router is MIPS 32b, Go doesn't support it
>look at the router itself
>luci + uhttpd
>luci is written in lua
guess it's time to learn lua, then...

>>55635557
I now remember, OSGTP is not his original name, it was OneSlowGTP, he changed it a while ago
>>
where can i find C++ jobs
>>
>>55636190
Protip: You can't.
>>
>>55636190
there are none it's all Java
>>
>>55636189
>it was OneSlowGTP
Oh, I think I remember him then.
>>
>>55636164
That's trivial tho.
i+1 + '0'
>>
File: whyyyy.png (17KB, 741x356px) Image search: [Google]
whyyyy.png
17KB, 741x356px
Hey guys so I have been trying to work on a function to read a txt file and then store names and rank (int) into an structure. so far I have manage to read a line of the file and store it in "char" type of the structure, but I have trouble separating the data
more info in >>>/adv/17368164
>>
>>55636240
>asking /adv/ for programming advice
ayy
I like this anon. Don't bully him too much guise.
>>
>>55636220
next time, just google the tripcode: Ju67JuF6jBe
there are things like http://foolz.fireden.net/g/last/50/39157498/ showing that he's clearly a dumb rich kid
>>
>>55636211
>>55636202
why are there so many java and C# jobs when i never see java and C# software on desktop
>>
>>55635810
CS noobs haven't learned yet that the mappings between bit patterns and numbers are arbitrary. The designers of C and Java are CS noobs.
>>
>>55636190

http://www.monster.com/jobs/q-cdeveloper-jobs.aspx

Basically the same places you'd look for other jobs.

>>55636233

You're assuming a certain type of character encoding.
>>
>>55636269
They're ghost jobs created by Sun and Microsoft to give off the impressions that the languages are popular and used in the industry.
>>
>>55636294
The first 127 characters of the ascii standard are duplicated in all other encodings to maintain universal compatibility.

This will work even on backwards shit like shift-jis
>>
>>55636299
Why wouldn't Ghost Jobs be about Swift?
>>
>>55636266
>rich

I'm still using a 3570k, buddy. Not rich at all.
>>
>>55632242
why doesnt this C program work?

#include <stdio.h>

int main()
{
int number;

printf ("Pick a number, 1 - 3 being the correct numbers but any should do. ");
scanf ("%d\n", &number);

switch ( number ) {
case 1:/*note colon not semi colon*/
printf ("this is 1");
break;

case 2:
printf ("this is 2");
break;

case 3:
printf ("another number");
break;

default:
printf ("this is catch all");
break;
}
}


it compiles with gcc without error but when i select a number it just hangs indefinitely
>>
>>55634781
People always complain about "bad habits" but if you honestly are so broken that you can't "shake bad habits" then I don't know how anyone can expect you to write good code in the first place.
However I think learning C++ first would be an absolute nightmare, C is a lot easier to wrap your head around and definitely will help you UNDERSTAND C++.
>>
>>55636326

Yet again you're assuming the use of Ascii. I said it was a trivial example. What happens when your text representation is unicode or some exotic in house standard?
>>
>>55636363
put a printf outside the switch and see if it's getting there
>>
>>55636363
Because of the new line in scanf.
>>
>>55636395
Why would my date number be in some bizarre encoding?
>>
>>55636395
People that act like EBDIC are relevant are only holding back progress and making it more difficult to create new standards.
>>
>>55636413

Unicode Bizarre?

As for the second one.. I've seen some really stupid shit in code bases.
>>
>>55636407
it wasnt

>>55636411
oh shit thank you
>>
>>55636294
>You're assuming a certain type of character encoding.
No, you do not. The C standard demands this to work.

>>55636413
>>55636437
You both are retarded.
>>
>>55636506
NO U
>>
>>55636262
thanks ;w;
>>
>>55636539
>>>/reddit/
>>
In Python, I have a really complex variable saved as a string. It's basically like

"[fuck, bitch, {"nigga":6969,"cunt":420,"kike":{"shit":"cockandballs"}"}]"


but way longer longer

All I want to do is save its value to a variable

I don't really give a fuck it it's not considered "safe"
>>
>>55636262
i thought that was explicitly a purpose of dpt is that not acceptable here?
>>
>>55636506

So you're saying the C standard demands that all of my string representations and outputs are ascii?

I'm glad that <locale.h> doesn't exist then.
>>
>>55636571
eval()
>>
>>55636590
>So you're saying the C standard demands that all of my string representations and outputs are ascii?
No, where did I say anything like that?
Learn to read fucker.
>>
>>55636544
don't worry cutie *slaps cute butt* ;o
>>
>>55634505
>R0gue J4ck
>Better watch your back if you gonna mess with the J4ck
>>
>>55636240
Consult your textbook, senpai.
>>
>cali
>looking up internships with C++
>they're all in the bay area
>all the jobs/internships here in LA are for some app or startup that wants some fancy new website front end or backend using javascipt and node.js or some shit
>>
>>55636601

You've lost touch with your argument to the point of just hurling insults. Seriously anon you might want to take a in depth look at your thinking patterns to fix your issues.
>>
>>55636595

didn't work
>>
>>55636665
You claim I said things that I have not said. Seriously, learn to read before whining next time.
>>
File: ss+(2016-07-18+at+09.29.24).png (75KB, 670x527px) Image search: [Google]
ss+(2016-07-18+at+09.29.24).png
75KB, 670x527px
>>55636590
Directly from the C standard.
In both the source and execution basic character sets, the value of each character after 0 in the above list of decimal digits shall be one greater than the value of the previous. 
>>
>>55636687

You're unintelligent or autistic to the point that realizing the posted example doesn't have to be represented as a standard "Char" character flies complete over your head. The storage type can be of any encoding. Your little "Trivial" hack breaks on other encoding methods.
>>
>>55636754
('0' + n) to get the n'th digit character isn't a hack, is standard conforming, and is widely accepted as reasonable and correct by any well-versed C programmer.
>>
>>55636754
I do not think that you understand what you are saying or how C works at all.
>>
File: pic18.jpg (433KB, 2048x1536px) Image search: [Google]
pic18.jpg
433KB, 2048x1536px
>>55633567
it doesn't matter what they do. just pick one and start. in fact let me do it for you, it's gonna be Python. You're gonna learn Python. You can learn enough to start messing around in a week. A fucking week from now you can know enough programming to make web apps or desktop apps or automation scripts. A week.
Just think of it.

Here are some links:

>http://learnpythonthehardway.org/book/
>https://automatetheboringstuff.com/
>https://www.youtube.com/watch?v=nwjAHQERL08&index=1&list=PLGLfVvz_LVvTn3cK5e6LjhgGiSeVlIRwt
>https://mva.microsoft.com/en-US/training-courses/introduction-to-programming-with-python-8360?l=lqhuMxFz_8904984382
>https://mva.microsoft.com/en-US/training-courses/beginning-web-sites-with-python-and-flask-8677?l=sNshpAH1_8604984382
>https://www.youtube.com/playlist?list=PLA955A8F9A95378CE

Go.
>>
>>55635603
I saved this is my wallpaper.
>>
>>55636909
>>http://learnpythonthehardway.org/book/
Anons will never learn.
>>
>>55636922
I really get tired of people shitting on the book. It's a good book stfu. WOW SO MUCH DIFFERENCE BETWEEN PYTHON2 AND PYTHON3

oh it's all so terrible...
you won't feel the difference
>>
>>55636784

I think your too focused on reading the code segment literally. It was just pointing out that multidimensional arrays can be made in that manner and can be useful.

This is the same concept being shown again. In a SIMPLE way.

    bool first[] = { true, true, true };
bool second[] = { true, false, false };
bool third[] = { false, true, false };
bool fourth[] = { false, false, true };

bool* and_table[1][2]{
first,
second,
third,
fourth
};
>>
>>55636954
>It's a good book
I disagree, but all of the reasons have been pointed out many times, yet you won't concede the point, so I won't bother.
>>
>>55636979
This is unrelated to the topic.
>>
>>55636954
Zed's a retard, literally the Maddox of the programming world.
>>
>>55636979

Of course I made a slight error.. it should be

and_table[1][4] {
/* ... */
}


>>55636991

I give up trying to explain this. You're either a troll or mentally ill.
>>
>>55636985
>literally made thousands of people learn to code
> a /g/ autist says it's bad so it's bad

great logic there
>>
File: pic4.jpg (678KB, 1200x1200px) Image search: [Google]
pic4.jpg
678KB, 1200x1200px
>>55637004
I can smell the butthurt from here anon, you should change your underwear
>>
>>55637013
And Justin Bieber got millions of little girls to "like music".

I fail to see how enticing newbies to practice bad habits and old versions is a good thing.
>>
>>55637011
Are you shitting me? What do some bool arrays have to do with '0' + n being a valid way in C?
Oh! That's right, absolutely nothing.
>>
>>55637034
I honestly don't even know... are you people so retarded that you can't hold two versions of the same language in your head? like that's hard to you? to remember few differences here and there? If you can't do that you probably will never learn a second completely different programming language.
>>
>>55637033
Do you even know how big of manbaby Zed is/was?

http://harmful.cat-v.org/software/ruby/rails/is-a-ghetto

Too bad I can't find any screenshots of his old site "Zed's So Fucking Awesome"
>>
>>55637068
That's not the point.

You should only learn an old version of a language if you need it for a specific project.

New programmers should absolutely be learning Python 3, not 2. They can go back and get 2 later if they need it.
>>
>advanced in C/C++ and arm/x86 and reverse engineering and CGI programming
>no jobs
>C# java bullshit for unity or whatever

I guess I'll learn unreal or some shit... Seems to be the only thing keeping C++ alive
>>
>>55632726
P O O
>>
>>55636954
>WOW SO MUCH DIFFERENCE BETWEEN PYTHON2 AND PYTHON3
not even the point why the book is shit
>>
Haskell is so comfy it's unreal
>>
>>55636918
post desktop?
>>
>>55637488
work desktop. too much sensitive data on my desktop, and I'm much, much too busy to do that. As you can tell.
>>
>>55634254
> interpreted
> attractive
>>
>>55637100
to be fair rails community is bunch of faggots
>>
>>55637418
haskell is a scam
>no mutable state
>but wait we let you have mutable state again but you have to access it through a magic thing called a monad
>nobody can explain what a monad is
>it just lets you mutate variables
smf tbm fah
>>
>>55637680
>I Don't Understand Haskell, the post
>>
>>55637680
>>it just lets you mutate variables
don't you dare call my waifu impure
>>
>>55637531
Oh I'm sorry familia sometime I just forget the luxury I have programing for fun. Have a good day at work :^)
>>
>>55637751
I don't program for work. I eat chips and shitpost in my office.
>>
>>55637848
That's your job? Where do I sign up?
>>
Hey guys! I'm a newbie programmer. Self learned Python basics, I believe I've got the programming logic and basics, but I still haven't been able to apply it in something functional or useful.
Also, I started college and we will be using Java.
What language do you guys recommend me?
I'd like to start developing small things, I don't want to create something that'll make me millions, I just want to start out and feel like I'm doing things.
Also any tips, guides, tutorials, are 100% welcome.
Sorry for my english, not my first language.
>>
What would be the best way for detecting if a backspace is pressed in Python?
>>
>>55637680
The real scam is that it pretends to be a pure language, but there are exceptions everywhere.
>>
>>55637914
Totally.
Anywhere, really. Just write scripts to do enough of your own work, then you can just bang your hands on your keyboard with your door closed so no one bugs you. It's tight.
>>
I never thought about this but is there a reason to use 0, 1, 2... instead of 1, 2, 3...?
>>
File: Pro:g:ramming 3.0WithDifficulty.png (1MB, 3840x2160px) Image search: [Google]
Pro:g:ramming 3.0WithDifficulty.png
1MB, 3840x2160px
>>55637936
Try doing these
>>
>>55637995
Depends on the situation.
It's just a convention that's done
>>55638052
That's dumb.
>>55637936
>but I still haven't been able to apply it in something functional or useful.
What would you like to do? It's probably not that much left to learn to actually do a simple (bad) version of it. And you learn a lot from doing projects.
>>
>>55637995
Imagine an array at address X
Now you want to loop over all elements.

Pseudocode:

for ( i=0; i < N; i++ )
print * (X + i)
>>
>>55637995
From what I've read, it has to do with Assembly. When you start indexing at 1, you're wasting a digit, by using one value in the bit, that could otherwise be used for other processes.

Eventually it just became the norm (and it's useful in "for" loops to start at zero, because then you can see how many times the loop will execute)
>>
>>55637995
It originates back in the C days (actually, probably before then) where array access A[i] is actually synonymous with pointer dereference *(A + i). THe pointer A points to the beginning of the array, so A[0] = *(A + 0) = *A.
Also, 0-based index works better with modulus operator, and there are some other advantages. The only real advantage to 1-based is being easier to read in some circumstances, and easier to understand operations having to do with the end of the array (0-based indexes where N-1 is the last element can get confusing at first).
>>
File: code.png (52KB, 1299x692px) Image search: [Google]
code.png
52KB, 1299x692px
New to C, trying to build a board game right now. Anyone know why this is happening? Trying to print out C for the beginning tile, W for every 3rd tile, and then eventually L for every 5th and G for every 7th. When I get to try to insert the W tile it messes up and prints a bunch of extra bits outside my inputted board size
>>
>>55638052
I can do some of these.
Is it a good idea to create a github page and just post whatever shit I make there? Even some shitty IMC program? I think it would count as achievements and boost my morale seeing what I could do.
But what about language? I want to have fun but I also want to have a job. I really like Python, but I'll be stuck with Java for at least 3+ years.
>>
>>55638103
You haven't managed to figure it out since a week? I remember you.
>>
>>55638052
>Count word occurrences in file

count = 0
open = open("line.txt","r")
for line in open:
count+=1
print count,line.strip()

output:
1 line one
2 line two
3 line three
>>
>>55638103
I remember seeing this a while back!

Quick question: why do you have a for loop that runs once? (line 34) and why have you not used arrays? (if you know how to use them, that is)
>>
>>55638107
Language is not as important as actual algorithm design and analytical skill, everything you program will make you better at programming even in a different language, so you shouldn't care that much about it unless you care a ton about performance and optimization.
>>
>>55638123
Work gets in the way of things haven't had a chance to work on it since Thursday
>>
>>55638077
I would really like to make a game. Something simple, RPGlike, not many graphics needed. Something I could upgrade with time, and keep polishing it up until I could maybe post it somewhere so people could play it and criticize.
I made some jumping game following a book with Python, but that's not exactly the way I want to go.
>>
>>55638147
I did that to just place the "C" in the beginning tile as it is the only tile a C would ever be placed. We have learned arrays but the prof mentioned they wouldn't be needed for this stage of the assignment.
>>
>>55638103
idk man, my brain is hurting attempting to follow what the fuck is going with those nested for loops, but you should learn about this construct called a "Switch statement". Also initialize ALL of your local variables in C, always.
>>
File: 3XhCWVr.jpg (32KB, 500x333px) Image search: [Google]
3XhCWVr.jpg
32KB, 500x333px
>>55637680
>>nobody can explain what a monad is
>>
>>55638153
Yeah, and I really like Python's simplicity. I think I'll focus on it as my side project. Seeing as Pokemon is in such a hype nowadays, I wanted to make something similar. With simple battle mechanics, pets, walking around, mostly text based. Is Python+Pygame good enough?
>>
>>55637936
>automatetheboringstuff.com

go through this book, first part is the basics and the second part is the interesting things like gui automation/web scraping/ regex/ picture manipulation and so on

there's a udemy course by the same name, if you don't want to pay for it there's a torrent
>>
>tfw forced to give in to the java/javascript/C# byte-code virtual machine bloat-shit because theres no work around here that wants C/C++ outside of unreal engine
>>
>>55638236
You don't want to be a gayme dev?
>>
>>55638229
That seems cool. I'll check it out, thanks!

Any books or material that gives a progression on making a simple RPG in Python? It would be nice having a base to build my things on.
>>
>be me
>post haskell project on github
>so many job offers for haskell jobs
>$300k starting
>>
>>55638280
fuck you
>>
>>55638236

Bloatshit best shit.
>>
>>55638292
Just learn Haskell
They will pay you 2x just for knowing Haskell
>>
I hope the next thread will be anime
>>
>>55638306
fuck you
>>
I'm reading SICP but I don't understand what lambda functions is.

Are they just local functions that don't have a name?
>>
NEW THREAD!

>>55638331
>>
>>55638328
they are a function
when you do define you define a name to that lambda function

when you call the name, you actually call that lambda function

((lambda (x y) (+ x y)) 1 2)

applies a function without it having a name

(define name (lambda (x y) (+ x y)))

here you give the above lambda a name
(name 1 2) is the same as ((lambda (x y) (+ x y)) 1 2) in a way
>>
File: pic4.jpg (642KB, 1200x1200px) Image search: [Google]
pic4.jpg
642KB, 1200x1200px
>>55638276
search the author's name, you should get his other books like

here you can see it on the side: http://inventwithpython.com/blog/author/admin/

there are books about making video games in python, start there, with PyGame
>>
>>55638280
then you woke up and you were still a NEET shitposting on /g/
>>
File: 1*jUNDeTEvI8L-iWHG0NnPrA.jpg (241KB, 2000x1125px) Image search: [Google]
1*jUNDeTEvI8L-iWHG0NnPrA.jpg
241KB, 2000x1125px
CEO of the meme startup I work at came up with yet another labour-intensive bullshit idea today.

Writing a script to automate as much of it as possible so it doesn't swamp me with work.

FUCK I need to get out of there, fuck startups and fuck startup founders.
>>
>>55638205
It's true
>>
>>55638546
It's a stream that implements flatMap is my basic understanding.
>>
>>55638518
But you'll lose your equity

>>55638569
Anything that implements flatMap and "return" which injects an element into some default context. E.g. return for lists make a singleton list, return for State doesn't change the state and results in the element you gave, return for IO doesn't actually do I/O and just yields the value.

There are also some rules ("monad laws") that the implementation should follow, but generally they are more relevant to the implementor, because as a user, you get an intuitive sense for how the operations work together by examples and practice.

>>55637680
Not every Monad is about mutation, but the common one, State s a, is just a wrapper around a function s -> (a, s), which can be thought of as the kind of function that takes the current state and gives a result, plus the new state. >>= is implemented by chaining these functions:
-- One possible definition
-- newtype is a compile-time wrapper, no runtime overhead
newtype State s a = S (s -> (a, s))

(>>=) :: State s a -> (a -> State s b) -> State s b
S f >>= k = S $ \state ->
let (res1, state2) = f state
-- ^ First get the results of the first function
S g = k res1
-- ^ Feed the result to k to get the second function
in g state2
-- ^ Run the new function on the state we are in after the first one


>>
>>55638774
>Equity

Heh

Got options, but they'll only be available loooong after this place tanks
>>
>>55638078
>>55638091
>>55638097
Before C, arrays started with any number but 1 was the default.

Starting from 0 (instead of any number) is a very recent thing, some time after Java, Pascal, PL/I, and VB can start with any number.
Thread posts: 335
Thread images: 38


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