[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: 316
Thread images: 49

File: dpt_flat.png (102KB, 1000x1071px) Image search: [Google]
dpt_flat.png
102KB, 1000x1071px
Old thread: >>60200231

What are you working on, /g/?
>>
File: dlang_chan.jpg (139KB, 470x545px) Image search: [Google]
dlang_chan.jpg
139KB, 470x545px
>>60208700
Threadly reminder that dlang-chan is not dead, and she's super duper cute and fast! Say something nice about her, /dpt/!
>>
>>60208700
about to a start a program that monitors RSS feeds for activity and posts links to a discord channel
>>
File: 1473524033403.png (68KB, 1085x699px) Image search: [Google]
1473524033403.png
68KB, 1085x699px
Anon who posted this a while ago, are you still here by any chance?
>>
>>60208725
I really like your std.range D-chan.
>>
>>60208725
but muh rust
>>
>>60208784
Thanks, anon! She's pretty confidant in her standard library. (Just don't mention the GC, please.)
>>
File: ayy_lmao.jpg (59KB, 339x339px) Image search: [Google]
ayy_lmao.jpg
59KB, 339x339px
>>60208784
>>
>>60208700
I want to make a program using QT creator but it looks like I have to sell my soul to use it. Apparently theres a way of only having to do that with the qt code but it requires using obj files or something. Anyone know how to use qt without having to make the project open source
>>
>>60208725
shut up you goddamned weeb
>>
>>60208855
buy a license
>>
>>60208855
i'm pretty sure Qt is GPL so no
>>
File: 1486375195300.jpg (5KB, 370x334px) Image search: [Google]
1486375195300.jpg
5KB, 370x334px
>>60208855
Use wxWidgets. It's licensed under a modified LGPL.

>>60208866
Anime website, anon-kun!
>>
Please recommend me a small to medium sized project that is able to be completed in a reasonable amount of time while being written in the C programming language.
>>
>>60208918
write a kernel
>>
>>60208918
>reasonable amount of time
How much?
We don't know your ability either.
>>
Please recommend me a small to medium sized project that is able to be completed in a week or two working part to full time on it, being of an average experience level, and written in the C programming language.
>>
>>60209048
write a kernel
>>
>>60208855
I think I remember reading that the Qt license is different depending on whether you statically linked it or not in your executable.
>>
>>60209048
>average
Depends on what your definition of "average" is.
>>
>>60209162
Averaging 2 integers in C.
>>
>>60209200
Since I can average an arbitrary number of integers, does that make me a pro?
>>
>>60208918
He means like 4 weeks.
>>
>>60208918
implement naive bayes classifier
>>
Lisp or ML?
>>
>>60208725
Dude that boy/girl in the picture looks disgusting. Pick another anime character if you must but please none of that
>>
>>60209200
>Averaging 2 integers in C.
That's impossible
>>
>>60209331
True.
>>
>>60209363
false
>>
My usual programming language is Python. For the server side of my new web app, I want to try a new programming language. Any ideas? rust? go? node? D? racket? chicken scheme? haskell?

>inb4 web dev general
I don't care about js/css/html
>>
File: irush.jpg (2KB, 132x63px) Image search: [Google]
irush.jpg
2KB, 132x63px
>>60208700
#include <bits/stdc++.h>

int main(void)
{
printf("I\n\t\"RUSH\"\n\t\t\\TO\\\n\tAND\n/FRO/");
return 0;
}
>>
>>60209048
Image quantinizer, there is a lot of pretty interesting stuff you can come up with.
>>
File: sizes.jpg (5KB, 134x73px) Image search: [Google]
sizes.jpg
5KB, 134x73px
>>60209467
#include <bits/stdc++.h>

int main(void)
{
printf("sizeof(short)=%d\nsizeof(char)=%d\nsizeof(int)=%d\nsizeof(long)=%d\nsizeof(bool)=%d\nsizeof(unsigned)=%d)", sizeof(short), sizeof(char), sizeof(int), sizeof(long), sizeof(bool), sizeof(unsigned));
return 0;
}
>>
>>60209395
If you love python you will love D, it has the same level of productivity
>>
File: thefuckamireading.jpg (94KB, 421x834px) Image search: [Google]
thefuckamireading.jpg
94KB, 421x834px
Scala was a mistake

http://latkin.org/blog/2017/05/02/when-the-scala-compiler-doesnt-help/
>>
>>60209503
>>60209467
> #include <bits/stdc++.h>
You have no idea what you're doing, do you?
>>
I've recently read about generators and wanted to try them out in my recent problem, but for some reason they do not work:

def critPaths(G):
# Find all nodes with no predecessor
for node in G:
if node.start == 0 and not node.prev:
critPath_rec(node, [node])

def critPath_rec(node, path):
print("hello")

# If there's no successor
if not node.next:
print("Critical path: {}".format(path))
#yield path

# If there exists a successor
for i in node.next:
if i.start == node.end and i.start is not None \
and node.end is not None:
critPath_rec(i, path + [i])

critPaths(G)


The code works perfectly fine if I comment out the yielding line. It prints all critical paths.

However once I add the yield, it no longer prints anything - no hello, no critical path and it returns NoneType generator.
>>
File: roots.jpg (4KB, 117x49px) Image search: [Google]
roots.jpg
4KB, 117x49px
>>60209519
It saves time. Im just doing really simple exercises for the hell of it
#include <bits/stdc++.h>

int main(void)
{
printf("Number :: Root\n4 :: %f\n12.25 :: %f\n0.0121 :: %f", sqrt(4), sqrt(12.25), sqrt(0.0121));
return 0;
}
>>
>>60209515
God, subtyping polymorphism is a mess. I'm glad Rust doesn't have this shit.
>>
>>60209605
OOP belongs in LOO
>>
>>60209392
True and false => true
>>
>>60209643
>=>
That's the wrong symbol mate. It's just a "single" right arrow ->.
>>
>>60209655
>>=
>>
>>60209515
More proof that Scala is a mess:

http://www.wartremover.org/doc/warts.html
http://scalapuzzlers.com/
>>
>>60209655
'>=>' is itself a wrong symbol.
'->' is equivalent to '=>'.
>>
>>60209643
if(!true)
>>
>>60209685
Actually, there are probably shitloads of different conventions for logic symbols.
I just learned that -> was a logical operator, and => was more for saying that one equation implies another.
So when dealing with a boolean expression, it would be like ((A ∧ B) → C) -> (¬A ∨ ¬B ∨ C)
and when dealing with a mathematical equation, it would be something like 2a = 2b ⇒ a = b
>>
>>60209748
-> is either a function 'arrow' or implication, which are really the same thing.
>and when dealing with a mathematical equation, it would be something like 2a = 2b ⇒ a = b
They're still the same concept though. I just prefer the => symbol.
>>
>>60209779
>They're still the same concept though
Yeah, the difference in the definitions I learned is extremely subtle and not very important, and it would really just be arguing semantics at this point.
>>
File: 1460027108094.png (29KB, 300x300px) Image search: [Google]
1460027108094.png
29KB, 300x300px
Should my language have any other numbers besides reals? But then it won't have comparison operators, so maybe I should add something like an unsigned 8 bit int?
>>
>>60209898
It really depends on the nature and purpose of your language. Lua got away with only having doubles for a very long time, and only added actual integers in the latest version for whatever reason.
>But then it won't have comparison operators
Sure you do. You just can't trust the equality operators that closely for non-integer arguments.
>>
File: 1467806062493.png (195KB, 1650x1050px) Image search: [Google]
1467806062493.png
195KB, 1650x1050px
>>60209898
we don't need reals where we're going
>>
Is there any guides to assembler learning?
>>
>>60209969
>It really depends on the nature and purpose of your language.
Non-Turing complete systems programming.
>Sure you do.
Comparing arbitrary real numbers is undecidable though. Which is why I would need to add another number type.
>>
>>60210091
>Non-Turing complete
>Not a DSL
Oh, you're just a stupid memer. Sorry that I actually replied to you seriously.
>>
Hey, guys. How to star freelance work? I really need food, guys. I know C/C++ and C# a little bit. HEEEELPP MEE1.
Thanks.
>>
>>60210111
>Not a DSL
Systems programming isn't general purpose. But I don't see what would prohibit me from making it general purpose. In most cases you don't really need to be able to compute every possible function.
>memer
Sorry, but what's a "memer"? The word "meme" makes no sense in this context.
>>
>>60209395
Try Go. It's widely used as a faster Python replacement.
>>
File: c++wtf.jpg (1KB, 71x11px) Image search: [Google]
c++wtf.jpg
1KB, 71x11px
:^)
typedef struct x {
volatile int ix;
volatile float fx;
float gfx() const { return fx; }
int gix() const { return ix; }
} x;

int main(void)
{
x v;
v.ix = 5; v.fx = v.ix/2;
printf("%d:%f", v.gix(), v.gfx());
return 0;
}
>>
>>60210146
upwork?
>>
>>60210239
What's up work?
>>
>>60210229
>typedef struct
>Sepples
Stop being an idiot and write proper C code.
Also, go learn what truncation is.
>>
>>60210293
How do I learn to write proper C codes?
>>
>>60210307
By writing C and not C++.
>>
>>60210293
You seem very angry for 0 reason
>>
>>60208855
https://www.qt.io/licensing-comparison/
>>
>>60210339
Posting in a slightly aggressive tone does not mean that someone is angry, you goddamn fucking normalfag redditor scum.
>>
File: 1489283027793.png (109KB, 823x1349px) Image search: [Google]
1489283027793.png
109KB, 823x1349px
It's happening!
https://www.youtube.com/watch?v=IqiXMN03968
>>
>>60210476
Literally who cares?
>>
>>60210485
You
>>
Has anyone used Laravel + Voyager yet? I'm trying to make a simple checkout/subscription platform. So far beating my head against it.
>>
>>60210476
The recent DIPS are pretty neat, hope they go through.
>>
I'm trying to learn C++ and am fucking around with pointers.
I want to have an array filled with other arrays, but starting at some index.
I know this is stupid and shouldn't be done, but It's just for practice and I want to know how I am fucking up regardless.

Object **foo = Object*[a];

Object **bar = { foo[b], foo[c], foo[d]; }

for( int i yada yada){
for( int j yada yada){
(bar[i] + j)->DoStuff();
}
}


This compiles and runs without crashing, but when I access values in objects I get complete bollocks back, save for when j is 0.
>>
>>60210507
>Laravel
Why?
>>
>>60210586
>I want to know how I am fucking up
The first word in your source code.
>>
>>60208918
If you are new, then make something you know how should work and implement it.

Embedded:
make gas station. Write drivers for different peripherals, so you have a keyboard, a screen, a motor for the pump etc. This is scalable to the degree you want.
These are some of the things I did when I was new to programming.

General desktop applications:
make a data structure, I suggest an AVL tree.

Learn AI:
Make a game AI for some simple game.
Evolutionary neural networks is fun and easy to implement.

Make an image filtering application.
If you want to do everything yourself, use gimp to convert images into ppm and then load those.
But you could also make a jpg loader if you want to spend the time.
If you don't mind loading libraries, then you can use the webcam in your laptop and have the filtered image displayed in the screen.
Having a program that is running continuously is a good learning experience as well.

Make a wireless network using a speaker and a microphone.
>>
>>60210724
That is not the code, it's cleaned and abstracted.
>>
>>60208725
What a shitty character to pick as language mascot.
I dislike D even more now
>>
>>60210757
Still better than lisp alien.
>>
>>60210734
Not him but could you elaborate on the gas station? That caught my attention.
>>
>>60210750
Post the original then.
>sepples
>either clean or abstracted
That doesn't seem possible.
>>
>>60210652
Because I want to call myself Code Artisan irl
>>
>>60210809
haha xd just use C amirite
>>
File: Capture.png (36KB, 594x1002px) Image search: [Google]
Capture.png
36KB, 594x1002px
>>60210809
Enjoy the mess.

void DrawTiles(sf::RenderWindow *window, View *view){
int width, height, leftOffset, bottomOffset = 0;
Tile center = *(view->Center);
Tile** tiles = center.tZLevel->GetSquare(center.GetX(), center.GetY(), view->Range, &width, &height, &leftOffset, &bottomOffset);

for(int y = 0; y < height-bottomOffset; y++){
for(int x = 0; x < width-leftOffset; x++){

std::cout << x << " " << y;
Tile *t0 = tiles[y];
Tile *t = (t0 + x* sizeof(void*)); //tiles[y][x]
std::cout << " " << t->GetX() << " " << t->GetY() << std::endl;
DrawTile(window, view, t);
}
}
}

ZLevel::ZLevel(int width, int height){
Width = width;
Height = height;
Tiles = new Tile*[Width * Height];
for(int x = 0; x < Width; x++){
for(int y = 0; y < Height; y++){
Tile** t = Tiles + x + (Width * y);
//Tiles[x + (Width * y)]
*t = new Tile(x, y, this);
}
}
}

Tile** ZLevel::GetSquare(int cx, int cy, int range, int* width, int* height, int* leftOffset, int* bottomOffset){
int left = cx - range;
if(left < 0){
*leftOffset = -left;
left = 0;
} else *leftOffset = 0;
int right = cx + range;
if(right >= Width) right = Width-1;
int bottom = cy - range;
if(bottom < 0){
*bottomOffset = -bottom;
bottom = 0;
} else *bottomOffset = 0;
int top = cy + range;
if(top >= Height) top = Height-1;

*height = top - bottom;
*width = right - left;
Tile** r = new Tile*[*height];

for(int i = 0; i < top-bottom; i++){
r[i] = Tiles[left + (Width * (bottom+i))];
}

return r;
}

int main(){
ZLevel* zl = new ZLevel(50, 50);
DrawTiles(null, zl.GetTile(25, 25));
}



Have the output as well.
>>
File: 200_s.gif (34KB, 356x200px) Image search: [Google]
200_s.gif
34KB, 356x200px
I'm just trying to pick up the basics on Python and HTML/CSS so I can make a website and compete with my siblings.
>>
>>60210964
>>>/g/wdg/
>>
>>60208700
I'm working on a problem in RUBY that is wrecking my head if anyone cares to help, basically I need to read a json file and pass its variables into a method's input parameters as hash values:

# Turn this example json
{
"name": "myName",
"colorsArray":[
{
"colorName":"red",
"hexValue":"#f00"
},
{
"colorName":"green",
"hexValue":"#0f0"
}
],
"useColours": true
}


# Into something like this
method(
name: "myName",
colorsArray: [
{
colorName: "red"
hexValue: "#f00"
}
{
colorName: "green"
hexValue: "#0f0"
}
],
useColours: true
)

# By doing something like this
method(parsedJson)

The example json file is far more simple than the one I'm actually working with, the json file can have any number of variables and nested arrays of data in nested arrays of data, even up to lists of 100+ variables and I need to be able to pass it all into the method input parameters no matter whats in the json file.

No this is not homework, I'm just new to Ruby and have never come across something like this before and it's been holding me back from more important work for a while.
>>
>>60210976
Thank you
>>
File: pong.webm (323KB, 644x482px) Image search: [Google]
pong.webm
323KB, 644x482px
Writing pong in C with SDL2
>>
>>60211015
Use code tags, faggot.

Read the sticky.
>>
Do we kode on thursdays?
>>
Language: Python

if user == USERNAME and pswd == PASSWORD:
return True
return False

How to write in a more sane way?
>>
>>60210877
>haha xd
>amirite
>>>/v/
>C
No, it's trash as well.
>>
>>60211088
return (user == USERNAME and pswd == PASSWORD)
>>
>>60211057
Didn't think it would matter for such small and simple code
>>
>>60211169
Even if it's a single line, use them.
Trying to read code without nesting is an annoying experience and most people aren't even going to bother.
>>
>>60211169
It's annoying to read, and you could have literally just hit Alt+C to generate code tags before pasting.
>>
>>60211015
>>60211057
>>60211236

>>60208700 (OP)
I'm working on a problem in RUBY that is wrecking my head if anyone cares to help, basically I need to read a json file and pass its variables into a method's input parameters as hash values:

# Turn this example json
{
"name": "myName",
"colorsArray":[
{
"colorName":"red",
"hexValue":"#f00"
},
{
"colorName":"green",
"hexValue":"#0f0"
}
],
"useColours": true
}


# Into something like this
method(
name: "myName",
colorsArray: [
{
colorName: "red"
hexValue: "#f00"
}
{
colorName: "green"
hexValue: "#0f0"
}
],
useColours: true
)

# By doing something like this
method(parsedJson)


The example json file is far more simple than the one I'm actually working with, the json file can have any number of variables and nested arrays of data in nested arrays of data, even up to lists of 100+ variables and I need to be able to pass it all into the method input parameters no matter whats in the json file.

No this is not homework, I'm just new to Ruby and have never come across something like this before and it's been holding me back from more important work for a while.
>>
>>60211326
I swear Ruby has a readjson that converts it to an appropriate dict
>>
>>60211353
I think there is something like that, but I for the kids of me can't figure out what exactly it is
>>
>>60211326
Is it as simple as this
input = JSON.parse(jsonFile)
method(input)


it compiles but I am unable to test the output until tomorrow. Does anyone know if that's potentially the correct way?
>>
>>60211675
>it compiles but I am unable to test the output until tomorrow
what the fuck

I'm morbidly curious as to why you can't actually see output until tomorrow.
>>
>>60211697
I'm in a graduate position working with continuous integration and automation, this shit happens a lot. The json file contains all the info needed to spin up a server, the method takes all this data and spins up the server but I don't have access to the server so I can't check if its working, only that it compiles.
>>
>quit smoking
>head hurts
>throat hurts
>annoyed
>after a week
>...
>sudden productivity boost
>solve everything
>mind is clear and sharp
might be placebo but holy shit it feels amazing /dpt/
>>
I never finish anything I start programming. How do I stop being lazy fuck and become productive?
>>
>>60211841
Find a job?
>>
>>60211841
adderall
>>
>>60211866
Caffeine is sufficient.
>>
>>60211824
you were just detoxing lad.
Was bedridden for a week with the worst migraine of my life and pain all over when i quit my decade caffeine fix.
>>
>>60211861
I've already found one, but I'm starting in July. What I meant was more of a hobby programming, for fun.

>>60211866
Tried. For some reason it doesn't work on me.
>>
>>60211912
how about cocaine?
>>
File: 1462473041519.jpg (110KB, 1578x480px) Image search: [Google]
1462473041519.jpg
110KB, 1578x480px
Graphical programming was a mistake
>>
>>60212070
your parents fucking without protection was too
>>
File: 1471687335135.gif (2MB, 400x209px) Image search: [Google]
1471687335135.gif
2MB, 400x209px
I actually had to write _something_ because I didn't get any chance to do any programming today and my hand was itching. What follows is a program that checks the common integer(s) in an of int[]s.

import std.stdio;

void main(string[] args)
{
int[][] array_of_arrays = [[34, 243, 92], [92], [23, 11, 11, 92, 44]];
commons(array_of_arrays).writeln();
}

int[] commons(int[][] arrs)
{
int[] result;
foreach (arr; arrs)
{
bool found = false;
int current_common = int.max;
search: foreach (i; arr)
{
foreach (array; arrs)
{
//found = is_found(i, arrray) ? true : false;
if (is_found(i, array))
{
found = true;
current_common = i;
}
else
{
found = false;
current_common = int.max;
break search;
}
}
}
if (found && current_common != int.max)
{
result ~= current_common;
}
}
return result;
}

bool is_found(int item, int[] array)
{
foreach (i; array)
{
if (i == item)
{
return true;
}
}
return false;
}


I am very lazy.
>>
>>60212197
array* of ints*
>>
After learning the fundamentals of a language, say Python, where do I go from here to improve my skills?
>>
>>60212197
hmm
It doesn't seem to work for the test case of [[34, 243, 92, 23], [9, 23], [23, 11, 11, 92, 44]]; (returns a blank array for some reason)

Well. I'll go to bed now
>>
>>60212218
Reimplement already existing programs on a smaller scale or make something useful to you.

Go through a bunch of questions from a CS textbook and answer them completely.
>>
>>60212260
I think I am going to create a simple arithmetic calculator using TKinter. Then move on to other GUI stuff
>>
>>60212273
http://www.tkdocs.com/tutorial/

Basic utilities are easy to implement in Tkinter. A calculator sounds like a good idea since you get both the programmatic side and then the Tkinter side if you want to give it a GUI.
>>
is there a such thing as freelance sysadmin that works from home? I mean could I get freelance work maintaining servers from my bedroom?
>>
>>60212197
what?
>>
>>60212341
>a sysad who isnt on site
sounds stupid so im sure someone has a spot.
>>
File: 1491345561302.jpg (23KB, 400x342px) Image search: [Google]
1491345561302.jpg
23KB, 400x342px
So, /dpt/, I was recently offered a CFD project that turned out to be more model development in Fortran than CFD.

Is there any real benefit from learning to program in Fortran? The libraries for open-source CFD projects are written in C++, and right now I only ever really program in Matlab.
>>
>>60208700
still stuck trying to build gcc 7 on windows...
>>
File: 1448688406556.jpg (61KB, 960x540px) Image search: [Google]
1448688406556.jpg
61KB, 960x540px
>>60212364
A company I worked for has a sys admin who works 3-4 days from home living about 3 hours away
>>
>>60212152
Stop posting
>>
How the fuck I learn python?
Tried learn python the hard way but I don't liked it
>>
>>60212480
fuck off spic
>>
New to ncurses programming.
What does it mean when a call is in blocking or non-blocking mode?
>>
>>60212480
people here lambast codeacademy.org but if you are just trying to learn basic syntax and find that you benefit from an interactive setup it is decent enough to relay the basics to you
>>
File: palidx.gif (15KB, 630x709px) Image search: [Google]
palidx.gif
15KB, 630x709px
Is the idea of PALcode an outdated concept?
>>
>>60212218
Project Euler
>>
>>60212528
>code
Not programming.
>>>/g/wdg/
>>
>>60213078
Fuck off semantics autist. On Thursdays we kode
>>
File: 1441111724227.png (306KB, 345x366px) Image search: [Google]
1441111724227.png
306KB, 345x366px
>>60213078
>he doesn't kode with klossy
>>
>>60213078
nobody cares what you think unless you're going to up an answer of your own basement dweller.
>>
>>60212528
no. go to learn x in y instead or read the documentation. it's all on google, you don't need to popularize pajeetacademy by using it
>>
>>60213242
>you dont need to popularize
people stopped caring about if things were popular or not in highschool you fruit basket. there is literally nothing wrong with learning basic syntax from CA. the kid literally said he was having a hard time with docs so i gave an interactive solution.
>>
>>60213279
>there is literally nothing wrong with learning basic syntax from CA
Learn X in Y is objectively superior
>>
>>60213309
people who use qualifiers like 'objectively' in their statements can almost certainly be taken as reputable sources of information.
>>
>>60212523
Whether or not a call causes the program to wait for it to finish or not.
>>
>>60212409
Yes.
>>
>>60213221
Klossy is everywhere, even in Bill Nye Saves the World.
Really makes you think.
>>
>>60213603
>Bill Nye Alienates White American to Boost Ratings
>>
>>60213309
Define "superior". Then show me a proof of "Learn X in Y" being superior to "pajeetacademy".
>>
>>60213309
>>60213748
lets not forget to define the ground rules for what is truly objective as well.
>>
Why do people use cmake when it renders a project uncompilable its default state? Every fucking time it's used it gives false reports of missing dependencies because it makes stupid assumptions about the environment.

We need to rid the world of the cmake cancer once and for all.
>>
>>60213903
what other option do we have
build script for every platform?
>>
>>60213933
I always use a cross-compiling makefile with copypasted vomit to find the host platform.

HOST_OS:=$(shell uname | tr [:upper:] [:lower:] | sed 's/[_-].*//; s:/:_:g; s/32//; s/mingw/mingw32/; s/msys/mingw32/')
HOST_ARCH:=$(shell uname -m | tr [:upper:] [:lower:] | sed 's/i.86/x86/; s/\-pc//')
ifndef OS
OS=${HOST_OS}
endif
ifndef ARCH
ARCH=${HOST_ARCH}
endif


Then the makefile sets CC, CFLAGS, LDFLAGS, etc. based on what OS and ARCH are set to. The user can override with "make ARCH=x86_64 OS=mingw32" to cross-compile for Windows amd64, for instance.

This way, you can actually have a makefile that works on Linux, OpenBSD, Darwin, mingw32, mingw-w64, msys, cygwin, whatever.
>>
>>60214092
But I need msbuild and cl
>>
>>60214117
>msbuild
What for?
>>
>>60214092
this is always a good idea. I write all of my config management out like this. outside of compilation environment it helps for things like apt vs yum vs apk, etc
>>
>>60214117
kek
>>
File: 1493404865661.png (602KB, 963x720px) Image search: [Google]
1493404865661.png
602KB, 963x720px
whats the best way to understand how to use variables, arrays, loops, etc? as in how to apply them. I know these things i just listed, and i can fizz buzz, but im failing to see how big complex programs are done especially video games.
>>
>>60214203
Try to develop a small application or game anon. You'll learn a lot.
>>
File: 1461262949948.png (2MB, 1920x1080px) Image search: [Google]
1461262949948.png
2MB, 1920x1080px
>>60214203
>i can fizz buzz
Show us your fizz buzz, anon.
>video games
That would belong in a separate thread.
>>
File: 1493334260854.jpg (88KB, 1003x801px) Image search: [Google]
1493334260854.jpg
88KB, 1003x801px
Does anyone know which color theme is this one?
>>
>>60214240
I believe it's called "Eye Cancer"
>>
>>60214240

Jewish Rainbow Theme v3.0
>>
>>60214203
>especially videogames
https://hero.handmade.network/episodes
You may enjoy this.
>>60214225
>videogame programming belongs in a separate thread
So what does belong in /g/ if the domain of programming is relevant? Does any form of 3d visualisation belong in /3/?
>>
>>60213722
>Self-hating whites prop up forgotten and now broke celebrity that makes a living preaching the new bible
>>
>>60214293
>So what does belong in /g/ if the domain of programming is relevant?
He didn't say he was interested in the programming aspects of video games.
>>
>>60214327
I thought that was pretty clear.
>>
>>60214360
Not really. Not for me anyway.
>>
>>60214253
I know for a fact that either >>60214253 or >>60214267 is true
>>
Is FizzBuzz really supposed to be this hard? I'm trying to solve it and I just can't seem to.
>>
>>60214427
pajeet...
>>
>>60214427
For you.
>>
>>60211863
Me. He was quoting me.
>>
File: titusgetthecross.jpg (15KB, 323x480px) Image search: [Google]
titusgetthecross.jpg
15KB, 323x480px
>>60214427
>Fizzbuzz
>hard
>>
File: anal beads.png (14KB, 309x279px) Image search: [Google]
anal beads.png
14KB, 309x279px
>>60214427
What? Pic related, it's easy as shit.
>>
>>60211863
Kill yourself, you mouth breathing mongoloid.
>>
exit();
>>
>>60214518
new thread when?
>>
>>60214530
New you soon my dude <3
>>
>>60214547
gay
>>
SDL_Texture* createTextureFromFile(SDL_Renderer* renderer, char* path){
// Load the image to a surface
SDL_Surface* tempSurface = IMG_Load(path);
if(!tempSurface){
printf("IMG_Load: %s\n", IMG_GetError());
} else{
// Convert the surface to a texture
SDL_Texture* newTexture = SDL_CreateTextureFromSurface(renderer, tempSurface);
if(!newTexture){
printf("SDL_CreateTextureFromSurface: %s\n", SDL_GetError());
}

// Free the memory occupied by the surface as its no longer needed
SDL_FreeSurface(tempSurface);

// Return the new texture
return newTexture;
}

// Return NULL on fail
return NULL;
}


Why is C so nice?
>>
>>60214577
>tfw never felt as comfortable writing in C than other languages
>>
>>60209395
>chicken scheme
elixir/clojure
>>
Is there an easy way to change the dates of Git commits? I don't want my lecturer to know I did my entire assignment in the week before the deadline.
>>
>>60214658
>chicken scheme
Trash.
>elixir/clojure
Even more trash.
>>
>>60214669
Don't worry. We usually did ours few hours before deadline and he didn't care at all as long as we turned it in.
>>
>>60214675
elaborate please (I accidentally wrote the chicken scheme part I only vouch for Elxiir / Clojure (more for Clojure)
>>
>In theC programming language(and its close descendants such asC++andObjective-C),staticis areserved wordcontrolling both lifetime (as astatic variable) and visibility (depending onlinkage). The wordstaticis also used in languages influenced by C, such asJava.
So. In C99 does this mean that even if I #include a file you can't reference the globally declared variable in the included file or is this just about translation units?
>>
In java is there a way to use Scanner to read in integers as strings?

I want to read in something like "4 + 4" but I want each integer to be a string as well not only the plus.
>>
>>60214696
It's for my dissertation, though, and I want to have screenshots of the git log in my report.
>>
>>60214767
http://stackoverflow.com/questions/454734/how-can-one-change-the-timestamp-of-an-old-commit-in-git
>>
>>60214767
Photoshop!
>>
>>60214736
>In java
Stopped reading right there.
>>
>>60214799
Thanks

>>60214809
I also have to submit the repo

They probably wouldn't check but just in case
>>
>>60214767
Time machine. Could be also nice dissertation.
>>
>>60214736
There's methods for processing stings in java I'm sure. Look at the documentation and figure something out.
>>
>>60211934
Nah try those supplement stacks dickheads wank on about. Other than that try eating properly and exercising, meditating. Shit like that, what ever way the road goes, never take the short cut
>>
>>60214874
I started exercising with my friend who's been lifting for years. Any good starting point for meditation? I've heard lots of good things about it and would like to give it a try. This might not be /g/ related but it may help me achieve /g/ related goals.
>>
File: 1492248107546.png (642KB, 726x1040px) Image search: [Google]
1492248107546.png
642KB, 726x1040px
>>60214427
>>
Do you hang out with koders in irc?
>>
File: KISAMA.jpg (29KB, 412x430px) Image search: [Google]
KISAMA.jpg
29KB, 412x430px
r8 my 100% idiomatic Fizzbuzz, /dpt/:
#![feature(i128_type, conservative_impl_trait)]

use std::fmt::{Display, Formatter, Result};

#[derive(Debug, Clone, Copy)]
struct Fizzbuzz(pub u128);

impl Display for Fizzbuzz {
fn fmt(&self, f: &mut Formatter) -> Result {
match (self.0 % 3, self.0 % 5) {
(0, 0) => write!(f, "Fizzbuzz"),
(0, _) => write!(f, "Fizz"),
(_, 0) => write!(f, "Buzz"),
_ => write!(f, "{}", self.0),
}
}
}

impl Iterator for Fizzbuzz {
type Item = Self;

fn next(&mut self) -> Option<Self> {
self.0 += 1;
Some(*self)
}
}

fn fizzbuzz(up_to: usize) -> impl Iterator<Item=Fizzbuzz> {
Fizzbuzz(0).take(up_to)
}

fn main() {
for f in fizzbuzz(100) {
println!("{}", f);
}
}
>>
>>60215241
>Fizzbuzz
>not FizzBuzz
0/10
failed
>>
>>60215271
Just for you, bby:
#![feature(i128_type, conservative_impl_trait)]

use std::fmt::{Display, Formatter, Result};

#[derive(Debug, Clone, Copy)]
struct Fizzbuzz(pub u128);

impl Display for Fizzbuzz {
fn fmt(&self, f: &mut Formatter) -> Result {
match (self.0 % 3, self.0 % 5) {
(0, 0) => write!(f, "FizzBuzz"),
(0, _) => write!(f, "Fizz"),
(_, 0) => write!(f, "Buzz"),
_ => write!(f, "{}", self.0),
}
}
}

impl Iterator for Fizzbuzz {
type Item = Self;

fn next(&mut self) -> Option<Self> {
self.0 += 1;
Some(*self)
}
}

fn fizzbuzz(up_to: usize) -> impl Iterator<Item=Fizzbuzz> {
Fizzbuzz(0).take(up_to)
}

fn main() {
for f in fizzbuzz(100) {
println!("{}", f);
}
}
>>
https://www.youtube.com/watch?v=jXhXDzyRH_A

>le microaggression tumblr meme
>2017
>>
>>60215241
Idiomatic?
>>
>>60215291
1/10
>>
File: 19494949293.jpg (19KB, 300x300px) Image search: [Google]
19494949293.jpg
19KB, 300x300px
>>60215302
>women in tech
>>
>>60215326
yes
>>60215352
thanks
>>
>>60215379
WHAT is idiomatic?
>>
while you refuse to touch OOP because it's "disgusting" and "belongs in LOO", I am collecting my bi-weekly $4000 check. Cheers.
>>
File: nicegoodreallygood.png (39KB, 330x190px) Image search: [Google]
nicegoodreallygood.png
39KB, 330x190px
>>60215389
What isn't?
>>
>>60215389
Writing without an "accent"
>>
>>60215403
At least we are not wageslaves, so
>>
>>60215403
didn't know welfare paid that well
>>
Is constructing a suffix tree with Ukkonen's algorithm significantly more complicated than constructing a tree with some less efficient algorithm?
>>
>>60215403
lmao, you fell for that retarded meme? enjoying life earning $15000 dolla monthly and soon to come retirement.
t. cobol programmer
>>
>>60215302
no wonder youtube is shit
literally ran by a womeme
>>
absolutely nothing
>>
File: stabbydoggo.jpg (11KB, 384x384px) Image search: [Google]
stabbydoggo.jpg
11KB, 384x384px
>>60215241
Now 110% idiomatic:
#![feature(i128_type, conservative_impl_trait)]

use std::fmt::{Display, Formatter, Result};

enum Fizzbuzz {
FizzBuzz,
Fizz,
Buzz,
Number(u128),
}

struct FizzbuzzIter(pub u128);

impl Display for Fizzbuzz {
fn fmt(&self, f: &mut Formatter) -> Result {
use Fizzbuzz::*;

match *self {
FizzBuzz => write!(f, "FizzBuzz"),
Fizz => write!(f, "Fizz"),
Buzz => write!(f, "Buzz"),
Number(n) => write!(f, "{}", n),
}
}
}

impl Iterator for FizzbuzzIter {
type Item = Fizzbuzz;

fn next(&mut self) -> Option<Fizzbuzz> {
self.0 += 1;

let fb = match (self.0 % 3, self.0 % 5) {
(0, 0) => Fizzbuzz::FizzBuzz,
(0, _) => Fizzbuzz::Fizz,
(_, 0) => Fizzbuzz::Buzz,
_ => Fizzbuzz::Number(self.0),
};

Some(fb)
}
}

fn fizzbuzz(up_to: usize) -> impl Iterator<Item=Fizzbuzz> {
FizzbuzzIter(0).take(up_to)
}

fn main() {
for f in fizzbuzz(100) {
println!("{}", f);
}
}
>>
>>60215575
idiomatic rust is my new favorite gimmick
>>
File: Sif.gif (35KB, 230x200px) Image search: [Google]
Sif.gif
35KB, 230x200px
>>60210476
Pumped
>>
>>60210476
>DConf
funny name for a funeral
>>
>>60215575
It's "idiomatic" in the sense that Java with forced design patterns is.

But yes, that's the kind of code you'd expect to see under the hood in a library in order to expose a maximally user-friendly API to the end user.
>>
>>60215712
Did you think this was clever?
>>
>>60215731
No, I thought it was sad
>>
File: 1420866899332.jpg (24KB, 400x386px) Image search: [Google]
1420866899332.jpg
24KB, 400x386px
>>60215743
>>
>>60215743
Your post was pretty sad, yeah
>>
>>60215302
This is all hyperbole but people really should focus more on civil rights issues.
>>
>>60214240
Maybe Molokai, or some variation of it.
>>
python baby learning c++ here.
What does thin mean?
if (thing & thing2)


Is it just shorthand for an equality check to the value of the address of thing2?
>>
File: 1493820289568.jpg (97KB, 640x360px) Image search: [Google]
1493820289568.jpg
97KB, 640x360px
Pascal is the biggest fucking shitstorm in the whole world, you can't convince me otherwise, no language whether old,new or didn't even exist yet can get close to how shitty pascal is, I'd rather butcher my balls and write down my code on the floor with the blood then summon satan to compile the code for me than use pascal ever again

first of all, the compiler is so fucking old to the point where you can only run it through windows XP (if you have win7, you need to run it through fucking DOSBOX), needless to talk about how shitty the shortcuts are (for example, instead of CTRL+C for copy, pascal's IED uses shift+ans or some retarded shit, same for all other shortcuts)

Second the language is so horrendous it makes you think this shit was created by a petrol sniffing dog, just look at the fucking random function for example, it's so retarded that you have to make extra calculations and do an operation by yourself to get a random number that's smaller than 4, since pascal refuses to do it itself, needles to say the retarded incrementing system
>a := a +1
Hint, this shit could be done easier in C++ just by simply typing a++
And ho, don't let me talk about the begin end; cancer and how it becomes a fucking warzone with those 2 words if you ever do a case or if else function

and did i tell you that you can't do a complex condition like
 if (a > 5 and <9) 
, instead you have to break in into 2 goddamn conditions like
 if ( (a > 5) and a < 9) ) 
Which of course causes the daily parentheses mess

Fuck you yassine, you bald down syndrome looking nigger, you filthy scum of a CS teacher, for making us learn this shitty language in high school, fuck you and fuck the whole tunisian CS program

TLDR fuck pascal
>>
>>60215890
>the compiler
Not the language.
>>
>>60215888
Python programmers everybody.
It is checking if the logical AND of thing and thing2 are non-zero.
>>
>>60215888
Bitwise and, e.g.
0011 & 1110 = 0010
.
In C and C++, anything != 0 is treated as true
>>
>>60215908
Funny because turbo pascal is probably the only IDE that exists for it
>>
>>60215917
>>60215929
alrighty, thanks /dpt/.
>>
>>60215936
There exists an infinite amount of pascal compilers.
>>
>>60215917
>non-zero
but it's sepples so you should also check that it's
== false
== nullptr
== NULL
because that's the sepples way
>>
Why is ocaml and all of it's bloated interpreters and libraries installed on debian by default?
>>
>>60215962
What? Since when?
>>
>>60215948
>implying any of them are relevant, decent or matter at all
>>
>>60215962
Some package depends on it.
You might actually have guile installed also because of some gnu stuff depends on it.
>>
Should you even bother typedeffing void*?
They are know it's void* anyways and the type name doesn't really bring anything to board.
>>
>>60215962
Which version is it?
ocamlc -v
>>
Sometimes I feel like Web as a whole was corrupted by big moneys at some point. Like, C, Lisp, Forth were made by actual researchers, scientist, they wanted to make good tools. Everything web related was made "in 10 days" by young fellas to ""get shit done"" and make a fortune.
>>
File: 1493558516555.jpg (50KB, 564x663px) Image search: [Google]
1493558516555.jpg
50KB, 564x663px
def fizzbuzz():
c = ["Fizz", "Buzz"]
d = ""

for cNum in range(1, (100 + 1)):

if (cNum % 3) == 0:
d += c[0]

if (cNum % 5) == 0:
d += c[1]

if d != "":
print(d)
d = ""
next

else:
print(cNum)
i may be retarded, is this supposed to be harder or am i missing something?
>>
File: 1488195714773.jpg (19KB, 601x632px) Image search: [Google]
1488195714773.jpg
19KB, 601x632px
/dpt/, what's the best place to learn sepples online?
>>
>>60216277
>
(100 + 1)

Don't call us, we'll call you.
>>
File: 1452369082597.png (402KB, 1024x768px) Image search: [Google]
1452369082597.png
402KB, 1024x768px
>>60216277
>Not posting FizzBuzz of the Christ
>>
File: hurrrrdog.gif (2MB, 250x250px) Image search: [Google]
hurrrrdog.gif
2MB, 250x250px
>>60216296
https://doc.rust-lang.org/book/
>>
>spend days trying to build gcc 7 on windows
>errors everywhere
>let's try building for dos
>configure && make install
>itjustworks.exe
wtf
>>
File: c brainlets.jpg (286KB, 1834x1200px) Image search: [Google]
c brainlets.jpg
286KB, 1834x1200px
Why do you still use C, /dpt/? Are you too stupid and maladapted to use a real language or something?
>>
>>60216439
Because it's the only language offering interface to other languages and portability.
>>
>>60216439
delet this
>>
>>60216387
>w**dows
found your problem
>>
File: big java baka.png (294KB, 357x588px) Image search: [Google]
big java baka.png
294KB, 357x588px
>>60216439
>Resizable arrays mentioned twice
>>
>>60214240
Monokai
>>
>>60216387
>>60216609
Source?
>>
What does this Python syntax mean?

lab[k-j:] // where lab is a string


Is it a slice from the integer produced by k-j to the end of the string?
>>
>>60216826
Yes
>>
>>60216826
nobody knows because python has already so many different versions(2,3) that it could mean anything at this point. My python version spawned cacoademon in my pants when run that in my python implementation.
>>
File: chen_stuck.png (23KB, 388x258px) Image search: [Google]
chen_stuck.png
23KB, 388x258px
>>60214427
def int[2] euclidean(int x,int y)
{
int q = 1;
loop:
int r = y - x*q;
if(r > x)
{
q = q + euclidean(x,r)[0];
goto loop;
}
else
{
return {q,r};
}
}


def int truncate(int x)
{
int n = 1;
while(euclidean(x,n*10)[0] > n*10)
{
n++;
}
return x - euclidean(x,n*10)[1]
}

def int coprime(int x, int y)
{
if(x < y)
{
int r = euclidean(y,x)[1];
coprime(x,r)
}
if(x == 1 || y == 1)
{
return 1;
}
}

def void fizzbuzz(int x)
{
double pi = 4.0 * atan(1.0);
int n = truncate((int) (pi * 10)) / 10;
double sum = 0.0;
for(int s=0;s<10000;s++)
{
sum += 1/s^2;
}
int m = truncate(((int) sum ) * 4) - 1;
if(euclidean(x,n*m)[1] == 0)
{
print "phyzze-boughczy";
}
if(euclidean(x,m)[1] == 0 && not(euclidean(x,m*n)[1] == 0))
{
print "boughczy";
}
if(coprime(n,m) == 1)
{
if(euclidean(x,n)[1] == 0 && not(euclidean(x,m*n)[1] == 0))
{
print "phyzze";
}
}
else
{
if(euclidean(x,n)[1] == 0 && (not(euclidean(x,m*n)[1] == 0) && not(euclidean(x,m)[1] == 0)))
{
print "phyzze";
}
}
}
>>
Is there a(realistic/common) point where it's no longer a good idea to include checks for trivial cases in functions?

For example, checking if the input is 1 in a factorial function. Depending on the type/size of problem it seems clear the trivial case will only occur once and it may not be worth it to include a check. Is this a non-issue for some technical reason? Is there some kind of guideline you use for whether or not to include checks for simple solutions at the beginning of functions?
>>
>>60216867
harsh toke dude

sounds like you're running cursed binaries

waft some incense on your hard drive and try again while saying the rosary
>>
>>60215575
>>60215241
>tfw work at telenor
>have to read "idiomatic" rust everyday
>>
File: confuspupper.jpg (59KB, 408x439px) Image search: [Google]
confuspupper.jpg
59KB, 408x439px
>>60216891
I can't tell what language this is
>>
>>60216908
They use Rust?
>>
>>60216900
>Is there some kind of guideline you use for whether or not to include checks for simple solutions at the beginning of functions
If you predict this shortcut will be used a lot, it should be there. You generally have a vague idea of what function parameters will be the most common, unless you are writing a public library function.
>>
Made a little 40 line python script that shows full articles with images from a local newspaper after their shitty front end CSS-paywall, since they dont bother to actually check if you've paid for an account.

They still send the actual content of the article over and try to do some weird browser side stuff instead. Sent them a message earlier with the PoC, gonna see what happens.
>>
>>60217012
Who do you collaborate with enemies? Are you an enemy?
>>
>>60217042
He probably thinks he can recommend himself for a job this way.
>>
File: butthuŕt.gif (4MB, 425x425px) Image search: [Google]
butthuŕt.gif
4MB, 425x425px
>>60217068
I'm currently just a student, but it certainly isn't a bad thing to mention in a future interview or so.
>>
>>60217151
Never mention that you're a pirate. Never. It scares people.
>>
>>60217151
What the fuck is happening in that gif?
>>
Lisp's ability to use its special(apparently) kind of "macros" is a feature of the actual Lisp language itself(as opposed to Lisp interpreter implementations in other languages), right? Searching for "lisp interpreter" on Google brings up lots of results of things like Lisp interpreters written in Python, C++, etc., but even supposing these are generally functional is it safe to assume they're not going to have this macro feature?

Is Lisp's macro feature a function of a specialized Lisp compiler or what?
>>
>>60217193
the original scheme did not have macros but now days schemes have hygienic macros.

Common lisp standard demands that implementation provides compiler, interpreter and debugger. Common lisp standard defines unhygienic macros and reader macros.

It depends on which standard following implementation you are using but your lisp implementation might provide additional macro features(most scheme compilers let you use common lisp like macros).
>>
What features does a language absolutely need to have?
>>
>>60217170
Seconding. Corporate world is scared of any mention of piracy like it's bubonic plague. I remember ripping our competitor's product of the internet and pitching it's weakness report to my boss. He admired the effort but literally yelled at me and told me to buy every goddamn thing if we need it for research or use.
>>
>>60217604
Algebraic data types + pattern matching
>>
>>60217604
I/O
>>
>>60217604
anonymous functions
manual memory management
first class concepts for parallel computation
>>
>>60217604
The ability to print "Hello, world!".
>>
>>60217633
This is sensible, an individual can get away with piracy.
A large company is an easy target for a lawsuit if it ever got out that they're pirating software.
Microsoft loves performing random audits on companies because of the sheer chance that they're using pirated microsoft software.
>>
>>60217633
At my place we pirate shit to see if it's useful and then buy it only if we ship/make our product with it.
>>
>>60217639
>Algebraic data types
A special case of inductive types.
>>60217654
No.
>>60217655
>anonymous functions
Which kind?
>>60217672
Implies I/O, so no. Not all languages need it.
>>
>>60217655
>manual memory management
someone post 'the eternal c.png' pls
>>
>>60217708
A fucking Post machine has IO.
>>
Went for a programming job, we had exam.
Had to implement linked list, its nothing what you said would be in those exam. Fuck you.
>>
>>60217726
Don't change definitions mid-"""argument""". By this retarded "logic" anything which has functions has I/O, but obviously it's not the same kind of I/O you were talking about.
>>
>>60217757
lmao are you telling us you failed it?
>>
File: 1491523272537.jpg (58KB, 800x600px) Image search: [Google]
1491523272537.jpg
58KB, 800x600px
>>60217757
>trusting /g/ for career advice
why
>>
>>60217757
So you passed it, right? Every interview I get questions about bloody selfbalancing trees or heaps, and spend an hour drawing fucking avl/rbt rotates on a whiteboard. List impl must be nice
>>
>>60217757
Anon I'm sorry you have chronic retardation.
>>
>>60217757
Which lamguage? Sepples? How did you do?
>>
File: 1453924308773.png (318KB, 510x720px) Image search: [Google]
1453924308773.png
318KB, 510x720px
What is the easiest language to write a self-hosting compiler for?
>>
>>60217923
Lisp probably
>>
>>60217938
I'm assuming you mean Scheme? Would I have to implement macros?
>>
>>60217923
c
>>
>>60217604
raii
>>
>>60217923
>>60217938
>>60217955
believe it or not there are differences between those languages. youll have an easier time writing a self hosted compiler for common lisp than you would scheme id imagine. scheme is certainly elegant but lisp has clunky real world compat
>>
>>60217923
Forth
>>
>>60217151
imagine if he's only pretending to be injured and he has to put up with having that thing go down his pants
>>
File: we hit metal.png (219KB, 433x287px) Image search: [Google]
we hit metal.png
219KB, 433x287px
>>60213043
anyone on this?
>>
>>60217889
In C, but I did pass it. I fell for fizzbuzz meme though, it was too good to be true.
>>
>>60218085
Maybe that's why he's doing it.
>>
>>60218107
>how not to design ICs
step 1
integrate a fucking battery
>>
>>60213043
Sure. Its old but you still need something to load firmware onto and something to bootstrap from. I bet it has even more interesting applications working with FPGA or ASIC hardware
>>
File: 2017-05-05_00-35-04.gif (2MB, 892x1082px) Image search: [Google]
2017-05-05_00-35-04.gif
2MB, 892x1082px
hacked together react/electron gui demo, because fuck qt ugliness and gtk lgpl nazism. i am now on my way to becoming css ninja-guru-10Xer. come at me bois
>>
>>60218296
>so simple GUI but it still lags
Is this the true power of react?
>>
>>60218335
>Is this the true power of react?
No. It's the true power of code monkeys.
>>
>>60218353
The set of all react developers is a subset of the set of all code monkeys.
>>
>>60208918
GB/SNES emulator desu. It's the perfect sized project - large enough to feel substantial but small enough to be completable alone in a reasonable amount of time. Plus the output is fun.
>>
>>60218335
it doesn't lag though
>>
>>60218372
>The set of all react developers
So the empty set? Since nobody who uses react is a "developer".
>>
>>60215241

Or you could just do it the simple way. No need to make any types...

fn main() {
for i in 1..100 {
match (i % 3, i % 5) {
(0, 0) => println!("FizzBuzz"),
(0, _) => println!("Fizz"),
(_, 0) => println!("Buzz"),
_ => println!("{}", i)
}
}
}
>>
>>60218584
Thats not idiomatic.
>>
>>60216961
https://www.rust-lang.org/en-US/friends.html
>>
>>60218660
>>60218660
>>60218660


New thread, Goyim
>>
>>60218639

Idiomatic does not mean using every language feature you can to approach the problem. It just means you use the tools typically used for addressing the problem in this language.
Thread posts: 316
Thread images: 49


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