[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: 327
Thread images: 39

File: 32543543.jpg (62KB, 638x479px) Image search: [Google]
32543543.jpg
62KB, 638x479px
What are you working on, /g/?

Old thread: >>58632639
>>
Say it loud, say it clear, Rust is not welcome here.
>>
>>58637963
RUST IS A MEME
>>
/g/ is still pushing the Rust meme?
>>
>>58637935
Is this really what they charge thousands of dollars to learn at the University of Virginia?
>>
>>58637983
That's genuinely surprising.
>>
>>58638007
I know, right? Some people who are helping out are the ones in the chat during his stream presentations.
>>
>September 2013
Nice.
>>
Why is /g/ bashing Rust? Just think: RUST IS MEMORY SAFE, if this shit take over the place of C in every field tons and tons of vulnerabilities related to memory problems will disappear!

Imagine living in a world where vulnerabilites related to memory does not exist.
>>
>>58638064
If C++ still hasn't converted C codebases, Rust never will.
>>
>>58638064
Image living in a world where programmers have to hack around the borrow checker.
>>
>>58638064
string literals are memory safe
>>
>>58638064
>Why is /g/ bashing Rust?

To be special snowflakes. Although once Rust becomes a bit more proven it's going to take decades to get rid of all the shitty legacy C code in use today.
>>
>>58638050
It's not valid to Rust. If Rust disallows something, there's a good reason for it, usually because it leaves it undefined for the purpose of optimization or because it's never correct to do in the first place.

>>58638064
Because it's different. Same thing happens to Haskell, though Rust is a bit easier to understand so they can attempt to talk about the language itself rather than simply spouting "1 GB/s" and "no jobs" and the like.
>>
Reminder that fully @nogc D has only just begun
https://github.com/dlang/phobos/pull/4878
>>
updateOnThread(0);
std::vector<std::thread*> threads;
for(int i=2; i<systemThreads.size(); ++i)
{
std::thread *t=new std::thread(ECS::updateOnThread,this,i);
threads.push_back(t);
}
updateOnThread(1);
for(std::thread *t : threads)
{
t->join();
delete(t);
}


>people tell me multithreading is hard
>it's actually easy as fuck
>>
>>58638064
Because the SJWs have taken over Rust.
Therefore its evil, or some stupid us-vs-them shit like that.

But expecting opinions on languages in this thread to ever be valid has always been a mistake. Only Scheme is acceptable.
>>
>>58638091
It's hard when it needs to be scaled up to very large scale concurrent software.
>>
>>58638091
It's easy as fuck because you are creating and destroying threads over and over again which is really inefficient. If you want real performance gains you need to keep the threads around for a long time and have some back and forth communication.
>>
>>58638091
now do that without dynamic memory allocation
>>
>>58638064
something something cucks sjw webdevs steve klabnik is a faggot etc

Also programming in C is totally badass and edge-of-your-seat because your program could segfault and explode in production on someone else's machine at any moment but that never happens of course because /g/ is entirely hardcore graybeards who never have mistakes or bugs and if you have an inclincation toward using tools that aren't 40 years old and don't assist you in shooting yourself in the foot then you're basically just a pussy.
>>
>>58638079
C++ isn't strictly memory safe, and people who convert C codebases to C++ usually don't know what the fuck they're doing and make it even worse.
>>
>>58638181
alright Zed Shaw, go back to the bottle.
>>
>>58638183
Being memory safe is cool and all but it's not going to get Rust, adoption. Concentrating on one thing too much harms the rest of the language.
>>
>>58638079
It's a lot easier to go to Rust from C than to C++. Rust is a lot simpler especially with regard to RAII since Rust has no copy/move constructors, has affine types to prevent use-after-move and the like, and doesn't use exceptions for error handling so it's less of an issue if you leak resources in case of a panic because the process will be killed anyways.
>>
>>58638064
Literally no reason other than Mozilla being the one who created it
>>
>>58638204
>but it's not going to get Rust, adoption

Computer security is an absolute joke and it's only going to get worse. There's an enormous need for a modern, natively compiled, memory safe language which isn't dependent on a garbage collector.
>>
>>58638064
>Why is /g/ bashing ______

As always: autism
>>
>>58638079
>>58638227
Also, Rust has a nice build system and package manager. C++ is a bloody mess.
>>
>>58638312
RIP modules in C++17
maybe C++20.. maybe.
>>
>>58638331
What happened to C++ modules?
I can't imagine them working well anyway, that kind of things really needs to be native.
>>
>>58638363
nobody actually did anything, it was all plans
>>
>>58638363
>What happened to C++ modules?

The C++ standards committee is extremely conservative and takes a long time to get new features into the standard.
>>
>>58638386
>>58638375
I couldn't imagine them working without heavy header altercations, which is the committees worst nightmare to possibly break anything.
>>
Java is pure.
>>
>>58638386
>>58638403
nobody actually did anything
they don't even have a TS yet
>>
>>58638422
pure poop
>>
HE DOES IT FOR FREE
>>
I think I found a hole in C++ today.

I was creating a struct inside a class, then wanted to forward declare that struct in another header. This doesn't seem possible at all. Am I missing something?
>>
>>58638286
/g/ is always right though
>>
>>58638628
Example?

Only time I've had trouble with forward declarations is when i forgot to include them.
>>
I did lua interpreter in C++ using variadic templates and tuples for the parameter lists.
I'm pretty happy with the result. Now I can just type CallLuaFunction("FunctionName", ...any amount of args);
>>
>>58638686
>it doesn't fail to typecheck if he gives the wrong number of args
sad!
>>
>>58638643
>/g/ is always right though

/g/ isn't even self-consistent
>>
>>58638742
/g/ isn't one person.
>>
>>58638749
I am he
>>
>>58637935
Where's the anime profile picture?
>>
>>58638693
It doesn't really matter, it's up to the Lua-scripter to accept the given parameters.
I do however post "did you mean funcName" using the Levenshtein distance, if you mistype a registered function on the C++ side.
>>
>>58638767
Waddup G!
>>
File: 979839191939453522.jpg (19KB, 396x407px) Image search: [Google]
979839191939453522.jpg
19KB, 396x407px
>>58638794
Here
>>
File: lights.jpg (161KB, 1032x774px) Image search: [Google]
lights.jpg
161KB, 1032x774px
I'm playing with a microcontroller board and would like to make a traffic light controller. I am controlling the traffic lights (3 * three-aspect red/yellow/green lights and 2*two-aspect red/green lights) with two 74F374 shift register ICs. Pic shows the lights and registers.

In the control code I have set up an
unsigned int
control variable whose bits represent the individual traffic light aspects (total 13 bits used). The high/low bytes of the control variable are shifted bit by bit into the shift registers.

I'd like to create a simple layer of abstraction to the code so that instead of controlling a single red/yellow/green aspect I could just call something like this in my code:
...
Trafficlight_Control(1, GREEN);
Trafficlight_Control(2, YELLOW);
Trafficlight_SetFlash(2, true);
...

where the control functions would accept two ints: the number of traffic light (1...3) and the mode to use or whether to flash or not.

Any advice or hints to get me started?
>>
>>58638814
cute
>>
>AGDG used to be OOP loving Pajeets
>AGDG now hates OOP solely to be contrarian and thinks 400 line switch statements all over the place are okay as long as they're not OOP
>>
>>58638906
you must spread the love and word of FP to agdg
>>
>>58638814
It is on the wrong place
>>
>>58638940
I did mention that if you don't have many variants and are fine with it being a closed, more procedural style system, algebraic data types and pattern matching are fine.
>>
>>58638312
>Rust has a nice build system
It's pretty cancerous tvh.
>and package manager
Languages should never have their own package managers. This is pure evil.
>>
>no programming socks
What do?
>>
>>58639014
Post feet
>>
>>58639011
>It's pretty cancerous tvh.
Elaborate.

>Languages should never have their own package managers. This is pure evil.
Because..?
>>
>>58639029
Because there is already pacman.
>>
>>58639021
you wont like em
>>
>>58639066
And why do you think libraries should be distributed in source form on a per distro basis? This is assuming that we only care about Linux or other operating systems with similar package management.
>>
>>58639078
Linux and other OSwith similar package management are the only relevant OS
>>
>>58639029
Rust locks you into using their special snowflake package manager because you can't just compile individual files without it.
>>
>>58639094
That may be so but what do the language's libraries have to do with the operating system and distro?

Should GitHub not exist and instead people host libraries and applications in source form in distro package repos?

>>58639116
Yes, you can.
>>
>>58639116
That's the way Rust is a safe language
>>
>>58639130
>Should GitHub not exist
Yes.
>>
>>58639130
>That may be so but what do the language's libraries have to do with the operating system and distro?
They must be dropped then.
>>
>>58638183
>C++ isn't strictly memory safe
It's not memory safe at all, but unique_ptr will get you a long way.
>>
>>58638183
>>58639160
C++ is memory safe if you're using Valgrind like you should have learned how in first grade.
>>
>>58639179
Testing is not proving, anon.
>>
What are monads?
Dumb way, please
>>
File: smiley.jpg (25KB, 480x360px) Image search: [Google]
smiley.jpg
25KB, 480x360px
>his favorite language doesn't come bundled with a packet manager, game collection and a web browser
>>
>>58639203
A monad is just a monoid in the category of endofunctors.
>>
>>58639187
Computers are science, not math.
>>
>>58639203
A monad is just a monoid in the category of endofunctors, what's the problem?
>>
>>58639213
Which language does this, faggot?
>>
>>58638852
I don't get what you're asking, if you know how to get the leds to glow why not just do that in your Trafficlight_Control function?
Or maybe I'm not getting something, maybe give a bit more detail?
>>
>>58638089

D WILL RISE
>>
File: Homura_DPT_rust.jpg (148KB, 563x712px) Image search: [Google]
Homura_DPT_rust.jpg
148KB, 563x712px
We all agree Rust syntax is horrible. Here's a list of the major problems and how to fix them, and then maybe people will actually use it someday.
1. No block expressions. No implicit returns. Use the fucking keyword.
2. Take the colon out of declaration syntax. remove the question mark operator. Give us a real ternary operator.
3. Take the "!" out of macros. They should look exactly like function calls.
4. Take the pipe bullshit out of closures. Use balanced delimiters.
5. Take out the "::" that sometimes appears when using templates. There is no reason for having this.
6. Fix all the keywords that were renamed for no reason: "match" = "switch," "let" = "auto," "()" = "void," and so on.
7. Replace the stupid "=>" operator with real case labels so IDEs can actually highlight them.
8. Make mutability the default. Use explicit const for immutable variables and references.
9. Put the type before the variable, not after.
10. Remove the pointless "fn" keyword. It's redundant.
11. Put template parameters before the associated declaration instead of mixing them in with a bunch of other stuff where it's impossible to read.
12. Change "self" back to "this" and make it implicit.
13. Struct fields should be defined with the same syntax as declaring variables.
14. Remove "impl Bar for Foo." You should be able to see all the interfaces a type inherits from at the declaration site.
15. Remove "impl Foo." Methods should be defined inside the struct body, or declared there and defined at the top level.
16. Make parentheses mandatory in if/while/for statements. Make braces optional.
17. Bring back the three-part for loop syntax. There are things that simply can't be expressed without it.
18. Make lifetimes completely invisible. They're implicit some of the time. Make them implicit all of the time, or just remove them. If the compiler can't make this work without a bunch of arcane symbols the programmer has to type, there is no point even having the feature.
>>
Test
>>
>>58639214
>>58639218
What are monoids?
What are endofunctors?
>>
>>58639116
>because you can't just compile individual files without it.

You can drive rustc with what ever you wish.


>>58639146
the package manager has nothing to do with fulfilling their requirements for safety.
>>
Python is trash.
Prove me wrong
>protip: you can't
>>
>>58639343
trash gets thrown out. It's more like nuclear waste.
>>
>>58639351
Nice analogy
>>
>>58639367
you think that?
>>
>>58639375
Pretty much
>>
File: 1395982158913.png (46KB, 363x364px) Image search: [Google]
1395982158913.png
46KB, 363x364px
>>58639295
>>
>>58639203
monads are basically a programmable semicolon. imagine all of your statements could be evaluated in any order, so if your program was
name = ask_user_for_username()
print(Hello, name)
print(Nice to meet you!)
you might get an output like 
Nice to meet you!
Hello, null
What's your name?
But so you'd want to do async stuff,

name = ask_user_for_username().whenDone( function(name) { print(Hello, name!).whenDone(function() print(Nice to meet you!)
which is awful, so you write a monad to do the async callback for you:
name = ask_user_for_username(); // <-- magic ; sets up callbacks for you
print(Hello name);
print(Nice to meet you!);
Since the monad (;) is programmable, you could do potentially anything with it! And since a lot of programing is repetition, it lets us abstract a lot of stuff.
name = get_user_name()
if (name == null) {
return False;
}
date = get_birth_date(name)
if (date == null) {
return False;
}
today = get_todays_date()
if (today == null) {
return False;
}
return today == date;
Which is also awful to write. So you use a monad to do it for you! This monad returns null if the function returns null:
name = get_user_name(); // <-- magic ; does the null check for you
date = get_birth_date();
today = get_todays_date();
return date == today;
>>
>>58639295
Half of these are wrong.
You're forgetting that Rust through away a few of the fucking retarded ideas that permeate C, and replaced them with much better ML ideas, e.g. 1, 6, 8, 9, 14, 15, 16
>>
>>58639203
in Haskell, the Monad typeclass has the following functions:

return :: a -> m a
(>>=) :: m a -> (a -> m b) -> m b

m is the monad, a and b are any type (the function has to exist for any type a and any type b)

one way to think of them for some monads is that return embeds an (a) value as an (m a), and (>>=) can sometimes be thought of as "andThen"
>>
>>58639295
I'm skipping most of these as low quality bait but:

>Remove the pointless "fn" keyword. It's redundant.

Not if they want their grammar to be context-free.
>>
>>58637935
How do you get better at solving things like this?
https://leetcode.com/problems/arithmetic-slices/

Learning by solving fuckton of this or is there some way of reasoning or some other thing that is required to get better?
>>
File: Untitled.png (324KB, 1488x2408px) Image search: [Google]
Untitled.png
324KB, 1488x2408px
JsonArray jsonArray = jsonObject["Groups"].GetArray();

foreach (JsonValue groupValue in jsonArray)
{
JsonObject groupObject = groupValue.GetObject();
SampleDataGroup group = new SampleDataGroup(groupObject["UniqueId"].GetString());

foreach (JsonValue itemValue in groupObject["Items"].GetArray())
{
JsonObject itemObject = itemValue.GetObject();
group.Items.Add(new SampleDataItem(itemObject["UniqueId"].GetString()));
foreach (JsonValue contentValue in itemObject["Content"].GetArray())
{
JsonObject contentObject = contentValue.GetObject();
group.Contents.Add(new SampleDataContent(contentObject["UniqueId"].GetString()));
}
}
this.Groups.Add(group);
}
}



So I have this JSON and it has Dictionary inside Dictionary (Groups>Items>Contents)
 group.Contents.Add(new SampleDataContent(contentObject["UniqueId"].GetString())); 

won't work it just says that Contents is not in group and I totally get that, but I cannot find a way to get into Items and then into Contents. I am totally retarded, can I get some help.

>picture related
The whole json parser
>>
>>58639674

jesus titty fucking christ this is the most hideous, shit piled layered looking code ever, exactly why i stay away from M$.

fuck man, do us all a favor and ditch this shit.
>>
>>58639674
>foreach foreach foreach
just use the list monad
>>
>>58639116
>being this uninformed
>>
>>58639692
Well, that's how it comes from M$, It looks like shit, but it was ready and I want to get over with this shit, all I want is to add another layer, so the JSON itself doesn't look like shit.
>>
>>58639637
Through logic.

Think about how you solve a simple version of the problem by hand, then break that down into a number of simple steps that will yield the result that you seek.

Confirm that the step-by-step solution works on a slightly different, but fundamentally same problem by solving it by hand, following the step-by-step instructions you came up with in the previous step.

Then you just need to create a program that executes these steps, one by one, and confirm that it works on both the examples you provide it, and examples you haven't tested yet.

Only thing you really need is a good grasp of the problem, like the math involved in your example.
>>
>The library named ieee.std_logic_unsigned is not an ieee standard library

why
>>
>>58639674
>not using monads to avoid nested for each
pleb
>>
>>58637935

Did the employer demand improved since 2013?

Anyone even heard of people getting paid nontrivial amount of hard currency to code in Rust? Anyone?
>>
>>58639993
>pleb
Tell me something I don't know.
>>
>>58638064
>RUST IS MEMORY SAFE
Enough with your fake news! Begone!
>>
Am I doing it right?

#include <iostream>

namespace NamespaceEncapsulationStrategy {

namespace CommonlyUsedValuesStrategy {
namespace LimitedOptions {
enum EitherOneOrTheOtherEnumeration {
NOT_TRUE = false,
NOT_FALSE = true,
FALSE = false,
TRUE = true,
NEGATIVE = false,
POSITIVE = true,
DEFINITELY = true,
VERY_IMPROPABLE = false
};
}
}

namespace DatacontainmentNamespace {
typedef int DataTypeFourBytesPlusAndMinusWholeNumbers;
typedef bool DataTypeEitherTrueOrFalse;
}


namespace FunctionalityEncapsulationNamespaceStrategy {
NamespaceEncapsulationStrategy::DatacontainmentNamespace::DataTypeFourBytesPlusAndMinusWholeNumbers PrintVerificationMessage() {
std::cout << __FUNCTION__ << std::endl;
return 2;
}
}
}

NamespaceEncapsulationStrategy::DatacontainmentNamespace::DataTypeFourBytesPlusAndMinusWholeNumbers main() {
NamespaceEncapsulationStrategy::DatacontainmentNamespace::DataTypeEitherTrueOrFalse verification = NamespaceEncapsulationStrategy::CommonlyUsedValuesStrategy::LimitedOptions::EitherOneOrTheOtherEnumeration::POSITIVE;

if ( verification == NamespaceEncapsulationStrategy::CommonlyUsedValuesStrategy::LimitedOptions::EitherOneOrTheOtherEnumeration::NOT_FALSE ) {
NamespaceEncapsulationStrategy::FunctionalityEncapsulationNamespaceStrategy::PrintVerificationMessage();
}
std::cin.get();
return NamespaceEncapsulationStrategy::CommonlyUsedValuesStrategy::LimitedOptions::EitherOneOrTheOtherEnumeration::NOT_TRUE;
}

>>
>>58639343
it has its purpose, as a script language which does fucking everything due to the largest community in the history of the universe
>>
So due to the memes, I've decided to learn Rust before C. Any good books on Rust?
>>
>Learning C
>Previous knowledge in C++
>Not too terribly much, enough to do well in 2nd year class

Will learning C while trying to improve my C++ mess me up at all?
>>
>>58639977
Because it's just a convenience wrapper that goes around ieee.std_logic_1164.

ieee.std_logic_arith is normally good enough, why are you specifying unsigned?
>>
>>58640160

You'll probably stop using references over pointers, or vectors over arrays.

Which is "bad" in terms of idiomatic C++, but much better for general readability.
>>
>>58639637
The way I'd tackle this is to start from the beginning of the array and count the step between each number. Have a counter for how many numbers have had this step. Once you run into a number that breaks the step consistency look at your counter and figure out how many continuous sub arrays of more than 3 elements are in a list of that size.

I don't know a formula for that last part but I figure it's not super hard to come up with one.
>>
>>58640161
ieee.std_logic_arith is not a standard ieee library either. You should use std_numeric
>>
File: i already came tbh.jpg (148KB, 450x533px) Image search: [Google]
i already came tbh.jpg
148KB, 450x533px
How does it feel knowing that yanderedev is receiving thousands of dollars in patreon money every month to produce quality code like this?

http://pastebin.com/cu9gDj5Z

This is source code from yandere simulator.
>>
>>58640201
numeric_std*
>>
>>58640201
Derp, not touched VHDL in almost a year, got them mixed up.

Pretty good summary of the whole fuck-up:
http://insights.sigasi.com/tech/deprecated-ieee-libraries.html
>>
>>58637935

What is the best portable 3d model format?

I've written a .obj file loader that displays into OpenGL (a popular newb project) but I now need a format that isn't a meme
>>
>>58640236
Interesting, thanks for the link
>>
>>58640120
The official online "book" is pretty good.
>>
I have procrastinated actually programming for months (I've gone through more than enough tutorials). Is there any royal road to getting shit done or is programming really just constant googling and frustration with moments of progress? My current aspirations are basic JavaScript browser games, and maybe crud apps and basic websites
>>
>60 megabyte binary
ha h ah ah aah aah
>>
File: 1485116915959.png (328KB, 651x431px) Image search: [Google]
1485116915959.png
328KB, 651x431px
>>58640204
>2000 line method comprised of if-else pyramids

He not only should not be paid, he should be fucking fined.
>>
>>58640340
Did you embed a fucking video?
>>
>>58640328
>constant googling and frustration with moments of progress
that's why you get paid the big bugs, only pure autists can handle programing
>>
>>58640385
if it works, it's fine
>>
I'm making an open source (LGPL3) 3d game engine which places a priority on Linux compatibility. Some of my goals include:
Vulkan support
Virtual reality support
Easy Steam integration
Effortless controller support
>>
>>58640340

just import my whole shit
>>
>>58640390
the entire runtime lol
>>
>>58640445
See you in about 30 years.
>>
>>58640445
I forgot the Github link: https://github.com/Lyle-Tafoya/OpenCGE
>>
File: 1478838811226.png (165KB, 327x316px) Image search: [Google]
1478838811226.png
165KB, 327x316px
>>58640445
>OpenCGE is a 3D game engine using component-based design with event-based messaging.
>Boost
>>
>>58640507
If you have any ideas for another library which provides cross platform filesystem access that doesn't suck, please let me know. I'm not willing to write a single line of OS specific code.
>>
How would a mongodb forum schema look? store all posts inside an array on the thread object? won't that slow down a lot performance? help me out
>>
>>58640527
libuv

You should really rethink the component-based part and the event-based part. Not that component-based is bad, but it's not really something that a game engine should impose. Same with event-based, but it's actually bad.

I would forget about making it an editor based thing, and focus more on making it a good library. Also make a game yourself to drive its design or it will never be usable.
>>
>>58640445

> dude
> what if 3d objects
> were OOP objects
> lmao
>>
>>58640445
who do you expect to use it?
>>
>>58640554
>but it's not really something that a game engine should impose
I disagree. You are free to use a different game engine.
>event-based, but it's actually bad
And yet you provide no argument

I'll look into libuv, but it's unlikely that I will change away from boost since it will have no impact on performance and I am still in the middle of heavy development tryinig to add major features, rather than focusing on pleasinig some autists on a image board who don't like boost because
>muh minimalism

>>58640606
Me, and anyone else who wants to. Most people don't feel like writing a 800 lines of code just to get a hello triangle application running in Vulkan

In my engine (once I am done with the vulkan system) it will be as simple as
#include <OpenCGE/system.hpp>
#include <OpenCGE/graphics_vulkan.hpp>
#include <OpenCGE/physics.hpp>

int main()
{
// Instantiate our systems
OpenCGE::System::entitiesLoad("data/entities");
OpenCGE::Physics physics_system;
OpenCGE::GraphicsVulkan graphics_system;
graphics_system.scenesLoad("assets/models");

// Create a new entity
size_t entity_id = OpenCGE::System::entityCreate("object_3d");
OpenCGE::System::callbackTrigger("scene_update", {{"entity_id",entity_id},{"scene_name","hello_world"}});
OpenCGE::System::callbackTrigger("torque_apply", {{"entity_id",entity_id},{"x",50.f},{"y",50.f},{"z",0.f}});
OpenCGE::System::callbackTrigger("velocity_apply", {{"entity_id",entity_id},{"x",0.f},{"y",0.f},{"z",-0.1f}});

OpenCGE::System::timerStart();
while(true)
{
OpenCGE::System::callbackTrigger("time_passed", {{"time_delta",OpenCGE::System::getTimeDelta()}});
}
}
>>
File: 3076591239.gif (3MB, 355x201px) Image search: [Google]
3076591239.gif
3MB, 355x201px
>>58640564
>>
File: 1483145463995.jpg (68KB, 720x407px) Image search: [Google]
1483145463995.jpg
68KB, 720x407px
>>58640638
>callbacks and strings everywhere
Just stop before you hurt yourself.
>>
>>58640638
How do you plan to handle multithreading?
>>
>>58640670
The strings are going to be replaced with integers and are only present because it was easier during the rapid prototyping stages of development (which were intially in a completely different programming language I might add). I know what I'm doing, and I also know that even if I leave those strings in it will still be performant enough for 99% of games.
>>
>>58640691
He clearly doesn't.
>>
>>58640692
>I know what I'm doing
That's debatable given how fucking retarded that code example you posted is.
>>
>So I spent a few evenings with Rust, and I have managed to do some pretty trivial stuff with it, but then I tried to do something non trivial (low level trie that relies on low level memory manipulations). And after realize that I just have to fight the language non stop, I am not going to continue forward with this.

https://ayende.com/blog/176801/the-struggle-with-rust
>>
>>58640721
You already posted this moron's rambling.
>>
>>58640691
I'm still experimenting with multithreading in original project this is based on. Once I have decided on the way I want to approach it I will modify OpenCGE as needed. However, at this time I have not yet decided the best way to implement multithreading.

>>58640713
You haven't provided any objective criticism. Callback functions are very fast and enable systems to operate independently of each other with zero coupling.
>>
>>58640727
You sound upset with truth
>>
>dude memory safe
>dude just safe memory
>dude you can't mess up, rust is perfect
>>
>>58640747
>Callback functions are very fast and enable systems to operate independently of each other with zero coupling.
And they depend entirely on side effects so good luck making multithreading work. If you designed it as a library instead of some shitty framework that steals control from the programmer, it wouldn't matter, because this sort of high level stuff wouldn't be its responsibility. If I wanted to write garbage code depending on strings and mutation and whatnot everywhere, I'd use Unity.
>>
Java is arguably the best-tooled language in existence.
>>
what does typical, advanced real world Rust code look like?

is it true that it's at least human readable unlike C++?
>>
>>58640727
Oh sorry. I only just read it and didn't find the link in this thread. I went back a thread and found it linked there. Sorry.
>>
>>58640797
I find it hard to believe that two people would use such a blatant display of ignorance as criticism of a language so soon after one another.
>>
>>58640793
Even though Rust isn't as bad as C++, it's still a really ugly language.
>>
>>58638091
>using a regular for loop in C++
>std::std::std::std::std
>new/delete

I don't know how you managed to pack so much trash into a few lines, but you did
>>
>>58640813
There are currently 48 posters in this thread. Given that at least half of us regularly read programming news on /r/programming, hackernews, and/or lobste.rs, it's not that ridiculous.
>>
>>58640834
>Given that at least half of us regularly read programming news on /r/programming, hackernews, and/or lobste.rs,
Stop projecting, you fucking redditor.
You should leave.
>>
>>58640793
Pretty much all real world code borders on unreadable.
The only exception is Pascal/Delphi.
>>
File: 82632599298.png (159KB, 312x317px) Image search: [Google]
82632599298.png
159KB, 312x317px
>>58640825
>Even though Rust isn't as bad as C++
>being butthurt and delusional
>>
>>58640825
rust is perl-tier ugly
>>
File: 61990283105988.jpg (42KB, 976x767px) Image search: [Google]
61990283105988.jpg
42KB, 976x767px
>>58640839
>half of us regularly read programming news on /r/programming
>>
I'm about one month into Java; I'm making a dumb little GUI to practice actionlisteners with buttons; all it does right now is link to various sadpanda searches along with a random button to pick one of the searches. I started right after christmas and I'm having a fucking blast learning programming.
>>
>>58640847
>>being butthurt and delusional
What?
I've used Rust. I've written non-trivial (although not massive) programs in Rust.
It's a very interesting language, but the syntax is really fucking ugly.
It's just not to the same level of retardation as C++.
>>
> Rust won the first place for Most Loved Programming Language of 2016 in the Stack Overflow Developer Survey.[20]

/dpt/ on suicide watch
>>
>>58640778
>And they depend entirely on side effects so good luck making multithreading work
I'm well aware of the difficulties introduced, but that does not make it impossible. I already have a couple different ideas on how to make it work that I am experimenting with.

>steals control from the programmer
Now you're just being retarded. First of all, if you look at my example, you'll see that my framework does not take control of the main loop in any way. Additionally, nothing forces anyone to register or call any callback functions. Just because I provide an interface for people to do that, it doesn't enforce that people use it as the backbone for their game.

>depending on strings
As I've already told you, the strings will be replaced by integers in a future implementation. For rapid prototyping purposes it was faster and easier to get something working by using unordered_map with string keys because the integer based solution I have in mind requires more code. You sound like someone who is new to programming and doesn't understand the importance of simply making it work first and than optimizing later. Premature optimization is a sure way to ensure your project never gets off the ground. The fact of the matter is that generating an integer hash value form a string is very fast and only a very small minority of games would ever find that to the bottleneck in their performance.
>>
>>58640862
>perl-tier ugly

Perl is beautiful
>>
>>58640891
both SO and mozilla are owned by kikes who want the rest of the world to be degenerate SJWs in order to benefit Israel
>>
>>58640839
So you don't read programming news, then?
>>
File: 1484386708632.jpg (35KB, 460x345px) Image search: [Google]
1484386708632.jpg
35KB, 460x345px
How do I get into a programming career without a degree?
>>
>>58640864
Please note the usage of "and/or"
>>
>>58640903
>Additionally, nothing forces anyone to register or call any callback functions. Just because I provide an interface for people to do that, it doesn't enforce that people use it as the backbone for their game.
Why even bother, then?

>You sound like someone who is new to programming and doesn't understand the importance of simply making it work first and than optimizing later.
When "optimizing later" involves totally overhauling your API, you should really consider doing it up front.
>>
>>58640638
>All of these strings everywhere

This is what killed my attempt at making a 3D engine. Shit lagged too much.

Beware.
>>
>There are only two kinds of languages: the ones people complain about and the ones nobody uses
Bjarne Stroustrup

i.e. more complaints about Rust means it's seeing more serious adoption and usage
>>
File: 074.jpg (54KB, 680x383px) Image search: [Google]
074.jpg
54KB, 680x383px
>over 30 years old
>learning 1st computer language
>dat feel when you feel your wizard powers are starting to manifest

Hal was right. Programing is like writing magic spells.
>>
File: 1479743237301.jpg (11KB, 300x255px) Image search: [Google]
1479743237301.jpg
11KB, 300x255px
>>58640911
I'll circumcise my dick if I have to to kill the abomination that is C++.

God bless the chosen people!
>>
>>58640950
By that logic Windows is better than Linux.
>>
>>58640950
>shill my language all over /g/
>people complain
>language magically becomes popular due to the amount of complaints

shill magic
>>
>>58640544
help me you fucking losers
>>
>>58640793
still waiting for actual examples of code
>>
>>58640938
>When "optimizing later" involves totally overhauling your API, you should really consider doing it up front.
It's still pre-alpha. It's not like anyone is actually using it in it's current state. Plus, I know how to make major changes like that in my own engine very quickly. It's just right now I would much rather focus on adding new functionality.

>>58640947
I'm willing to bet it had more to do with implementation. How were you using the strings? Are you sure the strings were the bottleneck in your application? And as stated in other comments, this will be using integers in the future. It made more sense in the original Ruby project this was based on (not a game engine, but just a generic simulation lib)
>>
>>58640992
you're beyond help and saving anon
>>
>>58640992
You're not entitled to an answer, you faggot.
>>
>>58640938
>Why even bother, then?
I don't always use the bottle opener on my swiss army knife, but that doesn't mean the swiss army knife is useless to me
>>
>>58640979
Degenerate vocabulary, sign of an atrophied mind.
>>
>>58640445
Nobody is going to use your engine. Make a game.
>>
>>58641036
I'm having a lot more fun making an engine, but thank you for your advice.
>>
>>58640120
>>58640309
This is bait.
>>
>>58640993
https://github.com/rust-lang/rust/tree/master/src/librustc
>>
>>58641032
>largekatanafedoratip.jpg
>>
>>58641062
You can still do all the engine stuff, but make a game instead of just having the engine as a final product. If you make the code open source somebody else might want to use it, but nobody will use an engine that hasn't already been proven capable of making a game.
>>
File: 1484932155036.jpg (32KB, 480x360px) Image search: [Google]
1484932155036.jpg
32KB, 480x360px
>>58640080
>>
>>58641093
I'm not particularly interested in making a game. My long term goal requires this engine to be complete as a prerequisite, but it's not going to be a game. That is all really besides the point though. Right now I am making an engine. I decided to share that with you all. Whether you agree or disagree with that or with my specific design decisions is irrelevant. I have goals for a much larger project and I am following them. I just thought I'd share this piece of my project since I am having fun working on it.
>>
>>58640544
>>58640992
Don't use mongodb, you fucking retarded hipster.
>>
>>58641172
enjoy trying to make your s(shit)ql database web-scale
>>
I can do basic command line programs in c++
wich graphical library should I learn,
I just want someting with basic io and that works on windows mac and linux
Heard Qt was good. Is it?
If so where do I start?
>>
How to install a Rust compiler on Ubuntu?
>>
>>58641206
http://lmgtfy.com/?q=How+to+install+a+Rust+compiler+on+Ubuntu%3F
>>
>>58641085
Fucking do it faggot, 'dora me
*tears off shirt*
YAMATOOOOOOO
>>
>>58641201
Qt is very good for C++
>>
>>58641218
Thanks but people would usually provide a package name to be helpful, you twat.
>>
>>58641241
rustc and cargo

retard
>>
>>58641241
Your fault for asking a fucking stupid question. if you're too fucking basic to even figure out that step how the fuck do you expect to achieve anything?
>>
File: hmmmmm.jpg (126KB, 961x763px) Image search: [Google]
hmmmmm.jpg
126KB, 961x763px
>>58641241
>>
>>58641009
>>58641016
>>58641172
>>58641195
fags
>>
>>58641333
lol stay butthurt
>>
>Rust has had a lot of stuff going on with “macros”. There are a few, interconnected aspects of these features, many different names for the same thing, and a lot of development work going on. This post will give an overview of the past, present, and future of macros in Rust.

http://words.steveklabnik.com/an-overview-of-macros-in-rust
>>
>>58641361
my wife's boyfriend say that all the time to me and i don't mind.

why would i be "butthurt"?
>>
>>58641411
because you sat on my dick without lube
>>
File: 76892.png (6KB, 369x369px) Image search: [Google]
76892.png
6KB, 369x369px
>>58641411
>>58641426
>>
>>58640544
>How can I do a task most optimized for an indexed SQL database in a MEME database because someone on the internet told me it was better?
HAHAHAHA.
>>58640992
AHAHAHAHAHA

Ahhhh, that was great. Keep doing things like that.
>>
>exercises have near impossible stuff that you haven't been told yet how to do
>>
>>58641562
That's the fun
Figuring it out yourself
>>
>>58641562
>Tasks requiring you to do your own research and think for yourself.
Unacceptable. Modern education only requires you to memorize and recite things. How dare they try to challenge you.
>>
>>58638088
>Same thing happens to Haskell
cause it's slow as shit and has no ecosystem ?
>>
File: 1438473346546.png (780KB, 1001x1001px) Image search: [Google]
1438473346546.png
780KB, 1001x1001px
>>58638091
>using a pointer when your variables don't leave the context
>std::thread *t = new std::thread
>not using auto

Harakiri is only a cliff away, anon.
>>
>>58641595
If wanted to do that I would play video gaems, retard
>>
File: 1453458347_1442827910422.png (106KB, 683x470px) Image search: [Google]
1453458347_1442827910422.png
106KB, 683x470px
>>58641670
Sorry senpai, that's just how it is
>>
Anyone need some help on any Java projects? I'm beginning however am pretty comfortable with the language.
>>
File: 28838.gif (2MB, 322x322px) Image search: [Google]
28838.gif
2MB, 322x322px
>>58641692
NOOOOOOO
>>
>>58640204
>being this retarded

this is clearly output from a decompiler
>>
>>58641696
You can help with my Java career project by telling me how much of this retarded language I need to know to get a job.
>>
>>58641724
Considering that there are "readable" variable names, no: it's clearly not.
>>
>>58638064
Memory safety is useless, and only fucking retards care about it.
>>
>>58640868
I'm also about a month in, wanna team up?
>>
>>58638064
>RUST IS MEMORY SAFE
Prove it.
>>
>>58641756
Hey that was going to be my question for you...
>>
>>58638091
You just wait until you get to thread synchronization you faggot.
>>
File: Untitled.png (34KB, 767x724px) Image search: [Google]
Untitled.png
34KB, 767x724px
>>58641770
yeah totally
>>
>>58640829
>>using a regular for loop in C++
>implying that doesn't work just as well
>>std::std::std::std::std
using namespace std; interferes with a lot of easy to use local variables, and IMHO is easier to read this way
>>new/delete
the vector of pointers is pretty stupid
>>
If you want a massive dose of autism, check out my attempted map exploration optimization techniques, and possibly suggest some other things I could try to make work.

Next one I'm going to slap on is preferring recently discovered frontiers over stale ones.

https://youtu.be/Ftq9IVCXQ18

right hand panel applies properties listed in top bar.
>>
>>58637935
Debugging a hard fault in a microcontroller.
Thanks ARM
>>
>>58638091
std::vector<std::thread> threads{};
threads.reserve(systemThreads.size());

for (int i = 2; i < systemThreads.size(); ++i) {
threads.push_back(std::thread{ECS::updateOnThread, this, i});
}

for (auto &thread: threads) {
if (thread.joinable()) {
thread.join();
}
}
>>
>>58641913
What algorithms do you use to generate those?
They're looking quite nice.
>>
New student here. I want to eventually get into information security. To get there, I realize I have to learn a few programming languages, but I want to try to 'futureproof' what I learn as much as possible.

Is there anything popular or commonly recommended to students (especially among courses offered at universities) that is on the way out, dying, or otherwise not worthwhile to begin learning now?

My second question is the inverse: what is already well known (I don't want to get in on the ground floor of some brand new meme language) but is going to become even more used as time goes on?

From my own reading, (and please correct if I'm wrong), I'm learning that both Java and Javascript are on their way out, and Python is becoming quite popular for an increasing variety of uses.

From my courses at school, I am so far planning on learning:
HTML,
CSS, (these two are obvious/noob stuff from what I gather),
Python (a later version of v2.X; my professor says v3.X is not widely used yet so it would make sense for someone going into infosec to know v2),
Java (might be on it's way out (?) but still very widely used)
Visual Basic (genuinely not sure how relevant this will be but getting to know windows programs better can do me some good)
Later on, I think picking up C++ and something like Javascript or PHP would be a good idea, too.

Thanks for reading, hopefully I don't come across as a complete noob. I'm doing a lot of this learning on my own outside of a school so it's quite solitary; I'd appreciate some perspective on the bigger picture on these things.
>>
File: 1480850005481.jpg (12KB, 300x141px) Image search: [Google]
1480850005481.jpg
12KB, 300x141px
Is Rust still changing core language features between releases?
>>
>>58641959
It's past version 1.0.
>>
File: autism.png (148KB, 1096x1888px) Image search: [Google]
autism.png
148KB, 1096x1888px
>>58641937
Essentially just Dijkstra maps.
When properties are active, they're basically added to the current set of maps, and the computer can find where it wants to go just from comparing only the tiles adjacent to itself.

The character values for the lower panels are just so I can visually distinguish what the computer can see, because doing it by color when you can have over 100 different ranges showing is fucking hard.

Also I hardcoded the characters in the most retarded way I could.
>>
File: 1459965454255.gif (1001KB, 640x480px) Image search: [Google]
1459965454255.gif
1001KB, 640x480px
>>58642031
>>
>>58642039

I feel like I belong in one of those cs grad memes.
>>
>>58642031
Fucking kms
>>
>>58642031
l
m
a
o
>>
File: asciifull.gif (27KB, 715x488px) Image search: [Google]
asciifull.gif
27KB, 715x488px
>>58642048
You do.
>>
File: 979839279825446909.jpg (329KB, 1008x716px) Image search: [Google]
979839279825446909.jpg
329KB, 1008x716px
>>58642031
SHEEEEEEEEEEEIT
Look at shit, this is why I come to /dpt/.
>>
>>58642039
you know anon, since ASCII is just numbers, you can turn a number into an ASCII character of it by adding some number like 30 (i forgot) and then cast it to char. Look up the ascii table for it
>>
>>58642062
yeah, I know about this. I just did the copypaste in a minute and decided I would go back and fix it later.
>>
>>58642031
if(val >= 0 && val <= 9)
c = val + '0';

Apply a similar pattern to the rest
It'd be a start at least
>>
http://blog.racket-lang.org/2017/01/racket-v6-8.html

new logo is cool
>>
>>58641948
>but I want to try to 'futureproof' what I learn as much as possible.
Then learn to think of everything in the most general terms possible. The fact that you are looking to learn "a few programming langauges" already shows me you are going the wrong direction as far as this is concerned. You should understand the control structures and design patterns which are present in all programming languages. Most of the popular programming languages are fundamentally the same.
>>
>>58642083
>tfw knew
>tfw did the dumb thing anyway
>>
is it ok to ask complete noob questions in here?
>>
>>58642094
too bad the language isn't cool
>>
>>58642115
i thought we liked racket here
>>
>>58642109
Pls
>>
>>58642109
As long as you're ready to get bullied
>>
>>58642121
>we
>implying /g/ is one thinking entity
>>
>>58641972
Which means yes
>>
>>58642105
that means you're just insecure and afraid of failure, be more daring
>>
File: 1410826043235.jpg (11KB, 251x242px) Image search: [Google]
1410826043235.jpg
11KB, 251x242px
when does studying algorithms get interesting? when do i move beyond analyzing the running time of sorting problems?
>>
>>58642122
>>58642127
Ok so, I really want to use this
https://github.com/worldveil/deuces
but apparently it only works for python 2.7 even though all the code I've written is 3.4, what do I do in this situation :?
>>
>>58642163
Never
>>
>>58642165
No clue.
>>
>>58642098
So you're saying that I'm visualizing programming languages to be more separate than they really are; at their core, most of (the popular ones) them are fundamentally the same.

I'll try to keep an open mind when learning new concepts in a language, knowing that the same thing can be done in another language (for the most part, I'm sure there's nuanced differences which is why there's different languages to begin with)
>>
>>58642165
you could give this a shot
https://docs.python.org/3.6/library/2to3.html
>>
>>58642165
Stop using Python

>A pure Python poker hand evaluation library
>pure Python
Why would anybody be proud of this? Of being monolingual when it comes to programming, and furthermore, monolingual in one of the worst languages?
>>
>>58642185
>Why would anybody be proud of this?
it's just a thing that people say
"pure C/Python/Whatever library"

it's more commen than you'd think
>>
>>58642031
c = val + 0x30;
if(c > 0x3a)
c = c + 0x27;
if(c > 0x7b)
c = c - 0x3a;


Trust me, it just works.
>>
>>58640193
Pretty sure the formula for subsets greater than 3 elements of a given array is (1/2)*(n^2-3*n)+1
>>
>>58642202
Pure C would be a good thing though, because you can find a C compiler for nearly any platform.

Pure Python means poor performance at best.
>>
>>58642181
thank you.
>>
>>58642221
uhh ok?
>>
>>58642031
>case 61
Anon please
>>
File: john_530_big.jpg (208KB, 530x424px) Image search: [Google]
john_530_big.jpg
208KB, 530x424px
>>58642211
>>
>>58642163

>when does studying algorithms get interesting?

tossing numbers and variables never gets old sempai
>>
>>58642211
Can you elaborate on what this does?
I always see bitshift related stuff and I can never figure it out
>>
>>58642250
There's no bitshifting in that code.
>>
>>58642256
Well, whatever it's doing.
>>
File: 979839478765693327.jpg (14KB, 327x382px) Image search: [Google]
979839478765693327.jpg
14KB, 327x382px
>>58642031
>tfw people don't know that switch/case becomes slower than if/else if used like a shifest like in that picture
>>
>>58642265
It's literally grade school arithmetic.
>>
>>58642267
I think you're wrong, switches are faster for a lot of values because IIRC it's just a jump.
Though, in that example he really doesn't need that switch.
>>
>>58642267
>if/else in 2017
https://medium.com/@bartobri/applying-the-linus-tarvolds-good-taste-coding-requirement-99749f37684a#.v7yov2t55
>>
>>58642267
The compiler will optermize it
>>
>>58642031
AGDG came up with the best solution.
"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[c]


>>58642250
>>58642265
It's nothing special, just using hexadecimal for the literals.
>>
>>58642287
>linus
>good taste
>same guy who uses 8 character indents for C code
No thanks
>>
>>58642315
>8 character
It's a tab, you fucking retard.
>>
File: 1482430328579.jpg (2MB, 2197x1463px) Image search: [Google]
1482430328579.jpg
2MB, 2197x1463px
>>58642323
>he actually uses tabs and doesnt have his text editor insert spaces
>>
>>58642287
What the fuck I love Linus tech tips now
>>
So this is the power of
Rust
>>
>>58642315
>implying 8 character indents for C code is a bad thing
>>
File: 1472345922435.jpg (97KB, 865x720px) Image search: [Google]
1472345922435.jpg
97KB, 865x720px
>>58642341
Enjoy your bloated source files.
>>
>>58642346
from those three lines it looks like someone tried to mix c and java.
>>
File: you.gif (497KB, 480x270px) Image search: [Google]
you.gif
497KB, 480x270px
>>58642363
>>
>>58642346
You forgot da semicolon, nigga
>>
>tfw self taught and pretty much know nothing
>tfw trying to learn bitwise operations and C at the same time
>tfw can't even figure out how to find powers

feelsbadman
>>
>>58642363
Enjoy your inconsistent formatting, you fuck
>>
>>58642405
judging by his directory layout, cargo generated that hello world, which means he actually deleted it.
>>
>>58642405
>>58642426
Maybe learning a new language while on sleeping pills is a bad idea.
>>
>>58642346
> fn
> Doesn't actually return anything
Powerful indeed
>>
File: result.png (11KB, 514x303px) Image search: [Google]
result.png
11KB, 514x303px
>>58642211
Since the number can extend indefinitely, it's not guaranteed to be in range. Realistically, I only really needed to see a few of them anyway.

>>58642306
>>58642235
>>58642211
>>58642132
>>58642083
>>58642062
>>58642058
Here's a fixed version you big babies.

>>58642267
this was only for debugging/visualization, once I have all the things I need working,
>>
>>58642409
>>tfw can't even figure out how to find powers
pow() works with negatives and decimals
>>
>>58642405
It's actually not necessary there.
>>
>>58642462
>magic hex numbers
Use the ASCII characters directly.
>>
>>58642475
what the fuck, I hate rust now
>>
>>58642472
I mean calculate power using bitwise operators
I currently built functions that add, multiply, subtract, and square using those operators
But now I'm trying to find powers
>>
>>58642485
Now that actually does nothing for me.
The rendering is not anything to be built on.
>>
>>58642486
The return type of println! is () (which has the sole value (), think of it kind of like void in other languages). The return type of main is (). The last expression in a block is what the block evaluates to (returns if it's a function). If you add a semicolon to the last expression in a block, it evaluates to ().
>>
>>58639295
I agree with like half this shit.
>>
>>58642524
This genuinely made me hate rust
>>
So I know how to program. Now how do I learn to REALLY program? Are there any good books (preferably language agnostic but whatever) or anything for me to learn how to git gud?
>>
>>58642504
Powers of multiples of two a easy, since they translate to just a bitwise operator over. Any other whole number power should use pow() or (if you are insistent) a for loop with an integer.
>>
>>58642572
Just dive into some FOSS projects and look at the mailing list history.
>>
>>58642567
Autism.
>>
>>58642524
>>58642567
>Block expressions were a mistake.
>-Hiyao Miyakazai
>>
>>58642572
Practice till the end of times, currently I'm reading The Practice of Programming, and The pragmatic Programmer. Very good books.
>>
>>58642573
I can't use pow() because I made a new "type" thats basically just an array of chars that store the binary
I'm sure there's a faster way than a for loop

I was thinking I could use the same algorithm as a bitwise multiply, but to do that I would need to figure out how to do square roots.
Even then I still think there's a better solution than that.
>>
>>58642410

Tab characters are consistent among themselves regardless of the width of a tab character in the editor. Problems arise when someone inserts spaces under the assumption that a tab is a specific width.

Tabs for indentation, spaces for alignment. Everything will be perfectly indented and aligned regardless of the programmer's preferences for tab width.
>>
>>58642567
:^)

infinite_loop() -> ! {
loop {
// un-commenting the following line will cause a type error
// break;
}
}
>>
https://lobste.rs/s/swjktr/struggle_with_rust
Good comments about the "Struggle With Rust" article. Gave me a good think.
>>
You niggas better create a new thread or else I'm gonna make a new one without using an anime image.
>>
>>58642654
fuck, forgot the "fn " before the function.
>>
>>58642657
>that top comment
Productive programming is the same in every language. If you can't pick up a language in a few days, it's worthless.
>>
New thread:
>>58642671
>>58642671
>>58642671
>>
>>58642654
That's not surprising but it also makes you wonder how they made it work.

>>58642677
According to what principle?
>>
The real reason Rust is shit is because Mozilla has become toxic. Everything they have a direct hand in is to be avoided.
>>
>>58642315
are you retarded? eight character tabs are the best way to indent code, period. i will never go back to 4 spaces. i bet you're one of the degenerates who uses elastic tabs. shithead.
>>
>>58642031
Jesus fucking christ that switch-case. Why wouldn't you just take advantage of ASCII instead of that abomination
>>
>>58644484
I really love all the (you)'s this got me.
Thread posts: 327
Thread images: 39


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