[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: 31
File: trap programmer2.png (2 MB, 1200x1726) Image search: [Google]
trap programmer2.png
2 MB, 1200x1726
old thread: >>52125780

What are you working on, /g/?
>>
>>52130349
first for shaved boipucci's
>>
File: Zu8cuz4.gif (2 MB, 640x560) Image search: [Google]
Zu8cuz4.gif
2 MB, 640x560
>>52130415
This is a raymarcher. Not a raytracer.
>>
Threadly reminder that you should not refers to the act of programming as coding. It is improper and makes you look like a 15 year old

You are a programmer, not a coder
>>
>>52130461
good lord
>>
>F# faggots fawning over their "legendary operators" which are actually just babby shit
>>
>>52130349
>What are you working on, /g/?
time for something new, dont you think?
also OP is a faggot
>>
>>52130461
This is sexy. Language?
>>
>>52130349
I need him ;-;
So lonely...
>>
>>52130491
https://gist.github.com/Wunkolo/249646f7a922ee045c70
>>
>>52130472
>>>oh hey i think this is cool
>>>i like this too

>>f# faggots how dare they like things
>>
>>52130472
define "baby shit".

|> is really useful
>>
>>52130493
I'll be your friend anon!
>>
Daily reminder that if your language of choice is not on this list you should probably give up and kill yourself:
- C++
- C#
- Lua
- Python
- Elixir
- Haskell
- Bash
- Clojure
- D
>>
F# is literally shit
>>
>>52130539
nice bait
>>
>>52130543
Bait: Fury Road
>>
>>52130499
It takes 5 seconds on the clock to implement in Haskell
>>
>>52130566
and?
>>
>>52130580
F# is garbage
>>
>>52130472
Check out this "nine" operator in Forth:
: 9 * ;
5 5 9 .
25 ok
>>
>>52130589
I'm not following your reasoning.
>>
>>52130566
same to implement it in F#
wait no
F# already has it
>>
How do I simply get a value at an index using Lenses?
>>
>>52130613
 
(|>) = flip ($)


Either way Haskellers use $ because they don't get confused when their code doesn't resemble java
>>
>>52130644
Lens makes Haskell the functional Java
>>
>>52130566
>>52130613
>>52130651
Haskell already has the & operator which is exactly the same as |>, no need to implement it yourself.
>>
>>52130651
Java doesn't have |>
>>
Hey, F# fags and Haskell fags, can you get along? Imperative is the real enemy here
>>
>>52130651
It has nothing to do with Java though. It's about transformations on data reading logically from left to right.

from the last thread:
[1 .. 100]
|> List.map (**)
|> List.sum
|> (+) 100
|> (fun i -> i / 2)
|> printfn "%i"


If I used $ (<| in F#) the order would be backwards, and to follow what happens to the list, i'd have to read from bottom to top.
>>
>>52130496
>3d rendering engine with less than 2000 characters
>oh hell that's pretty impressive
>#include <pmmintrin.h>
>SSE3
>SIMD optimized

fucking hell
>>
What can we do to make /dpt/ more inclusive?
>>
Please use a loli image next time.
>>
>>52130686
F# is Functional + Imperative
I have nothing against Haskell, but they apparently hate F#
>>
>>52130694
>List.map (**)

Does that even work?
>>
>>52130710
preemption
>>
tfw no bf
>>
>>52130770
A mistake like that wouldn't have happened if she used a real language like Haskell.
>>
>>52130776
Kicking people out to make room for others?
>>
>>52130785
tfw bf but he's a psychology major
>>
>>52130770
.. no, i thought it squared things, but just remembered it's a to-the-power-of operator. I goofed.
>>
>>52130770
>>52130809

((**) 2)
>>
>>52130824
yep
>>
>>52130797
No, just shitpost before the shitpost arrives.

Thread scheduling at its best.
>>
File: 1451095370326.png (835 KB, 1176x1000) Image search: [Google]
1451095370326.png
835 KB, 1176x1000
>>52130803
dump him and be my bf instead c:
>>
>>52130694
[1..100]
& map (^2)
& sum
& (+100)
& \i -> i `div` 2
& print


I translated it to Haskell for you.
>>
>>52130349
I'm working on doing nothing rather successfully.
>>
>>52130856
But anon I'm not a boy.
>>
>>52130865
what's this like in haskell?

let mutable x = 5
x <- x + 5
>>
>>52130874
That's pretty shit m8, failing at doing nothing is an actual accomplishment.
>>
>>52130865
>\i -> i `div` 2
BLOAT
(`div` 2)
>>
>>52130905
Using Lens:
x += 5
>>
>>52130905
>implicit state
Why is F# so bad?
>>
>>52130922

You're incrementing something undefined?

>>52130914
Bloat.
((\) 2)
>>
>>52130865
That's wrong those. Haskell would be like this:
print
& map (^2)
& \i -> i `div` 2
& sum
& (+100)
& [1..100]

unless you made a new flipped version of &, which doesn't seem to be predefined anywhere.
>>
reddit down for anyone else?
>>
>>52130922
hi, kmett
>>
>>52130694
That's only logical for you because you're thinking about it like applying methods to objects. Why is the thing that is actually happening (printing) at the very end?
>>
>>52130884
wtf????????

>>52130965
It's been down for a while for me
>>
>>52130865
>>52130949
What the hell is this ampersand shit
>>
>>52130538
man i dont look at these threads often but it seems like every time i do i feel the urge to reply to bait like this
>c++
i'm not going to imply this is shit, and i know that fucking everything is in it, but i still don't get what it has over c.
i read that it has namespaces and dynamic array sizing, and both of those are useless.
>c#
mono is shit and microsoft is shit and c: bad edition is shit
>python
i write in this but it's still shit, namespaces are shit and the tables make me suicidal when i have to use them
>clojure
meme afaik
>elixir
meme afaik

bash lua and d are literally the only good languages on this list and d is bipolar, lua is useless, and bash isn't really a programming language
>>
Reddit pls go.
>>
>>52130986
Back up for me now

Off to https://www.reddit.com/r/programming
>>
Redd please see >>52130462
>>
>>52130979
>because you're thinking about it like applying methods to objects
I'm not, and that's not what's happening either.

>Why is the thing that is actually happening (printing) at the very end?
Because that is the last thing to occur. Get it? It can be read like this:
make a list of ints from 1 to 100
map that to a list of the square of those ints
sum all those ints
add 100 to that answer
divide that by 2
print the result
>>
>>52130965
>>52130986
>>52131012
Use voat
>>
>>52131008
>microsoft is shit
he drank the coolade
>>
>>52131008
man at least when you shitpost make it sound like you know what you're talking about
>>
>>52130949
>which doesn't seem to be predefined anywhere
http://hackage.haskell.org/package/base-4.8.1.0/docs/Data-Function.html#v:-38-

>>52131005
x & f = f x
>>
>>52131036
Microsoft earned that reputation with Win32 API, bad security, and buggy software. It has not fixed any of those problems.
>>
>>52130651
|> is literally . in haskell.
>hurr durr iz luk liek oop unlike '.' am i rite? '.' is not liek '.' unliek '|>' huehuehue
>>
>>52131066
shut my mouth. Glad to see Haskell is catching up.
>>
>>52131082
>> is . in Haskell you dingus
|> is &
>>
>>52131073
The Win32 API is great. Sorry that they can't throw all compatibility out of the window just for you to get slightly neater syntax. Use a wrapper if you can't handle C libraries.

As for bad security and buggy software... no.
>>
>>52131082
(&) :: a -> (a -> b) -> b
(.) :: (b -> c) -> (a -> b) -> (a -> c)
>>
>>52131082
please kill yourself. You don't know F# or Haskell.
>>
>>52131109
B u t t h u r t
u
t
t
h
u
r
t
>>
What are my fellow nimrods programming?
>>
>>52131113
>make yourself look like an idiot
>someone points out you're wrong
>LOL BUTTHURT

I take it you're the one who asked if Reddit was down?
>>
>>52131113
"." in haskell is a function composition operator. |> is a reverse application operator.

|> in haskell is &

. in F# is <<
>>
>>52131082
The . operator in Haskell has absolutely nothing to do with OOP. It's a direct translation of the mathematical notation for function composition, i.e., g∘f.
>>
>>52131138
|> has nothing to do with OOP either. It exists in haskell as &
>>
>>52131036
-win10 botnet
-muhteareel design
-win10
-win8
-being the creators of the modern definition of viruses
-windows phones
-c#
-directx
-proprietary software
-making most of their money from advertisements and still making you pay for their os

honestly tell me everything i just listed isn't shit
i'm not trying to attack you for using windows, but at least admit microsoft is a trash company.

also just so this isn't a shitpost, can someone PLEASE tell me what is better about using c++ over c?
>>
Daily reminder that using algebraic data types is OOP
>>
>>52131065
could you at least tell me what about my post was wrong?
>>
>>52131099
>the win32api is great
Yeah, it SO great that most software toolkits bypass the win32 and draw their own widgets.

>As for bad security and buggy software... no.
http://www.laptopmag.com/articles/microsoft-tells-surface-owners-sorry-buggy-notebooks
http://www.theregister.co.uk/2015/10/01/microsoft_previews_less_buggy_onedrive_for_business_client/
http://www.pcworld.com/article/173858/mozilla_blocks_microsofts_buggy_firefox_plugin.html
http://www.infosecurity-magazine.com/news/microsoft-overtakes-ibm-most-buggy/
http://www.zdnet.com/article/microsoft-withdraws-another-buggy-update/
http://news.softpedia.com/news/microsoft-releases-buggy-surface-pro-3-firmware-update-causes-bsods-boot-errors-493667.shtml
>>
>>52131177
1. not everyone gives a shit, not everyone is paranoid either
2. what
3. is good
4. is good
5. people should stop running random shit with admin privileges
6. not shit
7. good
8. good
9. good
10. I haven't seen an ad yet

for the bit on C++
most of this
http://en.cppreference.com/w/

>so this isn't a shitpost
>I WUZ TROLLIN LOL
>>
Whats the best programming music, /g/?

https://www.youtube.com/watch?v=pnrPGtgCThw
>>
>>52131284
https://www.youtube.com/watch?v=-_unV0UPGUY
>>
>>52131258
>bypass win32
You mean someone else wraps win32
Microsoft can't just change win32 so it looks pretty for you. They do have to deal with shit like calling conventions, compatibility and the way the OS actually fucking works.

I randomly clicked one of those
>“The reason so many Microsoft products are in the Top 20 lists this time is that both Microsoft Internet Explorer and Microsoft Edge come bundled with Adobe Flash, adding the 35 Flash vulnerabilities listed in August to Windows 8 and upwards,” he said.
>>
>>52131284
https://www.youtube.com/watch?v=cr4XYjqyesU
>>
>>52131008
Let's start with C++, you first claim that you know everything is shit in C++ and then you say that you "read that it has namespaces and dynamic array sizing which both are useless", so you basically skimmed over 2 features and proceed to make bold claims without knowing a jack shit about the language.

Let's move onto C#, while you're right that neither implementation is perfect, the language unto itself is pretty nice, also you claim that it's "C: bad edition" but really C# supersedes C by a far and I'd agree with you only if you claimed that it's inspired by C, not a shitty C edition.

Python tables? You claim that you write in Python yet you don't even know what data structures you're using.

I won't even bother with your "Clojure and Elixir are memes AFAIK" argument.
>>
>>52131296
Explain COM then.
>>
>>52131353
I don't know, I'm not an expert on this stuff. Do you think they just made it seem ugly for no reason or because they're shit or something?
>>
>>52131353
Shitty language framework/interface that everyone hates.

What about it?
>>
Does F# let you grab an unsafe/fixed pointer to an array for fast (no bounds checks) in-place mutations?
>>
>>52131177
It's C with more safety, higher-level constructs, the same speed on average and higher-speed when properly tuned. There's literally no reason to use C over C++ unless the runtime size is an issue.
>>
>>52131431
https://msdn.microsoft.com/en-us/library/ee340434.aspx
>>
>>52131268
>nobody gives a shit
I didn't say anything about paranoia, but everyone i've asked irl about windows 10 selling their data to advertisers told me that they 'shut it all off' even though you can prove that it still sends data to microsoft with a packet sniffer
>what
material design isn't good
>win10/8 are good
windows 10 is not a good improvement over windows 8 which wasn't a good improvement over windows 7
>admin privileges
I agree, shame that there isn't a retard proof OS with a package manager that makes it very difficult to install viruses
>not shit
i'll admit I don't have much experience with windows phones, but the little I have wasn't very inticing due to the boring UI and controls and lack of applications.
>c# is good
if it is, then explain what it is useful for
>directx is good
opengl exists and runs faster on windows and alternative oses than directx

>>52131336
>claimed I know everything is shit in c++
I claimed that 'everything', a clear exaggeration, was written in c.
>skimmed over 2 features
I listed them explicitly because I can't see any worth to them with the performance and standards you lose from not using c
>without knowing jack shit about the language
I didn't say I did not know anything about it, as far as I understand C knowledge is highly applicable to c++

>c# supersedes c
removing features such as memory management to make a language more simple does not, in my opinion, make said language supersede the other

>python tables?
I don't get your point here, did you want me to say 'lists' or something?
they're a pain to use and learn, an interpreted language should not have tables/arrays/whatever that require me to append a fucking 0 just to insert a value at a certain index, and I was literally unable to make insert work for me in the latest stable version of python3

>>52131446
>higher level constructs
that doesn't really sound like it's worth a speed pentalty
>safety/performance
everything I have read says the opposite
>>
>>52131503
>was written in c.
i meant c++
whoops

also, to expand on my python problems for the sake of once again not being a shitposter, when I wanted to do various simple programming challenges to further my understanding of the language, I attempted to make a encryption algorithm and the problem with tables actually came from that and made me give up.
I looked at examples of usage to see if I was just being stupid or something and it seems like everyone actually does it by just appending 0s, which is dumb.
I gave up on the whole thing
after that, but I still use python for shit that isn't complicated

oh, also,
>>52131268
thanks for the link, i'll read it over
>>
>>52131503
>I listed them explicitly because I can't see any worth to them with the performance and standards you lose from not using c
Oh my fucking god, this is comedy gold. Tell me, in what way, does using a namespace hit the performance negatively, and which part of the C++ standard does the use of namespaces break? What part of C++ standard does the use of STL break? How do you lose performance when using STL allocators vs. naive C malloc approach w/o memory pool?

>I didn't say I did not know anything about it, as far as I understand C knowledge is highly applicable to c++
The very basic of it maybe but I wouldn't say that it's highly applicable.

>removing features such as memory management to make a language more simple does not, in my opinion, make said language supersede the other
It's not "removing features", it's absctracting the memory management away and C# probably has a fuck ton more features than C if you want to argue the removal of features so your point is moot.

>I don't get your point here, did you want me to say 'lists' or something?
Yes, preferably, call things what they're called instead of making me guess what the fuck do you mean by using vague terms.

>they're a pain to use and learn, an interpreted language should not have tables/arrays/whatever that require me to append a fucking 0 just to insert a value at a certain index, and I was literally unable to make insert work for me in the latest stable version of python3
You seem to be bad at programming, that's it, don't worry though you might get a job in accounting or at McDonald's if you try hard enough.
>>
>>52131503
holy shit you really are reddit
this post is really harsh but you are really dumb

>write retardedly unfunny and autistic shit like "hurr durr iz luk liiek oop un.." etc
>use the word butthurt outside of a quote
>hate windows 10 and 8 and say it "isn't an improvement on 7" because you know fuck all and are following trends
>complain about muh viruses on an OS that's perfectly safe if you aren't retarded
>moan about proprietary software like some communist that thinks people don't have the right to own property
>no nothing about C++ but still shit talk
>bitch about APIs which need to be compatible and were developed over a long period of time
>bitch about an OS not being a fucking padded ball pit for children "well i dont want it to run programs easily because what if i choose to run something unsafe?"
>i listed them [2 random minor features C++ adds], bla bla performance
You rarely lose performance over C with a good compiler. You can write all your C++ code to work in the same way C code does, then it can only be your compilers fault. There's a lot more than "namespaces and variable arrays" (by the way, the latter is a library feature, not a language feature)

C# allows you to do manual memory management. Is that the only problem you had with it? Obviously you don't know shit about what it actually adds.

>>higher level constructs
>that doesn't sound like it's worth a speed penalty
a lot of higher level shit can be completely optimised to the point of having the same performance. most if not all is also optional anyway.

Of course C++ is fucking safer than C you absolute moron. You really don't know anything, do you?
>>
File: losing_my_mind_wallpaper_bhpki.jpg (137 KB, 1024x768) Image search: [Google]
losing_my_mind_wallpaper_bhpki.jpg
137 KB, 1024x768
IS THERE ANY GOOD BUILD SYSTEM FOR C/C++ OUT THERE
>>
>>52131503
>>>/reddit/
Where retards like you regurgitate nonsense they don't comprehend to other retards in a massive circlejerk where truth is sure to be kept at bay!
>>
>>52131171
Where is this defined? I did a hoogle search and only found graph shit
>>
>>52131503
???
>and I was literally unable to make insert work for me in the latest stable version of python3

foo = ["B", "C"]
foo.append("D")
foo.insert(0, " A")
print(foo)

Returns:
["A", "B", " C", "D"]

Literally .insert(index, var)

Was that so hard
>>
>>52131684
make
>>
>>52131700
That's not it, this retard does think that if you have, say, a list of 5 elements, you should be able to append an element at an arbitrary position like 500. He doesn't seem to know what a list is.
>>
Are IO ports legacy?
>>
Not him and completely unrelated
I've decided to stop hating on python
That doesn't mean I'll start liking it
baka
>>
>>52131712
>I have a street of 30 houses
>"Hey, deliver a present to house number 100"
>>
>>52131718
No, unless you mean x86 IO ports.
>>
>>52131620
jesus why is it so hard to have a conversation without people throwing ad hominems around
>how does a namespace hit performance
I didn't say that, I didn't imply that, and i'm pretty sure that's a strawman if you really didn't understand that I was saying that OVERALL the usage of c++ over c has a performance impact
>it's not removing features
memory management is a feature and 'abstracting it away' is an excuse to make it easier for people who don't want the feature to use the language
performance is a feature too that you lose with poor implementations of garbage collection
>You seem to be bad at programming, that's it, don't worry though you might get a job in accounting or at McDonald's if you try hard enough.
wow rude
i'm not even sure what to say to this, you didn't really dispute what I said, you just insulted me as the whole of your argument
good 1
>>52131655
>write retardedly unfunny and autistic shit like "hurr durr iz luk liiek oop un.." etc
I don't know what you're referring to.
>use the word butthurt outside of a quote
I don't follow entirely but I do not recall using that word, but I may have.
>following trends
wow I didn't know that having an opinion that is popular automatically means you're following a 'trend'
>no nothing about C++
I don't use capitalization heavily so I can't talk shit but you clearly don't know english and i'm pretty sure that's a requirement for the usage of c++ unless some pahjeet made languages international or something, but I wouldn't know about that
>bitch about an OS being unsafe
if you don't care about your OS so much then stop arguing about it being superior to another on the internet
>bla bla performance
comedy gold
>you rarely lose performance over c
well okay, it's provable that that isn't true but whatever this magical compiler that gets C performance out of C++ i'm sure it helps
>C# lets you do manual memory management
I did not know this, I apologize
>there's a lot more stuff than namespaces
list them
>>
>>52131690
nice meme
>>52131655
>a lot of higher level shit can be optimised
I'm pretty sure the point of being 'higher level' is to exchange performance for abstraction, but yes I am aware that things can be optimized, and it's a wonder that c++ hasn't been, if all of these high level features you speak of don't have any performance penalty.
>c++ is safer than c
explain please
>>
>>52131776
fuck off, you're not worth the time when you're gonna turn around and say "lol i was just trolling guys"
>>
>>52131776
I'm not him but you're fucking stupid
>>
>>52131776
Reminder to report and hide!
>>
>>52131796
Congrats, you're clinically retarded! Want a medal or just the certificate?
>>
File: Screenshot_2015-12-30-06-50-02.png (40 KB, 720x1280) Image search: [Google]
Screenshot_2015-12-30-06-50-02.png
40 KB, 720x1280
>>52131776
>>
>>52131796
It depends on the abstraction, but a lot of the time it doesn't make a difference. Is using an enum any slower than using a literal or macros?

http://www.cprogramming.com/tutorial/c-vs-c++.html
>>
File: 1432701838551.png (136 KB, 1145x757) Image search: [Google]
1432701838551.png
136 KB, 1145x757
>>52131799
>>52131798
>>52131801
>>52131808
hwoah I think I made someone angry
>>
>>52131684
Simple build.bat/build.sh that essentially just does compile *.c/*.cpp
If you need anything more complicated than that you should rethink what the fuck you're doing - your program will not be ported to 20 different operating systems, a dozen different compilers or need to support quirky C libraries.
Automatic dependency handling? Stop using boost and other compile-time raping shit, you can scale to tens of thousands of lines of code with instant compile times if you refrain from computing prime factors in template expressions.
>>
>>52131760
What's the difference between normal IO ports and x86 IO ports?
>>
File: b35.jpg (56 KB, 353x334) Image search: [Google]
b35.jpg
56 KB, 353x334
>dpt is still in perpetual language wars
>>
Daily reminder that when you say "this was a shitpost", you're publishing the fact that you legitimately believed what you said
>>
>>52131776
I'm fucking done mate.
>>
>>52131821
edit... ish

that link is shit
>>
>>52131822
> -- there has to be a better way to do this
>>
>>52131829
or use make
>>
>>52131848

All the college kids are in for break.
>>
>>52131822
What's the best way to do this?
I'd just convert the number to a string and count the length.
>>
>>52131880
log (...) / log 10

(If the log provided is already a base of 10 you don't need to do / log 10)
>>
>>52131829
>>52131871
>best build system
>nothing at all
Thanks.

>>52131865
What's your better way?
>>
>>52131822
That pic is actually not bad from a performance standpoint.
Facebook used a similar approach for their int64 -> string printer, they found that a search using a series of cmp instructions (i.e if-else chains) was the fastest way of computing integer log10 (which was used to find the last index to start laying down the digits in reverse for the string buffer)
>>
>>52131880
Performance - wise I don't think you can beat this
>>
File: alg-laughing-jpg.jpg (46 KB, 970x702) Image search: [Google]
alg-laughing-jpg.jpg
46 KB, 970x702
>>52131822

| x >= 1000000000000000000000000000 = "nah"
>>
>>52131880
ceil(log_base(n))

Or integer divide withcounter
>>
>>52131920
>converting an int representation to a readable string
>ceil(log_base(n))
>integer divide with counter
>>52131897
>log x / log 10
As expected of dpt, even my anus is a better programmer.
>>
File: 1430352759004.jpg (49 KB, 460x464) Image search: [Google]
1430352759004.jpg
49 KB, 460x464
>>52131857
yeah I was gonna say heh
>MAIN DOESN'T RETURN 0 AUTOMATICALLY
OH DEAR GOD THE FUCKING HUMANITY
SAVE THE CHILDREN
>>
>>52131941
What's wrong with log x / log 10?
>>
>>52131718
On x86 io ports are merely a 64kb address space accessed through special instructions.

It may even be mem-mapable on x64, I haven't cared enough to absolutely find out.
>>
>>52131941
are you fucking retarded?
>>
>>52131961
The redditard is at it again!
>>
>>52131941
So mr l33t, what's the cool elite programmer way?
>>
>>52131969
Come back when you're actually old enough
>>
>>52131977
>>52131910
>>52131905
>>
IGNORE TRANNY THREADS

REPORT TRANNY POSTERS
>>
i'm redoing a swift 1.2 ios app into a swift 2.0 app
>>
>>52132073

Do you have a mac?
I'm so sorry.
>>
IGNORE TRANNY THREADS

REPORT TRANNY POSTERS
>>
>>52132058
Yes, a lookup table is always optimal in time.

Let's make everything O(1) time, just get yourself one of those Turing machines.
>>
>>52132097
yeah ;-; serves me right for being an early adopter
>>
>>52132134
Maybe you can find a hipster to sell it to? That redditor might want it, he was complaining about viruses earlier
>>
File: 1451310827326.jpg (512 KB, 1052x1803) Image search: [Google]
1451310827326.jpg
512 KB, 1052x1803
My current projects:

1. An inject that hooks common library functions (such as ones found in math.h) and sends them to the gpu to be processed instead

2. A self learning neural network that optimizes the machine instructions of programs by reorganizing jumps depending on which chunks of instructions are executed the most
>>
>>52132163
>and sends them to the gpu to be processed instead
How does one go about doing this?
>>
>>52132163
Cool, got a demo?
>>
File: smug wojack.jpg (64 KB, 640x712) Image search: [Google]
smug wojack.jpg
64 KB, 640x712
>>52130349
>menu sized festival
my nigga
>>
why is
print random.randrange(0, x)
so slow when you use large numbers?
what's a better alternative?
>>
IGNORE TRANNY THREADS

REPORT TRANNY POSTERS
>>
>>52132252
please stop spamming
>>
>>52132250
concatenate a bunch of short random numbers together and return the result
>>
>>52132250
What language? It's probably try harding for better random number by not using %.
>>
>>52132250
No modulo bias. Like this:

https://opensource.conformal.com/viewgit/?a=viewblob&p=clens&h=fd1c2c9ed18aa40784e39582808a5d04cf63f0d0&f=src/arc4random_uniform.c
>>
>>52132281
>It's probably try harding for better random number by not using %.
lmfao
>>
File: mmrlyxr0.gif (55 KB, 160x160) Image search: [Google]
mmrlyxr0.gif
55 KB, 160x160
>>52130496
JESUS CHRIST
>>
>>52132186
Check out the CUDA libraries by nvidia for using the GPU. Look up function hooking for more info on the other parts.

>>52132188
Works in progress, long time away from a demo sorry
>>
I seriously can't think of anything to code. I know the basics of a few languages and am pretty good with logic and algorithm stuff but I don't know what to do or how to go about it
>>
>>52132361
Same here except I've worked on projects for others. Still can't think of independent work though.
>>
>>52132397
stop
>>
>>52132361
>>52132382

Make a simple game
>>
>>52132361
>>52132382

What interests you? Perhaps don't work on projects and spend some time studying, so you have more tools available and can work on more things.

I spend 95% of my time learning and 5% actually coding. Actually coding only improves your programming and design skills.
>>
File: anime trap.jpg (65 KB, 468x577) Image search: [Google]
anime trap.jpg
65 KB, 468x577
>>52132397
just let it happen
>>
>>52132415
He said to ignore tranny posters anon. He's the only one posting about trannies.
>>
>>52132416
I have no idea how to do that in c++ or what api/libraries to use. It seems like it would be way too hard for me. I don't want to make one in python cause it will run like shit and I don't know any java game libraries either
>>
>>52132435
If C++ would be too hard for you (and it's actually quite simple doing games in C++), then you wouldn't be making anything in Python complex enough to run slow
>>
>>52132433
saika isn't really a trap because he never actually pretends to be a girl, he's just effeminate
>>
>>52132435

If you really want graphics and shit, use SFML. There's a tutorial on linking it with visual studio (you need to have exactly the right version and follow the tutorial exactly).

But you could make a text console game.
Dwarf Fortress is text based
>>
File: plebs vs pats dpt.png (56 KB, 839x777) Image search: [Google]
plebs vs pats dpt.png
56 KB, 839x777
>>
>>52132457
>visual studio
kekerino
>>
>>52132426
Well I only know pretty basic stuff so I'm not sure what to study. I know OOP concepts and general programming things, just don't have a lot of practice with them and I don't know any APIs or libraries for anything (eg Java swing)

>>52132447
I've made some stuff in python before that didn't run well. It was probably mainly because of my poor skills at the time (I had a whole tilemap load for a platformer and it checked every tile for collisions, so maybe that was it?)
I just need to figure out the best way for me to learn a games library and the methods to make one properly like gamestates and tilemaps and stuff

>>52132457
Yeah I was looking at SMFL maybe. I console game could work too
>>
>>52132464
Fuck C#
>>
>>52131684
I use premake4 and it generates nice looking make files.
>>
>>52132464
Swap PHP and Python and we're good, Python is replacing PHP nowadays anyway
>>
>>52132464
No ocaml/F#/ML?

>>52132467
Visual studio is good.

>>52132474
As a start, pick something simple like a console blackjack and actually go through and do it, don't get bored and stop.
>>
>>52132474
>I had a whole tilemap load for a platformer and it checked every tile for collisions, so maybe that was it?
Your deduction abilities are impeccable
>>
>>52130349
Faggot.
>>
>>52130349
Are there any actual traps here?
>>
>>52132499
Silly anon
Girls can't be faggots
>>
>>52132494
>Visual studio is good
kekamoto
>>
>>52132525
>I've never programmed in a real language like C++, C# or F# before
>>
Should I use codeblocks even though it's apparently outdated? It seems like a lot of people do. I'm currently using codelite. I don't wanna use VS either
>>
>>52132536
>real language
kektissimo
>>
>>52132553
Language & reason for not wanting VS?
>>
>>52132571
For c++. I don't want VS because it's a big download and I have a very slow internet connection. I also don't use alot of the features so I didn't think it was worth it. Also I don't know how it works with paying for it
>>
File: 1449515605183.jpg (170 KB, 700x727) Image search: [Google]
1449515605183.jpg
170 KB, 700x727
>>52132514
me :3
>>
>>52132553
Is there any reason why you can't use a simple text editor and a terminal?
>>
>>52132591
If download is really an issue then go with code blocks.

There's a free VS version called Community, though it says it requires 4GB. A lot of stuff you can install is optional (though IMO if you go with it grab C++, C# and F#).
>>
>>52132608
>draw a girl
>call it a boy
people will defend this
>>
type Genit = HasPenis | HasVagina | HadPenis
let (|He|She|It|) = function | HasPenis -> He
| HasVagina -> She
| HadPenis -> It
>>
>>52132622
Yeah, I'll use code blocks for now. I'll try to download VS eventually though, when I get better internet or something
>>
>>52132624

>implying
>>
>>52132643
Alternatively you could do >>52132611 and just write your code in notepad, download GCC and use it in a terminal
>>
>>52132608
p-post feminine penis to prove it
>>
Just woke up, lads.
>>
>>52132664
Match this simple pattern
>>52132638
>>
File: io.jpg (131 KB, 678x350) Image search: [Google]
io.jpg
131 KB, 678x350
>>52132608
Stop deceiving people with cute anime pictures, 3D traps are generally disgusting, hideous creatures.
>>
>>52132686
3DPD is a motto to live by
https://www.youtube.com/watch?v=z23Gzp0RTOg
>>
>>52132686
If you're cute as a guy, you can be cute as a girl.
But you're still not fooling anyone if your goal is to "trap" someone.
>>
>>52132702
what the fuck am i listening to
>>
>>52132728
Le Chateau Autiste
>>
Is sourceforge broken for anyone else
>>
>>52132728
https://www.youtube.com/watch?v=NCbgIgkvhN4
>>
File: 1396576011749.jpg (36 KB, 487x515) Image search: [Google]
1396576011749.jpg
36 KB, 487x515
>>52130349
>switch/case
>not even duff's device
embarrassing
>>
File: BearSuitDesu_2.gif (362 KB, 616x800) Image search: [Google]
BearSuitDesu_2.gif
362 KB, 616x800
How could I send non-string types through sockets in java? All the tutorials I can find use printwriters etc to just send strings
>>
>>52132702
Holy shit holy shit holy shit
>"Ties back to metaphysics"
>>
File: kissu.webm (3 MB, 1280x720) Image search: [Google]
kissu.webm
3 MB, 1280x720
Ask your beloved programming literate anything.
>>
File: dse.png (236 KB, 345x270) Image search: [Google]
dse.png
236 KB, 345x270
>>52132686
Am I cute senpai?
>>
>>52132924
Why do you keep calling yourself that?
>>
>>52132924
Why haven't you killed yourself yet?
>>
>>52132514
me

>>52132686
Not all of us
>>
>>52132902
https://www.youtube.com/watch?v=Gt1wjpdABF0
>>
>>52132924
what project can I make that utilizes 4chan's json? for example meme shapes, but something more creative and/or complex
>>
>>52132968
>Not all of us
There's the one in a million exception, the ones that start hormones as soon as they reach puberty, not after.
>>
>>52132995
It's more like this:
90% of all those that start hormones at puberty are qt
10% of those that started before 20 are qt, and only those that were already feminine in face/body structure
1% of those that start after that are qt, the miracles
>>
>>52132968
Post dick fgt
>>
>>52133028
You'll never be a qt3.14 trap like those in anime.
>>
>>52132995
>>52133028
>one in a million
>1%
Literal myth/trap meme.
>>
File: Io_crying.png (631 KB, 1051x686) Image search: [Google]
Io_crying.png
631 KB, 1051x686
>>52132960
>>52132966
please, don't bully.

>>52132992
a client for emacs
>>
Jesus christ, stop talking about traps, it'll derail as bad as grills do
>>
>>52132924
>>52132888
>>
>>52133096
GPL is communism tbqh.
>>
>>52133128
that's more like it
>>
>>52133128
All free software that isn't designed for either making or selling more software is communism.
>>
>>52133128

and communism is the enemy of liberty.
>>
>>52133145
Preventing developers from using your code in their proprietary software is communism.
>>
File: sicploli.png (631 KB, 1111x1600) Image search: [Google]
sicploli.png
631 KB, 1111x1600
>>52133123
https://docs.oracle.com/javase/8/docs/api/java/io/DataOutputStream.html
>>
Holy shit.
https://www.youtube.com/watch?v=7jBmv-3LnJg

But anyway are we gonna talk about programming or what? All I see is Java and Traps
>>
>>52132924
senpai notice me
>>
>>52133201
ok
>>
>>52132924
Prefered data serialization format?
>>
>>52133251
sexp
>>
>>52132924
How do I get started with win32 assembly?

Or any assembly code I can run on a windows laptop?

All I can do is hello world:
    global     _main
extern _printf

section .text
_main:
push message
call _printf
add esp, 4
ret
message:
db 'Hello, World', 10, 0

Which I feel might be cheating, because those look like C commands, and I want to try dealing with just whatever assembly instructions are.

I don't really know much about it tbqf
>>
>>52133164
Thanks anon
>>
>>52133259
is that close to json?
>>
>>52132924
I've currently run out of toilet paper. Would it be cheeky to use kitchen roll temporarily or am I going to cut my anus?
>>
>>52133265
Install Linux in a VM and learn on that
>>
>>52133287
https://en.wikipedia.org/wiki/S-expression

>>52133296
yes but it's more thick, care to not block your toilets
>>
>>52133312
is there anything that might restrict me from installing linux in a vm on a laptop? I'm asking because guides online seem very simple, but never really talk about limitations, other than bitlocker

my desktop is on the other side of the country
>>
>>52133296

You wouldn't even have to shit if you were paying attention to your lessons and not bunking off for a cheeky nandos.
>>
>>52133324
thanks lad, I did find toilet paper eventually, but next time I need to use kitchen roll, I'll keep that in mind
>>
>>52133259
>sexp
good choice, I approve. I would have gone with edn specifically but same diff.
>>
>>52133329
I've run Linux in a VM and it's worked just about as well as if I had it on my regular hard drive. I just know if you use VirtualBox, you'll have to install VirtualBox guest additions on Linux so that it runs better. Other than, it's a pretty simple process to install and set up depending on the distro you pick.

Of course, if you're deadset on win32 assembly for any reason I wouldn't bother since programming assembly in Linux will be different than for Windows.
>>
>>52130461
>>52130496
teach me senpai
what must i do to become more like you?
>>
>>52130349
Is this a real manga and if so where do I download it
>>
I found something I can actually do for an open source project that matters

Indians don't know bout my security knowledge
>>
>>52133453
I'd prefer to do assembly for Linux since all the tutorials are for it, and I just want to try for a learning experience. If it works just as well using VirtualBox, I'll get to it. Any distro I need to know about?
Thread replies: 255
Thread images: 31

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.