[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: 320
Thread images: 40

File: 1484952816682.gif (3MB, 644x472px) Image search: [Google]
1484952816682.gif
3MB, 644x472px
Previous thread: >>58578512

What are you working on, /g/?
>>
File: Noi_Shin_Doll.jpg (309KB, 600x800px) Image search: [Google]
Noi_Shin_Doll.jpg
309KB, 600x800px
>>58582142
First for D
>>
>>58582142
Thank you for not using an anime image.
>>
File: 1484099528997.gif (3MB, 355x201px) Image search: [Google]
1484099528997.gif
3MB, 355x201px
>Java
HAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHA
>>
>>58582142
Grab her by the pussy
>>
>using Java
Sad!
>>
>>58582142
void main(string[] args)
{
import std.stdio;
writeln("Thank you for using an anime image");
}
>>
>>58582159
Trump's anime tho.
>>
>>58582162
>unemployed
Stay poor.
>>
>>58582171
"Thank you for using an anime image".writeln;
>>
File: 979838998825157133.jpg (12KB, 480x358px) Image search: [Google]
979838998825157133.jpg
12KB, 480x358px
>>58582142
THIS THREAD IS RACIST PLEASE DELETE IT
ALSO JAVA A SHIT
>>
>>58582178
>muh jobs
evrytiem
>>
>>58582194
Stay mad NEET.
>>
File: wallhaven-343721.jpg (343KB, 1890x1541px) Image search: [Google]
wallhaven-343721.jpg
343KB, 1890x1541px
>>58582211
>tfw employed and don't have to deal with Java
>>
GIF (Giff)
>>
File: smug.png (66KB, 300x290px) Image search: [Google]
smug.png
66KB, 300x290px
>java
>>
>>58582222
>implying
Us Indians will take your jobs.
>>
>>58582162
>>58582170
>>58582193
>>58582194
>>58582222
>>58582226
>being this insecure about using hasklel
>>
hasklel sperg muh lambda *tips* kys
>>
>>58582142
>>
File: pajeet.png (28KB, 610x365px) Image search: [Google]
pajeet.png
28KB, 610x365px
>>58582222
>anime image
>makes fun of pajeet
>quads
exceptional post, 10/10

>>58582226
>anime image
>makes fun of pajeet
excellent post, 8/10
>>
i need a java job that req's no upfront knowledge, that will let me learn as i go.
fuck, i'll even sweep floors half the day as long as i get to learn via on the job training.

anywhere i can do this?
>>
>>58582257
Java is made for retards, you'll have no problems
>>
File: 1468472224634.jpg (61KB, 990x557px) Image search: [Google]
1468472224634.jpg
61KB, 990x557px
>muh higher kinded types
>>
>>58582243
>>58582250
>unable to cope, the Javafag lashes out at an imagined enemy, the Haskell user. To them, the Haskell user is there at every turn, always criticizing their garbage language. However, their Haskell user is what we would call, a boogeyman
>>
>>58582251
>>
>>58582267
idk, u can even call me pajeet, even tho i am SWM 35 from indiana
>>
>>58582280
>i am 35 from india
we know
>>
Quick! Think of an original twitter bot idea!
>>
>>58582290
Crow that posts programming challenges
>>
File: 1460580288877.jpg (57KB, 300x300px) Image search: [Google]
1460580288877.jpg
57KB, 300x300px
let's form a militia to round up and execute all javafags
>>
File: IMG_0401.jpg (79KB, 700x700px) Image search: [Google]
IMG_0401.jpg
79KB, 700x700px
G-guys stop being to mean to j-java...
>>
>>58582290
posts a random porn image from x website that hasn't been posted before.
>>
>>58582281
indiana, the state. USA formerly known as the west indies

ffs i need to get a java jab - please someone help
>>
Reminder that Javafags hate languages such as C++ because they're too complicated for them
>>
File: 1483943893052.jpg (50KB, 599x600px) Image search: [Google]
1483943893052.jpg
50KB, 599x600px
>>58582294
i'm in

>>58582295
rip
>>
>>58582290
libshit heckler which uses recycled @bessbell material
>>
File: ayy.png (1MB, 960x1080px) Image search: [Google]
ayy.png
1MB, 960x1080px
>>58582294
count me in
>>
>>58582306
isn't C++ just repackaged java with some mild backwards compatibility with C?
>>
>>58582306
Fuck you i poo in your loo any time
Yes I shit on streets so what?
We will become a world super power one day watch motherfucker
>>
>>58582324
u r right
i recant
>>
>>58582300
oh, so you're a subhuman from the union.
back to your subreddit.
>>
>>58582306
i'm the actual javafag and C++ and java are my favorite languages
>>
>>58582339
so you're admitting you're a plebbitor then?
back to your subreddit
>>
>>58582324
Considering that the first C++ was in 1983, while the first Java was in 1995

yes
>>
>>58582142
If I want to use C and C++ in the same program should I embed actual C into my C++ or should I just write the C part in C++ but without using any C++ features?
And which is faster?
>>
File: 1455476024879.jpg (149KB, 800x820px) Image search: [Google]
1455476024879.jpg
149KB, 800x820px
>>58582345
>projecting this hard
lol no
>>
>>58582337
>antifa neckbeard using nazi rhetoric
>>
>>58582349
ML was designed in 1980. Every statically typed language since then is just a poor copy.
>>
>>58582339
hi javafag,
can you get me a job at your company?
i want to be javafag jr.
i need java job, but have not learned it yet.
i seek on the job training
i'll be the office gopher (go for this, go for that) as long as i get to learn the java and not go broke by not working my current job by being in school with no pay.
>>
File: crop.png (8KB, 790x84px) Image search: [Google]
crop.png
8KB, 790x84px
What did he mean by this?

I don't know what to do.
>>
>>58582367
>print arbitrary input
in Haskell this is just

interact id
>>
>>58582354
>a right wing confederacy is somehow the same as national socialism aka leftist trash
nah, fuck off, plebbitor.
>>
I-i'm learning ARM
>>
>>58582357
ML's type system isn't particularly expressive and a' list is bollocks.
>>
>>58582362
I'm a Scala programmer.

Trust me kid. Run for the hills. The JVM? Bad news. You gotta learn something that's gonna last, like Rust.
>>
>>58582377
This is from K&R though. I don't want a solution, I just want to know what he wants me to do. There are some questions on K&R that are worded in a very strange way. What the heck is "printing arbitrary input in a sensible way"?
>>
Here's a pretty shitty demo of the webcam so far. I haven't bothered with YUV to RGB and with frame rates (yet).

It pauses on the first frame because that's the first ID in the linked list. This ID's air time is in the future. Since it can't scroll back to a previous frame, it keeps that one (only newer than current timestamp because it is a test).
>>
>>58582417
Who fucking knows,
interact id
just takes input lines and outputs them
>>
>>58582417
print printable characters as-is, and print the ascii code for unprintable characters, and wrap text
>>
post the programming challenges image please
>>
>>58582471
no
>>
>>58582414
>something that's gonna last
>the language by the people behind the firefox web browser
>>
>>58582367
encode as json?
>>
>>58582367
Implement something like printf from the clike languages.
>>
>>58582469
I see. He said we should do that "as a minimum", so I thought there was more to it that I was missing. Thanks.
>>
Daily reminder: if it's not rust, it's not something to trust.
>>
CAN'T TRUST THE RUST
>>
>>58582573
That was fucking awful

>>58582587
much better
>>
Daily reminder that if it's Rust, it's a bust
>>
you must not use rust
>>
how feasible is this?

apply for 6 figure programming job
i lie and say my portfolio contains some of the top 100 apps in the play store (that i worked on them)
they assume 'who would lie about that?'
they hire me and i subcontract all my work to fiverr fags.
=profit
>>
>>58582290
An AI similar to Tay that isn't gimped.
>>
Why are there so many memelords on /dpt/ recently?
>>
>>58582606
Totally feasible, do it and watch
>>
>>58582606
>Be you
>Lie and BS
>They give you a whiteboard interview
>>
>>58582290
posts the punchlines of every george carlin joke completely out of context
>>
>>58582615
>memelords
is this some ribbit meme?
>>
>>58582626
i'm an arch memeduke
>>
>>58582606
Go for it, what could possibly go wrong?
>>
>>58582626
Found the memelord
>>
>>58582414
Rust is a shit replacement for Java. Everybody seems to compare Rust, Go and D together like they're all the same shit, made for the same shit, designed to be used in the same ways. That's crap.

Of the three, D is the most obvious replacement for Java - there's a garbage collector, it still has objects (but is less strict about them), and it still uses C-like syntax. The skills picked up from Java should be more or less transferable to D, while shedding the shittiest parts of Java. People who are able to pick up Java should be equally capable of picking up D.
>>
>>58582621
tell them i have extreme autism and can't work under someone watching me. just give me my assignment and some time and i will spin the golden thread.

bitch and moan that they are oppressing me and my disability
>>
File: BasicTV_webcam.webm (2MB, 1920x1080px) Image search: [Google]
BasicTV_webcam.webm
2MB, 1920x1080px
>>58582418
Accidentally posted that before I recorded the video.
>>
why can't OOP "programmers" into C?
>>
File: 1484153022567.jpg (53KB, 907x718px) Image search: [Google]
1484153022567.jpg
53KB, 907x718px
>>58582638
>the skills picked up from Java
>>
i learned C and assembly then come to realize the world needs java
OOPs!
>>
why do people post this like it isn't a pizza hut ad for stuffed crust pizza? where you even born in the 90s?
>>
>>58582652
You know, the stuff that you did before management told Pajeets to refactor everything into design patterns and fill your perfectly sufficient program with classes that do nothing but refer to other classes.
>>
File: 979838993856695837.png (42KB, 370x320px) Image search: [Google]
979838993856695837.png
42KB, 370x320px
>>58582648
How can one program without objects?
>>
>>58582682
quite easily
>>
>>58582696
Teach me, senpai.
>>
>>58582682
very carefully
>>
I hate waking up early. You're all so shit during this time of day.

I guess it helps me not procrastinate.
>>
>>58582142
What kind of retard eats pizza that way?
>>
>>58582606
>they hire me and i subcontract all my work to fiverr fags.
lolno

the lying part is doable (but risky) but you need to have skills and experience of your own to back you up
>>
>>58582700
fizzBuzz :: Int -> String
fizzBuzz x =
case (x `mod` 3, x `mod` 5) of
(0, 0) -> "FizzBuzz"
(0, _) -> "Fizz"
(_, 0) -> "Buzz"
(_, _) -> show x

main = mapM_ (putStrLn . fizzBuzz) [1..100]

>>
>>58582715
trump because he's retard
>>
>>58582708
i wake up at 6 AM every day and I love it. It gives me time to be more productive and working out before leaving gives me a ton of energy.
>>
>>58582715
its this you idiot

https://youtu.be/B-XgMymBIY0

stop making me defend trump god dammit
>>
>>58582367
I bet it's some application where you're supposed to figure out the types each argument based on their ascii representation.

That hex and octal are a minimum support this because they both have prefixes, which are easy to check. So they make for a good minimum goal.
>>
>>58582715
Smart and rich people. If you had at least half his intellect, you'd understand.
>>
>>58582708
>not waking up early
>not getting CRUSHED
>>
>>58582715
it's from a pizza hut ad for stuffed crust pizza

the point is that it's a nice crust

>>58582671
>not imagining that it's your boipucci
>>
>>58582729
>>
Anyone have a good, simple example for how to structure a golang web project? I'm a complete noob besides completing the initial tutorial and tacking a login page and other stuff on top of it
>>
>>58582715
Meh, it's a fuckin' stuffed crust pizza, meh, get with the fuckin' times you retard, meh, my dad gets us Pizza Hut every Tuesday because it's stuffed crust night, meh, it's the only school night he gets to see me because mom's having adult dinner with Chad, meh
>>
I wanna get into emulation programming, which language should I learn?
>>
>>58582763
Uninstall go and you're good to go.
>>
>>58582768
sepples
>>
>>58582768
C or C++
Probably C.
Less conventional alternatives would be Golang, D or Rust.
>>
>>58582775
nigger
>>
File: 1483312596914.jpg (194KB, 1000x750px) Image search: [Google]
1483312596914.jpg
194KB, 1000x750px
>dream internship lined up for summer
>perfect grades in uni
>plenty of side projects and open source contributions

what do i even do with my time now, everything either seems trivial or just exhaustive to write
>>
>>58582768
Rust. It's the only sensible choice.
>>
>>58582800
try some video games
>>
>>58582800
open your.backend
inject my.hard.penis
if hasCum = true
then sleep
else repeat
>>
I want an algorithm that finds the smallest amount of pixel displacements and or pixel shade changes between two images given some maximum radius for moving pixels about.

But I don't know a name for this. Except possibly Levenshtein distance. Which doesn't quite seem appropriate. I guess it could work if I just chunk the image into pieces and match between chunks.
>>
/dgpt/ when

(daily girl programming thread)
>>
So let's say I want to develop a bot for a game using only the screen view (i.e. checking the color patterns of the monsters for the current view) and not read memory and relative to my own character. Assume I can already detect the monsters and my character.

what programming techniques and/or data structures are there for this? Do I have a "handmade" outline of the map dimensions which then includes the monsters/characters locations updated every half-second/whatever and then move my character relative to the updated difference to the target monster?
>>
>>58582638
D was a good language in the 90s. In this decade, it's shit. Just let it die.
>>
>>58582873
I would look into OpenCV
>>
>>58582873
why wouldnt you read memory?
>>
>>58582895
anticheat for the game detects that
>>
>>58582833
ur right, being a bottom bitch would kill sometime.
just hope i can make some money doing that
>>
>>58582885
>90s
D first appeared in the 00s?
>>
>>58582902
sauce?
>>
>>58582872
All /dpt/ posters are women pretending to be men
>>
>>58582920
Exactly. It was outdated even when it was first released.
>>
>>58582873
Well. Approach would depend on the nature of the game and how complicated the graphics are.
>>
>>58582782
>managed language for emulation
>>
>>58582931
what outdated it?
>>
>>58582925
i see right through them

men = javascript, python, and other languages for dumb people
women = c, scheme, assembly, and others
>>
>>58582923
The game is Maplestory
>>
File: 4546941.jpg (61KB, 561x663px) Image search: [Google]
4546941.jpg
61KB, 561x663px
>>58582925
>are women
You mean little girls, right?
>>
>>58582943
My mom does C and assembly.
My dad does Fortran, Java and C#.
So yeah seems accurate.
>>
>>58582949
all the games in the nexon library can bypass the anti-cheats by installing (offline) the earliest (pre-anti-cheat) versions. add your cheats, then update to current. have fun finding archived versions though.
>>
>>58582941
Time
>>
>>58582222
>tfw employed and having to deal with PHP
Feels bad man.
>>
>>58582721
unreadable garbage
>>
>>58582998
NB. FizzBuzz
FB=:('FizzBuzz';'Fizz';'Buzz';":){::~0 i.~15 3 5|]
FB"0 >:i.100

>not replying with unreadable garbage (J)
>>
>>58582998
how can you misunderstand that?
sure mapM_ might not be obvious, but you'd think you could figure out what it does with a function (putStrLn . fizzBuzz) and a list [1..100]
>>
Using python 3.4 to edit SVG images and save as PNG. I tried out the py module called "cairosvg".

However, it seems there's a shit ton of dependencies, including installing Cairo graphics backend. I have read this guide and so far it's terrible as hell to go through this. I installed MS visual studio and converted these vcproj files to solution files. But trying to build the solution file just leads to more error bullshit.

https://www.cairographics.org/end_to_end_build_for_win32/

I'm thinking about just going with Inkscape and command line tools instead to convert SVG to PNG. Is there an even simpler way than both of this shit though?
>>
>>58582998
in what way? literally every single line there is obvious even to a beginner
>>
>>58582849
optical flow? dense/improved trajectories? HoG? HoF? iHoG?
>>
>>58583170
If you're trying to do batch conversion, ImageMagick is probably the best way - it's even available as a package in Chocolatey, if that's your jam. ImageMagick is as simple as
convert in.svg out.png
>>
Seems sort of like an obvious feature, but I just added the ability to open entire directories in my image viewer, Ivy. Wasn't too difficult to implement, just never got around to actually doing it.
>>
>>58583234
>trying to do batch conversion

Not exactly. I edit specific SVG files first using user inputs and whatnot in the python interface.

Then, after that, if user wants to "save" the svg as a hard picture, I want a simple button in the interface that says "save". I don't want the user to have to open up another program and have to load all this backend dependency bullshit.
>>
>>58582885
Can you start using a tripcode so that I can hide you?
>>
>>58583277
Now why would I go and do a thing like that, anon?
>>
File: 2017-01-20-235201_312x476_scrot.png (210KB, 312x476px) Image search: [Google]
2017-01-20-235201_312x476_scrot.png
210KB, 312x476px
>>58582142
Does anyone know if pic related teaches you OOP with Common Lisp?
>>
How did you go from small projects used to learn the language (hello world to implementing data structures) to actually making software.
I feel like even though I know a language, I'm missing every other tool needed to actually write something useful
>>
>>58583291
Have these people even once thought "maybe it doesn't need to be object oriented"?
>>
>>58583291
No, it's about embedded C.
>>
>>58583291
[spoiler] probably, here's your (You) [/spoiler]
>>
>>58583276
you can edit the svg, save as svg to a temp directory (or memory and use named pipes..) then use your languages os execute library to run imagemagik to do the actual conversions

calling out to third party processes for image/video manipulation is pretty common (from languages like python, unless you use a cpython wrapper for said libraries..) when you don't want to have to deal with messy / complex (to build and use) libraries like: libavcodec / libavformat
>>
>>58583276
In that case, there's probably not a very clean way to get around the Cairo dependencies. If you really want to have the ability to modify images you're going to have to just live with the fact that there's no built-in way to do it in Python. There is a Python interface, librsvg-python, that will probably do a lot of the heavy lifting, but it depends on librsvg, which depends on Cairo.
>>
>>58583305
I have never felt that feel.
>>
>>58583309
but CLOS is literally the only reason to use Common Lisp over, say, a Scheme variant
>>
>>58583013

The problem is that Haskell syntax is incredibly unintuitive.
>>
>>58583305
There was never a moment where it just happened for me. It was all incrementally larger programs or small shit to get the hang of more complex concepts. It's more or less the natural progression of programming courses in college. It can be daunting to try and flex your programming muscles but have no idea what you're actually capable of doing, but so long as you keep doing something even slightly more difficult you'll eventually start making large and complex programs that might even be useful to other people.
>>
>>58583325
Scheme has access to CLOS as well though (via TinyCLOS)
>>
>>58583339
No it isn't, it's incredibly intuitive.
What part of it would be unintuitive, to somebody who knew regular lambda calculus?

(If you don't know lambda calculus but call yourself a programmer, education has failed you)
>>
File: maga.png (166KB, 1600x900px) Image search: [Google]
maga.png
166KB, 1600x900px
>>58582251

God bless
>>
>>58583353
Kill yourself
>>
>>58583339
which gets compounded by the language extensions and hardon for operator abuse: if it doesn't look like a japanese ideogram as an infix operator then you're doing it wrong

>>58583353
except its STLC with system T and F extensions and not just "regular" lambda calculus. try harder
>>
File: maga2.png (239KB, 1600x900px) Image search: [Google]
maga2.png
239KB, 1600x900px
Wait, this one is a lot better.
>>
>>58583375
I know it isn't regular lambda calculus.
The rest is intuitive to anybody who's had a basic fucking education
>>
>>58583312
look, the tagline is "a programmer's guide to clos", so it implies I need to know OOP first, right?
>>
>>58583313
>calling out to third party processes for image/video manipulation is pretty common

Still requires the user to install yet another program. But at least it would be a clean an easy way of doing it, instead of Cairo build bullshit. >>58583316 . I've never felt so much hatred for dependencies in my life until today.
>>
>>58583406
>I've never felt so much hatred for dependencies in my life until today.
Welcome to Windows programming. I cannot fathom how people managed to program anything on such a shitty platform.
>>
>>58583380
i don't have an education and it's still pretty intuitive.
>>
>>58583382
the way CLOS does OOP is vastly different from bog-standard Java or C++. If you have any experience with AOP (aspect-oriented programming) or MOP (metaobject protocols) you'll breeze thru it.
>>
>>58583214
Not quite what I wanted. I'll look into that too though.
I want something more basic. No attempt at edge detection or anything. Simply morphing one image into another on a per pixel or group of pixel basis.
>>
explain it to me as if i were 5 and can on reference a kindergarten classroom, playground, home, bus:

how does one go about creating an online database (firebase) where the app (mobile/web) can upload the data from a form along with a few photos and all the classify as ONE upload or ONE submission but each item could later be viewed in the whole or independently.
(maybe there's a word for this, idk)
>>
>>58583406
you just bundle convert.exe with your program.
for example: many of those webm programs are just frontends for ffmpeg.exe. they call it and hide the cmd.exe window while reading its stdout / stderr and sending it data via stdin
>>
>>58583353

>to somebody who knew regular lambda calculus
The problem is that lambda calculus isn't used enough for most universities to teach it in their undergraduate programs.

>education has failed you
Educators have no obligation to teach a syntax that almost nobody fucking uses.
>>
>>58583477
>tripfaggot
>also dropout
figures!
>>
>>58583481

r u retarted
>>
>>58583477
>The problem is that lambda calculus isn't used enough for most universities to teach it in their undergraduate programs.
Yet nearly every major modern language has functions, function application, and recently lambdas


Huh

weird
>>
>>58583490
>Yet nearly every major modern language has functions, function application, and recently lambdas

Irrelevant.
>>
>>58583510
>the definition of lambda calculus

>irrelevant in a matter aboutlambda calculus
>>
>>58583521
>responding to tripniggers
>>
>>58583481

>also dropout
I have a bachelor's degree that I showed off in thread about a year and a half ago, and am currently enrolled in a master's degree program. I also have three PhD applications currently being reviewed.

>>58583490
Just because a language has functions and lambda closures does not mean that it has to use a syntactic style similar to lambda calculus. A number of languages adopted a C-like style of syntax because it's pretty goddamn legible. Others adopted their own syntax in an attempt to read more like English, to varying degrees of success. Haskell's syntax does not resemble the syntax of any language in regular use, and is incredibly unreadable.
>>
>>58582142
If /dpt/ hates high level languages so much, why don't you guys do embedded stuff?
>>
>>58583604
>why don't you guys do embedded stuff?

Because that requires some actual skill, which is sorely missed on this shithole of a website.
>>
>>58583604
/dpt/ doesn't hate high level languages tho, you can see that by how very often they're talked here.
Also, here, doing embedded programming for a living is very scarce.
>>
>>58583604
But I do.
>everyone moving to running full Linux kernel in everything
>embedded programming loses all its charm when it's just like normal programming except you write to /sys/class/gpio sometimes
>have so much memory now you could probably just use java and not even look at memory use
It's awful.

And worse yet it all exposes how bad coworkers actually are at programming now when we're not in super restricted environments.
>>58583616
>embedded requires skill
Yeah, let's perpetuate that myth.
>>
>>58583616
We have people on here who do know what they're doing, but keep meming about how every here is stupid
>>
>>58583616
if you hate it so much, why are you here?
>>
>>58583633
what kind of retardation is this? how can a thread like or hate something?
>>
>>58583616
This. Reddit is just so much better.
>>
>>58583684
>>58583696

>"It has been said that 4chan is the worst form of internet, except all the others that have been tried."
>--Anonymous Faggot
>>
File: 1484856773063.png (279KB, 500x500px) Image search: [Google]
1484856773063.png
279KB, 500x500px
>>58583685
>>
File: 1484460750645.png (48KB, 400x389px) Image search: [Google]
1484460750645.png
48KB, 400x389px
>>58583568
>masters
>not going straight to phd
>>
>>58583720
That's a pretty sexual image. this is a Christian board
>>
>>58583715
true 4chan hasn't been tried yet though
>>
>>58583749
but we're working towards 4chan..
>>
I have done some programming lately mostly for ripping websites, thus far I have made rippers for :
Mangafox
Deviantart
lbooru
Bandcamp albums
Danbooru
rule34.xxx
and sankakucomplex.com

I ended up using every program about once since I just wanted one gallery or album. I don't know what I could program that is actually useful.
>>
>>58583781
Naice, once I tried making one for pixiv to get all the images of my waifu. But it was hard to log in using my account since I can't into the js login.
>>
what symbols are best to separate sentences for quick readability in console output

I cant come with something better than ***
>>
>>58583800
some years ago I wrote a pixiv dumper for a friend and what I recall is that it just does an http post with your credentials. it had a hidden form that it used, but you could just replicate it with an http client.
>>
>>58583800
Use mechanize in python 2.7 and use:
br = mechanize.Browser()
br.select_form(nr=0)
If the login is the first field that you can fill with something it will be nr=0, otherwise increment with 1 until you get the right one. Then you will have a handle to the form and can fill it and submit with:
br.submit()
>>
>>58583809
The birthday cake emoji
>>
Today I wrote a lexer and parser that turns Ducky Script into something compilable for a Digispark because I didn't want to drop $50 on an actual duck and I was sick of translating it by hand
>>
>>58583809
Why not newlines?
>>
>>58583891
or horizontal / vertical tabs...
>>
What is the actual address used to ssh into remote computers called?

When using ipconfig/ifconfig, several come up. IPv4, inet, inet6, public address, local address etc.

What are the differences?
>>
>>58583972
remote connections (outside of the network)? use their public address
inside the network? use their local address

this belongs in /sqt/ desu
>>
>>58583972
Look up NAT, as well as public and private IP addresses
>>
>>58583991
Yeah sorry, I had both threads bookmarked and I posted in the wrong thread.
>>
>>58582142
public class Axe extends Weapon implements BluntAttack{
//inner class
public class DamageType implements Blunt, implements Bleed, implements Poison{
}
}

Is this valid Class Design given that
I want Individual weapons to inherit Weapon class and implement main attack-type interface.
I also want some inner class to implement other type of attacks that can be applied to the weapon.
>>
>>58583972
It's called an address
>>
pointers are literally perfect
>>
>>58584011
>I also want some inner class to implement other type of attacks that can be applied to the weapon.
If this works by checking with instanceof you're doing it wrong.
>>
A package manager in C for my lfs. Any tips?
>>
>>58584051
A post on 4chan. Any (You)s?
>>
>>58584032

i dont understand pointers
>>
what's the best anime to watch when high?
java is trash btw
>>
>>58584124
Serial Experiments Lain.
>>
>>58584149
already rewatched it not that long ago
>>
>>58584163
Flip flappers came out last season, that has some really neat visuals and the GL is a plus; or watch Tatami Mat Galaxy.
>>
>>58584174
>Flip flappers
hmm... forgot about that one, i'll check it out. thanks
>Tatami Mat Galaxy
same as previous post
>>
File: maga3.png (33KB, 820x711px) Image search: [Google]
maga3.png
33KB, 820x711px
Image filters are only good for making vaporwave album covers.
>>
>>58584306
make some anime filters
>>
>>58584319

What do you mean?
>>
>>58584328
i think that's pretty obvious?
>>
>>58584335

I'm stupid.
>>
>>58584349
i'd be fine with any of the following:
1 - filter some anime images
2 - make some anime filters
3 - something else to do with anime
>>
>>58584360
I like how you think.
>>
>tfw so close to landing a haskell gig but government funding ran out
thanks trump
>>
>>58582142
So in python I want to make a meme stealer, the script has a list of facebook pages, if they post an image it downloads it then reposts it on twitter then deletes it from the device it's running on - how achievable is this for a beginner and how do I get started? guessing googleing how to save new facebook pictures python then how to upload images to twitter python and go from there?
>>
>>58584547
What if You don't have a god to have sex with that is Your species, Mr. God?
>>
>>58584415
Trump is just removing the bloat. should have gone embedded systems....
>>
>>58584594
what the fuck does this mean
>>
File: 1472351994181.jpg (120KB, 1091x815px) Image search: [Google]
1472351994181.jpg
120KB, 1091x815px
>tfw contract for matching exact and in-exact characters for a dog breed dictionary
such is life
>>
>>58584603
You like Prince Harry?
>>
Is unity game programming?
>>
>>58584622
Working overtime, agent Johnson?
>>
File: 8795.png (33KB, 300x300px) Image search: [Google]
8795.png
33KB, 300x300px
Sorted pixels from most used to least used...
>>
File: (「・ω・)「.png (128KB, 300x300px) Image search: [Google]
(「・ω・)「.png
128KB, 300x300px
>>58584663
>>
>>58584630
Yep question just came into my mind
>>
>>58583305
programming can be used to complement any hobby or profession. what are you interested in outside of programming?
>>
>>58584694
>programming can be used to complement any hobby
Is this true? How would I do this for anime?
>>
https://is2.4chan.org/wsg/1484985990515.webm
>>
>>58584716
make a python script to notify you when a new ep is out or when you're interested in a series it pulls 10 reviews, and lists all the eps your can download (i.e check if they're on the stream or torrent site you use)
>>
>>58584716
machine learning/ neural network to recognize best girl
>>
>>58584733
But i already have a whole board which does this.
>>58584745
what language can/should I use? no python tier trash please.
>>
>>58582142

im on automate the boring stuff, practice lesson 3 before lists.

I cant seem to get why I can return my value and have it run the rest. What the fuck am I not getting?

def test():
num = input()
if int(num) % 2 == 0:
return "hello, even"
elif int(num) % 2 == 1:
return "goodbye, odd"

test()
>>
I need to divide 1 million long .txt file containing 'x' and 'y' into new .txt files containing words of 2, 4 and 8. It has to be done in C
>>
Reminder that people who post anime pictures here are jobless outcasts.
>>
>>58584995
But I'm a jobless outcast and I don't post anime images?
>>
>>58584995
But I'm a jobful incast and I post anime images?
>>
>>58584995
But I'm a jobless outcast and I post anime pictures.
>>
Do you pay for ReSharper?
>>
>>58585099
lmao
>>
File: tlafizz.png (12KB, 747x301px) Image search: [Google]
tlafizz.png
12KB, 747x301px
>>58582142

>learning TLA+
>mfw it took all fucking day to write Fizzbuzz
>>
File: 1481243729397.png (91KB, 657x527px) Image search: [Google]
1481243729397.png
91KB, 657x527px
strict aliasing breaks the C language
it's impossible to implement malloc in a way that doesn't violate aliasing rules
>>
>>58584995
yea but I get 1200 a month and a flat paid for, why would I get a job?
>>
>>58584960
alright cool, good luck with your homework mate
>>
>>58585208
You're an idiot.
>>
File: batman.jpg (19KB, 478x206px) Image search: [Google]
batman.jpg
19KB, 478x206px
>>58585208

Strict aliasing is a cluster fuck

>projects that have "build with strict aliasing disabled in GCC flags" as a requirement
>projects that build with strict aliasing errors on some versions of compilers but not others
>projects horrible fuckarounds to avoid strict aliasing errors
>investing this much time understanding some compiler optimisation bullshit
>>
Spring XML configuration > Annotations
fite me
>>
>>58585237
If you violate strict aliasing, you're a fucking idiot.
All you need to do is NOT CAST POINTERS. It's simple as fuck.
>>
>>58585262
>All you need to do is NOT CAST POINTERS. It's simple as fuck.

wew lad
>>
>>58585262
>NOT CAST POINTERS

No networking for you then.
>>
>>58585304
If you really need to type pun, use a union,
>>
File: cats.jpg (56KB, 647x749px) Image search: [Google]
cats.jpg
56KB, 647x749px
>trying to work with CMX API
>mfw it's documented in screenshots
>mfw I can't copy paste URLs
>mfw it's tiny and barely readable

https://developer.cisco.com/site/cmx-mobility-services/documents/cmx-rest-api-getting-started-guide/index.gsp
>>
>>58582715
Drumpfkin.
>>
>>58585389
Assuming you're wanting to use CMX 10 and MSE; take a look at https://msesandbox.cisco.com:8081/apidocs/
>>
trying to troubleshoot an issue with git, i'm hoping someone can point me in the right direction

On my desktop, running "git diff" just outputs the results to stdout. This is how I would expect it to work. On an alpine linux docker image that I am developing on, however, "git diff" seems to open the results in some sort of editor that I don't recognise. This is causing me some problems. Anyone know how I might be able to change this behaviour?
>>
>>58585498
Does using /usr/bin/git do something different? What's the output of `which git`?
>>
>>58585498
try git diff --no-ext-diff
if that fixes it, check the gitconfig for diff external / diff tool
>>
>>58585521
The output of which is /usr/bin/git. Explicitly using /usr/bin/git does not change anything.

>>58585530
--no-ext-diff doesn't change anything unfortunately.

I can't figure out what this diff viewer thing is. It looks a little like vi, with the column of tildes, but it doesn't let me input any commands as far as I can tell
>>
>>58585540
Scratch that. If I hit S, it prompts for Log File. If I hit M, it prompts for Mark. Does that sound familiar to anyone?
>>
>>58585540
>I can't figure out what this diff viewer thing is.
It's 'less', if I'm not mistaken.
>>
>>58585540
what does these return?
>git config --global diff.external
or
>git config --global diff.tool
>>
>>58585540
It's probably vimdiff. Try git config --set difftool.prompt true.
>>
>>58585559
Actually, I just tested a git diff on my computer.
It is indeed less.
However, you can force the pager it uses with an environment variable.
PAGER=more git diff

or set it to nothing to just dump it to stdout
PAGER= git diff

You would set this in your .bashrc if you wanted to have this behaviour all of the time.
>>
>>58585559
You're right, it is less. Why is git diff opening less?

>>58585570
Neither of those return anything

>>58585571
I set that but it hasn't changed anything


Thanks for the help so far guys
>>
>>58585593
>Why is git diff opening less?
Because it's what most users would want. less is a very nice pager.
People usually don't wants dozens, or even hundreds of lines dumped to their terminal.
>>
>>58585609
and some terminals don't support scrollback buffers...
>>
>>58585592
>>58585609

Brilliant, thanks guys. Setting that variable didn't help, but you led me to find git --no-pager which I've now set as an alias for git. That will do fine for my purposes.

Probably wouldn't have figured that out without your help. Thanks again
>>
>>58585592
Also, I should note that PAGER is a "standard" environment variable, so setting it will have an effect on other programs.
'man', would be such an example.
If you just want to affect git, you would set and alias or use git config.
>>
>>58585643
>Setting that variable didn't help
Either you didn't do it properly, or maybe you're on windows or something and git's behaviour is different on that.
You got it working though, so I guess it's not important.
>>
I'm writing a book storage website as an exercise for learning MVC (using PHP). I have a
BookModel
and a
AuthorModel
.

If I wan't to find all books by a certain author, whose responsibility would that be? Should I implement
booksByAuthor()
in
BookModel
or
AuthorModel
?
>>
>>58582171
https://godbolt.org/g/Vig1xx
>>
File: sway.gif (2MB, 469x304px) Image search: [Google]
sway.gif
2MB, 469x304px
- C
- Lisp
- Javascript

Is there a more rounded skillset possible in just three languages? I don't think so.

Why waste your time learning anything else?
>>
>>58585959
- C
- Lisp
- Haskell
>>
>>58585959
>Javascript
>>
File: sicp2.jpg (46KB, 576x432px) Image search: [Google]
sicp2.jpg
46KB, 576x432px
I just remembered I never posted this anywhere so I'm posting it here.
>>
>>58585985
What else are you going to use for the web?

>>58585981
Lisp covers functional and meta-programming. Haskell is redundant.
>>
>>58585998
>Programming for the web
>>
>>58585996
Nice.
>>
>>58585998
>Lisp covers functional and meta-programming.
No, lisp covers lisps.
FP and metaprogramming have a lot more to offer.
With proper FP you barely need metaprogramming.
>>
>>58585998
>>58586010
Plus, there are no decent type systems in your 3
>>
>>58585820
why not have a model manage collections of models?

some psuedocode: (I had a longer response typed out explaining it but I accidentally closed the quick reply while typing up the code)
interface IStore {
find(table, id) // returns item by id
findAll(table) // returns all items
update(table, id, item) // updates id with properties from item
delete(table, id) // removes item by id
}

class SimpleStore : IStore {
// implement the interface here for interacting with the data store
}

class BooksModel {
isbn
title
author
}

// inherit the repo so you "don't repeat yourself"
class BooksRepository {
BooksRepository(store) {
this.store = store
this.books = store.findAll("books")
}

get(@type, query) {
foreach (book in this.books) {
// this pseudocode is dumb, but its 7am and don't want to think of
// syntax for passing in a property thats not evaluated
if (book[@type] == query) {
return book
}
}

throw exception ("no book with $query$ found")
}

getBook(isbn) {
return get(@isbn, isbn)
}

getBookByAuthor(author) {
return get(@author, author)
}

// etc
}
>>
>>58586004
I hate webdevs as much as anybody else and my own sites are nothing but beautiful static HTML, but at the same time, the web is quickly emerging as the last truly universal platform for software in an era of rapidly-proliferating walled gardens. When I have to write a tool for my work colleagues to use, it's often something cooked up in vanilla javascript.
>>
>>58586010
>>58586018
>muh types
Unless you're in academia and suckering organizations out of grant money, literally nobody cares
>>
>>58586027
I'll wait for wasm, so I never have to deal with the cancerous javascript ecosystem.
>>
>>58586036

Should have known you'd say this from your code monkey choice of languages

Javascript isn't even a real programming language
>>
>>58586036
>muh
>>>/r/ibbit
>>
>>58586056
>code monkey
>says the Haskell nigger
top jej
enjoy showing off your elegant two-line fibs algorithm I guess
>>
>>58586055
If you think javascript is cancer, I don't know what you're expecting from web assembly.
>>
>>58586027

This. I can't stand the cancerous platforms like NodeJS.

But a while back I was asked to write a program. And I thought well fuck I could do this in a few hundreds lines of Ruby.

But actually getting both Windows and OSX users to run said executable is the most unreasonably difficult problem of all. The solution is a simple web server.
>>
File: pew.png (1MB, 990x1046px) Image search: [Google]
pew.png
1MB, 990x1046px
twitter bot to shill my various right-wing links
>>
>>58586096
I expect to compile code written in a sensible language (i.e. C) and run it on a web browser.
>>
>>58585981
this
>>
>>58586088
>no argument
sasuga codu monkey
>>
>>58586112
My argument is Haskell. That's all I need to say.
I could call anybody in the phonebook, wait for them to pick up, and simply say "Haskell" and they'd reply with "lol."
Because Haskell.
>>
>>58586056
not him, but how is javascript not a real language?
what properties determine if its real or imaginary? (fake?)

a type system? well, look at C's type system and how its barely typed. then look at Elm or PureScript and how its using System F<: lambda calculus to do type deduction.

interpreted vs compiled? thats an implementation characteristics. there's nothing stopping you (or anyone) from writing a js->elf/coff compiler. and vice versa of making a language run in an interpreter. (think about creating a vm that runs the language in an abstract machine and reloading/hotloading stack frames, etc)


but yes, javascript is not a /good/ language. and most people who use it are shitters. but its still a _language_

>>58586105
how will you interact with the dom with wasm? currently (and all plans for) require a glue layer written in javascript to do that, to act as an "FFI." basically its like a cpython problem where you use C for things that need to be fast and everything else is javascript.

unless you're just going to use wasm and webgl and reinvent the whole display (I guess you could `port` gtk, or tk or qt to wasm..) stack
>>
>>58586132
so no argument? i knew you guys were just trying to fit in.
>>
New thread:

>>58586140
>>58586140
>>58586140
>>
>>58586146
>311 replies 37 images
>pedo picture
Nope.
>>
>>58586138
>>>/g/wdg
>>
>>58586138
>C's type system and how its barely typed
What?
Just because there are implicit int/float conversions and void pointer conversions, it doesn't mean that C is "barely typed", whatever that means. In the places where it actually matters (structs and pointers), the C type system does the job.

>how will you interact with the dom with wasm?
I'll wait for someone to create a library that does DOM manipulation.
>>
>>58586159
why would I go to that thread? I try to stay away from web development. it doesn't change the fact that javascript is a real language.
>>
File: images-9.png (11KB, 459x320px) Image search: [Google]
images-9.png
11KB, 459x320px
>>58586172
>>
File: images-84.jpg (23KB, 378x389px) Image search: [Google]
images-84.jpg
23KB, 378x389px
>>58585959
>>
>>58582142
test
>>
>>58583353
>What part of it would be unintuitive, to somebody who knew regular lambda calculus?
operational semantics (and I say that with my haskell hat on). Although profiling is nice
Thread posts: 320
Thread images: 40


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