[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: 28

File: Simon_Peyton_Jones_01.jpg (169KB, 1280x1212px) Image search: [Google]
Simon_Peyton_Jones_01.jpg
169KB, 1280x1212px
Old: >>56896846
Working on?
>>
>>56904235
First for better thread.
>>
>>56904291
>Codingame
I'm not 15 anon.
>>
>>56904291
Additionally,
>>56904326

the sight of SPJ makes my nipples hard.
>>
File: simon.jpg (80KB, 536x649px) Image search: [Google]
simon.jpg
80KB, 536x649px
>>56904235
>Haskell man
>>
>>56904326
i mean, there is a prizepool for there contests, thats why I do them.
>>
What do you guys use to code?
Currently using Notepad++.
>>
>>56904538
Sublime or Visual Studio
>>
>>56904538
vi
>>
>>56904326
Damn, ten thousand? Too bad everyone here is too dumb to win.
>>
>>56904538
vim

Never use anything starting in "Visual"
>>
This>>56904580
was meant for >>56904451
>>
File: anal beads.png (11KB, 535x287px) Image search: [Google]
anal beads.png
11KB, 535x287px
>>56904235
I'm just playing around at this point.

>>56904538
Depends on what language I'm using.

My go-to is Visual Studio, but I don't mind firing up IntelliJ or a simple text editor.
>>
i know C++ (been using/learning it for about 4 years now, i just started uni)
lately ive been getting some C cravings, do you think it's worth investing my time into reading K&R? Will it make me a better programmer? (even though i know C already, probably not really well, honestly)
>>
How do I into socket programming? I've never really messed with networking in my code.
>>
>>56904693
Depends quite a lot on the language. If it's in C check out beej's guide. Otherwise I don't have any specific recommendations.
>>
How do I compile without having a main class in java?

I've edited the .java source code for a library I'm using, and I need to turn it into a .class file.

How do I do this?
>>
>>56904693
>>56904815
Whatever you don't, don't do it in java.
Java has a lot of alluringly easy to use networking facilities in the standard library, but they will fuck you in the long run.
>>
>>56904891
What if it's for one simple assignment? I don't mind doing it in C if Java is that bad.
>>
>>56904879
javac MyClass.java
to produce MyClass.class file
>>
>>56904917
Java networking tends to lock you into java. If you write a server in java, you tend to have to write the client in java, and vice versa. If you don't care about portability of your network protocol, then sure, do it in java if that's what you're comfortable with.
It is possible to break out of this liblock, but then it's just easier to do it in C from the start.
>>
>>56905082
And also more educational to do it in C.
>>
File: anal beads.png (42KB, 765x1091px) Image search: [Google]
anal beads.png
42KB, 765x1091px
>tfw your method names can't be retrieved with reflection
>>
File: cap.png (106KB, 1366x736px) Image search: [Google]
cap.png
106KB, 1366x736px
Learning based Direct3D.
>tfw Direct3D is vastly superior to OpenGL
>>
>>56905082
>Java networking tends to lock you into java. If you write a server in java, you tend to have to write the client in java,
False, my retarded friend.
>>
>>56905173
>D3D superior to OGL
how so? in what way?
>>
>>56905200
Even OGL developers think D3D is superior to OGL.
>>
>>56905200
it just works
>>
>>56905200
Being object-oriented makes it more sane than OpenGL, especially on C++, although there's still a lot of Win32/COM cruft. And according to Carmack it handles multi-threading much better, manages state better, and has surpassed OpenGL overall.
>>
>>56905304
not really.
>>
>>56905304
Not answering my question.
>>
>>56905326
Maybe i'll have to look into DX then.
>>
How long would it for a scrub like me to code up a probabilistic skip list?
>>
>>56905173
it's not. nvidia proved numerous time that opengl performs better (eg: gdc 2006). today opengl can even be as fast as vulkan.
>>
>>56905443
Beware of the window and device/context setting up code, as DX doesn't have anything like GLFW or GLUT to easily set up a window and a context. It's you and the low-level Win32 and D3D APIs alone. But once you get past that it's alright.
>>
>>56905501
That's why almost all games choose D3D, because OpenGL performs better.

>2006
>>
>>56905501
>2006

>today opengl can even be as fast as vulkan.
???
>>
>>56905524
>That's why almost all games choose D3D
alri pajeet
>>
>>56904235
>I am married to Dorothy, a priest in the Church of England. We have six children (three adopted).
>adopted
KEK
>>
>>56905578
s/KEK/cuck
>>
A vote was held, and it looks like my AI class will be using Java. Welp.
>>
>>56905524
d3d has better tools, but

>almost all games choose D3D

that's one retard thing to say; all games running on ps4, wii u, android, ios, ... don't rely on directx.

>>56905562
yes, search "Approaching Zero Driver Overhead in GL" on google.

>>56905326
>And according to Carmack

https://twitter.com/ID_AA_Carmack/status/386899206163554304
https://twitter.com/ID_AA_Carmack/status/627475252117770240
https://twitter.com/ID_AA_Carmack/status/383262540551028736
https://twitter.com/ID_AA_Carmack/status/323866349845770240
>>
Figure I'd ask this here, since you probably have more knowledge.

In windows search, it shows up an exact match if the syntax is
filename:~xy

It shows only files and folders starting with xy if you type
filename:~<xy

And if you write
filename:~>xy
It shows all the files and folders which have xy located anywhere in the name.
Why is the greater than/less than sign so important? I can't wrap my head around it how it works, would anyone be willing to explain?
>>
>>56904326
it feels like you are
>>
>>56905617
My AI class primarily used Java for examples but the professor was willing to accept implementations in any language.
>>
>>56905619
>And according to Carmack
yes, according to Carmack.

None of those tweets contradict that.
>>
>>56905617
>>56905651
What does this AI class involve?
>>
>>56905619
>You can't blame the Linux users, there were not many of them ultil Valve made Steam client for Linux. You underestimate alot.

oh wow
>>
carmack has been compromised
>>
>>56905697
Yep, he's become some kind of meme language king now. Sad.
>>
>>56905651
My professor wanted us to all be using the same language and gave us a few choices. First choice of the class was Java.

>>56905681
Learning algorithms, intelligent agents, some other stuff.
>>
>>56905697
>not liking haskell
pleb
>>
File: jcracket.png (514KB, 1680x1050px) Image search: [Google]
jcracket.png
514KB, 1680x1050px
>>56905697
>Not ditching C++ for Racket
>>
Is it worth starting with python 2 and moving up to python 3 eventually or should I just start with python 3?

How different is it?
>>
>>56905714
>meme language king
His Racket demo for mobile vr was pretty cool though.
I hope he gets to focus on PC soon.
>>
>>56905768
All meme language demos are cool. As if normie developers are going to learn something like racket to do something as standard as UI. Would have been way better off using Java or JavaScript if they wanted to make some brain dead easy way of making UI shit that every developer could jump into.

No that I like either of those langugaes particularly.
>>
@c macro gods

how can i make this better?
#include <stdio.h>

#define TYPE int
#include "define_generic.h"
#undef TYPE

#define TYPE float
#include "define_generic.h"
#undef TYPE

int main(void)
{
int arr_int[2] = { 0, 1 };
printf("Minimum int is %i\n", get_minimum_int(arr_int, 2));

float arr_float[2] = { 0.2, 1.5 };
printf("Minimum float is %f\n", get_minimum_float(arr_float, 2));
return 0;
}
>>
>>56905765
source?
>>
>>56905931
https://www.youtube.com/watch?v=ydyztGZnbNs
>>
>>56905952
thanks!
>>
>>56905930
#define STACK_ARR_LEN(x) (sizeof(x)/sizeof(x[0]))

int main(void)
{
int arr_int[] = { 0, 1 };
printf("Minimum int is %i\n", get_minimum_int(arr_int, STACK_ARR_LEN(arr_int)));

float arr_float[] = { 0.2, 1.5 };
printf("Minimum float is %f\n", get_minimum_float(arr_float, STACK_ARR_LEN(arr_float)));
return 0;
}


:^)
>>
MAKE WAY FOR THE SHITTER:

I'm listening for a submit event on a form using jQuery:

$('#voteForm').submit(function(e) {
// code
});

Will the code in my function be executed before or after form submission? If it is executed before form submission, do I need to explicitly submit the form myself, or will it do so automatically after executing the code in my callback?
>>
>>56906004
srs tho, why won't something like

#define DEFINE_MIN(T) \
#define TYPE T \
#include "define_generic.h" \
#undef TYPE

DEFINE_MIN(int)
DEFINE_MIN(float)


work? can you point me in the right direction, is something like this possible with macros?
>>
>>56906112
no
>>
>>56906040
I'm not 100% sure but I think it gets executed before submission. If you want to stop the submission you can add e.preventDefault(); anywhere in the function.
>>
>>56905625
pls respond
>>
Where'd you learn makefiles /g/?
>>
>>56906179
internet
>>
>>56904538

Lua Development Tools
>>
How'd you beat depression and laziness /g/?
>>
>>56906226
Exercise helps a lot imo.
>>
>>56906241

I didn't ask for something that actually takes effort anon
>>
>>56906226
Adderall
>>
>>56905930
public class Main {
public static void main(String[] args) {
Vector ints = new Vector(0, 1);
Vector floats = new Vector(0.2, 1.5);

System.out.println("Minimum int is " + ints.minimum());
System.out.println("Minimum float is " + floats.minimum());
}
}


public class Vector<T extends Comparable<T>> {
private T[] numbers;

public Vector(T ... numbers) {
this.numbers = numbers;
}

public T minimum() {
if(numbers.length == 0) {
throw new IllegalArgumentException();
}
T min = numbers[0];
for(int n = 1; n < numbers.length; n++) {
if(numbers[n].compareTo(min) < 0) {
min = numbers[n];
}
}
return min;
}
}
>>
>>56906243
Can always stop breathing then. Death is an excellent sure for depression.
>>
>>56905930
#define get_minimum(list, size, min) { \
min = list[0]; \
int i; \
for (i = 1; i < size; i++) { \
if (list[i] < min) { \
min = list[i]; \
} \
} \
}

int main(void)
{
int ia[] = {2, 3, 1};
int im;
get_minimum(ia, 3, im);
printf("%d\n", im);

float fa[] = {2.0, 3.0, 1.0};
float fm;
get_minimum(fa, 3, fm);
printf("%f\n", fm);

return 0;
}
>>
>>56906292

How did i not think of this before
>>
racket is great and all when you dont have a real job
>>
Have any of you used processing? what do you think?
>>
>>56906316
>having a real job
wwwwwwwwwwwwwwwwwwwwwwwwww
>>
Lua has spoiled me, I can't write in any other language without feeling disgust anymore
>>
>>56906345
555555555555555555555
>>
>>56906374
Disgust was what i felt when i was working in Lua.
>>
>>56906410

What did you dislike?
>>
define(DEF_MIN,
$1 get_minimum_$1($1 *arr, int `len')
{
$1 min = arr[0];
for (int i = 1; i < `len'; i++)
{
if (arr[i] < min)
{
min = arr[i];
}
}

return min;
}
)

DEF_MIN(int)
DEF_MIN(float)


m4 test.c.m4 > test.c
gcc test.c


whats wrong with this famalams?
>>
I used to program a bit in C in early 00's but haven't really touched it since and I'm now looking to get back into it.
Can anyone recommend a book that would (re-)introduce me to (modern) C?
I'm not looking for a book that's mostly a grammar reference (I have a pretty good grasp of that, plus I can always open K&R), I'm more interested in something that covers modern practices and tools (writing makefiles, all the gcc flags, differences between C standards, using gdb etc.)
Anything worth reading?
>>
>>56906480
>
int `len'
>>
>>56906425
From what i remember, block delimitation, non-enforced semicolons, a decent standard math library. And 1-indexing. 1-indexing makes sense semantically, but everyone's just so used to 0-indexing.

Basically, i'm a sepplesfag and everything that takes me out of that groove looks disgusting to me.
>>
>>56906514
emacs m4 mode highlighted len, so i thought it was a builtin macro so i escaped it. it works like this
>>
>>56906533
>it works like this
>whats wrong with this famalams
>>
was c++ a mistake?
>>
>>56906527
>block delimitation

Sorry, I didn't learn programming in English, and google just turns up some geography bullshit, what mean

Anyways, the C api, LuaJIT and the table/metatable system and the code looking so damn neat are what keep me on the language
>>
>>56906669
Your mom told me you were a mistake.
>>
>>56906669
>All this shit when
_Generic
exists
>>
>>56906669
Yes
Praise D
>>
>>56906686
Means how the language marks the beginning and end of different code blocks.
Writing 'end' to mark the end of an if or while block was annoying and ugly. That WAS Lua that did that, right?
>>
>>56906669
>what are templates
>>
>>56906745
i meant it in the sense that c++ is useless because you can have generic code in C. the code in the pic is C
>>
>>56906740

if true then
yeah it was
end

But then again, which scripting language has gotten the block delimiters right?
>>
>>56906745
ugly, messy and verbose
>>
>>56906792
you can metaprogram tho
>>
>>56906782
python. Yeh, i said it.
>>
>>56906782
Well, js does it c style, like i'm used to.

Oh, and that 'then'. Also annoying.
>>
File: 1439362563812.gif (360KB, 480x270px) Image search: [Google]
1439362563812.gif
360KB, 480x270px
Any ideas for a relatively low level project? Preferably something practical to do with either operating systems, exploit or malware implementation/analysis that will take some time.
>>
>>56906669
>sizeof(int *)
hmm
>>
>>56906832
You could write a driver
>>
File: map.png (26KB, 585x322px) Image search: [Google]
map.png
26KB, 585x322px
Whenever I compile a C program, it also makes a .map file with the same name. What is it for?
>>
File: 1466897056216.jpg (35KB, 500x448px) Image search: [Google]
1466897056216.jpg
35KB, 500x448px
What's a good book to learn C?
>>
>>56906849
dont be sexist
>>
File: Lanka 25.png (64KB, 166x373px) Image search: [Google]
Lanka 25.png
64KB, 166x373px
>>56906864
If that's an IDE you're using, it might be inserting that itself. Compilers don't output a .map file
>>56906875
C Programming: A Modern Approach
>>
>>56906832
could always make a packet sniffer or keylogger
>>
>>56906782
Lisp, there no blocks, only nested expressions.
>>
>>56906226
I didn't lol.
>>
Okay /g/ents if you were to write a text to brainfuck generator how would you go about it in C#.
inb4
>not a homework thread
It's not homework it's just a personal project I wanted to do initially I thought it was going to be easy until I started doing it.
Well I've been at it for about a week now and I get stuck on pretty much everything, so how would you guys go about solving this problem.
I have a general format for the BF that goes something like this
++++++++++
[
>++++++++++
>>add more blocks if there's an ascii code that is greater than or less than 100 by 10 or more
<<-
]
change pointer around and add or subtract for each cell then printing


I think that I need to revamp the format for my BF code, it works just fine if a person is writing it but it's proving difficult to work around.
>>
>>56906864
>>56906921
Nevermind, it's something the linker outputs
https://en.wikipedia.org/wiki/MAP_%28file_format%29
>>
File: 1429086253360.gif (457KB, 360x480px) Image search: [Google]
1429086253360.gif
457KB, 360x480px
>>56906853
Considered it, but can't think of a device I'd want to write it for. Any suggestions?

>>56906925
Packet sniffer sounds interesting, though I'm not that much into networks.
>>
>>56906799
kek
>>
>>56906938
lmaooo tru
>>
>>56907214
Haha Kill(Myself) amirite?.
>>
>>56906724
that's not at all what _Generic does
even though it could be used in conjunction with this so you don't need to type
foo_type(x)
, you could just type foo(x), but that only works nicely for 1 parameter functions, it turns into a mess of macros when you have 3 parameters for example
>>
> new to programmig
> week 4

enjoying it but wondering if its for me long term ?
When a solution is found its not joy but relief, a moment of pleasure and then on to the next part of the problem.
Its like a fap but the fapping is painful and the cum is just the pain stopping for a bit.
Does it get better ?
>>
>>56907054
Source on that anime? is it Yuru Yuri?
>>
>>56907054
If you're competent to do that, you could write a gamepad driver, and then write up a tutorial on how to do that, for me to read.
>>
>>56907260
How is that anything like fapping. Please see a doctor.
>>
>>56907260
Programming is a roller coaster that eventually becomes a pleasant and calm ride with the occasional hiccup.

Stay at it m8.
>>
File: 1467552510515.png (29KB, 226x215px) Image search: [Google]
1467552510515.png
29KB, 226x215px
>>56907326
Inu x Boku SS I believe.

>>56907396
What kind of gamepad driver? Any specific device?
>>
>>56907549
Contribute to D and write a native gamedev library.
>>
>>56907549
Thanks
>>
>>56906480
size_t retard
>>
>>56907549
I have an old GameCube to usb converter to use a GameCube gamepad on the pc, but it stopped working when i moved from WinXP to Win7. The only game that it still works with is Flight Simulator X.
I've been wanting to learn how to write drivers so i might get that functioning again. And i'm thinking a gamepad is a simple enough device for a noob like me to learn how to write drivers.

But you know, a driver for Xbox360 pad would be fine, or whatever you feel like and is convenient for you.
>>
>>56907865
odd, would the controller not show up as a HID device?
>>
File: 1411607997271.jpg (430KB, 894x1190px) Image search: [Google]
1411607997271.jpg
430KB, 894x1190px
Just pushed some changes to akari-bbs!
http://akaribbs.mooo.com/

I made [tags] more robust and added spoilers.
Do you think there's a use case for code blocks with spoiler tags?
Doesn't matter, added it anyway.
>>
>>56904538
vim or atom. It depends, really...
>>
>>56907951
It was some time since last i used it, but as i remember it windows doesn't detect it at all, but it still work fine in FSX, and only FSX.
>>
>>56907972
>akari-bbs
I was expecting a blank page
>>
I want to make an application that does API calls via HTTP to retrieve, send and modify data on another website. I want to store information about the calls it will make. Think of it as a bot. Is PHP+MySQL a good approach for this?
>>
>>56908036
you need to be more specific
what causes it to make the calls
>>
>>56908036
MySQL might be overkill. Sqlite3 would be the better choice for database.

PHP would work but PHP also sucks ass to write but thats really up to you.
>>
>>56907972
You need to implement hover over reply links, next, akari-kun~
>>
>>56908036
It's been a long time since I've had to use PHP so it may have changed somewhat but I wouldn't recommend it.
>>
Does anyone have any good books or links for C++, finally taking Data Structures and I can't for the life of me grasp Nodes and how to incorporate them into Lists. I'm actually struggling for once.
>>
>>56903643
config files are meant to be static
>>
>>56908142
>"I'm actually struggling for once"
>with nodes and lists
What have you been doing up to this point, hello world?
>>
>>56908142
you mean making a linked list? I'd just google it. There's a million articles about it. What are you having trouble understanding?
>>
>>56908070
It's a virtual shop. I want my application to periodically check prices, find good deals of items I want and buy them accordingly. I also want it to manage my sales and adjust prices for the items I'm selling.

>>56908081
>>56908106
I never understood the PHP meme. Why exactly is it bad? It can do everything I need in this case: make HTTP requests, insert rows in a db table, display the information nicely in a small backend. What are the alternatives?
>>
>>56907951
>>56908021
Actually, scratch that. I dug it out and tried it, and it does show up as a HID-compliant game controller in the device maneger, but it doesn't show up in the Game Controller Setting list.
>>
What programming in C feels like: https://www.youtube.com/watch?v=P73REgj-3UE

What programming in python feels like:
https://www.youtube.com/watch?v=ENdgyD7Uar4
>>
>>56908284
>rainbow cake
yep, it's for phallic obsessed homos
>>
File: 1473902017356.gif (2MB, 500x281px) Image search: [Google]
1473902017356.gif
2MB, 500x281px
>>56908142
literally imagine it as people being nodes and pointing to the next person. you just have to set where they're pointing
>>
>>56908219
most languages can do everything you need. the issue is how easy it is to write and maintain

if you're comfortable with php then that's fine. look up "cron job"
>>
>>56904235
Playing around with vector clustering because I had an idea. Curious how it will work out.
I still need to optimize it for speed, though.
>>
>>56908363
a learning algorithm?
>>
i wonder how many years forcing stuff like c++ and java has set back cs education
>>
>>56908414
Yeah. But currently I just want to get "good" clusters and kill noise.
>>
>mfw got 40 stars on github for a 100 LOC python tool
>>
File: 1451318170101.jpg (57KB, 482x549px) Image search: [Google]
1451318170101.jpg
57KB, 482x549px
>>56904235
Trying to fucking switch modes in a 32bit pmode kernel, now contemplating suicide.

>BIOS VGA interface
Unable to drop back to rmode, also I prefer high resolution and true color.

>VBE
Unable to drop back to rmode.

>VGA hardware
Too complex and still limited to the same resolution and color depth as the bios interface.

>VBE3 PMID
No VM supports it (at least not qemu, but I heard others don't support it either), I have verified this myself, qemu bios does not contain the VBE3 PMID table.

>VBE2 PMID
Qemu does support it, but i heard it's horribly gimped and hardly fucking works/hard to use.
Anyone know if it can switch video mode? it might be my only chance.

>UEFI
Can't use boot services after calling ExitBootServices (including video mode switching).
Also doesn't support any of the fucking interfaces above except for VGA hardware.

>Fuck off multiboot and grub in order to write my own bootloader so that I can switch back to rmode.
There is a good chance that I could miss an important interrupt while in rmode, which is bound to cause trouble, so switching back to rmode is pretty much out of the question anyway.

>Why drop multiboot just to switch back to rmode?
I think grub is clobbering the rmode IVT, because this is what happens when I try to drop back to rmode:
>reset PIC back to bios defaults
>cli
>paging already disabled
>setup 16bit flat gdt
>far jump to 16bit pmode code
>load segment registers
>load rmode IVT via lidt with limit 0x3ff, base 0x0
>disable pmode
>far jump to 16bit rmode code
>reload segments
>set stack pointer
So far so good, no problems, can write to vga buffer to confirm working.
>sti
Suddenly faults and boot loops.
And trying bios interrupts without enabling interrupts (not sure if this works) also faults.

[cont]
>>
>>56908219
You're right that it can do those things well, and if you know the language well enough and keep your scope very limited it'll be fine.

In my experience the problems with PHP come when you have to depend on a flawed function from its (gigantic) core library and the documentation is poor or muddled. That's when it starts to go downhill fast.
>>
File: 1473920357885.jpg (55KB, 640x480px) Image search: [Google]
1473920357885.jpg
55KB, 640x480px
>>56904235
finally starting the programming project I was assigned 2 weeks ago for my Advanced C++ class and learning the mistake I made as I know diddly squat

also fairly unfortunate the first C++ class I had taught file io using the standard library functions and not these io meme streams
>>
>>56908509
Color me jealous. I have 0 stars.
>>
>>56908576
>v86 monitor
I have not looked into this much, but I heard it's hard to setup.
I heard you have to emulate the int instruction, how does that work? wouldn't I need to drop back to rmode for that anyway?
if v86 solves the interrupt missing problem above then so far my two choices are:
1. v86 monitor
2. VBE2 PMID
Which one?

If neither fucking work, then I guess I am forever stuck on VGA mode 3 text mode. and UEFI doesn't even fucking support text mode causing grub to "unable to find appropriate video mode" leaving my kernel without a framebuffer.
So I'm also stuck on BIOS systems.

>Just set the video mode once in the bootloader and leave it on that
No, I want to be able to switch the mode at any time, this isn't fucking TempleOS.

>Just put the desired video mode in the multiboot header.
Bootloader is free to completely ignore it, so I have zero control over it, so I am not going to rely on it.

I guess there's also a third choice:
>Write my own sane virtual machine and fuck off x86 and the PC platform forever
But then there's the problem of writing my own compiler and toolchain which is a massive fucking problem considering I'm using C++ (yes, I'm using C++ in a kernel, fucking deal with it).

I can't believe it is twenty fucking sixteen and this is still somehow a problem.
>>
>>56908587
>post a show hn
>get on first page
>watch the stars pour in
>>
>>56908442
How do you mean, anon? I can sort of see it with Java but surely you can teach CS with C++?
>>
>>56908582
>these io meme streams
I don't care if they're meme. I love them.
>>
>>56908582
The iostreams are the standard library functions.
>>
>>56906112
The standard C pre-processor isn't recursive. You only get one level of definition. It's a crying shame.

>>56906194
>eclipse-based
eww
>>
>>56908593
>>56908576
Why are you dealing with video modes in the kernel and not in an external executable/driver/module/...?
Also, how fleshed out is it (the kernel I mean)?

>fuck off x86 and the PC platform
The most sane answer, I'd say. At this point, writing a kernel from scratch on an architecture as complex as x86(_64)/PC is almost impossible unless you settle for underwhelming results.
Note however that NT had this exact thing done to it during its development process, as it was originally designed for the i860 (or was it the i960?): so be cautious.
>>
>>56908734
>It's a crying shame
I would prefer to have decidable compile times.
>>
>>56908777
>he's never heard of a maximum recursion limit
lol?
>>
anyone know linear algebra? i have to prove that

If columns of A span R^3, then AX = B has a solution for every B.

where A = [U V W] and X = [x y z]. and U, V and W are elements in R^3

i'm lost
>>
>>56908806
this is not really /g/ but i won't point you to /sci/ because it's awful
tell me what it means for the columns of A to span R^3
>>
did /wdg/ croak again
>>
>>56908837
i asked sci anyways >>>/sci/8389808

how i understood it, the book says that if a vector spans R^3, it's a set of 3 real numbers, but i wrote that on part of the test and he marked it incorrect. his definition is that v1, v2, and v3 span R^3 if every vector in R^3 is a linear combination of v1, v2, and v3
>>
>>56908897
R^3 is 3 dimensions of real numbers. His explanation is correct.

Use that definition to apply to your problem. What do you know about columns and linear separability?
>>
>>56908897
you are wrong and he is right. this is just a definition. in particular what you can do is write B = xU + yV + zW for some x, y, z in R
>>
Because I'm not making a micro kernel, and that doesn't solve my problem at all, in fact it complicates it further.

>How fleshed out is it
Not very, I started it like a few days ago. All I've got is some nice printing abstractions and a text mode VGA "driver" that just reads the multiboot framebuffer info.
>>
https://twitter.com/notch/status/783084733622124545
How do you feel about the greatest programmer of all time buying 4chan.
>>>/b/706462991
For anyone interested
>>
>>56909000
Meant for
>>56908765
>>
>>56909008
i prefer shkreli
>>
>>56908959
>>56908963
so would the proof be correct to say:
AX = B doesn't have a solution for every B if there is a column that doesn't have 3 real number. If the columns of A span R3, then all columns have 3 real numbers. Therefore If columns of A span R3, then AX = B has a solution for every b. ?
>>
>>56904235
For a class I need to write a super simple program in Bash. It needs to accept five numbers, square them, sort them, then print them. Not hard, right? Except Bash is fucking incomprehensible to me. I've learned C/C++, Java, and Python just fine, but literally nothing about Bash seems even somewhat sensible to me.
Any help? I'd rather get an explanation than an answer, but I'll take either really.
>>
>>56909008
All hail nootch
>>
File: 1474341291794s.jpg (1KB, 250x140px) Image search: [Google]
1474341291794s.jpg
1KB, 250x140px
Look at this hack I made
>>>/v/353694017
>>
>>56909052
Not even close...

Where I think you are getting the vector length of 3 thing from is that to span any space of N dimensions you need at least N vectors. It has no relation to your problem.
>>
can someone help me here?
https://www.codingame.com/ide/582466342ac6944cd030506c22f5f68cf2376a4
they give an example :
>For example, if the card distribution is the following:
>Player 1 : 10D 9S 8D KH 7D 5H 6S
>Player 2 : 10H 7H 5C QC 2C 4H 6D
>Then after one game turn, it will be:
>Player 1 : 5H 6S 10D 9S 8D KH 7D 10H 7H 5C QC 2C
>Player 2 : 4H 6D
in this example, the game ends in tie (i.e., "PAT"), right?

also, how much should this take? I've been trying to solve this one for ~6 hours... well, not really, but... yeah
>>
>>56909057
You'll need xargs, bc (for squaring), and sort. That's all I'll give you because that's all I know. Fuck bash, no one in their sane mind would use that horrible language in $CURRENT_YEAR.
>>
>>56909104
If the columns of A span R3, then no vector in the set can be defined as a linear combination of another, and they aren't zero vectors. Therefore, there can't be a pivot in the last column of augmented form of AX = B, so AX = B has a solution for every B.
>am i getting closer?
>>
>>56909131
But as far as I can tell it's not possible to use one function as an argument for another with Bash. How is it even possible that fucking C is a more user-friendly and convenient language than anything?
>>
>>56908284
haha I really like you content. how long have you been programming for? is there any place I can follow you for more memes like this?
>>56908601
I've done this before. ended up with ~900 stars on some vaporware project that wasn't even interesting,
>>56909008
fucking tarded redditors posting in the comments. they've probably all visited /b/ once and they were offended so they want it dumbed down to their level with more minecraft.
>>
>>56909057
every command just pulls a fucking file out and runs the instructions. The keywords call hooks and forks, the hooks into buffers already in use, the forks into threads that run a function then return or terminate.

Loops function just like in other languages but you don't have type safety problems since its all just binary, I think. Though, since it's asm you have to recognize the possibility that you are not "canning" or encapsulating things due to the nature of efficiency as brought by asm. Think of it like a pre-processor directive that let's you create different kinds of loops by examining the signature with a different kind of parser than the programming language parsers.

Maybe that sounds weird.

Basically, it's all ASM wrapped in a file system that supports the execution of different file types already instated.

If you mean the design then you probably should actually work on something and look to see how the tools most tend relate to on another. There maybe implementations for higher level functions that comprise a combination of lower level functions.

Anyway, bash is mostly about handling files as they are. Text editing can be done on a terminal but should be considered optional unless it's to do with concatenating existing files.

Take this with a grain of salt, of course, I'm only a babby basher.
>>
>>56909446
use two tildes to block in the nested function call
>>
>>56909468
I don't know what that even means. Can you give an example?
>>
>>56909131
>no one in their sane mind would use that horrible language in $CURRENT_YEAR
I've written several bash scripts to automate some of my shit in the last year alone.
>>
>>56909364
Almost. You are missing a step in your assertion that the rows are linearly separable where you must state that the column rank = row rank. Additionally, note that A spans R^3 and there are three vectors in A when you say there are no spare rows. You're on the right track.
>>
>>56909584
Not him, but why? Wouldn't it be far simpler to use Python or something?
>>
>>56909584
I've never seen a use for bash except for tiny 4 line programs, or just piping commands together which one could hardly call using the language.
>>
>>56909552
ls `pwd`
>>
>>56909638
a better example might be:

ls -l `pwd -a`
>>
>>56909617
I don't like python.
Also a lot of my scripts just involve some variable substitutions and calling curl and sed a bunch of times.

>>56909631
Several of my scripts are a about 50 lines long (with whitespace).
Much more beyond that, then I would probably pick something else.
>>
>>56909615
it would be that if there was a row [0 0 0 b], then the columns wouldn't span R3. because they would only form a 2 dimensional plane instead of the entire 3d space as they would if they spanned r3. is that right? i watched a video no youtube that visualized things. if its right how do i turn it into being acceptable in a proof?
>>
>>56909057
head -n 5 | awk '{print $1 * $1}' | sort -n
>>
>>56909468
>>56909638
Let me interject for a moment. What you call tilde is in fact backtick / backquote / grave accent. Tilde looks like this: ~.
>>
Anywhere I can find a crash course to writing application (and maybe later some gaymes)? I downloaded Unity and I have no clue what the fuck I'm even doing.
>>
>>56909638
>>56909658
Ah, alright, I see what you mean. I was thinking of tilde as ~ instead of `.
I managed to stumble my way through to getting the values down, but now when I try
sorted=$(sort <<< ${arr[*]})
to sort it, sorted is just identical to arr. Why is this?
>>
>>56909123
fucking crap, a single friggin stupid rule (no matter who wins, put the cards of the first player first) had me debugging this shit for an hour
anyway, I got it. it was actually easy, but kinda tedious
>>
File: 1456606127623.jpg (62KB, 600x349px) Image search: [Google]
1456606127623.jpg
62KB, 600x349px
Someone told me
_isIt = !_isIt;

Is the best way to have a bool toggle, it works well and looks good, but I'm not sure I understand what it is doing, can someone help me understand?
>>
>>56909938
m8 what do you think the ! operator does
>>
>>56909938
You know what the ! operator does?
>>
>>56909945
It sets the bool to false I guess, but how can it set a bool that is already false to true?
>>
>>56909959
Learn what the NOT operator is m8
>>
So I heard Java received tons of improvements since Java 6. Is it more comfortable to develop in nowadays?
>>
>>56909966
>>56909953
>>56909945
I guess it actually means the opposite of the current value??? I do have the C# reference open, I'm just retarded, sorry.
>>
>>56909901
Update: Changing it to
sorted=$(sort <<< "${arr[*]}")
didn't change anything.
Am I misunderstanding what sort does? Because I figured it would, you know, sort things.
>>
>>56909823
Oh shit, you're right.

Disregard me, I suck cocks.
>>
>>56910016
sort is a void function

I guess the type stuff is minimal. Sorry I won't be much help for a few minutes, I'm both eating and doing something.
>>
>>56910048
>eating is not doing something
phew, that changes a lot.
>>
best language poll
http://www.strawpoll.me/11359830
>>
>>56910048
>sort is a void function
Wait, how is it useful then? It doesn't modify the input so wouldn't it just be a waste of CPU cycles if it doesn't return anything?
>>
>>56910090
It modifies the input.
>>
>>56910080
>C++
>Java
what are you doing
>>
Alright DPT, what's a good build system for Java? I don't want to use Ant or Maven, because the syntax is way too fucking verbose. I am thinking of just doing CMake for Java anyways, but the support is... limited.
>>
>>56910102
Are you sure? Because when I input an array it doesn't modify it at all.
>>
>>56910117
Whenever I have to use pooinlang for a University assignment, I just write a makefile.
>>
File: angrydome[1].gif (415KB, 213x201px) Image search: [Google]
angrydome[1].gif
415KB, 213x201px
Fucking Ruby.
>looking up how some AI algorithms for TSP work
>Ant Colony Optimization
>basic example is in fucking Ruby
>"Jesus Christ, what the fuck is this syntax?"
This is the stupidest fucking language I have ever seen.
I've spent more time trying to interpret the programming language concepts than actually reading the algorithm.

What kind of retard subjects themselves to this garbage?
>>
>>56910213
>literally any contact with an unfamiliar language in a nutshell
>>
>>56910213
just post it and we'll see
>>
>>56910231
Please, if it's any imperative language, then the language concepts should be familiar enough that the syntax doesn't totally throw you off.
I've experienced C, C++, C#, Java, JavaScript with Node.js, Python, F#, Clojure, and none of them were this stupid.

>>56910251
http://www.cleveralgorithms.com/nature-inspired/swarm/ant_colony_system.html
It took me a while to figure out that
foo[:vector] = ...
foo[:cost] = ....

were actually ways of assigning to dynamically created members of objects and not a goddamn array
and what the fuck is
perm << next_city
>>
>>56910117
Gradle.
>>
>>56910125
Fuck, I've solved it. Sort still doesn't modify the input at all, but I was missing -n, because apparently without -n it doesn't sort the array in any reasonable way, instead opting to alternate between the first and last numbers in the array.
Fuck this language, and fuck that one anon for even liking it.
Pure C is easier and far more powerful.
>>
>>56904538
Spyder
>>
>>56910080
日本語は必勝!
>>
>>56905767
Just use python 3. It's not that much different but it has some better features and it's the future so better get used to it. And if you ever need to use a library that only runs on 2.x then and only then you'll need and will be able to install 2.x as well
>>
>>56910364
日本語tueee
>>
>>56910319
>it doesn't sort the array in any reasonable way, instead opting to alternate between the first and last numbers in the array
It sorts them lexicographically by default, idiot.
>>
>>56906226
The guy saying exercise is right. It destroys most fundamental causes of depression. It makes you productive again and have a feeling of accomplishment after every session. It boosts your self-confidence. It releases endorphin into your brain, which basically how your brain makes you feel good. Sport is a hell of a drug, and it's a good one.

You can be lazy. You don't actually have to go out. Just use a jumping rope, do push-ups and abs every 2/3 days and you're good to go.
>>
>>56910267
thanks. yeah, symbols are weird. it seems like he's using it as a dirty struct there
the last one is just an append
it seems like a weird choice of language, really. ruby is slow and doesn't have a lot of libraries for this sort of thing as far as i know

>>56910319
it interacts really well with shell commands. for me that makes putting up with its anachronisms worth it
>>
why dis no work on C. Also is there a way I can use VS Studio without have to put _CRT_SECURE_NO_WARNINGS in the preprocessor definitions for every C project.


#include <stdio.h>
#include <math.h>
#define PI 3.14159

int main(void)
{

double radius; /*input - radius of a circle*/
double area; /*output - area of a circle*/
double circum; /*output - circumference*/

/*Get the circle radius*/

printf("please input the radius of your circle");
scanf("%lf", &radius);

/*Calculate the area*/

area = PI * radius * radius;

/*Calculate the circumference*/

circum = 2 * PI * radius;

/*Display the area and cirumference*/

printf("The area of your circle is %lf\n", area);
printf("The area of your circle is %lf\n", circum);

return (0);
}

>>
>>56906782
Python ofc.
>>
>>56910487
>why dis no work
Please don't type like a fucking retard.
Also, please be more specific with how it's not working.

>Visual Studio
Don't use that garbage.
>>
>>56910487
Compiles & works just fine with gcc here.
Does it come with any errors?
>>
>>56910518
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol _WinMain@16 referenced in function "int __cdecl invoke_main(void)" (?invoke_main@@YAHXZ) ConsoleApplication10 c:\Users\Mello\documents\visual studio 2015\Projects\ConsoleApplication10\ConsoleApplication10\MSVCRTD.lib(exe_winmain.obj) 1
>>
>>56910487
Because longs and doubles are not the same thing
>>
>>56910487
>#include <stdio.h>
wait a sec
>>
>>56910518
What do you recommend over VS then
>>
>>56910546
%lf is correct for double
>>
>>56910594
Yea, you're right, sorry. Anyway, this compiles/runs successfully for me with VS2010.

C:\>cl test3.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.

test3.c
Microsoft (R) Incremental Linker Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.

/out:test3.exe
test3.obj

C:\>test3.exe
please input the radius of your circle5
The area of your circle is 78.539750
The area of your circle is 31.415900

C:\>
>>
File: SirCumference3-4-2014-2.jpg (134KB, 1000x708px) Image search: [Google]
SirCumference3-4-2014-2.jpg
134KB, 1000x708px
>>56910535
Unfortunately I have no clue.

but Once your done solving, replace that "area" in your last printf
>pic related
>>
>>56906669
looks nice anon.
pls link your .vimrc
>>
>>56910487
I think I set it as a windows application instead of a console application cuz now it works.Anyone recommend a C IDE. IS codeblocks good?
>>
>every new functions produces increasingly more errors
Well, I guess this is my last build for today. Off to bed I go.
>>
>>56909938
best is
int i = 0
i = 1 - i
>>
>creating an n-dimensional array in Java at runtime
>operating on that n-dimensional array at runtime
shieeet
>>
why should anyone use golang now that std::async exists?
>>
>>56910928
>Java
>>
>>56910896
not really
>>
>>56910952
>assignments
I'd be using C++ or C# otherwise senpai
>>
>>56910896
That's shit. The best way is
bool a = 0;
log(a);
a = fetestexcept(FE_DIVBYZERO);
feclearexcept(FE_DIVBYZERO);
>>
>>56910950
Because it's not sepples.
>>
>>56910982
damn your right
>>
>>56904235
Okay /g/ so I'm learning C after I stopped being a python faggot and I'm also learning about search and sorting algorithms, the thing is, do I really need to learn most of them? Won't I be able to do everything I need with just quick/selection sort and sequential/binary search?
>>
https://github.com/orangeduck/CPP_COMPLETE
Oh no.
>>
>>56911069
>do I really need to learn most of them
They're good as a learning tool so that you can understand algorithms better, but you probably don't need to know the details of most of them.
>>
>>56910950
do you have first class channels and coroutines in C++?
>>
>>56911069
>do I really need to learn most of them
The point of learning data structures and analyzing algorithms isn't so that you can use them.

Analysis of Data Structures and Algorithms is designed to build a foundation for you as a programmer. It's supposed to teach you critical thinking skills, and strategies on how to think as a programmer.

In a sophomore or junior DS&A class, you'll learn about various data structures and algorithms that humanity has developed that are VERY good at solving problems that we have.
Namely, they're things like Min-Max heaps, Quicksort (and the reason it's better than Merge Sort), dynamic programming (0-1 Knapsack, Fractional Knapsack), graph theory, and balanced trees.

In a senior DS&A class, you'll learn strategies for producing solutions to instances of intractable and NP-complete problems. These are problems that humanity cannot solve in polynomial time (but we have to anyway), so we create algorithms that produce solutions that may or may not be perfect, but are usually good enough for our purposes.

For any programmer that is not a street shitter, these will be the types of problems you will solve in the workplace. And yeah, I implied that most programmers are indeed street shitters.
>>
Hola senoritas
pls r8
def count_letters(strng, char, countrepeat = False) :
count = 0
part = strng
if countrepeat == False and strng.find(char) != -1 :
return 1
while countrepeat == True and part.find(char) != -1 :
if char == "" :
return "Infinite"
count += 1
part = part[part.find(char)+1:]
return count
>>
Friendly reminder that if you don't SIMD-ize your code, you're a shit programmer.
>>
>>56911657
Aside from boring math shit like matrix multiplication, what else is SIMDizable?
>>
>>56911679
Branches can be SIMDized with masks. Considering most programs just iterate through, copy to and from, and then branch on arrays, the overwhelming majority of non-IO code can be SIMDized.
>>
I need to use an java applet (This is really important) but fucking java won't let me run it eventhough I have already given the security exceptions to that site
>>
i got so fat :/
>>
>>56911791
and ate so muuuuuuuuuch
>>
File: ispc.png (556KB, 1154x599px) Image search: [Google]
ispc.png
556KB, 1154x599px
>>56911657
Reminder that if you are hand optimizing your code instead of using ISPC, you might be retarded.

https://www.youtube.com/watch?v=UgaQCg-0ZoU
>>
File: 1457118882320-2.png (57KB, 200x191px) Image search: [Google]
1457118882320-2.png
57KB, 200x191px
>imperative programming
>>
PLS HELP ME

HOW DA FUG DO I DISPLAY JUST THE WIDTH AND JUST THE HEIGHT!!!?!?!?

 public class Rectangles {

double width = 1;
double height = 1;

public static void main(String[] args)
{
// create 2 rectangle objects
Rectangles rectangle1 = new Rectangles(4, 40);
Rectangles rectangle2 = new Rectangles(3.5, 35.9);

// displays rectangle information
System.out.println("The width of the first triangle is: " + rectangle1);


}

// no arg constructor that creates a default rectangle object
Rectangles()
{

}

// constructor used to create rectangle with specified height & width.
Rectangles(double newWidth, double newHeight)
{
width = newWidth;
height = newHeight;
}

double getArea()
{
return width * height;
}

double getPerimeter()
{
return (width *2) + (height *2);
}

double getDiagonal()
{
return (width * width) + (height * height);
}
}

>>
>>56911949
>t. functional cuck
>>
File: hiro.jpg (9KB, 200x200px) Image search: [Google]
hiro.jpg
9KB, 200x200px
>>56911971
Who Are You Quoting?
>>
>>56911968
rectangle1.width
rectangle1.height
>>
>>56911968
Did you not learn about accessing class members?
>>
File: gooby.png (191KB, 812x716px) Image search: [Google]
gooby.png
191KB, 812x716px
>>56911999
U R THE KAWAIIEST DUDE, TRIPS CONFIRMS

>>56912002
I learned now
>>
>using pOOP in the current year
>>
>>56912023
OOPs I DID IT AGAIN
>>
public class Rectangles {

double width = 1;
double height = 1;

public static void main(String[] args)
{
// create 2 rectangle objects
Rectangles rectangle1 = new Rectangles(4, 40);
Rectangles rectangle2 = new Rectangles(3.5, 35.9);

// displays rectangle information
System.out.println("The width of the first rectangle is: " + rectangle1.width);
System.out.println("The height of the first rectangle is: " + rectangle1.height);
System.out.println("The area of the first rectangle is: " + rectangle1.getArea());
System.out.println("The perimeter of the first rectangle is: " + rectangle1.getPerimeter());
System.out.println("The diagonal value of the first rectangle is: " + rectangle1.getDiagonal());
System.out.println();
System.out.println("The width of the second rectangle is: " + rectangle2.width);
System.out.println("The height of the second rectangle is: " + rectangle2.height);
System.out.println("The area of the second rectangle is: " + rectangle2.getArea());
System.out.println("The perimeter of the second rectangle is: " + rectangle2.getPerimeter());
System.out.println("The diagonal value of the second rectangle is: " + rectangle2.getDiagonal());



}

// no arg constructor that creates a default rectangle object
Rectangles()
{

}

// constructor used to create rectangle with specified height & width.
Rectangles(double newWidth, double newHeight)
{
width = newWidth;
height = newHeight;
}


// various methods used to get area, perimeter, and diagonal value.
double getArea()
{
return width * height;
}

double getPerimeter()
{
return (width *2) + (height *2);
}

double getDiagonal()
{
return (width * width) + (height * height);
}
}



Any wew lad can review my code and offer suggestions to make it neater/ efficient?
>>
>>56912023
underrated post
>>
>>56911643
es dat rinuby
>>
>>56912062
public void printRectangle(Rectangles r) {
// ???
}

main ...
rect1 ...
rect2 ...
printRectangle(rectangle1);
printRectangle(rectangle2);
>>
>>56912062
Look up toString() methods
>>
>>56911590
Well I think I should have specified a bit more my first question, what I meant to ask is if I really need to learn them now, because while I used some of them for a long time I feel like I should spend at least a week to learn them and I'd probably just forget some of them after not using them for another week, I feel like trying to learn 5 different sorting algorithms is slowing me about learning more about the C language itself. Should I just move one with the algorithms I know and come back to learning the other ones some months later or should I really learn them now, I don't think I need them for the kind of stuff I'm currently programming and I don't have in mind to work as a programmer for the next 4 years so I think I'll have time to learn more about algorithms.
>>
Can someone post those hilarious programming textbook cover edits?
>>
>>56912062
public static void Main(string[] args)
{
Rectangle rectangle1 = new Rectangle(4, 40);
Rectangle rectangle2 = new Rectangle(3.5, 35.9);

Rectangle[] rectangles = new Rectangle[]
{
new Rectangle(4, 40),
new Rectangle(3.5, 35.9)
};

for (int rectangle = 0; rectangle < rectangles.Length; rectangle++)
{
Console.WriteLine(String.Format("The width of rectangle {0} is: {1}", rectangle, rectangles[rectangle].Width));
Console.WriteLine(String.Format("The height of rectangle {0} is: {1}", rectangle, rectangles[rectangle].Height));
Console.WriteLine(String.Format("The area of rectangle {0} is: {1}", rectangle, rectangles[rectangle].GetArea()));
Console.WriteLine(String.Format("The perimeter of rectangle {0} is: {1}", rectangle, rectangles[rectangle].GetPerimeter()));
Console.WriteLine(String.Format("The diagonal value of rectangle {0} is: {1}", rectangle, rectangles[rectangle].GetDiagonal()));
}
Console.ReadLine();
}
public class Rectangle
{
public double Width { get; private set; }
public double Height { get; private set; }
public Rectangle(double width, double height)
{
this.Width = width;
this.Height = height;
}
public double GetArea()
{
return this.Width * this.Height;
}
public double GetPerimeter()
{
return (this.Width + this.Height) *2;
}
public double GetDiagonal()
{
return Math.Pow(this.Width, 2D) + Math.Pow(this.Height, 2D);
}
}


Superior language of C#
>>
>>56912229
>no toString()
Sad!
>>
>>56912273
>needing ToString() when you have String.Format
>>
>>56912281
You can still use String.Format inside toString() you fool. If you're going to use OOP, you mind as well use all its features
>>
File: deriving show.png (4KB, 678x72px) Image search: [Google]
deriving show.png
4KB, 678x72px
>>56912229
data Rectangle = Rectangle {
width :: Double, height :: Double,
area :: Double,
perimeter :: Double,
diagonal :: Double
}
deriving (Show)
-- do not export Rectangle constructor
rectangle w h = Rectangle w h (w * h) (w + w + h + h) (sqrt (w^2 + h^2))
>>
>>56912299
>explicitly using ToString when String.Format already handles that
Unless you're being autistic about the number of decimals returned, you have no excuse to do this
>>
>>56912315
Enjoy your toy language
>>
>>56912326
I am enjoying it
>>
>>56905173
Which both are about to be replaced by vulkan so have fun developing on a closed platform
>>
File: 1437981896796.jpg (85KB, 749x720px) Image search: [Google]
1437981896796.jpg
85KB, 749x720px
>>56912330
>>
>>56912316
String.Format doesn't do what toString does at all, what the hell are you high on?
>>
>>56912383
Are you retarded? Please give code snippet showing what you're on about
>>
>>56910518
I bought wincuck10 because my bootmgr busted and I couldn't find my live usb ( also no friends and pc cafe doesn't allow downloads ) and l downloaded VS because why not.

45 FUCKING GIGS
>>
>>56912333
Vulcan was a mistake
>>
>>56904235
He looks like Woody harrelson and Matthew mconaheys grandchild sent back from the future old as fuck
>>
>>56910518
Ignore this faggot. You keep talking like a retard. Keep it fun for as long as you can. Once the steel starts to get tempered, these guys disappear and all that are left are the ones that know how to have fun with it.
>>
>>56912455
https://www.youtube.com/watch?v=06x8Wf2r2Mc
>>
>>56904538
vim of course
>>
>>56904538

vim, with plugins and extensions to hell and back.
>>
>>56904693
seconding beejs guide, recently read it and managed to make a small multiplayer game thanks to it
>>
>>56904548
>>56904559
>>56904612
>>56904646
>>56906194
>>56908001
>>56910320
>>56912504
>>56912522
>no emacs

Sure is /reddit/ here tonight.
>>
>>56912435
I can't even fathom what they could include which takes up that much space.
Is that the effect of Meme++'s object code bloat?
>>
>>56912559
>I can't even fathom what they could include which takes up that much space.
iostream is probably at least 40 GB
>>
>>56904235

>Working on?

Working on a site that captures Youtube channels and videos and displays them in an easy to use manner, sortable by country, gender and tags, i.e. Youtube without the slop.
>>
>>56912546
I'm pretty sure atom and sublime are the redditor's go to text editors.
>>
New thread:
>>56912619
>>56912619
>>56912619
>>
>>56904612
but vi is short for visual editor...
>>
>>56906669
template <typename T>
T get_minimum(const T *arr)
{
if (!arr)
return T{};

T min = arr[0];
for (int i = 1; i < sizeof(arr) / sizeof(T); ++i) {
if (arr[i] < min) {
min = arr[i];
}
}

return min;
}
>>
File: c8b.jpg (104KB, 600x600px) Image search: [Google]
c8b.jpg
104KB, 600x600px
does anyone have a gimp extension that simulates image degrade from screenshotting/cropping instagram pictures over and over again? pic related
Thread posts: 316
Thread images: 28


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