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

/dpt/ - Daily Programming Thread

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 308
Thread images: 31

File: 1480916491815.png (102KB, 1000x1071px) Image search: [Google]
1480916491815.png
102KB, 1000x1071px
What are you working on, /g/?

Old thread: >>62015577
>>
>>62020058
D
>>
File: DBGX-RNXcAElfh7.jpg-large.jpg (145KB, 640x640px) Image search: [Google]
DBGX-RNXcAElfh7.jpg-large.jpg
145KB, 640x640px
>>62020058
making some RMS fan art
>>
>>62020074
Dead
>>
File: 1386474008.png (21KB, 604x173px) Image search: [Google]
1386474008.png
21KB, 604x173px
Tried out 4e6/stack2nix; it still has ways to go before it's really useful. Might contribute and fix some annoying stuff.

Random snippet from 2013 unrelated.
>>
>>62020099
Nope
>>
>>62020074
Please don't start these threads with horrible dead memes.
>>
>>62020036
>50k
Isn't that very low for US standards? I've read that ~100k is average in the bay area.
>Haskell inline-java
I like Haskell, but the thought of those combined makes me want to kill myself.
Maybe we meet someday. Gentoomen are everywhere.
>>
>>62020043
Game devs are paid less, there are less jobs around, everyone wants to do it so harder to get in to, and there is definitely no game developer studios anywhere near where I live. I'm not interested in moving to cucked up parts of the country (UK) where you are paying half your income just to rent for the next decade, cause you will never afford a home which is like 10x or more a typical income in those areas. As cool as it would be to work on games, it isn't worth it
>>
>>62020134
>as he spouts a horrible, dead meme
>>
File: hhhehehe family.png (2MB, 1590x664px) Image search: [Google]
hhhehehe family.png
2MB, 1590x664px
>>62020097
That's fucking beautiful
>>
Please explain a retard what's wrong with Java
>>
Is there really no keyboard shortcut for |?
>>
>>62020181
It's next to 1 ya doofus. What kind of a fucked up keyboard layout do you use?
>>
>>62020142
I get it. I wouldn't want to work with poos as a nigger monkey scripting in unity either. Then again I don't work.
>>
>>62020167
It's designed for idiots so a lot of things are awkward in the name of safety. it's still not very safe.
>>
Reposting because I just missed the new thread.

So I'm interested in studying operating system design, with the intention of creating a toy OS that I can boot on bare metal. I have a couple of recommendation requests:

1) The book. Should I start with the MINIX book, or Lion's UNIX, or something else?

2) The hardware. I want something completely open and free - I'm not touching x86 with a bargepole. Is RISC-V a good idea? Can you get hobbyist boards with RISC-V processors? I haven't really looked into that yet.
>>
>>62020167
it feels like trying to do chemistry with 30ft long poles

if you have any real experience, any safety that the poles provide is outweighed by their hindrance
>>
>>62020219
You should download Temple OS
>>
>>62020202
There's tilde.
>>
>>62020215
>>62020239
But is it a good beginner entry language? My uni wants us to start with it before moving onto Python, C and C++
>>
File: Grace_Hopper.jpg (72KB, 517x606px) Image search: [Google]
Grace_Hopper.jpg
72KB, 517x606px
>>62020058
>What are you working on, /g/?
Write a COBOL program to interact with my collection of movies and music using indexed files.
It's pretty blazing fucking fast desu.
>>
>>62020287
>But is it a good beginner entry language
not really. you'll walk away knowing little about how anything works
>>
>>62020287
It's a good entry level OOP language, I suppose. You'll always feel like you're wearing training wheels.
>>
>>62020202
>next to 1
its above enter and below backspace on the only keyboard layout that matters.

>>62020106
>the foundations of implementing monads (or a dyad..) in a type system thats unsound
how did that go?
class Kek {
public static void main(String[] args) {
String zero = Kek.<Integer,String>c(0);
}
static class C<A, B extends A> {}
static class D<A> { <B extends A> A u(C<A,B> c, B b) { return b; } }
static <T,U> U c(T t) {
C<U,? super T> c = null;
D<U> d = new D<U>();
return d.u(c, t);
}
}

:^)
>>
>>62020287
It'll be harder to break away from the OOP-only mindset for a while, but for pure basics (variable types, flow control, loops) it's just as good as any other language.
>>
>>62020134

Dead yes, but not horrible.
>>
>>62020167

Java was good - 20 years ago.
Today it's simply outdated.

Anyway, every serisou programmer should know some C and Java, so it's not a bad idea to learn it.
>>
File: 1394537595.png (9KB, 267x192px) Image search: [Google]
1394537595.png
9KB, 267x192px
>>62020333
I forgot what that code was for but after looking it up, it was backing some talk for uni course years ago; it was only about monoids.


What's unsound in your example? Honestly deciphering Java is last thing I want to do right now so spoonfeed me please.

Christ my snippets directory has lots of random shit. IIRC pic related was gender choice at GSoC form.
>>
>>62020433
What has replaced Java?
>>
>>62020479
MS Java
>>
How do programmers share code and participate in open source development? I'm part of the generation that feels uneasy linking my real world identity to the internet.

Do you have an anonymised github account with a novelty email?

I just put my progress so far in the K&R textbook up on my work github account in a public repo. I can't really share any of my code here though because it has my full name and work email attached. I can only show people at job interviews and others i meet in my day job.

I could also re-up it to an alias account, but the code could be googled and linked to my real account (although no-one would try or care unless I told you this). I guess you just share snippets on an aliased git gist account or something?

Do people who contribute to opensource things like .NET and Linux kernels typically use their real world identities?
>>
>>62020456
It type checks fine. It also compiles fine, but produces invalid JVM bytecode, which throws a runtime exception when ran.
>Exception in thread "main" java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String

(I thought I was running out of space, so I had to shorten it up a lot. I had a second example which was much larger but it went foregone.)
Here it is with readable names.
class Kek {
public static void main(String[] args) {
String zero = Kek.<Integer,String>TotallyNotACast(0);
}
static class Constrain<A, B extends A> {}
static class Bind<A> {
<B extends A> A CastUp(Constrain<A,B> constrain, B b) { return b; }
}
static <T,U> U TotallyNotACast(T t) {
Constrain<U,? super T> constrain = null;
Bind<U> bind = new Bind<U>();
return bind.CastUp(constrain, t);
}
}
>>
>>62020546
At first, you can use other sites than Github.
>>
>>62020546
>Do people who contribute to opensource things like .NET and Linux kernels typically use their real world identities?
Why wouldn't they? People like to take credit for good things they have done. Most .NET developers are MS employees anyway.
>>
>>62020546
Haven't you watched the Matrix?
Get an anonymous online handle.
>>
>>62020219
That Tanebaum guy's books are good. The further away you get from either x86_64 or ARM, the more irrelevant your OS will be, but who am I kidding? It's not like you will make it
>>
File: gay.png (17KB, 660x245px) Image search: [Google]
gay.png
17KB, 660x245px
>>62020626

What do you use as email considering outlook (pictured) and gmail both pull this shit?

I got locked out of one of my gmail throwaways because apparently I changed OS one too many times and google are now insisting I give them a phone number or alternative email before they let me in
>>
What's better?
Allocate small space at first but lose time in reallocation operations because of insufficiently allocated space or allocate a good kilobyte so it would be enough for a buffer for a very long time but lose space?
>>
>>62020287
Just shut up and start learning shit already. Who cares what the first language you learn is? It's not going to be the only one.
>>
>>62020621

Well I dunno it just blurs the lines between internet persona and reality when you start posting about your contributions on places like stack overflow and reddit.
>>
>>62020546
I just use my first name on my Github account. I don't think employers really give a shit though if you don't wanna put any of your personal info, though. Regardless of what you have to show off before the interview, you still have to pass the interview.
>>
>>62020659
Cock.li (though their addresses may be banned in certain places) or Yandex
>>
>>62020640
It's a toy OS, I certainly don't intend for it to be in any way "relevant". Knowing my procrastination habits, though, you're probably right - I'd be lucky if I even got around to writing a bootloader

Thanks for the recommendation, anon.
>>
>>62020673
Sounds subjective unless you're aware of some constraints you didn't list.
>>
Why do people work on open source projects?
Literally dong it for free
>>
>>62020673
Link tcmalloc instead of whatever shitty malloc implementation your system provides and always allocate the exact amount of memory you need.
>>
>>62020729

Experience
Portfolio building
Showing off your intelligence
>>
>>62020729
Most OS people already have paying jobs, and its just a hobby.
>>
>>62020546
I have a few "throwaway" usernames on github, and a real one.

So, it depends on what I'm contributing to, or what I'm pushing to github for which account I use. Some that my employeer wouldn't like? It goes to one of the pseudonymous accounts. Stuff that I don't care if my name is attached to? Depends. Probably a second fake one.
But my employer doesn't give a shit about my github, as long as I don't violate any NCCs or NDAs.

As for gists, generally I always create a secret gist. And if I don't want my named attached, it'll be under one of the 'fake' ones.

But I doubt this is normal. I doubt anyone would care enough to criticize your projects on github, or rigorously scan through your activity to see if you're fixing a bug in a loli grooming game.
>>
>>62020729
Some companies that use open source software have a small team that gives back to the projects. So, sometimes you get payed to work on OSS.
>>
>Github:
>We promise not to share your email with anyone.

But it requires a
git config user.email "[email protected]"
when committing.

Have I misunderstood that field and could've left it blank all along? At least then I could post on stack overflow and have my email hidden even if they know my real name.
>>
File: SICP CIA Niggers.png (136KB, 400x579px) Image search: [Google]
SICP CIA Niggers.png
136KB, 400x579px
I'm reading this OP
>>
>>62020479

Nothing has "replaced" it. But it's concepts are outdated. Java is arguably the worst JVM language.

Look at how much more logical Kotlin, Clojure or Scala are (all JVM languages). Look how much better Ruby, Scala or Swift got the OOP model down. Look at how Getters and Setters are done in C# and how verbose and clumsy it is in Java. Look at how shitty Java Streams (introduced only recently!) are in comparison to other languages (people even recommend using "classical" loops because of performance issues). Java doesn't even have real Lambda functions - wtf? My neighbor and his dog have Lambdas nowadays. Instead you have weird and complicated stuff like Inner classes. And look at how stupid the numeric model or the model for Strings is. Then people came up with "Design patterns" which is basically a nice way to cover the flaws of the language. Concurrent programming in Java is outdated, it's basically: "hey, why don't you manage your whole fucking stuff yourself, dear programmer?". Multiple inheritance or Mixins work in so many languages, but apparently it's too difficult for Java devs. So let's introduce a whole clusterfuck of half arsed things like abstract classes, code injection frameworks and so on. Oh, and let's not forget about an anally retentive naming conventions like "SimpleBeanFactoryAwareAspectInstanceFactory" - I kid you not..


But it's similar to the history of JavaScript: first come, first serve. Even though Java is bad, it will never really vanish since people have invested so much already. It's easy to find a job with Java and coding Java is no big deal. So it's not a bad language to start, even if it's only to know what you not want to do for the rest of your life.
>>
is Programming truly the litmus test for high IQ?
>>
>>62020659
I was lucky enough to get both gmail and outlook addresses back when there was no phone verification.
>>
>>62020058
// The `switch` statement checks for equality with `===`.
// Use 'break' after each case
// or the cases after the correct one will be executed too.
grade = 'B';
switch (grade) {
case 'A':
console.log("Great job");
break;
case 'B':
console.log("OK job");
break;
case 'C':
console.log("You can do better");
break;
default:
console.log("Oy vey");
break;
}

is learnxinyminutes redpilled?
>>
>>62020812
not really.
>>
>>62020729
Because making what you want and getting paid for it is usually a pipedream.
It's not like you can't make money with free software anyway. Business models that rely on forcing artificial scarcity through legislation are inherently broken. Average Joe's rights come before Schlomo's "intellectual" "property", and an increasing number of enterprises agrees.
>>
>>62020800
It just saves you from signing into your account everytime you push your code to the repo.
>>
File: 1476381824839.png (29KB, 741x568px) Image search: [Google]
1476381824839.png
29KB, 741x568px
Redpill me about SAP

how profitable it is to get into it? I'm not from us
>>
>>62020812
lol no. not these days.
>>
>>62020849

But it publically displays that email against commits.

Without any credentials stored it asks for username and password when committing, not email. Giving user.email saves no typing.

I'm now wondering if its just a public email field you can type anything in like the old 4chan post Email field.
>>
>>62020800
>Have I misunderstood that field and could've left it blank all along?
Yep.

Question:
I'm making a static library with ' ar '. Is the resulting .a file just like a big .o file? In other words, when I want to use this library, do I then have to go through the linking step?
>>
>>62020852
Very. But learn COBOL instead if you really hate yourself.
>>
>>62020728
There are not any constraints really.
>>62020738
I don't know if I want to malloc memory for every additional byte.
>>
>want to make X11 program
>can't without wasting time because Xorg is becoming legacy
>have literally no idea how Wayland works while info on Xorg is everywhere

it hurts
>>
>>62020810
Scala's typesystem is unsound too :)
This typechecks but throws a runtime exception. (casting, without a cast)
object kek extends App {
trait A { type L >: Any}

val p: A { type L <: Nothing } = null
def u(a: A, x: Any): a.L = x
def c(s: Any): Nothing = u(p, s)

c("kek")
}


>>62020835
no, they are just actual jews. instead of the self-hating internet fake jews that redpillers are.
>>
>>62020880
I think if he asks about SAP, there's no COBOL in his country.
>>
File: eclipse ide on linux.jpg (26KB, 592x444px) Image search: [Google]
eclipse ide on linux.jpg
26KB, 592x444px
>>
>>62020028
that's $100 doing passionless tripe, though.
>>
>>62020873
>>62020836
i dont mean Koding with Karlie Kloss
i mean the real shit
>>
>>62020911
No cobol here
I'm net I do mostly dba and ado stuff
total retard for web but i get the simple stuff done
>>
>>62020904
Maybe you can work on Sway.
>>
>>62021007
Honestly, I'd say Electronics Engineering is for people with High IQs
>>
>>62021007
Even in the "real shit", theres still a lot of really shit code. I think functional programming is closer though. But as the other anon said, a guy who can make and program his own hardware is the real programmer.
>>
>>62021010
i can, but i sure as hell don't want to, tiling WMs are overrated
>>
File: 1502866179068.jpg (39KB, 357x389px) Image search: [Google]
1502866179068.jpg
39KB, 357x389px
>>62021054
thats who im talking about. self taught gammers who just fucking get it. who so many want to be but cant
>>
File: 1478106018832.jpg (211KB, 640x640px) Image search: [Google]
1478106018832.jpg
211KB, 640x640px
Is J the only right APL-like language to learn because it's open sourced?
>>
>>62021071
Well we really need to phase out the brainlet langs like Python, Ruby, Scala, C,Java, etc.
all dynamic languages need to fuck off as well
>>
>>62021071
>gammers
Is it still summer?
>>
>>62021094
Lisps can stay.
>>
>>62021122
Shitposts will probably die off around midterms. So expect a longer summer.
>>
>>62021125
Lisp has zero use.
Theres better scripting langs.
Theres better compiler bases.

I do not see the purpose of it.
>>
>>62021154
Lisp is only as useless as you are, anon.
>>
>>62021174
Tell me what Lisp does best besides making other lisps.
>>
>>62021182
Metaprogramming, extreme expressiveness, ability to handle large complex projects in a structured and sensible way, strong performance for a just-werks dynamic language. Part of its unpopularity is because it's "too" easy to solve problems yourself, though easy collaboration is making that less of a problem.
No language is truly universal, but people who say Lisp isn't good at anything tend to be the kind of mentally damaged fool that thinks PHP is good because it's popular.
>>
>>62021242
Anything with Lisp I can do better with an advanced type system of an Idris.
If I need speed I'll use D which can be pretty expressive as well as concise.

Lisp users love to task about meta-programming and expressiveness. But neither of those actually help when the language itself is a bad pick for nearly every task.
>>
>>62021242
>Metaprogramming

because you have no useful language features and have to build any yourself; likelihood you or anyone you know can do it better than language designer with 20 years of experience in PL? slim

>extreme expressiveness

repeating yourself, see above

>ability to handle large complex projects in a structured and sensible way

?; last I checked it didn't design or structure your program for you; nearly every language has this "ability"

>strong performance for a just-werks dynamic language.

so strong performance in a class of shitty performance languages

>>62021324
b-but you can just implement idris with a macro!
>>
>>62020835
top kek
>>
Working on my passwords generator.
>>
>>62021071
>>62020836
>>62020812
>would you say this a field for high IQ people if we only sample the IQs of intelligent and extraordinary people?
>>
>>62021618
Programming still isnt a high-IQ field.
The barrier to entry is too low.
>>
>>62021633
are you new
>>
>>62021641
nani?
>>
>>62021563
>pass generator
>generate random chars

Lol
>>
>>62021650
you failed to see my sarcasm and restated what my sarcasm was already implying
>>
>>62021680
I got the sarcasm just fine m8, i mas transitioning the conversation to your point.
>>
File: Icanseeforever.png (3KB, 136x136px) Image search: [Google]
Icanseeforever.png
3KB, 136x136px
>>62020058
We are making a web browser! >>62016683

Also we've been on HN https://news.ycombinator.com/item?id=15000253

To collab join the IRC on Rizon: #/g/netrunner
>>
>>62020803
don't worry anon, I chuckled
>>
>>62021669
Exactly.
>>
>>62021709
Have you guys taken any ideas from the Opera release?
>>
>>62021719
what work is there to do
that's a 5 minute "project" if that
>>
>>62021669

You could get more complicated than that.

Generate passwords that are actually memorable like syllabic blocks followed by a number and symbol or something.

But yeah it's not that difficult a project.
>>
>>62021324
Purely functional languages are bigger memes than any Lisp dialect. Except maybe that faggy Cocoa API one.

>>62021345
>because you have no useful language features and have to build any yourself
Scheme, maybe, but Common Lisp and Racket are big languages. They are not academic toys, some dialects are the "just get shit done" platforms.

>likelihood you or anyone you know can do it better than language designer with 20 years of experience in PL? slim
That's not what metaprogramming means, you retard. I agree Lisp has a shitty community culture, but it's not like that's stopped Ruby. Or Javascript. Or Go. Or Javascript.

>?; last I checked it didn't design or structure your program for you; nearly every language has this "ability"
Most programs turn into a mishmash of ad hoc reinventions when they get big enough. Lisp handles logical complexity more easily. It's a little weak when metaprogramming isn't useful for a task though.

>so strong performance in a class of shitty performance languages
If raw performance is critical, expressiveness is out the window anyway. C'est la vie.
When a balance is desired I think CL has some potential: https://github.com/fukamachi/woo
>>
>>62021792
>Purely functional languages are bigger memes than any Lisp dialect.
Why?
They do everything better than Lisp, and actually teach you to program around types and data instead of just functions.
>>
whats the best c# book?
>>
>>62021735
I was learning vim during that project.
I am sure that no memory is kept during password generation.
It tries to minimize entropy consumption.

Yes it's a small project. But I don't want a shitty passwords generator like everybody do.
>>
>>62021871
https://www.amazon.com/Java-Beginners-Guide-Herbert-Schildt/dp/0071809252/ref=sr_1_1?ie=UTF8&qid=1503352723&sr=8-1&keywords=java+a+beginner%27s+guide+sixth+edition
>>
>>62021871
no such thing as best book

just search for what you need to achieve
>>
>>62021815
Functional purity is a solution looking for a problem, albeit not remotely to the extent of OOP. I do like good type systems, but again, I'm not saying Lisp is a silver bullet; its dynamic typing is a trade off.
Though I do applaud Idris for recognizing that default lazy evaluation is a terrible idea.
>>
>>62021927
i have no interest in java, sorry

>>62021950
i just want some good reference, like bjarne stroustrup for c++, etc
>>
Just had my first class in my PhD program. Looks like I'm going to be doing some operating systems stuff on ARM.
>>
>>62021984
Looks like you're gonna be stuck in academia FOREVER.
>>
File: screenshot.png (34KB, 807x294px) Image search: [Google]
screenshot.png
34KB, 807x294px
Why does this give me a segmentation fault?

it works fine if I give the string directly to Texture (as in, Texture.loadTexture("something")), but as soon as I pass it through Asset (ex.: Asset.load("something")), it breaks.
>>
it feels like i have to learn E V E R Y T H I N G to a t to get a job
>>
File: static_nested.png (64KB, 642x515px) Image search: [Google]
static_nested.png
64KB, 642x515px
Can a static nested class have a constructor in Java? I was writing up a Stack implementation but I get a compiler error if I try a write a constructor.
Pic related
>>
>>62022000
Yes?
Why would I hire you to write me software if you're not capable of writing software?
>>
>>62021977
>Functional purity is a solution looking for a problem,
Side-effects which are the biggest cause of run-time errors, and type mismatches are the two biggest problems.
Pure functional programming serves to solve them both very successful.
> that default lazy evaluation is a terrible idea.
glad we agree on that
>>
>>62022011
never mind, I shouldn't use <T> in the constructor
>>
>>62022000
come on, dont lie to us, you've got time and energy to learn many languages and theres no reason for you not to do so
>>
>>62021741
could also check dictionaries for commonly used passwords/passphrases
>>
>>62020904
>not getting a GL ES context through generic buffer manager and kernel mode setting

It's like you WANT to depend on total utter crap software instead of using Linux the way it was meant to be used.
>>
>>62022018
its all so time consuming. databasing, networking, mutliple languages ranging from difficult to VERY difficult, front+back end web dev, app dev and bringing it all together... it never ends & admittedly.. i dont have the mind for it. i have
>>
>>62021989

Well I'm planning on becoming a professor, so... yes?
>>
>>62022118
>i wanna be a jack of all trades, master of none

ok
>>
>>62022137
Are you doing this because you feel you can't make it in the private sector, ruby?
>>
>>62022024
I guess I can see the appeal, but it doesn't seem much more general purpose than what Lisp offers. More often than not, problems with side-effects and typing are PEBKAC.
>>
>>62022189
Well thats my point.
Strict compilers and type systems prevent silly user errors. As well as provide streamlined documentation thats also your type annotation.
All future languages should omit the arrows and do

Function type type2 return_type
body

or
Function type type2 return_type
{
body
}

if they like structure without forced indentation.Or for single arg functions the return type is implicitly (or optionally explicitly defined as the desired return type) .
Functional programming just makes so much sense its stupid and said we've been doing it so wrong for ages. Lisp is for programmers who dont actually care about programming.
>>
>>62022301
This is retarded.
Everyone accepts that the best syntax is

(type1 -> type2 -> return_type)
>>
>>62022350
No its not.
two char operators are shit, and just sugar for what can be left out and still work and make sense.
Just because thats the norm in functional languages, doesnt mean in should stay that way.
>>
what is /g/ opinion on SFML?
>>
>>62022398
1) You can use →
2) Your syntax is so fucking retarded.
3) You have to put parentheses around if they aren't atoms anyway, and add "Function", making it much more characters in most contexts.
4) It's the norm in type theory.

You have no arguments, just a shitty idea.
>>
>>62021997
Can you show where you're doing Asset.load()?
(I'm guessing its something to do with how you're initializing Asset..)
>>
Why this works
(lowercase = 'a' <= ch && ch <= 'z');

and this doesn't
 lowercase = 'a' <= ch <= 'z';


Aren't they the same thing?
>>
>>62022438
what language accepts this ambiguous shit?
>>
>>62022438
in what language? python is one of the few that lets you chain comparison operators like that.
most won't because of historical reasons dating back to C (and how they fucked up operator precedence)
>>
>>62022454
C
>>
>>62022438
<= is a binary operator, the programming language you are using is not aware of all forms of notation and human communication, it accepts

a <= b
and
a && b
(and others)
>>
>>62022425
>no argument why its bad
>BUT ITS STANDARD STOP MESSING WITH IT
awful.

And Fuction is just the name placeholder, decl names are fucking stupid.
>>
>>62022118

You don't need that much to get a job.

Just learn one language and learn it well. Be good enough that you can call yourself "proficient" on your CV and confidently answer any interview question or task on it.

Then the rest you just kinda pick up by osmosis as you need it. Through your existing job or personal projects or whatever.

I'm not a SQL or database expert, but I've used it enough at work that I can claim at least a modicum of knowledge in it. If I'm asked at a job interview then it's true, I have used SQL at work and designed some tables in SQL server. I can answer enough basic questions to show that I wasn't lying and I have some knowledge of SQL but I'm no expert and I don't claim to be.

Most all you need for a job is to show you're capable of learning and self-teaching whatever the job needs you to know, they know you won't have all their unique combination of technologies anyway.
>>
>>62022471
I didn't know you could use the assignment operator as an rvalue without parentheses.

It's still very messy code and if it works at all, it's because the operator precedence worked in your favor.
>>
>>62022410
Seriously Fuck My Life?
>>
>>62022410
interesting if you program in c++
>>
>>62022301
Call me old fashioned, but assuming the user is a moron doesn't sound like a good basis for language design. I'll take my footguns, thank you very much.
Besides, if you want the computer to warn you when something might be unsafe, SBCL is already extremely picky.
>>
>>62022480
You are retarded.
I gave you multiple reasons.
So how's this then, genius?
Write this function type unambiguously using your notation:

forall a b. (Maybe a -> b) -> (a -> Bool) -> [a] -> b
>>
>>62022471

What would C do there?

Does it always do assignment last? So lowercase would end up being 1 or 0?
>>
>>62022503
= (and all its variants) is the 2nd lowest precedence in C. (it sits at 14 while relational comparisons sit at 6 (<=, et.al)).
>>
>>62022482
You know, this would be nice if employers actually offered to train you on their specific and unique software stack, but there's 200 other applicants so they can just reroll for the guy who has the most keywords possible.
>>
>>62022545
you can write this in Haskell as
flip (fmap fmap fmap) find

(find is in Data.Foldable)
>>
>>62022470
>>62022477
But even Scheme accepts (<= a b c).
>>
>>62022503
>>62022547

I'm reading K&R right now, and they do some odd stuff involving hiding assignments in things.

Like

while ((c = getchar()) != EOF)


Feels a little odd to me.
>>
what editor/IDE is that?
https://www.twitch.tv/jessicamak
>>
>>62022546
Top works and is 1 for lowercase and 0 for uppercase.

Bottom one shows 1 for both
>>
>>62022581
it's idiomatic C
When combined with a conditional operator (?:), I like to call this a "higher order conditional statement".
>>
>>62022525
>but assuming the user is a moron doesn't sound like a good basis for language design.
It's not really about that though, its just getting rid of sugar and making things concise.
>>62022545
Parse precedence from left to right.
If i need scope I'll just use parenthesis.
its not really a hard concept lad
>>
>>62021154
C-Can you recommend me a good compiler base language, anon?
>>
>>62022608
>It's not really about that though, its just getting rid of sugar and making things concise.
Well, to each his own. Concision for its own sake can lead to some dark places, like those horrifying newer concatenative languages.
>>
>>62022608
>Parse precedence from left to right.
>If i need scope I'll just use parenthesis.
>its not really a hard concept lad
I told you to rewrite that using your syntax, so do it.
>>
>>62022611
first letter of your post and last 2 numbers of your post number
>>
>>62022545
>>62022608
[a] should be
List a
>>
>>62021717
>chuckled
Thanks, anon.
>>
>>62022158

No; it's because I want a greater degree of freedom over what I can research, and I feel academia can offer that to me better than the private sector.
>>
>>62022591

It's because, as my noob C understanding

lowercase = 'a' <= ch <= 'z';


is being evaluated as

lowercase = ( ('a' <= ch) <= 'z' );


So it's going, is char greater than 'a' (resulting in a 1 or 0), then it's asking if that is less than or equal to 'z' which it is. Always 1.
>>
File: 1502359642945.jpg (2MB, 2480x3508px) Image search: [Google]
1502359642945.jpg
2MB, 2480x3508px
>>62022584
>anon has a 3D gook waifu
awww
>>
>>62022665

your ((wife)) is a male
>>
>>62022665
not at all, but i found this while browsing twitch and i could not recognize the ide
>>
>>62022604

Yeah it's neat and concise.

Just feels odd when I'm used to modern languages being more explicit and not letting people hide assignments anywhere but the top level. Could hide some nasty side effects if you're not used to it.

A lot of K&R is in the realm of not being sure whether it's still best practice or has become dated or not.
>>
>>62022581
parens have the highest precedence .

>>62022584
it looks like Visual Studio 2008. It could be 2005 but I can't stand this voice, so I won't watch to see more than just the current UI elements.
But its either or.

>>62022659
yes, <= (and friends) evaluate left-to-right.
http://en.cppreference.com/w/c/language/operator_precedence this will be helpful
>>
>>62022658
What is there to research?
Every advance made these days only seems like it's intended to be used against the general population in order to categorize, triangulate and dehumanize them for profit and control.
>>
File: 1461652228382.png (159KB, 289x289px) Image search: [Google]
1461652228382.png
159KB, 289x289px
>>62022659
>>62022477
>>62022689
It all makes sense now. Thanks guys
>>
>>62022000
dont be fooled by hr retards

be sure you're able to achieve something that is needed in the market and search for a job it fits your skills thats all, ignore the huge list they put
>>
>>62022629
forall (Maybe a b) (a Bool)  List a (b)

Something like that
Where spaces denote returns, except when next to keywords or types.

With an operator for returns maybe
forall (Maybe a - b)  (a Bool)  List a (b)


Where hyphen could be the return.
>>
>>62022737
And how does it know that you apply the a to Maybe and not to b?
>>
>>62022750
Maybe only takes one arg, so anything after is an implied return.
More realistically though, if i were to write it, I'd probably go with the hyphen approach instead of lots of space implications.
>>
>>62022732

The way I like to think about it is if a candidate applied tomorrow with every single last REQUIRED skill they list, and all or most of the optional extras, they'd hire them on the spot. They're listing what they want in an ideal candidate. They're not going to get it.

Often it's even impossible for them to have all their desired qualities for the pay or level of position they're offering. £25k for a highly experienced dev who knows all 10 of these technologies, good luck.

Show them that you know enough and you're good enough to learn the rest in short order.
>>
>>62022784
That limits what can be done with the type system and means the parser has to do kind checking.
With the hyphen you'd need it between all args.
>>
>>62022801
>>62022784
It also makes this sort of signature impossible.

forall f a. f a -> a -> ...

because your parsing depends on kind checking.
So you can't do the opposite and infer the kind from the syntax, i.e.

f a -> a -> ...

f a : Type
a : Type
f : Type -> Type


Meanwhile your version requires you to specify the kind so that it knows how to parse it.
>>
What is the best practice for storing objects inside std::vector ?

1. std::vector<Type>
2. std::vector<Type*> then delete elements individually
3. std::vector<std::shared_ptr<Type>>
>>
>>62022691

What is there to research? Well, security and machine learning are some of the big technologies to be going into these days. Something my current adviser and my adviser for my master's degree both find interesting is security with regards to the electrical grid (how do we prevent the next stuxnet). What I've got some interest in is language-level security and operating system-level security... There's plenty of stuff to work on.

>Every advance made these days only seems like it's intended to be used against the general population in order to categorize, triangulate and dehumanize them for profit and control.
Now imagine I can remove the "profit and control" motive. Perfect reason to work in academia over the private sector.
>>
>>62022801
>That limits what can be done with the type system
Not necessarily.
spaces and parenthesis could take your pretty far. And it's kind of the antithesis to make extremely complex functions instead of currying.
forall  {f a} a 


maybe?
>>
how do I make money
>>
is it possible to learn machine learning without actually taking the course in my uni?

no money desu

i am fairly proficient in cpp, java, python, js
>>
>>62022903

The first is best due to better cache locality, and avoiding unnecessary allocation/deallocation. If you need to use inheritance, prefer the last, but perhaps with unique_ptr.
>>
>>62022923
solve someone's problem
>>
>>62022916
You're just retarded.
You need to accept that.

You've trashed a perfectly good style, probably because you want it to look like C or lisp or some other bullshit.

You didn't even think about having different syntax for application and arrows.

Your idea is ridiculously limiting, I mean think of all the things that it can't do.
Kind inference of the individual types, poly kinds, type operators such as custom arrows.
Your original idea also had you define functions with the types just floating off the end.
I mean I didn't even see any parameters!
Nevermind separating declaration and definition, or what it would look like with lambdas.

What the fuck is wrong with you?
You don't understand anything.
>>
>>62022994
Lad, Ive stated that this is in no way anything else but a rough thought.
>>
File: nico_nico_nee.gif (735KB, 500x280px) Image search: [Google]
nico_nico_nee.gif
735KB, 500x280px
Ah yeah! Just got my Expert C Programming book. I'm going to start reading it now!
>>
>>62023028
It's a stupid thought, you started off by trashing -> which is perfectly normal and acceptable syntax.

With dependent types you could even do

foldr1 (->) [T1, T2, T3]
>>
>>62020058
How complicated do you guys think it would be to create a program to automatically solve a game of solitaire? I was thinking it would only move based on the current state only, and would only act on whatever the current "best move" is, or maybe the current state and one before it so it doesn't get caught in an endless loop of just moving the same card back and forth.
>>
>>62023052
>you started off by trashing ->
Right, theres no reason to have a two char operator.
-> is not the end all and something better exists and eventually will.
>>
>>62023085
I just gave you an alternative, and you aren't proposing a one char operator you're proposing a completely retarded syntax.

Maybe if you hadn't begun by trashing the agreed syntax of most type theory because you're just so smart and know better than all of them, maybe i would have been nicer to you.

2 chars is perfectly acceptable in languages with type inference anyway.
Your alternative is clearly even more verbose for anything outside of STLC or non-higher kinded polymorphism.
>>
>>62023105
>because you're just so smart and know better than all of them
I'v never claimed as such, it was pretty evident my problem was subjective and aesthetics really.
And to suggest an alternative means i would really have to sit down and think about all the cases and complications.
>>
>>62023136
→ and -> is better
Or if you want to go with stupid shit, then -
Do you accept that now?
>>
>>62022960
Thanks for telling me about unique_ptr
>>
>>62023083
not very
i think the best heuristic is reducing the number of cards in the extra card deck if you know what i mean

though you could also use search i guess
>>
okay anon, tell me something that i can write that IS NOT A FUCKING GAME with cpp

it has to be at least useful

other than enterprise shit, what the fuck else is there?
>>
>>62023164
>Do you accept that now?
Not really. I think we can do better. I really wish i wasnt buried in other hobby projects so i could take this up and see what happens.
>>
>>62023164
ツ
>>
>>62023191
>Not really
Fuck you
>>
>>62023215
alright m8
>>
>>62023182

Embedded shit
Professional high performance desktop applications

Realistically... anything. You could write a language interpreter or an operating system. You could write a webserver like Nginx or Apache. You could write a command line utility that might get called hundreds of times per second.

I'm assuming you're referring to C++ and not just the C Preprocessor. What kind of shit do you WANT to make?
>>
>>62023177
There's also a std::weak_ptr for when you want temporary ownership. (it gets converted to shared_ptr when ownership becomes permanent).
>>
>>62023182
Most my experience with seeples is in biomedical applications. ITK and VTK are pretty standard in that domain. Python has been getting popular with the sci-computing crowd and R is making inroads but a lot of older stuff and stuff really focused on perf is done in C++
>>
>>62023182
Try to do some basic program you use often in C++.
>LLVM
>Scientific computing frameworks (Look at Fenics, FreeFem)
>Matlab
>>
>>62023256
>>62023356

well if you ask me what i WANT to make, its a 2d platformer similar to maplestory

but for my resume, and onwards, i only ever hear about 'oh how so great python, js, java' is because no one is dumb enough to write in relatively low level program anymore.
>>
>>62023257
Would you recommend a C++ book?
>>
>>62023386
If you're just looking to jerk off on your resume and think you already know all the languages employers are looking for then why did you ask what you can do in C++?
>>
>>62023411
"A Tour of C++" if you've had previous programming experience
"Programming: Principles and Practice Using C++" if you're new to programming.
both by Bjarne Stroupstrup
>>
>>62023457

because i was wondering what else do people write in cpp

i was hoping to know that my learning cpp will bring me any good.
>>
>>62023506
Thank you
>>
>>62023386

Yeah, that's more reason I'm going into academia: I don't want to make websites. It seems the industry these days wants to move away from running native code on a client's machine, and move towards a web application model.
>>
I still don't understand the difference between a structure and a union in C. Would anybody care to explain to a retard?
>>
>>62023731
structs members are sequential and are allocated as such
union members are sequential but their storage overlaps.
>>
anyone here working on anything interesting, looking for collaboration ? Post ya projects.
>>
alright who's got that /g/ reading list? professor says our book is optional because he says it sucks, so I'm gonna pick from there
>>
>>62023731

A struct has elements occupying different but adjacent locations in memory, possibly with some padding in between to ensure they are aligned properly.

A union has elements which all occupy the same location in memory.

If we assume that sizeof(int) and sizeof(float) are both 4...

This is 8 bytes:
struct foo { int a; float b; };


While this is 4 bytes:
union foo { int a; float b; }
>>
>>62023506
>"Programming: Principles and Practice Using C++"
>wincuck shit
dropped
>>
My General Class Ham radio license so that I can take over the world.
>>
>>62023790

And I forgot a semicolon on the union example. Just great.
>>
>>62023790
So I'm assuming at the low level a union just has different pointers to the same spot in memory, whereas a struct would have actual different spots in memory reserved?

What in general would be the purpose of using a union then?
>>
>>62023571
Work in embedded!
>>
>>62023731
The stuff in a union is located at the same place in memory. If you don't understand memory locations etc you need to go deeper. Where things are and what things are is the key to C
>>
>>62023794
Way to show your ignorance. You see that its under the Windows section on Amazon and instant sperg out. The only mention of Windows is in an appendix on how to set up a compiler there.

Expect nothing better.
>>
>>62023771

what if one requires more memory than the other?
>>
>>62023731
C struct[ure]s specify a sequence of data in memory. So like:
struct SS {
int aa_;
float bb_;
};

has layout in memory of aa_, bb_.
C unions specify shared memory area:
union BB {
int aa_;
float bb_;
};

where aa_ and bb_ occupy the same space in memory.

For use cases:
If you want to have a bundle of data, use a struct.
If you want to share memory between different types use a union.

Ex1: Say you want to store like some info on a person like height, weight, etc. You would use a struct since you want those data to all be bundled together, like so:
struct Person {
float height_;
float weight_;
float dick_size_;
bool has_pussy_;
};


Ex2: Say you want to pass around a message that could be either an integer or a float, you could do something like the following:
union message_value {
int ii_;
float ff_;
};
struct message {
union message_value;
bool is_float_;
};

There you pass around enough information to figure out what's in the union, and you guarantee that if you take out whatever type you put in the union, then you actually get what you put in.
>>
>>62023831

Yes, a union is just a means of interpreting the same block of memory in different ways, and you can accomplish the same thing by casting between pointers of different types. As for its uses...

>Type punning
>Implementing dynamic typing
>Accessing the individual bytes of a primitive data type (e.g. union of float and char array)
>>
>>62023922
It occupies the biggest subtypes room anyways
>>
>>62023838

That is an option, but I think security research may actually be more fun.
>>
>>62023971
I know a guy who does security research and has a blast -- it looks like a super neat field for folks with the mindset for that kind of thing. Good luck!
Can agree making dumbass shopping carts for snapchats of dragon dildos sounds fucking atrocious.
>>
>>62020058
>what are you working on
>>62016683 < that
splitting between a TTY frontend (for non-3D devices), a cfg parser (like lynx), and perhaps something to do with DJG++ (someone mentioned a PC-/MS-/FreeDOS port)
>>
Example practical usage of a union for the curious Anon:

/* cell structure */
struct cell {
unsigned int _flag;
union {
struct {
char *_svalue;
int _length;
} _string;
num _number;
port *_port;
foreign_func _ff;
struct {
struct cell *_car;
struct cell *_cdr;
} _cons;
} _object;
};


This is what a cons cell looks like in TinyScheme. You'll note the _flag member in the outermost struct indicates what element in the union to use. We call this pattern a "tagged union." Some people into functional programming and type theory like to refer to this as a "sum type", where a struct is a "product type", but you'll probably not hear either of those terms used once in an undergraduate CS curriculum.
>>
File: lines.png (7KB, 268x70px) Image search: [Google]
lines.png
7KB, 268x70px
>>62021997
Here. Nothing complicated.
>>
>>62024146
meant to reply to >>62022430
>>
>>62024146
>>62024157
then your code should be working.. (also, you may want to use const char * const as your parameters to avoid that std::string implicit conversion (and its overhead, since you're using it for read-only strings).)
there's also some things you could do it to bring it up to a modern style (use uniform initialization, and initialization lists..)

is loadTexture doing anything weird, then?
>>
>>62020879
>that's exactly what it is
>lib *.obj /out:code.lib
>ar cru *.o libcode.a
>>
File: not centered.png (11KB, 810x634px) Image search: [Google]
not centered.png
11KB, 810x634px
why is my circle not centered?
#include <SFML/Graphics.hpp>
#include "akarin.cpp"
#include <iostream>

int main()
{
/*
create the window
you can only declare one of these
*/
int height = 800;
int width = 600;
int circle_sides_count = 20;

sf::RenderWindow window(sf::VideoMode(height, width), "Akarin");

// define a circle with radius = 200
sf::CircleShape circle(40);

// change the radius to 40
//circle.setRadius(40);
circle.setPosition(height/2, width/2); //why wont this work?

// change the number of sides (points) to 100
circle.setPointCount(circle_sides_count);

// run the program as long as the window is open
while (window.isOpen())
{
// clear the window with your rgb color
window.clear(sf::Color(255, 200, 255, 255));

//render the graphic
window.draw(circle);

// end the current frame
window.display();
}

return 0;
}
>>
>>62024305
Dumb akariposter
>>
>>62024305
The top left corner of the circle's bounding box is centered, since that's what you told it to render
>>
File: tumblr_orvhpyxbz91qzsymoo1_1280.png (723KB, 664x896px) Image search: [Google]
tumblr_orvhpyxbz91qzsymoo1_1280.png
723KB, 664x896px
Can you guys give me a cutesy name for my color palette generator plz?
>>
>>62024332
Those boobs are too small
>>
>>62024305

>#include "akarin.cpp"
Why are you including a non-header file?
>>
>>62024335
you're wrong
>>
>>62024343
perhaps he's being a true gamedev and is using the single compilation unit ..pattern
>>
>>62024332
galko-chan <3
>>
>>62024351
I am correct
>>
>>62024343

sry im dumbo cpp

i am guessing header file is where you declare all the structs, variables, and functions?

is there any reason why this is bad?
>>
File: working.png (227KB, 1923x1049px) Image search: [Google]
working.png
227KB, 1923x1049px
i am developing a tool to manage a game development process for people that has no development team.

i am doing so as i learn react... i have spent all day on that sad screen... i guess learn a new technology while you develop a project is not a good idea after all ;_;
>>
File: img.png (15KB, 358x177px) Image search: [Google]
img.png
15KB, 358x177px
>>62024188
Nothing strange, no. All it does with the string is make it into a c-string and use it to load an image. I thought it had something to do with how I was passing the string as an argument, so I changed it to pic related, but even doing this still results in a segmentation fault even though calling it through main() works fine.

I have no idea now.
>>
>>62024384

Header file is for type definitions (struct, union, class, typedef anything), forward declarations of functions, and templates. The definitions of functions and methods should be placed in their own source file (.cpp) and linked against everything else. Otherwise you end up compiling the same function twice if it is used by multiple files. Even if you structure your #include ordering such that every file is compiled once, this still means you have to compile the entire program every time you make a change.

How are you using libraries without knowing the basics of how a C++ program is built? I don't suppose you think that SFML/Graphics.hpp actually contains the definitions of, say sf::Window::draw, do you?
>>
>>62024384
Try to include your .cpp file in another .cpp file
>>
File: trace.png (25KB, 771x183px) Image search: [Google]
trace.png
25KB, 771x183px
>>62024430
Here's the stack trace, too.
>>
>try to do something practical like electronics/woodworking
>everything has minor issues with them which I wanna fix which I shouldn't/realistically can't
Programming is too nice. I'm spoiled.
>>
>>62024444
its segfaulting in loadTexture
it looks like you're reading past the end of the stack).
>>
>>62024448
at least you have something to show for it
at the end of the day, you just have a bunch of plain textfiles
>>
>>62024444
Victor please step through your program and verify the state. We both know the only reason you haven't solved this is because you don't have a proper interface for debugging. Get a real debugger.
>>
>>62024384
Yes, unfortunately: single pass compilation and linkers being dumb.
C and C++ have a thing called a "C preprocessor" that munges your input files based on various directives (macros, include, etc.) The munged file is then delivered to the compiler as a thing called a translation unit. Each translation unit needs to know various kinds of informations about the things it does. It needs to know the signature of every function it calls. It also needs to know the size of every object it instantiates (in C a struct is an object I'm not talking about OOP directly.) The size is needed to be known to the TU because the linker cannot fixup the size.
Ex1:
void some_function(void) {
struct some_struct ss;
}

In this case, the function `some_function` is allocating stackspace for a `struct some_struct`. Due to the way the language was designed (largely for historical reasons and lack of processing power) The total number of bytes for `struct some_struct` must be known at compiletime to be able to generate the necessary machine code to allocate the stack space for the struct. For functions, pointers, and references (C++ only) you just need to tell the compiler "yo this thing exists" via a prototype (for functions) or forward declaration (for types).

So anyway, C and C++ need to be told prior to site of access that the thing you're doing is a real thing, and if you need to actually allocate space for the thing (i.e. it's a VALUE) then you need the full declaration of the type available.
>>
>>62023909
>Having to "learn" without a compiler setup
>>
>>62024488
pressing C-x a will give him a less 1970s interface.
..but the 80s weren't that much better.
(assuming its not an ancient version of gdb)
>>
Is there any jack of all trades library like Boost for C?
>>
>>62024524
GLib
>>
>>62024524
g++

with boost.
>>
>>62024488

well, Knuth doesn't use a debugger... a debugger poisons your reasoning
>>
fast exponentiation
int power(int x, unsigned int y)
{
if (!y)
return 1;
if (y == 2)
return x * x;
if (y&1)
return x * power(power(x, y/2),2);

return power(power(x, y/2),2);
}
>>
File: am i retarded.png (266KB, 665x574px) Image search: [Google]
am i retarded.png
266KB, 665x574px
>>62024488
I have barely done anything complicated enough to warrant using a real debugging interface. And I just commenting out the glGenerateMipmap(GL_TEXTURE_2D); that was on line 72 and it apparently fixed the segmentation fault issue. I want to figure out why, though, because it looks so arbitrary and it was working just fine until now.
>>
>>62024593
global rule 6, retard
>>
>>62024593
where should we migrate to? 8ch?
>>
>>62024593
enjoy your ban
>>
>>62024610

reported for using the R-word
>>
>>62024610
if only rule 6 was enforced, we'd all get banned.
>>
>>62024625
He didn't say Rust.
>>
>>62024613
is 8 chan the best /g/ board?
>>
>>62024632
dude, the way things are going they will rewrite 4chan in Rust
>>
>>62024646
Oh yeah? What about THIS?
int arr[2] = {0, 0};
arr[2] = 1;


>>62024656
>the way things are going

You mean the way the newfags at stack overflow think? Rust is a meme like Haskell but you can actually code shit for big data without getting stack overflows.
>>
File: 16684208.jpg (44KB, 480x539px) Image search: [Google]
16684208.jpg
44KB, 480x539px
>>62024311
Nothing wrong with akaris
>>
which
if (isBlue) {
return doBlue();
}
if (isRed) {
return doRed();
}
...

or
switch(true) {
case isBlue():
return doBlue();
case isRed():
return doRed();
...
>>
>>62024779
first one, because readibility counts
>>
File: 1497978638847.png (250KB, 972x902px) Image search: [Google]
1497978638847.png
250KB, 972x902px
I can do basic math scripts in python, but I don't know how to do anything else. Like, I know data types, I know for/while loops, I know conditionals and such. But I don't know how to turn all of this into something I can use.
I want to make software that I can use for myself, but I don't know where to begin.
>>
>>62024779
>switch(true)
>>
>>62024408
one day for that? doesn't look bad, m8. it'd take me a long time to do that shit
>>
File: specs.png (36KB, 749x515px) Image search: [Google]
specs.png
36KB, 749x515px
are my laptop specs good for the usual Java, C/C++ and NodeJS? Asking because it's been running a tad slow and I'm pretty much a noob
>>
>>62024448
huh, I've had the contrary experience: programming for me means fixing shit that, in the end, is not possible with my little knowledge/time/resources. doing practical stuff makes me do stuff that ends up being a compromise, but usually not a huge pain in the ass...
>>
>>62024779
Assuming the second one compiles using the correct constexprs for isBlue and isRed, the second one is better because it's branchless.
>>
>>62024896
>103C
kek
Get a fucking Ryzen before it blows
>>
>>62024867
this. wtf?
>>
>>62024896
you're running a tad hot
>>
>>62024862
maybe this will give you some ideas
https://automatetheboringstuff.com/
>>
>>62024896
You know most motherboards kill the power after 100C in order to prevent damage, right?
That's BOILING WATER temperature.
>>
>>62024896
>103
That's a ticking timebomb, m8. Sell it to a normal cuck, get a desktop with a good CPU that has good multitasking capability (moar cores/threads) and you are good.
>>
>>62024988
I actually have a decent desktop but I don't do shit on it aside from gayming
>>
>>62025003
time to grow up
>>
>>62025003
Making games is more fun than playing one
>>
>>62024867
>>62024964
Do you know how switch works? "switch(true) case a" is the same as "if(true == a)". But it's not as readable as the latter, of course.
>>
>>62025020
What's a good way to start? I got tasked with making an android-based VR experience for one of my college research groups; but I have no fucking idea where to begin with
>>
>>62025030
Not exactly. The a inside the if can change it's value.
>>
File: 1474949335999.gif (245KB, 500x500px) Image search: [Google]
1474949335999.gif
245KB, 500x500px
>>62024732
akari is cute
>>
>>62025039
what? you are told to make a VR game and you don't know where to start?
>>
>>62025052
Akari is a dumb boring slut.
>>
File: 1502982809338.png (59KB, 265x209px) Image search: [Google]
1502982809338.png
59KB, 265x209px
>>62025076
>>
>>62024591
I figured it out. Apparently I am retarded. I was trying to call asset.load() before the OpenGL context was even open, while my regular "texture that works" was being called after. Of course it would segfault.

I need to pay more attention to how I organize my code.
>>
File: meme.png (2KB, 402x43px) Image search: [Google]
meme.png
2KB, 402x43px
>>62024954
>>62024965
>>62024983
>>62024988
Also forgot the obligatory m-muh I was only memeing post
Seems like speccy has an issue with my CPU

>>62025057
I don't do that kind of programming; my mentor just chucks anything computer-related at me without checking if it's actually feasible with my skillset
He believed a shitty two-week online course on the basics of big data would make me an expert
>>
I think I'm just being retarded, but for a singly or doubly linked list implementation of a queue, the complexity of all operations (enqueue, dequeue) are O(1), right?

I mean everything on the internet is saying yes, but wouldn't you need to traverse to the tail of the linked list to enqueue? pls help and fast ty
>>
>>62025116
IIRC that's right Pajeet; best of luck with your homework
>>
!!new thread!!

>>62025163
>>
>>62025049
Right, I recall something like that. Either way, you shouldn't do the second.
>>
>>62025116
depends on the implementation of the singly linked list

no reason not to store a pointer to last in doubly linked
>>
>>62025112
unity is a good starting point, it has a good community and tons of tutorials
>>
>>62024524

Just use C++ then. C is literally used for "rewrite everything from scratch because i want full control over my code at the byte level"
Thread posts: 308
Thread images: 31


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

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.