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

File: dpt kaguya.jpg (579KB, 1280x1115px) Image search: [Google]
dpt kaguya.jpg
579KB, 1280x1115px
old thread: >>60113416

What are you working on, /g/?
>>
File: languages1.png (4MB, 1570x1876px) Image search: [Google]
languages1.png
4MB, 1570x1876px
>>
>>60119799
What anime is this trap from and why are you using a >>>/g/mkg image for a /dpt/ thread?
>>
RAII in C
>>
>>60119770
input = input.replace(/\[quote="([^"]+)"\]/g, ($0, $1) => `<blockquote data-author="${escapeHTML($1)}">`);
input = input.replace(/\[\/quote\]/g, "</blockquote>");


(replace with your own markup)
>>
>>60119840
RAII is a crutch that teaches bad habits. You should deallocate manually like a responsible programmer.
>>
>>60119849
RAII is less error-prone than manual deallocation.
>>
Can reverse traps learn to program well?
>>
Can you not use getopts in bash to allow optional option arguments?
>>
javascript engine in haskell
>>
File: 1483394413278.jpg (72KB, 440x406px) Image search: [Google]
1483394413278.jpg
72KB, 440x406px
C99 compiler in Haskell.
>>
>>60119799
Stop posting your literal gay shit.
>>
>>60119906
Anon, that's a girl...
>>
File: dlang_chan.jpg (139KB, 470x545px) Image search: [Google]
dlang_chan.jpg
139KB, 470x545px
Threadly reminder that dlang-chan is not dead, and she's super duper cute! Say something nice about her, /dpt/!
>>
File: 1493195749808.png (366KB, 593x800px) Image search: [Google]
1493195749808.png
366KB, 593x800px
Why aren't you using smalltalk?
>>
>>60119923
D might have been a good language in the 90s
>>
>>60119912
Sure, they drew a girl, but the creators of that trash are mentally ill, so they called it a boy.
>>
>>60119923
http://www.wikihow.com/Cope-with-Loss-and-Pain
>>
What is a recommended x86 assembly book?
>>
>>60119944
Is there a way to lower your IQ? That's the only way I could use that trash.
>>
>>60119923
Why actually does no one use D? It seems like it's literally C++ but better.
>>
File: 1486330899455.gif (650KB, 647x363px) Image search: [Google]
1486330899455.gif
650KB, 647x363px
>>60119946
>>60119954
Don't be rude, you bullies.
>>
>>60119847
Where can I learn more on how you managed to do that properly?, especially with the

/g, ($0, $1) => `

and
${$1}
parts, I know basically nothing about ES6
>>
>>60119968
If you ever actually look into the design of D, it's actually really fucking stupid.
Also, the garbage collector doomed it from the start.
>>
>>60119968
It uses something called "POO", which would prohibit any sane person from using it.
>>
>>60119979
But they're going to get rid of it. Any day now...
>>
Why aren't you compiling the latest version of gcc to use the newest C++17 features /dpt/?
>>
>>60119944
languages like smalltalk and lisp represent the road not taken in computer language evolution

by learning ancient primordial computer languages, you are actually handicapping yourself because no modern language works like this
smalltalk literally uses "" symbols to denote comments and not string literals, it's garbage
>>
>>60119973
http://es6-features.org/#ExpressionBodies
http://es6-features.org/#StringInterpolation
>>
>>60120017
Lisp's influence can clearly be seen in Clojure.
>>
>>60120028
Which is absolute trash.
>>
>>60119979
Yeah, no
>>
>>60119923
>something nice
at least nobody will be crying at D lang's funeral
>>
>>60120040
Clojure is a good language.
>>
>>60119972
D(ead)
>>
>>60120018
Thanks, your solution does make it work kinda, the messages however are missing

example:
[quote="user2"]
[quote="user1]
hello
[/quote]
bye
[/quote]


I tried doing
text = text.replace(/\[quote="([^"]+)"\]([^"]+)/g, ($0, $1, $2) => `<table class="table table-responsive"><tbody><tr><td class="quote"> <b>${$1}</b> ${$2}</td></tr></tbody></table>`);

but it doesn't work, is it doable this way or it's just the same problem as before?
>>
>>60120063
Sure, if it's somehow possible to be both trash and a good language.
>>
>>60120080
Stop trying to using regex to parse a non-regular grammar, idiot.
>>
File: CoxSTZPUMAAgPgT (1).jpg (60KB, 1200x675px) Image search: [Google]
CoxSTZPUMAAgPgT (1).jpg
60KB, 1200x675px
Accidentally posted to the dead thread. Can any anons help me out?

>>60120070
>>60120070
>>60120070
>>
File: 1492410041489.png (194KB, 500x505px) Image search: [Google]
1492410041489.png
194KB, 500x505px
>>60120051
>>60120072
S T O P
>>
>>60120125
>JS
>>>/g/wdg
>>
File: d lang.png (909KB, 1280x720px) Image search: [Google]
d lang.png
909KB, 1280x720px
>>60120125
if you're going to post in a dead thread, at least post about a dead language

like D
>>
>>60120130
I suppose we should, at this point we're flogging a dead horse.
>>
>>60119947
kaguya is literally a girl
>>
>>60120176
>draw a boy
>call it a girl
>>
>>60120199
>draw a boy (girl)
>call it a girl (boy (girl boy))
>>
Reminder that the "D is dead" meme is the only dead thing here
>>
>>60119944
I never knew anyone that programmed smalltalk.
>>
>>60120216
I've never even heard of D outside of this board.
I don't see smalltalk or lisp mentioned either.

Only neets use them.
>>
What is easier to learn, python or lua?
>>
>>60119962
At first I liked to start with microcontrollers. So much simple architecture and easier to learn.
>>
>>60120216
We should bury it

Next to D
>>
File: file.png (8KB, 501x50px) Image search: [Google]
file.png
8KB, 501x50px
When you use static imports in java, such as
import static java.time.LocalDate.*;
, do you still need to import the class normally too, like
import java.time.LocalDate;
? When I only had the static import, javac gave me errors like pic related.
Btw I know it's bad practice to import everything, but it's just for the sake of an exercise that specifically requested me to change the code from one of the previous exercises to use static imports.
>>
>>60120233
>What is easier to learn
Why is that relevant?
>>
>>60120231
D and Rust are the same breed of language, they only exist in the realm of pure hype and aren't used for real jobs.
>>
>>60120231
>I've never even heard of D outside of this board.
So? That doesn't mean it isn't actively being worked on
>>60120235
Why, D's not dead
>>
>>60120250
D doesn't even have hype going for it.
>>
>>60120009
Why would I want to use Ada Lite, when I have full Ada already?
>>
>>60120238
I'm curious. Which is the easier language?
>>
File: pikachu.jpg (158KB, 640x480px) Image search: [Google]
pikachu.jpg
158KB, 640x480px
Friendly reminder that it's 2017 and javascript is the only valid scripting language, because it's extremely versatile and runs EVERYWHERE.
>>
>>60120277
I'm curious as to why you're curious.
>>
Is it true that D is less popular than Haskell?
>>
>>60120233
lua is easier and you can learn the whole of it faster
python has more tutorials
>>
fuck donald drumpf
>>
>>60120125
In Lisp, this is just
(search x y)
>>
>>60120125
If your condition text[i] === 'E' is met, the inner for loop will run to completion, and then the outer loop will continue.

Basically think about it like this, your outer for-loop is iterating from i=0 to the length of your text, and inspecting text[i] for each i. That means it is checking every character in the text. Once 'E' is found, the inner for-loop will run to completion, and then the outer for-loop will check the next character, and so on..
>>
>>60120351
>x and y are undefined
>>
>>60120390
retard
>>
File: sad-wallpapers-of-girls-in-love.jpg (199KB, 1920x1280px) Image search: [Google]
sad-wallpapers-of-girls-in-love.jpg
199KB, 1920x1280px
does anybody know where I could get an electronic copy of Lisp in Small Pieces for free? it's like $80 for the book :( I've heard it's a good book
>>
File: stack overflow developer survey.png (71KB, 717x1177px) Image search: [Google]
stack overflow developer survey.png
71KB, 717x1177px
You haven't learned a useless language, right anon?
>>
>>60120421
Did you try libgen?
>>
>>60120313
Found the trumpscript faggot.
>>
>>60120435
doesn't look like it's on there :(
>>
File: 1490856036748.png (66KB, 1000x1000px) Image search: [Google]
1490856036748.png
66KB, 1000x1000px
>>60120434
Am I blind or is D not on that list?
>>
>>60120471
no rust either. VERY strange
>>
>>60120434
>Elm
>Idris
>OCaml
>PureScript
Am I a meme, /dpt/?
>>
File: b35b6a1f1949f5f9998b2064b9932581.png (131KB, 1894x986px) Image search: [Google]
b35b6a1f1949f5f9998b2064b9932581.png
131KB, 1894x986px
how did react router website do this?

im trying to get my code in my blog to show like this
what library or how do i do this?

here is there website

https://reacttraining.com/react-router/web/guides/quick-start
>>
>>60120511
you mean syntax highlighting? you can do that with markdown, look up a markdown parsing
>>
>>60120449
It is.
http://gen.lib.rus.ec/book/index.php?md5=079C8509473FD1937FCD29889DCD5AF3
>>
File: Alice to Zouroku.jpg (42KB, 848x480px) Image search: [Google]
Alice to Zouroku.jpg
42KB, 848x480px
https://www.cs.cmu.edu/~fp/courses/15816-s98/lolli.html
> there is a loli programming language
the madmen
>>
How do i into Bayer Dithering?
>>
>>60120549
>Lolli
>loli
>>
File: 1440246538429.png (304KB, 722x768px) Image search: [Google]
1440246538429.png
304KB, 722x768px
Why is there a trend to write everything as functions calling other functions?
>>
>>60120611
>>>/sqt/
>>
>>60120611
all data can be encoded as functions
>>
>>60120549
Image unrelated, right? She's too old to be a loli.
>>
>>60120611
compartmentalization is a foundational concept in software architecture
>>
>>60120556
math
>>
>>60120611
A B S T R A C T I O N
>>
is encapsulation abstraction?
>>
>>60120771
If you encapsulate an abstract do you get back to where you started?
>>
>>60119799
I have a fairly large cli program written in c++. I need a gui for it however since it became way larger than I ever intended.
What are my options? Should I look into java wrappers or qt creator. Id like for the program to run on linux/windows/mac still.
>>
>>60120635
It can also not be. Not valid reasoning.
>>60120647
Compartmentalization is given by blocks. Why write any given block as a function if it's only going to be called once?
>>
>>60120845
because most non-trivial functions will be called more than once unless you're writing an abort function
>>
>first week of programming class
>given homework
>"i don't want you using anything we didn't learn in class! that's how i know u cheated"
>we're still on variables and cout/cin
>i'm not allowed to use loops or functions
>can't even skip this class because it's a prereq
AAAAAAAAAAAAAAAAAA
>>
>>60120781
Qt is probably your best bet.
>>
>>60120867
>that's how i know u cheated
I hate when they do that. If your student cheats, then they'll just get fucked later because they don't actually know anything. You can only cheat so much before you reach a level where you'll be fucked.
Good speed, anon.
>>
>>60120914
I guess, but you know they have to fail someone.
>>
File: 1492957175322.jpg (41KB, 314x336px) Image search: [Google]
1492957175322.jpg
41KB, 314x336px
>>60119799
>What are you working on, /g/?
CLI xdcc downloader, nicks are mapped to servers/channels, so all you have to provide is
$ xdcc get CR-HOLLAND|NEW xdcc send #14153

or
$ xdcc get /msg CR-HOLLAND|NEW xdcc send #14153

and it should connect to the proper server/channel, issue the get command and start the xdcc receive.
>>
>>60120957
failing too many students is also a sign of ineffective teaching
>>
>>60120957
???
Ever teacher wants their students to succeed. If anything just to make themselves look good.
>>
>>60120968
>>60120988
I always thought they had a quota or is that a meme?
>>
File: 1487935569956-0.png (402KB, 598x1021px) Image search: [Google]
1487935569956-0.png
402KB, 598x1021px
>>60120964
Sugoi!
>>
>>60120867
Who said that?
>>
How can I make this Python 3 program more efficient?

https://pastebin.com/MPnJ6d08

It takes a path from a command line argument and recursively traverses it.

At the end it prints the total number of all files, the total number of Python files and the average number of lines from all Python files in the specified path.

It works, but I know there's a lot of redundant shit in there that could be optimized.
>>
>>60121062
Why the hell do you space your posts like that, redditor?
>>
>>60121035
I know, right.
It's like I really have one extra day of weekend/red calendar day before having to go back to my shitty BCS project.
>>
>>60121081
>go back to my shitty BCS project
What is it?
>>
>>60121062
Rewrite it in C++/Lisp/Rust
>>
File: ohgloboh.jpg (50KB, 694x434px) Image search: [Google]
ohgloboh.jpg
50KB, 694x434px
>>60121079

>imblyign

I'm just trying to make it easier to read at a glance. If you look at the code I linked, you'll see that I do the same thing in a lot of places you mong.
>>
>>60121110
>What is it?
It has to do with behavioral mapping.
>>
File: youareblack.jpg (126KB, 1002x916px) Image search: [Google]
youareblack.jpg
126KB, 1002x916px
>>60121111

I wish. Python is hella garbo for data structures.

Unfortunately, it's a project for a CS class and one of the requirements is that it has to be done in Python.
>>
>>60121191
>Python
>CS
Pick one.
>>
>>60121062
why bother using an array? can python do multiple return values, I can't remember. Even if it can't why don't you just declare the counts as global variables and ++ them

at least you're using recursion
>>
>>60119799
>amazon box with underwear
What relevance does this hold to programming, /g/?
>>
File: img.jpg (2MB, 1944x2592px) Image search: [Google]
img.jpg
2MB, 1944x2592px
>>60121199

Tell that to my college's CS department.

I'm just playing the game. At least the class itself is piss easy.
>>
>>60121199
unfortunately there is a current shift in CS programs to replace intro course languages (java, C++) with "modern", "easier" languages such as Javascript and python

kinda had an argument about it at work, I think it is not good in the long term
>>
>>60121322
A "shift" from shit to shit can hardly be called a shift.
>>
>>60121322
>intro course languages
>java, C++
No.

My CS degree almost entirely used ML. We started with it, we finished with it, we used it in the middle.
>>
>>60121344
Is that common?
>>
>>60121342
if you don't see the difference, or the difference in value, then that's your issue

>>60121344
before my time
>>
>>60121355
I have no idea, I've only done one CS degree.
>>
isn't our beloved mit sicp course in python now, i remember reading about it somewhere
>>
>>60120611

Well I mostly do everything as procedures calling other procedures, with the occasional object here and there.
>>
>>60121371
Obviously J*va and C*+ are technically better, but not by much. Which is why I said that you can't call it a shift.
>>
File: rezero finger.jpg (191KB, 869x931px) Image search: [Google]
rezero finger.jpg
191KB, 869x931px
>>60121283

I don't think Python can return multiple variables without first packing them into an array.

I'm not using global variables because my professor's a sperg and takes points off if you do that because he says it's a "bad habit".

Pic related is mfw he first said that.
>>
>>60121387
If it's not in Lisp, it's not SICP.

But yes, MIT replaced SICP with a Python class for their introductory CS stuff.
>>
>>60121400
>Python
>plebbit """"anime""""
>plebbit spacing
Can't say I'm surprised.
>>
>>60121399
eh... it's going from static typed, compiled languages to dynamically typed interpreted languages.
There is a significant difference in how you learn each, and imo the former institutes much better CS "standards" than the latter. I.e. if you want to be a CS major, you'll learn java, c++, or the like. You can go to a 6 week code bootcamp and learn how to "write" python / javascript / etc, but that does not make you a programming / software engineer

>>60121400
and classes? any other cleaner way to do what you're trying to do? cause I would throw that shit out the moment I saw it
>>
File: 1465017756660.png (29KB, 201x226px) Image search: [Google]
1465017756660.png
29KB, 201x226px
I'm learning rust. I hate to admit, it is really a massive pain in the ass to do the simplest of the things. Maybe because C and D made me very lazy.

For example try implementing a function that prints the sum of all square number under 100k.

On C:
#include <stdio.h>

int main()
{
size_t total = 0;
int i;
for (i = 0; i < 100000; i++)
{
int j;
for (j = 0; j < i / 2; j++)
{
total += (j * j == i) ? j : 0;
}
}

printf("%lu\n", total);
return 0;
}

On D:

import std.stdio;

void main(string[] args)
{
size_t total = 0;
for (int i = 0; i < 100_000; i++)
{
for (int j = 0; j < i / 2; j++)
{
total += (j * j == i) ? j : 0;
}
}

writeln(total);
}


Now let's see Rust's version, please follow the same algorithm for a level playing field. I want to bookmark the three languages : in terms of code readability/productivity and speed.
And please none of these (1i64..100_000i64).map(|x|x.pow(2)).sum::<i64>(). I don't know functional programming and I definitely don't know how to do it in C/D
>>
>>60121447
>if you want to be a CS major, you'll learn java, c++, or the like
You should have to learn ML, Idris, and Agda. CS is applied math. CS is proofs.
>>
>>60121449
#include <stdio.h>

int main()
{
size_t total = 0;
int i;
for (i = 0; i < 100000; i++)
{
int j;
for (j = 0; j < i / 2; j++)
{
total += (j * j == i) ? j : 0;
}
}

printf("%lu\n", total);
return 0;
}


On D:
import std.stdio;

void main(string[] args)
{
size_t total = 0;
for (int i = 0; i < 100_000; i++)
{
for (int j = 0; j < i / 2; j++)
{
total += (j * j == i) ? j : 0;
}
}

writeln(total);
>>
File: 1492555651948.jpg (43KB, 600x450px) Image search: [Google]
1492555651948.jpg
43KB, 600x450px
>>60121449
>rust
>>
>>60121462
How can I write dynamic web pages with ML, ldris, and agda?
>>
>>60121462
jesus christ dude nobody is that fucking old
I learned lisp, C, etc, during my schooling but I started out with java

usually you don't stick with one language through your major and that's a good thing as you're more supposed to learn theory but fuck off with your meme shit just trying to be edgy
>>
File: 1484327247226.jpg (59KB, 600x450px) Image search: [Google]
1484327247226.jpg
59KB, 600x450px
>>60121478
hahaha :DDD so funny amirite. Post this on 9gag and I'll upvote you
>>
>>60121489
>ML
>Idris
>proofs
Are you implying that proofs done in an inconsistent system have any value whatsoever?
>>
>>60121521
wtf, I love rust now
>>
>>60121523
meant for >>60121462
>>
>>60120205
Can you parse genders with regex?
>>
>>60121447

Doing it with classes is the end goal.

This code is the first part of a two-part assignment. The second part is modifying that program to use classes. I'm just trying to get the recursive function dialed in and optimized before I start doing that.
>>
>>60121489
>web pages
Wrong thread.

>>60121514
>jesus christ dude nobody is that fucking old
>meme shit
>edgy
Stop posting here.
I suggest you fuck off to:
>>>/v/
>>>/b/
>>
File: cute boy awoo.jpg (151KB, 645x989px) Image search: [Google]
cute boy awoo.jpg
151KB, 645x989px
Friendly reminder that programs are not proofs!
Pure math is not programming.
Go write me a proof that can edit text, Mr. Standard ML of New Jersey!
>>
>>60121560
>Friendly reminder that programs are not proofs!
That's a theorem, so this is incorrect.
>Pure math is not programming.
What is "pure math"? Constructive logic (math) is definitely programming.
>>
>>60120276
Does Ada have a stable ABI?

>>60120281
>runs everywhere
Only in browsers.

>>60121387
No, it's in Javascript.

>>60121411
If you want to whine about ``plebbit" instead of talking about programming, maybe this isn't the right thread for you?
>>
>>60121523
>>60121532
You write programs in ML and prove things about them. You later go on to write proofs in Agda. Idris is a stepping stone between the two.
>>
cs is not math lol
wtf are you on
>>
>>60121613
>only in browsers
with node.js you can write all your software with no browser needed, javascript is good for more than just DOM calls, you know!
>>
>>60121560
The Curry-Howard correspondence would like a word with you.
>>
>>60121625
>You write programs in ML and prove things about them
In ML? Any proof done in ML is worthless since you can prove absolutely anything in it.
>Idris
It's also inconsistent.
>>
>>60121630
It basically is a subset of Math, unless your school was basically just programming.
>>
>>60121400
are you the guy that made this anime meme generator? i see these more and more now one day it was shared here
>>
>>60121633
Node.js isn't particularly good for interactive programs
>>
>>60121652
>In ML? Any proof done in ML is worthless since you can prove absolutely anything in it.
No, old-fashioned pencil and paper proofs.

>>Idris
>It's also inconsistent.
I don't disagree, but going straight from ML to Agda is like throwing people in the deep end after they've just learned to get in and out of the toddler pool.
>>
>>60121672
it's still better than other more traditional scripting languages

javascript isn't even scripting, it's compiled to bytecode
>>
>>60121672
Lisp > Node.js
Lisp > JS
>>
>>60121674
>No, old-fashioned pencil and paper proofs.
You can still use ML's logic for proving things with pen and paper.
>but going straight from ML to Agda is like throwing people in the deep end after they've just learned to get in and out of the toddler pool.
What would you say the appropriate amount of time would be then?
>>
Assign
..Id(b) - double
..Sub - x
....Sub - y
......Sub - double
........Id(b) - double
........Id(a) - double
......Id(c) - int
....Id(a) - double


how i'm i supposed to know the types x,y ?

i'm recursing down the tree and check the leafs of my tree, and based on the leafs, give the type to the parent.

But x and y its impossible to know?

do i have to go back up?
>>
Can someone explain lisp to me?

there's no keywords or operators?
how the fuck do you implement the + function if you need the addition operator to do hardware based addition??
>>
>>60121722
https://en.wikipedia.org/wiki/Church_encoding#Plus_and_minus
>>
>>60121635
Curry-Howard-Lambek correspondence*
>>
>>60121729
They're using plus and minus operators to define plus and minus operators

is this a joke?
>>
>>60121697
>What would you say the appropriate amount of time would be then?
No idea. Maybe this?

Year 1: ML, foundational CS (set theory, proof, algorithms, complexity, etc.)
Year 2: Idris, maybe Haskell, more advanced topics
Year 3: Agda, even more advanced topics
>>
File: 1478381006745.gif (1023KB, 500x514px) Image search: [Google]
1478381006745.gif
1023KB, 500x514px
small programming challenge?
>>
>>60121765
Multiply by 8 without using multiplication or addition. Now do the same with 7.
>>
>>60121761
What job prospects do you have with a degree in entirely theoretical computer math?
>>
>>60121776
Any company worth working for will be falling over itself to hire you. It's also great preparation for going into research.
>>
>>60121765
Concatenate a series of integers provided as program args using math (No using strings.) and print the result. Make sure to check if the concatenation will be bigger than the size of your system's int.
$ concatints 1 5 23
$ 1523
>>
>>60121722
Lisp has operators, functions, macros, etc.
>>
>>60121775
import std.stdio;

void main(string[] args)
{
int x = 3;
int y = x;
for (int i = 1; i <= 8; i++)
{
y += x;
}

writeln(y);
}

>>60121806
wait
>>
>>60121797
What is there to research?
Computing is a mature technology.
Machine learning is literally brute force pattern matching and quantum computing is way beyond your reach, mr. CS sperg.
>>60121775
n << 3
>>
>>60121832
>without using addition
>>
>>60121806
>No using strings
>input arguments passed as char*
But seriously though, ascii math isn't hard
>>
>>60121761
I'm about 4 months into this stuff and I'm learning Coq right now. I don't think this is even remotely accurate.
>>
>>60121806
Sorry, D mains take args as strings by default
>>60121856
Oh I see your point
>>
>>60121712
bump

anyone?
>>
>>6012185
>>60121866
You convert them to an integral type using functions your language's standard library provides, and then you doing perform he calculations. For C, you'd use strtol().
>>
>>60121901
Oops, meant to reply >>60121857 too.
>>
>>60121666

Nah vro, I'm just a first-year CS student.

All I've made so far are school-related programs.
>>
>>60120494
im full in on the FP meme too, friend. we'll make it happen!
>>
>>60121462

CS is not all proofs, and I can safely say I have not used ANY of those languages in either my undergraduate or graduate work.
>>
@60121963
You've shown yourself to be completely retarded on more than one occasion, so that isn't really surprising.
>>
>>60121963
That's fair, I take it you prefer Coq?
>>
why do people still use vi/vim? it is ok if it is through ssh, but otherwise it is so shitty and ugly
>>
>>60121988
It's efficient.
>>
>>60121988
>fast
>can edit text really quickly once you know the commands and shortcuts
>lots of plugins
>very customizable
>ubiquitous
>>
File: cool fun.jpg (19KB, 600x454px) Image search: [Google]
cool fun.jpg
19KB, 600x454px
>>60119799
Has anybody here done graduate work in computer science? What are the primary concepts one absolutely must have prior knowledge of in order to study at that level?

I did my undergrad in humanities but I've been programming on my own time for years now, and wondering if it'd be feasible.
>>
>>60122044
the plugins for c/c++ are very shitty though. even vscode can do better
>>
>>60121806
unsigned int concatints(unsigned int[] nums, int argc)
{
unsigned int num, ret = 0;
int digits;
for(int i = 0; i < argc - 1; i++)
{
ret += nums[i]
num = nums[i + 1];
digits = 1;
while((num >>= 1) > 0)
digits++;
ret <<= digits;
}
ret += nums[argc - 1];
return ret;
}


D-did I do good?
>>
>>60122099
>unsigned int[]
>>
>>60119799
I'm working on a python script that returns my account balances on btc-e. I'm also failing miserably. I need a beer.
>>
>>60122254
Fug I meant unsigned int nums[].
>>
File: 1391172640537.jpg (37KB, 285x279px) Image search: [Google]
1391172640537.jpg
37KB, 285x279px
>decide to learn python because why not
>download Learning Python
>1500 pages
>spends 20+ pages on topics that can be explained in like 2 sentences even to a retard
>>
>>60122346
Just read learn x in y minutes.
>>
>>60122346
you need something like this for python
https://gobyexample.com/
>>
>>60120867
programming around constraints is a part of the job, just think of it as a challenge and it should be fun to you
>>
>>60122346
>1500 pages on Python

Haha, what the fuck? How is that even possible? That's longer than a fucking C++ reference book.
>>
>>60122099
???
This is what I get with your implementation
$ concatints 1 10
$ 26
>>
>>60122467
Really what did I do wrong? I tried to re-read my code and I still think it should work.
>>
>>60122507
The better question is why used bit-shifting. Thus, why?
>>
>>60122531
#include <stdio.h>
#include <stdlib.h>

unsigned int concatints(unsigned int nums[], int argc)
{
unsigned int num, ret = 0;
for(int i = 0; i < argc - 1; i++)
{
ret += nums[i];
num = nums[i + 1];
ret *= 10;
while((num /= 10) > 0)
ret *= 10;
}
ret += nums[argc - 1];
return ret;
}

int main(int argc, char* argv[])
{
unsigned int nums[argc];
for(int i = 0; i < argc; i++)
{
nums[i] = strtoul(argv[i], NULL, 0);
}

printf("%d\n", concatints(nums, argc));
}


There I made it work now, for some reason I thought to bitshift it because it is like multiplying by 10 in base 2 when you do a bitshift.
>>
>>60121775

:code:
# is this cheating

# mult by 8
print 10.0 / .125

# mult by 7
print 10.0 / 7 ** -1
:stopcode:
>>
>>60121806
>>60121775
Why these restrictions?
>>
File: 1464140836254.png (6KB, 354x286px) Image search: [Google]
1464140836254.png
6KB, 354x286px
>>60122718
>I thought to bitshift it because it is like multiplying by 10 in base 2 when you do a bitshift
pic related

Anyway, you're missing three other requirements: handling zeroes, handling negative integers, and handling integer overflow. Finally, though you can look this up if you want, you don't need a loop to calculate the number digits in an integer.

>>60122834
Because, in case of integer concatenation, it'll be too easy and thus not a challenge.
>>
>>60122854
Um.. If you are making explicit restrictions like that you are just annoying your students. Give them something that has no apparent restrictions but challenges their skills.

Don't ask them to walk on one foot. It has no outcomes..
Ask them to use skates, they will learn something.
>>
I'm making an android game. Can anyone tell me, is it better programming style to specify an objects image file (e.g. png) in it's class code, or is better to pass the image to an object as a parameter when creating the object?
>>
File: 1455500798206.jpg (233KB, 541x458px) Image search: [Google]
1455500798206.jpg
233KB, 541x458px
>>60122891
I want anons to create a fully-functional integer concatenation program; as such I expect them to be able to catch the pitfalls and errors that are associated with it, and deal with them appropriately. These aren't arbitrary; they're expected.

>..
Don't suck too many cocks, bud.
>>
File: 1466051256772.gif (909KB, 440x508px) Image search: [Google]
1466051256772.gif
909KB, 440x508px
Is there a C/C++ have a
-compiler has static checks as through as Rust? (Like RustC)
-a package manager to easily maintain, build, run and test projects and track dependencies automatically? (Like cargo)
-a language server (format tool, code-analyzer for go-to def, real time syntax checking, type/doc links on hover, refactoring tool etc) (Like Rust-Language-Server)

Rust has a nice Dev-environment around it. It'd be helpful if C/C++ have them too.
>>
>>60122939
No, you asked them not to use strings. How is that not a needless obstruction?
>>
>>60122953
Do C/C++ have a*
>>
>>60122334
>missing the fucking point
>>
File: 1456448584063.png (176KB, 880x490px) Image search: [Google]
1456448584063.png
176KB, 880x490px
>>60122960
Because using strings when they're not needed is a waste of computational power (And a common problem), and adding math into any problem makes it more exciting
It's okay if you can't do it.
>>
>>60122988
>if the next number is larger, multiply by the 10^(number of the digits) + the current number
>vice versa if applicable
>hard
No. The word you are looking for is called "tedious"
>>
File: 1449289663560.png (117KB, 372x351px) Image search: [Google]
1449289663560.png
117KB, 372x351px
>>60122997
I never said it was hard; it's for novice programmers.
Also
>unnecessary branching
As I said, it's okay if you can't make a proper implementation.
>>
>>60123018
>unnecessary branching
For an unnecessary obstruction, that's fair and square
>>
Java & ArcGIS Runtime SDK. Any other gis programmer fags in here?
>>
File: 1454177668769.jpg (114KB, 947x798px) Image search: [Google]
1454177668769.jpg
114KB, 947x798px
>>60123029
Alright, bud, enjoy your shitposting. Here's your final (You).
>>
>>60122953
just download visual studio or clion
>>
>>60123077
>Platform agnostic
>non-standard
>costs money for no real reason
>>
>>60122988
>Input is strings
>Output is a string
>Unnecessary
>>
What do you think is would be the proper way to do user-level compile time options for a C program?

I have a "library" I'm writing for my own project that provides an API for creating servers and clients. The library is statically linked to a project, but often times a server and a client will want different compile time options - for example, a server should be compiled while supporting the ncurses-based text-mode but a client may not need that.

I've been using a header file in which I just define a lot of compile time options, like #define SUPPORT_TEXT_MODE 0", but since I'm often also recompiling the library along with any programs that use it, and they use different compile time options, its a bit of a pain. Any suggestions? I could do it with Makefiles too of course but its pretty cumbersome too to be honest.
>>
>>60123191
>user
>compile
Just wrong.
>>
>>60123206
I am the sole user.
>>
File: 1469732655097.png (325KB, 382x417px) Image search: [Google]
1469732655097.png
325KB, 382x417px
>>60122953
>Format tool
Clang format
>Auto complete (if you need)
Clang complete
>Static analyzer
Scan-build
>Language server
I don't know. I heard there is something called cppcheck
>Package manager
Conan
>Project manager
Git


I guess both C/C++ lacks a monolithic language server. I wonder why. If you like Rust's developing environment, why don't you stick to Rust?
>>
>>60123222
Are you not currently using Makefiles? You should be. Use bash files to source configuration variables for your makefiles, that makes configuration a little easier without baking all that crap into the makefile.
>>
>>60121489
with web libraries. you can do even better though, Ur/Web is a dependently typed ML dialect that's specifically built for web programming (frontend or backend) and has better performance than nearly any web framework in use
>>
>>60123267
I am using Makefiles of course, but what I meant was that doing #defines in compiler options through a Makefile is cumbersome. I suppose I could try making a script that swapped the compile options header for the duration of the compilation.
>>
which is faster?

im trying to make a blog,

should i build a full form post application, with user auth only for me so i can post to a database to then get the data n render it on my blog or built the database post thing in apart like a diffrent website thn just get the data by treating it like a rest api, and manipulating it on my blogging site?
>>
>>60123334
Stop being a fag and just serve static pages.
>>
>>60123384
>static pages
>2017

anon dont tell me... u have 5k html pages?
>>
>>60123392
I don't serve shit. I despise webdev, and I don't have anything I would want to share anyway.
>>
>>60123334
>>>/g/wdg
Also listen to >>60123384; SPAs are shit.
>>
>>60119923
She isn't even cute.
Do all Dead programmers have taste this bad?
>>
>>60123334
>>>/g/wdg

why do you want to have a blog anyway you think anyone is interested in what you have to say

just use blogspot or wordpress or someshit
>>
>>60119944
Because I hate small talk.
>>
>>60123475
>She isn't even cute.
say that to my face and not online, fucker
>>
>>60119968
some of it is good on paper but the implementation sucks
>>
>>60123486
Ok.
Please post a picture of your face then, and I'll say it to it.
>>
>>60123475
D's not dead tho
>>
File: 1468712251424.png (114KB, 594x483px) Image search: [Google]
1468712251424.png
114KB, 594x483px
Why do they keep making C++ bigger every year?

Do they suffer from some sort of inferiority complex? C++ is INSANE, not even a 1500 pages book will teach you half of the language.
C with RAII when? WHEN!

>D
Slow. LDC, please for fuck's sake try and produce binaries that doesn't make fun of itself in comparison to the other systems languages. Dub is a JOKE in comparison to cargo and Dscanner/DCD server is just sad and pathetic compared to racer/RLS. Doesn't have many static analyzing options
>C
Too small, lacks too many features. The exact opposite of C++. If the compilers would be able to inject free() in sources during compilation that would be fucking great. I don't use C for the same reason I don't use Rust as my to-go language.
Also C macros are pitiful
>Rust
Holy shit the level of verbosity and complexity! 10/10 in getting your way of thinking.
To be fair that's the same thing python fags complain about C. Learning C made me lazy just like learning python did.
Language is unplanned, it doesn't know what to have, what not to have and Rust certainly doesn't have syntax or library names that make sense for the most part, the incremental updates will make it worse than C++ in a couple of years.

Don't get me wrong, I personally like Rust. But holy shit there are so many things that need to mature
1. Has print! but doesn't have read!. println! flushes the stdio, print! doesn't.
Oh, you really don't need read! You need eprint! --makes SO MUCH sense!
2. for loops have i..z-1 (exclusive) syntax but pattern matching has i...z (inclusive) syntax
3. thousands of ways of doing the same thing
4. If you are indirectly pushing the functional programming practices why not adopt it fully? Add Higher Kinded Types
4. lack of for(int i=0; ;) loop
On the topic C doesn't have it too. It only has int i; for(i=0; ;)

Thanks for reading my blog. I had to get that out of the system.
>>
>new
>drill in bjarne's book
>input doubles that represent distances between two cities. push them into a vector. each time, print the total of all the distances, the shortest, the longest, and the median

So I tried:
#include "../../std_lib_facilities.h"
int main(){
cout << "Please input doubles that represent distances between two cities.\n";
double distances = 0.0;
double sumofdistances = 0.0;
vector <double> alldistances;
while (cin >> distances){
alldistances.push_back(distances);
for (double x : alldistances){
sumofdistances += alldistances[x];
}
cout << "The sum of the all distances entered so far is: " << sumofdistances << '\n';
}
}


>Warning 1 warning C4244: 'argument' : conversion from 'double' to 'unsigned int', possible loss of data Line 10

What? How is a double being converted to an int?
>>
File: 1492557701023.png (345KB, 620x640px) Image search: [Google]
1492557701023.png
345KB, 620x640px
>>60123509
>>
>>60123519
>On the topic C doesn't have it too. It only has int i; for(i=0; ;)
C99 would like to have a word with you, fagboy.
>>
>>60123519
Write your own
>>
>>60123519
kek
>>
>>60123519
>On the topic C doesn't have it too. It only has int i; for(i=0; ;)
C has matured past ansi C you know. it's still a crippled brainlet language but it's not THAT bad
>>
>>60123524
>double x
>alldistances[x]
>>
I want to learn a functional language because bjarne told me to do so but there are so many. which one should I choose?
>>
>>60119799
Implementing a fuckin UKF, gonna be the shit man
Control theory is literally the best
>>
>>60123544
I don't understand why those both aren't doubles though or what is happening. How is that a conversion to an int?
>>
>>60123560
Just go balls-deep with Haskell (or Idris) and don't look back
>>
>>60123533
>>60123541
Oh I apologize then. Don't use much of C. Learned it from a dusty old book.

>>60123560
Start with clojure
>>
>>60123578
You can't index something with a double, as that makes no fucking sense.
>>
>>60123519
Why do people complain about C++ being big or "muh bloat"?
If you don't like C++17 features...use C++11?
If you don't like some part of the STL...don't use it? There's nothing stopping you from writing code that is basically C with a few extra C++ features.
>>
>>60123519
So basically you are complaining that Rust is new.
>>
>>60123519
I have nothing better to do than to answer to bait posts, so
> Why do they keep making C++ better every year?
ftfy
> not even a 1500 pages book will teach you half of the language.
The C++14 Standard is 1368 pages long and it literally describes the entire language.
> Holy shit the level of verbosity and complexity!
A new language not based on C requires some time to learn and to get used to. What a surprise!
> Language is unplanned, it doesn't know what to have, what not to have
It literally has heavily discussed and formalized plans in RFCs.
> and Rust certainly doesn't have syntax or library names that make sense for the most part,
A new language not based on C requires some time to learn and to get used to. What a surprise!
> Has print! but doesn't have read!
Why should it?
> println! flushes the stdio, print! doesn't.
So it has the expected behavior, just like std::endl.
> for loops have i..z-1 (exclusive) syntax but pattern matching has i...z (inclusive) syntax
They both have both.
> thousands of ways of doing the same thing
How is this even a valid critique of a general-propose PL?
> Higher Kinded Types
WIP
> lack of for(int i=0; ;) loop
Good riddance.
>>
>>60123560
python
>>
>>60123622
>> Why do they keep making C++ better every year?
Piling more shit onto a pile of shit isn't going to make it any less shitty.
>>
>>60123620
>If you don't like C++17 features.
I do like C++17 features but I don't like crusty old legacy C++ trash that they never get rid of. Don't try to be everything all at once. Stay consistent, learn from C

If I choose not to learn a selected part of C++, it'll result into massive confusion in a project within project members.

>Why should have read it?
Why should it not? Reading files is very common in anything.

There are like 4-5 ways to read an integer from stdin because Rust chose to be low level, lower than C
>>
>>60123620
The problem with it is that it often encourages you to do stupid things because 'muh good and modern practices'. Other than that there's not much of a problem, except that a large amount of C++ """features""" are pretty useless if not harmful.
>>
>>60123622
>> println! flushes the stdio, print! doesn't.
>So it has the expected behavior, just like std::endl.

Rust secretly loves C++, prove me wrong
>>
>>60123622
>The C++14 Standard is 1368 pages long and it literally describes the entire language.
You forgot about Boost and Qt boi.
And don't even think about saying "oh they are not the part of the language" bullcrap. Everyone uses boost and C++ keeps getting features from it
>>
>>60123657
>If I choose not to learn a selected part of C++, it'll result into massive confusion in a project within project members.
then choose to learn it. reading a cppreference page isn't harder than reading documentation for a library
>>
Is there any harm in just killing threads (pthread_kill for example) at the end of a program instead of joining them, if you know they're not doing anything of value at the time of calling "kill"? On Linux and Windows.
>>
>>60123693
Let it reach bump limit
>>
>>60123600
I got it now. In retrospect I have no idea what I was trying to do there.
>>
>>60123657
>crusty old legacy C++ trash
Most of that trash comes directly from C though, and if you don't like that then stick to the newer features!
>It'll result into massive confusion in a project within project members
And refusing to use C++ because "muh bloat" is better? See >>60123686
And sure you might have to work with newer C++ features, but any code that you personally write doesn't have to use them other than to interact with anything that already exists.

Also why are the newer C++ features bad exactly?

>>60123664
>A large about of C++ """features""" are pretty useless if not harmful
Examples and why?

>>60123698
Underrated comment
>>
>>60123641
>>60123657
They deprecate and remove old stuff regularly, like throw-specifications and std::auto_ptr.
>>60123671
Rust is basically C++ + Haskell + region-based memory management.
>>60123683
They are not a part of the language tho. It's like saying PyQt, NumPy and TensorFlow are all parts of Python and you should learn all of them to learn the language.
>>
>>60123693
just let them return, don't have to join or kill
>>
>>60123709
>Examples and why?
Classes, lambdas, a large part of the standard library with its terrible memory management, virtual functions, references........
>>
>>60123709
>why are the newer C++ features bad exactly?
They are not bad, some of the older functions are straight up harmful.
>>
I'm learning android dev (java + kotlin), absolutely no math knowledge required but you have think a lot about architecture, though I'm not sure what app to make for now
>>
>>60123734
>Classes are bad
Classes can be used poorly sure, but you could also have classes that are basically structs with functions. That's bad how?
>Lambdas are bad
Literally how
>STL memory management
That's implementation specific
>virtual functions
>implying inheritance is intrinsically bad
>References
References are a thing in C too, no?

>>60123735
That I can believe, which is why they're slowly being deprecated.
>>
>>60121982

Languages I have used in CS assignments:

Ada
Java
Scheme/Racket
C
C++ (when given a choice)
Python
Ruby (when given a choice)
Prolog

I have also written some R code for a math class.

>>60123762

C doesn't have references, just pointers. But really, a reference is just a syntactic sugar anyways, so people who hate them are retards.
>>
poorfag here
I have a question: if I want to escape the sjw shit at github, what valid alternative do I have to host static blogs?
>>
>>60123762
>References are a thing in C too, no?
I'm not who you're replying to, but C++ references are ridiculously retarded.
Fucking invisible state changes everywhere.
>>
>>60123788
>Being poor and dumb
suicide is your option
>>
>>60123783
>>60123792
>References aren't in C
I learned something new. I'll give you that one.
>>
>>60123519
wait for jai
>>
>>60123807
If it's like braid or the witness I don't want it.
>>
>>60123788
You can just post your insightful thoughts directly to >>>/pol/ or >>>/r/eddit .
>>
>>60123783
>when given a choice
You're telling me you're forced to use what language they dictate?
>going into debt to be forced to use java
>>
File: 1474405917693.png (128KB, 303x306px) Image search: [Google]
1474405917693.png
128KB, 303x306px
>>60123807
>Gaming keyboard
>Gaming mouse
>Gaming monitor
>Gaming mousepad
>Gaming chair
>Gaming computer case
>Gaming laptop
>Gaming soda
>Gaming video card


>Gaming programming language
When does it end?
>>
>>60120434
It's a shame to see Swift in the top 20. Hell, it's even surpassing Objective-C
>>
>>60123826
>Frogposter
I'm more curious as to when your life is going to end.
>>
>>60123826
dumb frogposter
>>
>>60123834
>JAI primer: a programming language for games
https://www.youtube.com/playlist?list=PLmV5I2fxaiCKfxMBrNsU1kgKJXD3PkyxO

Straight to >>>/v/
>>
Practicing my game programming, specifically decoupling engine computations from rendering, but I didn't want to install any game dev SDK so I'm just doing it in JavaScript (which normally I hate).
>>
>>60123849
>>60123826
>Something designed with X in mind will never be useful outside of X
That's pretty limited thinking there.
>>
>>60123762
Classes being bad is a philosophical question, but I would say separation of datatypes and functions is a much more clear way of programming. Keywords like private encourage writing massive amounts of uselss boilerplate code like getters and setters that will in the worst case not even get inlined.

Lambdas are bad because of their shitty syntax. They were added to a language that wasn't built with them in mind and they've never been used for anything but making code more confusing and hard to read.

Inheritance is not necessarily bad (I think its confusing but that's it), but the problem with virtual functions is not inheritance but the implementation of virtual functions in C++, and the overhead that produces.

References were supposed to be a safer pointer type but because of the way it was implemented and the way the language works, they're just another way to write a pointer and hence pretty useless.
>>
>>60123849
>if it's about a language I don't like it belongs on >>>[board]

come on now my familope
>>
>>60119799
is this a woman? a real anime girl? or a guy who wants to have prostatic bliss
>>
>>60123865
I didn't say I hate the language, I hate the creator's vision

>Gaming programming language
Permanent red flag.
>>
>>60123860
He's a dumb frogposter; it's no surprise.
>>
>>60123862
classes are a social construct
>>
>>60123860
It will never be useful in video games development to begin with tho.
>>
>>60123887
Reminder that if you language has (((structs))), it is causing white genocide by promoting communism in the minds of innocent our God fearing Judeo-Christian Americans.
>>
>>60123862
>References were supposed to be a safer pointer type but because of the way it was implemented and the way the language works, they're just another way to write a pointer and hence pretty useless.
No, they're more nefarious than that.
The problem is that references are automatically taken for variables, which means that they hide potential state changes from you.
For example, take this piece of C++ code, and tell me what you think it prints. The prototype for 'fn' is deliberately not shown.
int a(10); // C++ really is a fucking joke
fn(a);
std::cout << a << std::endl; // People actually defend this rubbish, too
>>
Trying to write an script that splits an mp3 of an entire album into its respective songs... I've barely started, but I'm wondering, how would you split up an mp3 based on timestamps?
>>
>>60123883
2beeh I'm surprised google says it's a game programming language. the few times I've looked at his streams he just bitches about how C++ is bad and jai is gonna be so much better and sure he makes games but it didn't seem game-specific (maybe I just didn't watch enough) and he doesn't call it such on twitter. first time I've heard such a thing. maybe I'm just retarded.
>>
>>60123905
Just use some sort of CUE splitter.
>>
>>60123907
how will he use opengl/vulkan without c/c++?
>>
>>60123907
do you want a game programing language? one with manual memory management is the only option. The syntax is secondary.
>>
>>60123914
Thanks for the reply!
I know I could download some software, but i'd like to know how I can spilt an mp3 timewise so I can do other things with mp3s later
>>
What is the worth of even learning Haskell
>>
>>60123862
>Classes
That's a style choice, and you can certainly just use C-Style structs in C++.
>Lambdas
I don't think Lambdas are that hard to read once you get used to them, and they're pretty similar to how they work in other languages.
>Inheritance/Virtual Functions
I can't speak on the implementation/overhead of virtual functions, so I'll give you that one.
>References
Yeah they're near-useless aside from making some things a tad easier to read. But again then just don't use them if you don't like them?
Even if a bug is introduced like in >>60123904, it's one of the more visible semantic errors introduced by a bad feature. A quick look at a header file can tell you went went wrong.
>>
>>60123788
blogspot?
>>
>>60123941
you can be accepted into a hipster self-absorbed circlejerk
>>
File: 789.jpg (24KB, 656x465px) Image search: [Google]
789.jpg
24KB, 656x465px
>>60123826
>>
>>60123807
it's a meme. guy makes braid and thinks he's a programming genius
>>
>>60123924
You don't seem to understand how FFIs work.
As long as it can call the C ABI/API, it can use OpenGL/Vulkan or whatever.

>>60123936
Without going the "whole way" by decoding it and splitting it at the samples yourself, you could call some program like ffmpeg.
ffmpeg -i file.mp3 -ss 0:30 output.wav

I'm not 100% sure I got that correct. Just look it up.
>>
>>60123965
kek
>>
>>60123941
It will be easier for you to get your head around modern languages like Rust, Swift, C# 7.0 and C++17 since they borrow extensively from Haskell.
>>
>>60123826
who are you quoting?

and why are you posting the redditfrog?
>>
New thread: >>60123996
>>
>>60123903
>>60123788
>the idiocy of nu-/g/
>>
>>60123825

Depends upon the class. In many classes, there's a preference from the professor to have everyone using the same language, if only to make it easier to grade. In others, a certain language is necessary to teach the subject. You can't really do the Unix Software Development class without C. Functional Programming was taught with Racket, and Natural Language Processing was mainly focused with Python.
>>
File: fag.jpg (11KB, 180x222px) Image search: [Google]
fag.jpg
11KB, 180x222px
>>60123991
>>
>>60123519
>Holy shit the level of verbosity and complexity!
Is this your only real argument? any competent programmer shouldn't have much problems with learning Rust, except for maybe lifetimes since they're a completely new concept never seen before in other languages.
Rust is pretty powerful.

>but doesn't have read!
What should read! do if it couldn't read stdin? what should it do if it couldn't parse the input according to the format string?

>print! doesn't.
For good reason. Most people use print! to print a single line using multiple calls to print!. This is for performance, and so that you don't see partial output in the terminal.

>for loops have i..z-1 (exclusive) syntax but pattern matching has i...z (inclusive) syntax
Ok, that's pretty retarded.

>Higher Kinded Types
Completely useless.

>On the topic C doesn't have it too. It only has int i; for(i=0; ;)
Fucking retard. C has had this for fucking ages.
Thread posts: 319
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.