/dpt/ - Daily Programming Thread

Old thread: →

What are you working on, Sup Forums?

Other urls found in this thread:

rust-lang.org/en-US/conduct.html
github.com/limetext/lime
blog.zikes.me/post/how-i-ruined-office-productivity-with-a-slack-bot/
blog.zikes.me/post/serving-multiple-sites-from-one-go-process/
blog.pusher.com/golangs-real-time-gc-in-theory-and-practice/
twitter.com/SFWRedditImages

This book is way more useful than Haskell.

I have read this book.

We have a thread, stop thread splitting.

It looks old.

That thread is not going to have any proper discussion

What's the point of C again?

>meme benchmarks

>asks what the point of C is
>shows a picture comparing C++ with meme-lang

C++ is a proven trash, now on with C

Will Golang ever be an alternative to writing android apps in Java?

It's an incumbent language with actual library and tooling support, and that's not C.

>C
>tooling support
not so fast

That language has massive flaws though

Without a convenient way to access Java API from Go, no. And since Go's type system isn't isomorphic to Java's, I don't think Go will ever replace Java for Android.

oh shit

redpill me on this rust vs c meme

Rust is for cucks and C is for white man

y tho

rust is made by mozilla webfags because C/C++ is too hard for them so they need something """"safer""""

but rust is like a retarded version of C++, it offers no tangible benefits over C++ and it's much less popular (which matters when you need to find people to work on your team)

also
>rust-lang.org/en-US/conduct.html

...

kys

no

Will C and ASM save america from niggers and cucks?

Rust is like a redesign of C++ with some 30 years of hindsight. A lot of Sup Forums hates it because Sup Forums is full of people who like to roleplay as expert programmers and feel validated by writing their fizzbuzz programs in an unsafe language, see: modules instead of retarded header system from the 70s
algebraic data types
hygenic macros
pattern matching
immutability by default instead of spamming const everywhere (or not)
traits (which C++ has been trying to add in the form of concepts for the past decade without success)

Really, you should have just stuck with the usual cucks/sjw mantra instead of trying to make a substantive post. No one can argue any facts that way.

The problem with rust is it will take them 5 more years to get Non-Lexical Lifetimes, if we're lucky.
And in the meantime it's pushing a lot of people away, because correct code that ought to work is rejected for no reason by the compiler.

the syntax alone is enough to repulse people

babyduck or stockholm?

>5 more years to get Non-Lexical Lifetimes,

What makes you think it's going to take that long? From what I've read that was largely the goal changing their IR from LLVM's default and they've already accomplished that. I didn't have the impression it was far off.

I agree it drove me away. Fighting with the borrow checker where I knew I was in the right drove me to learn C++.

Only the fools who are afraid of anything they don't already know.

>autism

come on, it's on par with C++ at best, and C++ is not a pretty-looking language, if they wanted to come up with a substantial improvement they could have made a better syntax

It might sound pessimistic, but I'm afraid it might not be too far off, NLLs in rust is a very non-trivial goal.

First the design itself is far from settled, even though the problem is already more than four years old and very well known at this point.
Then there's the fact that it's a surprisingly deep change to the language (and the compiler), with many prerequisites that are just starting to come together, among those the new MIR work.
And finally it doesn't seem to be a priority in the roadmap, even today. More of an afterthought that received far too little attention to hope for significant progress.

Rust started off largely as an ML derivative but supposedly the designer chose C style syntax for popular appeal and ended up with the current puke. It's inappropriate for a lot of the intended semantics of the language. C++ programmers don't have any ground to complain about syntax but some of the especially functional style Rust is ugly on a whole different level and just degrades into a mess of curly braces, parens and vertical bars

Rust is a bit more complex than C++

Even printing a line takes a macro. But Rust is a good language, the new languages will be influenced by Rust

Rust is still better than C++

>Even printing a line takes a macro.

I think most people would rate that better than the streams API.

This is correct.

D > Rust

Thanks D, your approach was noble but the garbage collector kinda ruined it

D was a good name for a Dead language.
Enjoy your GC. Even Alexandrescu gave up on it.

>Enjoy your GC.
Thanks, I will!

Good for you, you must be the only one.
Because everyone who doesn't care about performance and predictable behavior is already using python.

I think it has better performance than C#

Then you need to look at the benchmarks.

you may as well use java/C# if you don't care about GC and being several times slower than C

Why do people defend C++ when Ada is better in every way?

o'rielly books are autistic

Ada is more verbose then fucking java.

Prove it, my man

>adafags shitting up another quality thread

Best c++ IDE?

i just want C with namespaces tbqh

It doesn't matter.
If you like your language, stick to it and make programs with it

eclipse

Why do programs like atom crash on large files?
What's wrong, it's just a text editor.

I'm trying to make my own text editor and I have to know what causes things simple as text editros to crash?

12 lines, still readable:
public class FizzBuzz {
public static void main(String[] args) {
final String EMPTY = "";
for (int i = 1; i

It's a browser my man.

What the fuck does that even mean? You know what's verbose? Fucking C, where every other line is an if statement making sure you didn't crash.

Namespaces are a useless feature that just fucks with C's simple ABI.
Although, C technically does have namespaces, just not in the way you're probably thinking of.

Error checking is required in literally every language.
And if you'd ever looked at the IOCCC you'd know C is one of the most compact languages around, when it needs to be.

You made that exact same post like a week ago, are you a bot?

I want to fork github.com/limetext/lime

Almost all other languages don't need it to the extent c does and the goal of making a program small isn't a good goal in the first place.

That's so cherry picked you deserve a (You)

>More than 1 statement per line
That's cheating, you douchebag.
Although I can agree that both Ada and Java are shit.

explain

>That's so cherry picked you deserve a (You)
Thank you, it was pretty cherry-picked tbqh.
Still, Ada is pretty verbose.

>if (i % 3 == 0) value += "Fizz";
That is supposed to be
if (i % 3 == 0)
value += "Fizz";
and if you really want to have a fair comparison with the Ada example, it should be
if (i % 3 == 0) {
value += "Fizz";
}

Put in a
[use Ada.Text_IO]
And then putting the prints in one line just like the Java well like just fine. Use put_line instead of put and remove the integer_text_io import since it's not useful. Wow, I think that makes it shorter than the Java version and better more readable.

Is x86 assembly difficult to learn?

Isn't the Ada version wrong though? You're not supposed to output the number when the Fizz/Buzz conditions are met.

gomobile... I haven't used it, so don't ask me

I'm hoping to increase my GitHub contributions and have a few more examples of personal projects. I was hoping to contribute to a GitHub project, maybe spinning up an instance in Jenkins and filing a few bugs.

Here's the dumb question: how can I trawl GitHub for an example?

>Namespaces are a useless feature
lol. it should at least be possible to refactor namespace-emulating prefixes conveniently using the IDE. maybe vim/emacs has a plugin for that, idk

>tfw you realize that 90% of programming is just familiarizing yourself with libraries other, smarter people have made
>then you put them together into your own libraries so that people even dumber than you can then put those together

what

a

world

I want to write a console C/C++ program that takes command input like bash. What simple/tutorial projects or things should I be looking at?

>What are you working on, Sup Forums?- 70 posts and 4 image replies shown.
I haven't started yet, still thinking about how to go about it. I want to add a feature to nemo (cinnamon's file manager) so that you can list directories in the cwd by size, as a file property column. The tricky part will be making sure that this feature doesn't kill responsiveness.

t. webdev/gui monkey

Only if you're some stupid brainlet.

>C/C++
Why are you grouping two completely different languages together?

linenoise

not the other user, but... an example of what he says:
blog.zikes.me/post/how-i-ruined-office-productivity-with-a-slack-bot/

that's just a casual social media bot toy program and he's a literal webfag
blog.zikes.me/post/serving-multiple-sites-from-one-go-process/

>that's just a casual social media bot toy program and he's a literal webfag
so, what's the problem? he made something that could be useful, from libs that allow him do that.

what, do you feel like an elite hacker for writing libs like those, libs that other people will end up using?

Really triggering my almonds...
with Ada.Text_IO; use Ada.Text_IO;
procedure FizzBuzz is
begin
for I in 1 .. 100 loop
if i rem 15 = 0 then Put_Line (" FizzBuzz");
elsif i rem 5 = 0 then Put_Line (" Buzz");
elsif i rem 3 = 0 then Put_Line (" Fizz");
else Put_Line (Integer'Image (I));
end if;
end loop;
end FizzBuzz;

Thanks.

>barber slices the throat of his client with a straight edge blade
>somehow it's the blade's fault

blog.pusher.com/golangs-real-time-gc-in-theory-and-practice/

>source to destination in less than 100ms
Whoa, did they turn on the Turbo button on their 386?

it's webfaggotry so hopefully it includes network latency