[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: 324
Thread images: 46

File: trap programmer dpt.jpg (2MB, 1700x2470px) Image search: [Google]
trap programmer dpt.jpg
2MB, 1700x2470px
old thread: >>59677821

What are you working on, /g/?
>>
almost first
>>
>>59681677
Lisp is the most powerful programming language.
>>
reimplementing rust in c
>>
>>59681696
which lisp you fucking poser
>>
I love C++.
I unironically believe it is the best language available.
>>
>http://harmful.cat-v.org/software/c++/I_did_it_for_you_all
Stroustrup: Well, it’s been long enough, now, and I believe most people have figured out for themselves that C++ is a waste of time but, I must say, it’s taken them a lot longer than I thought it would..
>>
Is memmove basically:
void *memmove(void *dest, const void *src, size_t n)
{
void *tmp = malloc(n);
memcpy(tmp, src, n);
memcpy(dest, tmp, n);
free(tmp);
return dest;
}


or is the description just off on it?
>>
>>59681724
does anyone actually think thats real
>>
>>59681711
There is only one good Lisp.
>>
>>59681724
>this link
Hey look, it's that fake news stuff Trump kept telling me about
>>
>>59681724
>>>59681735 >>59681742
even if its fake, the lang is still fucking abomination
>>
>>59681724
Its actually kind of funny how uncomfortable bjarne and other c++ heads get when asked about other languages.
c++ con is like the village
>>
https://hastebin.com/upofuqayug.cs

The while loop asking to play again won't work, I use openJDK on windows from RHEL.
>>
>>59681726
Pretty much, but it would be implemented more efficiently than that.
>>
>>59681768
>funny how uncomfortable bjarne and other c++ heads get when asked about other languages
https://www.youtube.com/watch?v=NvWTnIoQZj4
wow, so uncomfortable
>>
>>59681782
that sure is a short cppcon talk
>>
>>59681696
Is SBCL fast enough to make games in?
>>
>>59681782
Wow that rambling at the end really brings his insecurities to the surface. I saw the same with Carmack.

It essentially translates to "I know it's better, but I can't admit that I've put so much effort into something inferior and even if I could, I'm too old and comfortable to change"
>>
>>59681679
C++ can be wrangled into a decent language even for a team. Like a style guide for project code methodology/idioms. It's a lot of work but nothing really scales to the same levels that C++ can easily, excepting of course Rust which nobody wants to use, is difficult, and is too immature for anything important.
>>
>>59681823
i think it's the fastest implementation of common lisp ever

of course it'll never be C grade performance
>>
File: 1489100693875.jpg (103KB, 500x500px) Image search: [Google]
1489100693875.jpg
103KB, 500x500px
Rate my sudoku solver!
int sudoku_deduce(struct sudoku *pz)
{
/* compute missing numbers with vectors
* return 0 if stuck
*/
restart: ;
short box[3][3] = { { 0 } };
unsigned i, j, k, l;
for (k = 0; k < pz->size; k += pz->sq) /* box */
for (l = 0; l < pz->size; l += pz->sq)
for (i = 0; i < pz->sq; i++)
for (j = 0; j < pz->sq; j++)
box[k/3][l/3] |= (1 << (pz->arr[k+i][l+j] - 1));
for (i = 0; i < pz->size; i++) /* find next missing no. */
{
for (j = 0; j < pz->size; j++)
{
if (!pz->arr[i][j])
{
short row = 0, col = 0;
for (k = 0; k < pz->size; k++) /* row */
row |= (1 << (pz->arr[i][k] - 1));
for (k = 0; k < pz->size; k++) /* col */
col |= (1 << (pz->arr[k][j] - 1));
short vec = row | col | box[i/3][j/3];
if (vec == 0x1FF) /* maxed out all 9 bits */
return 0; /* cannot continue */
while (!pz->arr[i][j])
{
unsigned num = rand() % 9;
if (!(vec & (1 << num)))
pz->arr[i][j] = num + 1;
}
goto restart; /* state has changed */
}
}
}
return 1;
}
>>
>>59681782
>of course C++
>related videos
>him calling C obsolete
>>
File: 1477906309499.jpg (142KB, 1024x576px) Image search: [Google]
1477906309499.jpg
142KB, 1024x576px
>>59681782
hmm... seems like he's trying to compensating for something obvious
>>
>>59681828
seems like you're the one who's insecure
>>
File: 1477129848990.png (44KB, 575x472px) Image search: [Google]
1477129848990.png
44KB, 575x472px
>>59681839
C is obsolete though
>>
>>59681834
At that point, you could try ECL.
>>
>>59681842
compensate*
>>
If you are a young, inexperienced programmer, do yourself the favor of learning FP first (and delve into type systems second). It's the future. The C approach was short-sighted, a mistake governed by a miscalculation of just how incredibly far hardware would go in such a short span of time. Now that things such as parallelism and GPU programming are clearly the future, FP (and safety through types) is the obvious future.
>>
>>59681828
I think you're being unduly harsh.

The languages that will succeed C++ are standing on the shoulders of giants, just as C++ stands of the shoulders of giants.

C++ is 34 years old. Programming language research has come a long way since then. Any modern language doesn't have nearly as large a ball-and-chain of backwards compatibility to lug around with it as C++ does.

C++ is a huge improvement over the languages it supplanted.
>>
>>59681871
XD he memed again!
LOLOL hahahaa!!1
>>
>>59681871
assembly is better
>>
I started learning C++ recently. after Js, Python and C it looks so ugly I started thinking about learning Rust instead..
>>
>>59681834
Unless you're making an AAA game (I'm not), you probably don't need C/C++ grade performance. You can afford to use a language that runs 1/2 or 1/3 as fast.

>>59681860
What's ECL? Link please?
>>
>>59681845
On the contrary, you can't even hack me
>>
>>59681873
I'm sure C++ will forgive me for not sparing its feelings. It's not being harsh, it's being pragmatic, and it's an observation about these people. I admire their contributions and skills/artistry, but you can clearly see it when they speak: They understand that C++/java/etc is a dinosaur and FP is the future, but it's a future they aren't equipped to be a part of.
>>
>>59681883
anyone who wants to be a professional or do any really fun hobby programming should already know assembly
>>
>>59681887
Embeddable Common Lisp (https://common-lisp.net/project/ecl/)
>>
>>59681887
yeah i guess you're right, you probably won't need it for a 2D shmup

as for ECL i don't know if that's a good idea, your program technically goes through 2 compilers, doesn't it?
>>
>>59681902
Thanks
>>
>>59681895
why would you rope carmack into this group?
he's totally into fp
>>
So im retaking a computer hardware class (needed a B and got a B-) and I already took my programming class to take with it (object oriented programming) so I will be taking the next class this summer but Im scared I wont remember anything about c++. Thoughts?
>>
>>59681900
yeah but if you already know assembly why would you ever learn anything else

it's just better
>>
>>59681923
do the C++ problems on hackerrank
>>
>>59681895
Oh, I completely agree that FP is the future. I wish there weren't so many schools teaching Java/C# and nothing else, because going from OOP to FP is possibly harder than just learning FP from nothing due to all the unlearning that must be done.
>>
>>59681919
He's into it from a distance. Better than Bjarne's beta-bitch snub, but he still recognizes that FP is a future he won't be part of. Carmack's a hero of mine btw so hope it's not coming off like I'm shitting on the guy. But my understanding is he talked about FP being important at that keynote, tried and gave up on a haskell wolfenstein, and probably continues to just use C++.
>>
>>59681883
>>59681900
Which assembly? I know MIPS and a little ARM.
>>
>>59681956
>Which assembly?
yes
>>
>>59681946
>>59681895
>FP is the future
what a retarded opinion to hold unironically
nobody has ever been able to predict where paradigms will be in the future
nobody knows until the future happens
>>
>>59681956
obviously x86 you retard
>>
>>59681910
You can easily do 3D stuff in SBCL, the difference is you're not gonna be doing AAA with millions and millions of triangles in a single frame as a decent frame rate probably unless you optimize the rendering pipeline to the point where you're missing out on the ease of CL.

I never bothered with ECL but it's not as maintained and probably not as good simply because of that.
>>
>>59681968
"Function composition is the key to controlling complexity" (might have mangled it a bit, but that's the gist of the quote)

https://www.youtube.com/watch?v=ZhuHCtR3xq8
>>
File: 1490930839698.webm (840KB, 608x1080px) Image search: [Google]
1490930839698.webm
840KB, 608x1080px
what do you guys think of Go? is it a meme language?
>>
File: 315.png (40KB, 204x204px) Image search: [Google]
315.png
40KB, 204x204px
>>59681954
>carmack
>wolfenstein
hmm, rly makes u think
>>
>>59681954
>>59681919
Carmack was a C guy, I think he was against the use of C++ altogether. Still, best tool for that particular job.
>>
>>59681968
Its the only logical conclusion though.
Mutable state causes more problems than it solves.
>>
>>59681968
The future is multicore. Shared mutable state and locks are the assembly language of multicore programming. Pure FP is a much more tractable and manageable way of doing it.
>>
>>59682012
Yep.
>>
Thanks for all the help last thread, just one last thing though. Anyone know why my averages come out wrong?

{
int high, low, sum, i, count;
double avg;
printf("Enter a number (-1 to quit): ");
scanf_s("%i", &i);
high = i;
low = i;
sum = i;
for (count = 0; i != -1; count++)
{
if (i > high) {
high = i;
}
if (i < low) {
low = i;
}
printf("Enter a number (-1 to quit): ");
scanf_s("%i", &i);
sum += i;
}
avg = (double) sum / count;
printf("\nThe lowest number was %i\n", low);
printf("The highest number was %i\n", high);
printf("The number of values entered was %i\n", count);
printf("The average of the numbers was %.2lf\n", avg);
}
>>
>>59682012
cant
{

}

functions so i dont want any
>>
>>59681839
he basically says in C vid that scientists, engineers and physicists are too stupid to understand computers. they can't program in C and need high-level lang ie C++
>>
>>59682012
Go is a perplexing language. It feels like it belongs in the 1970s.
>>
>>59682029
proly cuz u add -1 to da sum yo
>>
>>59682038
He also said he wished C was a subset of C++ so programmers could pick and choice from C++'s tool set while writing C which is laughable since he led a lot of the early committees for C++ and could have made it include all of C's standard if he wanted to.
>>
>>59682049
oh fuark how can I avoid that here?
>>
Right now I'm using this:
constexpr auto& get(vector2i p, auto* ptr) const noexcept
{
p.x %= dim.x;
p.y %= dim.y;
if (p.x < 0) p.x = dim.x + p.x;
if (p.y < 0) p.y = dim.y + p.y;
vector2i offset = pos + p;
return *(ptr + offset.x + size.x * offset.y);
}

to do bounds checking and wraparound on a matrix (screen buffer).
Any ways to optimize it?
>>
>>59682012
>>59682047
Go was never designed to be used by humans outside Google's army of Indian programmers that can't be trusted with C.
>>
>>59682027
>>59682032
>>59682047
thanks guys. yeah my job is trying to get me to learn it but after doing the tutorial it seems pretty meh. then again i don't gaf about concurrency and shit like that
>>
File: computation.png (123KB, 342x449px) Image search: [Google]
computation.png
123KB, 342x449px
downloaded this book like 3 years ago

finally started reading. The first part of the book is implementing a very simple language in ruby. I've been doing nothing but javascript for 2 years or so but once considered ruby my favorite language. It's making me nostalgic. I kinda want to start a project with rails but I'm so rusty.

I've been lurking dpt for years but this might be my only post cause I'm high as fuck right now. lol.
>>
>>59682077
Surely if your boss wants you to learn it then you must learn it or quit?
>>
https://www.youtube.com/watch?v=75Ju0eM5T2c

Donald Knuth - 'Avoid the hurd when seeing what language to use'
>>
>>59682093
i don't think it will come down to that but if it does i'd rather quit
>>
File: ROBOT-main_2774314a.jpg (446KB, 1500x1000px) Image search: [Google]
ROBOT-main_2774314a.jpg
446KB, 1500x1000px
>>59682060
maybe if he had more dinners with K&R, he would've designed a better looking frankenstein.. oh well, he will still have a chance when they meet in hell
>>
>>59682068
u do da
if(i == -1) 
break;

rite b4 u do da
sum += i;


also u needa go bak n change da input to not use i in dis manner
u breaking da established practices n shit yo
>>
>>59682083
Hey man, I love that book and I love ruby. I'd say stay the hell away from rails though, it almost killed my love of ruby. But that's a great book to read high my friend. Ruby was my first introduction to programming almost 10 years ago? It also gets me feeling nostalgic.

http://rubykoans.com/ This is what you should do instead of rails.
>>
>>59682068
...
scanf_s("%i", &i);
if(i == -1)
break;
...
>>
>>59682114
>>59682109
can't use breaks cause can't use shit we didn't learn yet brahs, that's cheating and that's no good. but I used my head and actually looked at it and I moved the sum like so and now shit works

        sum += i;
printf("Enter a number (-1 to quit): ");
scanf_s("%i", &i);
>>
>>59682095
>stuttering constantly
>looking down constantly

To think the mind behind TAOCP is an autistic old man is amazing.
>>
>>59682146
What did you expect. We can't all be Feynman!
>>
>>59682146
he has a point though. most of his peers already have brains fried with altzheimers, math helps you avoid that
>>
>>59682146
that's how almost all brilliant people are in person
it's extremely rare that someone is a genius and also highly socially capable, like an einstein
>>
Sing 99.

proc StrOfInt of Buf, St, I where
J, K.
Digit : 8.
perform
if I then
loop I do
J :- I.
loop J do
K :- J.
J % 10.
done.

Digit :- I : 8. NB. Widthcast syntax may change.
Digit + ?0.
Buf/8 :- Digit.
St/WORD + 1.
I % 10.
done.
else
Buf/8 :- ?0.
St/WORD + 1.
fi.
corp.

proc Sing of Bottles where
Buf :- reserve 8 x 1024.
St :- 0.
perform
loop Bottles do
St :- 0.
StrOfInt Buf, \St, Bottles.
StrAppend Buf, \St, `` bottles of beer on the wall''.
emit Buf.

St :- 0.
StrOfInt Buf, \St, Bottles.
StrAppend Buf, \St, `` bottles of beer''.
emit Buf.

emit ``Take one down, pass it around''.

Bottles - 1.

St :- 0.
if Bottles then
StrOfInt Buf, \St, Bottles.
StrAppend Buf, \St, `` bottles of beer on the wall''.
else
StrAppend Buf, \St, ``No more bottles of beer on the wall''.
fi.
emit Buf.
emit ``''.
done.

renounce Buf.
corp.
>>
>>59682339
What language is this?
>>
>>59681835
If this works how I think it works, it cannot solve all puzzles. Some of the "hard" puzzles cannot be deduced and require trial guesses.
>>
>>59682379
The language you've always secretly wanted in your heart.
>>
>>59682396
Looks like dog food.
>>
>>59682396
two characters for assignment ops is shit
>>
>>59682413
>Doesn't like the emoji language
>: - I
>>
File: functional-right.jpg (512KB, 1131x1600px) Image search: [Google]
functional-right.jpg
512KB, 1131x1600px
Why haven't you converted to the one true paradigm yet anon?
>>
>>59682524
I already use Lisp.
>>
>>59682388
What are trial guesses in the context of sudoku puzzles?
Is that bruteforcing?
Because that's basically what I'm doing, limiting guesses to numbers not found in the same box, row or column and restarting when I run out of digits for any given missing number.

Could you post an example of a hard one so I can test it?
>>
>>59682524
But I have.
Haskell is the only language with vulkan bindings though so its gonna have to wait.
>>
>>59682598
I actually am not seeing how your algorithm can solve sudoku puzzles. Could you explain it?

From what I see, you compute available numbers for each position but then there is this bit.
                while (!pz->arr[i][j])
{
unsigned num = rand() % 9;
if (!(vec & (1 << num)))
pz->arr[i][j] = num + 1;
}
goto restart; /* state has changed */


Basically this guesses a number until it finds one that can go in that position, then stores that random number plus 1? Why? Also, what happens if that random guess is incorrect?
>>
globale      
form est un formulaire, titre vaut "La boite à texte", largeur vaut 400, hauteur vaut 260
boite est une boite,x vaut 30, y vaut 30, largeur vaut 200, hauteur vaut 100
b1 est un bouton, texte vaut "Afficher le texte dans le tableau", x vaut 30, y vaut 150
l1 est une étiquette, texte vaut "", x vaut 30, y vaut 200

principale :
début
ajoute boite & b1 & l1 dans form
Fais réagir b1 à "clic souris" pour afficher valeur
tant que 1 != 2, lis
temporise
ferme

afficher valeur :
*b est un bouton
début
affiche texte de boite
reviens


Switch to the superior language faggots
>>
>>59682767
That language is english.
>>
File: r-badge.png (75KB, 220x220px) Image search: [Google]
r-badge.png
75KB, 220x220px
>>59682524
R reporting in
`[`(11:20, 3)


Also daily reminder that the magrittr pipe is a monad
>>
>>59682740
get random number 0-8
bitwise shift is zero indexed
it checks if that number doesn't already exist and stores it plus one because the puzzle numbers are 1 indexed.

If the random guess is incorrect, there will come a point in future guesses where the bitfield vec for the current position is maxed out, all numbers exist already and no more guesses can be made, so you quit and start over.
>>
I need a language recommendation for the two following things:
ncurses interface
trawling web pages

I would greatly, GREATLY prefer to keep the application in one language for maximum portability, and I would also greatly prefer not to go anywhere near Python because that language is a pile of aids.
I was thinking C initially for the ncurses but I can't imagine there's a robust web-trawling framework for it.
>>
File: Screenshot_2017-03-31_21-17-58.png (61KB, 1014x492px) Image search: [Google]
Screenshot_2017-03-31_21-17-58.png
61KB, 1014x492px
What does /dpt/ think, could this have been done better?
lst = list(
"08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08"
[...]
"01 70 54 71 83 51 54 69 16 92 33 48 61 43 52 01 89 19 67 48")
for i in range(lst.count(" ")): # Remove empty strings
lst.remove(" ")
lst = map(str, lst)
lst2 = []
for a in lst:
b = next(lst)
if a == '0': # Remove leading zeros
lst2.append(b)
else:
lst2.append(a+b)
lst = [i for i in map(int, lst2)] # Convert sorted list to ints
MAX = 0
for i in range(1, 20):
j = 20*i
a = max(lst[j-20:j])
index = lst[j-20:j].index(a)
for ii in range(-1, 2):
try:
b = lst[j:j+20][index + ii]
c = lst[j+20:j+40][index + ii*2]
d = lst[j+40:j+60][index + ii*3]
except IndexError:
b=c=d=0
PROD = a*b*c*d
MAX = PROD if PROD > MAX else MAX
if ii != 0:
try:
b = lst[j-20:j][index + ii]
c = lst[j-20:j][index + ii*2]
d = lst[j-20:j][index + ii*3]
except IndexError:
b=c=d=0
PROD = a*b*c*d
MAX = PROD if PROD > MAX else MAX
print(MAX)
>>
>>59682847
Yeah, sorry for asking, it makes sense, I figured it out after I posted.

The thing about random guesses is that you can't ensure it won't make the same incorrect guess. Random guessing is unconstrained, and what you have is a constrained search.
>>
>>59682855
I think you did your best :)
>>
>>59682847
Isn't solving sudokus supposed to be one of those "really hard P" problems?
>>
>>59682855
You came from C, didn't you?
>>
What the fuck even is lisp? I'm really liking SICP, but LISP is kind of messy
(defun square (x) (* x x) )

(defun test (a b c)
(cond (and (< a b) (< a c) ) (+ square(b) square(c))
(and (< b a) (< b c) ) (+ square(a) square(c))
(else (+ square(a) square(b) ) )
)
)

(print (square 7) )
(print (test 1 2 3) )



The output is as follows:
 *** - COND: variable AND has no value
>>
>>59682895
Its literally from the 50s when CS was an infant.
Stop using it
>>
>>59681677
what the fuck is the trap programming doujin
>>
>>59682875
What is this supposed to mean? Is it that bad? I literally couldn't figure out how to represent a list as a 20x20 grid other than slicing.
>>59682880
No, Python codemonkey in training.
>>
>>59682895
Don't write Lisp like C.
(defun square (x)
(* x x))

(defun test (a b c)
(cond ((and (< a b) (< a c)) (+ (square b) (square c)))
((and (< b a) (< b c)) (+ (square a) (square c)))
(t (+ (square a) (square b)))))

(print (square 7))
(print (test 1 2 3))
>>
power <- function(n)
function(x) x^n

square <- function(x)
power(2)(x)


Is this particular to functional programming? I haven't done much dysfunctional programming so I'm not sure
>>
>>59682895
gez, format your code correctly
(defun square (x) (* x x))

(defun test (a b c)
(cond (and (< a b) (< a c) ) (+ square(b) square(c))
(and (< b a) (< b c) ) (+ square(a) square(c))
(else (+ square(a) square(b)))))

(print (square 7))
(print (test 1 2 3))


You will notice you are using cond incorrectly, it suppose to be like this
(cond (test result)
(test2 result2)
(else result3)

;; you are doing this
(cond test result
test2 result2
(else result3))


you are missing a parenthesis to put the test and result together.
>>
>>59682840
the what pipe
>>
>>59683030
consult CRAN my friend
>>
>>59683037
https://hackage.haskell.org/package/inline-r
have you considered learning haskell
>>
>>59683056
I loved haskell but 1) cabal is shit, 2) I'd next skip right to idris
>>
>>59682895
Good lisp should end in lines that looke like this
>)))))))
>>
>>59683062
idris is ok, but has fuck all package managers
stack is good 90% of the time
>>
>>59682874
Adding another dimension of incorrect guesses would add a shitton of complexity, probably.
Also, I just realized I can't possibly know which guesses are wrong.

Unrelated, I also figured out I didn't even need the goto, i can just add the new number to the box vector for the current box instead of recomputing every one.
I just doubled performance from 290k iters/sec to 533k iters/sec!
>>
What kind of hash function lies behind hash tables in, let's say, Perl?
>>
>>59683029
Okay, it took embarassingly long to correct the fact that I should have done
 square a 

Instead of
 square(a) 

But other than that, it runs! Thanks, man!

>>59683065
The sad thing is, you're not wrong
>>
File: 1486078850551.jpg (396KB, 1570x1536px) Image search: [Google]
1486078850551.jpg
396KB, 1570x1536px
>Doing random hackerrank problem
>Wonder why there is such a low amount of submissions to an easy challenge
>Fails on the last test case
>Checking out discussions turns out the pajeet later added a case with a very very long input that isn't listed in the problem statement (he didn't even set a constraints section)
>Half of the languages i try don't have standard input that long without hacks
>Hacks don't work due to constrained environment
>The other half of languages throw insane segfaults
Fucking retarded streetshitter
>>
>>59683142
Which problem?
>>
>>59682981
I-It's a joke
>>
>>59681677
Post more of this
>>
>>59683142
How long an int?
curious if i could declare it.
>>
Finished the scraper! Thanks to whoever recommended beautifulsoup. Pretty fun, and useful, program to write.
>>
>>59683257
Trash.
>>
>>59683282
Please don't say that
>>
File: file.png (349KB, 634x357px) Image search: [Google]
file.png
349KB, 634x357px
>>59681677
OP and everyone posting ITT

unironically kys.
>>
nombre Fibonacci : 
a est un nombre
début
questionne a sur "Entrez un nombre :"
affiche fibo(a)

fibo :
* n est un nombre
début
si n est < 2, retourne n
retourne fibo(n-1) + fibo(n-2)


Name a language more beautiful than this, faggots.
>>
>>59683331
Should have based it on Lisp.
>>
@59683331
>unironically programming in non-english
Juan pls go and stay go
>>
>>59683358
It was popular to translate programming languages in 60s, though.
>>
@59683318
>and everyone posting ITT
Oh, so that applies to you as well.
You first.
>>
>accidentally did a top-post on a gnu/neckbeard mailing list
how fucked am I, /g/?
>>
>>59682895
>What the fuck even is lisp?
Compiler fags jerk off to it because it has such a small grammar but remains quite expressive.

Pic related is the grammar. It might be able fit on a napkin.
>>
File: fine.jpg (51KB, 580x282px) Image search: [Google]
fine.jpg
51KB, 580x282px
>>59682111
yea rails was weird

so much metaprogramming bullshit.
>>
File: 1451837540991.png (1MB, 1080x1080px) Image search: [Google]
1451837540991.png
1MB, 1080x1080px
Writing test cases is horrible
>>
Debating whether I should learn Fortan or APL for April Fool's day.
>>
File: 2017-03-31-200410_988x645_scrot.png (57KB, 988x645px) Image search: [Google]
2017-03-31-200410_988x645_scrot.png
57KB, 988x645px
Going to make this web app in Elixir / Phoenix framework
1) users can post images in tags
2) users can post image links in chat and it appears in the 3/4 of the page instantly, without needing to fresh
planning to launch it on may 1
>>
Are there any programming languages that are in say, chinese, arabic, hebrew, other non-roman? And in a way where the characterset has an interesting impact on the language design?
>>
>>59683142
desu, I like leetcode more than hackerrank. It uses classes with your solution as a method, so you don't have to shit around with all the stupid I/O hackerrank forces upon you.
>>
File: chrome_2017-03-31_23-54-30.png (94KB, 1401x932px) Image search: [Google]
chrome_2017-03-31_23-54-30.png
94KB, 1401x932px
got bored, wrote a keygen for gitlab enterprise
>>
>>59683331
English.
>>
>>59683514
I think red/green testing is comfy as fuck, famalam
>>
>>59683532
> a tagging system
yeah this definitely wont get abused
I wonder if you could hook into that ML site that did the "awesome" rating for better tags.
>>
>>59683514
why are you using test cases? Can you not simply prove things about your language...?
>>
>>59683358
Why do foreigners pride themselves on integrating with the West?
>>
>>59683561
They feel like they're no longer apart of a shithole.
>>
>>59683532
I feel like this would benefit from something that already has a large database of tagged images, like hooking it into gelbooru or something
>>
>>59683257
do it again in c++ using libcurl
>>
>>59683530
APL
Fortran is at least readable
>>
>>59683561
It's not a matter of integration, it's just that english speakers invented computing and all the core terminology that goes with it.

You don't really question why many cooking terms are french or music terms are italian, they just happened to invent them first.
Computing was invented by english speaking people.
All the documentation is in english, all the languages are in english, and if you want anyone to collaborate on your shit code, it's going to be in english as well.
>>
>>59683600
That's a terrible analogy. There are culinary terms specific to all manner of languages, and chefs and the likes are not required to speak in one language in the kitchen.
>>
>>59683639
The music one is 100% valid though.
>>
>>59683558
If people are so hellbent on abusing it I'll just move it to tor and slap some ads on it
>>59683577
for sure, or people could build a content database on their own, and rate it in such a way that the most relevant / enjoyed make it to the top for each tag
>>
>>59682012
It's fantastic. Especially if you want to write a fast and simple API, it's great for modern microservice architecture.
>>
>>59683142
lmfao i hate hackerrank for this exact reason

every question was written by pajEet439
>>
Post some of your horrible first projects' code
>>
>>59684014
They're mostly just hobbled together pong clones and c++ book problems.
>>
>>59684014
>that font and colors
Why would you do this to yourself?
>>
>>59684032
This was a year or so ago for a CS project when I was just starting... I'd like to think I'm a better programmer that I won't write code like this in the future, but I guess only time will tell
>>
>>59682848
What prevents you from using C++? Plenty of good parsing libraries too
>>
>>59684014
>first project
deleted that shit a long time ago
>>
>>59683454
You better commit seppuku
>>
>>59684014
>Go to see in my java 101 class still has my submissions up
>System maintenance
Oh well
>>
how would i go about creating a solution to the sleeping barber problem with using only mutexes and condition variables?
>>
File: 1463606423970.gif (152KB, 400x267px) Image search: [Google]
1463606423970.gif
152KB, 400x267px
So I forgot how write to basic programs in C# and C++ after now practicing for awhile,is it a good time to start fresh again to learn C and read algorithms at the same time? C# was comfy(only after learning the throne on my ass known as java) and C++ was was hard af but felt good to use once I had a feel for it, so how hard can C be?
>>
>>59683581
>>59683257


std::string http::DownloadString(const std::string input)
{
CURL *curl = curl_easy_init();
curl_easy_setopt(curl, CURLOPT_URL, input.c_str());
/* example.com is redirected, so we tell libcurl to follow redirection */
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1); //Prevent "longjmp causes uninitialized stack frame" bug
curl_easy_setopt(curl, CURLOPT_ACCEPT_ENCODING, "deflate");
curl_easy_setopt(curl, CURLOPT_ACCEPT_ENCODING, "gzip");
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
std::stringstream out;
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &out);
/* Perform the request, res will get the return code */
CURLcode res = curl_easy_perform(curl);
curl_easy_cleanup(curl);

std::string retstr = out.str();

boost::trim(retstr);

return retstr;
}


https://curl.haxx.se/libcurl/c/curl_global_cleanup.html
>>
>>59684108
What do you mean you forgot?
Languages are not important as long as you write applications for yourself, pick whatever you'd like.
Come things are eaiser in certain languages and other times you just go with the team.
Learning programming is not the same as learning a language.
>>
>>59684151
I can still read code and know what it does for basic stuff,I just forgot the syntax,happens everytime I swap languages.
>>
>>59684199
>I just forgot the syntax
Just take a quick look on tutorials
>>
I know people are going to give me shit, but I am trying to program a 2d top down rpg game in java using LWJGL. I'm not a master programmer ASM master race type like apparently everyone else on this website. With that being said, I am getting caught up on the collision detection. I have it programmed so that everything is basically a quadrilateral and I am trying to compute the area of the quadrilateral, so I can figure out if a point lies within it. Programming is hard, I can't imagine trying to do this in C or some other shit like that. I would kill myself.
>>
File: tumblr_ondyacT7fo1rmerh9o1_540.jpg (47KB, 540x409px) Image search: [Google]
tumblr_ondyacT7fo1rmerh9o1_540.jpg
47KB, 540x409px
>>59684014
>>
just started programming and i know this isn't the place but please someone help me with these questions.

1. >>> l = [1, 2, 4, 5, 'd']
>>> cycle(l)

how do i shift shit by one back in python without using return?

2. >Now write a function cycle(input_list) that performs a cycling of the elements of a list as before, but this time returns the result as a new object and does not mutate the input argument.
>>
File: 1491033888.png (23KB, 611x143px) Image search: [Google]
1491033888.png
23KB, 611x143px
Let's talk about R.

How do you think it compares to python, since the two overlap in some problem domains?
How do you feel about some of the language design choices?
The lexical scoping?
The "<-" or "=" for assignment, do you have an opinion on it?
Is it worth it to learn how to drop to fortran/C ever?
Why is CRAN so awesome (speaking as someone who does not understand the internals of package management, only that I've never had a problem with R packages, and have had many with a variety of others)?
Do you have an opinion on the S3, S4, and R5 object systems?
Do you have any opinions on Non-standard evaluation?
What about the Shiny webapp stuff?
>>
File: python1.png (27KB, 826x428px) Image search: [Google]
python1.png
27KB, 826x428px
>>59684333
I think this is what you're asking for?
>>
>>59684446
thats the 1st question right?

Thanks a lot.

im really out of my depth, how can i study coding better?
>>
Do you guys put getters and setters for your object's variables?
>>
>>59681726
You don't need to use malloc. Refer to this.
http://clc-wiki.net/wiki/memmove
>>
File: 1473031775200.gif (2MB, 500x281px) Image search: [Google]
1473031775200.gif
2MB, 500x281px
>>59684541
>object
>>
>>59684534
the function "cycle" is the answer to the first question
the function "cycleReturn" is the answer to the second question

>im really out of my depth, how can i study coding better?
dunno
I guess re-read the chapters in your text book about functions, specifically the part about passing by reference
>>
File: 1487659582465.jpg (262KB, 1066x1094px) Image search: [Google]
1487659582465.jpg
262KB, 1066x1094px
>>59681677
>>
>>59684541
>getters and setters
I dont use POOP, pajeet
>>
File: ahhh.png (25KB, 498x453px) Image search: [Google]
ahhh.png
25KB, 498x453px
>>59684586
seriously hate to annoy you again but i've been stuck on this for 2 hours. feel like a disgrace

the 2nd question is slightly different.

Took it as a subject in uni and really struggling.
>>
>>59684541
>getters and setters
I take it this is some kind of OOPs concept?
>>
File: python2.png (18KB, 743x240px) Image search: [Google]
python2.png
18KB, 743x240px
>>59684605
is it an automatically graded thing?
maybe it's checking to see if you used the copy function specifically, but I'm just guessing
try this
>>
>>59684666
yeah it worked...thanks.

Just wondering, how come I can't just use + newList[0]?

Again, thanks a lot.
>>
>>59684688
>Just wondering, how come I can't just use + newList[0]?
it's kind of a quirk of python
newList[1:] is a list, and newlist[0] is just a single value
and in python list + value is not valid
but list + list is valid
so I turn newList[0] into a list containing 1 element by putting brackets around it

>Again, thanks a lot.
any time
>>
macros were a mistake
>>
File: CIRTy8SUAAAQ8Xr.jpg (27KB, 600x338px) Image search: [Google]
CIRTy8SUAAAQ8Xr.jpg
27KB, 600x338px
I'm mainly a C++ guy. What's the best C++ replacement meme language to learn these days?
>>
>>59684737
>meme language to learn
rust or go
>>
>>59684541

Depends on the language. For C++, I don't do the getter/setter pattern. I'd rather just make a public variable if I want both read and write access to shit from outside (in fact, I might just use a plain old struct in this case). In Ruby, I do, because there technically is no such thing as a public instance variable. When you do something like attr_accessor :foo, you define a method :foo to get @foo, and :foo= to set @foo.
>>
>>59684737

Rust is the language that best emulates C++'s feature set, or at least the parts that are primarily used. You've got RAII, you've got move constructors, you've got generics (but not at the level C++ can do), you've got a systems language underneath to dip down into if need be...
>>
When those GameDevs make games and for example want to create shitload of items (swords, axes etc), do they create an instance of a class Item for every single item in the game? Same goes for armors, pretty much every thing in the game that's usable in any way?

I ask this because i learn on my own, got the chapter Classes and i read that every instance allocates memory, so i wonder how much of that memory is allocated per instance, and is it normal to have like 1000 instances working at the same time?
>>
>>59684737
R and haskell and haskellR
>>
>>59684737
C
>>
>>59684803
gamedevs are usually shit programmers (from my years in /agdg/). They will do the easiest implementation even if its ugly, cumbersome and coupled to death.
> like 1000 instances working at the same time?
For entities sure. 2d games typically can do a few thousand without even touching optimization.
>>
>>59684853
How do games like Diablo for example handle their immense shitload of items?

I understand huge part of that is random generated items, that's easy as shit, but still they have very huge base of unique items, what would be the best way of creating it?
>>
>>59684803
>so i wonder how much of that memory is allocated per instance
I'm sure your book will cover this if it's any good
but for each instance of the class, you allocate memory for every variable within the class
so if you have 4 ints and a float in the class definition, then every instance allocates 4 ints and a float worth of memory (plus a little overhead)
>>
C is overestimated.
For an average programmer, most of the time you don't severely need advantages given by pointers. You end up reimplementing various data structures instead of focusing on the program logic.
Reconsider using of C.
>>
>>59684914
>but for each instance of the class, you allocate memory for every variable within the class

Ohhhh, thanks. It is so logical and i didn't connect it with lessons i learned earlier
>>
>>59684902
the premade items like the uniques are all in a file on the disk
you could store it in a flat text data file, maybe compressed if you like, or in a database file (sqlite for example)
blizzard specifically uses their own file format for all their games, I think
>>
>>59684902
If I had to guess, its probably just a weighted drop table which is nothing performance wise.

Have values for all your items, then for random drops just roll X times and return values which return the items.
>>
>>59684963
Yeah, seems like this is the way to do it. If i wanted to practice this, what format would you recommend to use? I did some serialization in c# back then, i think it was .bin file. Is it possible to do some json or xml?
>>
>>59685008
>what format would you recommend to use?
the one where you would learn the most
if you've never done sql, try that out

json and xml would both get the job done, but are very bulky for this task
if you go with that, definitely store the file compressed and then decompress it in memory,
xml file will be like 20% of its original size when compressed
>>
>>59683548
Mind sharing?
>>
>>59681895
kys retard

>>59682025
kys retard
>>
>>59685066
>kys
Kill yourself.
>>
>>59684946
everyone ITT should reconsider their own existence
>>
https://github.com/Microsoft/vscode/issues/22900
>>
>>59685088
>A workaround for folks who are similarly obsessed about battery life: Disabling cursor blinking will make CPU usage drop to 0. Here's the setting:

"editor.cursorBlinking": "solid"


the absolute state of MS and modern """"""""""""""""""programmers"""""""""""""""""""""""
>>
what was meant by him when he said these things?
>>
looking for some sites with reversing challenges
>>
File: 1460850120429.jpg (14KB, 306x295px) Image search: [Google]
1460850120429.jpg
14KB, 306x295px
>allowing proof by contradiction
>complaining that constructivism is too hard
>>
What am I doing wrong?
>>
>>59685419
>Grouping by created at
>>
>>59685433
yes, what's wrong with that?
>>
>>59685461
It doesn't make sense.
>>
File: gnandog.jpg (206KB, 576x1024px) Image search: [Google]
gnandog.jpg
206KB, 576x1024px
> firebase cloud messaging
the client re-generate the token if shit happens, how i keep track of wich device is using it?
>>
>>59685499
lol why?
>>
>>59681677
What is the source for these mangas?
>>
I want to become like the hackerz they call 4chan. Where do I begin?
>>
>>59685633
First you need to find m00t, the second best hacker after 4chan
He will teach you how to become a xXx_H4xx0R_xXx
>>
>>59685633
Learn Java
>>
>>59685666
>devil trips
>java
Checks out.

>>59685663
What's moot even doing with his life.


But in all seriousness, I want to learn R, any good resources for it?
>>
>>59685685
channel your inner R programmer and just start writing code
>>
>>59685685
>What's moot even doing with his life.
Being a Google drone.
>>
>>59685696
>>59685696
Oh, fuck, why didn't I think of that!
>>
File: hepotato.jpg (40KB, 400x330px) Image search: [Google]
hepotato.jpg
40KB, 400x330px
>>59685515
>>59685622

apps like whatsapp how link the firebase cloud messaging to the device?
imei, phone number, potatoes... ?
>>
File: 1361791580724.jpg (71KB, 418x467px) Image search: [Google]
1361791580724.jpg
71KB, 418x467px
>>59685780
Data structure is upside service the device of turing complete maybe
english speak motherfucker
>>
>>59685419
try sum(count(*))
>>
Do you guys know any site with sample logs from different applications, like apache, tomcat etc?
>>
>>59685822
google.com
>>
>>59685851
That's not helping
>>
>>59681765
for you
>>
>>59685857
hey, it's a step closer to where you want to be buddy. you won't get help everytime!
>>
>>59685878
How is it a step close to where I want to be? Do you think I did not know about google before you suggested me using it?
>>
File: Haruhi14.png (976KB, 843x1023px) Image search: [Google]
Haruhi14.png
976KB, 843x1023px
>>59685891
Don't be hasty anon
I'm sure you'll find something with the help of google
>>
>>59685930
Stop dodging questions please
>>
>>59685938
Don't listen to >>59685930
Use DuckDuckGo instead.
>>
>>59685938
Don't listen to >>59685944
Use StartPage instead.
DDG was founded by a known personal data seller.
>>
File: harold.jpg (26KB, 600x401px) Image search: [Google]
harold.jpg
26KB, 600x401px
>>59685938
>>59685930
>>59685891
>>59685878
>>59685857
>>59685944
lmao
Comedy gold
>>
>>59685938
Don't listen to >>59685959
Manually enter the ip address of every websites instead.
StartPage was founded by an underground jewish group
>>
Okay I got it, you guys don't know where to find sample logs.
>>
>>59685944
>Use DuckDuckGo
kill yourself

it was a stupid meme 10 years ago and it's just pathetic in the current year
>>
>>59686004
ok, google
>>
Why are Arduino's (AVR in general) so painful?

You get some wierd set of scuffed libraries which are fake C++ pretending to be C pretending to be a real implementation.
gcc-avr in general is lacking a ton of features, c++stdlib for example.

Arduino shit all works with "String" which is definitely not std::sting or a C style string thing.

It's all really tiresome. Hopefully the Clang support is better.
>>
File: tmp_6784-14906916828381868739606.png (642KB, 726x1040px) Image search: [Google]
tmp_6784-14906916828381868739606.png
642KB, 726x1040px
>>59686037
>gcc-avr in general is lacking a ton of features, c++stdlib for example
>C lacking C++ features
calle zone
>>
>>59686054
gcc-avr by that I meant the AVR backend, it's targeted with C++ in my case. g++-avr I guess would be the proper naming.
>>
>>59686037
>muh string processing
>on an arduino
fuck off
>>
>>59686081
Stop being stupid and just use C.
>>
>>59685960
Thank you for the gold kind stranger!
>>
>>59686094
>>59686112
I hate hardware people
>>
>>59686180
fuck you, there is no real reason why std::string should be crucial to you
>>
>arduino
it's not even a raspberry pi, your software is running on a potato chip, you're having too high expectations
>>
>>59686112
No, I'm going to use uLisp.
>>
>>59686329
Oh yeah, the platform in general is a massive meme. Give me an ARM M0+ already, or even better a proper piece of hardware.
>>
>>59683809
Starting to get some great frameworks too, been using Gin with mongodb for a recent API microservice project.
For example to create a user you can use:
func Create(c *gin.Context) {
db := c.MustGet("db").(*mgo.Database)
var user models.User
if c.BindJSON(&user) != nil {
c.JSON(http.StatusBadRequest, gin.H{"code": http.StatusBadRequest})
return
}

timestamps := time.Now().Unix()
user.CreatedOn = timestamps
user.UpdatedOn = timestamps
user.Id = bson.NewObjectId()

// hash password using bcrypt
password, err := bcrypt.GenerateFromPassword([]byte(user.Password), bcrypt.DefaultCost)
if err != nil {
c.JSON(http.StatusBadRequest, gin.H{"error": err})
return
}
json.Password = string(password)

err = db.C(models.CollectionUser).Insert(user)
if err != nil {
c.JSON(http.StatusBadRequest, gin.H{"error": err})
return
}
>>
>>59686329
try working on a ESP8266, it's even more of a potato...
>>
>>59684014
(print "Hello, World!")
>>
>>59686407
I've been using Gin + Melody to create my own multiplayer browser game. Go is awesome for this because it uses so little memory compared to Python and Ruby.
>>
>>59686407
if err != nil, the language
>>
>>59681726
Iirc sizeof(void) is undefined so any mallocs to void* or pointer arithmetic will be undefined.
>>
>>59686438
seems like a good application of Golang, it's really a good match with all network related stuff. Which is not really surprising since google made it (distributed stuff)... I really enjoy the fact that it's really fast to write and the concurrency aspect of it. Go routines and channels are quite fun.

>>59686446
Pretty much, at least there is addons/plugins which does that for you.
>>
>>59681677
>>59682974

I know this is not /r/, but I FUCKING WANT all of this trap programming doujin rewrite shit. It's GENIUS.

Please. Someone has to have them.
>>
I thinking about exclusively programming in Fantom, thoughts?
>>
writing a cli based book reader for .txt files. Here's a demonstration:

http://collinoswalt.com/res/test.webm

What license should I release it under? I'm leaning MIT
>>
>>59686601
MIT, always MIT.
>>
>>59686601
GPLv3
>>
>>59686601
AGPLv3
>>
>>59686601
Proprietary, only cucks give things away for free
>>
Anyone use PyPy? I ran tests on 3 small scripts and it was slower than Python3 in each case.
>>
>>59686680
Post the code you benchmarked.
>>
>>59681677
Writing code to simulate the combination and passing on of genetics to create a new person. It's for a shitty game I'm making in my free time.
>>
>>59686717
print("Hello World")
>>
>>59686728
retard
>>
>>59686739
Why is it slow doe?
>>
>>59686728
do some research, https://pybenchmarks.org/u64q/pypy3.php
>>
>>59686728
Are you serious?
>>
>>59684252
Be patient. Game programming happens to use some of the more elaborate concepts.
>>
>>59686721
Genetic algorithms.

I did something with it using birds:

http://collinoswalt.com/biology/

but they start inbreeding and eventually achieve singularity which results in suboptimal breeds.
>>
>>59684339
I used it for data analysis, ML and other more general statistical tasks. It's fine for its domain. Definitely benefitted from knowing how to invoke C for monte carlo simulations but most things can already be done natively or with a library.
>>
Trying to write first super simple erlang program. Not sure what I'm doing wrong:

-module(battle).
-export([fight/3]).
fight(attack, hp, att) -> hp - att.
>>
>>59686786
What's the problem?
>>
>>59686805
Loads into the erlang console fine with

C(battle).

But I'm having trouble calling it

Battle:fight(attack, 100,50).
>>
Need some advice /dpt/.

I've got 2 options
>stay in shitty paid junior web dev position while gaining a university grade qualification and has high job security and flexibility and i use standard wamp stack
>move to junior dev position with 3 times my current pay BUT low job security and can use wamp stack but also must learn java and will be under very high scrutiny and pressure due to regular work reviews

what do?
>>
>>59686841
My advice is don't listen to /dpt/'s advices regarding professional decisions.
>>
>>59686841
I'd go second push yourself to improve quickly if you have the chance.

Even if you fuck up and get fired you'll have gained a lot of skills and maybe saved some money up.
>>
>>59686837
Differences in capitalization maybe?
>>
I've heard that you can get into dev jobs without a degree as long as you have the proper certifications.
Is this true?
If yes, how do you go about getting said certifications?
>>
>>59686906
thanks but was just typing on phone while shitting and it overcapitalised. No capitals in real. Get this error:

** exception error: no function clause matching battle:fight(attack,10,5) (battle.erl, line 3)
>>
How do you deal with the reality of floating point numbers when you want to do precise things?
>>
>>59681856
If I forked C++ and added a bunch of nonsense syntax which would only make code less coherent by there being loads of ways to do the same thing, would you call C++ obsolete?
>>
>>59686990
You can't do any of that because you're too retarded.
>>
>>59686717
obviously not >>59686728

import sys
import requests

if len(sys.argv) < 2:
print('You forgot to specify a cryptocurrency.')
sys.exit()
elif len(sys.argv[1]) > 3:
coin = sys.argv[1].lower()
else:
coin = sys.argv[1]

res = requests.get('https://api.coinmarketcap.com/v1/ticker/')
cap_data = res.json()

for data in cap_data:
if coin == data['id'] or coin == data['symbol']:
price_usd = float(data['price_usd'])
day = data['percent_change_24h']
week = data['percent_change_7d']
coin = data['symbol']
else:
pass

print(coin)

try:
price_usd
except:
print('Invalid cryptocurrency.')
sys.exit()

res = requests.get('http://api.fixer.io/latest?base=USD')
rate_data = res.json()
rate = rate_data['rates']['GBP']

price_gbp = price_usd * rate

print('''USD: ${} GBP: £{}\n24H: {}{} 7D: {}{}'''.format(round(price_usd, 2),
round(price_gbp, 2),
day, '%',
week, '%'))


import time, json, Levenshtein

term = 'Affordability'

def open_pls(filename):
with open(filename) as js:
py = json.load(js)

return py

keys = open_pls('glossary.json')

class StrCompare():

def __init__(self, phrase, keys):
self.phrase = phrase
self.keys = keys

def generator(self):
for key in self.keys:
yield key, Levenshtein.ratio(self.phrase, key)

def get_entities(self):
entities = {key: ratio for key, ratio in self.generator() if ratio > 0.5}

entities = sorted(entities, key=entities.get, reverse=True)[:3]

if len(entities) is 0:
entities = None

return entities

CompareObj = StrCompare(term, keys)
print(CompareObj.get_entities())


Last one just uses a for loop instead of a generator.
>>
>>59687019
What do you mean I can't do that? I can just copy the C++ standard and define my own by adding one page, doesn't even have to have a compiler supporting it.
>>
>>59686961
Use a variable precision representation.
>>
File: Trigger.png (16KB, 558x337px) Image search: [Google]
Trigger.png
16KB, 558x337px
this really triggers me coming from Java
>>
>>59681677
I need some /g/ advice. I'm looking to start a pretty big spare time project but not sure if I'll be anywhere near successful in ~a year.

Idea:
- Build a scheme-ish dialect with parser (by Norvig's example)
- Define x64 ASM equivalents for native functions (if, add, define, ... maybe print)
- Have a python script parse the language and convert to ASM equivalents
- Write the language's standard lib in the lang itself, implementing other basic stuff (while, printf, whatever)
- Rewrite the parser/ASM transpiler into the language itself
=> Language can now compile itself

Any big problems I'm going to encounter? Any chance of (moderate) success?
>>
File: Cathedral.webm (3MB, 1920x1080px) Image search: [Google]
Cathedral.webm
3MB, 1920x1080px
WPF>Winforms
>>
>>59687145
Successful in what way? That other people might use your dialect of LISP?
>>
>>59687154
QT>>>everything
>>
>>59687154
the fuck are you doing, english pls
>>
>>59686961
Use C and
long long double
>>
>>59687173
The program that you have just witnessed blocks the traffic of the given websites on the computer where it ran and on all the connected devices.
>>
>>59687154

>2017
>being a slavshit
>>59687172
GTK > everything
>>
>>59687188

shitty implementation of iptables
>>
>>59687129
string name;
name = "Lenny";

fix'd
>>
>>59686961
Use fixed point instead.
>>
>>59687189
>>59687199
It's just a very simple program that edits the hosts file locally and on the local network.

It was made for my old classmate because she complained about his son accessing stuff that the Church counts as a sin, I won't make it shiny.
>>
File: KWC_rooftop02 (1).jpg (132KB, 1063x696px) Image search: [Google]
KWC_rooftop02 (1).jpg
132KB, 1063x696px
>>59687231
>writing censorship software

No wonder you're a slav, comrade
>>
learn
https://www.youtube.com/watch?v=IEhwc2q1zG4&t=0s
>>
>>59687160
Build something that actually compiles itself from scratch
>>
>>59687266
Use Lisp Flavored Erlang instead.
>>
test
>>
>>59687231

If you're helping some religious woman censor the world from her son... I don't think you're doing the right thing.

Especially considering the hypocrisy with you posting on this board of all places.
>>
>>59687345
The author of a software is not responsible for the use of his/her software.

She asked for help so I provided assisstance I won't judge her beliefs.
>>
>>59687408
>>59687408
>>59687408

new thread
>>
File: dpt.jpg (200KB, 800x1000px) Image search: [Google]
dpt.jpg
200KB, 800x1000px
>>59681696
>>
>>59686760
Cool stuff man
>>
    //first Query in assignment
static void query1(String tableName)
{

Table table = dynamoDB.getTable(tableName);

HashMap<String, String> expressionAttributeNames = new HashMap<>();
expressionAttributeNames.put("#Y", "Year");

DynamoDBMapperConfig mapperConfig =
new DynamoDBMapperConfig(DynamoDBMapperConfig.ConsistentReads.CONSISTENT);

Map<String,AttributeValue> eav = new HashMap<String,AttributeValue>();
eav.put(":val_T", new AttributeValue().withS("The P"));
eav.put(":val_Y", new AttributeValue().withN("2005"));


DynamoDBQueryExpression<RottenTomatoes> queryExpression = new DynamoDBQueryExpression<RottenTomatoes>()
.withKeyConditionExpression("#Y = :val_Y and begins_with (Title, :val_T)")
.withExpressionAttributeNames(expressionAttributeNames)
.withExpressionAttributeValues(eav);
;


List <RottenTomatoes> rt = mapper.query(RottenTomatoes.class,queryExpression);


}


console keeps saying that the Query Key condition not supported. Any ideas?
>>
File: 1484884169560.png (207KB, 820x915px) Image search: [Google]
1484884169560.png
207KB, 820x915px
>>59684014
https://pastebin.com/Gi5MXVLf
>>
>>59684737
Rust.
>>
>>59684802
>you've got move constructors
Rust doesn't have constructors at all.

>(but not at the level C++ can do)
Rust generics are better than C++'s.
Thread posts: 324
Thread images: 46


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