[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: 365
Thread images: 39

File: britishgayman.png (182KB, 451x496px) Image search: [Google]
britishgayman.png
182KB, 451x496px
What are you working on, /g/?

Previous thread: >>60965940
>>
>>60975777
First for D
>>
>>60975777
Do I need to learn about threads for GUI programming?
>>
File: 1486376698008.gif (415KB, 500x500px) Image search: [Google]
1486376698008.gif
415KB, 500x500px
>>60975777
Trying to create the cutest programming language.
>>
>>60975777

GPU ray tracing is not hard like people on OpenGL forums will tell you

in fact, it's easier because OpenGL will do the rasterization/interpolation for you at 10 times the speed
>>
>>60975812
can you show us a code snippet of the language senpai?
>>
>>60975806
what do you mean by gui programming?

do you mean developing a gui framework or developing applications?

for the primer, probably yes, for the later, probably not.
>>
File: 1479548768628.jpg (641KB, 1208x1920px) Image search: [Google]
1479548768628.jpg
641KB, 1208x1920px
Hello,
does anyone know where I can get cool tasks involving graph theory?
I need a project for uni and I cant really make my mind up right now.
It should involve nodes and (weighted) edges which can be searched through with BFS or DFS

Thank you
>>
>>60975876
I mean developing an application. How much resources could the main loop take before it starts getting low. Wouldn't I need to use threads at that point?
>>
>>60975919
the GUI framework is already using threads underneath, just that it's transparent to the developer.
>>
Can someone help me and give some advice on some things, I know this is the wrong board but it would be nice to get some "friendly" words.
>>
>>60975917
chemoinformatics involves a gazillion of graph theory tasks, various morphism, subgraphs and shit

not sure about searches tho, have a look for yourself
>>
>>60975917
T H I N N
>>
>>60975979
>asks for help
>doesn't post the question
senpai
>>
>>60975812
Share some code!
>>
>>60976032
how do I code?
>been 2 years since then
>>join this force called anon
>>>triforce fail
>>
>>60975979
Sure buddy, what's up?
>>
I am not gay at all but thinking about cuddling with Alan in the early xx century London and discussing computer science afterwards makes me warm and fuzzy. :3
>>
imma out skie ya bone head can't never get ouf wliey rieddfilly
>>
>>60975917
you could model transportation networks (car, boat, airplane, etc.) with cost and time (for extra meme points: co2 emissions) and then create a small application which gives you the cheapest or fastest way to transport a good from A to B
>>
>>60976068
just open up notepad and type
[alt-255][alt-30] enter
[alt-30][alt-255][alt-30]
>>
>>60975777
Who's that homo?
>>
>>60975860
>>60976055
I'm not him but that is my goal too
pls rate
proc reverse_number
over 1 < @end if
10 *
over 10 % +
swap 10 / swap
reverse_number
end

getln 0
reverse_number
println
>>
>>60975806
Yes you need to. Every task that takes longer than some milliseconds will make your GUI freeze until it's done if you do it in the main thread.
>>
O boi creating a timer library is bound to be autism of the highest class
>>
>>60975917
Program that solves mazes
>>
>>60975917
Dijkstra, Prim, Kruskal etc
>>
>>60976133
>end
trash
>>
>>60976205
what do you suggest anon
>>
File: i think my hard drive failed.png (24KB, 1279x1023px) Image search: [Google]
i think my hard drive failed.png
24KB, 1279x1023px
>>60975777
fuck me
>>
I'm pretty new to programming and was following the Learn Python The Hard Way book, I'm nearly done but for some reason I can't get nose to work on fedora? I've made my project skeleton but whenever I use nosetests in the the skeleton directory It Always says Ran 0 tests in 0.002s.
What am I doing wrong?
>>
>>60976247
>fedora
>python
>>>/trash/
>>
>>60976216
}
>>
File: 1491420280911.png (68KB, 400x400px) Image search: [Google]
1491420280911.png
68KB, 400x400px
>>60976133
A lot cuter than the first one you posted
>>
File: 1497815804703.png (208KB, 450x450px) Image search: [Google]
1497815804703.png
208KB, 450x450px
>>60976273
>}
C influenced languages get an automatic F in my book. They are not cute.
>>
>>60976273
but anon, that's a direct downgrade in cuteness
>>
>>60976300
Your book is a piece of garbage and no one cares about it
>>
>>60976256
rude
>>
File: trunews-thecircle.jpg (30KB, 480x360px) Image search: [Google]
trunews-thecircle.jpg
30KB, 480x360px
Started playing around with AWS, I'm currently hosting a dumb static website on S3 and using Route 53 as my DNS

Any /g/uys here have experience with AWS, what cool projects are you doing on there?
>>
File: 1457728085180.png (307KB, 500x500px) Image search: [Google]
1457728085180.png
307KB, 500x500px
>>60976133
Have you tried implementing other types of languages? Is a forth-like language easier to implement than a C-like language?
>>
>>60976300
>caring about cuteness in languages
you girl~
>>
>>60976319
You have to be genuinely delusional to disagree.
>>
>>60976350
Programming languages are known to be a form of anime.
>>
>>60976346
But C-like languages are boring! I already implemented an assembly-type language, and looking for more interesting. I saw a language that'd execute all instructions in parallel, unless one instruction depended on another, so that can be an interesting concept.
>>
>>60976363
No I'm not. Your ""book"" didn't sell too, all the newer languages are based or influenced by C as well. Which means C drove your ""book"" out of relevance.
>>
>>60976379
you would be a cock hungry trap character
>>
>>60976389
>Your ""book"" didn't sell too
It sold pretty well actually.
>all the newer languages are based or influenced by C as well
This is incorrect. Not every new language is garbage.
>>
>>60976388
>unless one instruction depended on another,
Or instructions could depend on solutions to open problems.
>>
>>60976404
Name a new language that is not written/implemented and influenced by C
>>
>>60976390
I'm not a programming language.
>>
>>60976300
This is why traps should be banned from existence
>>
File: 1469663983940.gif (2MB, 235x150px) Image search: [Google]
1469663983940.gif
2MB, 235x150px
>>60976422
Yeah but how'd you implement that?
>>
>>60976430
My language.
>>
>>60976460
Oh, of course, your ""language"" that which cannot do I/O.
>>
>>60976442
you're an effeminate faggot though.
>>
>can solve advanced algorithmic puzzles and math problems in any language and state their time complexity

>basic text processing and parsing poorly-formatted user input makes me want to die
>>
>>60976451
Just encode the problem as a type in some language with a sufficiently powerful type system and use FFI.
You could also make instructions depend on whether or not the program halts.
>>
>>60976484
A dirty lie.
>>
>>60976482
Is I/O influenced by C?
>>
Is the Dragon Book still worth reading for compiler design?
>>
To the Kotlin shill,
If Kotlin native becomes a thing maybe I will try it out because of the LLVM backend
>>
>>60976699
>K*tlin
K*tlin is strictly forbidden ITT. You can post that nonsense in /trash/
>>
Just how many registers does that fucking timer need
>>
File: snek.png (29KB, 213x187px) Image search: [Google]
snek.png
29KB, 213x187px
>webdevs
>>
>>60975917
minimal lisp interpreter with gc
neural network
chess solver
markov chains
to name a few
>>
>>60976596
people tend to recommend https://www.cs.princeton.edu/~appel/modern/, http://www.cs.sjsu.edu/~louden/cmptext/
and "Engineering a Compiler" these days instead of the dragon book. my bud tells me it's kinda dated and verbose
>>
File: ARDUINO_HARDMODE(ish).jpg (91KB, 1131x655px) Image search: [Google]
ARDUINO_HARDMODE(ish).jpg
91KB, 1131x655px
BEHOLD
FOR THE POWER OF COMMUNICATION HAS ARRIVED
>>
>>60976256
>implying python is trash
You have never programmed in your life, have you?
>>
>>60976909
Sure I have never "programmed"
I have created
>>
>>60975798
With Turing pic it's ambiguous.

[spoiler]Turing is a hero.[/spoiler]
>>
How could I get all my replies aka (You)s from a thread?
I am using Python and found a way to use my web browser's cookies with it when opening websites. When I get the HTML of it, the (You)s aren't in it. How does that work? I also looked at the page's source within Firefox and the (You)s aren't there as well.

What am I doing wrong?
>>
>>60976793
Saw this too. The worst things were the comments
>>
>>60976892
>types not aligned
>array length not aligned
>>
>>60977084
JS
>>
>>60976118
An hero
>>
>>60977084
your posts are tracked in localStorage
>>
Why do I have such a hard time getting recursion? ;_; I think I'm genuinely too dumb to learn programming.
>>
>>60977266
I teach recursion before looping and never once had anyone complain about it being too hard
>>
>>60976793
>>60977103
>That awkward moment when a guy does your entire Culminating project (which takes a whole month) in merely 4 and a half minutes...
CS shits were a mistake
>>
>>60977123
>>60977251

Thanks.
I just looked into it and I have to use some disgusting way (Selenium library) to run an instance of Firefox basically to extract it. Ew.
>>
File: 1301397776830.jpg (3KB, 91x78px) Image search: [Google]
1301397776830.jpg
3KB, 91x78px
>>60977266
>Look at datasheet of some chinese mc shit button
>Lifetime: 100000 Uses
>>
File: pcpart.png (4KB, 144x214px) Image search: [Google]
pcpart.png
4KB, 144x214px
any pc building bros here? i need opinions please
>>
>>60977411
Get a µc
Life the frugal life
>>
Why glibc doesn't support C11 threads?
What's the fucking point of standard if major compilers are just going to ignore it. Also fuck C11 standard for not supporting gcc extensions and lambdas.
>>
>>60977411
Wrong thread
>>
>>60977411
>>>60967459
>>
>>60977447
what kind of thread should i be looking for?
>>
>>60977440
Just use C++17
>>
>>60977459
Maybe you should start with legos
>>
>>60977462
Fuck off Bjarne, nobody likes you.
>>
how can a popular open source project have 1500 open issues?

i thought there are a lot of people who want to contribute

how does it work? im new
>>
>>60977459
>>>/g/pcbg
>>
>>60977294
I dunno, I just can't seem to picture what algorithms are going to do. I spent a few hours now trying to figure out how Towers of Hanoi using recursion works, but I don't understand less complex programs either.
>>
>>60977473
But I like Bjarne.
>>
>>60977462
>C++
Which standard library supports threads? Boost or STL? Or is it Libc?
>>
>>60977482
Dude just watch inception
>>
>>60977486
>>60977462
You should stop samefagging, though.
>>
>>60977489
The one and only C++ standard library.
Just include <thread>
>>
>>60977514
>The one and only C++ standard library
What nonsense are you blabbering?
>>
>>60977514
>one and only C++ standard library.
That's an oxymoron
>>
@60977514
>C++
>One standard library
Please do not spread misinformation.
>>
in Haskell, I can create a copy of an immutable object with one modified field like this:

changeName person = person{ name = "NewName" } 


Is something similar possible in C#, C++, C or Java without resorting to the Builder Pattern?
>>
>/dpt/ is so retarded that they think C++ that has 2 standard libraries
lmao
>>
>>60977562
3*
>>
>>60977544
>copy of an immutable object with one modified field
auto thing = Thing_type.dup.{stuff="a stuff"}
>>
>>60977544
>""Pattern""
Please do not mention """design patterns""" ITT. Spamming is not encouraged
>>
>>60977474
You're missing a lot of context. How big is the project? What is the proportion of errors to feature requests? Most every project that isn't massive is carried on the backs of just a few dedicated people, so there might just be too much work for them.
>>
>>60977609
based what language is this
>>60977612
please tell me how I can avoid using the builder pattern
>>
File: xx.jpg (77KB, 600x536px) Image search: [Google]
xx.jpg
77KB, 600x536px
>>60975777
>they cut off his balls
>>
>>60977668
D
>>
>>60977668
>the builder """pattern"""
Please do not mention """design patterns""" ITT. Spamming is not encouraged
>>
>>60977612
>>60977699
Fuck off.
Spamming is against the rules here.
>>
>>60977668
use lenses
>>
File: netrunner b.png (561KB, 7437x1646px) Image search: [Google]
netrunner b.png
561KB, 7437x1646px
Reminder we are making a web browser >>60974102
>>
>>60977726
>literally no progress beyond idea guys and artists making icons/logos
lol
>>
@60977726
>GNU nigger trash
Not interested, fuck off.
>>
File: rvhH20k.jpg (152KB, 625x538px) Image search: [Google]
rvhH20k.jpg
152KB, 625x538px
>>60977751
are you really surprised though
>>
File: 1497123824494.png (56KB, 370x370px) Image search: [Google]
1497123824494.png
56KB, 370x370px
>>60977726
>Initial commit
>updated todo
>>
>>60977773
>pic
science should be illegal
>>
Redpill me on design patterns
What even are they?
>>
>>60977848
Imagine being a shitty programmer

Now you understand
>>
>>60977848
Bad coding tutorials for noobs.
>>
>be making programming language
>learn how to make garbage collector
>I know! I will use a huge static array to cut down on slow system calls
>turns out emacs already did it

https://github.com/emacs-mirror/emacs/blob/master/src/sheap.c

why people always have ideas before me
why can't I ever have a moment
>>
>>60977848
common methods to handle certain problems inherent in OOP
>>
>>60977956
because it's 2017
>>
>>60977682
>chemical castration is the same thing as physical castration
Morons.
>>
>>60977956
think harder brainlet
>>
>>60977992
>>
>>60977992
>>60978011
I-I'm just a humble developer ;_;
>>
>>60978083
What original things have you developed?
>>
>>60978065
>current year
>not drinking currant beer
>le are-you-even-a-real-programmer meme
>>
>>60977956
What makes you think your problems are so unique and special that nobody has ever attempted to fix them in the past?

You think you're special?
>>
>>60978120
>original
>implying you don't get to post here unless you have done something that renders you eligible for a phd
>implying all developers should be doctors
what fucking world do you live in
>>
>>60975777
>GB is still considered a civilized nation
Why? They punish the greats and literally created the pajeet as we know her today.
>>
>>60977956
Who said all of this?
>>
>>60977956
>ill do one of the most basic optimizations to an allocator
>waah why did people do this before me?
Really anon? Are you going to be distraught when people do the same for their data in general like Facebook strings?

>garbage collector
Anon if you want to be good at something make features that makes MMM more convenient. If you do people will actually like it. GCs were never about them being good for anything. They're purely there for programmer convenience. If you make MMM similarly easy to do people will love it.
>>
>>60978143
You think people need PhDs to be creative?
>>
>>60978139
my gf says i'm special
>>
>5810769+_a40d7e5b1e8e75ee5e31d5f79ee70f2a.jpg
>>>/b/
>>
>>60978152
Tbh, we'd still have our empire if it wasn't for (((Winston Churchill)))
>>
File: JAVAQUESTION.png (9KB, 990x381px) Image search: [Google]
JAVAQUESTION.png
9KB, 990x381px
Anyone know the answer to this question (see image)?
>>
>>60978309
Object
>>
>>60978120
My own Lisp

>>60978139
Everybody's special~

>>60978217
I browsed a lot of memory allocator sources and never saw this particular technology being employed
I actually thought I'd either thought of it myself or that it was a bad idea for some reason, until I read emacs source code

If it's so basic why isn't more common
>>
>>60978346
>My own Lisp
I said original
>>
>>60978377
My Lisp is tightly integrated with Linux
>>
>>60978309
Object?
>>
>>60975777
Oh hey, it's Anal Touring.
>>
>>60977544
>immutable object
What's the point?
>>
File: 1479164637712.jpg (78KB, 884x574px) Image search: [Google]
1479164637712.jpg
78KB, 884x574px
>>60978152
>GB is still considered a civilized nation
By whom?
>>
>>60978460
>haskell
He's a functional autist, get over it
>>
>>60978548
>functional
What is an ``functional"?
>>
>>60978556
functional (adjective) of or having a special activity, purpose, or task.
>>
>>60978556
>>60978570
holy shit

functional (adjective): designed to be practical and useful, rather than attractive

imperitards btfo?
>>
>>60978449
sick burn 70 years late.
>>
>>60975812
But lisp exists.
>>
>>60978596
Too bad it accomplishes neither
>>
>>60978334
>>60978447

Ok I guess the answer C.. Why is that?
I'm not sure about the answer that is why I'm asking.
>>
>>60978740
Lisp is an abomination.
>>
>>60978217
What's an MMM?
>>
>>60978346
Now that I think of it, why isn't this common? Sounds like an easy, zero-cost way to allocate huge block of memory. The downside is you can't free it or adjust it's size at runtime.
>>
>>60978309
What is an ``super" type?
>>
>>60978793

All objects in Java inherit from Object, either directly or indirectly.
Object is the exception. It's at the very top of the inheritance hierarchy, it's special.
>>
>>60978800
t. hasklette
>>
>>60978793
Because Object is at the top of the class hierarchy. It's everybody's supertype but it isn't it's own supertype.
>>
>>60978800
What is your reasoning?
>>
>>60978817
A type that goes around rescuing other types from criminal types.
>>
Working on implementation of data mining algorithm, using openmp.
First pass is to count all elements in a vector of vectors.
Parallel solution is slower than non-parallel one, what's wrong?
Counter is a simple array of num_elements.
>>
Open source contributions all day baby
>>
>>60978225
>original
Yes.
>>
>>60978828
>>60978845
Thanks for the explanation.

I'm not a Java person but how come Integer, String and List have super types?
>>
>>60979001
Because they're objects. Int, float, byte, char are primitive values.
>>
>>60979001

It's part of Java's half-assed unified type system.
Every type in the language is Object, or inherits from object, or inherits from something that inherits from Object, etc.
That way you know that every kind of type can be cast back up to Object and it will even some basic methods like toString.
Foo myFoo = new Foo();
Object myObject = myFoo; // will always work, no matter how you defined Foo()
The exception is primitives like int, float, byte, char, double etc. These don't inherit from anything.These are distinct from their object counterparts Integer, Float, Byte, Character, Double etc. It's important that you don't get these confused, because they get implicitly converted to each other (boxing/unboxing)
>>
>>60979022
Is Java's ? type equivalent to C and C++'s void*?
>>
>>60979097

? is not a type, it's a wildcard used within Generics (which are little more than cast macros)
The closest thing that Java has to void* is Object. Everything apart from int, short, long, float, double, byte, char can be converted to Object.
>>
>>60976346
>Is a forth-like language easier to implement than a C-like language?
It's *the* easiest language to implement - you can bootstrap an implementation in a few hundred assembly instructions.
All you need to do is parse whitespace delimited words, keep a dictionary of word names -> execution tokens, convert strings to integers and provide a few primitives (some arithmetic, load/store to memory, branching).
And pretty soon you can start rewriting the system in Forth itself.
>>
reminder that C can detect infinite recursion and return early with a garbage value
int main() {
return main; /* doesn't loop forever! */
}
>>
>>60979063
>unified

My sides. Try Smalltalk and see what real OO looks like. Classes are objects, which means Object is an instance of Class, which is an Object, so Object is an instance of Object.

Put that in Java's pipe and smoke it
>>
>>60979190

Can you parse an entire sentence or are you only capable of understanding words in isolation?
>>
>>60979188
kek
>>
>>60979188
You're returning the address of main, dumbass.
Addresses to functions are implicit, which is why int (*fp)() = main; works
>>
>>60979188

>Calling a function without parens
>>
>>60979236

function pointer dereference is implicit too
Unless you're declaring it, because C declarator syntax is nothing except inconsistent
>>
>>60979188
everyone point and laugh at this retard
>>
>>60979190
You think that shit's impressive? In Ruby, Classes are Modules and Modules are Objects, and Object is an instance of Class, and Class is an object but also a class, which means not only is Object an instance of Object, but also Class is an instance of Class, and they're both instances of Module. And also Kernel is a module, and Object is an instance of Kernel, because Kernel is used to store methods that should be accessible from any context. Also Module is a class, which makes it an instance of Module. Also, all functions are methods, except lambdas, which are their own thing, but BOTH of those things are objects that have classes, so every method is an instance of Method (except instance methods of classes retrieved through the classes instead of the instances, which are instances of UnboundMethod) and every lambda is an instance of Proc. Even the garbage collector is an object, it's the module ObjectSpace.
>>
>>60979259
It's consistent, it's just very terse once you go multi-dimensional and start attempting closures that return arrays of function pointers that each return functions.
You read it from inside to out.
>>
>>60979188
>lambdas silently decay to ints
defend this Cfags
>>
>>60979336
it's decaying to a pointer of type int (*)()
>>
File: 1473923314142.jpg (29KB, 480x416px) Image search: [Google]
1473923314142.jpg
29KB, 480x416px
>>60979282
>>60979190
>>
>>60979284
>closures
This is not possible in C.
Unless you're using GNU C, which is not C.
Functions don't close around the context of their definition, because in C, functions cannot be defined in any context where what bindings are available can ever change at runtime (i.e. local scopes).
You CAN make functions that close around SOME state, but you have to use static to explicitly specify what state that is, and you certainly can't create it dynamically.
>>
>>60979282
>in Ruby, <autistic screeching>
Nobody is impressed by your awful fucking dynamic language
>>
>>60979336
an address isn't a lambda and it shouldn't be considered one
>>
>>60979367
>Ruby
>awful fucking dynamic language
Kill yourself m9.
>>
>>60979387
>waah i love ruby waah
Shut the fuck up you little bitch, this is a man's programming board
>>
>>60979406
>anyone who loves ruby is a little bitch and not a man
Kill yourself m9.
>>
>>60978460
thread safety
simplification of design
>>
>>60979418
>anyone who loves ruby is a little bitch and not a man
I'm glad you finally understand, now tits or gtfo
>>
>>60979406
Ruby is certainly better than C, and I say this from the standpoint of there being literally nothing I don't know about C (except anything that became true about it after 1989, because I only use C89 which is a great language but just not as good as Ruby, all other versions of C are dynamic trash, unlike Ruby which is dynamic but not trash).
>>
>>60979437
>he is unable to comprehend sarcasm
Kill yourself m9.
>>
>>60979469
Who are you quoting?
>>
File: 2297881.jpg (22KB, 400x400px) Image search: [Google]
2297881.jpg
22KB, 400x400px
>>60979494
>oh wow it are le stanky whomst arest thou quothing maymay
>>
>>60977514
>>60977525
>>60977535
>>60977543
Boost is C++ but not ``standard", and libc is ``standard" but not C++.
>>
Writing a compile-time implementation of std::set that stores values in template arguments.
>>
>>60979509
Look, you're obviously new around here, it's not my job to fill everything in for you rookies.
Try NOT being completely autistic, ok?
>>
>>60979539
what if you want to put something in it that can't be constructed at compile time?
>>
File: frog.png (240KB, 483x564px) Image search: [Google]
frog.png
240KB, 483x564px
>>60979544
>he meme le meme
>i am the one new around here
lel ok noob
>pic related yfw
>>
File: ruby developer.jpg (126KB, 1920x1080px) Image search: [Google]
ruby developer.jpg
126KB, 1920x1080px
>>60979282
>>60979387
>>60979418
Ruby put your trip back on
>>
how common is adding print functions everywhere to figure out how a program works?
>>
>>60978808
Manual memory management.
>>
>>60979001
Integer isn't the same as int, it's a class type, which means it inherits from object. Likewise with String, similarly to C++ std::string, it's implemented as a class object. List isn't a primitive type either, it's a data structure like std::vector. Even regular arrays in Java I believe are a class type, only they use some kind of overloading to make them look like primitives.
>>
>>60979557
My only use case involves ints, so it's not really a problem.
>>
>>60979367

Well he's comparing it to Smalltalk, so bringing up Ruby is always fair game here.
>>
>>60979574
I know C. And when I say I know C, I mean there's literally nothing I don't know about C. And by C I of course mean ANSI C89, because that's the only release that's ever been worth anyone's time, and all others are trash. C89 is a great language, but face it, Ruby is just better.
>>
>>60979619
Oh man I love good bait
>>
>>60979574

I don't shill for Ruby without my trip.

>>60979575

That's called print debugging. It's pretty common. It's not necessarily a best practice, considering that real debuggers exist, but it works in a pinch.
>>
>>60979575
extremely common, but a debugger is more effective because you dont need to remove the print statements later
>>
File: 1476111082775.jpg (46KB, 540x652px) Image search: [Google]
1476111082775.jpg
46KB, 540x652px
>>60979642
>>hey ruby put your trip back on
>*puts trip back on*
>that wasn't me

sure it wasn't
>>
>>60979236
>>60979242
>>60979259
I tried doing this with a proper function call syntax, and it didn't loop infinitely, instead it returned 127.

>>60979365
>Unless you're using GNU C, which is not C.
Wrong. C does not mean "standard C". It means C. Standard C means standard C.
>>
>>60979668
It wasn't him though, it was me. By the way all languages other than C89 and Ruby are garbage, including all other versions of C. But C89 is literally perfect, except for not being Ruby
>>
File: ruby irl.png (266KB, 339x589px) Image search: [Google]
ruby irl.png
266KB, 339x589px
>>60979686
this joke is getting stale, please either keep your trip on or off
>>
>>60979686
K&R C is better than C89 though.
>>
>>60979714
You mean pre-standard C?
The one that doesn't have void pointers and malloc returns a char * pointer and forward declarations for functions don't exist?
>>
>>60979668
Look, these posts

>>60979387
>>60979282
>>60979418
are not me.

My first post in this thread was right here: >>60979611

And I will confirm with a screenshot containing the (you) in a follow up post.

>>60979619
>>60979686

C11 > C99 > C89. Deal with it, scrub. Also, Ruby and C are incomparable. One's a scripting language, one's a compiled language. You use them for different purposes. You wouldn't use Ruby for anything that needs performance.
>>
>>60979724
Yes, void pointers are silly, their sole reason for existing is to work around the limitations of an insufficiently expressive type system.
>>
>>60975777
what's a good site to develop my C skills?
>>
File: evidence.png (39KB, 1429x297px) Image search: [Google]
evidence.png
39KB, 1429x297px
My evidence of not samefagging.
>>
Write a mathematical proof that you exist
>>
>>60979777
nice editing skills man
>>
>>60979778
does mashing the keyboard with my face count?
>>
File: ritchiue.jpg (1MB, 1006x1514px) Image search: [Google]
ritchiue.jpg
1MB, 1006x1514px
Why was he so humble? He rates his own C skills as 7/10
>>
>>60979785

In that short amount of time? I'm not that good at using GIMP.
>>
>>60979777
Took you a long time to cook up that evidence
>>
>>60979813
>humble
it's called being realistic.
>>
>>60977726
>Netrunner
with that logo you can savely call it Neetrunner
>>
Are spreadsheet formulas programming? Why/why not?
>>
>>60979821

2 minutes, 8 seconds between posts. Not really that long.
>>
File: 3.png (35KB, 1429x297px) Image search: [Google]
3.png
35KB, 1429x297px
>>60979818
>>
>>60979947
Must have taken so long because you ran the editing program in ruby
>>
>>60979985

Low effort edit.

>>60979993

I use GIMP.
>>
>>60975777
How do I get started using vim for python3 and C?
I've already gone through a bunch of plain tutorials.
I'm clueless on programming with anything but IDE's.
>>
Reminder that contributing to open source cleanses your soul and makes you feel better.
>>
>>60980033
You're a gimp AND a brony?
God must have hated you
>>
>>60979777
i wrote a ruby compiler once
>>
>>60980033
What would a higher quality edit look like?

>>60980060
Are you doing linux cli or windows cli?
>>
>>60980076
I'm so sorry
>>
>>60980105
I'm using GNU/linux.
>>
>>60980060
Why? To impress cs qts?
>>
>>60980117
You've done a basic cmd tutorial right? Things like ls, rm, mv, etc. You start by typing
vim main.c
in your current dir then hit the "i" key then type out the hello world.
http://www.openvim.com/
>>
>>60979714
Joke is on you, CPL is better than K&R C.
>>
>>60979813
Source?
>>
Stateful mixins are the best things possible. Honestly we should just have them instead of classes. Give me any language and I'll tell you why Ruby is better than it, and the answer will almost always be that the language you gave me doesn't have stateful mixins.
>>
>>60980198
actually, yes. cpl is a full fledged programming language but was too big for the computers of its time so it has been ripped into a lesser PL know as BCPL. BCPL was still too huge for the worst kind of computers that has ever existed: PDP. PDPs were the computers of the poor and could barely handle a high level programming language. this is why thompson created B and then Ritchies created C from B. C is a rip of a rip, a programming language specifically made to program the most shitty computer of that era. When C came out in the 70's, it was already obsolete and far behind PLT wise. Today, we can say that C has now ignored +50 years of PLT. never forget that.
>>
File: petsu.png (351KB, 448x448px) Image search: [Google]
petsu.png
351KB, 448x448px
>>60980157
Was mainly focused on python3 at first. Any good tips for that, and how I should proceed?
Just start with the very basic .vimrc file at first and add extensions as I need them, or is there some good starting package of plugins and configs?
>>60980128
y-yes (females).
>>
>>60980261
What the fuck are stateful mixins?
>>
>>60975777
Lisp is the most powerful programming language.
>>
>>60980368
A mixin that supplies the mixee not only with methods, but with state.
module HasLegs
attr_reader :legs
def extended(obj)
obj.instance_eval {@legs = 2}
end
end
object_without_legs = Object.new
object_without_legs.extend HasLegs # No longer without legs
puts object_without_legs.legs # show off dem legs gurl
>>
>>60980459
this is the least impressive thing i've seen all day
>>
>>60980459
wait shit that should be self.extended
module HasLegs
attr_reader :legs
def self.extended(obj)
obj.instance_eval {@legs = 2}
end
end
object_without_legs = Object.new
object_without_legs.extend HasLegs # No longer without legs
puts object_without_legs.legs # show off dem legs gurl
>>
>>60980483
Of course it's not impressive on its own. What's important is what you can do with it. Namely, it's basically genuine multiple inheritance, which is a feature missing from most OOP languages.
>>
>>60980503
>of course it's not impressive
>>
>>60980512
>>>www.outofcontextquotes.com
>>
>>60980521
Who are you quoting?
>>
File: eggy.jpg (59KB, 500x526px) Image search: [Google]
eggy.jpg
59KB, 500x526px
>>60980545
>>>/trash/
>>
>compsci class
>barely touch on goto
>tell us to never use it
>if we use goto then we get an F no matter what
college is a joke
>>
>>60980669
goto is for fags
>>
>>60980704
fight me
>>
>>60980704
How are you going to implement finite state machines then, dummy.
>>
>>60980669
Genuinely glad i didnt fall for the uni meme
>>
>>60980725
FSMs don't require goto you dumbass
>>
>>60980669
>disallow gotos
>there's an 0.1% chance that one of the students is actually capable of using it properly and won't abuse it but is not allowed to anyway

>allow gotos
>there's an 80% chance that at least one student will misuse the ever-loving fuck out of it
>can't take off points for it since you allowed it
>student is released into industry thinking his misuse of gotos is okay

I don't blame them at all
>>
>>60980729
>meme
>>>/v/
>>
>>60980741
Yes it does, finite state machines have labels, goto gives lables to pieces of code.
Not to mention that it's possible to have the labels share state.
>>
>>60980754
I think you missed the point of his prof not covering why goto abuse is bad.
>>
>>60980503
>multiple inheritance
If that's what you want to do with it, you can save yourself trouble by doing it this way.
class Mixin < Module
def extended(o)
instance_method(:initialize).bind(o).call
end
end

Then you can do:
HasLegs = Mixin.new do
attr_reader :legs
def initialize
@legs = 2
end
end
object_without_legs = Object.new
object_without_legs.extend HasLegs
puts object_without_legs.legs
>>
>>60980764
all computers are just fsm's so complicated it's more useful to talk about them as turing machines even though they're fsm's
>>
>>60980767
The goal of university compsci departments is to churn out as many programmers that can be useful to sponsoring companies as possible.

Creating brilliant programmers or even properly educating their students about things that won't be immediately useful to them in industry is not something that often appears on their radar.

It is far easier for a class to take a thing that has very very few proper use cases and many more improper use cases, and just ban it altogether instead of trying to ingrain the ability to discern those situations into the heads of a group of kids which is some portion retards who will end up using it anyway.

If you're the kind of programmer that knows when and when not to use a goto, then it doesn't matter what your university says, because you already know this and will rightfully ignore them when you need to. For the rest of the monkeys, it's best to not even give them the ammo.
>>
>>60975777
Is there no minimum IQ requirement for using these threads? I think we should establish one.
>>
>>60980856
i vote 0
>>
>>60980846
i.e Uni is a literal scam and we are readily in the age of self-teaching
>>
>>60980867
That would be higher than the current average. I support this.
>>
>>60980816
Unreadable.
>>
>>60980846
>>60980875
Uni isn't really meant for learning.
>>
OK, mySQL is pretty easy to use
what am I supposed to use it for?

is there a list of 'TO KNOW' things about it
>>
File: 192.png (217KB, 600x600px) Image search: [Google]
192.png
217KB, 600x600px
>>60980880
>he cannot read ruby
>he is this much of brainlet
>>
>>60980906
Not programming related.
>>>/g/sqt/
>>
>>60980277
basically, this
Although I really wonder why didn't actually improve C when they had the chance when creating C89.
At that point the problems must have been known.
>>
>>60980905
>"""""""""""""""higher""""""""""*** learning isnt for learning
Yes i realized this years ago
>>
>192.png
>>>/b/
>>
>>60980919
SQL is ltierally a query language, you make tables you use a programming language to interface with the databases

i just dk what to do with it
>>
>>60980108
why, i just did it to prove people are dumb
>>
>>60980948
all you proved is that you are dumb
>>
>>60979743
>C11 > C99 > C89.
this, but not by much
>>
>>60980915
>M-expressions
>>
>>60980926
"higher" learning is for "learning" how to act if you want a job that will let you live like a neet and still pay you
>>
>>60980990
>anus
>>
>>60980754
>>can't take off points for it since you allowed it
That's nonsensical. You can most definitely take points off for improper use of an allowed construct. What, you think a professor can't take off points for trash like
puts(main - 27);
unless they said "you're not allowed to use stdio?".

>>60980764
You can probably do the same with functions, but it would require you to use either global variables, or some kind of insane OOP monstrosity of a struct to haul state around in.

>>60980878
IQ is unsigned though.
>>
>>60980905
>>60980926
>>60981028
Not quite, it's taking the holding hands part of the education we are so used to and trying to instigate you to learn how to learn alone under a specific structured program.

The professor is there just to make sure you are on the right path while giving pointers to where you should or shouldn't go.
>>
>>60981471
>real numbers are unsigned
>>
>>60980972
how
>>
File: geg.gif (136KB, 311x360px) Image search: [Google]
geg.gif
136KB, 311x360px
>>60981471
>"you're not allowed to use stdio?"
but this is a reasonable guideline for programming in general though
>>
>>60981709
(You)
>>
File: 1458881227218.png (304KB, 647x679px) Image search: [Google]
1458881227218.png
304KB, 647x679px
>>60981709
This.
>>
>>60980977

To be fair, there's not much added between each version.
>>
>>60981943
And not enough removed.
That said, C11 restricts your choice of compilers enough that you might as well use modern C++ instead.
>>
File: wow-slob.jpg (47KB, 512x384px) Image search: [Google]
wow-slob.jpg
47KB, 512x384px
/dpt/ why do haskell girlmales think it is advisable to embed "moan ads" in their code so that potential bfs will look at their source code and see them moaning?
>>
>>60982010
tf u talking m8?
>>
>>60982029
it's true, ask any shitkell programmer if [s]he uses "moan ads," it will then moan at you
>>
Is there any reason to take the Java professional Developer SE7 exams? I can do them for free online but it would require passing a test designed by the company before they pay for the test.
>>
holy shit, debugging my AVL tree and it balances correctly when there's a double left heavy. i don't want to test any more of the cases because i'm so happy
>>
>>60981984

Let's be honest, even if C11 is not taken into account, name one good C compiler that isn't GCC, Clang, or the Small Device C Compiler (which supports some of the few devices that GCC and Clang don't support)?
>>
Write a mathematical proof that dog programmers exist
>>
>>60982010
tf u talking m8?
>>
>>60982123
it's true, ask any shitkell programmer if [s]he uses "moan ads," it will then moan at you
>>
>>60982053
>name one good C compiler except all the good C compilers
What are you trying to show?
>>
>>60982053
Sounds about right.
>>60982010
tf u talking m8?
>>
>>60982175
>it's true, ask any shitkell programmer if [s]he uses "moan ads," it will then moan at you
>>
>>60982165
>best case scenario
"Unless you commit to the linux kernel there is no reason to use C."
>best case scenario #2
"Most proprietary compiler vendors can't deliver."
>best case scenario #3
"C programmers hugely overestimate their compiler construction skills."
>>
>>60981560
Nobody cares about IQ past the hundredths place. Even using floating point is overkill.
>>
>>60982053
msvc with a preprocessor module to indiscriminately wrap everything with extern c
>>
>>60982010
A monad is a monoid in the category of endofunctors.
>>
>>60982264
>hundredths place
nobody with a soul cares about IQ beyond the ones place
>>
>>60982053
Define "good".

>>60982279
Doesn't msvc have a pure C mode? But it's proprietary anyway, therefore it's trash.
>>
>>60982295
you can call it whatever you want but we all know it's embedded propaganda for your xtube channel
>>
>>60982312
>proprietary anyway, therefore it's trash
Hi, RMS! I'm a big fan.
(btw if you're literally any freetard other than RMS you should kys)
>>
>>60982332
>R*S
>>>/b/
>>
>>60982343
>b
>>>/b/
>>
>>60982303
Whatever helps you sleep at night.
>>
>>60982303
Yes, but it's better to give more precision than is needed than less.
>>
>>60982279

>MSVC
Basically garbage. Limited platform support, complains about implicit casts that are legal in C when compiling C code. MSVC can be thought of as a C++ compiler pretending to be a C compiler. It should never be used if at all possible.
>>
>>60982458
M$ seems to find it perfectly adequate for compiling Window$ though.
>>
>>60981560
I have a complex IQ.
>>
>>60982418
That makes no sense.
>inb4 "maybe to a brainlet"
No, to me. And I'm not a brainlet. My IQ is 138.
>inb4 "that is a brainlet IQ"
No, it's actually not. I don't deny that yours is higher, nor do I care. The fact of the matter is that "how smart" a particular IQ is (if you even believe in the bullshit notion that IQ is a valid measure of intelligence, which I usually reject but am now accepting hypothetically for the sake of argument) is neither relative nor a matter of opinion. The fact of the matter is that in the context of this discussion (which is a stupid discussion, because IQ is a load of crap) I'm smart. How smart? 38, that's how smart. As long as we're brazenly and incorrectly assuming IQ is a reasonable measure of intelligence, if something doesn't make sense to me, it objectively doesn't make sense.
>>
>>60982418
(cont from >>60982517 )
Maybe it makes sense to you. Maybe you're smarter than me, and it makes sense to you and anyone as smart as you. But that doesn't mean it makes sense. That just means you're smart enough to make sense of something that doesn't make sense in the general case. "The general case" being IQ 100. (Except that IQ is bullshit.)
>>
>138
That is a brainlet IQ.
>The fact of the matter is that "how smart" a particular IQ is
Stopped reading right there. I never claimed anything like this.
>>
>>60982574
>That is a brainlet IQ.
It's objectively not, actually. Or objectively wouldn't be, rather, if IQ weren't bullshit, which it is.
>>
>>60982624
>>60982655
Global 3
>>
>>60982707
No racism outside >>>/b/
>>
>>60982732
>niggers
Global 3
>>
>>60982756
>>60982774
Global 3, you guys. Sheesh.
>>
>>60982794
Quit breaking the rules, reporting you is getting to be like whack-a-mole on crack.
>>
File: 1484699914718.jpg (993KB, 1182x1581px) Image search: [Google]
1484699914718.jpg
993KB, 1182x1581px
>>60982312
>msvc
>>
>>60982808
I, too, enjoy non sequiturs
>>
>>60982833
>I, too, enjoy non sequiturs
>>
>>60982844
>>I, too, enjoy non sequiturs
>>
>>60982860
Why you non sequituring so much tho.
>>
>>60982871
C makes insecure software so probably.
>>
>>60982871
>RMS
yes
>>
>>60982888
but why are you non sequitur though.
>>
>>60982919
>trump
Isn't he a zionist shill?
>>
>>60982919
okay these non sequiturs have gone on long enough
global 3 you guys, quit spamming
>>
>>60981471
It's not necessarily unsigned. From a theoretical standpoint, the differential from 100 represents the z score (multiplied by 15, of course). Meaning, going by z-score and normcdf, to get to the percentile necessary to represent being that stupid, you'd have to have 10x the number of people in the world and be the very stupidest person on Earth. Then you would get a negative IQ.

But practically speaking, you might want a floating point value anyway.

>>60982624
Listen man, I know you're probably about to get banned and all, but I laughed, so if that was your goal you made it buddy

Idk, completely non sequitur shit like this gets me
>>
Wow, what a clusterfuck of global 3 violations this thread is now. Thank god it's dying.
>>
File: 1495635906090.jpg (42KB, 640x403px) Image search: [Google]
1495635906090.jpg
42KB, 640x403px
>>60982952
>he is here to save us all
By letting Jews rule whites? I don't think so.
>>
File: 1495519989322.jpg (219KB, 1242x1171px) Image search: [Google]
1495519989322.jpg
219KB, 1242x1171px
>>60982995
His whole family converted
>>
>>60982993
>>60982995
>>60983006
>>60983007
Not programming related.
Global 3
>>
File: 1474335082718.jpg (30KB, 400x400px) Image search: [Google]
1474335082718.jpg
30KB, 400x400px
>>60983007
My oven is ready for some *ews. Would you like to be my first volunteer?
>>
>>60983026
Racism outside /b/.
Global 3
>>
Autism outside your mums vagina
Global 3
>>
>>60983035
Off topic, global 3
>>
>>60982517
>My IQ is 138
Literally king of the brainlets.

>>60982819
If Microsoft actually wanted to secretly spy on you, they'd put their telemetry code inside the compiler or kernel, somewhere where people wouldn't randomly stumble across it while debugging (and if they put malicious code in your own EXEs, they'd give it an innocuous name). Microsoft may well be tracking you with telemetry, but the MSVC telemetry is at most a red herring, and more likely just a niche debugging feature that they forgot to turn off.
>>
>>60983037
>Cooking *ews
Racism outside /b/, global 3
>>
>>60983066
>>60983037
>>
>>60983007
>liberal brainwashing camp
So T**mp campaign?
>>
>>60982903
Pretty sure RMS doesn't care for Israel, especially their military.
>>
So where's the next thread?
>>
>>60983119
new thread
>>60982367
>>60982367
>>60982367
>>60982367
Thread posts: 365
Thread images: 39


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