/script>
[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: 314
Thread images: 30

old thread: >>55880459

What are you working on, /g/?
>>
File: Golang.png (11KB, 300x108px) Image search: [Google]
Golang.png
11KB, 300x108px
First for Go
>>
>>55889160
Installing Fedora like the Linux bible told me to
>>
old threads about to die

>>55889125

can someone help me with rails?
this guide told me to make this Category in seeds.rb, is that right? shouldn't Category get it's own index or something?
>>
>>55889160
Reminder that unityfags and winbabies are not allowed in this thread.

Implementing macros in my lisp
>>
>>55889160
How is this image related to programming in the slightest?
Get this /b/ tier garbage out of here.
>>
File: 1470006906801.jpg (347KB, 3136x2541px) Image search: [Google]
1470006906801.jpg
347KB, 3136x2541px
>>55889160
>>
>>55889160
Nothing.
How do you guys find stuff to do? I've been pretty much sitting in front of an empty IDE for 3 days.
>>
>>55889172
cool thanks
>>
>>55889264
I only do big projects (i.e. take 1+ years to complete). This way I never run out of things to do, as I have more than enough time to figure out a new project. Of course the initial project might be tricky, but after that it is easy.
>>
>>55889253
impressive render, although light is a bit off
>>
>>55889160
>Draw a girl
>Call it a boy
How the this acceptable?
>>
>>55889264
Same desu.
I could solve yet another project euler problem.
Or learn yet another language.
Or write yet another sorting algorithm/whatever generic compsci practice problem.

But those things don't give me the same enjoyment anymore.
I want to try making something bigger, something that's actually useful... a complete product, in a sense.

My problem is just that I can't think of anything that would be fun or useful enough that I would stick it through and see the project to its end. Everything is either too big in scope, dead boring or has been done before a million times.
>>
I am using the bash on windows thing. Am I a programmer yet?
>>
>>55889100
I don't know what it means to put women on a pedestal. They just scare me so i stay away from them.
>>
>>55889370
grow the fuck up
>>
>>55889370
You're treating women as unapproachable deities.

Stop.
>>
hi, i need a little help reversing this proprietary thumbnail
already tried emailing the devs, no response
found on some forums that what i'm looking at is a base64 encoded png stream
here's an example http://pastebin.com/GpsLrG9k
the final image should have a 16:9 ratio, unsure of the size..

what i've done so far: figured out that the charset used is [a-z,A-Z,0-9] and [.+] but standard base64 encoding uses + and / instead of + and .
replacing .'s with /'s didn't work, replacing +'s with /'s and .'s with +'s didn't work. by didn't work i mean i decode the base64 as binary and write it to a png file, but the file doesn't open at all in an image viewer

do i need to fucking try every permutation of possible mappings of the current char set to the real base64 one? how will i test to see if i get a valid png out of it?
using python.. here's my code so far
import base64 
import xml.etree.ElementTree as ET

xmlfile = './test_thumb.xml'

tree = ET.parse(xmlfile)
root = tree.getroot()

b64 = root[1][0].get('data')
b64 = b64.replace('.','/')

# padding (unnecessary)
# b64 = b64 + "=" * ((4 - len(b64) % 4) % 4)

bb64 = bytes(b64, 'utf-8')
png_recovered = base64.b64decode(bb64)

f = open("./test.png", "wb")
f.write(png_recovered)
f.close()


any help is appreciated
>>
>>55889370
What's scary about them?
>>
File: 1469976671467.png (654KB, 2640x1836px) Image search: [Google]
1469976671467.png
654KB, 2640x1836px
>>55889231
everyone knows wearing girls clothes makes you a better programmer

>>55889199
good lad

>>55889264
pic related
just pick one of the yellow ones or red and get at it.
>>
>>55889529
he's probably ugly and he thinks they're like the valley girls on tv who wince when ugly people talk to them
>>
>>55889451
>hi, i need a little help reversing this proprietary thumbnail
See the button on your keyboard that says PrtScr\nSysRq?
>>
>>55889542
>everyone knows wearing girls clothes makes you a better programmer
Disagree, I find it easier to work when wearing boys clothes.
>>
>>55889542
You're autistic if you really believe that
>>
>>55889582
i'd like to do it programmatically because there's about 1000 of them in total
i already implemented a hacky solution of opening up the file and using ffmpeg to make a screenshot but said program uses a proprietary codec so i have to use the original source files , which if i plan to release this for other people to use is too large of an assumption
>>
>>55889160
i want her feet
>>
>>55889160
>>55889633
I want to tickle her feet and do humiliating thing to her and them.
>>
>>55889633
>>55889647
>her
>>
File: 1468282249986.jpg (129KB, 533x533px) Image search: [Google]
1468282249986.jpg
129KB, 533x533px
>>55889160
ugh
>>
What is /g/'s opinion of smalltalk?
>>
>>55889670
>or anybody else that you know
Such a bad idea, it will include even people that I hate.
>>
>>55889417
Thats another phrase i dont understand, at least in this context.
It implies that i'm acting childish right? But whats childish about avoiding things you don't want to be around?
>>55889431
I don't really see them as any better or worse than me, they just make me feel uncomfortable.
>>55889529
I can't say for sure. I just feel anxious and uncomfortable around them.
>>55889556
Don't really know what to feel about my appearance.
>>
>>55889686
It's one of the "one hammer to nail them all" languages that fail to gain notable traction for this very reason.
>>
>>55889620
Well in any case you are missing the header.
Base64 files start off like this: data:image/png;base64,

But you're right in that it's not normal base64. It could be some other standard encoding I'm not familiar with, but if you're unlucky they've rolled their own in which case you need to reverse the binary that encoded them.
>>
>>55889694
Can you articulate why you feel uncomfortable around women?

They're people too, in the same way that children are people too.
>>
>>55889694
Is it because they have different genitals to you?
>>
Was thinking of making a lan chat program similar to picto chat on the old DS, except people connected on the same network/subnet talk to each other. The similarity to picto chat being that there's no central server, people just send off messages and other people listening receive them.

The thing is, I don't know too much about it, I've only ever made P2P socket connections between two sockets that were aware of each other. Any good resources on this?

>>55889619
It's a meme you dip
>>
>>55889686
The fact that is has lambdas (blocks) and uses them constantly for everything in a way that fits perfectly with OOP; makes me wonder why Java took two decades to implement them.

Seriously though, why is Java such a complete piece of garbage? It came after smalltalk and was directly inspired by it. Shouldn't the designers have thought "this block concept is pretty neat, let's include it" at some point during the early design of the language?
>>
>>55889721
I guess i'm afraid that i'm going to do something to offend them, and they're going to hate me for it and hope i die.
>>55889728
Well i'm afraid of people in general. Its just that i'm more afraid of women.
>>
pls explain extern in c pls
>>
REMBER


NO windwos
NO gui editors
NO ides
NO c#
NO Unity
NO fucking game shit

Keep dpt PURE
>>
>>55889882

Remember, no russian.
>>
>>55889882
>NO spelling
>ONLY fizzbuzzes
>>
>>55889862
>I guess i'm afraid that i'm going to do something to offend them, and they're going to hate me for it and hope i die.

Are you afraid that they're all SJW hair-dyed freaks that will accuse you of rape or sexism or whatever?
You spend too much time on this board.
>>
>>55889542
>just pick one of the yellow ones or red and get at it.
To be honest, I kind of avoid doing programming challenges. They just don't give any enjoyment, and I have a hard time motivating myself to develop something, that seems actually useful to myself. Kind of like >>55889333 said.
However, doing something is probably better than doing nothing at all, so thank you anyways. I'll try some of the challenges you posted. It's probably more exciting than I assume.
>>
>>55889882
>NO fucking game shit
Game shit is fine as long as you are making an engine in a proper language and with proper free libraries.
>>
>>55889862
OP, millions of people in other parts of the world hate you and hope you die. Just to put this all in perspective.

If you're not deliberately trying to offend or provoke someone, they won't hate you and wish ill upon you. Most people just don't have time for that, and are mentally stable enough to keep any faux pas you commit in perspective. They might think you're a jerk, but really, so what? Fuck 'em.
>>
>>55889985
Speaking of free libraries, should I be using gcl or clisp?
>>
>>55889862
You should just stop caring so much about what other people think of you. That will lower the stakes of being around others and should help with your anxiety.
>>
>>55889160
You summbitch
>>
>>55889962
>>55889333
Some example for projects that scale nicely regarding effort and still are useful are random generation tools for things. For example, a random wallpaper generator.
>>
NETWORKS
>>
>>55889333
Write a 4chan parser, which reads posts and does basic spellchecking on them before serving them to you.
>>
>>55889882
>Keep dpt PURE
Then you fuck off first pls.
>>
>>55890020
Steelbank is the fastest and the one under the most heavy development to my knowledge.
>>
>>55890024
>>55890005
>>55889924
Why do you fucks care about this social outcasts gynophobia?
Just let him figure out hos own shit, this thread is for programming.
>>
>>55890059
But is it free?
>>
I just got a job offer for $125k software dev in San Francisco. I should be thrilled but I am second guessing myself, moving and all

Can anyone else weigh in their thoughts about the area, moving for a job, or something?
>>
>>55890084
Yes, it's 100% free as in freedom.
>>
>>55890091
what company
if you dont want the job i'll take it
>>
>>55890069
Fordi jeg vil hjelpe ham. Han må slutte å være redd for kvinner.
>>
>>55890091
that's not enough to live comfortably
account for cost of living when looking @ salary
that being said, being in the SF area as a programmer means it'll be easy to find another job in a year or two
>>
so why aren't modern operating systems made with persistent memory by default

i.e.

- all operations automatically persist to permanent storage, and memory is only used as cache

- every time you boot your computer, it always resumes the exact same state you were in before shutting down

- you never have to save files because your editor's complete state is already on your hard disk

etc
>>
>>55890123
Whats the desired salary range to live comfortably? I thought that salary would be a lot better than what I imagined most places. Im pretty new to the industry
>>
>>55890091
Work out how much your living costs will be, and what your commute will be. I'd much rather take $110k in Pittsburgh than $125k in parts of Cali.
>>
>>55890137
It's called hibernate.
>>
>>55890091
>$125k software dev
Take it

>>55890123
>that's not enough to live comfortably
What the hell are you talking about? If you are just 1 person then you can live very comfortably even with $25k.
>>
>>55890140
not sure about in the city, but 125k is more than fine if you live outside the city and just take bart or commute every day
>>
>>55889160

Why is javascript so shit?

Trying to learn it, because that's where all the jobs are, but this nonsense is so bad, that it's making me miss Java.

What kind of retard thought dynamic "typing" was a good idea?
>>
>>55890118
Speak american u terrorist
>>
>>55890155
that's not what i'm talking about

what if shutdown was transparently the same as hibernate because everything is automatically always persisted to disk
>>
>>55889231
indeed
>>
>>55890166
In the bay area, housing is stupid expensive.
He will barely be able to scrape by with 125k a year.
>>
>>55890177
Dynamic typing isn't really the main issue. Weak typing is. Look up JSfuck on wikipedia.
>>
>>55890091
how much experience do you have?
>>
>>55890091
I suggest you look at the city on a map from streetview. The pay might be awesome, but it's going to be jarring if you've never been to a city before. The streets are very uneven. So sure you can walk everywhere, but it's nasty in places.

The homeless problem, well, it's bad.

If you can tolerate the city, I'd say go for it. You'll have amazing opportunities. Literally places you can walk to for a different job a few blocks down.
>>
>>55890177
>Why is javascript so shit?
Some fags say it is because Eich only had two 2 days time for the design, but honestly, most experienced devs could create something less defective in 2 hours. Eich is simply incompetent.

>What kind of retard thought dynamic "typing" was a good idea?
If you have only little time to implement the interpreter and its API to the host, it may seem like a good idea.
>>
>>55889662
traps can have qt feet for me to smell
>>
>>55890024
Its more about the fear of the actions they may take due to their hate
>>
How do you guys build Interfaces? I'm lol n00b programmer and use wxWidgets for my Interfaces
>>
>>55890250
Then maybe you shouldn't act rapey around women then, anon.
>>
>>55890191
Nej, norsk er bedre enn engelsk.
>>
>>55889160
making a Movie night bot for my Telegram group.

Uploading movie posters are done, now it's just getting up to speed with sqlalchemy so I can actually save and tally the votes.
>>
>>55890209
Weak typing is definitely a larger problem, but dynamic typing hides valuable information from the programmer while reading through the code, and when you are debugging, it makes reasoning about logic a lot harder.
>>
>>55890239
He could have at least gone for a real lisp, not the monstrosity that we ended up with.

Would that all devs would simply refuse to use JavaScript, or to compile to it, and demand better working conditions.
>>
File: 1455742771072.jpg (157KB, 640x896px) Image search: [Google]
1455742771072.jpg
157KB, 640x896px
>>55890250
What do you mean? Like someone will attack you or something? That isn't something you have to worry about most of the time unless you are violent first.
>>
>>55890091
live in the east bay, commute by BART. Just avoid coming in around 9:00 to 10:00am if you don't like standing for an hour.
Hope you like Mexican and Asian food. (and their 'fusions')
>>
>>55890177
>What kind of retard thought dynamic "typing" was a good idea?
More like who thought duck typing was a good idea.
>>
>>55890351
Enjoy your rape charges.
>>
>>55890263
Qt atm. wxWidget is a valid option, though.

My ratings for multi-platform solution:

Qt: the best, beats hands-down even most native toolkits in regard of comfort
wx: pretty good, suffers a little of not enough devs, since GUI frameworks are a number game
GTK: suffers from only about five devs which are insane and/or slaves to GNOMEs mental illness, at this point no multi-platform
Swing: It sure looks Enterprise
Browserengine based: Pure hell, as soon as you have to use your own GUI by CSS, rather high input latency and slow startup
Tcl: ok for everything that is not much more than a dialog
Everything else: irrelevant
>>
A group of children are returning from playing outside, and some might have gotten dirty. Ten seconds after they come inside, their parents begin calling out "all children with muddy faces head outside", and repeat it every ten seconds as long as there's at least one child with a muddy face still inside.

The children cannot see their own face, and the only action they can take is to either remain inside or leave. Once they've left, they cannot return. They cannot communicate with the other children in any way. Each child can see the face of every other child.

Describe a protocol that all the children can follow such that in finite time, for any number of children and any number of children with muddy faces, all the muddy-faced children will leave and none of the clean-faced children will leave.

Hints (do not read if you want to solve from scratch):
>There's no trickery in the wording.
>The problem can be solved in O(n) in number of muddy-faced children.
>Actual hint, might spoil the solution: if every child knew the exact number of muddy faced children, they'd be able to determine if their own face is muddy by counting the number of muddy faces they can see.
>>
>>55889160
fuck
>>
>>55890394
Cool, I'm glad I at least chose a good one, I'll take to learning qt once I get (to my satisfaction) proficient with wxWidgets. I'm in school for pretty much being a code monkey because I don't have the drive to learn literally anything by myself. So I figured paying out my ass for college would motivate me.
>>
>>55890351
Not necessarily physical violence, but any number of things from verbal/emotional attacks to shaming tactics to spreading bad rumors about me which make my life harder.
>>
>>55890404
ngl tbqh senpai this is pretty gay
>>
Why do /g/ hate PHP?
Real argument
I think it is super eazy way to build web apps.
>>
>>55890404
> >Actual hint, might spoil the solution: if every child knew the exact number of muddy faced children, they'd be able to determine if their own face is muddy by counting the number of muddy faces they can see.


that is the solution

however, if they don't know how many muddy faces there are, which they don't, because they can't see themselves, they could just use their hands to communicate and tell each other which of them are dirty.

bogus question tb.h
>>
>>55889199
Are you me?

I literally went out and bought the Linux Bible at Microcenter like three days again and am doing the same thing
>>
>>55890439
>I'll take to learning qt
No need to that imho, since wx pays the bill.
Unless it somehow kicks the bucket in the mean time.

As a rule of thumb, GUI libraries all suck, at some point you will have to apply some weird workaround or implement some custom widget.
>>
>>55890439
if you're gonna be a code monkey, might as well start learning web UI frameworks. Angular, React, yadda yadda. As long as you know a couple HTML/JS buzzwords to put on a resume you'll be able to nab something.

>>55890487
It's internally inconsistent and fairly insecure by default. Next question.
>>
>>55890487
Google "PHP: a fractal of bad design".
>>
>>55890532
>eevee meme
>>
>>55890488
They can't communicate, as the rules suggest. And there is a solution that does not rely on communication. Ie, they can all close their eyes after initially counting the faces of the other children, and will be able to coordinate such that all the muddy-faced children leave and none of the clan-faced ones do without any input other than the repeated announcement by the parents.

There's no trickery, I'll post the solution in 10 minutes.
>>
>>55890404
>if every child knew the exact number of muddy faced children, they'd be able to determine if their own face is muddy by counting the number of muddy faces they can see.

How would they know the number of muddy faces though? If a child sees 5 muddy faces, there may be either 5 or 6 depending on whether their face is muddy. The only exception is when the parents are calling and they see no muddy faces.

This is probably going to be like that problem where everyone goes in with a muddy face after they hear the parents call the number of times equal to the muddy faces or whatever. I don't understand it but that is how these problems seem to go.
>>
>>55890379
Uh...wait what?
>>
>>55890532
>hide post
>>55890519
So what would you use for building web apps?
Python? Ruby? Node?..?
>>
>>55890567
If a woman accuses you of rape, it's your word against theirs and the police will waste no time arresting you while this is all sorted out and you are proven innocent.

Meanwhile, when people google your name, your name will show up next to words like "rape" and "sexual assault" and everyone will just forever assume you were guilty and your professional career is pretty much over.

All because a woman felt bad about having pity sex with you the night before.
>>
>>55890566
Ah, well you basically gave it away. The solution is this:

All the children know that if they have a muddy face, they'll be seeing one less muddy-faced child than all the children who have clean faces will.

They all agree that if the parents have made K announcements, and they are seeing K-1 muddy faces, they leave. Because all the muddy-faced children see one less muddy face than the clean faced ones do, they'll all leave all at once when the count reaches the actual number of muddy faces, and none of the clean-faced children will leave (because the parents stop announcing after the muddy-faced children leave).
>>
started rewriting my type checker since I've decided my language will be a pain in the ass to use without type inference. I'm still largely unsure of how I'll implement row polymorhpism here, but I think it won't be too horrible. I've figured out how to do most of my other type system features, so hopefully I can start working on the actual back end bits in a little while here. I'm really excited to try some weird optimizations but I need something to experiment with first. plus, I think I'm gonna make an alternative code emitter and RTS for BEAM in the near future, so that we can finally have an (actual) typed Erlang
>>
File: 1459702589670.jpg (31KB, 600x337px) Image search: [Google]
1459702589670.jpg
31KB, 600x337px
does multi threading actually increase speed of your program?
>>
>>55890661
depends
>>
>>55890612
So is this something the children have to agree beforehand? Because if they can't communicate how would they know to go in when the parents call that many times?

>>55890379
He sounds like a shy enough guy that he isn't going to have sex with women that he doesn't know well.
>>
>>55890661
>>55890661
your programs? Probably not by much, unless they are embarrassingly parallel to begin with.

It'll help for the usual suspects, when the bottlenecks are I/O from disk or network, or from the GPU.
>>
>>55890691
I only use it for asynchronous stuff like a loading screen, loading stuff etc. However, I dont know enough to make a judgement if in specific cases mt would make a difference or sense.
>>
>>55890517
I'm not you, I bought it three years ago and have just now started working on my lunix skillz
>>
>>55890685
Currently, i don't plan to sleep with women ever.
>>
>>55890610
Or they can just pick up a knife, murder you, and hide the body. Both are very unlikely and require the woman to really be crazy and hate your guts for no reason.
>>
>>55890685
Yes, as stated in the original post, the problem assumes all the children follow the same algorithm.

They don't know if the number of dirty-faced children they see is equal to the total number of dirty faced children, or one less. But they do know that if they have a dirty face, they'll be seeing one less dirty face than those who have clean faces will see.

Thus, because they know the parents will stop announcing when the dirty-faced children have all gone, and because they know the dirty-faced children see fewer dirty faces than the clean-faced children, they can agree on a protocol that causes all the dirty-faced children to leave, and none of the clean-faced children to leave.
>>
>>55890769
the latter is much more difficult to get away with
>>
>>55890620
Oh god not you again.
>>
>>55890777
That makes sense I suppose. I guess I was confused because in your original post you said the children couldn't communicate so I thought they had to think of a way independent of the other children. If only one of the children was using this method it wouldn't work.
>>
File: prebake5.jpg (27KB, 741x1317px) Image search: [Google]
prebake5.jpg
27KB, 741x1317px
Learning modern OpenGL. Kind of annoying, but whatever.

Not programming, but I also made this clown flower pot out of clay. It's in the oven now.
>>
Where do I look for entry-level programmer jobs?
>>
>>55890933
Stack Exchange jobs site, other jobs sites, career opportunity pages on company websites, craigslist, your email inbox if your have some content on GitHub, your LinkedIn inbox if you have a LinkedIn account.
>>
>>55890926
holy tits that's creepy. Also thank you, the less people learning GL immediate mode the better.

>>55890933
internships? Startups?
>>
>>55890933
The undeveloped world
>>
>>55890966
Everyone asks for a bachelors in computer science and I don't have that.

>>55890971
>internships
I have to be a student for that
>>
File: prebake4.jpg (31KB, 741x1317px) Image search: [Google]
prebake4.jpg
31KB, 741x1317px
>>55890971
>holy tits that's creepy.

My friend invited me as a +1 to a wedding so this will be my gift.

>the less people learning GL immediate mode the better.

Not sure what you mean by this.
>>
>>55891015
If you have equivalent experience, apply anyway. If you don't have equivalent experience, no one will want to hire you until you've gotten better at programming, or you can find a niche you're particularly good at. Work on personal projects and contribute to open source projects to help build your resume and skills. Use the many learning resources available online to learn the computer science theory you might not get from project work.

And you don't have to be a student to get an internship, it just makes it easier (though some internships are actually limited to students).
>>
>>55891015
If you don't want to do your undergrad, just apply to be an intern at a startup. They probably won't pay you much but you'll get "work experience." In the mean time, work on your own projects and call yourself an entrepreneur whether you make money or not.
>>
>>55891078
Where do I find startups?
>>
>>55889867
is the way you "include" global symbols declared outside the current file
>>
>>55891059
>as a +1
wat
>>
>>55891090
Look man you should be able to figure this part out. If not you're going to have trouble working at any job.
>>
>>55889160
>What are you working on, /g/?
Optimising my Boggle playing bot. Currently able to solve a 4x4 Boggle board in ~80 microseconds. Not sure how to optimise further.
>>
File: prebake2.jpg (35KB, 741x1317px) Image search: [Google]
prebake2.jpg
35KB, 741x1317px
>>55891093
My friend was invited to a wedding and was given the option to bring an additional guest, so she chose me. I will bring this clown flower pot. It's almost done baking I think. I'll paint it when it's out.
>>
File: 1470150536990-g.png (200KB, 370x370px) Image search: [Google]
1470150536990-g.png
200KB, 370x370px
>>55889160
Why OP? You flaming Faggot.
>>
>>55891119
>a female friend
>inviting you to a wedding even
You lucky bastard, you ...
>>
Porting Lumen to Linux.
>>
>>55890137
Probably because of legacy spaghetti Windows code and the following golden tech support saying:
"Ma'am, have you tried restarting yet/power-cycle/turning it off and on again?"

This would not be a thing if what you were proposing were the standard.
>>
File: 1407516589326.jpg (54KB, 202x750px) Image search: [Google]
1407516589326.jpg
54KB, 202x750px
>>55889160
Stop trying to turn me gay /g/
>>
File: baking mistake.jpg (39KB, 744x1323px) Image search: [Google]
baking mistake.jpg
39KB, 744x1323px
>>55891137
Well, my oven's temperature thing doesn't work and I guess I overbaked my sculpture. Who would have thought this was harder than OpenGL?
>>
/dpt/ convince me that the HTML5 game meme is a myth and that I should be making a text game with a local program rather than using HTML5 and databases...
>>
>>55891218
var i = require('you to fuck off');
>>
>>55891218
>text based game
>not doing it in hyperTEXT markup language

it's like you don't wanna be the next minecraft
>>
>>55890661
It doesn't go faster, you can just do more things at once. It has diminishing returns, but the way it executes things happen sort of evenly. The caveat is that your CPU isn't a vacuum where the only program running is the program in question.
>>
>>55890966
>your email inbox if you have github

Is this really that common?
I've had an account there 2 years and my email is disabled.
>>
>>55891218
You shouldn't be making a text game because people don't play them
>>
>>55889160
Reinventing the wheel.
>>
>>55891282
Fuck that shit, make whatever you want anon.
>>
>>55891119
better dance with her on the floor anon

I await the story of the night, you know where to find me


on /dpt/ of course
>>
>>55891218
if you made an exalted MUD you could have hundreds of players
>>
>>55891318
OK, the wedding is Friday so I'll be here Friday or Saturday.

Now to start a new clown sculpture.
>>
>>55891281
I don't know how common it is, but I got my internship at Facebook a few years ago via a recruiter who contacted me through GitHub.
>>
I'm trying to build these on windows following the instructions on the henkaku site

https://github.com/xerpi/vita_portlibs

>installed the toolchain
>installed msys2 with make
>zlib built
>libpng and libjpeg built
>can't build freetype, error says there's no native C compiler
Any help?
>>
>>55891117

Are you solving it in a multi-threaded manner?
>>
>>55889542
Sick of you already.
Trip up so I can filter you.
>>
>>55891507
Yes I used multithreading. It gave me a 2x performance boost, which wasn't as much as I expected.
>>
>>55891462
Is GCC on your PATH?
>>
starting to learn C++

#include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;

int main()
{
const float PI = 3.14;
float x, angle1, angle2;

cout << "Enter the value of two angles in degrees.\n";
cout << "Value of angle 1?: ";
cin >> angle1;
cout << "Value of angle2: ";
cin >> angle2;

angle1 = angle1 * PI / 180;
angle2 = angle2 * PI / 180;

x = sin(angle1) + cos(angle2);

cout << setprecision(3) << fixed;
cout << "x = " << x << endl;

return 0;
}
>>
>>55891462
Why don't you try installing a C compiler?
>>
>>55889160
no not on /g/ too....
>>
>>55891611
Yes, the other libraries were built yet freetype isn't building
It's using arm-vita-eabi-gcc
>>
>>55891616
cmath comes with a pre-defined value of pi BTW.
>>
>>55891643
Ah wasn't aware, how do you use it?
>>
>>55890137
That sounds fucking stupid and terrible.
>>
>>55891653
It's just M_PI. If you are using Visual Studio you have to enable it by putting
#define _USE_MATH_DEFINES
>>
Finally almost finished some tutorials about python decide to check some python source codes in github feeling kinda confident I'll understand the code. The code is made out of different files(.h, .cpp, xml, texts) don't even get where the fuck it starts how am I suppose to read it.
>>
speaking of cmath

when doing c++ and using C headers, is there any difference between using c[headername] opposed to [headername].h? eg. cmath vs math.h, cstdio vs stdio.h
>>
What are some of the most interesting Computerphile videos on their channel?
>>
>>55890192
Then rename your shutdown option to hibernate you stupid fuck.
>>
>>55891768
>interesting
>Computerphile

probably the ones with the shortest run time
>>
>>55891618
>>55891611
Fixed it in a dumb way, I don't care though, it worked.
Copied the gcc compiler and renamed it to x86_64-pc-msys-gcc since that's what it was looking for.
>>
>>55891746
>The code is made out of different files(.h, .cpp, xml, texts)
Those aren't Python files. Start with the files ending with .py.
>>
>>55891762
Always use c[library]. The .h libraries are there to maintain backwards compatibility with C. c[library] often contains small improvements to the corresponding .h library
>>
>>55891768
The ones where the guests talk about their time at Bell Labs.

What they're actually talking about is really mundane, but they paint a nice illustration of what programmer culture used to be like back in the 70s and it's really nice.
>>
>>55891826
Link?
>>
>>55891876
Here's some with Brian Kernighan (of K&R fame)
https://www.youtube.com/playlist?list=PLzH6n4zXuckqZ90zLyy36qjO5YIn1RulG

Here's another one talking about bell labs.
https://www.youtube.com/watch?v=CVxeuwlvf8w
>>
>>55891911
Thanks family
>>
File: good_code.png (35KB, 455x695px) Image search: [Google]
good_code.png
35KB, 455x695px
how to write good code
>>
>>55891960
xD
>>
>>55889160
Thank you very much.
>>
File: sponsored.png (132KB, 512x512px) Image search: [Google]
sponsored.png
132KB, 512x512px
>>55890822
hi :3
>>
>>55890620
>typed Erlang

pls go
>>
>>55891960
This hits too close to home.
>>
>>55891605
You may have implemented multithreading in a poor manner.
>>
>>55891698
why?
>>
>>55891785
you don't get it

while operating, the operating system state would always be on disk, minus unflushed caches

calling anything hibernate would just be redundant
>>
>>55889542
What the fuck should I program?
>>
>>55892373
That would be extraordinarily slow.
>>
>>55892419
A cat
>>
>>55892373
it would basically be like pagefiling, except without memory at all (or lets allow a few megs to actually be able to do the swapping)

it would be unthinkably slow
>>
File: 220px-YMF262-M.jpg (23KB, 220x188px) Image search: [Google]
220px-YMF262-M.jpg
23KB, 220x188px
>>55889160
writing an OPL3 music tracker because I can't stand using Adlib Tracker II and Reality Adlib Tracker is super fucking limited (it's originally an OPL2 tracker, but there's a hack that adds the (very useful) OPL3 waveforms -- but not the additional 9 channels or stereo audio or anything, there's no detune, no panning, you can only have like 31 patterns and instruments or so, etc)

spent all day puzzling at the OPL3 datasheet and random docs on the subject of getting Adlib/OPL audio playback from 15-25 years ago and wondering why notes wouldn't really trigger, made an actual breakthrough by reading the raw dump from Reality Adlib Tracker running in DOSBox with DRO Trimmer to see just what I'm supposed to send to the damn registers (note-off before new note, and 0xF0 for sustain/release register if I wasn't using sustain mode were the most important bits), and now I can actually get to working on the important bit of the program now

it's gonna look ugly and it's gonna work pretty ugly as well, but it'll fucking work
>>
>>55892437
What the fuck is a cat?
>>
>>55892635
man it up
>>
File: 1463068465564.jpg (114KB, 1008x720px) Image search: [Google]
1463068465564.jpg
114KB, 1008x720px
Mach best microkernel
>>
>>55889542
I have no idea how I would even START with most of these. Is that normal?
>>
>>55889962
>>55889264
I'm in the same place, anon.
I just finished a pretty big project, a functional programming language interpreter. Nobody I know really gave a shit after I finished so I've been really demotivated to start anything challenging, and small projects are usually boring.
>>
>>55892734
> Nobody I know really gave a shit after I finished so I've been really demotivated

Are you making shit just to impress others? What a faggot you are
>>
>>55890137
Because modern OS's weren't invented yesterday. Yes, today's hardware could probably handle this, but software is built upon older software, which is built upon older software, etc. This is why we have shit like file permissions that are virtually obsolete for 90% of personal computers, or things lack of native unicode support. It didn't make sense in the 70's when all this shit was invented, and since operating systems like Linux have done us very well, nobody has found any reason to drastically reinvent them.
>>
>>55892429
No, it would be fast because you draw read from RAM instead of from the hard drive. If files are untouched long enough (or you press shutdown) them they would be automatically "saved" but this would all be abstracted at the kernel level.
>>
>>55892760
I mean, it wasn't *just* to impress others, but making something for no reason other than just to make it feels, I don't know, meaningless?
I probably just need to think of an interesting enough project to take my mind off of all this.
>>
No not me mum
>>
>>55892734
make it into a compiler now
>>
>>55892171
why? I know that the current "Typed Erlang" is garbage but what's wrong with the concept in general?
>>55892734
sounds cool anon :)
>>
>>55892734
>a functional programming language interpreter. Nobody I know really gave a shit after I finished so I've been really demotivated to start anything challenging
Exactly the same happened to me, in fact I had my useless friend whine and laugh about missing features.
>>
>>55889542
If I don't get something good I am going to cry.
>>
>>55893051
WHAT THE FUCK IS A CONVOLUTIONAL NEURAL NETWORK??!?!?! WHAT THE FUCK IS THIS SHIT!!!
>>
programming music
https://youtu.be/5YqspBnLdf0
>>
>>55889542
I roll the numbers.
>>
Getting started on Android animations is a nightmare. Why can't Google fucking name their API shit in a less confusing way?
>>
>>55889542
roll
>>
>>55893151
Android in general is a nightmare. It's not just you, anon.
>>
>>55889542
rolling
>>
>>55889542
> 16 - chip 8 emulator
> cached interpreter

it's called "threaded interpreter"
the terminology has been around for like 50 years
>>
>>55893083
look it up you cuckfuck
>>
>>55889160
baka
>>
File: 1468894503476.jpg (70KB, 530x530px) Image search: [Google]
1468894503476.jpg
70KB, 530x530px
>>55889160
So....

For you guys, if you were to name a C like function using good old noun verb pairs, would you put the noun of the verb first?

GraphTraverse()

or

TraverseGraph()

The former is nice when you have lots of, say, Graph???() functions. The later is how English works.

What's your opinion?
>>
>>55893302
I'd have it traverse_graph() just to stick it to the OOP-man
>>
>>55893302

I prefer the former given how IDEs auto complete. So type Graph and get a nice list of all your Graph???() funcs. If you are working on graphs you want the suggestions to be focused on on your graph operations. Also if you have a need for separate files (for example OpenGL shaders or something) having them be grouped alphabetically is also nice.
>>
hey guys I really need to brush up on my c++. Im forgetting everthing I learned because I don't practice.

Are there any books that have mini projects or somehting like that? preferably on data structures and anything that comes after in c++. I learned up to pointers in my college course.

Thanks
>>
>>55893356
it'll most likely find all functions that end with graph as well
>>
File: 1466121807892.gif (410KB, 640x384px) Image search: [Google]
1466121807892.gif
410KB, 640x384px
>>55893356
I tend to agree. I have been writing code for other people recently and have been a little worried the NounVerb() might throw someone off, but from an alphabetic and consistency (ie things line up nicer) point of view, it's the way to go.

Another stylistic question directly aimed at C. I posted it here

>55893368

but this is the more appropriate thread.
>>
oops
>>55893368
>>
>>55893419

Only the _t ones, because _t is reserved by POSIX. But so much software breaks that rule...
>>
>>55893496
I wish POSIX hadn't done that, but after becoming aware of it I have never stepped over that line. It's probably for the better in the sense that _t could be any type, whereas something like _s could only be a struct (if that's how you use it).
>>
>>55893419
It's stupid because:
1: unions, structs and enums have different namespaces
2: you have to write the keyword anyway when you use it

>>55893496
I had a few programs where I had some really weird compile errors due to this actually.
>>
Ok so I'm making an ASCII game, but not in a terminal/console, I'm "simulating" a console in modern opengl. So I have a data structure for the console which is composed of square cells each with a glyph, foreground color, and background color. However the problem with this is that I need to be able to render text that doesn't have a huge gap in between characters. I discovered monospace fonts, and I would be able to fit two 8x16 characters in one of my 16x16 cells. How should I implement this shit? Have a seperate "console layer" for my text rendering, and just have half-width cells but twice as much of them? And for the non-text layer, just check if there is text in the text layer at the same position of a cell (multiply x by 2) and if so, don't render that cell so the text isn't drawn on top of the cell?
>>
>>55893539

I wish it was better if developers and people in charge weren't stubborn or idiotic and agreed to follow the rule on the condition that when POSIX reserves a _t name that they are already using, they won't put up a big fuss over it and change their code or not compile it on a newer standard-compliant compiler.
>>
>>55893302
looking at what I'm writing right now, my function names resemble TraverseGraph() at the moment
I've done stuff where I've grouped the start of names like that, but most things I've written have more natural sounding function names.
>>
>>55893614
I'll stop cross posting after this, but see my response
>>55893652

> 2: you have to write the keyword anyway when you use it
I typedef so I don't have to write the keywords everywhere.
>>
>>55893620
use libtcod
>>
>>55893687
And this would not be a problem at all if you used the keywords.
Also, read what the linux coding style says about typedefing structs
>>
>>55893697
>typedefing structs
I agree that typedefing pointers is a bad ides, but Linus can go fuck himself about typedefing structs.
>>
>>55893098
no one else here likes chopin? :(
>>
Alright, I got Visual Studio Community 2015 installed, what do I do next? Windows Form Application?
>>
Is it possible to make a neural network to identify futanari images so I can delete that shit?
>>
>>55894142
Yes.
But that would be counter-productive because first you need to download all the futanari images first.
>>
>>55894146
How would it work with all the conflicting art styles and shit...?
>>
>>55894124
What do you want to achieve?

>>55894146
Do you think the government trains neural networks to identify child porn?
>>
>>55894171
I don't have any particular goal.
>>
>>55894142
You don't need neural network.
Just use IQDB and use tags of *booru.
>>
>>55894192
What are you actually doing then?
>>
File: Clockwork'71.jpg (92KB, 497x300px) Image search: [Google]
Clockwork'71.jpg
92KB, 497x300px
>>55894146
To give a machine awareness only to indoctrinate it with futa. Humanity knows no limits to its hubris.
>>
>>55894212
Thinking about writing a program.
>>
WORDPRESS FUNCTION PROBLEM

Got a WP website with car listings, problem is when I'm trying to import ads from external site - cover/featured image is not showing because the function for showing featured image is custom and isn't using wordpress images or thumbnail, rather generate them itself. How do i change the code so the cover image is either first image or other better solution that I'm not gettin?

Pastebin with code (too long for post)
http://pastebin.com/LdXwrJx2
>>
Anyone have a good book on compilers?
>>
>>55894142
>it false-possitives girls with strap-on
>>
>>55894481
The dragon book
>>
>>55894503
isn't that one 1000+ pages?
>>
File: The_life_in_the_machine.png (594KB, 555x5015px) Image search: [Google]
The_life_in_the_machine.png
594KB, 555x5015px
Is this possible
>>
trying to find a working windows 7 ult product key
>>
>>55894522
No, it's a bit less than 1000.
>>
>>55894537
>wall of text
fuck off
>>
>>55894481
>>55894522
You don't need to read the whole thing. What about compilers are you interested in?
Parsing? Code generation? Type systems? Just clueless and want to start from the beginning?
>>
>>55894538
...why? Sounds stupid.
>>
>>55894546
It's a good read
>>
>>55894553
cause I'm a cheap bastard that doesn't want to buy windows 10 thats why
>>
>>55894552
>what about compilers are you interested in?

Basically everything leading up to actual instruction generation.
>>
>>55894576
Why do you want to use windows that much in the first place?
>>
I'm thinking about making a compiler, too.
Can I build one without reading any books if I know how to parse the code, build an AST, and I'm pretty sure I could translate that into assembly? is that all I need to do?
>>
>>55889160
>file deleted
ahahahahaha, based mods
>>
>>55894678
They actually did it due to the "reply to this post or else ..." thing probably.
>>
>>55894538
daz loader
>>
>>55894642
Go ahead and try it, what's the worst that could happen?
>>
does gl_FragColor get clamped implicitly or is it UB if you write values outside of 0..1 to it? can't find any mention of it in the standard (glsl es 1.0)
>>
>>55894754
nope, you have to clamp it
>>
>>55894761
thanks but do you have any reference or are you speaking from experience?
>>
>>55894752
yeah, I'll start once I decide what language to do it in :)
>>
>>55894754
ah it's in the gl es spec, not in the glsl es spec
>The OpenGL ES Shading Language specification describes the values that may be
output by a fragment shader. These are gl_FragColor and gl_FragData[0]
3
. The final fragment color values or the final fragment data values written by a
fragment shader are clamped to the range [0, 1] and then converted to fixed-point
as described in section 2.1.2 for framebuffer color components.
>>
File: Kermit-contemplating.png (69KB, 200x235px) Image search: [Google]
Kermit-contemplating.png
69KB, 200x235px
Are functional programmers TOO smart to be employed?
>>
>>55894853
rust
>>
>>55894907
They're too smart to be too smart
>>
>>55894946
I tried it some time ago. It seemed kind of perfect, I really like haskell like strong typing, it had nice features without being too big like C++. But I didn't get those lifetime things, got mad and rewrote the project in C
might read up on the language and try again, it's really good
>>
>>55889542
roll
>>
>>55889542
roll
>>
Essential C# 6.0 by Lippert and C# in Depth (3rd ed) - are those good? I would suppose so, given their rep, but they are very expensive where I live, so I would need to be 100% sure they are good before I drop my 2 week earning on a book.
>>
>>55895053
>books
There are tons of online tutorials.
>>
>>55895108

If I would prefer online tutorials, I wouldn't ask for books now, eh?
>>
>>55892926
Your useless friend is a faggot
>>
File: record-12.webm (2MB, 1364x764px) Image search: [Google]
record-12.webm
2MB, 1364x764px
I have just finished a major project of mine and now I am bored.
Now I cannot come up with anything and just fuck around with senpai's laptop.

webm related
>>
>>55895528
Take the time to do something else, like going outside.
>>
>>55890091
>125k
>in SF

lol do not
>>
>>55893302
VerbNoun is preferred, depending on your language.
>>
I'm writing an agent-based history simulator kind of like Dwarf Fortress's worldgen. I want to simulate and store at least 10,000,000 entities. Right now each entity is 1kb so I'm looking at about 10GB peak RAM usage + the overhead for the world (~4GB atm). I have 24GB of RAM in my machine so this isn't a big deal, but let's say I want to triple the number of agents -- I need to find a way to get the size of the entities down, compress them, or cycle in/out from SSD (not ideal, takes way too long per tick).

Is compression particularly viable here? The entity's data isn't completely random, but it varies enough that I doubt I'd be able to get much of a win... but I don't have any serious experience with compression. We're talking about a bunch of integers, a small char array, and a handful of floats. No pointers (I use indices since 64 bits is too expensive). Ideas?
>>
>>55893356
>I prefer the former given how IDEs auto complete. So type Graph and get a nice list of all your Graph???() funcs.
Or you could use a proper IDE that will show things like VerbGraph after typing in 'graph'.
>>
>>55895752
It's OK, but only if your employer lets you sleep in their parking lot in your car. Don't even think about paying rent.
>>
>>55895053
The only C# book I have experience with is Murach's.

You learn the language and GUI concurrently, and apply things to business applications with database back-ends.

Unfortunately, I don't think they have an edition that utilizes MVVM with XAML, which is probably important to learn these days.
>>
>>55895920
LINQ is by far the most important part of C# to know. 99.9999% of programming is just traversing lists. Anything that doesn't cover LINQ in depth is shit.
>>
>>55896093
I completely agree with this.

LINQ makes me erect.

What's Javas native equivalent?
>>
>>55896093
>>55896157

LINQ is basically just a built in sql library..
>>
>>55896093
>99.9999% of programming is just traversing lists.
Bullshit.
>>
>>55896191
I don't think you understand what LINQ is.
>>
>>55889542

roll
>>
>>55896209


Then enlighten me.. What exactly is LINQ aside from a slightly higher level of abstraction over sql with the option to change storage methods (Objects, XML, ADO.NET)?
>>
>>55896205
Not 99% but definitely the "majority" is just iterating through data structures and operating on them. Libraries handle everything else, I just write the code to interface with them and then perform their operations over all my data.
>>
>>55896252

You should preface this statement with a qualifier of "In enterprise / common programmer jobs"
>>
>>55890769
>be crazy and hate your guts for no reason
It's called being a vindictive cunt. It happens, often.
Just stay single and fuck random chicks, much more simple.
>>
Why do language designers insist on ruining their languages with garbage collection? Go and D both had a lot of potential to succeed C/C++ but the stance on garbage collection means they're utterly shit.

Memory leaks are easily diagnosed.
>>
>>55896368
>Memory leaks are easily diagnosed.
False
>>
>>55894584
compilers are actually easier to do than interpreters because interpreters do all processes (text parsing, equation trees, actual execution) at once for each instruction individually so it's all muddled together while compilers separate all processes and do them over entire text one after another

You can simplify things in a big way if you pick already somewhat powerful target language -- meaning you don't necessarily have to translate into machine code/binary/.EXE/.elf/whatever

Translate into asm code and leave linking part to it

For my school project i remember i used something called nasm to generate .exe files from rather basic-like code.

Nowadays the most important compiler work is done in various javascript polyfills (Babel, CofeeScript, TypeScript, Dart and so on) or maybe D which similarly compiles into C++ code
>>
>>55896237
LINQ is a rather limited recreation of functional and vector languages (APL, J, K)

where in K you write

1+1 2 3
to get
2 4 5

with LINQ, you write
[1,2,3].select(x=>x+1)


SQL/ORM actually can be done without any linq whatsoever, it's just easier with one.
>>
>>55896415
>run valgrind
>fix your shitty code

Wow so difficult
>>
File: a.png (25KB, 821x410px) Image search: [Google]
a.png
25KB, 821x410px
>>55896237
SQL abstraction is only a small portion of its use.

It adds set comprehension with lambda expressions for lists of objects with lots of built-in extension methods.

When you google LINQ, you see the
select x from y
syntax, which is weird because I don't know many people that actually use that part of it.

Say you have a list of People with properties like First/Last Name Address, etc, and you have a CSV file or something with just a list of names combined.

You could do something like pic related.

Lots of other things available like aggregating, taking x amount, reversing, etc.

Here's Euler #8 in LINQ:
static void Euler8(string inputdatapath)
{
string orgStr = ReadAllText(inputdatapath);
int consecDigits = 13;

var max = Enumerable.Range(0, orgStr.Length - consecDigits).Select(idx =>
{
return orgStr
.Substring(idx, consecDigits)
.Select(x => long.Parse(x.ToString()))
.ToArray()
.Aggregate((a, b) => a * b);

}).ToArray().Max();

WriteLine(max);
}


It's hard to explain until you start to find uses for it everywhere in your code.
>>
>>55896514
>until you start to find uses for it everywhere
Well, if all you have is a hammer, everything starts looking like a nail.
>>
>>55896514
>>55896472

>>55896566

Greenspun's fourth rule is strong here.
>>
>>55896566
But they actually are all nails, and you're only now realizing there's been a hammer in your toolbox the entire time. Until now you've been beating them in with your fist.
>>
>>55896585

Damn it, I shouldn't talk and type. "Greenspun's tenth rule"
>>
>>55889160
I hate learning. I wish i had the motivation i like used to and just make game.
>>
Writing a python library to parse and manipulate Avid Log (.ale) files.

Sounds dumb, and it is, but it's for the movie studio where I work, and people are already flipping their shit over what I've done so far. Even gave me a raise and stuff.
>>
>>55896629
That's some good shit. I wrote a script for my boss that let him spend 5 minutes a week doing payroll instead of 2 hours and he fired me a few months later anyway. Now I'm working at a fucking convenience store.
>>
>>55896668
That's fucking shit, man. Fortunately I'm union (motion picture editor's guild) so I'm not so worried about that
>>
>>55896311
mew
>>
>>55893302
in C it's definitely GraphTraverse because C doesn't have namespaces. in OOP it's more like graph.traverse()
Thread posts: 314
Thread images: 30


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