/dpt/ - Daily Programming Thread

Previous thread: What are you working on, Sup Forums?

Other urls found in this thread:

roguebasin.com/index.php?title=Complete_roguelike_tutorial_using_C++_and_libtcod_-_part_1:_setting_up
github.com/NyaaPantsu/nyaa
jetbrains.com/go/
github.com/golang/proposal/blob/master/design/15292-generics.md
nomad.so/2015/03/why-gos-design-is-a-disservice-to-intelligent-programmers/
blog.plan99.net/modern-garbage-collection-911ef4f8bd8e
qr.ae/drvVS
qr.ae/drvm8
yager.io/programming/go.html
java.dzone.com/news/i-don’t-much-get-go
dtrace.org/blogs/wesolows/2014/12/29/golang-is-trash/
lessonsoffailure.com/software/google-go-not-getting-us-anywhere/
lessonsoffailure.com/software/googles-go-not-getting-us-anywhere-part-2/
lessonsoffailure.com/software/google-go-good-for-nothing/
gist.github.com/kachayev/21e7fe149bc5ae0bd878
twitter.com/AnonBabble

rewriting sepples game engine in C.

Sounds painful.

less painful than trying to use the engine with sepples.

What engine?

horde3d

Let's say I would like to make a program in the Windows terminal/Unix command promt, something like Rogue, NetHack, nmon, MidnightCommander etc. However I failed to find so far a proper guide for this. What libraries to use, what is the usual method for clearing and redrawing the "screen" like you would do with a usual renderer. My choice of language is C++, and what I found so far is the console.h library and Ncurses, but as I understand both seems to be OS specific, but frankly for start I would prefer a Windows-like approach.

Why? Because why the hell not, and other than that I would like to learn how this works.

Learning Haskell.

Thank you for using an image that isn't completely retarded.

Why are women such attention whores?

roguebasin.com/index.php?title=Complete_roguelike_tutorial_using_C++_and_libtcod_-_part_1:_setting_up

I normally don't make threads because I don't want people who reply to OP to be flagged as new replies (but I still wanna see their posts so I can't hide). But retarded thread wars is something I'd like to avoid so I took the hit now.
It's mainly men who stream programming on twitch user.

>streaming coding
Holy fucking shit what is the point oh my god it is beyond me.

Well some people who watch streams do it just to have something making noice on the background and some do it for the social interaction.
The coding there is just a execuse.

>btw I'm a girl :3 don't forget to click the donate button ^_^
Also, why is it always JavaScript or Ruby on Rails?

I want sub second precision epoch time in C.
What's the best way to do this?
Preferably as a double-precision floating point value but two separate counters would be fine.

Stop giving them attention

Use clock_gettime.
It's not standard C, but it's POSIX standard.

>node.js hardware
wtf

>not writing kernel modules in node

>Have actually been working on something recently
>Don't want to talk about it, because it feels like blogposting
Does this happen to anyone else?

i just shitpost and get into arguments

Gonna make a game engine. Apparently any idiot can do it.

Functional programming, despite having advantages, too often serves as a vessel for the aggrandizement of vapid establishment pablum.

If you really want to get into game dev, don't make an engine, make a game.

Ok Sup Forumsentlemen,

I have a c# form problem that I cant wrap my head around on account of being a retard.

I have a dictionary of type that Im trying to bind to a combo box.

mCombo.DataSource = new BindingSource(dict, null);

mCombo.DisplayMember = "Key";
mCombo.ValueMember = "Value";

I thought it would be easy enough, but the fact that its a string with an object complicates it abit.
Im trying to get the string value to display in the combo box but its only returning (Collection). Im also trying to extract certain Server data (an object with 3 strings) whenever a certain index is selected.

Re-writing a multi-threaded prime sieve generator

Learning Go.

github.com/NyaaPantsu/nyaa

>using MSVC to write C on windows
>have VS 2012
>doesn't support declare anywhere
It's like the one feature I really really wanted from C99.
I might actually start compiling as C++ this is just awful.

> CONSIDER the performance implications of throwing exceptions. Throw rates above 100 per second are likely to noticeably impact the performance of most applications.

Thanks for the tip, Microsoft! And here I was designing my software to throw 200 exceptions per second.

MINGW
I
N
G
W

Get Windows 10 so you can use ganoo+loonix toolchains in bash. You're already in the MS botnet, may as well go balls deep.

exceptions were mistake

>MSVC
Stop being stupid and use Clang or GCC.

Probably warning for Pajeets who use exceptions as flow control

>if (true) throw TrueException
>else if (false) throw FalseException
>else throw NotTrueOrFalseException

>using a severely outdated version of an already awful compiler
Why are you punishing yourself like this?

Isn't it usable from C already though
Why rewrite

Even on VS2017, the C mode is stuck in C89. They have no plans to change that. Therefore, to write truly portable code, you'll need to write C89.

Why are you writing C?

It has partial C99 support. Mostly the parts that were grafted onto C++ at some point.

>people are still denying that Go is the future

>to write truly portable code
There is not reason to target that garbage.
MSVC is not a C compiler. It's a C++ pretending that it's a C compiler.
Use Clang or GCC.

I don't see how languages with exceptions for error handling can be considered serious languages.

What's the best editor for Go?

vim

vim

>There is not reason to target that garbage.
There is: You don't have a Windows license and/or don't have an expensive code signing certificate, so you want your users to build your free software themselves, but don't want to make them jump through the eleven hoops of whatever the fuck a Windows user would have to do.

jetbrains.com/go/
visual studio code
liteide

those are probably the 3 best go programming environment.

Gogland is really good

Can't the visual meme use clang these days anyway?

Anyone serious library includes tester functions if you really want to go with the return-value error route.

It's officially experimental. I hear VS can become unstable during normal use so nobody actually uses the clang frontend.

>You don't have a Windows license and/or don't have an expensive code signing certificate, so you want your users to build your free software themselves
how do you know it even builds?

github.com/golang/proposal/blob/master/design/15292-generics.md
>6 years
SIX YEARS

Go is officially an abandonware

>You don't have a Windows license
You don't need it.
>and/or don't have an expensive code signing certificate
You don't need that either. Any other bullshit reason?

You coded pure C89. If it's very little effort, someone will probably clean up the few broken pieces.

generics are a meme

Are generics seriously that important to you?

yuki would use C or ASM, not that lisp garbage

fuck and kys dumbshit go apologist

>pure C89
oh, you mean fizz buzz?

nomad.so/2015/03/why-gos-design-is-a-disservice-to-intelligent-programmers/

Okay, explain why generics are so important then.

they're not

Read the link, brainlet

Gotards are dumber than webfaggots

This.

It's literally created for brainlets. Even the creators call Go users dumb.

>waaaaaaah, can't code without muh generics
>brainlet
wew

This blog is absolute garbage. Never post this shit again unless you want to embarrass yourself.

You fucking retard, how's life writing 14 different functions for 14 different types?

S A L T Y
A
L
T
Y

Meant for

You're the brainlet for being unable to code without generics.

...

Did that hit the spot?

You don't even know what generics mean, dumb gotard

She's a slut

Why are there so many annoying children here?

>bainlet losing his shit
top lel

It's slightly embarrassing that Go has less Generics support than fucking ANSI C.

I heard they will implement that in "future"

You're fucking stupid if you think generics are a meme. Do you want to go back to dynamic typing too?

>>>/introductiontocomputerprogramming/

blog.plan99.net/modern-garbage-collection-911ef4f8bd8e
qr.ae/drvVS
qr.ae/drvm8
yager.io/programming/go.html
nomad.so/2015/03/why-gos-design-is-a-disservice-to-intelligent-programmers/
java.dzone.com/news/i-don’t-much-get-go
dtrace.org/blogs/wesolows/2014/12/29/golang-is-trash/
lessonsoffailure.com/software/google-go-not-getting-us-anywhere/
lessonsoffailure.com/software/googles-go-not-getting-us-anywhere-part-2/
lessonsoffailure.com/software/google-go-good-for-nothing/
gist.github.com/kachayev/21e7fe149bc5ae0bd878

Go Go: 33.553163084 seconds time elapsed
Go gccgo: 17.438276362 seconds time elapsed
Crystal: 3.034363672 seconds time elapsed
Nim: 6.083644424 seconds time elapsed
Rust rustc: 6.583698221 seconds time elapsed
D LDC: 6.347934615 seconds time elapsed
C clang: 9.971914301 seconds time elapsed
C++ clang++: 5.518077517 seconds time elapsed
C++ G++: 4.659448453 seconds time elapsed
Javascript node.js: 10.406505448 seconds time elapsed
Javascript SpiderMonkey: 10.216595020 seconds time elapsed

holy shit you're dumb lmao

They won't. It's literal trash.
And as I said earlier, it's LITERALLY designed for brainlets.

>lmao
Go back nu-male.

>people are still denying that Crystal is the future

>Slower than Java script
At this point Go tards might as well hang themselves

Tell me about its GC and multitherading support

>The key point here is our programmers are Googlers, they’re not researchers. They’re typically, fairly young, fresh out of school, probably learned Java, maybe learned C or C++, probably learned Python. They’re not capable of understanding a brilliant language but we want to use them to build good software. So, the language that we give them has to be easy for them to understand and easy to adopt.
>Rob Pike
Basically, a language for brainlets.

Imagine a language that's designed to contain retards

...

>And as I said earlier, it's LITERALLY designed for brainlets.
aka H1B's

Can't make this shit up.

>multitherading

The problem with exceptions is when people stop using them to handle exceptional circumstances.

don't flatter yourself m80 ;)

I think gotards are dumber than subhuman pajeets

I am tired of this hemisphere, how do I steal a job for meself in America? Also, I heard that Chile is pretty comfy these days for programmers.