[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: 329
Thread images: 42

File: 1483888965724.jpg (105KB, 473x496px) Image search: [Google]
1483888965724.jpg
105KB, 473x496px
EXPERT PROGRAMMER edition

Old thread: >>58388167

What are you working on?
>>
File: 1482055600767.png (818KB, 1280x719px) Image search: [Google]
1482055600767.png
818KB, 1280x719px
Functional programming.
Last /fpt/: >>58332039

Resources:
>Erlang
http://learnyousomeerlang.com/content
>>Elixir
http://chimera.labs.oreilly.com/books/1234000001642/index.html
http://elixir-lang.org/learning.html
>F#
http://fsharp.org/learn
>Haskell
https://en.wikibooks.org/wiki/Haskell
https://0x0.st/pbp.pdf
>Lisps
>>Common Lisp
http://gigamonkeys.com/book
http://www.cs.cmu.edu/~dst/LispBook/book.pdf
Paul Graham's ANSI Common Lisp
On Lisp
Common Lisp Recipes
Land of Lisp
>>Clojure
http://www.braveclojure.com/foreword/
The joy of Clojure
>>Scheme
Little Schemer
The Seasoned Schemer
The Scheme Programming Language by Kent Dybvig
Realm of Racket
Lisp in Small Pieces
>OCaml
https://realworldocaml.org/
http://ocaml.org/learn/tutorials/
>Scala
Functional Programming in Scala (Chiusano and Bjarnason)
Atomic Scala (Eckel and Marsh)
Programming Scala (Wampler and Payne)
Programming in Scala (Odersky, Spoon and Venners)
>Web languages
>>Elm
https://guide.elm-lang.org/
>>PureScript
http://www.purescript.org/learn/

>Theory
SICP
Essentials of Programming Languages
Practical Foundations for Programming Languages: http://www.cs.cmu.edu/~rwh/pfpl.html
How to Design Programs: http://www.ccs.neu.edu/home/matthias/HtDP2e/
Art of the Propagator
An Introduction to Functional Programming Through Lambda Calculus
>>
>>58393114
This is a link to Essentials of Programming Languages:
https://karczmarczuk.users.greyc.fr/TEACH/Doc/EssProgLan.pdf
>>
>>58393135
Thanks.
>>
I built random project generator.

I know it's filthy web dev, but I think that we are bored enough to need it.

I am a lisper otherwise, javascript just feels so creaky. Better than clojure though.
>>
>>58393177
>COBOL
>using functional programming
Doesn't compute
>>
>>58393176

And THIS is a link to 'Art of the Propagator'.

http://web.mit.edu/~axch/www/art.pdf

Considering how much of a turboautist you are about this /fpt/ thing, you really haven't done a very good job.
If I get bored later I'll find more links, but I know for a fact that several of the LISP ones are readily available online. Maybe have a go yourself?
>>
>>58393192
Well I guess writing an interpreter for functional lang is implied.
>>
What would be the best word to describe the aesthetics of 4chan? Web 1.0?
>>
>>58393217
Web 1.7
>>
>>58393217
You were never on Web 1.0 I see.
>>
>>58393232
Nah, I was like 3 then
>>
How do I do something like Ada's protected types (mutex guarded resource(s)) in C++?
>>
>>58393217
If you haven't seen web 1.0 before, check out https://stallman.org/
>>
>>58393229
Underrated post.
>>
File: 1467876083137.jpg (62KB, 873x927px) Image search: [Google]
1467876083137.jpg
62KB, 873x927px
>>58393092
>>58393114
Thank you for using anime images!
>>
>>58393246
Fuck, I feel old now.

3year olds during web 1.0 are old enough for 4chan already?

>>58393214
Also, this project is the best one generated yet.
>>
web 1.0 was better than what we have now dbh
>>
>>58393284
My favourite part is that it can't spell 'algorithm'.
>>
>>58393210
>you really haven't done a very good job
I don't do any job.
I only post links and books provided by other anons.
>>
File: 1460338822009.jpg (184KB, 1920x1080px) Image search: [Google]
1460338822009.jpg
184KB, 1920x1080px
>>58393281
Thank you for using an anime image as well!
>>
>>58393299
Yeah, correct would be algorism, which was greek derivative from arabic title of some math book. But then Euclid happened.
>>
>>58393302
>you really haven't done a very good job
>I don't do any job.
>I only post links and books provided by other anons.
Exactly.
>>
>>58393302
Friendly tip: most of the books are in a giant torrent on installgentoo wiki, and the ones which aren't you can find with this search engine for pirated tech books: http://gen.lib.rus.ec/
>>
File: Help.png (183KB, 1195x943px) Image search: [Google]
Help.png
183KB, 1195x943px
I always hear how great open source is, but every time I try to use someone else's code, I either get tons of errors or I cannot even figure out how to open it.

How do I get this to open in Visual Studio?
>>
do you listen to anything while programming?
>>
>>58393316
it's an attempt to write down the name of al khwarizmi
i think i learned this from that algorithms book by vazirani et al
>>
>>58393284
>3year olds during web 1.0 are old enough for 4chan already?

I'm turning 19 this year.

>>58393255
I don't want this. I just want a word or a phrase to articulate the look and feel of 4chan, to me it looks like the 90's which I assumed was Web 1.0.
>>
>>58393367
https://www.youtube.com/watch?v=aHk42kDwesM
>>
originally posted >>58393069

and here is my code in response to
>>58393002

#include <stdio.h>
#include <cs50.h>

int main(void)
{
int height;
printf("What is the height of the pyramid?\n");
height = get_int();

do {
printf("The pyramid cannot be higher than 23 feet!\n");
printf("Try again!\n");
printf("What is the height of the pyramid?\n");
height = get_int(); }
while (height > 23);

if (height <= 23) {
printf("The height of the pyramid is %d feet high!\n", height);
}
}


So basically if I move

if (height <= 23) {
printf("The height of the pyramid is %d feet high!\n", height);
}


above

do {
printf("The pyramid cannot be higher than 23 feet!\n");
printf("Try again!\n");
printf("What is the height of the pyramid?\n");
height = get_int(); }
while (height > 23);


It will say

>"What is the height of the pyramid?"
23
>"The height of the pyramid is 23 feet high!"
>"The pyramid cannot be higher than 23 feet!"
>"Try again!"
>"What is the height of the pyramid?"
*input here*

then it ends the program.
>>
>>58393346
How can I have not done a job, if I don't do any job?
>>
>>58393359
This is a really good impression of a clueless Winbaby Pajeet, good job.
>>
>>58393381
>I don't want this
Too bad, you got it.
>I just want...
It's not web 1.0.
>>
>>58393367
https://www.youtube.com/watch?v=bWSLhMLVas4
>>
>>58393391
If you haven't done any job, you definitely haven't done a good job.

Doesn't advocating functional programming require at least simple logical thought?
>>
>>58393383
is this the fabled black magic techno?
>>
>>58393430
It's for EXPERT PROGRAMMERs only.
>>
>>58392998
In Rust, blocks are just expressions.
>>
>>58393397
I'm being serious. ;_; Is there no way to load it into VS?
>>
>>58393421
How can I have or have not done any job, if there's no job?
>>
what is Python's color?
>>
>>58393553
brown
>>
RIP PRAGUE
>>
>>58393519
Ha! I've asserted there IS a job, and that you haven't done a good job. You've only asserted that you didn't do ANY job, which together agree with my point.

Now you're trying to claim that there isn't a job in the first place, which is:
1) Moving the goalposts
2) Pretty fucking stupid: if you're going to spam every one these threads with your shite, the idea that you don't care about the quality of said shite is laughable.

As well as being a full-on turboautist, I do regularly find you to be rather dumb on direct questioning.
I remember that time I got you to keep deleting and re-posting the /fpt/, too. That was entertaining.
>>
>>58393388
>>58393388
>>58393388
pls respond
>>
>>58393553
I've always thought of it as various shades of blue.
>>
>>58393584
What seems to be the problem?
>>
>>58393584
here's your (You) faggot
>>
https://github.com/mattjj/svae
https://arxiv.org/pdf/1603.06277v3.pdf

How do I understand this.
>>
codeacademy courses are really a joke

why do people recommend them?
>>
>>58393249
You add literal mutex boilerplate to your functions
>>
/g/ I dare you to try finishing any project from here:

https://matijasi.github.io/Procedural-Project-Generator/
>>
>>58393614
>>58393623

see

>>58393388
>>
>>58393683
Stop posting your homework.
>>
>undocumented exception goes uncaught
>program immediately terminates
>plane crashes

exceptions are a bad idea
>>
>>58393672
>Make a roguelike with advanced z80 emulation in Scheme using turing machine programming.
no thank you
>>
>>58393720
>undocumented exception
>exceptions
Hmmm.
>>
>>58393672
>Make a database with curses frontend in Brainfuck using functional programming.

uhh
>>
>>58393719

>homework
just trying to learn, gayboy.
>>
>>58393765
the source code of the website
var bases = ['a shopping list', 'a database', 'an irc client',
'a chatbot', 'an irc bot', 'an operating system',
'a bootloader', 'an asteroids remake',
'a tetris remake', 'a roguelike',
'an audio player', 'a terminal emulator'];

var features = ['machine learning', 'neural networks',
'human like ai', 'interpreter',
'domain specific language', 'web frontend',
'curses frontend', 'advanced z80 emulation',
'bead sort algorithm',
'human machine interaction',
'network of turing machines'];

var languages = ['C', 'FORTH', 'COBOL', 'Common Lisp',
'Scheme', 'Clojure', 'Racket', 'Assembly',
'C++', 'D', 'Rust', 'Go', 'Verilog', 'VHDL',
'SpinalHDL', 'Lisp 1.5', 'Java', 'Javascript',
'WebAssembly', 'Haskell', 'Brainfuck'];

var paradigms = ['genetic', 'functional', 'object-oriented',
'imperative', 'aspect-oriented',
'Hewitt\'s actor model', 'meta',
'multiparadigm', 'turing machine'];
>>
>>58393726
Love it.

That's essentially two jobs: write a roguelike for GameBoy, and write a GameBoy emulator in Scheme.
>>
>>58393791
>"human like ai"
...do you mean 'strong AI'?
>>
Text editor poll continues
http://www.strawpoll.me/12023125
>>
>>58393582
>if you're going to spam every one these threads with your shite, the idea that you don't care about the quality of said shite is laughable
I'm going to and I don't care.
And I will continue until the idea of /fpt/ will be picked on its own.

>I remember that time I got you to keep deleting and re-posting the /fpt/, too. That was entertaining.
>if you don't care much about your /fpt/ pasta, that's laughable
>if you do care much about your /fpt/ pasta, that's laughable
I've got that you are going to mock me independently from my efforts, right?

Do you have any other resources to add?
>>
File: im_with_her.png (44KB, 740x633px) Image search: [Google]
im_with_her.png
44KB, 740x633px
Did XKCD anon die?
good
>>
>>58393672
>Make a roguelike with domain specific language in Lisp 1.5 using imperative programming.

Doesn't sound half-bad
>>
>>58393672
that thing just told me to make an os in javascript
>>
>>58393791
Yeah it's trivial, I consider it a hello world.
>>
File: 1471965359594.jpg (81KB, 1280x720px) Image search: [Google]
1471965359594.jpg
81KB, 1280x720px
>look problem up
>find solution
>solution is posted by someone with an anime avatar
god bless anime
>>
>>58393833
>I'm going to and I don't care.
Oh, don't get me wrong; I want you to keep spamming, that's why I keep feeding you advice.
I see you've (predictably) missed the salient point about pretending not to care about the quality of said spam. If there 'was no job', you wouldn't listen to my advice.

>I've got that you are going to mock me independently from my efforts, right?
Hooray :)

>Do you have any other resources to add?
Christ, you really are dumb. Remember where this all started? Here: >>58393210
>you really haven't done a very good job. If I get bored later I'll find more links [...] Maybe have a go yourself?
>>
>>58393388

>What is the height of the pyramid?
>-5
>OKAY!
>>
>>58393926
>negative mass does not exist
Just because the boson is scalar, doesn't mean it's natural!
>>
>>58393945
Your dad's so bony he has negative mass
>>
File: 1483729999781.gif (493KB, 245x163px) Image search: [Google]
1483729999781.gif
493KB, 245x163px
>>58393986
Something something negative IQ?
>>
File: 1483464956838.jpg (150KB, 675x675px) Image search: [Google]
1483464956838.jpg
150KB, 675x675px
>>58394020
>>>reverse world
>>
Does Cython make Python acceptable?
>>
>>58394050
No
>>
File: 1480711057957.gif (2MB, 179x320px) Image search: [Google]
1480711057957.gif
2MB, 179x320px
>>58394037
Maargh
>>
what's some fun things to make for distributed computing?
>>
I want to use this sdl wrapper:
https://github.com/libSDL2pp/libSDL2pp
But I cannot into makefile generators. What do?
>>
>>58394139
Why not just use SFML at this point?
>>
>>58394139
All the instructions are right there m8.
make is easier than you think
>>
>>58394114
>>58393672

Just roll friend
>>
>>58393484
If you have not figured this out yet - nope. Install msys2 or plain mingw64 and do the standard autogen->configure->make thing.
>>
>>58394275
Thanks for giving me an answer. That all sounds too complicated for me, so I'm going to give up on it.
>>
File: 1476073511692.jpg (89KB, 700x525px) Image search: [Google]
1476073511692.jpg
89KB, 700x525px
>>58393914
>I want you to keep spamming
>>I've got that you are going to mock me independently from my efforts, right?
>Hooray :)
Christ, for what purpose?
I'd better be dropping that shit altogether then. If people want that shit, let people write that shit on their own.
I'm fed enough of laugh, mockery and insults.
>>
>>58394389
sfml is superior anyway, stop using sdl
>>
>>58394389
Typical Windows duckling.
>>
>>58394389
If that's too complicated for you, you're probably not ready for something like SDL anyway.
>>
File: 1482805769721.gif (4MB, 200x360px) Image search: [Google]
1482805769721.gif
4MB, 200x360px
>>58394410
>I'm fed enough of laugh, mockery and insults.
>>
>>58394446
How to open program in Windows: Double click solution file
How to open program in Linux: Read an entire manual, run 600 different programs, download 1000 dependencies, still doesn't work

The project is written in C++ and I don't even know C++ so it was a failed endeavor from the beginning.

>>58394414
>>58394484
I don't know what SDL is. It is MKVToolNix for muxing and demuxing MKV files.
>>
>>58394549
Are you joking or seriously fucking retarded?
>>
>>58394572
The Linux part was kind of joking, the rest was serious.
>>
File: Untitled.webm (2MB, 960x1040px) Image search: [Google]
Untitled.webm
2MB, 960x1040px
I've just about perfected the image text and its background gradient for browser. feels good.
>>
>>58394753
I asked in the last thread but I don't think you answered: how do you get code in three different languages to work together like that?
>>
>>58394834
that wasn't me. you were talking to a prankster. it's only one lang.
>>
What programming language should I learn if I dont want to work with other people?
>>
>>58394859
Scheme.
>>
>>58394859
Haskell
>>
>>58394871
Not NEET enough. It's about to break into the top 20 on TIOBE.
>>
>>58394886
Upon review, it's now 38. Bizarrely, it was 23 last month.
>>
>>58394902
Rust stealing userbase?
>>
>>58395059
If Rust wants to siphon the SJWs away from Haskell, it has my full support.
>>
Hello, can someone outline the use casese of NumPy?
>>
>>58394834

I'm curious why you think there are multiple languages indicated by that image.
>>
>>58394834
The Anon who said he used three languages to write it was only pretending to be browser-Anon.

Browser-Anon has been working on that thing for a LONG time, not just the four months claimed by the impersonator.
>>
>>58395088

Anything scientific.
>>
File: 1483248907752.png (602KB, 963x720px) Image search: [Google]
1483248907752.png
602KB, 963x720px
I decided I could make my first simple game so I wanted to make hangman which I will read words from a file and pick it randomly excepts I can't make it work.
FileInputStream in = new FileInputStream("words.txt");
BufferedReader br = new BufferedReader(new InputStreamReader(in));
String strLine;
while((strLine=br.readLine())!= null){
String[] s = br.readLine().split(" ");
for(String index : s)
filearray.add(index);
}
in.close();


I get an error at "String[] s = br.readLine().split(" ");" which is pretty much reading the line in the file and splitting into words. I should just hang myself instead.
>>
>>58395111
>a LONG time
yep, since Aug 3 2010. and there was a predecessor that's at least 3 years older. so yeah, 10+ years.
>>
>>58395141

Maybe you want to split strLine instead of calling readline() again inside the loop.
>>
> https://sjwlist.com/LambdaConf_Open_Letter
Is there a paradigm free of SJW?
>>
>>58395238
assembler
>>
All these monads are giving me a pain in my gonads.
>>
>>58395238
>ttps://sjwlist.com/LambdaConf_Open_Letter
>Functional programmers getting cucked.
Who would've known.
>>
>>58395225
I was hesitating to say 'as long as I've been here' (which translates to "at least since 2009-2010"), but I'm glad I wasn't too far off the mark.

Now that we have established that the guy in the last thread was in fact a big fibber, would you tell us more about "browser #n"? For example:

>language (and reason for choice)
>SLOC
>vcs, if any
>version history
>features
>future features/direction
>>
Hey, I want to learn C, should I got straight to K&R or are there better choices with less -posible- bad practices?

I was reading as well Modern C by Jens G. and didn't understood shit.

I was thinking about King's: Modern C.
>>
>>58395314
K&R C is great for writing ANSI C.
>>
>>58395230
>split strLine instead of calling readline() again inside the loop.
I tried but "The method split(String) is undefined for the type BufferedReader".

Anyway, I already could make it work but I had to separate one word for each line instead of one line and spaces. I wanted to make it using spaces instead of lines.
>>
>>58395326

Wat. strLine is a String. Did you try strLine.split(" ") ?
>>
>>58395141
>split(" ");
shouldnt this be split(' ') //one apostrophe?
>>
>>58395141
it may not be as nice, but try this

while(true)
{
var x = br.readline();
if(x == null) break;

//rest of code
}

I think in the second br.readline, it reads the next part. This could give an exception error the one in the while condition was the last one, and the assignment to s reads again but it goes out of bounds,
>>
>>58395325
what should I read after finishing it?
>>
>>58394902
Mine says 41
>>
>>58395383

Probably not.

What split() expects is actually a regular expression pattern. It can be much more complicated than a single character.
>>
>>58395457

You should read the source code to a few C programs you like to use.
>>
dpt how hard would it be to make a collectivist village of programmers in usa?
>>
>>58395457
You could try to go back to reading the book you didn't understand, because K&R C covers the language as a whol, yet wriiten in plain English.
>>
>>58395474
That's weird. Think it varies by region?
>>
>>58395500
Oh I'm stupid, I thought you were talking about rust.
>>
File: Untitled.png (301KB, 1454x1080px) Image search: [Google]
Untitled.png
301KB, 1454x1080px
>>58395310

>language (and reason for choice)
a flavor of BASIC, because even a dummy like me can do it
>SLOC
lines of code? over 24,000 including comments and blank lines.
>vcs, if any
none
>version history
>features
changelog and readme can be found here: http://pastebin.com/H4HUmW4R
>future features/direction
nothing big. just small improvements here and there.
>>
>>58395498
why would you want to try communism again
>>
>>58395542
Do you know any other languages?
>>
>>58395568
I mean, it's really small scale, it usually works small scale. It's more a matter of wanting to be part of something. Cults have proven that it works fine. would work better without some demagogue exploiting it.
>>
Why don't c++ devs extern "C" their headers?
They could still use the faggy sepples features in the implementation but they could make their libraries available to actual programmers too.
>>
>>58395488
>>58395499

alright, thank you guys.
have a good day.
>>
>>58395498

Probably not all that hard. Just go to San Francisco and start passing out fliers for joining your hippie commune.
>>
>>58395597
Because it will put them back in 1989.
>>
>>58395611
I'd not necessarily like it to be hippie though.
I was thinking only people that wear striped thigh high socks.
The problem isn't getting people, I can find willing people. I'm thinking infrastructure.
>>
File: topukeko.png (163KB, 500x500px) Image search: [Google]
topukeko.png
163KB, 500x500px
>>58393672
>Make a bootloader with network of turing machines in C using functional programming.

top kek
>>
>>58395582
not really. I familiar with the winapi and C, and have dabbled in C++, C#, python, js, vbs, and assembly, but my brain mainly only likes BASIC. And I generally loathe OOP.
>>
>>58395597
>no methods
>no namespaces
>no templates
>no references
>no standard library
Gee anon, I don't know.
>>
>>58395542
I'm sure that if you can maintain a 24k SLOC project over three years, you are capable of learning Python (or Ruby, or even C# if you love .NET).

I note that browser #112 cannot handle /f/, apparently due to layout differences. Are you using the 4chan JSON API?
>>
>>58395676
>vbs
>BASIC
Well?
>>
>>58395682
>4chan JSON API?
no, browser predates the API and the catalog by a few years. I've looked at the API but didn't see anything worth using.
>>
>>58395698
It would allow you to handle /f/, and be nicer to Jap-m00t, and be a more elegant solution.
>>
>>58395666

If it's a commune, they'll all be hippies. People who wear striped thigh high socks are a dime a dozen in San Francisco. It's the gay capital of the world. As for Infrastructure... build it yourself, you damn commie!
>>
>>58395687
well what?

>>58395708
how would it be nicer?

I don't care enough about one unique board layout (/f/) to add support for it.
>>
>>58395715
Striped thigh-high socks are not just for the homosexuals, Ruby.

>>58395729
It would be nicer because it would be less load on the servers.
Furthermore, you could excise whatever HTML-parsing code you have in there.
>>
>>58395715
>build your own fiber connection
>>
>>58395755
>>>/diy/
>>
>>58395749
>Striped thigh-high socks are not just for the homosexuals
Yes they are.
Stop deluding yourself, you closet fag.
>>
>>58395749

You're right, they're also for transgenders, who are also all over the Bay Area, I imagine.

>>58395755

You could always pay someone to build it, but then you'd be supporting capitalism.
>>
Any programmers here? I wanna kick your arse.
>>
>>58395775
>>58395785
They're not just for aspiring SJWs; they're also for transvestites and EXPERT PROGRAMMERs.
>>
>>58395785
>but then you'd be supporting capitalism.
I'm pro-capitalism, hence not a fan of the hippie thing. It's more about having a group to grow with together within the greater capitalist system. And that's why I'm asking, how hard would that be? what would be the initial investment to establish something like that?
>>
>>58395840
>I'm pro-capitalism
Prove it.
>>
>>58395749
>less load on the servers
highly unlikely.
loading all of a board's OP thumbnails (which is also what the catalog does) currently consumes about 1.3MB on /g/. browser then refreshes the main index page every so often, which takes very little data since it's compressed html, and even less data when 304 Not Modified is returned.

I really doubt the API could consume less server resources than browser.
>>
>>58395871
C# is my favorite language and all my software is proprietary.
>>
>>58395891
>my software is proprietary.
fizzbuzzes?
>>
>>58395840

Then the proper question might be, "how do I make my own municipality." To which I say, take over an existing ghost town, clean the place up, get a bunch of Northern Californians to join you, and get an ISP in a nearby town to lay down some cable for you guys. And yeah, believe it or not, there are quite a few ghost towns in the US, abandoned for one reason or another.
>>
>>58395875
Does it not allow you to view threads?
>>
>>58395930
the group would still be collectivist though. but you're right, maybe I should have phrased it like this just to get the right answers.
does california have a lot of ghost towns? I could imagine that on the central usa, but a growing, healthy state like california?
>>
File: 1370898721757.jpg (23KB, 255x255px) Image search: [Google]
1370898721757.jpg
23KB, 255x255px
>>58393255
> The Apple CEO met with the troll and said: "Tim Cook from Apple, I'm here to talk to the President-elect about the things we can do to help you achieve your stated goal."

This text was transcribed from a video recording. I can't offer a reference because the web site requires nonfree Javascript code.
>>
>>58395937
sure, optionally.
but it only downloads a thread when you request it (when the option is enabled and when you try scrolling to replies that browser hasn't seen yet). and it only downloads images on demand (right when it appears on the screen).

and regarding the threads, browser tries to obtain ALL new posts from the main index page. it does not load every thread.
>>
File: gm_flatgrass0001.jpg (72KB, 1920x1080px) Image search: [Google]
gm_flatgrass0001.jpg
72KB, 1920x1080px

#include <stdio.h>
#include <cs50.h>

int main(void)
{

int height;
do
{
height = get_int();

}
while (height >= 24);

/*How many rows to print (how many times the height is printed) */
for(int i = 0; i < height; i++) {
printf("\n");

for(int j = 0; j < height-i-1; j++) {
printf(" ");
}
for(int k = 0; k < i+2; k++) {
printf("#");
}
}
}



It works but I don't know how the fuck it works.

mainly this part

for(int i = 0; i < height; i++) {
printf("\n");

for(int j = 0; j < height-i-1; j++) {
printf(" ");
}
for(int k = 0; k < i+2; k++) {
printf("#");
}
}


Basically it outputs a "pyramid" based on the height.

>5
##
###
####
#####
######

can someone explain this to me like im a retard please. i have a massive headache.
>>
>>58395972
>Humor
>Someone posted that he had a futon for sale, so I responded with this message:

>The futon is the elementary particle of the hack field. If you have succeeded in isolating a futon, have you measured its properties? For instance, what is its mass? Did you ever experience a magnetic moment on it and get a charge? Does it appear strange? Does it have charm? Has it been slepton? Can it interact with Schrodinger's cat to create virtual muons?

>If you intend to sell the futon, I think you ought to tell potential buyers what its half-life is, and what it decays into. Pillows and sheets? Some nearly massless bedbugs?

>On the other hand, if it's a stable futon, what kind of animals were using it, and did they associate any dark matter with it?

Comic. Fucking. Genius.
>>
>>58395875
The JSON can also be sent compressed and an API client can also send If-Modified-Since.

The API client also doesn't need the JS/CSS resources the browser does.

The difference is minimal but an API client does transfer less data(if written correctly).
>>
>>58395988
to add to that, if browser is left running long enough, it can see ALL posts in ALL threads on a board simply by refreshing the main index page. this is especially true on a fast board like /b/, where the oldest thread might only be 6 hours old.

I've put tons of effort into making sure browser is a good citizen and doesn't rape the server.
>>
>>58396031
>I've put tons of effort into making sure browser is a good citizen and doesn't rape the server.
That's very thoughtful of you. In this spirit, I would recommend you utilise the JSON API.
>>
>>58396029
>JS/CSS resources
browser does not load those. as far as it's concerned they don't exist.
>>
>>58393404
4chan is pretty Web 1.0ish without extensions.
>>
File: IMG_5884.jpg (1MB, 2272x1704px) Image search: [Google]
IMG_5884.jpg
1MB, 2272x1704px
>>58396027
>Humor
>Here I am struggling to open a bottle of water.
>>
>>58395970

Yes.

https://en.wikipedia.org/wiki/List_of_ghost_towns_in_California
>>
>>58396054
Hence "Web 1.7".
>>
>>58396073
why +0.7?
>>
>>58396100
Where are you right now?
>>
>>58395992
maybe this simpler implementaion will help :3
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char **argv) {
int i = 0;
i = atoi(argv[1]);

int j = 0;
int k;
for(; j<i; j++) {
k = j+1;
while(k--) putchar('#');
putchar('\n');
}

return 0;
}
>>
>>58393255
What's your favourite pun?
https://stallman.org/puns.html
>>
>>58396064
thanks.
Now that I think about it, maybe a commune like this would be infested with autistic "such a nerd" types. will have to find a way around that.
>>
>>58396136
https://stallman.org/images/cabin-baggage.png
>>
>>58396147
Restrict membership to those who have achieved Satori.
>>
>>58396127
On the four-chan
>>
>>58396064
most of these seem to have no houses.
>>
>>58396181
ghosts dont need houses retard ask /x/
>>
>>58396172
Which board are you upon within the four-chan?
>>
>>58396207
ni-channeru
>>
>>58396223
And now append '%' to the number we discussed earlier, and consider its meaning within [whatever you just said].
>>
>>58396147

Well let's put it this way: Most of the ghost towns in the US are ghost towns for a reason. They're old mining towns out in the desert and far from civilization. You would have the land, and some buildings, but you'd need to lay down pipes to get water from elsewhere, and cable to get Internet from elsewhere. You'd also need to get food delivered to you because nothing will grow there. When I said "clean the place up," that was a bit of an understatement. Everywhere worth living in is already being lived in, so you would have to take a shit town and make it worth living in. That on its own will detract most of the autistic "such a nerd" types, because they don't want to do real work. The problem, of course, is that since you want to fill your commune with programmers that all wear striped thigh high socks, the only type of people you will let in are autistic "such a nerd" types. Most of them will probably be SJWs too, since the idea of living in a commune only really appeals to SJWs.
>>
>>58396233
1.7% within 2channel?
>>
>>58396260
Narp.
>>
>>58396280
but what then?
>>
>>58396251
Well delivery can't be that expensive when you buy in bulk? if we're like 100-200 people we might even save relative to buying from a store.
piping sounds like it'd be insanely expensive though. are we talking tens of millions here? and if they're too far off I imagine internet would also be retard-money.
>>
Exceptions or return codes or disjunctions?
>>
File: images.png (5KB, 219x230px) Image search: [Google]
images.png
5KB, 219x230px
There isnt a link to c++ language
>>
>>58396365
You need a link to the English language, desu
>>
>>58396363
Exceptions are fucking cancerous.
Optional types are where it's at.
>>
>>58396363
A failure propagating effect that can be handled by either disjunctions or exceptions.
>>
how do you take
webbrowser.open
with a def that takes two arguments?
>>
>>58396403
Too bad no languages support them well other than Haskell
>>
>>58396513
Rust
>>
>>58396363
MonadError and ExceptT
>>
>he doesn't use an ergonomic split keyboard to program
>>
How do I into C++?
>>
>>58396660
You learn C first, develop some good taste in programming languages, and then get repulsed by C++.
>>
>>58396635
Seems like this would make it even harder to type while masturbating.
>>
>>58396675
But it speeds up programming because you don't need to use your thumb for the spacebar.
>>
>>58395970
If you fail to demonstrate that you are indeed pro-capitalist within 10 minutes you can forget about it. I am already forming a militia to hunt you and your communist friends down.
>>
>>58396444
webbrowser takes the following args
webbrowser.open(url, new=0, autoraise=True)
>>
>>58393284
2nd year in CompSci at mid-tier university. I was born in 1997. Hadn't heard of 4chan until 2008.
>>
>>58396788
>10 years old
Get the fuck out.
>>
>>58396813
>1997

>inb4 i was just pretending
>>
>>58396813
I was a shut-in faggot, what can I say? Most of my summers were spent on the computer rather than making friends or going outside. It's not like I could competently post or anything.
>>
I graduated a few months back but took time off to move states and do some traveling. Now I need to get back into programming while looking for a job, so what kind of projects should I do to ease into everything again?
>>
Been programming Scala for 6 years and sick of it.

What are some less painful languages that are popular among employers?
>>
>>58396962
Implement a CHIP-8 interpreter.
>>
Hi. This is a C++ program I just wrote.

It's not necessarily original but I did it to practice using some concepts. How is it?

This is my fifth day writing/learning the language (total noob).

 
/* A simple C++ program for the n(n+1)/2 formula */
#include <iostream>
using std::cout;
using std::endl;
using std::cin;

int main()
{
cout << "I'm thinking of a number of 1 through...:" << endl;
int balls = 0, val = 1, sum = 0;
cin >> balls;
while (val <= balls) {
sum += val;
++val;
}
cout << "The sum of 1 through " << this << ", inclusive," << endl;
cout << " is:" << sum << endl;
return 0;
}
>>
File: -3.png (113KB, 512x512px) Image search: [Google]
-3.png
113KB, 512x512px
how do I make my text editor cute?
>>
How do you program is assembler with OS?
Aren't you supposed to work with hardware directly when programming in ASM? What OS for then?
>>
>>58397018

Why are you putting curlies on the same line in one place and separate lines everywhere else?

WTF is "balls"? If you're going to use terrible variable names, at least declare each variable on a separate line with an explanatory comment.

Why aren't you validating your input? I can enter -1 "balls".

'using' statements are horrible.
>>
File: macOS-Sierra-Tabs-in-TextEdit.png (47KB, 850x665px) Image search: [Google]
macOS-Sierra-Tabs-in-TextEdit.png
47KB, 850x665px
>>58397041
Use textedit in MacOS and then rice it with anime girls like everyone else here
>>
>>58397041
Spam anime girls all over it in some way.
>>
>>58397018
*replace this with balls
>>
>>58397045
>How do you program is assembler with OS?
A question I've always wondered.
>>
File: Screenshot_2017-01-08_19-09-58.png (1MB, 1920x1079px) Image search: [Google]
Screenshot_2017-01-08_19-09-58.png
1MB, 1920x1079px
>>58397041
Anime girls
>>58397045
Programming in assembly doesn't necessarily give you direct access to the hardware, the OS will still be in your way
>>
>>58397062
Why textedit? That doesn't look cute at all.
>>
>>58396994
>less painful
>popular among employers
You're fucked.
>>
File: übermeme.png (8KB, 200x200px) Image search: [Google]
übermeme.png
8KB, 200x200px
Friendly reminder that Python3.x is not turing complete.
>>
>>58397045

Any executable can be written in assembler.

The operating system is responsible for booting up, for loading executables, interfacing with the user, etc.

If you find this confusing, write some C code. Then tell the C compiler to compile to assembly. Then thing about that for a minute.
>>
>>58397100
this tbqh
>>
>>58397100
n i c e
m
e
m
e
>>
File: 1483865588206.jpg (46KB, 463x462px) Image search: [Google]
1483865588206.jpg
46KB, 463x462px
>>58396251
i don't know what you're saying
>>
File: tim-cook.jpg (308KB, 1280x720px) Image search: [Google]
tim-cook.jpg
308KB, 1280x720px
>>58397102
>tfw my only experience in any kind of assembler language was Shenzhen io
>>
One day I will understand what interfaces are for and actually use instead of bloating my code.
>>
Document stores are either dead or broken. Please do not fall for the NoSQL meme, like did.
>>
>>58393834
Did randy trigger you?
>>
>>58393886
>look problem up
>find solution
>solution is posted by someone with an anime avatar
>have to disregard their solution even though it is perfectly valid because our lord Jesus Christ considers anime sinful
feelsbadman.jpg
>>
>>58394859
Forth
>>
>>58396251
>>58397219
>>58397092
>>58397003
>>58396788
>>58396671

Please don't reproduce
I met many retarded people in my years on this site but you easily made it into the top 10 with this

You actually don't understand shit, so please let me give you this one advice, and please take it:
You are horribly stupid and it hurts, don't ever try to spread the shit you believe to know about anything ever again.

Now please try to think about the shit you're telling us here for at least 5 minutes and maybe you find the giant flaws in your logic all by yourself.
No one is here to give you private lessons. Maybe google or wikipedia to have a basic idea of the subject?.
If you still don't get it then, just kill yourself.
>>
>>58397455
/dpt/ seems to be generating an awful lot of copypasta of late.
>>
>>58397455
y-you too
>>
>>58395992
>>58396130
>simpler implementation
>not fucking py

str = ''
for sym in range(1, int(input()) + 1):
str += '# '
print(str)
>>
>>58397100
You just fucking triggered me apologize
>>
>>58397473
>/dpt/ seems to be regurgitating an awful lot of copypasta of late.
corrected
>>
File: no.jpg (25KB, 478x480px) Image search: [Google]
no.jpg
25KB, 478x480px
>>58397512
It's the truth.
>>
>>58397516
>>58397473
This thread is pathetic. It is not about programming. It's just a bunch of computers illiterates and first semesters memeing about whatever they just learned.

A quick search shows that most arguments used here are not original and have been copied from some trendy tech blog or other shit site.

The only real programming questions I have seen so far are from beginners(it's fine to be a beginner btw).

This entire site is shit and I don't know why anyone would regularly come here.
>>
>>58397491
>>58396130
>>58397491
putStr . unlines . map (flip replicate '#') . enumFromTo 1 =<< readLn


Give it a twiddle if you want the starting width to be 2.
>>
File: 1460835743686.png (374KB, 899x1284px) Image search: [Google]
1460835743686.png
374KB, 899x1284px
>>58397422
wat u sae???
>>
>>58397219

I'm not quite sure what you don't get about it.

Although with regards to your image there, if you have to choose between supporting LGBT vs supporting Islam, support LGBT.
>>
>>58397638
Anime posters are literally subhuman
>>
>>58397648
Don't support either; support thigh-high striped socks exclusively.
>>
File: crying.gif (607KB, 250x249px) Image search: [Google]
crying.gif
607KB, 250x249px
>>58397664
>>
Im javaboss but now learning sepples. do sepples programmer not believe in pooling? or is constructing and destructing objects not a problem?
>>
File: 1476627340286.png (198KB, 599x607px) Image search: [Google]
1476627340286.png
198KB, 599x607px
>>58397664
>>
>>58393790
http://lmgtfy.com/?q=do+while+loop+c%2B%2B
>>
>>58397672

But the majority of people who wear them are LGBT...

>>58397707

>is constructing and destructing objects not a problem
Never has been one in C++. You've got multiple ways of doing it, but the preferred method is of course to declare the object on the stack and let RAII take care of everything.
>>
>>58397648
>if you have to choose between supporting LGBT vs supporting Islam, support LGBT.

lmao

LGB is going to drop the T, btw.

and also when both are crushing you why would you support either?
>>
>>58397872

What the hell does the Q even mean, and why is only used some times?
>>
>>58397872
I'm more interested in how LGBT or Islam is crushing you.
>>
>>58397891
A better question is why isn't the L considered redundant when G means the same thing. Ls ARE Gs.
>>
>>58397891
"Queer." A lot of people use it as a catchall term because "LGBTQAD etc." is fucking unwieldy and "gender and sexual minorities" sounds like a disease
>>
File: 1483874759867.jpg (238KB, 636x937px) Image search: [Google]
1483874759867.jpg
238KB, 636x937px
>>58397904
>>
>>58397866
>But the majority of people who wear them are LGBT...
So you admit that you were making an absolute generalisation about a demographic based upon the possible attributes of some of its members?

Get the fuck out.

>>58397891
>>58397910
They appear to be trying to 'take back "queer"', much like coloured people are now self-applying the term 'person of colour'.
>>
>>58397916
"Migrants" a bit nebulous, don'cha think?

Are polish predators included? Are native German muslims?
>>
>>58397910
>LGBTQADP
And why isn't there a P in there somewhere?
>>
>>58397935
Also why does Migrant attacks in Germany have entries in Austria, and over what period of time is it.
>>
>>58397935

They probably got their statistics off one of these lovely fake news sites.

My ultraconservative, religious zealot, climate-change-denier sent me an article from one earlier today. It was full of misspellings and inconsistencies, so of course I googled the "newspaper" name and it was known fake news.

I swear to God, people are literally retarded.
>>
>>58397949
Because Austria is rightful German clay.
>>
>>58397872
The only reason you are being crushed is because you are between two of them going at each other.

>>58397924
I will admit that the majority of people whom I have seen that wear striped thigh high socks are LGBT, and I am extrapolating from that.
>>
File: 1481827367641.jpg (56KB, 720x480px) Image search: [Google]
1481827367641.jpg
56KB, 720x480px
>>58397972
>I will admit
I FUCKING KNEW IT
>>
>>58397957
you are an idiot.

https://www.google.com/maps/d/u/0/viewer?mid=1_rNT3k2ZXB-f9z-2nSFMIBQKXCs&hl=en_US&ll=51.361194439314694%2C6.969721633496192&z=6

all are documented.
>unironical use of fake news
>>
>>58397979
I am welcome to seeing your own evidence to the contrary, but I don't think there have been any formal studies on the popularity of striped thigh high socks. Therefore, observation is the best means by which I have to formulate my opinions.
>>
>>58397957
>muh fake news
anything to keep the liberal SJW bubble intact, eh?
>>
>>58397982
So, uhh, where did that image come from exactly? Because this is how your data actually looks like.


>>58398019
Yeah, the LIBERAL bubble
>>
File: 1477598686032.jpg (38KB, 500x667px) Image search: [Google]
1477598686032.jpg
38KB, 500x667px
So guys, I've finally decided on the core structure of my concatenative shell language.
I've decided to represent the two core structures (Syntax and Semantics) as monoids.
The evaluator is three lines, or six if you include the interpreter structure.
I'm pretty much set on what the syntax will be, although there is some ironing out to do with regard to system calls.
I'm currently writing a rough draft of the standard library, but I got distracting by reducing boilerplate, and I suspect I'm lumbering towards simulating variadic functions.

Has anyone else done any programming lately?
>>
>>58398026
so you just turned off everything? nice try, friendo.

here from 2016
https://www.google.com/maps/d/u/0/viewer?mid=1sKPTG4QX60NOzWOn5ZRf7zRaBrs
>>
>>58398040
Here's a snippet, if anyone is interested:

module Eval where

import Types

i :: Syntax -> Semantics
i = foldMap morphism
where morphism (Symbol n) = \s -> either i id (unsafeLookup s n) s
morphism t = return . push t
>>
>>58398051
>>58398026
>>58397982
>>58397966
>>58397957
>>58397949
>>58397935
>>58397916
>>58397910
>/dpt/ - Die Please Today
>>
>>58398040
>>58398077
I wrote some C. It's not as pretty as your Haskell.
>>
>>58398051
I turned off everything that wasn't sexual assault or rape.

By the way, there are like 2000 entries there, there are 1.5 million refugees in Germany, that leaves us with 1 in a 1300 refugees is a rapist, there were 320k sexual assaults in the USA, with 320 million inhabitants the rate is... EXACTLY THE SAME

Are you saying that Americans are also rapists or what?
>>
>>58398112
Mine will be less pretty when the harsh realities of 'unsafeLookup' are actually dealt with.

What did you write in C?
>>
>>58398077

Needs JIT.
>>
>>58398019
>>58397982

Holy shit, are you guys literally retarded?

"Boohoo someone said fake news, they must be a SJW" how are you unaware of the absolute PLAGUE of fake news sites? There appears to be a significant portion of the population (like you, possibly) who browse with their critical thinking skills turned entirely off.

"Hurr dis banner looks high quality, must be a legit news site!"

Christ. You bunch of snotty dumbfucks.

As for the "sex attacks" nonsense, I first heard about this bullshit from the same retarded uncle. He sent me another "news" piece that cited some data about an insane increase in rapes in Sweden. It looked suspicious to me, like for the given number of immigrants they'd have to be raping full-time, 24/7/365 for the numbers to add up. So I googled it and, sure enough, the numbers were fabricated by a conservative "think tank".

Just like that "no go zones" bullshit, where they asked police if they'd ever felt unsafe anywhere, and turned that into, "police won't even enter these zones!" Absolute retardation. I honestly don't understand where the drive comes from for this sort of bizarre nonsense. Like, what's in it for you personally to be pushing this anti-migrant/anti-Muslim agenda? Does it just give you a justice hard-on, because you're too dumb to realize that you're reading false information?

Or do you actually think that you're somehow tapped into the truth, and the rest of the world just doesn't understand? Do you think you're saving us? Have you been evaluated for schizophrenia?
>>
>>58398129
that's a really nice strawman, sören. but it's ok that there were over 2000 documented cases of rape in germany because niggers in the us rape at the same rate. isnt that great.
>>
>>58398040
Strung between making a UI library that mimics how DOM works and making a prompt program that makes it easier to train, save and make Neural Models
>>
>>58398133
Some serialization/deserialization stuff for my game editor. I'm trying to keep the game's assets as text where it makes sense, to make debugging easier, and so that they produce nice diffs in git.
>>
>>58398165
Niggers? Retard, most of the world has 10 rapes per 10 000
>>
>>58398163
Democrat here. Pacific Northwest.
You're a fool if you think progressives aren't armed. Shit man a lot of us served. Those of us who haven't have family who have, family in law enforcement, and so on.
I've hunted and gutted deer. I've slaughtered squirrel in potato fields. I've fought. I've wrestled. I used to skate and I've broken so many bones I've literally lost count and walked half of them off.
And there's nothing special or exceptional about me.
You're a fool if you don't think progressives are formidable. For every straw man pic you have of a faggy liberal I have a pic of a fat virgin beta orbiter with a weak stance who still flinches when he fires.
I don't presume that the alt right is not formidable. I grew up surrounded by the tea party before they became the tea party. I know what they can do. I've hunted with them.
But that's what's funny about these neolibertarian pseudofascists. They assume they're the toughest guys in the world and everyone else is soft. That's why they keep losing wars.
The south loses. Every time they flex. Progressives are ruthless when cornered. We burned Atlanta to the ground and used rape as a weapon of mass psychological operation, disrupted troops and marched right up to Jefferson Davis front door. We designed a bomb that destroyed entire cities, then we upgraded it. We invented remote control flying guns and remote control bombers..
Don't fuck with us. The south will rise again? Fine. We'll put em down again.
>>
>>58398163
things liberals disagree with or don't want to acknowledge == "fake news"

got it
>>
>>58398157
Fuck optimisations, it's a shell.
>>
>>58398129

Good job. These people are fucking retarded. Look at how desperately they cling to their bizarre, racist views.

Why don't these shithawks take their alt-right agenda and go somewhere else with it? I can't get a single tech question answered, but I've been inundated with xenophobic nonsense all day long.
>>
>>58398040
>concatenative
I've been learning forth recently so I can try to work with an old f68hc11fn board. Certainly a different experience working with this kind of language. What made you decide to make one?
>>
>>58398197

Fuck you, Powershell gets JIT'd. Gotta go fast, bruh.
>>
File: images.jpg (5KB, 228x221px) Image search: [Google]
images.jpg
5KB, 228x221px
>>58398092
You anti-Trump, Cultural Marxist morons still don't fucking get it. This guy is the ANTI-Clinton, ANTI-Obama, ANTI-politic bullshit president. Obama would tweet shit like: "Happy New Year to a proud nation of diverse people and empowered women!" You know, Trudeau shit. This guy is making it clear: The days of peak cuck are over. If you stood in his way, he's going to fuck you over.
>>
>>58398200
>bizarre, racist views.
that's it. Im with her now.

>>58398190
any point you want to make?
>>
>>58398193
>You're a fool if you think progressives aren't armed.

Wait, what? What the fuck are you talking about? Who said anything about 'progressives' not being armed?

Is this copy-pasta that I'm not getting, or did you reply to the wrong person, or are you just insane?

>>58398196
>things liberals disagree with or don't want to acknowledge == "fake news"

No, the vast number of fake news sites that make money on advertising by publishing LITERALLY FABRICATED 'NEWS' are fake news sites.

Seriously, are you guys not aware of this? It's been around for awhile, but it absolutely exploded during the election cycle.

Here's a podcast that looked into it and investigated a guy who makes a fair bit of money running several fake news sites:

http://www.npr.org/sections/money/2016/12/02/504155809/episode-739-finding-the-fake-news-king
>>
>>58398200
>>58398163
>>58398193
I guess it's fine with you as long as it's only other people who get raped, huh? Then you can tell them to just, like, get over it and stop being so racist, he was from a different culture, he wasn't used to the effects of alcohol because of his religion, it was a sexual emergency, he's definitely a Syrian refugee despite not knowing any Arabic, or whatever the excuse of the week is.

For people who claim to care about women's rights you sure seem to throw them under the bus when a group of people you can virtue signal more for comes along.
>>
Writing tests for any bullshit using gen_server behaviour is fucking painful, and nobody fucking does it. Either you have to wire up handle_call to just proxy shit to handle_info (which breaks shit) or you test everything else but the implementation, or, you be a dick and fire up the fucking thing with start_link and gen_tcp:send() in your tests.
>>
>>58398216
You mean no more Eid tweets from @POTUS? Shit, what if we offend Muslims?
>>
>>58398252
>I guess it's fine with you as long as it's only other people who get raped, huh?

Just makin' shit up right there.

I honestly have no idea what your point is. It was demonstrated that the claimed rape statistic was *wildly* inflated, and that the rape "plague" is on part with rape elsewhere.

If you want to prevent rape, mindless xenophobia isn't the way to do it.
>>
>>58398252
now you baited to hard, friendo. maybe next time.

>>58398249
I am a Pozz-Cuckold. You want to know what that is? Well, let me explain.

The normal cuckold wants just one gift from his black bull: A black child. But the Pozz-cuckold wants more. He wants three gifts. We are greedy little bitches. But first, here's how it goes.

Normally I drive in my Mercedes to a street gym where ripped blacks train their muscles, there skin shining with sweat and the air filled with their scent. I am already a bit hard just from thinking about it. Sometimes I cum a bit in my pants. I get out of the car and ask who of them has AIDS. Then they know what happens.

The black man with AIDS gets into my car and we drive to somewhere isolated. Then I take a small knife and stick it inside the hole of my penis and twist it a litte. In the cuckold community we call this the AIDS twister. Sure it hurts and causes me to bleed. But it is worth it.

Then the black man docks me until we both cum and I contract his AIDS. I already have 4 types of AIDS from this. That is the first gift. Then we drive on to my house and he fucks my wife, who has also contracted many types of AIDS. That is the second gift. And then 9 months later the third and best gift arrives: a black child who also has AIDS.
>>
>>58398249
>No, the vast number of fake news sites that make money on advertising by publishing LITERALLY FABRICATED 'NEWS' are fake news sites.
Sounds a lot like the Guardian and CNN
>>
Why is /dpt/ so shit when europosters are asleep?
>>
>>58398291
because the americaposters are awake
>>
>>58398280

Please do cite some articles CNN and the Guardian have published on fabricated events. Not simply getting some facts wrong, or covering one thing in favor of another. I'm talking about literally 100% fabricated stories.
>>
>>58398270
Want to really reduce the number of rapes? Arm women, train them to defend themselves, and give them the right to do it with stand your ground laws and castle doctrine.

Gun control only serves to disempower women, due to the general strength disparity between men and women. Gun control is anti-feminist.
>>
>>58398291
It's shit either way.
>>
>>58398321
Try the whole fucking election. Try all the fake accusations thrown at Trump.
>>
>>58398207
Couple of reasons, in descending order of importance:

1) They are incredibly clean and elegant, which are hand-wavy words that are vindicated somewhat here:
http://www.kevinalbrecht.com/code/joy-mirror/j02maf.html
2) Related to the above, they are very simple. This means I have fewer decisions to make (in contrast to LC-based languages where I start drowning in options). Furthermore, implementation is almost trivial, as demonstrated: all the time is spent in *design*, not actually implementing features/etc.
3) I haven't used a postfix language before, and a shell is a good place to try one out. Furthermore, I suspect the minimal syntax will help with terse commands (although, like all shells, I will require some nasty syntactic hacks to get it really terse).
4) Concatenative languages are closely tied to combinatory calculi, which I was reading about recently. I found this particularly interesting:
http://tunes.org/~iepos/joy.html
5) Because 'imperative' and 'functional' begin to overlap somewhat when you simplify down to the level of concatenative languages (demonstrated by Forth cf. Joy); I might take a crack at implementing a compiler later on, since I've never really had any experience of assembly.

>>58398214
I used finger trees instead of singly linked lists internally, are you happy now?


Is anyone else doing any actual programming?
>>
>>58398077
so are you defining 'i' in that snippet?
>>
>>58398364
Also note that I forgot that I was writing that list in descending order of importance.

Luckily it's pretty damn close, but point #4 should be tied with #1.

>>58398366
Not really. It's more 'what i does' than 'i the combinator', which I'm tempted to chuck in as 's k k' (fuck going fast, Ruby).
>>
/**
* Rotates the bits in a value left or right depending on ins
* Params:
* *op1 is the value to be rotated and where the result is stored
* op2 is the amount to be rotated by
**/
private void rot(string ins)(int *op1, int op2)
{
int tmp = *op1;
mixin("
asm
{
mov EAX, tmp;
mov ECX, op2[EBP];" ~
ins ~ " EAX, CL;
mov tmp, EAX;
}
");
*op1 = tmp;
}

wtf I love mixins now
>>
File: IMG_20170109_040442.jpg (37KB, 1280x633px) Image search: [Google]
IMG_20170109_040442.jpg
37KB, 1280x633px
I'm finishing my algorithm for physically accurate 2d soft shadows that can bisect the light volume and create double edged occlusion from each occluder's segment.

Since it's the first of his kind (bisecting the light radius from 2 edges was not done yet) i'll publish full source once it's done
>>
>>58398435
What's it written in?
>>
>>58398364
>>58398366
>>58398393
I would also add that I think that all *sh derivatives are fucking abominable languages, and I'd love to be able to stop using them.
This is a strong motivator to actually complete this project to a usable degree, and not just come up with a design I'm happy with only to flake on implementing it.
>>
>>58398451
Oh yes, I'm also pretty sure I can hack in lazy piping without too much trouble. That's another interesting problem.
>>
In this game there is this store that sells an item X that expire at the end of the week and a player can buy things only once each time.At the end of the week the store resets and the item X can be bought again once and expire at the end of that week. How would you implement this? In a database would you just have one entry for item X and change the expire column? Or would you have multiple unique entries in the table for the item named X and the different weeks they expire?

Not homework just something that dumb devs of a game I play keep having problems with
>>
>>58398450
It runs well on javascript + raw webgl, also the physics system is in pure js (matter.js)

But i'll soon port it to android with plain jni/c++ and box2d, did it in .js first for simplicity and to make a website out of it
>>
If you could go back in time when you were in school or just learning how to program what would you tell yourself?
>>
>>58398629
Don't try to do it right. Do it so it does what the client wants.
>>
>>58398629
That I easily could have learned C/C++ when I was like 13, but I was too intimidated and only got enough courage at 17.
>>
>>58398340

Citations. Come on, buddy, I'm not doing the work for you.
>>
>>58398629
Do a maths degree instead
>>
>>58398629
I'd tell my parents what to invest in, and when.
>>
Why do people keep designing languages that are riddled with the mistakes of the past, like weak or dynamic typing, or OOP?
>>
>>58398681
Then you are a liberal SJW feminist communist anti-white socialist cuck.
>>
>>58398407

Nice.
>>
>>58398364
http://tunes.org/~iepos/joy.html is always inspiring to read, really brings out the curiousity and elegence of the "hacker mindset", to me. Anyways, good luck.
>>
How on earth did I convince myself that I'd actually get OpenGL working this time? Like, I actually fooled myself into believing I'd be able to successfully load a PNG image and render it on the screen.
>>
>>58393092

-- NEW THREAD --
>>58398861
>>58398861
>>58398861
-- NEW THREAD --
Thread posts: 329
Thread images: 42


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