[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vr / w / wg] [i / ic] [r9k] [s4s] [vip] [cm / hm / lgbt / y] [3 / aco / adv / an / asp / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / qst / sci / soc / sp / tg / toy / trv / tv / vp / wsg / wsr / x] [Settings] [Home]
Board
Settings Home
/g/ - Technology



Thread archived.
You cannot reply anymore.



What are you working on, /g/?

Old thread: >>62409722
>>
can a java conniseur please post the most minimal fork/join program to show me how it works? i can't tell what is what in the documentation examples. there's so much java boilerplate and idk what's from something it's important and unrelated to demonstrating fork/join, and what's relevant.
>>
Unemployed Haskell programmer here
>>
first for go is fast
>>
How to make if statements inside if statements?
>>>Python 3.6.1
def ragequit():
print("Opinion discarded.")
print("R"+"E"*69+"!!!")
quit()
def start():
meme = input("Do you like memes?: ")
if meme == "y"or"yes"or"sure"or"yea"or"yeah":
pepe = input("You you like Pepe the frog?: ")
if pepe == "y"or"yes"or"sure"or"yea"or"yeah":
print("You're cool.")
elif pepe == "n"or"no"or"nah"or"na":
ragequit()
else:
print("What?")
elif meme == "n"or"no"or"nah"or"na":
ragequit()
while 1:
start()
>>
>>62418634
No surprise there
>>
>>62418641
How fast are we talking? Can it beat rust?
>>
>>62418652
Rust is not a benchmark of speed m8.
even gc'd languages beat it.
>>
>>62418610
Crosspost from >>62417800

Find me a better, more extensible fizzbuzz than:

(: fizzbuzz (fixnum (list-of (list fixnum symbol)) -> noreturn))
(define (fizzbuzz limit conds)
(for-each (lambda (n)
(let ((unfizzed? (foldl (lambda (acc x)
(if (= 0 (modulo n (car x)))
(begin (display (cadr x))
#f)
acc))
#t
conds)))
(if unfizzed?
(display n)))
(newline))
(iota limit 1)))

You can't.

#;> (fizzbuzz 21 '((3 fizz)(5 buzz)(7 bob)))
1
2
fizz
4
buzz
fizz
bob
8
fizz
buzz
11
fizz
13
bob
fizzbuzz
16
17
fizz
19
buzz
fizzbob
>>
>>62418643
Your doing it the right way. Might need to do: if x == 1 or x ==2, instead of just a long chain, not 100% sure though
>>
>>62418660
but if you compare go to actually fast languages, it loses
>>
>>62418643
maybe you should put all those yeas and nos in a list faggot
>>
File: 1477934863588.png (216 KB, 1712x944)
216 KB
216 KB PNG
>>62418660
What did he mean by this?
>>
>>62418610
which one should i use to avoid the evil else statement?
for(;;)
{
if(cond1)
{
do_stuff();
break;
}
if(cond2)
{
do_other_stuff();
break;
}
.
.
.
}

or
if(cond1)
{
do_stuff();
goto end;
}
if(cond2)
{
do_other_stuff();
goto end;
}
.
.
.
label: end;
>>
>>62418643
>if pepe == "y" or "yes" or "ya" or...
Why not
>if pepe(0) == "y"
???
>>
>>62418610
Go away faggot.
>>
>>62418660
Answer the question
>>
>>62418673
Don't yell at me I just started python yesterday.
>>
>>62418691
if else isnt evil
if, else if, else is
>>
Anyone know if MASM is free to download? If not, what's a good x86 assembler?
>>
>>62418643
regexps are always the answer

import re

yes_re = re.compile('y(es|eah?)?|sure')
no_re = re.compile('n(o|ah?)?')

def start():
meme = input("Do you like memes?: ")
if yes_re.fullmatch(meme):
pepe = input("You you like Pepe the frog?: ")
if yes_re.fullmatch(pepe):
print("You're cool.")
elif no_re.fullmatch(pepe):
ragequit()
else:
print("What?")
else:
ragequit()
>>
>>62418791
nasm
>>
Will waterfox work on my 32 bit system, or do I need 64 bit?
>>
>>62418643
affirmative = ["y","yes"]
if meme in affirmative:
print ('faggot')


also i think
meme == 'a' or meme == 'b' is the right syntax
>>
File: 768px-LLVM_Logo.svg.png (187 KB, 768x578)
187 KB
187 KB PNG
Used emscripten for the first time this week to evaluate if a work project could be supported in a web browser. The project is an audio signal processing library mostly written by me in C++ (and a bit of C).

That shit is magic. Dropped in a cmake toolchain file, wrote up a quick interface using embind, and everything pretty much just worked. I almost like javascript now that I know I can deploy this way.
>>
>>62418817
Thx anon!
import re

yes_re = re.compile('y(es|eah|a|ea|e|ee?)?|sure')
no_re = re.compile('n(o|ah|a?)?')
def ragequit():
print("Opinion discarded.")
print("R"+"E"*69+"!!!")
quit()
def start():
meme = input("Do you like memes?: ")
if yes_re.fullmatch(meme):
pepe = input("You you like Pepe the frog?: ")
if yes_re.fullmatch(pepe):
print("You're cool.")
elif no_re.fullmatch(pepe):
ragequit()
else:
print("What?")
else:
ragequit()
start()
>>
File: nene c++.jpg (155 KB, 1440x810)
155 KB
155 KB JPG
How do you feel about higher order conditional statements?

char *get_filebuffer(const char *path, const char *mode)
{
FILE *fp;
if (!(fp = ((!strcmp(path, "-")) ? stdin : fopen(path, mode))))
return NULL;
fseek(fp, 0, SEEK_END);
unsigned len = ftell(fp);
fseek(fp, 0, SEEK_SET);
char *buf = malloc(sizeof(char) * len + 1);
fread(buf, len, 1, fp);
fclose(fp);
return buf[len] = '\0', buf;
}
>>
File: 1504291993085.jpg (51 KB, 600x517)
51 KB
51 KB JPG
>>62418610
>*ptr
>*&ptr
>&*ptr
>**ptr
>**ptr + 3
>*(*ptr)
>*(ptr) + 3
>*(*(ptr + 3) + 3)
WHAT THE FUCK IS THIS SHIT HOW DO YOU EVEN WRAP YOUR GOD DAMN MINDS AROUND THIS SHIT
AAAAAAAAAAAAAAAAAAAAAAAAAAA
>>
>>62419201
It's one of those things where the longer you spend writing C, the more it makes sense, even when they're stupidly clever pointer showboating
>>
>>62419201
There's a tutorial in the OP.
>>
>>62419201
better than java
>>
Is it possible for an embedded language to call it's parent language? Or is this an obvious paradox and I need a dll/so.
>>
File: 1485652958941.jpg (131 KB, 591x800)
131 KB
131 KB JPG
Have you loved Lain today, /dpt/?
>>
>>62418610
My Python isn't returning floats as a result of a division by default. What should I do to get those floats?
>>
File: not my fault.jpg (54 KB, 443x806)
54 KB
54 KB JPG
>>62413830
How would I go about passing parameters to components, then? I inevitably have to check if they're null. At the very least I'd like it if the program didn't segfault and instead did nothing, modified nothing, and maybe complained I'm trying to access something that doesn't exist. All solutions I can think of inevitably take more than one line of code every time I want to modify a single parameter of a component, and that's just cumbersome.
>>
I've done Project Euler problems 1 to 200. You are all little brainlet babbies compared to me. I can see all possible realities at once, and it's terrifying me.
>>
>>62419759
project euler problems are so boring, 99% of them have nothing to do with practical software problems you would ever see in real life
>>
>>62418691
Switch statement
>>
>>62419351
Cast one thing as a float
>>
>>62418610
Does anyone have any good openGL books/pdfs? I'm trying to learn lwjgl but find the lack of documentation overwhelming.
>>
>>62419351
make sure you're using / and not //
>>
>>62419779
That's not true, you'll find most math problems in software somewhere. They are really boring math based projects though.
>>
>>62420083
opengl is such a load of shit, even the officially published blue and red books are garbage, and at best supplemented by random opengl tutorials online

and don't forget libglew because gl is such a pile of shit most graphics drivers only support GL 1.1 functions unless you LITERALLY beg your kernel for the function pointer locations to all the newer GL VBO/VAO functions like like glGenBuffers and glBufferData.
>>
>>62420136
Would it be better to learn Vulcan? OpenGL seems like the only option here.
>>
>>62420163
is vulcan even supported on older hardwar?
opengl is going to be around for a long long time, and the lowest version number that supports the modern GL workflow is supported on machines that date back to 2006, so you're fine.
>>
what are programs/problems that i can do to practice programming? i wanna make something but have no ideas or the little ideas i have are achievable with my current skill set
>>
>>62420261
not achievable i meant
>>
>>62419457
Forget it, I just figured out an even better way. All I had to do was add, inside "effect":
if (this == nullptr) return;


Can someone explain to me why this works even when the object is null? I'm assuming it's because the method is independent from the class, and that it always takes itself as a sort of implicit parameter like in python. So object.effect->makeBlue() is just something like makeBlue(object.effect).
>>
>>62419036
Use the <filesystem> module
>>
>>62420275
Go for a classic. Maze generation and representation can be done a ton of different ways.
>>
>>62420163
>Would it be better to learn Vulcan?
Not as a beginner. Really any major developers will abstract a lot on top of vulkan. That's the only way it's actually usable I don't think you're experienced enough to try that.
>>
>>62420389
vulkan isnt that bad, its just tedious.
t. someone whos never touched OGL
>>
>>62420282
thats undefined behavior.
compilers assume this is always nonnull and may optimize that check out.

% cat /tmp/test.cc;
#include <iostream>
struct foo {
void bar() {
if (this == nullptr) std::cout << "is null\n";
else std::cout << "is not null\n";
}
};
int main() {
foo *f = nullptr;
f->bar();
}
% g++ /tmp/test.cc -o /tmp/test; /tmp/test
is null
% g++ -O3 /tmp/test.cc -o /tmp/test; /tmp/test
is not null
>>
File: react.png (36 KB, 634x490)
36 KB
36 KB PNG
Are you ready, /dpt/?
>>
>>62420261
>or the little ideas i have are not achievable with my current skill set
How do you know you couldn't achieve things?
How would we be able to recommend you things without knowing what you know?
If you're only supposed to do projects using what you know you won't learn. Focus on using something you don't know. Just remember to limit how much you need to learn. Getting a good estimate of how much you can learn is also good.
>>62420414
>vulkan isnt that bad, its just tedious.
Yeah that's what I said. As a graphics API it's pretty bad though. It's more of a graphics card API than a graphics API. Being convenient was never the intent obviously, so it'd be difficult to call it bad because it doesn't fit what you might want out of it.
>>
>>62420422
Then how should I ideally get past this? I thought I had hit a good solution, but alas, I'm back to the drawing board.
>>
>>62418691
what is the "evil else"?
>>
>>62420428
>average salary
Nice. Didn't even do a median. That's how you know they're wankers.
>>
>>62418692
why not yes = ['y', 'yes', 'ya']
if pepe in yes

?
>>
>>62420428
HOLY FUCK
>>
>>62420428
>use this web course and make $105k a year!
seems legit
>>
>>62420428
Tbqh I'm thinking of getting into JS and webdev just for fun, but (from https://facebook.github.io/react/):
handleSubmit(e) {
e.preventDefault();
var newItem = {
text: this.state.text,
id: Date.now()
};
if(this.state.text==""){
return //avoids inputting empty todos.
}
this.setState((prevState) => ({
items: prevState.items.concat(newItem),
text: ''
}));
}

This just looks awful. No fun.
>}));
This kind of shit would annoy me to no end.
>>
>>62419351
If you're using python 2 import division from future
>>
>>62420535
>>}));
>This kind of shit would annoy me to no end.
but lisp is beautiful and perfect, right?
>>
>>62420453
in c++17 you can use
std::launder(this)
from
<new>
to avoid it getting optimized out.
though your not supposed to use it for that. you can write your own version easily if you cant use c++17 too.


another way is described in the first few chapters of this.
http://www.dataorienteddesign.com/dodmain/

basically instead of putting nullable effects in your objects,
have a container of
struct {object*, effect*};
which you can safely iterate over without checking nulls.
or something like that.

std::launder is easier though if you dont want to change too much though
>>
>>62420600
>}
youre going to awaken them
>>
>>62420600
>but lisp is beautiful and perfect, right?
No lisp is awful to read too.
>>
What does it imply when a function is deprectated? I understand the idea of "don't use this". But what's the general process here that library authors apply?
Deleted next major revision? What can I expect usually.
>>
>>62421546
I depends on the library.
>>
>>62421561
Yeah. I understand. But I'm asking for someone experienced to give their input.
>>
test
>>
>>62421587
You already seem to have the right idea, though.
It depends on what the libraries goals for backwards compatibility are.
You may have a library which uses semantic versioning, and all functions will be kept until at least the next major version.
You may also have libraries that ALWAYS want to be backwards compatible (e.g. some standard libraries), and will never remove a function; they'll only tell people to stop using it.
>>
>>62421546
>What can I expect usually.
that you shouldnt rely on it being there when you update the library.
though it depends on the library,
some libraries keep depreciated stuff around forever, some remove them as soon as possible, and others inbetween.

from semver.org
>How should I handle deprecating functionality?

>Deprecating existing functionality is a normal part of software development and is often required to make forward progress. When you deprecate part of your public API, you should do two things: (1) update your documentation to let users know about the change, (2) issue a new minor release with the deprecation in place. Before you completely remove the functionality in a new major release there should be at least one minor release that contains the deprecation so that users can smoothly transition to the new API.
>>
>>62418660
desu don't understand this
the golang GC is trash and rust is roughly the same speed as C++
>>
>>62421645
>>62421623
Thanks. That's kinda what I was looking for.
>>
>>62419020
LLVM is fucking sexy
>>
>>62419026
Make sure you add .lower() to the input, or else
IGNORECASE
on the regex. I can break your script by entering a capital Y
>>
>>62418610
This is Ruby. Can someone explain to me what this is doing? I would specifically like to know if there is an array of strings being stored and what the variable name for it is.
File.open("test.txt", "r") do |f|
f.readlines.each { |line| puts line }
end
>>
>>62421766
here is the Haskell equivalent if that helps

readFile "test.txt" >>= mapM_ putStr . lines
>>
>>62421766
looks like its just printing each line.
>>
>>62421766
>>62421795
oh, it should be (putStrLn) if (puts) is line terminated
>>
>>62421795
>>62421796
>>62421809
Alright thanks, I thought there was an array somewhere here but I think it's just readlines that returns an array of all the strings read.
>>
>when I want to print arguments in succession I must explicitly specify end="", sep="" in Python 3
Why is this allowed?
>>
File: 1499889391783.png (463 KB, 640x427)
463 KB
463 KB PNG
>>62418610
Do I just throw the error code returned by a function like:
int rv = foo();
if (!rv)
throw rv;

Or do I just do:
throw foo();


New to C++ pls lend assistance.
>>
>>62422032

Why the fuck are you throwing integers?
>>
>>62422032
You will always throw in the latter example. Still, you shouldn't throw error codes. If you need to use exceptions its better to make you own exception class to allow catching by exception types. Error codes are usually returned from functions.
>>
>>62422061
What should I throw?
>>
File: 9FriWJV.jpg (72 KB, 768x1024)
72 KB
72 KB JPG
Longtime sepples faggot here. What's a good book on pyt*on?
>>
>>62422090
Nothing. Both exceptions and C++ were mistakes.
>>
>>62419201
dereference pointer
dereference address of pointer
address of dereference of pointer
dereference of dereference of pointer
dereference of dereference of pointer plus 3 (if it's another address ie ptr is ***something then 3 bytes after the final pointee)
dereference of dereference of pointer again
dereference of pointer (if ptr is ** or more indirected 3 bytes after the address pointed to by ptr*0
take ptr, add 3, dereference this address, add 3 bytes to the result, then dereference that as an address
erally, it all makes sense when you look at it logically
>>
>>62422032
throw isn't valid C, if you have to write C++ you should always strive to write C code
>>
can anyone hook me up with some junior level work with blockchain?
>>
>>62422130
He's just starting and you're already trying to get him into your sect.

But you are kind of right, I feel you have to learn C before C++, otherwise half of sepple's features would seem like magic and not something you can reason about.
>>
>>62422138
>with blockchain
What do you want to do?
>>
>>62422073
So what is actually happening when you do throw foo()? is it throwing the return value? And if that's the case won't it throw regardless of whether foo failed or not?
>>
>>62420261
write a compiler
>>
>>62422202

write smart contracts, perhaps trading software?

Work on an actual blockchain would be brilliant but that requires a lot of knowledge and experience.

More than willing to learn but I need food on the table stat.
>>
File: 1488666761520.png (1.07 MB, 1280x720)
1.07 MB
1.07 MB PNG
char *temp = (char*)malloc(sizeof(char)*BUFFER_SIZE)

Why is this bad practice?
>>
>>62422240
>smart contracts
they're quite easy to write, the thing is that any bugs will fuck shit up so you have to be careful
>trading software
extremely hard to write, any fuckups will be even worse than with smart contracts since you'll actively lose money not just get it vulnerable
>Work on an actual blockchain would be brilliant but that requires a lot of knowledge and experience.
nah you can contribute to your latest meme currency, you don't have to come up with a brand new algorithm or anything just do some optimization work or write unit tests or whatever
>I need food on the table stat.
Isn't it better to just learn "regular" programming then?
>>
>>62418675
So GCC is the fastest language?
>>
>>62422194
I do know C tho.
>>
>>62419201
>>*ptr
retrieve the value from memory; its address is the value of ptr
>>*&ptr
same thing as just writing ptr
>>&*ptr
same thing as just writing ptr (but only if ptr is a pointer; an error otherwise)
>>**ptr
retrieve the value from memory; its address is stored somewhere else in memory; the place where it is stored is the value of ptr
>>**ptr + 3
same, but add 3 to the final value
>>*(*ptr)
same as **ptr
>>*(ptr) + 3
retrieve the value from memory; its address is the value of ptr; add 3 to that value
>>*(*(ptr + 3) + 3)
This one is more difficult.
ptr is an array of pointers
Each of those pointer points to a place in memory where another array of pointers resides.
This takes 4th pointer from the array that was mentioned first, finds the array referenced by that pointer, takes 4th pointer from that array, and retrieves the value from address in memory specified by that pointer.
>>
>>62422122
>add 3 bytes to the result
That's where you are mistaken kiddo.
>>
>>62422252
>(char*)
This cast is completely pointless and violates the DRY principle.
>sizeof(char)
This is guaranteed to be 1, therefore it is pointless and just clutters up the code.
It's also better to do sizeof in terms of a variable, not a type.

Also, traps are severely mentally ill, and you should not encourage such damaging activities.
>>
>>62422409
>>This cast is completely pointless
If that code is C++, then it won't compile otherwise.
>>
>>62422090

If you must throw something, throw an exception. That's what they were designed for.

But ideally, don't. Exceptions are for exceptional circumstances.
>>
>>62422339
>*(*(ptr + 3) + 3)
say ptr is 0x00da0da0
it dereferences 0x00da0da3
say this is 0x00dde264
it then dereferences 0x00dde267 which is the final result of the expression
>>
>>62422422
You are wrong in assumption that ptr+3 increases the pointer value by 3. if ptr is a pointer to a 4-byte int, then ptr+3 would increase the pointer value by 12, not 3.
>>
>>62422417
>If that code is C++, then it won't compile otherwise.
Why the fuck would you write C++? That's just stupid.
>>
>>62422442
Assume it's a void pointer :^)
>>
>>62422446
I think we live in different worlds. Sorry, I can't give advice to you.
>>
>>62422204
Yes, it will always throw the return value of foo, whatever it returned. When you throw, a program starts unwinding stack until it reaches an execution context that can handle the exception type.
>>
>>62422450
Fascinating. It won't compile then at all. Arithmetic operations can't be used on void pointers.
>>
>>62422469
that's where you're wrong kiddo
~> cat test.c 
#include <stdlib.h>
#include <stdio.h>
int main() {
int i = 100;
void* ptr;
ptr = (void*)&i;
printf("%X\n", ptr+3);
printf("%X\n", ptr);
}
~> gcc -std=c11 ./test.c
~> ./a.out
11669CC7
11669CC4
~>
>>
>>62422518
That's a GNU extension, where they define sizeof(void) to be 1.
sizeof(void) is not standard C.
>>
>>62422518
That's GCC extension, not C not C++.
>>
>>62422539
>>62422557
>-std=c11
~> gcc -std=
c++03 c++11 c89 c++98 gnu++03 gnu++11 gnu89 gnu++98
c11 c++1y c90 c99 gnu11 gnu++1y gnu90 gnu99
>>
How do I implement foldM in Javascript for lists?
foldM (\acc xs -> xs >>= \x -> return $ acc ++ [x]) [] [[1, 2], [3, 4], [5, 6]]
// => [[1,3,5],[1,3,6],[1,4,5],[1,4,6],[2,3,5],[2,3,6],[2,4,5],[2,4,6]]
>>
>>62422571
$ gcc test.c -std=c11 -Wpedantic
test.c: In function ‘main’:
test.c:7:23: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
printf("%X\n", ptr+3);
^
>>
>>62422576
>>>/wdg/
>>62422583
>warning
>>
>>62422589
>>warning
Damn, you're fucking stupid.
>>
>>62422571
-std=c11 does not mean much. Arithmetic on pointer to void is a GCC extension, not a part of language, and no amount of compiler flags you show will change that.
>>
>>62422589
>implying /wdg/ knows haskell
>>
>>62422602
use bitwise operations, mask, for loop, and shifting
or just do like a real webdev and use ghcjs, haste, whatever
>>
Why do people hate JS? It's one of the best languages ever created after Perl, it's almost perfect. Why do they have to ruin it with frameworks?
>>
How the fuck do I get Visual Studio 2017 Enterprise to just fucking create a project with one fucking cpp file that will properly compile for FUCK'S SAKE
>>
>>62422576
foldlM f z0 xs = foldr f' return xs z0
where f' x k z = f z x >>= k


now implement foldr, return, >>=
>>
>>62422683
install mingw
>>
Why are there so many trap programmers? The programming socks meme has to originate from somewhere, and they're clearly overrepresented, there are probably even more girls(male) than girls(female) if you discount pajeet-level programming jobs and Asia.
>>
>write some basic python code (native language for this project)
>takes 28 seconds
>don't see any reason for it, it's trivial
>rewrite in C
>6 milliseconds
I guess I'll have to use CFFI now. I'm a bit disappointed in the 4500x slowdown.
>>
>>62422683
Buy, and use the freshly released Sublime 3™
It just works
t. definitely not a shl
>>
>>62422683
>How the fuck do I get Visual Studio 2017 Enterprise to just fucking create a project with one fucking cpp file that will properly compile for FUCK'S SAKE
I've only used 2012 a long time ago but I used to open an empty project, create a cpp file and press the little green arrow button. Nothing else needed.
>>
>>62422752
This is either a lie or you're not a very good python programmer.
>>
>>62422772
>good python programmer.
good training wheels bike racer
>>
>>62422765
Oh, nifty. I have to go down to fucking "source files" or whatever and then add an existing item, but that's good enough for me. Thanks.
>>
>>62422772
Nah, I think he just didn't bother optimizing the python version before switching to C, where he actually tried to optimize stuff since it was a rewrite.
>>
>>62422814
And then he for some reason made a post trying to present python as 4500 times slower for the same program. I'll go with the first option, lie.
>>
does Rust hate templates?
>>
>>62422752
>code thread
>doesn't post code
reported, hidden, ddos'd
>>
>>62422772
>a lie
How so? It's not that odd, 4500 is not that far off from other situations it's just that I needed it to run faster here. Granted I'm not writing this code with performance intent in python or C. I didn't expect any issues. What I'm doing in C is just your basic shit, didn't pull out the intrinsics.
>>62422814
Yeah.
>where he tried to optimize stuff
No. I arguably don't write good python by python programmer measures. I use lists a lot, I iterate over them a lot. I don't know what you mean by optimizing python. I haven't changed algoirthm.
>>62422854
Can't post. Sorry. It'd be very irresponsible.
>code thread
Anon /dpt/ is a PROGRAMMING thread.
>>
>>62422839
Rust doesn't need templates.
>>
>>62422839
Rust has trait-based generics, which are just constrained templates
>>
>>62422865
>How so
The performance difference between C and Python is somewhere along the lines of two magnitudes smaller than 4500. I have a hard time believing that the same algorithm in python is going to be 4500 times slower.
>>
>>62422873
Generics and templates have different properties
>>
Are there any applications to automatically DoS chink bruteforcers in a way that doesn't take many resources, like zipbombs? SSH supports compression.
>>
>>62422889
>The performance difference between C and Python is somewhere along the lines of two magnitudes smaller than 4500.
I assume this is measured in benchmarks with optimized code for both cases like benchmarksgame?
Those aren't all that accurate to real world situations. I imagine there's something in here that can be known at compile time that'd be computed every time in python.
In my measurements it hasn't been that far off. I've had programs run 1000 times slower. This is probably a record for me though.
I don't think python is a bad language if you thought I meant that. It's just odd to me how no effort gets you so far in C in terms of performance. The differences between the code is minor. I copied it in and translated line by line.
>>
>>62422942
Would you like to post the code?
>>
>>62422948
See >>62422865
I'm paid to write this. I can't post it. It's just not a good idea, might even get sued.
>>
>>62418630
>Java
>connoisseur
Contradiction in terms
>>
>>62422957
I think I'll write something rather simple to test it myself and post results sometime later.
>>
>>62422962
>I think I'll write something rather simple to test it myself and post results sometime later.
It'd be wiser to just rip something out of a Python program and profile it. If you didn't just want to make another benchmarksgame example.
>>
>>62422970
How would I write an equivalent C program if I rip something complex from an existing python program?
>>
>>62422983
Well you'd go look for a part where the program actually makes a lot of actual computations, which overall might be rare in python as it's usually not used for that.
If you're looking to mimic my results you're not looking to write equivalent C though. You're looking to write something the way you'd do it in python without performance concerns vs how you'd write it in C without performance concerns. That's what I did. I'm not gonna say it's easy to find good code to use though.
>>
>>62422752
What does code do?
>>
>>62423038
That's exactly what makes you a not very good python programmer. You write code without considerations for performance and it ends up being 4.5k times slower than your equivalent in C.
>>
>>62418610
Why the fucc can't you put a named element into Content in xaml, says shit about cant set property make cuz parent is of the same type
<CustomCtrl x:Name="name1">
<CustomCtrl x:Name="name2"/>
</CustomCtrl>
>>
>>62422571
What's the difference between c++1z and c++1y?
>>
>>62423087
one has a z and the other has a y
>>
>>62423087
c++0x == c++11
c++1y == c++14
c++1z == c++17
>>
>>62423060
>You write code without considerations for performance and it ends up being 4.5k times slower than your equivalent in C.
Anon I would never have expected it to be this slow. Why would I bother trying to fiddle with optimizing python code when I can just put it in C and call it? I've used the FFI before, it's very handy. So when I see it being 28seconds for something that should absolutely be below half a second to be anywhere close to OK I'm not gonna try to fix that in python.
But sure, I don't pride myself as an epic python hacker. And I don't think people should write python if they have to keep performance concerns in mind.
To be very clear I normally don't need to think about performance in Python because this company doesn't use it where we have these concerns. But 28 seconds is too much. This is not the expected runtime at all.
>>62423059
My code? It multiplies a bunch of points with a set of matrices and then does some decisions based on their relationship/grouping afterwards, basically.
>you should use xyz library because you're doing matrix multiplication
No we shouldn't.
We should not introduce an entire dependency for the project because we have one piece of code running slow. That's multiple meetings to go through. Bad idea.
>>
>>62423098
what is C++20?
>>
>>62423119
Here's the code I wrote.
It uses Buffon's Needle simulation it figure out the value of pi, 10000000 needle throws.
Yes, this simulation is not very meaningful because it uses the pi that's built-in into the language when doing sin, but it's doing actual verifiable computation work.

Python: https://pastebin.com/KGy8mvnN
C: https://pastebin.com/VrDqv9eY

$ time ./a.out
3.141545

real 0m0.995s
user 0m0.988s
sys 0m0.004s
$ time python pi.py
3.14137786802

real 0m4.193s
user 0m4.104s
sys 0m0.088s
$


5 times difference. Five. Not 4500.
>>
modding xcom 2... i don't like the c++ version used in this version of unrealengine.

cp: homes calle
>>
>>62423166
Use PyPy
>>
Looking for a C interpreter so I can use C like running a Python script in interactive mode and be able to access variables in main within the shell, printing them, modifying them etc.

Windows/bash on ubuntu on windows installation if possible.
>>
>>62421677
I just tried to use it today and it's a fucking nightmare to install. Modern versions actually require Visual Studio to even work in Windows. GCC via MinGW-w64 is way easier, drag n drop.
>>
>>62423133
c++2a: https://clang.llvm.org/cxx_status.html
>>
>>62423166
>Five. Not 4500.
Anon did you break or something? At no point did I say that python is 4500 times slower always. And you don't seem to have a grasp of any of the problems that may have caused this. Such as lacking compile time optimization in python where we do excessive amounts of runtime work for no gain.

Presenting this as a 'counterpoint' is dishonest.
But I have other shit to do now. Please stop with your biases.
>>
>>62423406
I'm showing to you why I have a hard time believing your 4500 times difference unless you are a bad python programmer.
>>
>>62420600
Lisp only has one kind of parentheses and no bullshit syntax.
>>
>>62418664
That looks absolutely disgusting, and I'm telling you that as a CL programmer.
>>
>>62420600
>but lisp is beautiful and perfect, right?
It serves a valid purpose in lisps and pays off. Your average curly brace language looks just as bad if not worse, and doesn't let you do a tenth of what you can do with a lisp.
>>
>>62423498
Not that guy.
Did you not read the discussion you guys just had? He told you the real world is different from toy examples and your response is a toy example?
You're probably just baiting.
>>
>>62420600
> ((()))
clear and consistent
> <<>>(){<>{}()<<{}>>()}
JESUS CHRIST WHO THE FUCK DESIGNED THIS SHIT
>>
>>62423586
You've been playing with toys for so long that everything looks like a toy to you. No, it's not a toy example.
>>
File: trap-programming-2.png (1.71 MB, 1058x1600)
1.71 MB
1.71 MB PNG
>>62422735
Because it feels as good as blending a baby.
>>
I started learning C# a few weeks ago and so far it's been quite pleasant to be honest. So far I've been using all kinds of online help (docs, specification, online courses, stackoverflow etc). But there obviously is no time to do this all the time if you actually have a job as a programmer.

How much stuff should a professional programmer actually have memorized? Let's use C# as an example. Are all the keywords enough? What about stuff mentioned here: https://opbuildstorageprod.blob.core.windows.net/output-pdf-files/en-us/VS.core-docs/live/csharp/language-reference.pdf ?

Also, if somebody could explain OP's picture it would be great.
>>
>>62423649
striped programming socks
green is my pepper
>>
>>62423649
You don't really need to memorize much and you have all the time to look up everything you want at work. Tchnology is changing too rapidly for employers to have expectation that you will have everything you need in your memory. As you use the language, remembering it will come naturally.

OP's picture is a dumb meme. Pay no heed. Some piece of shit is hell-bent on bringing his gender politics into /dpt/ and there's really not much that can be done except for ignoring.
>>
>>62423599
>What is #() in CL
>What is [], {}, #(), #{} in Clojure
>What is reader macros
Lisps have long been integrating different kinds of parentheses because even lispers have realized putting everything in () makes it unreadable.
>>
>>62423649
When you're using a language 12 hours a day, 4 days a week, believe me, you're going to remember your shit.
>>
>>62423601
Find an example on benchmarksgame that's less complicated than that.
You won't. It's clearly not a complex enough program to judge any real world performance by. It's not even exposing itself in the slightest because you're calling basic standard library functions which are not written in python.
Whatd at least be an attempt to being analogous would be to write your own rand, sin and acos in python/C and use those. Because that's what working in the language is like in the worst case.
I hope you're not too retarded to misunderstand this.
>>
>>62423698
>urironically trying to argue with a lisplet
they are a braindead wall m8.
>>
>>62423698
And yet you have to try hard to achieve anything near the disgusting levels of visual noise of the average curly brace language.
>>
>>62423698
Clojure is not lisp.
#() is just alias for make-vector.
With your shitty blub languages you have to use their shitty syntax, with common lisp you can opt to use only ().
Also reader macros are not used that much.
>>
>>62423527
How would you write it then?
>>
>>62423714
When you do math operations in python you do use library functions.
>>
>>62423732
Found the sepples nigger. Your jealously and resentment are delicious.
>>
>>62423744
>How would you write it then?
Exactly the same way you could in any other language, except using a cond instead of the ugly chain of ifs and saying "print" repeatedly.
>>
>>62423745
Do you really not understand what I'm saying? The point is that if your code is just library math functions as it is here it's not representative of production python code because the normal case in python code isn't that you're calling C code all the time.
And if anon had issues that could be solved by the FFI then his code was clearly the opposite of this.
>>
>>62423783
I'd like you to look over the code one more time. There are conditionals and branches. Not just calling library functions.
>>
To. 62423754
Please do not insult me by implying I use pajeet software.
>>
>>62423769
>Exactly the same way you could in any other language
Then you've missed the point.
If I wrote a straight up (cond) tree, then that would mean hardcoding the fizzbuzz conditions into the function definition. By folding across a user-defined list, it's easy to add new conditions at runtime. It also removes redundant conditions; since both the 3 and the 5 will be triggered in a complete fold, they will automatically display "fizzbuzz" without the need for a 15 case.
>>
Got a minor question.
I got two repo and I can only push to one of them.
The other one just refuses to work and says "repo not found"
>>
>>62422576
>>62422689
> foldM = f => z => (y => (f => f(f))(f => y(x => (f(f))(x))))(r => f => z => xs => xs.length ? r(f)(f(z, xs[0]))(xs.slice(1)) : z)((x, y) => [].concat(...x.map(p => f(p, y))))([z])
[Function: foldM]
> foldM((acc, xs) => [].concat(...xs.map(x => [[...acc, x]])))([])([[1, 2], [3, 4], [5, 6]])
[ [ 1, 3, 5 ],
[ 1, 3, 6 ],
[ 1, 4, 5 ],
[ 1, 4, 6 ],
[ 2, 3, 5 ],
[ 2, 3, 6 ],
[ 2, 4, 5 ],
[ 2, 4, 6 ] ]

flawless victory
>>
>>62420428
>$105k
>forgets to mention it's in cali
>>
>>62423741
I have to disagree. Praising a language for using only () is like praising Brainfuck for using only []+-. - the limited expressiveness of syntax (or total lack of syntax in case of Lisp) isn't a benefit in itself.
>>62423743
>Clojure is not lisp
Says who? It's definitely the most popular Lisp out there right now.
>Also reader macros are not used that much
But you always have to keep in mind they could be used. It's like C's macros by 10x times worse.
>>
>>62423804
>Then you've missed the point.
What is your point, exactly? That you're painfully autistic? I don't know what imaginary problem you were trying to solve there, but as a solution to fizzbuzz, it's disgusting.
>>
Anybody work with libtorrent before?

>>62423649
>Also, if somebody could explain OP's picture it would be great.
Lurk more, newfag.
>>
>>62423847
>Praising a language for using only ()
I wasn't praising it for only using parens. There are languages with even less visual noise, like Haskell. I was merely pointing out is that as far as visual noise goes, curly brace languages are definitely worse than lisps, and at least lisps have a justification for looking that way, while whatever abominable trash you code in has no justification for }})}))}).
>>
>>62423852
Are all Common Lispers brainlets like you?

Literally the next question they ask in a fizzbuzz interview is "ok now extend the function to print 'bar' for multiples of x."

The point is to kick the programmer into realizing that the canonical "if n % 15..." solution will not scale at all. If they don't realize this, they flunk the interview.
>>
>>62423847
>Lisp
>limited expressiveness
>>
>>62423889
>The point is to kick the programmer into realizing that the canonical "if n % 15..." solution will not scale at all.
This is the thought process of a list programmer. Fizzbuzz is actually an interview question about scaling. Fascinating.
>>
>>62423889
Fizzbuss is just to filter out the pure garbage diversity hires quickly over the phone. Performance, scalability, etc doesn't matter at all.
>>
>>62423918
I take it you've never interviewed anywhere well-known. With *all* questions they give you a trivial case first, then ramp up their demands. You don't have to write a perfect algorithm the first time, but you need to be able to change your code to meet their needs. Any company that hires somebody after answering a basic 15/3/5 fizzbuzz is just wasting their time.
>>
>>62423956
Don't see why you're replying with this to me. My post was about laughing at you for considering fizzbuzz anything but the most basic filter question.
>>
>>62423889
Nice bait, faggot.
>>
>>62422735
We have a number of theories. Autism is associated with gender dysphoria for instance. It goes the other way too, the female coders who are actually competent are much more likely to be trans or identify as nonbinary or other gender weirdness. There's the "male brain" theory of autism which might be related.

Some believe it's memetic. Programming communities skew a bit younger, and a lot more urban and liberal. And so are more accepting of trans. Which causes more of them to come out or try it, which spreads it even further.

Some believe it's caused by porn use and "autogynephilia" or whatever. Technical people seem to be more into weird porn if this website is any indication.

Others believe it's a response to betaness. A lot of nerds are betas for whatever reason, there's truth to the stereotype. And I wish I saved the argument, because it sounds batshit insane when I try to explain it. But the idea is that many people have been taught feminine behaviors to begin with and had their masculine side suppressed and rejected by society. We shouldn't be surprised when they actually want to be women.

Or it could just be regular old selection effects. The internet is anonymous and you can come out as trans with less consequences. And programmers are more likely to be engaged with the internet and internet culture. But some private data and anecdotes I have indicates that like 10 to 20% are some flavor of gender weird. Which way way higher than any estimate of the actual rate in the general population.
>>
>>62423981
Don't see why any of the brainlets in this thread can't present a better fizzbuzz if mine is so shit.
>>
>>62423918
>This is the thought process of a list programmer.
No, this is the thought process of your fellow Java programmer trying to bait actual lisp progtrammers.
>>
>>62424002
Nice counterargument, fám.
>>
What's up with Common Lisp shilling itt in the past couple days? Did a nursing home somewhere near MIT get an internet access?
>>
>>62424007
It's a mix of most of those theories.
Lonely, perverted nerd with no female contact decides that if he can't have a girl, he'll become one. But since he doesn't have the first idea what a woman is, he takes all his cues from male-fanservice media like anime, indie romance flicks, and pornography. It's Eliot Rodger-tier misogyny at its core.
>>
>>62424018
I never made any statements about your program, I just laughed as your perception of what role fizzbuzz plays at job interviews.
>>
>>62424028
That alien has nothing to do with Common Lisp or it's community.
In fact it's propably falseflag made by sepplesflag, as the whole land of lisp book sucks.
>>
>>62424018
Since Common Lisp faggots like you seem allergic to folds, I take offense to the fact that I'm even trying to present myself as one. I write Scheme, not your macro-laden garbage.
>>
File: 1475919362444.png (39 KB, 576x912)
39 KB
39 KB PNG
>>62424007
Have you seen this graph? There's one for IQ and age of losing virginity with the exact same pattern as well.
>>
>>62423635
saved
>>
>>62424047
You clearly too mentally retarded to tell two different posters apart. Get sterilized.
>>
>>62424113
Whoa there. A misquote. I meant to reply to >>62424009
>>
>>62424084
what the hell is that graph suppose to prove?
>>
>>62424113
>>62424131
Who cares? You're both faggots.
>>
>>62424165
You are mistaken.
>>
>>62424084
That is an amazing graph, got a source? I'm skeptical of how they got so many high and low IQ people.

>>62424160
It clearly shows high and low IQs are correlated with low testosterone. All of the high testosterone men have slightly above average IQs, none of the low or high IQ men have high testosterone.
>>
File: 1498950302705.png (29 KB, 730x358)
29 KB
29 KB PNG
>>62424160
X axis is IQ. Y axis is testosterone. You can see that the high IQ kids have low testosterone.
>>
>>62424230
> You can see that the high IQ kids have low testosterone.
But so do the low IQ kids.
>>
>>62424225
Intelligence and salivary testosterone levels in prepubertal children
10.1016/j.neuropsychologia.2006.10.018
https://pdfs.semanticscholar.org/2f26/6476d8eeb199a016ada61bc580ec233adc9c.pdf
And for the other one, https://www.ncbi.nlm.nih.gov/pubmed/10706169 (paste DOI into sci-hub.cc)
>>62424262
Yes, but they're irrelevant here.
>>
>>62424271
I remembering taking IQ tests as a child and there was this one guy in class who scored 170 but later in high school even I was better than him at math.
>>
Drafting up my public coming out as a little
luckily my company is big enough that they can't afford to not support me :) and my stinky nappies!
>>
>>62424332
It's almost as if IQ tests only measure your ability to take IQ tests.
>>
>>62424360
they also, by way of how seriously a person takes them, show something about how idiotic a person is, that they would consider a single integer range to be a sufficient summary of cognition
in other words, there's one thing I know about someone who brags about their IQ, and it's not that they're smart
>>
>>62424332
You can cheat an IQ test. Time is a big factor. Just do the answers you know fast and turn it. And boom high scores all around.
There is a minimum number of questions you need to get right to pass. But its like 30%. And since the difficulty goes up. Once you pass 50 questions just turn in and don't bother with the rest.
>>
>>62424360
That's wrong, they correlate very highly with a lot of stuff.
>>62424386
There is such a thing as the general intelligence factor.
>>62424387
Where are the proofs?
>>
>>62424424
>I used the word correlate
>I used the word proof
Quick, explain how to determine if something is correlated. Hardmode: don't google.

It's always the people who think IQ tests mean something that are dumb as rocks, but watch TED talks and feel like enlightened geniuses
>>
>>62424460
Pearson correlation. I've never watched a TED talk.
>>
>>62418610
I'm working on a server-thing using C#, RazorEngine, MySqlConnector and few other things.
I got it to nicely pass the requests I want to the controllers I want, I can display webpages, but I'm currently stuck at making it so that it renders pages with a function, apparently there's RenderPage in ASP.NET, but that doesn't work, so I thought about making my own function
buuuuut it appears it doesn't wanna cooperate, so I wanted to write my own function that does that.
But it keeps crashing the compile routine.

This is annoying.
>>
>>62424576
Figure out why RenderPage "doesn't work" instead of blindly writing own broken version
>>
>>62424529
damn, well I'm convinced. Boiling down cognition, the biggest unsolved problem humanity has ever considered, into an integer range, really is a thing. And it's highly Pearson correlated to a lot of stuff? Dang
>>
>>62424645
Isn't that what scientists do every day?
>>
>>62424645
Evaluating a numeric property of something is almost always much easier than understanding it fully.
>>
>>62424332
>>62424360
You brainlets, commonly given IQ tests are only accurate up to like 130 at best, and have some degree of error. Not to mention that children's brains grow at different rates, and a 10 year old in the 99th percentile might not be in the 95th percentile when he gets to 11.

But they are still statistically valid given how well IQ correlates with various interesting things.
>>
>>62422090
Your code in the garbage
>>
>>62424895
> IQ tests are only accurate up to like 130 at best
"IQ tests being accurate" implies that there actually exists a measurable quantity called IQ, which is false.
>>
>>62424955
Interesting theory, anon.
>>
>>62424645
Yes, such as income and SAT score. It is also highly genetically correlated.
>>62424332
Child IQ tests are not as accurate as the adult ones.
>>62424955
There is, IQ tests have high test-retest validity and genetic correlation. So there is some quantity called IQ, which is measurable.
http://www2.uned.es/personal/rosuna/resources/papers/Nyborg%20sex%20differences.pdf
>>
File: cognitive correlations.png (163 KB, 1139x1009)
163 KB
163 KB PNG
>>62424645
>>62424955
>>62424386
>>62424460
Brainlets can't understand this.
>>
File: gelbooru-3025859.png (675 KB, 1245x728)
675 KB
675 KB PNG
The only proper method to assess a person's intelligence is by asking one simple question: do you watch Chino's show? If the answer is yes, then they are quite smart. In terms of IQ, the average gochuumonfag scores a 180. But beyond mere numbers, these incredibly gifted individuals often hold very intellectually-demanding jobs; not only that, but they have a knack for very stimulating arguments--especially when the subject is that of little girls.
Point is if you want to be a good programmer and not be ridiculed online you need to watch Chino's show.
>>
>>62425120
>tfw don't watch it

I just didn't have the time, I swear...
>>
>>62425120
kys pedo
>>
File: 6208606061_6e77b28483_b.jpg (346 KB, 1024x731)
346 KB
346 KB JPG
>an integer which summarizes cognition
>anonymous discussion of this idiocy
>>
>>62425184
But this integer correlates highly with other stuff, so it's not idiocy.
>>
>>62425184
This, IQ should be a complex at least, function at best.
>>
>>62425215
>what is a confounding variable
Can you study for the IQ test and improve your score?
What does that tell you?
Does it seem possible that there could be a correlation between "someone who studies for things" and some of that "stuff" you are referencing?
>>
>>62425066
>>62425086
>Correlation means causation
There could be a lot of independent factors that influence both IQ and other results, like social class, wealth, access to education, family relations, ecological factors, etc. Reducing the breadth of human intellectual abilities to a number means ignoring all these factors.
>>
>>62425246
Yes, but not by a whole lot. A lot of it stuff like memorizing numbers, finding symbols, etc.
>>62425283
But IQ is highly genetically correlated. It also correlates with brain size.
>>
File: 1505391134351.jpg (182 KB, 1440x1853)
182 KB
182 KB JPG
>muh SAT score correlations
>>
>>62425303
> But IQ is highly genetically correlated.
What a coincidence, so are social class, wealth, access to education, family relations and ecological factors
>>
>>62425303
What comes next in this sequence: 1, 2, 4, 8, 16

Here's the answer, because you are going to be wrong, a feeling you should become very comfortable with:
https://oeis.org/A160786
>>
>>62425369
Also across adoption.
https://en.wikipedia.org/wiki/Heritability_of_IQ
>Shared family environment
>However, adoption studies show that by adulthood adoptive siblings aren't more similar in IQ than strangers,[22]while adult full siblings show an IQ correlation of 0.24. However, some studies of twins reared apart (e.g. Bouchard, 1990) find a significant shared environmental influence, of at least 10% going into late adulthood.
>>
>>62425086
>IQ and income are correlated
That's weird, I remember reading a study mentioning the average CEOs had a lower IQ than the average engineer and yet earned a lot more.
>>
>>62425382
What are you replying to? Would you like evidence of brain volume correlation?
>>
>>62425144
Watch an episode a day, anon. Even one dose per 24 hours is enough to double your brainpower.
>>
>wake up
>/sci/ infestation in progress
wew my lads
>>
>>62425233
>>62425283
>>62425246
Alright brainlets, since you are too retarded to google it, let me explain the history of IQ research.

There once was a guy who realized that all measures of cognitive ability correlated very well with each other. A kid who did good at a memorization task was also very likely to do well at discriminating musical notes. Or some other random task like spelling or even reaction time.

So he used a statistical method called "factor analysis". Which tells you if there are underlying "factors" that explain the data. And indeed there was a single very strong factor he called "g" which explained the MAJORITY of the variation within individual ability. If you know someone's g, you can predict with decent accuracy how they will do on most cognitive tasks. This is what IQ tests measure.

>>62425369
These studies come from identical twins that were adopted by different parents.

>>62425382
Kolmogorov complexity. What's the shortest program that can produce that sequence? It's not A160786 I bet.
>>
>>62425428
That doesn't disprove anything. Both engineers and CEOs have moderately high IQs, and both earn above average. Sure, there are 140 IQ NEETs and 70 IQ rappers with extremely high incomes, but the correlation is still strong.
>>
Reminder that iq drops severely in suburban areas. Live in big cities
>>
>>62425321
>can't solve middle school math problems
If you need me, I'll be tying a noose around my neck.
>>
y'all a bunch of baka anyways
>>
File: 1497593632114.jpg (84 KB, 328x307)
84 KB
84 KB JPG
>>62425491
This is now officially a baka thread.
Post your favorite systems language and scripting language.
>>
>>62425455
Kolmogorov complexity is not a good measure here because there's nothing saying there doesn't exist a better program than the current best. And though in this case, 2^n is likely unbeatable, there are far more ambiguous cases.
>>
File: 1497851109113.jpg (31 KB, 333x333)
31 KB
31 KB JPG
Recently ordered my own copy of SICP. Pretty excited.
>>
>>62425530
>buying outdated books
baka indeed
>>
File: 1497601678487.gif (36 KB, 679x604)
36 KB
36 KB GIF
What is Cirno's favorite language, /dpt/?
>>
>>62425558
C, because it stands for Cirno.
>>
>>62425529
We can't prove a better solution exists, but we sure can tell 2^n is better than

>b:= proc(n, i) option remember; `if`(n=0, [1, 0$3],
> `if`(i<1, [0$4], b(n, i-1)+`if`(i>n, [0$4], (p->
> `if`(irem(i, 2)=0, [p[3], p[4], p[1], p[2]],
> [p[2], p[1], p[4], p[3]]))(b(n-i, i)))))
> end:
>a:= n-> b(2*n+1$2)[2]:
>seq(a(n), n=0..40);
>>
>>62425530
Where can you order physical books with shipping to Europe? Don't care if they're fakes printed in China/India, as long as they're cheap.
>>
>>62424638
Well I believe it's just not available without asp.net mvc
>>
>want to buy a book about image processing
>it's $200
jesus
>>
File: 1491273698277.jpg (43 KB, 500x500)
43 KB
43 KB JPG
>>62425590
That makes a lot of sense!

>>62425599
What's wrong with Amazon?
>>
What's the best programming language to learn for a dumbass like me? School taught me the basics of php & python but now I wanna focus on really learning one. Should I stick with python?
>>
>>62424576
>not just using printf() and a header file with your page as format string
>>
>>62425619
libgen
>>
>>62425627
State your purpose.
>>
>>62425633
But anon, I want to be able to modify the views whenever I feel like.
I can't just hardcode a shit solution.
>>
>>62425637
To eventually get a job?
>>
>>62425594
If your entire takeaway is that this specific sequence cannot be expressed more simply, then maybe you should turn in your MENSA card. Rather than me telling you, could you try and infer what I was saying? If you look back, you'll see that I even stated it quite plainly
>>
File: 1496711169003.png (1.01 MB, 1200x900)
1.01 MB
1.01 MB PNG
>>62425627
I recommend C(irno)!
#include <stdio.h>
int main() {
puts("Anon a cute!");
return 0;
}
>>
>>62425649
PHP

don't listen to the autists, C will not get you a job anywhere anytime soon

it's not even that good of a language
>>
File: 1477605486765.png (159 KB, 500x500)
159 KB
159 KB PNG
>>62425669
I'll fuk u up m8
There will always be a need for C programmers for legacy code alone.
>>
>>62425702
legacy applications will stop being used eventually
along with C and it's cancer
>>
File: 1491273405568.gif (456 KB, 480x360)
456 KB
456 KB GIF
>>62425715
>legacy applications will stop being used eventually
You obviously don't understand the scale of C's reach or how legacy shit works. Nor have you heard of COBOL. You obviously need to be educated. Luckily Cirno is a great teacher~!
CIRNO
CIRNO
CIRNO
>>
>>62425747
COBOL as, the programming language?
that is not C.

C is used in kernels and in low-level shit, and even there it's rarely used for new projects.

Maybe you should calm down with your autism
>>
>>62425669
>>62425715
t. retard who has never done embedded, OS or any other kind of low level programming.
>>
"Legacy applications will stop being used eventually" (c) silly humans, since forever
>>
>>62425655
>>62425702
>>62425747
Cirno is cute but C is not
>>
>>62425794
a guy wanted something that'd give him a job

not a stroke

you wouldn't just hire someone out of nowhere to do low-level C programming you fucking autist
learn to read
>>
File: 1491273591475.gif (59 KB, 366x421)
59 KB
59 KB GIF
>>62425783
You have no idea what you're talking about. When you're ready to cease being ignorant and to stop talking out of your ass, Cirno will be ready to help~~!

>>62425808
>Cirno is cute
I'll take it!
>>
>>62425648
It's not hardcoded. You edit the template in the header file.
/* sitename, username, <other parameters> */
#define MAIN_PAGE_TEMPLATE "<!doctype html"\
"<head>"\
" <meta charset=\"utf-8\">"\
" <title>Main Page - %s</title>"\
[...]
" <p>You're logged in as: %s</p>"\
[...]
then somewhere else (eg. main)
printf(MAIN_PAGE_TEMPLATE, SITE_NAME, isAuthed ? username : "Guest", ...);

Well, you get the point. It's performant, extensible, and minimalist. You could wrap it in a function that takes a struct if you really want to make it """"""dynamic"""""".
>>
>>62425669
C is a fantastic language, it strikes a good balance between performance, clean code, and liberty.
>>
How much do you earn doing low-level/embedded programming?
>>
>>62425890
jesus christ that is fucking cancer
do you understand the point of having something not hardcoded?
you know
like
not having to compile a program just to change something in the view?
did you ever work on anything?
that's terrible
>>
>>62425979
Compiling a program is very fast, you only use the higher optimizations for production builds. It's trivial to read the string from a file instead of a header if some debug flag is set, then you can just send a signal to reload it. It's not hardcoded in the sense of magic, it's all in one place.
Are you female?
>>
>>62425655
Cirno is like Akari, with a more interesting personality
>>
Rust just improved on their imports

// BEFORE
use syntax::tokenstream::TokenTree;
use syntax::ext::base::{ExtCtxt, MacResult, DummyResult, MacEager};
use syntax::ext::build::AstBuilder,
use syntax::ext::quote::rt::Span,

use syntax::ast;
use syntax::ast::*;

use rustc::mir::*;
use rustc::mir::transform::{MirPass, MirSource};

// AFTER
use syntax::{
// paths with >1 segments are permitted inside braces
tokenstream::TokenTree,
// nested braces are permitted as well
ext::base::{ExtCtxt, MacResult, DummyResult, MacEager},
ext::build::AstBuilder,
ext::quote::rt::Span,
};

// `*` can be listed in braces too
use syntax::ast::{self, *};

// both `*` and nested braces
use rustc::mir::{*, transform::{MirPass, MirSource}};

// the prefix can be empty
use {
syntax::ast::*;
rustc::mir::*;
};

// `pub` imports can use this syntax as well
pub use self::Visibility::{self, Public, Inherited};
>>
>>62426035
You can't be that retarded.
My program has a ton of libraries and takes about 20 seconds to compile.
I want to be able to modify things between shutdowns, not compiles.

Besides, I want to be able to redistribute this thing later, without the source code, thus being able to load views from external files.

Did you seriously ever work on ANY project? Your ideas are fucking terrible.
>>
>>62424576
>C#
>mysql
>ASP.NET
pure garbage, grep+sed+netcat is better
>>
>>62426061
>::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
>>
>>62426081
>abc_def_ghi_jkl_mno_pqr_stuv_wxyz_abc_def_ghi_jkl_mno_pqr_stuv_wxyz_abc_def_ghi_jkl_mno_pqr_stuv_wxyz_abc_def_ghi_jkl_mno_pqr_stuv_wxyz_abc_def_ghi_jkl_mno_pqr_stuv_wxyz
>>
>>62426068
Isn't C# interpreted? You can always dynamically link the libraries for debug builds. And as I said, you can load the template printf strings from external files.
>I want to be able to redistribute this thing later, without the source code
>redistribute
>without the source code
That's unsupported behavior.

Answer my question, are you female?
>>
>>62426061
noice
>>
>>62426061
Rust still in beta.
>>
>>62426117
>Stable release
>1.20[1] / August 31, 2017; 14 days ago
>version 1.0 already released
>BUT IT'S STILL IN THE BETA GUYS
>>
>>62426117
Don't pretend to be an idiot, anon
>>
>>62426069
lmao

>>62426107
C# is compiled to a common lang and that runs

yeah, I don't give a shit about what you think

There are no girls on the internet.
>>
Can anyone give a good GTK+3 reference?
Searching the internet doesn't really help since there is multiple working ways to do the same thing
>>
>>62426144
maybe just switch to qt
>>
File: 1497598890583.png (86 KB, 231x343)
86 KB
86 KB PNG
>>62426042
That's because Cirno is the bestest!
>>
File: gwc3.png (877 KB, 1192x1129)
877 KB
877 KB PNG
>>62426142
Then compilation should be fast, but you never know with microsoft's optimization """work""".
Non-free software is unethical, and reverse engineering byte code is trivial anyway.
>female programmers
>>
>>62425962
It really is too broad to answer anon. Sorry. You could be anywhere from designing the latest graphics chip for money to atmel programming for food.
It's not a bad wage in general though. You'll find that knowing surrounding technology is more and more important though. Many embedded applications run Linux now for instance. And you'll be helping field engineers with codifying their knowledge because they're dying without replacements.
>>
File: consider.jpg (29 KB, 600x600)
29 KB
29 KB JPG
new thread, though
>>62426259
>>
>>62426263
>page 4
But why?
>>
>>62425619
libgen.io
>>62425623
>amazon
>europe
>>
>>62426270
Have you not written the /dpt/ thread merger for yourself yet anon?
Get on that.
>>
>>62426292
It's wasteful to create new threads on page 4, you have ample time to wait until page 10 like you should. On "slow" boards like /g/ you can even wait until the end of page 10.
>>
>>62426306
>It's wasteful to create new threads
No it's wasteful to have this conversation trough HTTP server.
Too late to cry about being wasteful with creating threads.
>>
>>62426306
>wasteful
What does it waste?
I find not changing threads to be a waste of time because any conversation at the end of these threads see a drastic reduction in quality. If possible.
>>
who else /diaperdevs/
>>
Oh, damn. I missed that whole discussion with double-digit-IQ environmentalist memers spewing their uneducated opinions about IQ.
>>
>>62426061
Niiiice
>>
>>62426490
if you really think cognition is better represented with a single integer rather than a multidimensional number or space, then you are a fedora-tier TED talk brainlet.




Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

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.