[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
/dpt/ - Daily Programming Thread
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 255
Thread images: 23
File: NSA.jpg (89 KB, 1366x768) Image search: [Google]
NSA.jpg
89 KB, 1366x768
old thread: >>51901563

What are you working on, /g/?
>>
First for strrev in O(1) complexity.
>>
Trap threads best
>>
Writing a program that will text me a new picture of my waifu every day.
>>
>>51907870
O(1000) is O(1) ;-^)
>>
>>51907878
how are you verifying imagine uniqueness?
>>
>>51907888
just grabbing em off google images tbf
>>
AoC Day 17 solution - 26th place:

import itertools

data=open("Advent17.txt").read().split("\n")
count=0
mini=0

#for part 2, uncomment everything and comment out count+=1 before mini=j
for j in range(len(data)):
for i in itertools.combinations(data, j):
if sum(int(x) for x in i)==150:
count+=1
#mini=j
#break
if mini>0:
break

#for i in itertools.combinations(data, mini):
# if sum(int(x) for x in i)==150:
# count+=1

print count
>>
>>51907898
Well it's obvious you really care about your "waifu"
>>
>>51907907
it's actually just going to be cats for me, but you can use your waifus name if you use the program, and i just said waifu in my post to appeal to autists
>>
>>51907906
itertools is cheating
>>
>>51907916
nigga python is cheating, at this point all I can do is continue sinning
>>
>>51907929
poty
>>
>>51907898
resize the images to 64x64 and then hash them. if you find a hash you've seen before, look for a new image.
>>
>>51907952
i started learning python 3 days ago man
Maybe I'll add it after it's done and working
>>
>>51907906
AoC is fucking miserable in C. I think I stalled out on the logic gates problem because I'd spent 30 minutes writing code and still had half an hour left. I'm not devoting an hour a day to solving programming puzzles outside of work...
>>
>>51907854
Please do not use an anime image next time, thanks.
>>
dict(zip([], [])) is my favorite line to write
>>
>>51907968
they only take about half an hour if you're ok, 7 to 15 minutes if you're focused

>logic gates problem
that legit took me days, but only because I couldn't be bothered to brute force. Everytime the program ran for more than a minute, I closed it even if it would have solved it. I have no patience for it. Managed to pick up my balls and optimize the solution though, messy as it is:

data=open("Advent7_1.txt").read().split("\n")

lines=[]

for i in data:
lines.append([])
lines[len(lines)-1]=i.split()

while True:
solved={}
toDelete=[]

for c,i in enumerate(lines):
oldSolved=len(solved)
if len(i)==3 and i[0].isdigit():
solved[i[2]]=i[0]
elif len(i)==4 and i[1].isdigit():
solved[i[3]]=str(65536+~int(i[1]))
elif len(i)==5 and i[0].isdigit() and i[2].isdigit():
if i[1]=="AND":
solved[i[4]]=str(int(i[0])&int(i[2]))
elif i[1]=="OR":
solved[i[4]]=str(int(i[0])|int(i[2]))
elif i[1]=="LSHIFT":
solved[i[4]]=str(int(i[0])<<int(i[2]))
elif i[1]=="RSHIFT":
solved[i[4]]=str(int(i[0])>>int(i[2]))
if len(solved)>oldSolved:
toDelete.append(c)

if "a" in solved:
print solved["a"]
break

while len(toDelete)>0:
i=toDelete.pop()
del lines[i]

for a,i in enumerate(lines):
for b,j in enumerate(i):
if j in solved:
lines[a][b]=solved[j]
>>
>>51907968
I literally gave up on AoC after my nicely written C reindeer olympics simulator would produce an answer that the website claimed I copied from somewhere else.
Fuck this site.
>>
>>51907959
nice, ambitious project for a beginner but you seem to be doing fine
>>51907995
doesn't that just create an empty dict?
>>
>>51902735
import Data.Char

getWordCount = countWords . map (filter isAlpha) . tokenize

countWords :: [[Char]] -> [([Char],Int)]
countWords xss = countAux xss $ map (\xs -> (xs,0)) $ removeDup xss

countAux [] acc = acc
countAux (x:xs) acc = countAux xs $ lookUp x acc where
lookUp _ [] = []
lookUp x (y:ys)
| x == fst y = (x, 1 + snd y) : ys
| otherwise = y : lookUp x ys

removeDup = removeAux [] where
removeAux acc [] = acc
removeAux acc (x:xs)
| x `elem` acc = removeAux acc xs
| otherwise = removeAux (x:acc) xs

Use JHC to compile to C code.
>>
File: 82d.jpg (101 KB, 584x649) Image search: [Google]
82d.jpg
101 KB, 584x649
>>51908043
>hands massive obviously Haskell-compiled inefficient C code in for an interview
>>
>>51908024
I've programmed in C for a while so I'm trying to do something that takes advantage of all this new stuff

And I meant for that to be a generic line, zip() taking two lists in general
>>
>>51907854

I'm still trying to correctly average two integers, rounding away from zero.

Not even kidding.
>>
>>51908043
shit, forgot tokenize
tokenize :: [Char] -> [[Char]]
tokenize [] = [[]]
tokenize (x:xs)
| x == ' ' = [] : tokenize xs
| otherwise = (x : head res) : tail res where res = tokenize xs
>>
>>51908054
You should learn Haskell. Some crazy shit (infinite lists! and more!)
>>
>>51908043
In python, easiest way would be to make a dictionary where the keys are words and the values are the count. You check "if key in d" and increment if it is, or set it to 1 if not. Then you print all the keys next to its values
>>
>>51908087
That's basically the C solution too, except you need to write your own dictionary/hash. Good luck!
>>
>>51908065
Keep at it. Realize all the cases of possible inputs and how they alter the output, then canonicalize.
>>
>>51908076
I actually was learning it for about a week, switched to python for the libs and the employability. I had a great deal of fun in that week though and definitely will revisit it soon.
>>
>>51908091
>you need to write your own dictionary/hash
what if i just make an array of char arrays and assign the next token to a new slot if it doesn't strstr match any of the previous strings?
>>
>>51908091
I see, pretty cool then. Couldn't really tell what the haskell code is doing at a quick glance since I've never used it.

Are job interview questions that easy though?
>>
>>51908113
That's slow as fuck if the list of words is long.
>>
>>51908113
Totally depends how many comparisons you plan on doing. If you're processing 10,000,000,000 words, the Python solution with a dictionary will run faster than your array-traversal C solution.

I'd do it your way if i knew I only had to check 20,000 words or so and it was a quick hack for a personal project.
>>
>>51908139
>10,000,000,000 words
now you're just being silly
at an average length of 5 chars per word, that's like 50GB of memory
>>
>>51908043
>>51908074
the amount of recursion is actually mind-boggling. I used to think recursion was simple but now I'm not sure.
>>
>>51907968

So don't do it in C. If you want a meaningful C exercise, try making a shell or something. For simple puzzles, just use whatever language you're comfortable hacking shit up in.
>>
Less shitty AoC Day 17 solution:

import itertools

data=open("Advent17.txt").read().split("\n")
count=0
found=False

for j in range(len(data)):
if found==True:
break
for i in itertools.combinations(data, j):
if sum(int(x) for x in i)==150:
count+=1
#found=True

print count


Now for part 2, once it starts finding a solution, it will stop if the next solution uses more numbers
>>
>>51908161
The size of Wikipedia's complete edit history uncompressed is over 10TB. it's not really absurd.
>>
>>51908172
Clearly he should just write his own language in C that will make it easier to solve AOC for him.
>>
>>51908091

>write your own dictionary/hash
Just use klib or glib's hash tables.
>>
>>51908176
I'm sure any large scale operations like that are expected to take a long time, because you'll be forced to write and read your word count and tally to disk.
>>
>>51908195
Are you defending an O(n^2) array traversal because "it's expected to take a long time"?
>>
>>51908191
>dealing with the clusterfuck that is C libraries
No thanks. The only C libraries I use are the ones that come in a single .h file that I can easily include, and are released in the public domain or otherwise don't require attribution or license changes on my behalf.
>>
>>51908203
pretty much
stop overcomplicating your life
>>
>>51908220
>single .h file
unbeknownst to this anon, that .h file is just full of includes
>>
>>51908223
Or you could just use a pre-existing library to do it for you and get performance out of it too...
>>
>>51908247
Why the fuck would anyone want to count the number of occurrences of every word in the edit history of wikipedia?
>>
File: gfT5h68.webm (2 MB, 640x368) Image search: [Google]
gfT5h68.webm
2 MB, 640x368
Ask your beloved programming literate anything.
>>
>>51908258
What? That was never said, stop shitposting.
>>
>>51908269
see >>51908176
>>
>>51908118
Writing your own hash table in C to store an unknown amount of entries isn't exactly trivial.
>>
>>51908273
Someone mentioned it, so that's what were are talking about. By chance, do you have asperger's?
>>
>final exam today for intro to c++
>be last one out
>leave class
>a big group of my classmates for this class talking about the final
>one of them says that they should round up the classmates and go to a party
>they start inviting other classmates
>walk passed them
>they look at me then stay quiet
>leave
>over hear them start talking again

should I be worried?
>>
>>51908302
>should I be worried?
why?
You already know they want to avoid you.
>>
>>51908302
yeah they know you're autistic because you never attend class you spazzer

for real though, you are me years ago
>>
>>51908290
>write shitty hash algorithm (like unsigned int hash = (data * 4 ^ data >> 2);
>malloc some space
>start adding entries into your hash table using your shitty hash algorithm
>if you try to add more entries than you have room for, realloc twice as much space
>you're done! when you want to look something up, hash it, then grab whatever's in that cell

Literally 5 minutes of code.
>>
Is there a C SDL tutorial that isn't shit?
>>
>>51908290
It is unless you're fucking terrible.
If you can't whip out a hash table from scratch in a few minutes you need to go back and learn your basic data structures.
>>
>>51908399
No, because SDL is shit. Just write your stuff from scratch. It literally takes about 3 hours to get a multiplatform bitmap renderer up and running.
>>
>>51908413
are people actually like this?
>>
>>51908348

Not GP. I don't think I've written a hashing function since high school.

How do you handle collisions? Do you store the full key along with the data, and jump down the list of collided keys until you hit the exact match?
>>
>>51908467
That's typically how I deal with collisions if I'm lazy, yeah. If you use a good hashing algo (not the one in that guy's post lel) collisions will be quite rare, but even if they happen, traversing 4 or 5 entries of an array to compare keys in the worst case is still an enormous improvement over iterating over half the entries on average. Linear access is a bonus and easy to code. Also typically resizing your hash table isn't as easy as reallocing like that, so there's some more boilerplate.
>>
>>51908220

klib's khash it literally just a single .h file, and it's released under the MIT license.
>>
>>51908459
There is literally no reason to use SDL. I'm working on my third game engine right now. Coding the platform-specific (input, window management, sound, threading) bullshit took me less than a day. Prepping my OpenGL environment took maybe 3 hours... and now I have pretty much everything SDL would've provided me. Hardly a waste of time, especially because of how easily I can dive in and tear things out if I don't like the way I implemented them.
>>
>>51908508
Cool. I wish more C libraries followed that philosophy. Dynamic linking leaves a bad taste in my mouth.
>>
>>51908525
and your games is running on linux/macos/windows/android/ios ?
>>
Why does JavaScript get a lot of shit, /g/?

I haven't noticed any problems.
>>
>>51908556
dynamic and weak typing
>>
>>51908556
>JavaShit
>>
>>51908105
It seemed memeish the shit people said about Haskell, that it'd make you a better programmer and all that shit, but in my case it has.

The only issue is when I found out a functional implementation sometimes runs -much- worse than the imperative way in some languages(optimization issues.) But the functional way is almost always much clearer at first glance for me now.
>>
>>51908546
Linux/Windows. I don't have OSX to compile on, but I doubt it would take more than 2 hours to port.

No idea about mobile. Never programmed for them, never will. Seems to me if you're planning on making a mobile app you should design it for mobile ground-up instead of half-assedly porting something designed for desktop/laptop.
>>
>>51908556
Weak typing. Hoisting WHILE using functional scope(it seems insane because it is, and causes a ton of bugs with novice programmers.)
>>
>>51908539

You know you can static link libraries too, right? Not that it's always the wisest move. On Windows, static linking all of the things is acceptable, because there's no working package manager, so you're going to be distributing all of the dependencies with your application any way you slice it. On Linux though, there's no reason not to take advantage of the space and memory saved by using dynamic linking. And yes, memory is saved. If two applications use the same dynamic library, both can access that library's functions via shared memory.
>>
>>51907915
>cats
You are sick
>>
>>51908556

It's super-fucky. It has really powerful capabilities, but to be honest nobody really even realized that until the 2010s. It's a mix of weirdo ideas and fucky behaviors.

Also, optional semicolons. What the fuck. Fucking retarded. I'm convinced it was a passive-aggressive move by a programmer whose coworkers kept putting opening curlies on a new line.
>>
>>51908608
This is only a problem if your libraries are retardedly bloated. Nobody needs 300MB+ libraries. If libraries were more specialized and less monolithic, dynamic linking would be absolutely useless.
>>
>>51908615
How do optional semicolons prevent you from doing that anyway?
>>
>>51908662

Because it inserts them like some kind of retarded fucking program.

http://robertnyman.com/2008/10/16/beware-of-javascript-semicolon-insertion/
>>
>>51908645

Even if it's only a small amount of memory saved, why waste the disk space on static linking, or the network bandwidth on distributing statically linked applications? Linux already has the infrastructure for making it easy to distribute dynamic libraries into standardized locations, and therefore the use of static linking is more or less useless on this platform.
>>
>>51908690
OK, but what if a program depends on a library's older version that has inconsistent behavior with the newer version?

With static linking this isn't an issue. With dynamic linking, your package manager needs to store every version of every library forever.

People are awful at programming. Libraries will have bugs. Programmers will rely on those bugs. It is inevitable.

If people were good programmers and followed good practice, then I agree, dynamic linking might be "ideal", but I don't think the world works like that. Including all the code you need for your program to work properly is always going to be the safest course of action.
>>
>>51908043
>>51908087
module Main where

import Data.Map as M (empty, insertWith, toList, Map())
import System.Environment (getArgs)

main :: IO ()
main = getArgs >>= \[x] -> readFile x >>= \y -> return (createDict y) >>= (mapM_ print) . M.toList


createDict :: String -> Map String Int
createDict l = go M.empty (words l)
where go :: Map String Int -> [String] -> Map String Int
go m [] = m
go m (x:xs) = go m' xs
where m' = insertWith (+) x 1 m
>>
>>51908690
>Even if it's only a small amount of memory saved, why waste the disk space on static linking

I don't know about libraries on Linux, but dynamic libraries on Windows are a huge pain in the ass. Disk space, memory, and bandwidth are all increasing like crazy. I mean, fuck, the *average* webpage now is bigger than pretty much any Win32 binary package I've ever shipped.

So, yeah, I'd much rather take the maybe 200KB penalty versus having software that doesn't run.
>>
>>51908728

Doesn't Linux have smart dynamic linking, where you can have versioned libraries on the same machine?

Basically, what Windows did with manifests and their super sneaky fake file-system trickery?
>>
>>51908734
If you're stringing together >>= like that, why not just use do notation? And you can move createDict to be another thing in the following composition, because you are doing nothing but applying it. So something like

do
[x] <- getArgs
y <- readFile x
mapM_ print . M.toList . createDict $ y


You could also merge the last two lines to
readFile x >>= mapM_ print . M.toList . createDict


I think this is nicer than chaining >>=, unless you are doing it for learning purposes. If you are, you could still move createDict to the compositions
>>
>>51908728

In that case, use static linking.
In the general case, just always use the latest, most bleeding edge version of any given library.
>>
>>51908734
>
>>= \y -> return (createDict y)

This is equivalent to map createDict y. I agree with the other anon that createDict should be moved to the mapM_ block.
>>
>>51908879
But the point was that I might write this code with a bleeding-edge version of a library, and I dynamically link it. Now I have to expend time and effort making sure it always works with newer versions of the library. If I statically link, then I know for a fact it just werks.
>>
>follow open.gl's tutorials for SDL boilerplate
>install glew-dev
>program segfaults

am i being trolled?
>>
So I got the thumbnails for each result from the google image search, getting the actual image seems to be hard... I know the link is in class="rg_di rg_el ivg-i" but it's not working out.
I'll keep trying, but if not, thumbnails of the waifu work.
>>
>>51908973
>using openMeme
Yes.
>>
>>51908973
Did you call glewInit()?
>>
>>51909040
yeah

was that bad?
>>
>>51908973
GLEW is fairly clunky. You need to tell it whether you'll be linking against the static or dynamic library (via GLEW_STATIC). And you need to check whether your system actually supports a feature, otherwise you'll just get a segfault when you call a null function pointer. It won't magically add features which your hardware/driver doesn't support (and if your driver installation is borked, you get Window's built-in software-only OpenGL 1.1 implementation).

For some extensions on some drivers, you may need to set glewExperimental=1. That causes it to not bother checking whether the driver reports the extension as supported; it just retrieves the function pointer regardless (some drivers don't report all of the extensions they actually support).
>>
how the tits do u do aoc 17 without using niggertools
>>
>>51909072
What's causing the segfault, exactly? glGenBuffers? And what is the exact error message?
>>
>>51909091
i have no clue
this is literally the first time i've used an external library, or written something that wasn't a command line toy.
make
gcc -O2 -ansi -o opengl opengl.c -lGL -lGLU -lGLEW -lSDL2
$ ./opengl
Segmentation fault
>>
>>51909105
Run it through gdb, it will give you a better idea of what's causing it.
>>
Using hardcaml at work, feels good.
>>
>>51908572
>this is a library that lets me write one code for all platforms
>don't use that; manually write code for each platform

Made me smile.
>>
>>51909109
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
>>
>>51909145
You need to compile with debug symbols (-g flag)
>>
>>51909084
You don't.
The dev is an unrelenting webdev faggot and probably wrote the whole thing in python.
>>
>>51909144
But writing your own stuff is very rewarding and offers you far more power vs. using someone else's general solution.
>>
File: halp.webm (862 KB, 800x500) Image search: [Google]
halp.webm
862 KB, 800x500
Alright /g/, I literally have no idea how to add landscape mode to my app, wat do? Must I create a new View Controller? Pls halp.

> webm related, it's my app shiting itself on portrait
>>
>>51909161
Not really. For every new platform-specific feature you'll want to use, you'll have to implement it on each platform. And it's all already written for you in the library.

>very rewarding
Maybe the first time you do it.

What exactly do you dislike about SDL?
>>
>>51909187
I only glanced through the SDL docs, but it just seems like a lot of boilerplate and most of it is unexplained. It does not inspire great confidence that it's well designed.
>>
>>51909197
I deeply regret taking your previous comment seriously.
>>
>>51909204
Well, I've just never really found an eed for something like SDL, I guess. The features I want from it only take a few hours to implement myself... and if I'm working on a project that'll take months, then a few hours is nothing.
>>
>>51908525
Yeah.
Well done.
After saying things like there is literally no reason to use SDL, now you finally admit you never used SDL and you're writing code that does not need most of functionality SDL provides.
>>
>>51909154
same output
>>
>>51909235
Well, what does SDL do that is so hard to implement on your own? Graphics are trivial. So is sound and input. Networking might be tough the first time you do it, but besides that... is there anything else?
>>
>>51909253
Graphics are not trivial.
>>
>>51907968
>AoC is fucking miserable in C
this so much
I might learn python, because I've been meaning to learn something I can actually whip up code fast with.
>>
>>51908833
Yes you're right, it looks way better!

>>51908921
It's not equivalent, because
readFile
gives me a String. I use words to iterate through the words in createDict.
>>
File: project.gif (393 KB, 900x400) Image search: [Google]
project.gif
393 KB, 900x400
>>51907854
Thanks for the help on the string character loop, I had to find a new solution that worked though.
>>
>>51909253
Graphics/sound/input/networking... you said networking may be the toughest... wtf.

I'd rather do networking before any of the others.
>>
>>51909317
Someone recommended using Javascript because it's easy enough to write the code write in your browser and execute it on the web page immediately. Not sure if I hate myself enough to steep that low, but I'm considering it.
>>
Someone tell me there is a better way to do this. I felt so CS-grad meme tier writing these lines.
            # Download the image
raw_image = requests.get(img['src'])
# Write the image to a file
image_file = open('.image_temp', 'wb')
for chunk in raw_image.iter_content(1000):
image_file.write(chunk)
image_file.close()
# yield the data for the image
image_file = open('.image_temp', 'rb')
data = image_file.read()
image_file.close()
yield data

>>
>>51909332
Neat, anon. Using PyGame?
What editor, also?
>>
>>51909432
using graphics.py its just tkinter simplified.
and im using sublime 2
>>
>>51909456
Noice.
Wish I could make my vim look like that :&(
>>
>>51909415
>Writing to a file just to immediately re-open it then re-read it
wat
>>
File: 1444519185838.jpg (122 KB, 425x516) Image search: [Google]
1444519185838.jpg
122 KB, 425x516
>>51908399
Use GLFW.
Don't use tutorials just read the documentation.
If you're having trouble let me know.
>>
>>51909486
I've known python for 3 days man, give me a break lol
But seriously, I'm looking for the right way to do it.
>>
>>51909492
Does it install man pages on your machine?
Because SDL has none to speak of.
>>
>>51909546
sdl has an alright wiki
>>
>>51909528
I don't really know much about that library, but at a quick glance of the documentation, can't you just do
r = requests.get(img['src'])
yield r.content

?
>>
>>51909569
Just did that a minute ago, glance at the docs and all. Very glad that it works that way; thanks for replying though!
>>
>>51909546
Man pages are typically only for programs and C functions, the package "libglfw3-doc" has documentation that can be found in /usr/share/doc/libglfw3-doc/

There's also the online documentation which has a reference for all glfw functions, symbolic constants and types.
>>
>>51909591
On that note, you should probably check that r.status_code equals 200 before that yield statement.
>>
>>51908734
Shortest I could come up with. Not very efficient though, but it was fun to try:

import Data.List
import Control.Arrow
import System.Environment

main=getArgs>>=readFile.head>>=(mapM_ print).map(head&&&length).group.sort.words
>>
Finished my first little python project. Currently it emails me a new picture of a cat every day at noon. Going to add a config file to let you customize the subject line and body of the email.
I have 40 'Your Daily Cat' emails in my inbox now from testing. Nice.

>>51909622
I actually call r.raise_for_status() instead, but thanks for catching that.
>>
What would be the best way to detect your own post and grab the post ID of your post in JS, /dpt/?

Searching for posts you submit wouldn't work because someone might submit an identical post as you.
>>
>>51910094
search for the first instance of a key in your post, dude.
>>
>>51910105
I think searching for the post time might be the best way tbqh.
>>
File: 2.jpg (255 KB, 1200x1793) Image search: [Google]
2.jpg
255 KB, 1200x1793
Hey /dpt/, could you please post the image that shows what OOP really is like for me (the one with the mass of throw-exceptions.)
>>
>>51909399

>because it's easy enough to write the code write in your browser and execute it on the web page immediately

Unless you need to be doing graphics work REPL-style, there's no reason to use Javascript over Python, Ruby, Lisp, or any other language you can use with a REPL.
>>
>>51910162
good point, find the first instance that way, lol
>>
>>51909250
In gdb, use "bt" to get a backtrace.

Also, after glewInit(), add:
puts(glGetString(GL_VENDOR));
puts(glGetString(GL_RENDERER));
puts(glGetString(GL_VERSION));

That will tell you if your driver is broken and its falling back to the built-in OpenGL 1.1.
>>
>>51908043
Python:
import re
words = []
for word in re.sub('[^A-Za-z\'\s]', '', open(sys.argv[0], 'r').read().lower()).split(' '):
words.append(word)
for uniqueWord in list(set(words)):
print uniqueWord + ' ' + words.count(uniqueWord)
>>
>>51910306
Actually, I don't even need to include capital letters in the regex since I'm already using lower():
import re
words = []
for word in re.sub('[^a-z\'\s]', '', open(sys.argv[0], 'r').read().lower()).split(' '):
words.append(word)
for uniqueWord in list(set(words)):
print uniqueWord + ' ' + words.count(uniqueWord)
>>
Is programming a cuck profession?
>>
>>51910365
Define what you mean by cuck profession?

Do you get to make everything, hand it over and then watch someone else put it to use while you get no benefit out of it? Not likely. Unless you sign over your rights to the code, meaning you get 0 credit for it, you can still let the next company know what you've done and use that. If you write code in one place and then never see it again, you might just be cucking yourself.
>>
>>51910365
yes
http://www.thedailybeast.com/articles/2010/07/29/cuckolding-the-sex-fetish-for-intellectuals.html
>>
>>51910365
Is there a point to that question other than being troll bait?
>>
File: 1448357559158.jpg (53 KB, 599x800) Image search: [Google]
1448357559158.jpg
53 KB, 599x800
>>51910383
>Tfw intellectuual
>>
>>51910394
in b4 "found the chink in your armor"
>>
>>51910383
>Defining intellect in a pre-dominant manner

God, I hate fags. I wish there were more regular gay people in the world and fewer fags.
>>
>>51910323
There's no need for the first for loop.
Also, substitutes new line characters with spaces so it doesn't accidentally join words:
import re
words = re.sub('[^A-Za-z\'\s]', '', re.sub('\n', ' ' open(sys.argv[0], 'r').read().lower()).split(' '))
uniqueWords = [ list(set(words)) ]
for i in range(1,len(uniqueWords)):
uniqueWords[i].append(words.count(uniqueWords[i][0]))
print uniqueWords[i][0] + ' ' + uniqueWords[i][1]
>>
>>51910455
And I forgot to include the shortened stuff at the end:
import re
words = re.sub('[^A-Za-z\'\s]', '', re.sub('\n', ' ' open(sys.argv[0], 'r').read().lower()).split(' '))
for uniqueWord in list(set(words)):
print uniqueWord + ' ' + words.count(uniqueWord)
>>
>>51910485
The split should be outside of re.sub():
import re
words = re.sub('[^A-Za-z\'\s]', '', re.sub('\n', ' ' open(sys.argv[0], 'r').read().lower())).split(' ')
for uniqueWord in list(set(words)):
print uniqueWord + ' ' + words.count(uniqueWord)
>>
is a music player too big of a project for 1 person? i really want to make one
>>
>>51910410
https://media.giphy.com/media/24CEMWKcu29gI/giphy.gif
>>
>>51910545
No way, man.

The most basic music player is literally fetch file, feed bitrate, play file. Then max out your options for fetch, feed and play. Then you can make a gui but that's no longer a music player, that's a media player.
>>
Should I look into getting into github? I'm an EE undergrad right now, my main purpose right now is to use it to deal probably with programming assignments etc for now.

I know very little about git, commits etc and am somewhat familiar with the basic concept of branching(I think). Should just dive in the deep end, make a github and start playing around with it? Or get to know git more intimately first?
>>
>>51907854
Please stop this programming trap meme.
Thanks.
>>
>>51910706
>meme

?
>>
What anime are you currently watching, /dpt/?
>>
I hate /brit/ tbthwy (to be totally honest with you)
>>
>when someone asks if a language is Turing complete

Makes me laugh
>>
>>51910767
>t. Alberto Barbosa
>>
>>51910767
rasheed
>>
>>51910804

The only time it's interesting to ask if something is turing complete is if it was something not intended to be turing complete.
>>
>>51910881
So no exceptions?

Also, Hi Ruby
>>
How can we fix the uncomfy slowness of these threads?
>>
>>51911010
Slow is fine. Faster just means more bait is being posted.

It's also 6:00 in the developed world.
>>
>>51911044
>developed

pfft

You took a forest and put cement over it. We took a desert and made it an oasis with desert. Get on my level. It's 4:00 over here.
>>
>>51911062
>implying I'm not in a glorious state that has both of these biomes
>>
>>51911062
>We took a desert and made it a desert
Sounds very developed

When will sandniggers stop trying to pretend they matter?
>>
>>51911010
this chat was posted at the beginning of one of the dpt threads recently and I haven't been willing to not just idle there too. It's got a great list of downloads too.
>>
>>51911076
Woah, I'm talking about California bub. I'm no sandnigger. Don't get your trousers in a rousal. I was talking to >>51911074 anyway.
>>
>>51910923

Programming languages are designed to be turing complete. Asking if they are is pointless. Meanwhile, a more interesting question is whether Magic: The Gathering is. MTG was not designed to be turing complete, and yet we already have models using certain cards to simulate a turing machine if certain voluntary actions are taken whenever they are allowed to be taken. This is not quite ideal given the fact that the game's rules require any infinite loop to be terminated at some point (specified by the user) if the user has the option to do so (and the game is forcibly terminated in a draw if the user cannot). However, given the flexibility of many of the cards, and the increasing number of different cards that add new rulings being introduced into circulation, I'm certainly positive that at some point someone will create a combination of cards that will trigger an undecidable game. That is, where a combination of triggered abilities (without "may" clauses) will create a complex series of loops that no turing machine will ever be able to decide if the game should end in a tie, or if at some point, the game will reach a final state, and that the game can continue on from that point.
>>
File: 1446219400596.jpg (344 KB, 640x852) Image search: [Google]
1446219400596.jpg
344 KB, 640x852
>>51910666
Hey Satan.
>Bumping coz I am in kinda same situation.

Also I can't figure out why IS nessesary to ever use git ? Why can't a developer never post what he is working on ?
>>
>0xbfc47b8c
just quick noob question
this is adress in CPU cache or in RAM?
>>
>>51911144
um, not that what I'm about to ask matters to me beyond a measure of curiosity, but do you think that the game you just described would be treated as the high point of the game. Meaning, would it be the S++ tier level of the game's meta-interaction or just the point of absolution in the matter of turing completeness?

Btw, have you ever heard of high level Street Fighter 3: 3rd Strike play? I like to think that with parry being a staple action in the meta that it could possibly be turing complete. Maybe not between all the characters but certainly between one's that can force motions and a distance between characters. Maybe those with 1 frame recoveries or mode activators like Yun who can force an opponent to block or red parry and then cancel in either early enough to block or activate late enough that the opponent's actions are swallowed up by the system garbage collector forcing a stalemate.

I have always wanted to learn MtG but the few people I know that play the game are snobby about the play or just clouded in that they don't offer up much besides a linear transition between modalities.
>>
>>51910666
>>51911181
>they still think that github is in any way related to git, except abusing the name
>>
File: 1439249350530.jpg (19 KB, 337x337) Image search: [Google]
1439249350530.jpg
19 KB, 337x337
Recommend me best source for learning teh Python. Would it be hard for someone who knows C and js?
>>
>>51911251
blackhat python
>>
>>51911181
You don't need to share with anyone but you should use git nonetheless because
* Remote backups
* Version history
* Branches to work on multiple features at a time without cluttering your code
* Submodules for deps
* Easier collaboration if you ever wanted someone to join your project
* Bisecting
* Applying patches from a codebase you base on & keeping the original relevant commit messages

Probably a ton of other things that I'm not making use of too, also Git != GitHub. Git is a version control system made by Linus Torvalds, GitHub is a hipster company that offers Git hosting.
>>
>>51911265
You serious? Isn't that advanced level? I never used Py before.
>>
File: 1432954580270.jpg (2 MB, 2598x3543) Image search: [Google]
1432954580270.jpg
2 MB, 2598x3543
>>51911249
Oh sorry, mr. Know it all.
Can you forgive me ?
And btw, give some valid answer to both questions pls
>>
>>51911181
Because then no one will see it. Barring the possibility that you failed to supply any code in an interview or through an email before you got the interview, there is also the whole social media aspect to the thing. People want to work with people they would find pleasant or people they can at least be assured have a sense of social-ness that they adhere to. No one wants to work with divas in a team environment. Primadonnas make everything for themselves. If you can interact amongst others and adhere to a CoC then they can be sure you can get the job done and not slow down the company by refusing to help your fellow team mates or by refusing their help on a matter.

Still, that's not saying you can't just make a quick website with your portfolio on it. It's not like you're being cased on your ability to design pretty things, but rather functional code.

Ultimately, git is just flickr for coders is just blogger for photographers is just youtube for writers is just deviantart for videographers is just etc for artists. It fits well into the coprorate structure and is likely easy to "parse" as such.
>>
                        break
while remainder:
print('Unknown Positions')
for key in rejects:
print(key)
nums = len(rejects[key])
for x in range(nums):
print('%d: %s' % (x+1, rejects[key][x]))
try:
ans = int(input('>'))
positions[key] = rejects[key][ans-1]
remainder.remove(rejects[key][ans-1])
except ValueError:
pass


Comes up with 'list.remove(x): x not in list'

    while remainder:
print(remainder)
print('Unknown Positions')
for key in rejects:
print(key)
nums = len(rejects[key])
for x in range(nums):
print('%d: %s' % (x+1, rejects[key][x]))
try:
ans = int(input('>'))
positions[key] = rejects[key][ans-1]
remainder.remove(rejects[key][ans-1])
except ValueError:
pass


Works perfectly fine.
Seriously, the fuck is happening?
>>
>>51911251
The official python documentation with a REPL open
>>
>>51911287
no i'm not serious
>>
>>51911299
http://www.git-tower.com/learn/git/ebook/command-line/basics/why-use-version-control

Your other question is nonsense.
>>
>>51911206
somebody pls answer
>>
>>51911287
It's the least structured form. Think of it as an unordered list and then other more corporate uses of python as an ordered ( sorted ) list.

You learn the same thing, pretty much anyway, but blackhat follows a less particular procedure that amounts to more of an interaction with an existing system, whereas the other forms are creating a structure and then defining pathways about that structure. Blackhat can interact in this one too but would be doing so at the leisure of the structured method, which is arguably a bit more "esoteric" in its phrasing of things.

Basically, blackhat would keep it recreational and the structured one would be corporate or scholastic.
>>
>>51911311
>inb4 learn Haskell
>>
>>51911384
I understand now. The only thing I need to know now is does blackhat covers the basics of the language or it jumps immediately in some work expecting you to catch those basics that are shown implicitly ?
>>
>>51911230

>but do you think that the game you just described would be treated as the high point of the game. Meaning, would it be the S++ tier level of the game's meta-interaction or just the point of absolution in the matter of turing completeness?

I'm not entirely sure what you're going on about. What it would mean in theory is that it is impossible for anyone to be able to forecast if a game would end in a tie or not. In practice, some of the cards used in these combos would just flat out be banned, and thus the situation would only ever come up in casual play.

>Btw, have you ever heard of high level Street Fighter 3: 3rd Strike play?

I don't really play street fighter. The only 2d fighter game I've ever found myself really enjoying (other than of course, the Super Smash Bros series, which isn't really a traditional 2d fighter game) is the Bloody Roar series. And I haven't played that in ages. Also, I have no idea how you intend to simulate a turing machine using parries unless you can literally gain arbitrary code execution with it.

>I have always wanted to learn MtG but the few people I know that play the game are snobby about the play or just clouded in that they don't offer up much besides a linear transition between modalities.

Don't bother. The game sucks now. The only decks I ever seem to hear about these days are aggro and sometimes mill decks, depending on the set. Legacy and Vintage play is almost non-existent, and if you do play it, you pretty much have to have thousands of dollars for either power 9 cards and/or force of will/other cards that can stop fast combos. Plus, they've simplified a number of concepts. It used to be that combat damage between creatures was placed on the same stack as everything else, so you could respond to damage by, say, sacrificing the creature.
>>
File: 1438771473501.jpg (12 KB, 251x242) Image search: [Google]
1438771473501.jpg
12 KB, 251x242
>"Hard realtime" video games
>>
>>51911440
It doesn't force the theory wrapper on you and instead offers you a chance to posit your own construition about the concept of the thing you're learning. Both will be presented as a matter of you interfacing with the "problem". "Blackhat" will present itself as a manner of approaching the problem with less than the narrow line of "this coding now, programming later" and instead will allow you to see the code as simply a path to the understanding of the problem. If you write to a buffer, it will show you what you wrote into the buffer and the container that holds the buffer data. In the more structured form, you'll simply be concerned with having spelled out everything correctly and asserting that you have done the correct thing.

I would like to say that both give you the basics, as you already know the basics ( numbers, letters, phrases, yes and no ) but beyond that when dealing with things like functions, classes and, arguably, things oddly named as tuples, you might not be versed and it will just kind of course through the matter. That doesn't mean you can't just reference the material, but it does mean that you can expect to "take to the material" as others have.
Sometimes I'll read someone here talk about a tuple as if it were some amazing thing worth mentioning, but then follow the code and see that all they did was make a program that should normally process characters also manage to process a tuple, which is just a set that has the same number of elements as the name implies.

YOU CAN SKIP TO HERE IF DONT WANT READ

Having said all that, sorry if I said too much above, you probably won't expected to know all that stuff implicityly. I think I remember a violent python book going over each of the items rather extensively and redundantly but that was the same reason I couldn't finish it. Then again that was a while back when I was in a more hectic environment.

Still, the high point, I think, in programming is that implicit sense.
>>
I'm writing something in C and it's not working well, so I need a debugger (for Linux). I need it to be able to display variables and stuff like that, and (ideally) to display a tree-like structure without it looking horrible.
I've tried using DDD, but it's a buggy clunky mess that looks bad. It did its job pretty well when I had patience for its shit, so something similar to DDD but of higher quality would work for me.
Any suggestions?
>>
>>51911647
Just learn to use GDB.
>>
>>51911440
Btw, never mention the word blackhat around regular cs babbys. They will conform to a weapon concept over you. Especially the asian ones. And now that there are vapes everywhere, it'll be more difficult for them to get caught. Unless you can match the smells.

If you need a more formal approach to the basics, you're better off just trying to learn it via a few programming theory cheat sheets. It's not that difficult.

The electricity travels around the board and activates the different components, which then either continue their calculations, traversals or light up for the screen. Each pass brings with it information from the registers which are found in the processor. Each pass can also gather information from the different peripherals tied to the motherboard. After that it's just sending the writer numberic signal or alpha-numeric signal to either activate a register, calculate some sequence or traverse an array in memory.

After that it's abstraction as some concept you already might understand. None of this stuff is something you don't or can't already know.
>>
>>51911467
Ahh thanks for the clarification on the card use.

> Also, I have no idea how you intend to simulate a turing machine using parries unless you can literally gain arbitrary code execution with it.
Bingo, that's exactly what it does. A very deep part of the game is managing to make the parry work against the other player. That's actually my forte. :) If it helps you understand a bit, the game is coded in ASM and runs 60fps which is never throttled but made less apparent by display hardware. I'm one of those CRT dudes.

And that's too bad to hear about MtG. I actually love Tactics style play. Made me a little sad to hear they removed that from the battle conversation.
>>
>>51911694
Woah, my post was filtered. Sorry about that shit- fest. If you can make sense of it, cool, if not let me know if you want me to elaborate more clearly via a text file or something.

I am going to type k e k

kek

If filtered this out last time I tried it.

Oh and traversals and certain calculations happen in the same pass via the use of chips. Sorry if that wasn't clear before.
>>
>>51911633
>>51911694
Thanks for that in-depth answer, it helps a lot to me to understand better what approach to take.

Not sure I completely understand the second part about "vapes" and CS hipsters.
Also very rare occasion when I dont understand the whole sentence , at least what you meant by "They will conform to a weapon concept over you".
>>
>>51911798
You're probably better off not knowing anyway. I literally have a bald spot on the back of my head made from a bunch of asian kids vaping my head. People are shit.

Funny enough, it's related to my playing that game mentioned above. They didn't want me to win and would collectively vape me in the game phases just so I would lose.
>>
>>51911206
CPU cache doesn't have its own addresses; it mirrors locations in RAM.
>>
>>51911819
Are you talking about actual bullying? From asians? I actually didn't even understand what "game" did you play?
>>
>>51911819
>vaping my head

What
>>
>>51911848
>>51911852
I wouldn't call it bullying because there was no one in particular for me to learn to be afraid of and I was welcome as hell at the venue because I was good friends with the owner. And, I guess, not just asians but they were all the anime babby types.

I don't really want to repeat myself on the whole deal because someone died there, and probably from the same kind of vape attack ( his heart just suddenly stopped ) so I'm not about to tempt the fates by giving you enough info to follow me around.

>>51911852
Vapes are lasers. Overload one and the laser gets bigger. Overload a lot of them and the laser can go farther. Hold a laser in place long enough and over a soft enough material and it can burn that thing. I have a bald spot on my head.

It's not a fun topic to share because there's lots of strawman stuff out there to make me come off like a loon just for being not white/asian/black and having been a victim to groups of people, MILLIONS, but...ultimately the damage is there and it's not like I go around taking part in rumbles or fights in the street. The timing was right, there were some warnings made, some cautionery statements and ultimately the tools were made more prevalent.

Actually, they could've hid WPT coils in the vape pens too. Some of them were military personnel, some move satellites ( doubt it was him/them ), some are just sadistic psychos with caste issues. I'm not trying to convince you, just elaborating on the topic for dude up there that needs to understand the difference between blackhat and otherwise, "as seen from above".
>>
>>51911950
So, do you shit in your designated shitting street?
>>
File: outvp8.webm (436 KB, 1360x768) Image search: [Google]
outvp8.webm
436 KB, 1360x768
>>51907854
what language should I learn after C(++) and Java ?
also, enjoy my optimized webm (vp8 sucks tbࡧh)
>>
>>51911950
Oh yeah and vapes are cheap as hell. You can literally build some for 10 bucks. Also, I don't have cancer or anything like that. Just tinnitus something fierce. I've always been a strong dude but I as always I will value intelligence many a million times over any measure of "physical strength".
>>
>>51911983
I don't think those exist where I'm from.
>>
File: impossible.gif (2 MB, 400x167) Image search: [Google]
impossible.gif
2 MB, 400x167
>>51911950
I have never been so confused on /g/ in my life. I dont understand what all of this is.
I mean lasers, satelites, coils , vapes are lasers ,someone died "there" , where is this "there". What a hell is happening I feel so anxious all of a sudden.
>>
>I'm a (full-stack) web and app developer with more than 5 years' experience programming for the web using HTML, CSS, Sass, JavaScript, and PHP. I'm an expert of JavaScript and HTML5 APIs but my interests include web security, accessibility, performance, and SEO. I'm also a regular writer for several networks, speaker, and author of the books jQuery in Action, third edition and Instant jQuery Selectors.
vomit.jpg
>>
>>51912026
>im gay
>>
>>51911950
Alright man cool.
>>
>>51912015
I really don't want to make it seem like the problem is the location, because it's not, so I won't name "there". The problem is a particular youtube duo and their meme posse. They generate a lot of rhetoric to help absolve people of their "responsibilities" in a matter and are lauded as greatness due to that. Actually, there's a ton of people in that community that do that kind of thing. Nevermind, ignore me. I code in Java from time to time.


Basically, it's in the past already. It's also probably not entirely /g/ related, aside from the shill. That's where a lot of the bullshit comes from.

Anyway, it's in the past. No problems here anymore. Except for child support payments and the inability to sit and relax in an interview.
>>
>>51912106
A..are you schizophrenic?
>>
>>51911950
>>51912106
You seeing anybody for this buddy?
>>
>>51912015
That thing you're felling...it's empathy. Don't treat it like an enemy. Instead, do some push ups or sit ups or something to help you burn out the anxieties productively. Whatever you do, don't stretch while anxious. You'll just spread the surplus syllic acid and possibly cause it to congeal about your tracts which may cause other problems. Also, drink some milk.
>>
>>51912132
Did I die somewhere between waking up and going to my computer? Is this Matrix?
>>
>>51912126
No, but I've also never been a very dull person. When I was young, they'd call me "Precocious". "Youthfull" is what people call me now.
>>51912128
I did for a bit but it didn't help much ( and I didn't want to take hormone therapy pills, fuck co-dependence ) so I just focused on healing for a long time. Have since noted all external "triggers" and environmental issues and live rather calmly despite the prevalence of some of the matters. I just have a few memory problems now and deal with those by repeating things I've learned outloud so I learn it as muscle memory. Though the original bits of help I got helped a lot with direction. That's not to say I don't know this stuff well as theory and such, but if someone were to somehow increase the pressure in the room even a bit it might throw me off and I may become a bit anxious. But I have a solution for that now too. Best part of it? No drugs! :)
>>
>>51912128
Yes, I understand you don't really care and that answer just came off as autistic. If it helps you understand where I'm coming from, I got a 55 out of 80 on the baron-cohen empathy/autism test. I think 30 and below is indicative of autism.
>>
>>51912155
im with you on this one, i don't know what the fuck he's talking about and how it has to do with blackhat python
>>
>>51912178
>>51912197
Was just interested chum. Stay safe out there.
>>
>>51912226
It has to do with the word "Blackhat". I have never used it to describe myself but I also don't take to labeling myself. Others, rely entirely on labels and can't very well manage with pronouns and such. Often times, when people find themselves confused or "out of the loop" they act erratically. So while learning Blackhat Python might be a simpler approach to a grand design/problem, a regular structured python that abides each and every convention like a P = NP problem in quantum theory as described by convention he might find himself in less than a heap of trouble by just going that route, though he might not feel like he's learning anything because none of it amounts to much beyond the next course, which will likely go over a lot of the same material just through a different convention.
>>
>>51912246
Thanks, You too, boss.
>>
File: Green-debug.jpg (12 KB, 280x280) Image search: [Google]
Green-debug.jpg
12 KB, 280x280
>>51911647
bump!
>>
is it good practice for a parent class have a method stub that will not be elaborated on in the child class? Or is there a better way? Wikipedia says that method stubs are usually only used for testing.

e.g. this pseudocode:

class Parent {
int x;
...
public void update() {
//Does nothing
}
...
}

...

Class child extends Parent {
...
public void update() {
/*Each child method does something,
but the parent method does nothing */
x +=1;
}
...
}

...

class Program {
int main() {
for( Parent parent : object ) {
object.update()
}
}
}


Is there a better way? I'm still learning.
>>
>>51912359
*that will be elaborated on when overridden in the child class
>>
>>51912359
I believe the parent class then is an abstract class. The fact that you would be declaring the function in the child class but not the parent class means that you find it necessary to communicate the essential nature of the function, probably based on the design, so I would say that making the abstract class would be the way to go.
>>
File: 1420745294167.gif (498 KB, 403x227) Image search: [Google]
1420745294167.gif
498 KB, 403x227
>>51911989
>printf("stuff\n");
>instead of puts("stuff");
Get the fuck out now
Learn clojure
>>
how fast can a program verify that a 7 figure number is prime?
>>
>>51907952
That isn't very effective for images, especially for jpg images.
>>
>>51912399
exactly as fast as any other number
>>
>>51912396
Ahh I also have to make sure to mention that declaring the parent class without mention of the child class might be difficult if you go the route of defining it as an abstract class. This will prevent errors in your code later on and will also help with security a bit.
>>
>>51912414
Are artifacts ever large enough to prevent proper unique hashes or is it something else?
>>
>>51912396
>>51912428
Actually I think this is exactly what I'm looking for. Thanks. I'm still new to Java.
>>
>>51912442
uh, one pixel even 1 off will change the whole hash, so yes they're unreliable.
Simply even resaving the jpg image will produce a different hash.

You need to store the image, not the hash, and then compare the differences between 2 images, and decide sameness with a threshold.
>>
>>51912488
So it just makes it difficult to make the proper positives you mean...I thought you were saying it makes for more false positives by not averaging to the proper hash. My mistake.

I was thinking that the make up of a 64x64 hash that is equal measures black and white vertically would hash out the same as a picture that was rescaled to 64x64 and happen to also have equal measures of black and white vertically even if one of the pixels on the white side had a tiny bit of black on it from artifacts. That's surprising.
>>
File: 1435590438522.gif (229 KB, 500x579) Image search: [Google]
1435590438522.gif
229 KB, 500x579
>>51907854

Relative coding beginner here, with some experience in C. What do people use to create GUIs for their programms?
I have a basic grasp of some programm I want to make, but do not want it to be some console wankery.

Also, how is anime directly related to programming?
>>
>>51912645
fuck off anime shitposter
>>
>>51912645
Everything that VS gives you.

>how is anime directly related to programming?
It isn't. Its just stupid fashion.
>>
>>51912678

A little bit stupid to call others shitposters in a shitpost, dont you think?
>>
>>51912645
There are some IDEs that come equipped with GUI Tool Kits. Namely Visual Studio and Eclipse. Aside from that there are some popular libraries that you're better off googling for yourself as I don't have much knowledge on them. I went from deciding VS and Eclipse were shit to just drawing to screen on a pixel by pixel basis.

I can't really speak Japanese so anime makes for good white noise sometimes. But there is also the fact that, at least based on what I do know about the language, Japanese is a very soft language. So it doesn't strain any of the organs as the air travels in and out. It doesn't strain the mouth or the ears. It was developed to be a soft language, almost like a nuance to learning how to exist within your environment rather than forcing yourself on the environment. I think my Japanese teacher was the one that told me that, or maybe he mentioned it as a quality of me. I can't recall very well. Anyway, hope that helped.
>>
>>51912727
Not him but it's possible to write a GUI without using drag and drop shit and more like a normal application?
>>
>>51912645
Fuck anime

anime posters need to go back to reddit.
>>
>>51912687
Don't ask stupid questions and don't use anime reaction images if you want to be accepted here.
>>
I need a key-value paired data structure with very fast lookup for millions of keys. Should I use a binary search tree or a hash table?
I currently have an AVL tree implementation, but I'm not sure whether it would work well in long term, so I'm wondering if I should ditch it before its too late.
>>
>>51912645
>>51912776
Qt Creator
>>
>>51907854
Faggot. You should stop sucking that many dicks OP.
>>
>>51912687

Thanks, I will look into it.

>>51912727

Damn, thanks for the detailed answer.
How difficult is manually drawing on screen?

Thats also some awfully philosophical approach to something that utillitarian in nature, in your case atleast.
Do prefer music as white noise personally, but I guess that could work too.
>>
File: SHIGGY #1.jpg (12 KB, 311x450) Image search: [Google]
SHIGGY #1.jpg
12 KB, 311x450
>>51910589
>posting a link to an image
>on an imageboard
>>>/reddit/
>>
>>51912805
Not difficult if you develop proper tools for it. Something like Photoshops pen tool is usually all one would need to help with that. At that point it's not different from using a paint program and then bringing in the pixel info so if you have a good one, just use that and don't kill yourself trying to code the pen tool, though I know GIMP is open-source and that has a pen tool. Also, I use the shape functions a lot too. After that it's like grade school with all the pasting and cutting.
>>
>>51911144
Interesting concept, but the issue is that any reasonable person who can see that a series of actions are repeating themselves without possibility of player intervention will call the game a tie, due to an infinite loop.
>>
>>51912829
dumb phone
>>
>>51912829
that looks like a serial killer version of jason statham
>>
>>51912854

Thanks man, I guess I start searching then.
Thread replies: 255
Thread images: 23

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

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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.