[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: 359
Thread images: 42

Previous Thread: >>56375507


What are you working on, /g/?
>>
>>56380391
thank you for not posting a fag thread.
>>
>>56380391
Thanks for posting anime.

First for Go and C.
>>
Rendering chaotic maps
>>
>>56380690
What the fuck is that font?
>>
How the fuck is someone supposed to learn realbasic?
>>
What do you guys think of VS Code, especially for C#?
>>
>>56380816
I'm using it for Rust and it's pretty nice.
>>
what's the difference between C and C++?
>>
>>56380391
Anyone want to start a rumble with /wdg/?
>>
Threadly reminder that haskell can't be used to make real-world programs because it's missing essential features
>>
>>56380876
Like?
>>
>>56380875
But anon, what if I program AND do webdev for fun on the side? Can't we all just get along?
>>
>>56380861
quality vs quantity
>>
>>56380816
>especially for C#?
Use Visual Studio.
>>
Hvordan kan jeg lære Scheme? Det er et vakkert programmeringsspråk.
>>
>>56381189
http://www.uio.no/studier/emner/matnat/ifi/INF2810/#learning-outcomes
>>
>>56380891
OOP
>>
>>56381206
More specifically
https://www.youtube.com/watch?v=-6yBN8rpuQs&list=PLn6pVFVk5Mr1r732e97DlV7onUbpRL9dj&index=1
>>
>>56381208
shit b8 m8
>>
>>56381206
>>56381226
Takk
>>
I have a question, I want to set up an ipsec vpn server on my raspberry pi 3 model B. In the setup, it mentions eth0. I'm guessing thats for the ethernet port going into the router. Well I also want to use it as a media center, so its going to be wireless so it sends video directly to a big screen. What in the set up of strongswan needs to be changed and to what to make it use its built in wifi? I realize that wireless usually slows things down, but my wireless signal already outperforms my ISP.
>>
File: 1466014312276.jpg.jpg (17KB, 411x292px) Image search: [Google]
1466014312276.jpg.jpg
17KB, 411x292px
>>56380844
I'm learning Rust right now, and I just started to go over the ownership system. How long did it take for you to get used to borrowing?
>>
>>56381374
Not long at all, although I had some previous experience with the concept through region-based memory management.

It might help if you annotate lifetimes yourself even when the compiler could do it for you, because lifetimes are the key to understanding the scope for which something gets borrowed.
>>
>shit at programming
>don't like doing it so won't get better
>stuck doing a cs degree

life is shit
>>
>>56381350
Pretty good album
>>
Why didn't we listen to Stallman?
>>
>>56381208
:)
>>
>>56381356
ethX is typically a label for a wired ethernet port

not sure what your wireless would be labeled as, but assuming you have some kind of linux on that pi, an 'ifconfig' at the command prompt should show you the available network connections

also you're probably better off posting this in /sqt/
>>
>>56380949
You cannot use Visual Studio on anything besides Windows at the moment. Someday, I hope, that you can.
>>
Today I have been working on a web-browser.
So far I've found that comboboxes are a fucking pain to work with in c#.
>>
>>56381428

Stallman would disapprove of your use of C#
>>
>>56381583
Stallman would disapprove of your use of proprietary ponies
>>
>>56381583

But now it's free as in freedom.
>>
File: smug_sad_pepe.png (75KB, 499x499px) Image search: [Google]
smug_sad_pepe.png
75KB, 499x499px
Do I like programming, or do I just like the comfy feeling of typing on a mechanical keyboard in a cozy darkened room with an A E S T H E T I C text editor?

The eternal question tbqhwymf (to be quite honest with you my family)
>>
>>56381669
I think you're just a fucking faggot
>>
File: le frogposting scum.png (146KB, 500x560px) Image search: [Google]
le frogposting scum.png
146KB, 500x560px
>>56381669
dumb frogposter
>>
>>56381408
should have gone for basket weaving before the bubble popped
>>
>>56380816
The fucking worst editor ever made, seriously. Stick to VS.
>>
Convince me why I should be a programmer
>>
>>56380391
Best editor for Ruby? And best resource to have a "crash course" about the lang? I haven't used in months and need a fast resource to catch up.
>>
>>56381753
Don't.
>>
File: 1776 commencing.png (3MB, 9168x3576px) Image search: [Google]
1776 commencing.png
3MB, 9168x3576px
>>56381776
>1776
>>
Anyone got project ideas? I have a month of free time. Open to any language and any type of project, just pitch em, I'm bored out of my mind.
>>
File: Jonestard.gif (208KB, 320x240px) Image search: [Google]
Jonestard.gif
208KB, 320x240px
>>56381805
Take that conspiratard idiot back to pol where it belongs.
>>
>>56381666

Mono was free, and yet he still bitched about people using it. Though then again, that was 7 years ago. It might be interesting to see if his views have changed given that...

1. The .NET runtime and Framework Class Library are now MIT licensed.
2. The C# and Visual Basic compilers, along with their code analysis APIs are now Apache 2.0 licensed (compatible with GPLv3, but not GPLv2).
3. PowerShell is now MIT licensed.
4. Since the acquisition of Xamarin from Microsoft, Mono is now under an MIT license, with a written promise from Microsoft not to claim patent infringement for anyone who uses or distributes Mono.

>>56381753

I recommend that you choose a different profession.

>>56381776

Sublime Text 3
_Why's Poignant Guide to Ruby
>>
File: Alex_jones_jerk_off.gif (638KB, 320x240px) Image search: [Google]
Alex_jones_jerk_off.gif
638KB, 320x240px
>>56381805
Of course the dumb poltard posts Alex Jones. How fitting.
>>
>>56381921
>Mono was free, and yet he still bitched about people using it.

That's because he has hot opinions and is a LISPfag.
>>
>>56381901
You're on the wrong website
>>
File: Polluter.png (34KB, 571x443px) Image search: [Google]
Polluter.png
34KB, 571x443px
>>56381965
You're on the wrong board, poltard.
>>
>>56382018

You can stop posting at any time, JIDF.
>>
File: Typical_pol_thread.png (934KB, 978x686px) Image search: [Google]
Typical_pol_thread.png
934KB, 978x686px
>>56382038
> MUH shills
> MUH JIDF
So typical for a dumb poltard like you. That's all you can muster up. So typical.
>>
test comment #1
>>
File: progr.jpg (174KB, 750x563px) Image search: [Google]
progr.jpg
174KB, 750x563px
In which programming languages you consider yourself fluent?
>>
>>56382092

<options> what?
>>
>>56382084
Doesn't having these images just prove that you are the /pol/ dipshit?
>>
>>56381405
Thanks for the advice, I'll make sure to explicitly state everything until it's second nature. I really like the language so far; I'm probably going to do most, if not all, of my work in it once I get the hang of it.
>>
>>56382107
PHP, JavaScript... Not fluent in SQL, and learning jquery.
>>
Man fuck C. There is some many useful assembly language paradigms they could have enforced in the language but didn't for god knows what reason. Fortran has computed gotos, B had computed gotos, even early version of C had computed gotos. For whatever reason it didn't make it into K&R and only recently has GCC made it an available language extension.

There isn't anyway to handle overflow at all. WHAT THE FUCK. Not even most C-descendant language have a way to check or handle this.

Not to mention it's 2016 now. Coroutines make programming easier and usually more efficient (see nginx). C++ is getting them, but they don't have zero runtime overhead so it will never be introduced to C.

What's the future of systems languages? It certainly isn't C++, it's based off the same flawed base as modern C is. Go has a GC; it was never meant to be a systems programming language. Rust canned coroutines because the implementation they had was slow. Otherwise it seems nice (although the pedantry of the compiler pisses me off at times).
>>
>>56382127
>>
>>56382194
Oh, and Rust is slow.
>>
>>56382127
Says tripfag dipshit. LMAO.
>>
File: current year.jpg (21KB, 240x255px) Image search: [Google]
current year.jpg
21KB, 240x255px
>>56382194
>it's 2016 now
>>
>>56382194

Dlang.
>>
>>56381583
>open standard
>have been free as in freedom compiler vendors for years (which were legal)
>microsoft made their own free as in freedom compiler literally 5 or 6 years ago
>microsoft open sourced their latest compiler
>.NET core also open sourced
pretty sure Stallman would approve, bud
>>56382107
literally all of them
>>56382238
it's literally faster than assembly dumbass
>>
>>56381921
How and why is MIT acquiring all those languages. Granted they have the finances... Academics ain't about licensing softwares. Positive endgame?
>>
>>56382194

>There isn't anyway to handle overflow at all
This is by design.
>>
File: smug spiclard.jpg (41KB, 524x744px) Image search: [Google]
smug spiclard.jpg
41KB, 524x744px
>>56382287
>faster than assembly
>>
>>56381753
Program your life.
>>
>>56382306
MIT hasn't acquired them. They're jut licensed under the MIT license, which basically says "do whatever you want to the code, just include this license with it".
>>
>>56382306
if you donate your language to MIT they give you a free degree
>>56382317
assembly can't even compete tbqh it's an order of magnitude difference
>>
>>56382306

MIT doesn't own them. The software is licensed with a public license designed by MIT.

>>56382281

Has a GC, so it's automatically invalid.
>>
>>56382351
>Has a GC
Not for long
>>
>>56382351
>Has a GC

An optional one.
>>
File: 3ecbbe197e.png (38KB, 661x455px) Image search: [Google]
3ecbbe197e.png
38KB, 661x455px
>can't use open() with https
baka desu senpai
>>
>>56382375
LOL Rubyfags rekt .
>>
>>56382281
Lol? Overflow is still UB. GC = unnecessary and unpredictable context switches on potential real-time or near-real-time code. And that's just the things I brought up.
>>
File: 1407823691854.gif (594KB, 249x214px) Image search: [Google]
1407823691854.gif
594KB, 249x214px
I made some modifications to my program so that if you run it with a

--test

parameter, it runs in a temporary test environment. All files it normally creates/reads from are in a temporary directory and it uses an in-memory database. Once you finish with the program, everything gets cleaned up.
>>
>>56382338

It doesn't even require that you keep the license, just that you keep the copyright. You can relicense it however you want as long as the original author is given accreditation.

>>56382344

>Assembly can't even compete
>With a language that compiles to assembly
NV, don't be a fucking retard. You could say that no human is going to write as efficient assembly as is generated by Rust, and you might be half right (but I would counter that many compilers won't generate specific instructions that might do a job faster, like bswap for a change to network byte order), but you can't say that it's faster than assembly on the whole, because it literally compiles to assembly.
>>
>>56382426
Kill yourself weebtard.
>>
>>56382441
rust doesn't get compiled to assembly it uses quantum binary codes
>>
>>56382441
You got trolled my dude.
>>
>>56382426
good job my man
what does your program do though
>>
File: smug aura.png (204KB, 500x374px) Image search: [Google]
smug aura.png
204KB, 500x374px
>>56382442
Someone's triggered :^)
>>
>>56382399

The GC is optional. You would know that if you weren't a memelord poopyhead.
>>
>>56382460
dubs don't lie >>56382455 >>56382344
>>
>>56382375

Works on my end with Ruby 2.3.1 on Linux...

Also
>Unregistered

http://appnee.com/sublime-text-3-universal-license-keys-collection-for-win-mac-linux/

You're fucking welcome.
>>
>>56382442
Why are you so mad? go back to 9gag, newfag.
>>
>>56382465
It's kind of like a booru but with a better (for me anyways) interface and can handle both images and archives.
>>
>>56382509
Sounds nice.
Keep on workin'!
>>
File: le smug anime jester.jpg (397KB, 1400x1600px) Image search: [Google]
le smug anime jester.jpg
397KB, 1400x1600px
>>56382442
>>
File: 1404999945899.png (58KB, 501x280px) Image search: [Google]
1404999945899.png
58KB, 501x280px
>>56382107
>Clojure made the list
>>
>>56381901
>>56381958
>literally just getting triggered at seeing Alex Jones
like pottery
>>
You won't believe what this incredible perl snippet does! Run it now or risk losing out on the most fun you've ever had!

$??s:;s:s;;$?::s;;=]=>%-{<-|}<&|`{;;y; -/:-@[-`{-};`-{/" -;;s;;$_;see
>>
>>56382107
Who /75%/ here?
>>
>>56382576
Thanks, I just got a gf
>>
>>56382505
I actually updated to 2.3.1 (was using 2.2) and didn't werks too ;_;
>>
>>56382375
Well, that's annoying. It is thinking the cert is invalid. (Are you behind a proxy?) Does it with work with Google?

Either way, you can bypass this check by passing this as a second argument to open().

{ssl_verify_mode: OpenSSL::SSL::VERIFY_NONE}
>>
>>56382576

LW has truly graced us with programming excellence.
>>
>>56382624
Also, you should gem install pry, it's super-helpful for playing around with things like this. One thing you can do is "require 'pry'" then put "binding.pry" somewhere in your code to act as a breakpoint that drops you into the REPL at that point of execution.

Also pry-doc will give you some gnarly documentation accessible from the REPL, and pry-debugger gives you the ability to navigate the stack. (With help in the normal pry "help" command)
>>
>>56382107
Racket and C++.
>>
>>56380875
Stay golden, ponyboy, and always use C++ and Python.
>>
>>56382573
It's that same asshurt samefag throwing a tantrum at every other post ranting about "stormtards".
>>
File: 001 - Gentoo-tan and Troll-tan.png (858KB, 1500x1250px) Image search: [Google]
001 - Gentoo-tan and Troll-tan.png
858KB, 1500x1250px
>>56382545
>>
>>56382624
>Are you behind a proxy?
>Does it with work with Google?
No and no.
When I pass that second argument
page = open("https://accounts.pixiv.net/login?",{ssl_verify_mode: OpenSSL::SSL::VERIFY_NONE})

Says
>uninitialized constant OpenSSL (NameError)
>>
>>56382767
That should have been pulled in by open-uri.

"require 'openssl'"
>>
>>56382723
>gentoo-tan
moar
>>
>>56382787
As rule of thumb, if the first name in something doesn't exist--if you downcase that name, you can often require it to get what you want.
>>
what is the best language for making 2D games? I was thinking of using pygame since python is my language of choice, but I've never used it to make games before.
>>
File: Gentoo-tan.jpg (321KB, 1024x768px) Image search: [Google]
Gentoo-tan.jpg
321KB, 1024x768px
>>56382802
There's actually not that much.
>>
File: 03.jpg (58KB, 640x454px) Image search: [Google]
03.jpg
58KB, 640x454px
>>56382860
>>
>>56382787
>>56382813
Thanks senpai, that worked!
Going to try Pry, too.
>>
what is c used for these days?
>>
>>56382917
Pooing in loo
>>
>>56382917
Microcontrollers programming.
>>
>>56382917
Real programming
>>
>>56381753
Hack the planet
>>
what's the best cheapest single board computer?

the pi0 is only $5 and the specs look more than good enough for anything I would use it on, but it doesn't have a wifi card on board which makes it kinda shit

does anybody have a nifty comparison chart of the sub-$15 ones?
>>
File: 1454010683342.png (10KB, 122x120px) Image search: [Google]
1454010683342.png
10KB, 122x120px
>>56382894
No prob.

Also, even though pry is a REPL, you can also use it kinda like a shell... So that means that you can "cd something" to change your context as if variables and fields were folders, and "ls" to see whats inside of them. You can even run methods from these "kinda folders" as if they are programs in the current directory. It does wonders for discovering the right things to do.

What's more is that "? <thing>" will also pull documentation for that thing if you have it installed. And this documentation often is filled with pretty examples on how to use the thing you are looking up.

Pry is one of the best REPLs for just playing around with things, and can often teach you more about libraries than most other means.

Also, if you use Pry as a debugger, all of the above works from any given point in your program. You just need to drop a "binding.pry" somewhere after requiring pry.

Pry's help can tell you quite a bit more, it is much more helpful than a lot of help systems I find. (Just "help" at the REPL)

Good luck..!
>>
>>56380690
actually saved as a wp
>>
>>56383017

Something like this?

https://www.indiegogo.com/projects/omega2-5-linux-computer-with-wi-fi-made-for-iot#/

The original Onion Omega is $20, this one's $5. Both run over wifi. Not sure how long it'll take for them to ship the Omega 2.
>>
>>56383221
>>>/sci/8312198
I posted a mega link with the source code if anyone wants to tinker with the program. It doesn't have my most recent changes tho.
>>
>>56383497
those specs are kinda shit compared to the pi0 or CHIP. I wonder why.

it's better than anything else I've seen at the $5 price point though - I'll have to keep an eye out for it when it comes out.
>>
File: bumba.gif (88KB, 10000x10000px) Image search: [Google]
bumba.gif
88KB, 10000x10000px
been working on this fucking gif, finally works
>>
What's Lua used for these days?
>>
>>56380391
just started comp sci degree, we are learning some basic c, any tips on some self study boys? where to learn and stuff
>>
crazy simple server-client java project for web programming class.

all I have to do is send GET requests to the server and receive back plain text documents.
>>
>>56383692
thanks fuckface
>>
>>56383903
What?
>>
File: .gif (30B, 10000x10000px) Image search: [Google]
.gif
30B, 10000x10000px
>>56383692
>88KB

scrub
>>
>>56383911
I don't know about him, but it crashed all my 4chan tabs

only the 4chan ones, interestingly.
>>
std::mt19937 randomEngine((unsigned int)std::chrono::high_resolution_clock::now().time_since_epoch().count());

wew
>>
>>56383692
crashed my browser
>>
>>56383911
It froze my laptop for a while. It's still sluggish as I post this because it's busy "unswapping".
>>
What y'all niggas programming to
https://www.youtube.com/watch?v=AeMryNU9rPE
>>
>>56383692
>>56383918
What is the purpose of these gif? Size?
>>
>>56384446
https://www.youtube.com/watch?v=tySo7kCou0Q
>>
>>56384446
Fuggin your mom
>>
>>
>>56382576
How do I run it?
>>
File: 75b.jpg (47KB, 680x505px) Image search: [Google]
75b.jpg
47KB, 680x505px
>>56384446
This sick composer:
https://soundcloud.com/sakuzyo/kronos-bms-edit
https://soundcloud.com/sakuzyo/nein

Basically one easrgasm after another.
>>
File: Madhhab_Map2a.png (55KB, 1245x604px) Image search: [Google]
Madhhab_Map2a.png
55KB, 1245x604px
Whats wrong with this?

public static String decToBin(String decimalValue) {
int valueAsNum = Integer.parseInt(decimalValue);

int quotient, remainder;
String result = "5";

do {
quotient = valueAsNum / 2;
remainder = valueAsNum % 2;

if (remainder == 0) {
result += "0";
} else {
result += "1";
}
} while (quotient != 0);

return result;
}
>>
>>56384760
ignore "5", typo
>>
>>56384760
it takes a string as the argument
>>
>>56384802
i change it to an int so thats not a problem i dont think
>>
>>56384760
you're dividing by 2, not 10
>>
File: whew.png (13KB, 57x71px) Image search: [Google]
whew.png
13KB, 57x71px
>>56384823
daaamn, thanks
>>
>>56384823
>>56384831
wait no, im supposed to divide by 2 pretty sure
>>
>>56384837
You are
>>
>>56382107
TI Basic
>>
>>56384837
fuck, you're right
What exactly was your problem again?
>>
>>56384870
its just runs/loops forever... im trying to pinpoint why and it seems like somethings up with quotient or the while condition, but it makes perfect sense so idk
>>
>>56384905
You're getting quotient from valueAsNum, but never changing valueAsNum
>>
>>56384914
so obvious now, thanks
>>
File: 1396661270347.jpg (169KB, 645x670px) Image search: [Google]
1396661270347.jpg
169KB, 645x670px
So /dpt/... If you could instantly master one language completely with all of its idioms in no time without any effort, what would you choose?

Would it be a practical language to find work somewhere?
Would it be a hobby language for side projects?
Or maybe something you have a passing interest in but see lots of potential?
Maybe you have a pet language you would want to write something awesome with?
>>
>>56384929
>Would it be a practical language to find work somewhere?
This.
>>
import std.stdio;

int[] decToBin(int input)
{
int[] ret;
while(input)
{
ret ~= input % 2;
input /= 2;
}

return ret.reverse;
}

void main(string[] args)
{
writefln("%(%s%)", decToBin(10));
}
>>
>>56384929
>Java/python/javascript for work
>python for hobby/sideprojects
>>
>>56384929
actually, it depends what kind of side projects. If it is something small, python. If you wan't something that can do some amazing shit, C or C++ with ASM, literally an unlimited amount of shit you can do
>>
>>56384446
listening to the new isaiah rashad album
>>
>>56384955
>that indentation
Damn you Emacs
>>
>>56384929
I would want to master Clojure.

>It is very terse
>It is very fast
>It can be used for everything from web development to game development to desktop applications
>It also already has a massive set of libraries it can tap into because of both Clojure AND Java.

But most importantly, it seems like the most pleasant language to work with on things and lines up very much with how I like developing things.

If I was a complete master at it, I would probably start a business with it honestly.
>>
>>56384929
D, once they finally implement good memory management, it'll be a good general purpose language
>>
>>56385007
For real, maybe if it gets some momentum behind it we can strangle Rust in the crib.
>>
>>56382576
http://codepad.org/Mj4njATT
Hurr. I'm guessing it's just a forkbomb.
>>
File: Sigh.gif (939KB, 500x281px) Image search: [Google]
Sigh.gif
939KB, 500x281px
>>56384737
docker run -it --rm ubuntu
perl
<paste it>
^D


Anyway >>56385168, it's no fork bomb.
$ docker run -it --rm ubuntu
root@36c2e7b0c453:/# perl
$??s:;s:s;;$?::s;;=]=>%-{<-|}<&|`{;;y; -/:-@[-`{-};`-{/" -;;s;;$_;see

rm: it is dangerous to operate recursively on '/'
rm: use --no-preserve-root to override this failsafe
root@36c2e7b0c453:/#
>>
>>56382576
lul
http://ideone.com/sAA3bx
>>
>>56384972
Hail asm & C
>>
File: 71cWa92TMyL.jpg (194KB, 931x1398px) Image search: [Google]
71cWa92TMyL.jpg
194KB, 931x1398px
Would /g/ recommend this to a beginner, even if they're not learning scheme?
>>
>>56385346
It's a first year CS textbook, it is written for beginners.
>>
>>56385007
>>56385079
So, what's the deal with D anyway? I know people like it, but I don't know much about the language.
>>
File: 22386.jpg (93KB, 601x795px) Image search: [Google]
22386.jpg
93KB, 601x795px
>>56382426
Ever think of releasing the source? Sounds interesting.
>>
>>56382836
C# with Unity, C++ with Unreal. You could also build one from the base up, there I'd recommend the above two or Java.
>>
>>56382836

C++ with SFML.
>>
>>56385433
It's essentially a more modern C++ with some nice meta-programming capabilities. The neat thing is that once they make the GC completely optional, it'll be a nice, well-rounded tool for programming. I also like the community behind it.
>>
>>56384972
this is why I spent $170 on three c books which supposedly teach you all the nooks and cranies of modern c
>>
>>56382107
python java javascript c# go lua
>>
>>56382107
JavaScript is my absolute best.
I am really good at Java.
Pretty good at Ruby.
Quite good with PHP.
Good with C.
And Pretty ok with Clojure.

Everything else I either don't know, or am complete ass at.
>>
>>56385615
Oh, neat.

It looks like it would need a pretty smart compiler for some of the things I am reading about it.
>>
>>56385702
Andrei and Walter Bright are pretty capable dudes supported by a smart community
>>
Which D compiler should I use lads?
>>
>>56385913
you mum compiled my d pretty well last night
>>
>>56385913
Just go with DMD
>>
>>56385913
so, is D on par with sepples or c?
>>
>>56385941
DMD seems to be the slowest though.
>>56385942
Looks to be about the same really, negligibly faster in some areas and slower in others.
>>
>>56385917
haha good one
>>
>>56384760
It's in Java.
>>
How does /dpt/ feel about imgui?
>>
File: Boris_1386078723.jpg (68KB, 528x792px) Image search: [Google]
Boris_1386078723.jpg
68KB, 528x792px
Which algorithm should I learn first - quicksort or mergesort?

thank u
>>
>>56386327
merge sort
quickstort is pissy sissy
>>
>>56386327
>Learning sorting algorithms
What is this? The year 2000?
You use a library for that.
>>
>>56386517
99% of the people in these threads are unemployed "hobbyist" programmers, let them have their fun.
>>
>>56385612
>SFML
Just no. Use sdl instead, or glfw if you want raw opengl.
>>
>>56386530
or are in college, and need to know the algorithms to pass their programming class. Many probably still think that these algorithms will be a huge part of their jobs, and they won't just be using list.sort() all the time.
>>
>>56386530
t. NEET
>>
>>56383720
Minecraft mostly.
>>
>>56386639
>projecting
>>
>>56386643
Isn't lua mostly popular with gmod in terms of game extension?
>>
>>56383720
I've been enjoying playing with love. There's a (nowhere near perfect) port to the 3DS which makes for really easy homebrew. I just wish it used the most recent version of lua.
>>
>>56383720
Mostly vidya game scripting.
>>
I want mentoring fr programming.
Where do I usually get this?
>>
>>56386546
What's wrong with SFML exactly?
Also SDL's renderer is B A D.
>>
>>56387284
You don't, you learn yourself
>>
>>56380391
Working on some simple WFA in Visual studio that currently pulls out a Sharepoint list and displays it on a Datagridview and clicking on a row displays the values inside some text boxes and drop down list where the user can choose to edit said value if they wish, or if they add something new to the list. Can also hold Shift/Ctrl and click to select multiple entries and delete all selected rows too. The code is shitty as hell but it works, though it most likely can be cleaned up and made shorter but I aint good enough for that yet.

Right now I have a problem though, I want to switch to another view in Sharepoint, as in instead of showing the default "All items" view, I can switch to a custom view that is filtered in some way and display it in the datagridview. I can't find much examples and info online so I do not understand the logic yet. Since I'm using WFA, I cannot use SPView or such things but rather have to use ViewFieldCollection and View I believe but I've yet to manage to make the other view show. Anyone that has any idea of how this should be done to make it work properly?
>>
>>56387284
You can join IRC/Discord servers specific to the language if you need some help, but generally speaking the only real way to go about it is to do a few basic tutorials online for whatever language you choose (i recommend C# but that's just me) and then you play around with some simple ideas, using Google to find solutions to each individual problem as they arrive.

After a few months of dicking around and learning bits and pieces you'll be at a place where you can confidently add new concepts and language features to your toolkit in an hour or two.
>>
>>56387514
This, it's also worthy to mention that the most important thing to learn first is the logic and thinking. Things will be much easier for you once you understand the thought process and logic behind programming languages. Just memorise the basics and try to do your own little projects as much as you can, doesn't have to be anything special or anything that will be actually used.
>>
>>56387486
Sorry I can't answer you but what do you think of Sharepoint? Is it worth learning it?

Rhere are good job opportunities in my area for Sharepoint, but when I tried it one year ago, the code behind it felt very messy. I was kinda lost actually, so I gave up the idea, but the jobs pay way more than my current one (the company using sharepoint is old and quite big here), so I don't know if I should try it again. Does it have any future?
>>
>>56387582
I honestly do not know much about Sharepoint currently, I am mostly used to C#, Dot net and SQL but I'm still pretty shit. So far, my impression is that it's a bit of a chore to work with since you can't use SQL commands to sort, filter, switch and so forth but instead have to rely purely on C# coding to access and manipulate it.

Though that is assuming that you're using C# or some other language to access and use the list. Honestly though, I'm a newbie so I can't say whether it has any future or not. I personally think it's a bit more complicated to use than SQL and a lot more work.
>>
>>56387301
It's mostly the devs i can't stand.
>Media library
So it wants to be a media library and comes with a free coffee machine. But somehow they don't want to include some simple linear algebra functionality? You know, since pretty much all media has to do these kinds of operations.

I'm not even asking for much, just a few vectors and matrix functions. Not even simd accelerated or anything. Just so I don't have to use another library for simple media applications but nooooo.

The day they add that functionality is the day I have a reason to pick it over sdl.
>>
File: adacode.png (24KB, 606x544px) Image search: [Google]
adacode.png
24KB, 606x544px
I'm learning Ada because I want to move to the middle of nowhere and do legacy code for those porking government contractor firms.

I'm having a hard time with procedure dispatching and constraint errors.
>>
File: ada.png (4MB, 4800x2700px) Image search: [Google]
ada.png
4MB, 4800x2700px
>>56388385
>use
>use
>use
Why are all modern languages becoming this?
>>
File: anal beads.png (5KB, 83x481px) Image search: [Google]
anal beads.png
5KB, 83x481px
>>56388428
A-anon, I...
>>
>>56388428
because the devs believe that a hugely nested standard library with very narrow namespaces is good instead of a standard library that is as flat as possible making namespaces as wide as possible
>>
>>56387284
A university. Sometimes a job. Getting a mentor outside of these two places is akin to pulling teeth unless you have a friend who got into programming years earlier. You need to learn the basics before any of that, though.

>>56386662
Yes.
>>
>>56388428
shorter than using or import
>>
>>56388496
I feel like this is a sign for you to refactor your code a bit. How big in this file?
>>
File: 1448259211693.jpg (32KB, 423x364px) Image search: [Google]
1448259211693.jpg
32KB, 423x364px
>>56382107
none
>>
>.NET
>dot net
>bot net
>botnet

Coincidence?
>>
>>56388576
It's actually my scratchpad project, where I go to create one-off methods and test them, so basically it's a graveyard of a myriad of various methods that I leave in it so I can go back and look at them later if I forget.

It's about 3k LoC in one file.
>>
>>56388641
>C
>Crap

Coincidence?
>>
File: dpt kill yourself.png (459KB, 796x913px) Image search: [Google]
dpt kill yourself.png
459KB, 796x913px
>>56388641
>C++
>see plus plus
>see add add
>C add add
>CADAD
>DADAC
>DA DA C
>DADDY C
>DADDY COCK

C++ users confirmed for incestuous degenerates.
>>
>>56388700
>get die!
>lost!
>>
package sample;

import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.canvas.Canvas;
import javafx.scene.canvas.GraphicsContext;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.StackPane;
import javafx.scene.paint.Color;
import javafx.scene.paint.ImagePattern;
import javafx.scene.text.Font;
import javafx.scene.text.FontWeight;
import javafx.stage.Stage;

public class Main extends Application {

public static void main(String[] args) {
launch();
}
public void start(Stage stage){
stage.setTitle("Hello");
stage.show();

Group root = new Group();
Scene scene = new Scene(root);
stage.setScene(scene);

Canvas canvas = new Canvas(200,300);
root.getChildren().add(canvas);

GraphicsContext gc = canvas.getGraphicsContext2D();

gc.setFill(Color.DARKOLIVEGREEN);
gc.setStroke(Color.ROYALBLUE);
gc.setLineWidth(2);
Font theFont = Font.font("Times New Roman", FontWeight.BOLD, 47);
gc.setFont(theFont);
gc.fillText("Hello World!",60,50);
gc.strokeText("Hello World", 60,50);

StackPane sp = new StackPane();
Image img = new Image("http://www.queness.com/resources/images/png/apple_raw.png");
ImageView iv = new ImageView(img);
iv.setImage(img);


}

}


So, what did I miss?
Why can't I display this shitty image from a shitty website?
>>
Daily reminder that Rust is based.
>>
>>56381408
Use your CS degree to go into security analysis or IT network administration or something instead.

Unless you also hate those things.
>>
>>56382107
Fluent? None.

I am a jack of all trades instead. (Except Haskell. Still need to learn some functional shit.)
>>
for i in range(100000):
print(i)

If i run the above Python in Pycharm it takes less than a second to complete.
If i run it in a terminal it takes ~2 seconds.
But if i run it in IDLE it takes several minutes.

Am i overlooking something, or is IDLE just shit?
>>
>>56382573
>>56381901
>>56381958
>>56381805
Does /pol/ even like Alex Jones? He's not even a racist, he just thinks Deus Ex is real life. He rants about how crypto-fascists are trying to do away with democracy. /pol/ hates democracy because the entire board is Menicus Moldbug sockpuppets.

I don't get the connection.
>>
why are enterprise business devs so fucking obsessed with models?

>you have to use MVC no matter what!!!
>you have to use dependency injection!!! what if you need to change backends with a gun to your head and you only have 5 minutes???

I notice that the mentality, especially among .NET dev, is that of changing the problem to fit the solution, and it pisses me off big time.

but the absolute worst is that half the time their only defense for those decisions is to name drop shit.

>hurr have you even heard of IoC
>I can't explain why it's good but it's good use it
>>
>>56389045
>>you have to use dependency injection!!! what if you need to change backends with a gun to your head and you only have 5 minutes???

but

globals are actually bad.

I understand getting mad at people forcing MVC in situations where it makes no fucking sense, though.
>>
>>56387849
>The day they add that functionality is the day I have a reason to pick it over sdl.

Hold the fucking phone.

SDL doesn't have vectors and matrix functions either, does it?

Or is this a thing that changed in the move to SDL2 and I never noticed?
>>
>>56389055
the opposite of DI is not globals

>>56389045
the best thing you can do is to git gud and actually understand the shit they're name dropping and argue on that basis
if someone told me to apply DI/IoC everywhere i'd argue on the same level in favor of DRY and explain how full DI goes against DRY and tell them that the optimum between those two principles is somewhere other than a DI extremum.
>>
>>56388965
Use image view with the URL directly
>>
Can someone explain to me what's wrong with this code?

I keep getting the "expected class-name before '{' token" error, but Google answers only lead me to solutions I have already tried and everything seems to be included fine.

EffectInterface.h
#ifndef EFFECT_INTERFACE_GUARD
#define EFFECT_INTERFACE_GUARD

class EffectInterface{

public:

virtual void printEffect() = 0;
};

#endif


Effect.h
#ifndef EFFECT_HEADER_GUARD
#define EFFECT_HEADER_GUARD

#include "EffectInterface.h"

class EndConversation : public EffectInterface {

void printEffect();

};

class IncreaseAffection : public EffectInterface {

void printEffect();
};

#endif
>>
>>56389045
Because probably you are not the only programer working on a project. In the future there will be other programers, which will work on the code you wrote years ago. These people will have an easier life understanding your code, if your code is following an underlying, well understood and well known model (like MVC e.g.).
>>
>>56389055
I get the general idea behind it.

>need singleton
>static class can't implement interfaces
>interfaces make unit testing and code refactoring easier

and that's only a part of it. but this is not a large scope project. we are not going to ship this to anyone. we are extremely unlikely to change backends or do anything that would require drop-in refactoring. and if we do, 95% of the work still needs to be done either way.

right now this all feels like extra boilerplate with little to show for it.

>>56389100
>the best thing you can do is to git gud and actually understand the shit they're name dropping and argue on that basis
I'm of the opinion that if you can't explain something, you don't understand it.

>>56389125
>These people will have an easier life understanding your code
absolutely fucking not. I'm using some third party library's methods to instantiate objects instead of the language's built-in constructs.

a good programmer shouldn't rely on fucking memes to be able to read and interpret somebody else's code.

I absolutely guarantee you this fad will be gone by the time anybody else works on this.
>>
>>56389168
>I'm of the opinion that if you can't explain something, you don't understand it.
they know the term, you don't. sure, they're name dropping shit, but you certainly have the upper hand in the argument if you can actually explain the thing they're name dropping and name concrete limitations of that principle while they only know the name of the principle and that it's good.
>>
>>56389122
use
 #pragma once 
>>
>>56389168
>a good programmer shouldn't rely on fucking memes to be able to read and interpret somebody else's code.
Yeah, but not everybody is a good programmer. Some are average and some others are just bad.
>>
>>56389228

Why not the #define include guards he is using right now?
>>
>>56389239
It's old and obsolete. pragma once is much cleaner and safer to use.
>>
>>56389055
We use globals in our vidya games.
Way less retarded than singletons.
It's pointless to always check if it has been initialized.

Do you check each time if a library has been initialized everytime you call it? Of course not.
>>
>>56383720
mpv scripting
>>
>>56387849
>>56389077
Use OpenGL + GLFW already
>>
>>56380391
writing a chat program, terminal, client-server in python with encryption messaging. You login with a rsa public key then if you wish to talk "privately" with somebody you encrypt the random number for AES symmetrical encryption. Works both ways.

Right now it's spaghetti code, knees weak.

Right now i'm trying to create a prompt that updates the time while the program is waiting for input. Not using curses because cross platform [except apple]. But found a solution, I'll handle key strokes so yeah when I implement that, and clean the code ill put it on github.
>>
>>56389002
idle is shit
> ide uses space when you use tab
> not even option to use tabs when tabs
>>
>>56389202
>>56389233
I appreciate what you guys are telling me but it's a bit disheartening.

if the burden is on me to learn every single fad in depth in order to shoot them down, and to write my code in a way that total morons can work with it, then I might just switch careers.
>>
>>56389269
globals are like gotos

for the longest time you think they're unequivocally shit because everybody says so

until you realize they're really not
>>
OKay, it works.
But how can I make it a tad bit faster?
Running the file takes time.

package sample;

import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.canvas.Canvas;
import javafx.scene.canvas.GraphicsContext;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.StackPane;
import javafx.scene.paint.Color;
import javafx.scene.paint.ImagePattern;
import javafx.scene.text.Font;
import javafx.scene.text.FontWeight;
import javafx.stage.Stage;

public class Main extends Application {

public static void main(String[] args) {
launch();
}
public void start(Stage stage){
stage.setTitle("Hello");


Group root = new Group();
Scene scene = new Scene(root);
stage.setScene(scene);

Canvas canvas = new Canvas(1024,760);
root.getChildren().add(canvas);

GraphicsContext gc = canvas.getGraphicsContext2D();

gc.setFill(Color.DARKOLIVEGREEN);
gc.setStroke(Color.ROYALBLUE);
gc.setLineWidth(2);
Font theFont = Font.font("Times New Roman", FontWeight.BOLD, 47);
gc.setFont(theFont);
gc.fillText("Hello World!",60,50);
gc.strokeText("Hello World", 60,50);


Image img = new Image("http://www.queness.com/resources/images/png/apple_raw.png");
gc.drawImage(img,100,200);
stage.show();
}

}



Also, is do you know how I could access a picture file in the root folder of any project?
>>
>>56389299
That's what I did when I was writing 2Dshit, I just thought you were saying pure SFML compares unfavorably to pure SDL.

I can tell you with certainty that you can also mix SFML with OpenGL, because I did it. No hacks, justwerks.
>>
>>56389168
>but this is not a large scope project. we are not going to ship this to anyone. we are extremely unlikely to change backends or do anything that would require drop-in refactoring. and if we do, 95% of the work still needs to be done either way.
>right now this all feels like extra boilerplate with little to show for it.
Oh, yeah, that makes sense.

I would also say that singletons make multithreading / async impossible without a rewrite but you're also unlikely to need multithreading, I'm going to guess.
>>
>>56389363

The whole "you should avoid these" thing came as a result of overuse. Not everything needs to be a global, and we've got better flow control than goto.
>>
>>56389363
If you let newbies use globals or gotos they will write horrendously shit software.

Only people who are used to writing code in other ways should try to use these constructs, I think.
>>
Can someone tell me what is problem:
I'm using php shell_exec to get ts3server status, problem is that output from terminal and output on website are not same.
In terminal i get server is running but on website i get "Server seems to have died".
Server is online btw.
>>
>>56389580
Solution: Stop using PHP.
>>
>>56380391
>/dpt/ - Daily Programming Thread
more like
Daily PHAGGOT Thread
>>
>>56389587
That is not solution
>>
>>56389351
the issue is that occasionally, in very rare cases, a bit of boilerplate can actually be a good thing (explicitness can be good for readability, for instance, or in some cases it *actually* makes sense to add a point for future extension).
because of that, simply saying "boilertplate sucks" to your peers when they're trying to apply some bullshit pattern that adds nothing but boilerplate and unnecessary extension points doesn't work.
as i said, you gotta know the limitations of whatever they're trying to use and name the disadvantages.
most people are blue eyed and believe things like SOLID, IoC, DRY or whatever other fucking stupid principle there is have no disadvantages, while in reality software engineering is all about finding the optimum between different ideas.
basically, these things exist because people desperately need ways to communicate why certain code is good.
knowing the principles and the names is good, following them blindly isn't.
>>
Why is the thred so ded?
>>
>>56389629
It's Friday morning in burgerland.

Kids are in class, the employed are at work, and the NEETs are still asleep and/or currently masturbating.
>>
>>56389661
>the employed are at work
that never stopped anyone with a desk job :^)
>>
>>56389690
True that, I'm at the office right now.

In fact, the only time I'm on /dpt/ is when I'm at the office.
>>
>>56389661
16:48 here
work for 12 more minutes
>>
>>56389725
I bet you're in...
>most of continental Europe is GMT+1
fuck
>>
>>56389700
Same here.
I have no work assigned, so I'm programming some personal project I'm making.
>>
>>56389752
im in poor part,of Europe
>Eastern>Balkan>Ex-Yu>Serbia
>>
>>56389780
>I have no work assigned, so I'm programming some personal project I'm making.
NO, DON'T DO THAT

They own the intellectual property of anything you write on their time.
>>
>>56382107
>Python
>Java
No wonder shit's so slow
>>
>>56384929

>So /dpt/... If you could instantly master one language completely with all of its idioms in no time without any effort, what would you choose?

C++, obviously.

I'll never touch C++ in real life with a ten foot pole, but if I could be master a language in one second, then this.
>>
>>56389816
Don't forget
>Ruby

IIRC Ruby is literally the slowest language, unless that's actually PHP. Maybe they're tied. I don't know.
>>
>>56389811
I have made no contract yet and I'm using my personal computer to do this. So I'm still the owner of the code.

But thanks for the advice. I'll be extra careful with that when I sign.
>>
>>56389899
Ruby is WAY faster than Python.
http://benchmarksgame.alioth.debian.org/u64q/ruby.html
>>
>>56390007
(Though yeah, it is not exactly a fast language)
>>
>>56389897
I'm surprised I haven't seen this answer more often. C++ is an incredibly complex language, so learning it instantly would be a bigger jump than most other languages.
>>
>>56390007
Everybody still sticks to Python 2.x yet.
>>
>>56390007
Holy shit.

I was curious how Clojure stacked up: http://benchmarksgame.alioth.debian.org/u64q/compare.php?lang=clojure&lang2=python3
>>
thought of mine solution to project euler 43? running fast very quick only 0.02 second


int main() {
int a1,a2,a3,a4,a5,a6,a7,a8,a9,a10;
for(a1=0;a1<10;a1++)
for(a2=0;a2<10;a2++)
if (a1 != a2)
for(a3=0;a3<10;a3++)
if (a1 != a3 & a2 != a3)
for(a4=0;a4<10;a4++)
if (a1 != a4 & a2 != a4 & a3 != a4 & a4 != 1 & a4 != 3 & a4 != 5 & a4 != 7 & a4 != 9)
for(a5=0;a5<10;a5++)
if (a1 != a5 & a2 != a5 & a3 != a5 & a4 != a5)
if (((100*a3+10*a4+a5)/3)==((100*a3+10*a4+a5)/3.0))
for(a6=0;a6<10;a6++)
if (a1 != a6 & a2 != a6 & a3 != a6 & a4 != a6 & a5 != a6 & a6 != 9 & a6 != 1 & a6 != 2 & a6 != 3 & a6 != 4 & a6 != 6 & a6 != 7 & a6 != 8)
for(a7=0;a7<10;a7++)
if (a1 != a7 & a2 != a7 & a3 != a7 & a4 != a7 & a5 != a7 & a6 != a7)
if (((100*a5+10*a6+a7)/7)==((100*a5+10*a6+a7)/7.0))
for(a8=0;a8<10;a8++)
if (a1 != a8 & a2 != a8 & a3 != a8 & a4 != a8 & a5 != a8 & a6 != a8 & a7 != a8)
if (((100*a6+10*a7+a8)/11)==((100*a6+10*a7+a8)/11.0))
for(a9=0;a9<10;a9++)
if (a1 != a9 & a2 != a9 & a3 != a9 & a4 != a9 & a5 != a9 & a6 != a9 & a7 != a9 & a8 != a9)
if (((100*a7+10*a8+a9)/13)==((100*a7+10*a8+a9)/13.0))
for(a10=0;a10<10;a10++)
if (a1 != a10 & a2 != a10 & a3 != a10 & a4 != a10 & a5 != a10 & a6 != a10 & a7 != a10 & a8 != a10 & a9 != a10)
if (((100*a8+10*a9+a10)/17)==((100*a8+10*a9+a10)/17.0))
printf("%d%d%d%d%d%d%d%d%d%d\n", a1,a2,a3,a4,a5,a6,a7,a8,a9,a10);
}
>>
>>56390111
Lisp so fast
>>
>yfw Go was supposed to be a better C but it turned out to be a webdev language

lomo
>>
>>56390211
What makes something a web dev language anyway? I see people say that about Ruby.
>>
>>56390243
When despite being a general purpose language it's used for web development by majority of the userbase, although, I'm not sure what makes it so that web devs get attracted to such languages.
>>
>>56390114

You might as well use assembly.
Or hard-code the values.
>>
>>56390262
the simplicity of the langs, and the frameworks
>>
>>56390168

No, clojure is fast (because it's Java).
Lisp is slow as fuck:

https://benchmarksgame.alioth.debian.org/u64q/compare.php?lang=clojure&lang2=sbcl
>>
>>56390262
the standard library attracted such people
also, most things are webdev
>>
>>56380391

I have 2 USB ports on my laptop that work.

I also have a USB hub, but it is shit and can't even handle my mouse and keyboard at the same time (my keyboard won't even work and my mouse lags)

My programming related question is how can I use my keyboard and mouse along with my phone to run my app from android studio? I have to unplug my keyboard to use it which sucks. It has a feature where it builds faster after the first build, but by unplugging I ruin it.

on ubuntu is their something I don't know about USB? I have 1 unused USB port but it only provides power and no data.
>>
>>56390315
That is still very comparable though. With Python, it was a literal fifty-fold difference.
>>
>>56390211
But its language features are barely above C and it has a garbage collector. Worst of both worlds.
>>
>>56390552
>CSP
>barely above C
found the retard
>>
>>56390552
>barely above C

LET ME SEE YOU DO GOROUTINES IN C!
>>
File: Selection_044.png (19KB, 547x678px) Image search: [Google]
Selection_044.png
19KB, 547x678px
Why is this not working anons?
>no errors in error.log
>>
>>56389045
>why are enterprise business devs so fucking obsessed with models?
It's a standard, if you say MVC you can expect your collegues to instantly know what it means.
They are easily expandable, if for example your client changes hist ming halfway through development, which is common.
It's a no-brainer like Java, Industry likes it, therefore schools teach it. And since every school teaches it Industry can use it without teaching it to their newbies first.
>>
>>56389045
Separating logic from presentation is good. Not using shared mutable state is good, and so is not depending on a single instance of something (through a global, singleton, etc.). Inversion of control is useful.

That said, this stuff should be taught as common sense and not specific patterns to apply. Shitter programmers love their fucking patterns.
>>
>>56390669
>MUH MENTAL ILLNESS
>>
>>56390669
>GOROUTINES
what even are those
>>
>>56390806
>I'm this retarded tho
ok
>>
>>56390669
More like gayroutines
>>
>>56390806
Non-preemptive stackful symmetric coroutines.
>>
>>56380391
Is all the C++ bashing a meme?

It looks really interesting and there doesn't seem like a limit to the stuff you could do. Why do people hate it so much?
>>
http://blog.elentok.com/2012/07/writing-hebrew-text-using-vim.html

how do I use this code with VIM?
>>
>>56390852
It's a horribly designed mish mash of features that is painful to use with experience in anything moderately better.

Rust, purely as a language, outclasses it in every way.
>>
>>56390828
ok then
>>
>>56390852
>It looks really interesting and there doesn't seem like a limit to the stuff you could do
You should try Haskell
>>
>>56390852
>and there doesn't seem like a limit to the stuff you could do.
There also isn't a limit to what the guys who write the libraries you use can do. Consequently, they always do something which is subtly different from what you think they're doing. And so, you get bugs and segfaults.
>>
>>56390801
That's no excuse.
Get someone else to do goroutines in C for you if its that much of a problem.
>>
>>56390852
Kinda. But it's based on actual complaints about the language.
>>
>>56390959
>do goroutines in C for you
are you retarded?
>>
>>56390904
>http://blog.elentok.com/2012/07/writing-hebrew-text-using-vim.html
>how do I use this code with VIM?
just type
:set rightleft
:set keymap=hebrew


also, don't ask practical questions ITT, /dpt/ is full of memers that, apparently, have never, ever done anything of value in their lives, yet keep arguing about
>muh language is better than yours
>lol web/enterprise devs!
>>
>>56390905
>>56390914
With C++ I can use something like OpenGL, SDL or DirectX for developing games and things in 3D, and there's Qt for GUI stuff. I don't think Rust or Haskell has access to those things, and if they do I can't imagine there's as much documentation/online help.

I just want a good general purpose language that won't exclude me from anything.
>>
>>56390979
If I have to explain it, I guess I failed because
                                                                                             I guess that was too indirect a way to say that goroutines are still a huge advantage over C. Even if he thinks they are stupid.
>>
>>56391018
>With C++ I can use something like OpenGL, SDL or DirectX for developing games and things in 3D, and there's Qt for GUI stuff. I don't think Rust or Haskell has access to those things, and if they do I can't imagine there's as much documentation/online help.
>I just want a good general purpose language that won't exclude me from anything.

OpenGL SDL and QT have Haskell libraries, I think directx too
>>
>>56390801
What does your mental illness have to do with it?
>>
>>56391018
They certainly do, and you shouldn't need a language-specific tutorial for a library if you also have an API reference.
>>
>>56391055
>MUH GOROUTINES
>>
File: cocks.png (7KB, 1823x94px) Image search: [Google]
cocks.png
7KB, 1823x94px
>>56391029
Code blocks are not for half-assed spoilers, faggot.
>>
>>56391080
>MUH <feature I don't have>
You make C programmers look really bad, you know?
>>
>>56391095
We should really have the same markup across boards.
>>
>>56391119
goroutines are literally unnecessary
>>
>>56391018
>>56391039
Yeah Rust also definitely has OpenGL, SDL, and (I think) QT.

Rust also has a Rust-specific equivalent of GLFW called Glutin.
>>
>>56391138
Alternative: Type what you wanted to say without using markup faggotry for a basic comment.

You weren't talking about potential spoilers for a book, movie, show, or game.
>>
>>56391165
Abstractions in general are literally unnecessary, but they make things a lot easier.
>>
>>56391179
You have a point, alright.
It's a tone habit from boards that do use them.
>>
>>56391202
>Abstractions in general are literally unnecessary
Yes, the plow is unnecessary, we could totally still support our population without farming tools!

You're literally saying that we should program in straight machine code, or something even lower-level than that.
>>
Explain one single thing other than concurrency Go does better than Rust.
>>
>>56391202
ok so go is the god tier language that all the other languages should take inspiration from for new features
>>
>>56391166
You still have to write an adapter API. Good luck with that.
>>
>>56391251
Faster compile-times?
>>
>>56391251
Go is red-pilled and based as fuck while Rust is a CoC SJW shitfest.
>>
>>56391256
>ok so I'm literally mentally ill
>>
>>56391256
>
>>
>>56391251
Let's see:
- Having any.

Gee, that wasn't hard.
>>
>>56391281
>gjewgle
>red pilled
lol ok
>>
>>56391274
https://github.com/tomaka/glium
https://github.com/AngryLawyer/rust-sdl2
https://github.com/cyndis/qmlrs
???
>>
>>56391248
Uh, no. The opposite actually, I am saying goroutines nice.

You are were saying they are unnecessary. I agree, but I still think they are nice.
>>
>>56391288
>>56391291
if goroutines are so good why don't other languages like C# adopt them
>>
>>56391292
Having any what?
>>
>>56391310
because you're retarded
>>
>>56391314
Concurrency features as part of the language.
>>
>>56391320
Rust has plenty of tools for concurrency in its standard library, but having them in the language to the extent of Go would violate the whole "systems programming, no runtime needed" thing.
>>
>>56391304
I'm not the guy that you were arguing with previously, but your comment that "abstractions are literally unnecessary" is absolutely false.

Abstractions, as a programming concept, are absolutely necessary in the modern world.

In fact, I'm not sure that you know exactly would it would mean to wave a wand and see what happens if every form of abstraction was suddenly gone.
>>
>>56391274
That's what I'm saying. There are already adapter APIs for all of those things, except possibly QT.
>>
>>56391315
not an argument
>>
>>56391359
>so what
m8...
>>
>>56391320
I said >other than concurrency
learn to read
>>
I'm not part of the discussion so far.

Can someone explain what a "goroutine" is?

The examples make it seem like a basic feature that most modern languages also have.
>>
>>56391374
lad...
>>
>>56391377
>basic feature that most modern languages also have
which ones? show some syntax
>>
>>56391281
>Go is red-pilled and based as fuck while Rust is a CoC SJW shitfest.
Don't derail the thread again for fuck's sake.
>>
>>56391377
It's a green thread. Many VM-based languages have them.
>>
>>56391392
anon...
>>
>>56391403
It was a joke, and we're already well past the bump limit.
>>
>>56391348
Yeah, you are right. That was kind of a stupid generalization on my part.

>In fact, I'm not sure that you know exactly would it would mean to wave a wand and see what happens if every form of abstraction was suddenly gone.
It's easy to take for granted, but absolutely. There is no way anyone could get anything done without some form of it.
>>
New thread: >>56391453
>>
>>56391256
Go has some nice features because it's a sort of mishmash of features taken from other languages, plus a bit of new stuff, but lacks lots of things that /dpt/ memers love, and has some odd features as well
>>
File: asdf.png (18KB, 1163x271px) Image search: [Google]
asdf.png
18KB, 1163x271px
>>56391396
C#, for one.

See image, I took this example from the Go website.
>>
>>56391499
>Go has some nice features because it's a sort of mishmash of features taken from other languages, plus a bit of new stuff, but lacks lots of things that /dpt/ memers love, and has some odd features as well
so basically like any language ever

>>56391534
you're retarded
next you're gonna tell me c# threads are actually green threads, recursion in c# doesn't fuck up after a few thousand recursions and c# allows you to implement a full blown CSP with select
>>
>>56391923
No, you're the retard here.

Let's try this:
Please explain what a green thread is, and why you think that Go's "green threads" are actually green threads.
>>
>>56391955
>>56391923
Anon, goroutines aren't green threads. Green threads usually imply they are stackless.
>>
>>56391955
>>56392138
"In computer programming, green threads are threads that are scheduled by a runtime library or virtual machine (VM) instead of natively by the underlying operating system."
because they are threads scheduled by the go runtime

>Green threads usually imply they are stackless
no
still, goroutines have their own stack, they don't use the regular stack
this: https://play.golang.org/p/w6zoSDFJz3 works
the go runtime manages its own stacks, allocated on the heap
Thread posts: 359
Thread images: 42


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