[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: 333
Thread images: 30

File: dpt.jpg (72KB, 400x579px) Image search: [Google]
dpt.jpg
72KB, 400x579px
Previous thread: >>61282519
What are you working on, /g/?
>>
rewriting sepples game engine in C.
>>
>>61286635
Sounds painful.
>>
>>61286656
less painful than trying to use the engine with sepples.
>>
>>61286635
What engine?
>>
>>61286666
horde3d
>>
File: 1494289124023.jpg (94KB, 600x720px) Image search: [Google]
1494289124023.jpg
94KB, 600x720px
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.
>>
File: 1499401511187.jpg (436KB, 800x1314px) Image search: [Google]
1499401511187.jpg
436KB, 800x1314px
Learning Haskell.
>>
File: 1489268801010.jpg (38KB, 250x250px) Image search: [Google]
1489268801010.jpg
38KB, 250x250px
>>61286610
Thank you for using an image that isn't completely retarded.
>>
File: IMG_0851.jpg (147KB, 744x889px) Image search: [Google]
IMG_0851.jpg
147KB, 744x889px
>>61286610
Why are women such attention whores?
>>
>>61286709
http://www.roguebasin.com/index.php?title=Complete_roguelike_tutorial_using_C%2B%2B_and_libtcod_-_part_1:_setting_up
>>
>>61286750
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.
>>61286754
It's mainly men who stream programming on twitch anon.
>>
>>61286754
>streaming coding
Holy fucking shit what is the point oh my god it is beyond me.
>>
>>61286780
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.
>>
>>61286780
>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.
>>
>>61286754
Stop giving them attention
>>
>>61286802
Use clock_gettime.
It's not standard C, but it's POSIX standard.
>>
>>61286754
>node.js hardware
wtf
>>
>>61286899
>not writing kernel modules in node
>>
File: 1460577020386.png (38KB, 227x367px) Image search: [Google]
1460577020386.png
38KB, 227x367px
>>61286610
>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?
>>
>>61286909
i just shitpost and get into arguments
>>
>>61286610
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.
>>
>>61286963
If you really want to get into game dev, don't make an engine, make a game.
>>
File: 1463095194138.gif (2MB, 355x200px) Image search: [Google]
1463095194138.gif
2MB, 355x200px
Ok /g/entlemen,

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 <string, Server (custom class)> 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.
>>
>>61286610
Re-writing a multi-threaded prime sieve generator
>>
File: go.jpg (46KB, 600x338px) Image search: [Google]
go.jpg
46KB, 600x338px
Learning Go.
>>
>>61287183
https://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.
>>
File: 1360129151600.gif (3MB, 290x189px) Image search: [Google]
1360129151600.gif
3MB, 290x189px
> 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.
>>
>>61287368
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.
>>
>>61287404
exceptions were mistake
>>
>>61287368
>MSVC
Stop being stupid and use Clang or GCC.
>>
>>61287404
Probably warning for Pajeets who use exceptions as flow control

>if (true) throw TrueException
>else if (false) throw FalseException
>else throw NotTrueOrFalseException
>>
>>61287368
>using a severely outdated version of an already awful compiler
Why are you punishing yourself like this?
>>
>>61286665
>>61286675
Isn't it usable from C already though
Why rewrite
>>
>>61287368
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.
>>
>>61287368
Why are you writing C?
>>
>>61287490
It has partial C99 support. Mostly the parts that were grafted onto C++ at some point.
>>
File: tiobe-index-2017-swift.jpg (289KB, 1890x1494px) Image search: [Google]
tiobe-index-2017-swift.jpg
289KB, 1890x1494px
>people are still denying that Go is the future
>>
>>61287490
>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.
>>
>>61287404
I don't see how languages with exceptions for error handling can be considered serious languages.
>>
What's the best editor for Go?
>>
>>61287576
vim
>>
>>61287576
vim
>>
>>61287553
>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.
>>
>>61287576
https://www.jetbrains.com/go/
visual studio code
liteide

those are probably the 3 best go programming environment.
>>
>>61287610
Gogland is really good
>>
>>61287609
Can't the visual meme use clang these days anyway?
>>
>>61287560
Anyone serious library includes tester functions if you really want to go with the return-value error route.
>>
>>61287622
It's officially experimental. I hear VS can become unstable during normal use so nobody actually uses the clang frontend.
>>
>>61287609
>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?
>>
>>61287529
https://github.com/golang/proposal/blob/master/design/15292-generics.md
>6 years
SIX YEARS

Go is officially an abandonware
>>
>>61287609
>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?
>>
>>61287652
You coded pure C89. If it's very little effort, someone will probably clean up the few broken pieces.
>>
>>61287691
generics are a meme
>>
>>61287691
Are generics seriously that important to you?
>>
>>61286610
yuki would use C or ASM, not that lisp garbage
>>
>>61287697
fuck and kys dumbshit go apologist
>>
>>61287694
>pure C89
oh, you mean fizz buzz?
>>
>>61287705
http://nomad.so/2015/03/why-gos-design-is-a-disservice-to-intelligent-programmers/
>>
>>61287708
Okay, explain why generics are so important then.
>>
>>61287720
they're not
>>
>>61287720
Read the link, brainlet
>>
>>61287725
Gotards are dumber than webfaggots
>>
>>61287725
This.
>>
>>61287737
It's literally created for brainlets. Even the creators call Go users dumb.
>>
>>61287730
>waaaaaaah, can't code without muh generics
>brainlet
wew
>>
>>61287716
This blog is absolute garbage. Never post this shit again unless you want to embarrass yourself.
>>
>>61287755
You fucking retard, how's life writing 14 different functions for 14 different types?
>>
>>61287763
S A L T Y
A
L
T
Y
>>
>>61287769
Meant for >>61287757
>>
>>61287730
>>61287755
You're the brainlet for being unable to code without generics.
>>
>>61287725
>>>/g/wdg
>>
File: 1494332105752.jpg (733KB, 3702x2198px) Image search: [Google]
1494332105752.jpg
733KB, 3702x2198px
>>61287763
Did that hit the spot?

>>61287782
You don't even know what generics mean, dumb gotard
>>
>>61286610
She's a slut
>>
Why are there so many annoying children here?
>>61287775
>>61287783
>>61287737
>>61287755
>>61287708
>>61287691
>>
>>61287769
>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"
>>
>>61287794
You're fucking stupid if you think generics are a meme. Do you want to go back to dynamic typing too?
>>
>>61287788
>>61287795
>>>/introductiontocomputerprogramming/
>>
File: hYMIItH.png (142KB, 511x564px) Image search: [Google]
hYMIItH.png
142KB, 511x564px
>>61287529
https://blog.plan99.net/modern-garbage-collection-911ef4f8bd8e
http://qr.ae/drvVS
http://qr.ae/drvm8
http://yager.io/programming/go.html
http://nomad.so/2015/03/why-gos-design-is-a-disservice-to-intelligent-programmers/
http://java.dzone.com/news/i-don%E2%80%99t-much-get-go
http://dtrace.org/blogs/wesolows/2014/12/29/golang-is-trash/
http://www.lessonsoffailure.com/software/google-go-not-getting-us-anywhere/
http://www.lessonsoffailure.com/software/googles-go-not-getting-us-anywhere-part-2/
http://www.lessonsoffailure.com/software/google-go-good-for-nothing/
https://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
>>
>>61287806
holy shit you're dumb lmao
>>
>>61287801
They won't. It's literal trash.
And as I said earlier, it's LITERALLY designed for brainlets.
>>
>>61287823
>lmao
Go back nu-male.
>>
File: icon.png (7KB, 552x552px) Image search: [Google]
icon.png
7KB, 552x552px
>people are still denying that Crystal is the future
>>
File: 1495314358756.png (25KB, 300x441px) Image search: [Google]
1495314358756.png
25KB, 300x441px
>>61287814
>Slower than Java script
At this point Go tards might as well hang themselves
>>
>>61287837
Tell me about its GC and multitherading support
>>
>>61287814
>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.
>>
>>61287824
Imagine a language that's designed to contain retards
>>
>>61287824
>>61287826
>>>/pol/
>>
>>61287824
>And as I said earlier, it's LITERALLY designed for brainlets.
aka H1B's
>>
File: 12463612.jpg (30KB, 720x438px) Image search: [Google]
12463612.jpg
30KB, 720x438px
>>61287853
>>61287860
Can't make this shit up.
>>
File: stopposting.jpg (30KB, 500x375px) Image search: [Google]
stopposting.jpg
30KB, 500x375px
>>61287848
>multitherading
>>
>>61287404
The problem with exceptions is when people stop using them to handle exceptional circumstances.
>>
>>61287872
don't flatter yourself m80 ;)
>>
>>61287869
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.
>>
>>61287843
javascript's implementations are probably the most optimized ones after c's and java's
>>
>>61287881
Which is inevitable when using exceptions as your error handling facility.

Are you gonna mix error codes and exceptions?
>>
>>61287814
>>61287860
fake
>>
>>61287697
Sure.
>Look at the functions SortInts, SortFloats, SortStrings in the sort package. Or SearchInts, SearchFloats, SearchStrings. Or the Len, Less, and Swap methods of byName in package io/ioutil. Pure boilerplate copying.
>>
>>61287824
>>61287860
and what is wrong with that lol
corps are not about ""innovation"" or ""research"", they are about making money and rob pike helps with that
>>
>>61287843
You're an idiot if you think JavaScript is slow.
>>
>>61287907
SLOW
L
O
W
>>
>>61287907
JavaScript is slow
>>
>>61287912
>The quality of posts is extremely important to this community. Contributors are encouraged to provide high-quality images and informative comments.
>>
>>61287895
http://dtrace.org/blogs/wesolows/2014/12/29/golang-is-trash/
>>
>>61287919
>animu tho
>>
>2 autists bashing Go with memes are derailing the thread again
fucks sake
you tards fall for it every time
>>
>>61287897
I don't think gobrainlets will catch that
>>
>>61287907
Javascript is slow by comparison to a lot of other languages for most tasks but it's not slow for most tasks. Big difference. You can write a lot of junk in JS and it will be just fine.
But it's certainly slow if performance is a requirement you have.
>>
>>61287912
>>61287916
>>61287941
>>61287929
underageb&
>>
>>61287945
Go == trash
>>
>>61287951
>The quality of posts is extremely important to this community. Contributors are encouraged to provide high-quality images and informative comments.
>>
>>61287956
Exactly.
>>
>>61287919
>>61287956
Butthurt gobrainlet spotted. Come back when it actually supports Generics
>>
>>61287958
Write a high-quality post for once then.
>>
>>61287964
>>61287958
>>
File: 1463679213960.jpg (19KB, 284x339px) Image search: [Google]
1463679213960.jpg
19KB, 284x339px
>>61287097
No one?
>>
>>61287963
>>61287970
>The quality of posts is extremely important to this community. Contributors are encouraged to provide high-quality images and informative comments.
>>
damn, wasm is the shit
actually btfoes javascript the fuck out
>>
>>61287929
REKT
>>
>>61287893
Most libraries include methods to support that if needed, yes.

What are you doing that's throwing exceptions so often that it's affecting performance, though? Code that even has the possibility of throwing should be uncommon, and incidences where it actually throws even more uncommon. In pretty much every language with exception handling it's 0 overhead unless it actually throws, by the way, which is less overhead than checking return values for errors.
>>
>>61287971
>he thinks people actually get help in these threads
lol
>>
>>61287976
>Duplication
You are behaving like a typical gobrainlet.

GO
HAS
NO
GENERICS
>>
>>61287982
>>61287912
>>61287775
underageb&
>>
>>61287993
see >>61287997
>>
>>61287997
Is your ass in pain right now?
Go is garbage, get over it.
>>
File: crystal.png (14KB, 400x162px) Image search: [Google]
crystal.png
14KB, 400x162px
>no curly braces
dropped
>>
>>61288008
>>>/pol/
>>
>>61288028
/pol/ is cancer and so is Go
>>
>>61288028
Try calling him a neo nazi, that'll show him!
>>
>>61288034
>>>/b/
>>
>>61287983
>Most libraries include methods to support that if needed
Perhaps you missed my point. It's an awful thing to do. It adds so much programming overhead it's unreal if you have to deeply consider the cases where you could be allowed to throw exceptions in calling code while you're writing your library code.

The only sensible solution is to have return values in that case really, because exceptions will fuck you over hard.
>why are you throwing exceptions often
I don't use exceptions anymore. I have to restrict my library use extremely much because of it. Because so many people write libraries with exceptions in horrible ways. And it's not their fault directly, it's the feature.
>>
Stop arguing and help this poor anon you bitches >>61287097

never touched c hash so I can't
>>
>>61288008
you're being a literal nazi right now
>>
>>61288060
It's a very poorly formulated question anon.

I suspect she should read something like this:
https://docs.microsoft.com/en-us/dotnet/framework/winforms/controls/add-and-remove-items-from-a-wf-combobox
>>
File: linq.png (299KB, 843x3218px) Image search: [Google]
linq.png
299KB, 843x3218px
>>61288060
>C hash
Stopped reading right there
>>
File: curly-brackets-1.png (6KB, 622x329px) Image search: [Google]
curly-brackets-1.png
6KB, 622x329px
Programming languages without curly braces are not real languages.
>>
>>61288096
This
>>
>>61288096
how can languages be real if our eyes aren't real?
>>
>>61288087
No language is perfect you underage mongoloid. Stop posting this garbage.
>>
>C doesn't have generics
>/dpt/ doesn't care
>Go doesn't have generics
>/dpt/ loses its shit
Really makes you think...
>>
>>61288096
Whitespace languages are best.
>>
>>61288119
1. C has more support for generics since C89
2. C was created half a century ago
>>
>>61288119
C is a dinosaur language. Go is hipster trash.
>>
>>61287814
>still posting data pulled out of his ass
m8, you've been doing this for years (according to google)... that's a really bad obsession
>>
>>61288132
Go troll somewhere else please
>>
>>61288130
>>61288132
Doesn't change the fact that /dpt/ uses a language without generics extensively.
>>
>>61288130
>C89
literally nobody uses that or c99 garbage
>>
>>61288166
>C89
hey, microsoft called
>>
>>61288151
C is still useful. Go has never been useful.
>>
>>61288151
Which language doesn't support generics?
>>
Who needs generics anyway, they count as bloat in my book tbqh
>>
>>61288195
Who needs type systems anyway, they count as bloat in my book tbqh
>>
>>61288234
js4lyf
>>
>>61287897
and that's a problem... how?
are you mad that other people use code generators (or even regexp...) to copy code instead of using generics?
>>
>>61288277
SO MAD!
>>
>>61288277
Regex is not a replacement for generics
>>
>>61288277
>code generators
constanza.jpg
>>
How come I get a narrowing error when I declare this array inline?

GLhalf a[2] = {1.0f, 2.0f};

error: narrowing conversion of ‘2.0e+0f’ from ‘float’ to ‘GLhalf {aka short unsigned int}’ inside { } [-Wnarrowing]


but when I do this it works fine?:

GLhalf a[2];
a[0] = 1.0f;
a[1] = 2.0f;
>>
Memes aside, why do we need Go if Java/C# for webshit exist?
>>
>things which do different things have different names
>b-but muh asstractions
>>
>>61288325
because Java/C# exist, and they suck
>>
>>61288299
Yes it is.
>>
>>61288325
nobody has java anymore
nobody wants to install .net anymore
>>
>>61288330
>accusing someone of whining unreasonably
>not even making it clear whom you're meaning to accuse
>no one has even yet whined unreasonably
>b-but muh interNEET holy wars
>>
>>61288151
If go had the ups of C I'd understand your complaint.
As is it doesn't make sense.
>>
>>61288378
it does though
go is just a modern c with all the benefits
>>
>>61288393
>Go tards rusing C fags
kek
>>
>>61288318
try GLhalf a[2] = {1, 2};
>>
Why the FUCK did I learn C instead of C++?
>>
>>61288096
>not just using parentheses
>>
>>61288409
because you're mentally ill
>>
>>61288330
In C, you cannot use the same name for multiple things which do different things and decide at compile time which one to use based on types.
This is a flaw of the language because it's something useful to be able to do and C can't do it.
proov me rong
>>
>>61288409
because you fell for a /g/ meme
>>
>>61288408
Yes, that works, but the point of GLhalf is to store float values, not integers.
>>
>>61288318
there is implicit casting in the 2nd case, and I guess your compiler sucks and won't do automatic casting in the 1st case
>>
>>61288133
God moves in mysterious ways
>>
>>61288393
There is exactly one benefit to C and that's being really, really fast.
Go is not really, really fast.
Your argument is in salad.
>>
>>61288420
lisp is a meme with no benefits over c/c++
>>
>>61288446
>There is exactly one benefit to C and that's being really, really fast.
please tell me you're joking
>>
I'm very new to Linux and programming in general, pls no bully..

I'm trying to write a shell script to toggle the touchpad through the terminal

I used xinput to get the ID of the touchpad (12), could I adapt this script to work?

https://pastebin.com/7nDVrQzz

I don't really grasp the grep command yet
>>
>>61288432
>the point of GLhalf is to store float values
wrong
>>
>>61288318
>>61288435
It's probably the fact that in the first case it would try to cast an array of floats to an array of GLhalfs. Whereas in the second case its only trying to cast values.
>>
>>61288448
Nice m3m3s.
>>
>>61288377
protip: it was a generic
>>
>>61288448
>no benefits over c/c++
Benefit over C: metaprogramming
Benefit over C++: metaprogramming that isn't ugly
Benefit over C: lambdas
Benefit over C++: lambdas that aren't ugly
Benefit over C: facilities for functional programming
Benefit over C++: facilities for functional programming that aren't ugly
Benefit over C and C++: shared format and structure between code and data
Benefit over C and C++: dynamically typed
>>
>>61288489
All I see in that ass-pull of an explanation is:
>>>>>>>>>>>>>>b-but muh interNEET holy wars
>>
>>61288446
go and implement ISA extensions for Go, then
C is faster than Go only because the compiler uses some CPU features that aren't supported by the Go compiler, but... Go runs native code.

BTW, Go supports a shitload of CPU architectures...
>>
D has the benefits of C and C++ without the downsides. Why isn't it more popular?
>>
>>61288475
Now I'm getting confused.
The opengl wiki says that GLhalf is used to store 16bits float values, but apparently it actually stores integer?

https://www.khronos.org/opengl/wiki/OpenGL_Type
>>
>>61288448
>implying you can do this in C++
(let ((let '`(let ((let ',let))
,let)))
`(let ((let ',let)) ,let))
>>
How do archive sites parse 4chan DOM?

Are there any repos I can look though?
>>
>>61288330
>what is context
>>
>>61288506
Garbage collector
>>
>>61288501
>BTW, Go supports a shitload of CPU architectures...
BTW, GCC supports everything from super computers to your moms vibrator.
>>
>>61288495
>Benefit over C and C++: dynamically typed
ummm....
stopped reading there
>>
>>61288500
thanks reddit
>>
>>61288460
I'm not.
C is hideously inelegant by modern standards.
When you've worked in it for awhile, you start to develop a razor sharp intuition for what code "feels" like it can go fast. And then C starts looking elegant by THOSE standards.
But that's just another way of saying C is really, really fast.
>>
>>61288495
>Benefit over C and C++: dynamically typed
lol
>>
>>61288513
They probably use the API.
>>
>>61288513
https://github.com/4chan/4chan-API
enjoy
>>
>>61288510
isn't that what the error message is telling you?
>>
>>61288510
>GLhalf is used to store 16bits float values
your compiler doesn't have 16 bit floats
>>
>>61288524
>pulling reddit out of your ass out of nowhere
Why? Because it's a site you don't like?
And why are you bringing up a site you don't like?
Because you want to argue?
So you admit that you're looking for an argument then?
So you admit that you literally have nothing better to do with your life?
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>b-but muh interNEET holy wars
>>
>>61288495
>dynamically typed
stopped reading right there
>>
A good C++ programmer can write C++ code that's just as fast as C.
Same thing with D.
>>
>>61288501
>aren't supported by the Go compiler
unsurprisingly, it's a shit compiler
>>
>>61288536
>>61288538
sweet I didn't know there was a public API, thanks
>>
File: maxresdefault.jpg (47KB, 1280x720px) Image search: [Google]
maxresdefault.jpg
47KB, 1280x720px
>>61288522
>>61288529
>he prefers statically """"""""""typed"""""""""" languages
>>
>>61288549
You call this an argument?
>>
>>61288555
see: >>61288565
>>
How should you declare your main function in C?
>>
File: D_Programming_Language_logo.svg.png (567KB, 2000x1516px) Image search: [Google]
D_Programming_Language_logo.svg.png
567KB, 2000x1516px
>tfw the best language never caught on
>>
>>61288570
No, I call it laughing at you for trying so hard to start one.
It's pathetic.
That's what this conversation has been about from the start: what a fucking loser you are for wanting to argue on the Internet.
>>
>>61288565
>icancer
You let me down, man.
>>
>>61288584
in one of the standard compliant ways
>>
>How should you declare your main function in C?
huh... so this is /dpt/...
>>
>>61288560
someone has to add it, you tard
>>
>>61288584
int (*main)() = ULONG_MAX;
>>
>>61288584
Like this.
main () 
{ puts("Good bye, world!");
return 0;
}
>>
>>61288607
kys
>>
>>61288585
It fucked up by trying to modernize too much. Most of the "nice" stuff relies too heavily on the GC. Love the templates though and UFCS is an excellent idea.
>>
>>61288590
Please explain.
I see nothing indicating Apple products in that post.
>>
>>61288612
C is garbage anyways, D is better.
>>
how do you average two integers in C?
>>
>>61288607
>no return type
???
>>
File: animated.webm (903KB, 1280x720px) Image search: [Google]
animated.webm
903KB, 1280x720px
Would it be possible to optimize this shit by sending the VRAM directly to Xlib (without making a RAM copy with glReadPixels)?
>>
>>61288585
I wish it had a decent Qt5 support
>>
>>61288637
>qt
>ever
>>
>>61288634
assumed int, dumb faggot.
>>
>>61288624
idubbzzz
>>
/dpt/ is there a language like this yet?
>all functions are closures that capture by reference
>methods are just plain functions with no hidden receiver parameter
>they work by being closed over the containing object's state
>>
>>61288588
Yeah this was never an argument if you hadn't overloaded your terms you'd have spotted that earlier.
>>
>>61288670
What is that from? There was some major popularity graph organization that changed their algorithm but don't note it in any graph.
Also smaller languages have gotten a lot of attention the last few years.
>>
File: Tiobe_index.png (186KB, 800x401px) Image search: [Google]
Tiobe_index.png
186KB, 800x401px
>this fucking graph
Where did all of those Java and C programmers go?
>>
>>61288673
>"please explain"
>proceeds to shit on the keyboard
>>
>>61288692
I posted an updated version >>61288694
The graph is based on percentages, not raw numbers. So the large dips without any rise from the other languages is baffling.
>>
>>61288688
>Yeah this was never an argument
It sure wasn't, but you sure did try to start one out of nowhere like a little bitch, only to fail miserably like everything else in your life. >>61288330
>>
>>61288558
How to know if I'm good program.
>>
>>61288558
>writing good C++ is more difficult than writing good C
OK.
>>
>>61288763
One is much more complex than the other.
Hint: it's C++
>>
>>61288773
C++ as a language is more complex than C as a language.
Because of this, using C++ is less difficult than using C.
>>
>>61288763
fast != good
>>
>>61288781
this
if you don't understand why, you're a brainlet.
>>
>>61288786
>brainlet
stop
>>
>>61288783

There are four things that make code good: being fast, being readable, being correct, and being safe.

All of them except being fast can be assured in any language with enough hard work.
>>
>>61288783
>writing fast C++ is more difficult than writing fast C
OK?
>>61288781
A language should give you facilities to express complex relationships. It should not be complex on its own.
>>
>>61288806
>a language should do this because i said so
>>
>>61288781
>>61288786
that's some really flawed logic... something being complex doesn't mean it was designed to make it simpler to use or understand
>>
Thoughts on Rust?
>>
>>61288814
I'm making claims just as you made. If you want me to qualify you can go ahead and qualify your own statements first.
>>
>>61288821
but it does nigga
>>
>>61288724
Seems like you are entering an infinite loop here.
>>
>>61288806
>A language should give you facilities to express complex relationships. It should not be complex on its own.
There's a decision you can make. You can either use a simple language with few primitives and rely on common idioms or idioms you invent from those primitives. You can use a complex language which integrates all those things itself.
In the end, it's up to you. Complex language or complex code?
>>
>>61288828
A language with potential if only they add basic features like a way to guarantee TCO, full HKTs, full dependent types, and O(1) string character indexing
>>
>>61288828
worthless
>>
>>61288829
stfu
>>
>>61288833
>it does
Anon if you can't understand the concept of making things unnecessarily complex then you're just dumb. Not ignorant, dumb.
>>
>>61288806
>A language should give you facilities to express complex relationships. It should not be complex on its own.
First of all, literally all Turing-complete langauges "give you facilities to express complex relationships."
Secondly, C is pretty complex. Not as complex as C++, but pretty complex. There are much simpler languages than C, but most of them are complex under the hood and therefore slow.
Finally, what exactly was the point of saying this? Which position do you mean to be taking here?
>>
>>61288806
You're a fucking moron.
>>
>>61288694
TIOBE is bullshit. Try here
http://langpop.corger.nl/
>>
File: cripplingdepression3.jpg (22KB, 1000x501px) Image search: [Google]
cripplingdepression3.jpg
22KB, 1000x501px
We are making a web browser! >>61288757
>>
>>61288878
Why?
>>
>>61288828
Core language is too complex. Standard library is anemic. It's dead in the water.
>>
>>61288868
Langpoop is bullshit
Try TIOBE
>>
>>61288841
I'm not the one who starts arguments for no reason with no one in particular.
>>
File: moon.jpg (14KB, 480x360px) Image search: [Google]
moon.jpg
14KB, 480x360px
>>61288878
>>>/pol/
>>
>>61288881
Because mozilla is breaking things and chrome is a privacy nightmare
>>
>>61288833
no, it doesn't. you could make a complex knife that will make you bleed every time you touch it, and it won't make your life easier

also, in particular:
>C++
>simple to use or understand
lolno
>>
>>61288868
>[established, reputable, longstanding site] is bullshit
>use [unvetted, non-rigorous, no-name, almost certainly statistically invalid and/or biased site] instead!!!
>of course I'm not going to give any reasons why you should
>>
>>61288843
>way to guarantee TCO
TCO is not a magic. Do it yourself
>>
>>61288878
>moon man
fuck off /pol/
>>
>>61288894
They have an anime logo for autists like you
>>
>>61288913
stop hating on moon man
>>
>>61288878
not with that logo we aren't
>>
>>61288878
Why not pick webkit and build a front end for it?
>>
>>61288907
Stop being lazy. Scheme has had it for decades. There's no excuse for a modern language not to have it.
>>
>>61288905
The TIOBE index is built on a proprietary data set gathered through methods that smell like bullshit and can't be independently verified. The langpop link is built on a publicly available data set that compares two criteria with obvious relevance to the actual daily utility of the languages in question. Both models are wrong, because they are models, but one of them is more useful.
>>
>>61288929
Isn't webkit with security problems?
>>
>>61288878
>>>/pol/
>>
>>61288950
What security problems?
>>
I know I shouldn't use databases as queues so I'm using RabbitMQ instead. But I have to get the data out of a database and into rabbit and that feels just like another queue.
>>
>>61288983
>using meme queues
>>
reddit says TIOBE takes results from... google

>>61288950
all complex programs are.
btw, you can use blink instead
>>
>>61288929
why? there's plenty of webkit frontends already
>>
imagine using a language that doesn't support multicore
>>
what is that book on the front?
>>
>>61288993
Well what else is there?
>>
>>61289010
Well I do use python for scripting.
>>
>>61289017
pipes
>>
>>61288857
Perhaps I should have been more explicit.
Ideally you wish to have a language that lets you succinctly (short in programming overhead, typing overhead is trivial to solve) let's you express solutions to your problems in code that the computer can understand.
Your problems may be numerous. It may be that you need a program that covers a wide range of input cases. It might have to run fast.

What it all boils down to is expressing relationships between input and output. Declarative languages like haskell are very good at this but sadly the tech isn't there yet to face certain other concerns.
A language like C is very powerful on the performance front. You get a lot of facility to express just how you wish this process to be and its not incredibly complicated to do so. But it suffers a lot in the places where haskell excels for instance.

That's my view. C is pretty complex. But it's certainly not complex compared to something like C++. You wish to keep complexity down where you can without hindering programmer productivity. C++ has an unbounded approach. Which wouldn't hurt you if you program alone but in teams it's often a mess. For instance templates being what they are is something which bites me a lot. My colleagues can't seem to keep to the simple solutions that lets our code base grow without large halts due to having to replace their template messes because they're unmanageable at a certain point.
That's where complexity starts to bite you. A hypothetical superhuman can always work his way through these situations but realistically it's not productive at a certain point.
They're slowly coming around to see this.
But the large praise i see for C++ doesn't seem to come from experienced developers.
>>61288865
Well done. I don't see why you'd write this on an anonymous imageboard but you managed to do it. I imagine that's quite the feat for you.
>>
>>61289024
Across multiple machines?
>>
File: lang.rank_.617.wm_.png (155KB, 1250x1120px) Image search: [Google]
lang.rank_.617.wm_.png
155KB, 1250x1120px
>>61288976
You died, but here, have this instead
https://redmonk.com/sogrady/2017/06/08/language-rankings-6-17/
>>
>>61289023
disgraceful anon
>>
>>61289010
>using asm
>current year
>>
>>61289052
enjoy having a single-core game
>>
>>61289052
Reminder that OCaml destroyed Intel Skylake.
>>
I just finished my SDL2/OpenGL OCaml bindings.

>>61289062
It doesn't bother me, and one day OCaml will be multicore. What annoys me most, is the lack of dependent types.
>>
>>61289062
kek
>>
>>61289035
>github
>stackoverflow
But those are places any decent porgrammer avoid so that kind of renders the whole graph pointless.
>>
>>61289099
Of course, good programmers avoid github and stackoverflow. They only post in /g/
>>
>>61289083
>one day OCaml will be multicore
Sure it will.

If a language doesn't have an big essential feature from the start, it's unlikely to ever have it.
>>
>>61289106
Good programmers refer to their bookshelves and never need to ask for help or collaborate with other people.
>>
>>61289023
>scripting
You mean "coding", don't you?
>>
>>61289052
Why the fuck did you make your own when there already exists bindings for those for ocaml.
Also you don't write bindings, you automatically generate them.
>>
Someone post one of those large programming challenge charts. I am looking for ideas for stuff to program.
>>
>>61289122
go have your roll thread in >>>/b/
>>
>>61289109
It will have it. It's just not a priority.

>>61289117
Please point me PublicDomain/Mit/Bsd SDL opengl bindings for OCaml not dependent of Opam.
>>
>>61289106
mild kek
>>
>>61288878
>Writen in C.
bwahahahaha, this will never happen
>>
Reminder that if you use libraries others have written you're essentially on a team and will have all the considerations a team member would need to have.
Regardless if you consider yourself a slave to the api you're given or you take the reins.
>>
>>61289106
this. we are elite programmers, unlike everyone else.

>>61289122
make a new thread, don't spam this one
>>
>>61288901
>>simple to use or understand
>lolno
not my problem you're a brainlet; intelligent people don't have any issues understanding c++
>>
https://www.microsoft.com/en-us/research/publication/implementing-algebraic-effects-c/#

C++, Rust, Java, C#, F#, Scala, OCaml BTFO
>>
>>61289133
>>61289150
We are past the bump limit, idiots. Just post the goddamn image already.
>>
>>61289142
They are doing a barebones browser and nothing humongous like firefox so is more than possible
>>
>>61289111
Yes of course, good programmers host their projects in book shelves and never for once share their ideas anywhere other than /g/
>>
>>61289142
Writing in C is exactly the reason it WILL happen. C is the language of programmers who get things done.
>>
>>61289149
>if you use libraries others have written
I don't tho
>>
>>61289154
Is it about algebraic data types?
>>
File: consider.jpg (29KB, 600x600px) Image search: [Google]
consider.jpg
29KB, 600x600px
new thread
>>61289173
>>
>>61289160
>barebones browser
you're fucking delusional, there's nothing """"barebones"""" about a browser
>>
>>61289176
Algebraic effects in C
>>
>>61289154
Is that actually supposed to be imressive?
>>
>>61289176
no
>>
>>61289183
>Algebraic effects in C
Oh okay
>>
>>61289013
tell me pls
>>
Procrastinating learning by browsing this site hoping for something about python.

Anyone got any resources for someone that knows how to use basic input?

Mostly lost as to where to go from here. Or what I can do with Python to start practicing to get better.

Short of a text adventure or calculator I'm fresh out of ideas.
>>
>>61291267
Basic syntax*****
Thread posts: 333
Thread images: 30


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