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

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

Thread replies: 201
Thread images: 25
File: 1466794497410.gif (607 KB, 800x792) Image search: [Google]
1466794497410.gif
607 KB, 800x792
Quick reminder, C is the only real programming language, and any other programming language is pajeet/sjw tier. In other words, kys node, swift, python, and Ruby fags.
>>
File: smugvictorian.jpg (2 MB, 1000x1400) Image search: [Google]
smugvictorian.jpg
2 MB, 1000x1400
>mfw someone calls degenerated algol a "real programming language"
>>
>>55291471
Pajeet detected. Someone is too busy 'learning' his swftnodejsruby++ to learn a real language.
>>
File: IMG-20160622-WA0005.jpg (109 KB, 1280x720) Image search: [Google]
IMG-20160622-WA0005.jpg
109 KB, 1280x720
What if i want to learn java because the CFD suite i have can do macros in java
>>
lisp
>>
Alpha males with high test use Perl.
>>
>>55291455
What about C++?
>>
File: 1466921545551.gif (135 KB, 364x317) Image search: [Google]
1466921545551.gif
135 KB, 364x317
>>55291971
C++ is the only one I can forgive. The rest are still shit.
>>
literally the only source of exploits in current year is C(++)
>>
can anyone here point me to a library that'll let me make guis using C?
>>
Too bad there are not many places where you can work with only C.
>>
What about assembly?
>>
>>55292404
It depends.
Which one?
>>
lisp
>>
>>55291455
>2016
>not using Ada
It deprecated C and every other language when it got its shit together in the 90's.
You're not using a real language until it's used in ICBM's, nuclear submarines and fighter jets .(even though C has probably caused more deaths than all of those combined)
>>
>>55292581
Has any of you fucking Ada spouting fags ever actually used the language?
The ada meme is even worse than the Haskell meme
>>
>>55291455
C is literally the first language parakeets learn in their school/college. kys my man.
>>
>>55292836
Of course I've used it.
>faster than any high level language except C, C++ and Rust
>cleanest syntax, almost impossible to right spaghetti code
>best type system of all time
>makes certain aspects of embedded development better than C
>Ada jobs pay a metric fuckton of money
>ISO standard freely available and actually adhered to by compilers
>every runtime check can easily be selectively disabled
>runtime checks aren't even necessary after formally proving the program correct with SPARK 2014
>scalable concurrency model
>COBOL and Fortran API if you want to extort more money out of employer
>job security since you're basically irreplaceable
Also
>thinking there's more than one Ada spouting fag
>>
>>55291455
lol what? Fortran and Forth would both like a word with you, C fag.
>>
>>55292982

What are the benefits of Ada compared to Rust ?
>>
>>55292120
The place is called at home.
>>
I'd also like to remind everyone that c is literally the backbone of almost everything- Including all of your hipster languages.
>>
>>55291455
>look for pure C jobs
>they're pretty much all microcontroller/device driver programming jobs in no name corporations in middle of nowhere midwestern towns that have shit pay

dumb frogposter.
>>
>>55292073
You can basically use C++ libraries without the C++ features. There's one for visual studios if your on windows or I think you could make one with the Qt ide on linux. I don't know. C beginner myself.
>>
>>55291455
>world still preferring arcane shitlangs over sane modern alternatives with memory safety
fml
>>
>>55291455
>node
>a programming language
It's JS you nob
>>
>using something newer than C
>not using assembly

kek
>>
>>55293700
People actually use Ada in real life, not just in their basements.
>>
>>55294920
I figured I'll just use GTK bc what else is there but I'm still struggling to find a non-book sized reference for it. Kind of want to get started tonight and make a few tools in the meantime. I think I could benefit from a smart tiler that lets me click a region of a tile point and if its empty fill it and that if the tile is occupied, check the region of the click. Of the region is the left and its empty, then it stamps another tile. If it's the right side and occupied then it just ignores and continues to peek at the pixel that it is hovering over.

In my reading I found that QT might be a bit much for what I want, i think, but mostly also that it was made using C++ so there's bound to be some weirdness.

Am currently making a linked list. I want it to handle nodes that will contain the information for the specific state the machine is in after a certain amount of time. They will be profinite to allow you to add more inputs than the interval might imply, if you were so inclined, but keep a log of only the implied number of inputs, or in intervals of that amount. This way the animating can happen in one thread and be buffered in at those intervals and the second thread can be used for handling input. The second thread will pass input at those intervals and that will help create a pace between inout and drawing so that I can use player input or my own manner of execution to model a pace for the game before actually tweaking the numbers in lieu of a concrete strategy between pc's or between pc and npc.
>>
>>55295435
I can't stand libraries so big I'll never master them. FLTK for me.
>>
>>55291455
If you haven't gradated to C++ you are half retarded.
>>
Haskell
>>
>>55292120

if you want to have job security you have to know more than one language. not necessarily up to expert level but know the structure and basics.
>>
File: 1466987786659.jpg (38 KB, 362x346) Image search: [Google]
1466987786659.jpg
38 KB, 362x346
>>55291455
why not? python just werks.
>>
>>55291455
https://www.youtube.com/watch?v=csyL9EC0S0c
>>
>>55291455
You cuckface couldn't dream of being as efficient as APL
>>
>>55295443
woah woah thank you for that, I'll google it right away.

And thats a C++ tool with a minimal use library for C. Thanks but I really want to go full on C for reasons. I just really love how C tickles my pop popped ear drum. :p
I also get a lot more out of it when I don't have to consider some cross platform re-agency.

I considered graphics.h but found that its deprecated in many senses. Maybe GTK will be okay. I hear that's what they used for GIMP.
>>
>>55295539
very, very slowly tho
>>
>>55292581
What compiler do you use?
>>
>>55295539
*python does the work for you
>>
>>55294815
>I'd also like to remind everyone that c is literally the backbone of almost everything- Including all of your hipster languages.
Go is written in Go (unless you are using cgo, I think)

and it just keeps improving,
>>
>>55295546
But fast to write. your time is more precious than the CPU time.
>>
>>55295571
Go is trash
>>
>>55292073
https://github.com/vurtun/nuklear

you're welcome
>>
>>55295482
>graduated to C++
you'll never get it, kys
>>
>>55295632
>kys
Are you twelve?
>>
>>55295624
also, for native looks/feels

https://github.com/andlabs/libui

you owe me money now
>>
File: 202341.png (711 KB, 739x607) Image search: [Google]
202341.png
711 KB, 739x607
>>55295638
>calling people who say "kys" 12
>being this hypocritical

I see you support feminism
>>
>>55295578
often your CPU resources are limited and you just have to be efficient

and I'd say C++ STL is not slower to write
>>
>>55295682
What?
>>
>>55295638
i actually very rarely say kys, so when i do there's some weight behind it.

C++ is a disaster not worth spending your time on

C is great
>>
File: 97b4caa1c.png (628 KB, 1162x494) Image search: [Google]
97b4caa1c.png
628 KB, 1162x494
>>55295685
>>55295578
>talking about time
>Not using APL
>>
>>55295699
It's kind-of funny how you call someone a 12 year old because he/she said "kys" over an image board; let a-lone 4chan. I highly doubt you haven't said "kys" within the past few days.

Stay mad.
>>
>>55295712
Not everyone is that insecure
>>
File: 432432.jpg (29 KB, 394x251) Image search: [Google]
432432.jpg
29 KB, 394x251
>>55295721
>Insecure

Oh yes, please tell me more.
>>
>>55295685
You are right. So I usually write kernel program with C++STL to get efficiency and print results to stdout and pipe to the program written with python to analysis the results. I don't change c++ code that much but I change python code very frequently. I love both of them.
>>
>>55295723
Tell you what? You already know how insecure you are
>>
File: 1450470108497.jpg (5 KB, 109x111) Image search: [Google]
1450470108497.jpg
5 KB, 109x111
Well I'm trying to get into InfoSec. And I hear python is good for that, so I'm learning that for now.
>>
>>55295739
i know you are but what am i
>>
>>55295739
Oh yes, please dominate me big boy.

>>55295757
Stop talking for me
>>
>>55295753
Have fun being a professional script kiddie
>>
>>55295503
this desu famalam
>>
>>55295791
My dumb ass is at least a couple years away from anything resembling a professional.

I'm working out bash first. After that I move on to python.
>>
>>55295818
Alrighty then lololo.
I'm going to laugh when you realize you won't be doing much actual programming or anything tech related.
>>
>>55295830
What would I be doing if not just that?
>>
File: r.jpg (33 KB, 512x512) Image search: [Google]
r.jpg
33 KB, 512x512
>>55295544
>>55295704
why don't you show us something ?

how do you quickly set up an APL working environment in Ubuntu ?
>>
>>55295857
GNU APL

What are you, fucking retarded?
Do you not know how to use something called a search engine?
>>
>>55295855
Using script kiddie automated tools like nmap, hydra, web crawling shit, etc.
I doubt you'd actually be able to embed polymorphic shellcode into a legitimate program.
>>
>>55295884
>continues to be retarded

whatever m80, it was you who brought up your sperg language no one heard of ...
>>
>>55295901
>calls me retarded
Look at this http://pastebin.com/2djVDiUq
Look at it, and compare it to your bullshit excuse of "efficiency"

Go back to "coding bootcamp" or whatever you retarded kiddies are doing now a-days
>>
>>55295884
>GNU APL
what's the package name ?

and there has to be a special editor to help type in the symbols, no?
>>
>>55295932
Well; you can either set up a keymap binding with your keyboard, or you can copy down the symbols onto a document and just CTRL+C & CTRL+V things.
>>
>>55292073
>he needs guis
>he doesn't manually set bits in memory to do his computations
>>
>>55295932
https://www.google.com/#q=GNU+APL

If you're unable to use Google; /g/ is way too advanced for you.
>>
>>55295898
>Using script kiddie automated tools like nmap, hydra, web crawling shit, etc.

Oh, I figured it'd be something like that. Even just looking at the sheer amount of crap on Kali gave the impression that I'd be running a billion things instead of working out a solution.

Still, I figure it's still useful to have a know-how on bash and a programming language or two. I might look at C/C++ down the line, too.
>>
>>55295989
so you have no idea how to install it and have never tried it yourself

>implying not a retard
>>
>>55291455
C stands for cemetery cause no one just old fags work with it. The new devs only use that cause they are too lazy to write new more modern and efficient system and they only want to maintain the old world's misery.
>>
>>55296007
>I Might look at C/C++
I'm not going to spoonfeed you.
If you ever even hope to be doing ANYTHING system related, you NEED to learn languages like C, Assembly, and you will need to learn functional languages too. Don't stick to newfag kiddie procedural or OO languages.
>>
File: laughing.png (353 KB, 613x495) Image search: [Google]
laughing.png
353 KB, 613x495
>>55296017
>Calls me a retard
>Assumes I've never installed it
>Assumes I've never used it/do not use it because he has difficulty finding it

I can practically smell the summer seeping from your post
>>
>>55296020
>too lazy
>to use languages that inefficiently do most of the under the hood shit for you
>>
>>55296027
What functional lang do you recommend to learn? LISP dialects? Haskell? Elixir?
>>
>>55296027
>I'm not going to spoonfeed you.

I wouldn't want you to, either.

I'll keep that in mind, mate.
>>
>>55296042
> expecting others to do any amount of work because of his retard posts
you brought up APL, sperg faggot

you clearly have no idea how to even install it you retard

enjoy being exposed as an ignorant retard on asian loli board
>>
>>55296056
Lisp is the easiest to get into without delving too deep into type / category theory.
I'm in the process of improving my Racket skills and so far it's a very comfy lisp.
>>
>>55296064
How do you think about GNU guile?
>>
File: 2016-06-27scrot.png (909 KB, 2000x375) Image search: [Google]
2016-06-27scrot.png
909 KB, 2000x375
>>55296017
You are a complete retard, I hope you know that.

You are free to leave /g/
>>
>>55296056
Scheme, Haskell, etc
>>
>>55296091
shitposters like you who have no idea what the fuck they're talking about should leave

you've been exposed m80, time to go
>>
>>55296116
You reek of summer.
Faggots like you ruin /g/ from June to September.
>>
File: 12854648.png (269 KB, 751x407) Image search: [Google]
12854648.png
269 KB, 751x407
>>55296116
>calls him a shitposter because he proved him wrong
>>
>>55291455
Do you even Lisp?
>>
>>55296143
>>55296131
> being a desperate samefagging retard

yep, a retard.
>>
File: b96a3.png (67 KB, 771x675) Image search: [Google]
b96a3.png
67 KB, 771x675
>>55296161
>calls us a samefag

As I said, summer.
Take your own advice retard
>>
>>55296161
May I remind you this site is 18+
Come back in a few more years.
>>
>>55296171
> implying that proves anything

here's why you are a fucking retard beyond doubt: >>55296063

now go cry elsewhere
>>
File: 1460260578969.jpg (7 KB, 232x217) Image search: [Google]
1460260578969.jpg
7 KB, 232x217
>>55296181
>>55296171
>>55296161
>>55296143
>>55296131
>>55296116
>>55296091
Quality thread
>>
C is for the weaks, Lisp for the neats.
>>
>>55296187
Your constant babbling bullshit reminds me of when I was an edgy 13 year old.
>>
>>55296187
>Trying this hard to act intelligently relevant
>>
File: dongding.jpg (57 KB, 492x693) Image search: [Google]
dongding.jpg
57 KB, 492x693
>>55291455

You seem like you're quite experienced in this field by making such strong claims.

May you show us some of the more significant projects you have contributed to using C? I'm sure me and my fellow posters would be very interested to learn from such a grizzled veteran!
>>
>>55296211
>still crying like a bitch

I said elsewhere, sperg king.
>>
L I S P
I
S
P
>>
>>55296238
>Underage
>This mad
>Tells people to go elsewhere

Wew you're on a roll lad.
>>
>C
>assembly for retards.
Even assembly is a stretch, since it deprives you of the most fundamental power as a programmer.
Oh well.
>>
>>55295291
/pol/ BTFO!
>>
Only fools try to do everything using one programming language, this is how we've ended up with abominations like node.
>>
>>55295435
>I figured I'll just use GTK
>In my reading I found that QT might be a bit much

Qt is much, *much* better choice for new projects than Gtk: it's easier to work with, has cleaner API, better documentation, supports more platforms and is generally more futureproof (Qt has a very active development going on right now, whereas Gtk is developed by literally 2 guys who don't even consider Gtk a general-purpose toolkit/framework and only give a fuck about Gnome).

Even Linus, a known C++ hater, has switched his Subsurface project from Gtk to Qt, because of how messy Gtk is and how unhelpful and arrogant its community is.
>>
>>55296360
Qt people actually answer questions you post on their forums.

With GTK, community will berate you for even asking the question, and even if you are friends with some of core devs, they'll just say they don't know the answer because they work on some entirely different part of GTK and don't know well how it works as a whole.

All of this from that Subsurface presentation.
>>
>>55296359
Node is okay though.
>>
File: derplo_01ur892.png (18 KB, 600x441) Image search: [Google]
derplo_01ur892.png
18 KB, 600x441
>>55296020
>C stands for cemetery cause no one just old fags work with it. The new devs only use that cause they are too lazy to write new more modern and efficient system and they only want to maintain the old world's misery.
how many "improved" languages have come and gone since C? or C++?....

trendy hot new silicon valley companies with imaginary 'products' like trendy new langauges because they both have something in common: they'll both be gone in 5 years
>>
common lisp

RACKET
A
C
K
E
T

the choice of a professional
>>
File: asshat01export_b.png (5 KB, 216x373) Image search: [Google]
asshat01export_b.png
5 KB, 216x373
>>55291814
>What if i want to learn java because the CFD suite i have can do macros in java
Java is suckage, but it is *distributed* suckage, you see.
The first half is when you write it. The second half is when users have to wait for it to run.
>>
>>55291840
>>55292512
>>55296056
>>55296064
>>55296081
>>55296149
>>55296194
>>55296242
>>55296430
Read about the history of (((LISP))) and AI. LISP "research" received billions of dollars in grants. The "AI winter" was just goyim being fed up with it.
>>
>>55291471
/thread
>>
File: average.jpg (55 KB, 320x424) Image search: [Google]
average.jpg
55 KB, 320x424
>>55291455


>look mom, I'm so L33T:
>I need 20 times as much code
>it's difficult to read
>it can't manage it's memory
>it's unsafe

Are you serious?

Here is a simple time server.

Ruby version:
require 'socket'

server = TCPServer.new 2000
loop do
Thread.start(server.accept) do |client|
client.puts "Hello !"
client.puts "Time is #{Time.now}"
client.close
end
end


C version:
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <time.h>

int main(int argc, char *argv[])
{
int listenfd = 0, connfd = 0;
struct sockaddr_in serv_addr;

char sendBuff[1025];
time_t ticks;

listenfd = socket(AF_INET, SOCK_STREAM, 0);
memset(&serv_addr, '0', sizeof(serv_addr));
memset(sendBuff, '0', sizeof(sendBuff));

serv_addr.sin_family = AF_INET;
serv_addr.sin_addr.s_addr = htonl(INADDR_ANY);
serv_addr.sin_port = htons(5000);

bind(listenfd, (struct sockaddr*)&serv_addr, sizeof(serv_addr));

listen(listenfd, 10);

while(1)
{
connfd = accept(listenfd, (struct sockaddr*)NULL, NULL);

ticks = time(NULL);
snprintf(sendBuff, sizeof(sendBuff), "%.24s\r\n", ctime(&ticks));
write(connfd, sendBuff, strlen(sendBuff));

close(connfd);
sleep(1);
}
}



Now translate this into devellopment time and translate the time into money.

It would be madness to use C for tasks where you are not 100% sure you need high optimized computing.


That said, C will always have it's place. But it's not the "Be all end all" langauge.
>>
>>55296613

>#rekt
>>
>>55296613
Node.js is even more readable here - no need for threads.

var net = require('net')

net.createServer(s => s.end(`Time is ${new Date}\n`)).listen(2000)
>>
>>55291455
C is so simple a retard could understand it. You probably aren't able to figure out any frameworks so you think you have to make everything yourself you cockgobbler.
>>
When will C add lambdas?
>>
>>55296875
In C++11.
>>
>>55291455
I need this for linux terminal
>>
File: laughing army man.webm (293 KB, 200x150) Image search: [Google]
laughing army man.webm
293 KB, 200x150
>>55296007
>he fell for the "I'm gonna """""study""""" """""Cyber Security""""" :^D meme
>>
>>55296492
>The "AI winter" was just goyim being fed up with it
I need a source.
>>
>>55291455
AXP assembly master race repotting in.
>>
>>55295960
>copying and pasting every symbol
That seems so much faster than using other languages, thanks for making sure we all make good use of our time.
>>
>>55296081
Way slower than Chez scheme, can't go back and edit lines above current line, doesn't show you which parentheses match when you type them, doesn't exhibit standard behavior in evaluation model.
>>
>>55296838

Well, the threads are only there, so more than one person can connect at the same time..

If you only expect one user you could write it like this:

require 'socket'

server = TCPServer.new 2000
loop do
client = server.accept
client.puts "Time is #{Time.now}, faggot."
client.close
end
>>
>>55296360
>*much* better choice for new projects than Gtk
unless you want C
>because of how messy Gtk is
please, you're just spewing memes; the developers of subsurface didn't know Gtk; some of them knew Qt; of course they got better results with Qt
>>
>>55297554

>Well, the threads are only there, so more than one person can connect at the same time..

So actually the Ruby version was even more advanced than the C version here: >>55296613

With C you would need to add a "fork()", so the listener is free again.
>>
>>55296613
>Thread.start
bwahahahaha
>>
>>55297605
They didn't know neither GTK nor Qt. They were able to do in matter of months using Qt, with help of community and good documentation, what they couldn't for years with GTK.
>>
>>55295539
If I build a program, it's because I want to automate something that's iterating billions/trillions of times. Going from C to Python just turned that 1-hour task into a 5-hour task.
>>
>>55296840
>a retard could understand it
>I don't use C, too hard for me tho
>>
>>55296613
>not checking return value on socket()
>not checking return value on bind()
>making me agree with you
>>
>>55297618

See:
>>55297615
>>
>>55297624
Meant for
>>55295578
>>
>>55296875
they're useless
>>
>>55297619
>didn't know neither GTK nor Qt
>waaaah, Gtk is shit because we don't know Gtk
nice argument
>>
File: 1466329334062.jpg (24 KB, 258x263) Image search: [Google]
1466329334062.jpg
24 KB, 258x263
>>55297643
>>
>>55297636
>Thread.start
>advanced
>2016
bwahahahhahaha
>>
>>55297650
It is.

They knew neither of these frameworks, and were able to achieve greater results spending less time on one of them - that's clearly an argument in favor it being superior to the other.
>>
>>55297660
>weaaboo shit
>doesn't know what he's talking about
you don't say :^)
>>
>>55291455
ewe
>>
>>55291814
I want to hug tomoko really badly, why can't she be real?
>>
>>55297619
>didn't know neither GTK nor Qt
Why do you need to lie on the internet? The developers of subsurface didn't know Gtk. 2 more KDE developers joined the team and suggested switching to Qt. How the fuck can you claim that at that point, the development team didn't know neither Gtk nor Qt? 2 of them obviously knew Qt!
>>55297669
Stop lying.
>>
>>55297485
>In 1973, in response to the criticism of James Lighthill and ongoing pressure from congress, the U.S. and British Governments stopped funding undirected research into artificial intelligence. Seven years later, a visionary initiative by the Japanese Government inspired governments and industry to provide AI with billions of dollars, but by the late 80s the investors became disillusioned and withdrew funding again.
https://en.wikipedia.org/wiki/History_of_artificial_intelligence

>AI researcher Hans Moravec blamed the crisis on the unrealistic predictions of his colleagues: "Many researchers were caught up in a web of increasing exaggeration. Their initial promises to DARPA had been much too optimistic. Of course, what they delivered stopped considerably short of that. But they felt they couldn't in their next proposal promise less than in the first one, so they promised more."[20] The result, Moravec claims, is that some of the staff at DARPA had lost patience with AI research. "It was literally phrased at DARPA that 'some of these people were going to be taught a lesson [by] having their two-million-dollar-a-year contracts cut to almost nothing!'" Moravec told Daniel Crevier.[21]
https://en.wikipedia.org/wiki/AI_winter
>>
>>55297749
I'm getting my information from this presentation by the original dev:

https://www.youtube.com/watch?v=ON0A1dsQOV0
>>
>>55297661

What at you getting at?
Are you boasting because the node.js design?
I never said Node.js is bad..

You see, Ruby is based on C, so the threads are actually quite complex pieces of C code:

>http://rxr.whitequark.org/mri/source/thread.c
>>
>>55297770
>I don't know what actually happened but I'm on the shit-on-Gtk bandwagon
The shut the fuck up. There's plenty of other reasons why Gtk is shit, but not being capable of doing the same stuff you do with Qt is not one of them. Stop being an ignorant cunt and at least take a look at the documentation to see what Gtk is capable of doing before repeating mindless drivel.
>>
>>55297780
>Ruby is based on C
everything is based on C, m8, that's why C is better than all of them
>>
But what bout my functional programming?
>>
>>55297810
Neither the presenter nor I are claiming that you can't do those things. Of course you can. You know that you can because there are programs written in GTK that do those things.

The important thing is how much effort it takes, how much understanding it requires, how difficult it is to receive help from community. And Qt is miles ahead of GTK in all of those categories.

I suggest you watching the presentation. He explains in detail how they arrived at a point where no one on the team couldn't deal with GTK based UI anymore.
>>
>>55297818
C is not remotely original
>>
>>55297818
Good things aren't.

CS books from the early 80s don't even mention C.
>>
>>55297854
>how much effort it takes
>how much understanding it requires
It requires knowing the library, just like in the case of Qt. But you seem to be too retarded to understand simple logic.
>>
>>55297857
irrelevant
>>55297857
>Good things
>obsolete trash from the early 80s
bwahahahahahaha
>>
>>55297818

And C is based on Assembly.
And Assembly is based on machine code.
So why is not everybody using machine code?


You see, when C was develloped cmoputers were ridicullously slow and memory was expensive. Things have changed a lot since then.

The creater of Ruby once put it like this:

>"I want to solve problems I meet in the daily life by using computers, so I need to write programs. By using Ruby, I want to concentrate the things I do, not the magical rules of the language, like starting with public void something something something to say, 'print hello world.' I just want to say, 'print this!' (...) Computers don't mind if I must make effort to communicate with them or if it is easy to communicate with them. They don't care if I put the numbers of instruction byte sequences in a file and feed it to them to run, or if a very high level language generated the instructions. The computers don't care. We humans care about the effort we pay. Often people, especially computer engineers, focus on the machines. They think, "By doing this, the machine will run faster. By doing this, the machine will run more effectively. By doing this, the machine will something something something." They are focusing on machines. But in fact we need to focus on humans, on how humans care about doing programming or operating the application of the machines. We are the masters. They are the slaves."
>>
>>55297755
I can't find that LISP is the direct reason that investors withdraw on that source. AI winter was basically caused by the lack of computer power to realize researcher's idea.
>>
>>55291455
There are no real programming languages only various models of computation and various models equivalent to or similar to a Turing machine.
>>
>>55297923
Listen to this:

https://youtu.be/ON0A1dsQOV0?t=6m52s

>utterly impossible to go with a concrete question saying your documentation states this is what it should do, if I write exactly this code, it doesn't work, this is what it does, how do I get to what it does?
>there is no way to get an answer to this. The only thing you can get is abuse.

It does require knowing the library, but obtaining this knowledge is magnitudes more difficult that that is for Qt.
I am once again writing what I already wrote - that GTK is not less functional but instead much more difficult to become proficient in, and you keep ignoring the argument I make and respond to me as if I was stating GTK is less functional than Qt.

I implore you to write a well thought out answer because I don't think I want to write another post trying to make you understand my argument.
>>
>>55297973

That's like saying:
"There's no differnce between building a house with your bare hands or using tools."

Of course the result (a working programm) is the same. But one the one hand the process is completely differnt. On the other hand, the way you STRUCTURE programms is very important.

You could say two programms can do the same thing but the entropy in one of them is much higher than in the other. Which is not trivial in an information processing context.
>>
>>55297605
> unless you want C
Picking C for any non-trivial GUI project in $current_year is excentric to say the least. Picking C *and* sacrificing good documentation, multi-platform support, and clean API is plain retarded. The only reason people were using Gtk at all in the past were licensing issues with Qt. Now that Qt is LGPL people are jumping this sinking ship and I hope to see it dead soon (and fucking Gnome with it).

>please, you're just spewing memes
No. Gtk consists of layers upon layers upon layers of dirty and poorly (if at all) documented hacks thrown together with nothing but Gnome core in mind. Qt consists of a well thought out API designed by Trolltech/Nokia with paying customers on multiple platforms in mind.

>the developers of subsurface didn't know Gtk
The developers of Subsurface were Linus fucking Torvalds and Dirk fucking Hohndel. If those two guys couldn't figure things out by reading the (nonexistant, as it turned out) documentation and the (shitty, as it turned out) code, I don't know who could. They even asked Hohndel's friend from Intel, who AFAIR was one of Gnome core developers for help and he had no clue either. So they asked the "community" and were told to fuck off.

>some of them knew Qt; of course they got better results with Qt
They didn't know either. They started in Gtk because of Torvald's C fetish, until they decided investing tremendous amout of time and effort to port to C++/Qt was worth not dealing with the frustrations of Gtk and its devs anymore.
>>
>>55298018
No, what I was getting at is this:
"The job calls for the proper tools".
While OP says shit like this:
"The tool defines the job."
Obviously the first one is better and by knowing that all is equivalent you use a language, make/use a DSL which suites your needs.
>>
>>55298146

OK, if you put it like this..
>>
>>55298371
What I really wanted to say, but decided against it was something like any language, processor or whatever is just a tangible implementation of a theoretical computer. It has an abstract, theoretical model which doesn't contain jack shit about the circuits or physics.
You choose it or construct it according to what you want to do.

However, what I wrote up there is more practical, simple with the tools/job analogy.
>>
File: bank.png (44 KB, 480x320) Image search: [Google]
bank.png
44 KB, 480x320
>not being a forthfag
muh stack
>>
C - Baroque
C#/Java - Pop
C++ - Classical
Python/Ruby - Electronica
JavaScript - Jazz
Go - Indie Pop

Prove me wrong
>>
>>55297944
>So why is not everybody using machine code
because C is superior
>>
>>55297994
it's simple: qt was easier because they had qt developers on the team; gtk is just as easy if you have gtk developers on the team
>>
>>55291455
>>55292882
>>55295632
I want leafy cancer to leave
>>
>>55298107
>They didn't know either
Lies. The other 2 developers that joined the team were qt/KDE developers.
>>
>>55299169
>JavaScript - Jazz
you literally could not be more wrong if you tried
>>
>>55291455
The only real language is a dead one.
Kinda sad don't you think ?
>>
>>55294872
...and Austin, Houston and California
>>
C++/Python mustard rice
>>
>>55291455
Lots of those languages are write in c. Thus anytime I use them I am in fact writing c. Just in a more streamlined short hand form. Much like writing scripts to automate and run repetitive tasks.
>>
>>55300094
JavaScript lacks rules most other languages have just as Jazz does. Back in early 1900s when ragtime and stride were a thing, "ragging" - a form of dancing to that genre was illegal in many states; people preached against the music as 'the devil's music's and the syncopation was said to 'mess with your brain'

Like JavaScript, in Jazz you have the freedom to do many various techniques that aren't seen in many other genres, such as frequent key changes, in JavaScript there's no real objects, arrays don't have to contain one data type, variable types can be changed.
>>
>>55291555
>compares algol to js ruby and swift
pajeet detected
>>
>>55300810
what does "use strict" make it, then?
>>
File: 1466128555436.gif (2 MB, 245x187) Image search: [Google]
1466128555436.gif
2 MB, 245x187
>>55297944
C is portable assembly.

I hate it when people say that we can just throw cycles and memory at a problem. Imagine how blazingly fast our modern computer experiences would be if people actually tried to be cycle and memory efficient still. Instead you get languages like Ruby where any drooler can program without understanding anything about the nature of computation and why their program runs at O(n^2) complexity rather than O(nlogn).

High level dynamically typed languages are shit-tier.
>>
>>55301497
>C is portable assembly
Nope, opinion discarded.
>>
>>55300073
> Lies. The other 2 developers that joined the team were qt/KDE developers.
Joined != started. Also, they did try to stick with Gtk (because you don't spend six fucking months on a port or convice Torvalds to go C++ without really good reason) so they asked a Gnome dev for help but even him couldn't make sense of fucking Gtk and its misleading documentation.
>>
>>55295973
>He doesn't use punch cards
>>
>>55302300
>Joined != started
yes, a gtk-based project was not started by qt developers; are you actually retarded or just pretending?
>>
>>55302430
Moments ago you claimed this:
> They didn't know either. They started in Gtk
were lies. Are you actually retarded or just pretending?
>>
>>55301683
Have you ever written assembly?
Have you ever written a compiler?
Have you ever studied the output of a compiler?

The answer to all of these is clearly no.
>>
>>55297702
Body pillow, Anon.
>>
>>55291455
You could start by rewriting 4chan with C.
>>
>Lisp
>Pajeet/SJW
It may not have a practical purpose in the job market, but it at least makes you a wizard
>>
>>55291455
Posting in a good thread. Add Java and Go too. I like C++ though.
>>
>>55302540
not that guy, but
>Have you ever written assembly?
yes

>Have you ever written a compiler?
about 60% of one

>Have you ever studied the output of a compiler?
yes

While C bears a lot of resemblance to macro assembly, it is on a much higher level than assembly. Generally assembly is farily 1:1 with the machine code, C is often very different.
>>
File: 1464063060780.png (463 KB, 785x678) Image search: [Google]
1464063060780.png
463 KB, 785x678
>>55291971
>>
>>55291455
The C in "C" stands for cuck.
>>
>>55302540
You're not entitled to opinions, as we've previously established.
>>
>>55304059
no, it stands for c. It's one of those funky recursive acronyms.
>>
>>55304004
I disagree. Almost any single operation in C corresponds to a single assembly operation. For instance:

a=b+c;

is a one liner in C, while it's (generic) assembly counterpart would be something like

MOV R1, b
CLC
ADD R1, c
MOV a, R1


a 4 liner.

At first glance they look very different, but the only operation not explicitly stated in C is the Clear Carry (CLC) instruction because its not portable; everything else else has a one-to-one correspondence to

MOV R1,b <=> b // Access b
ADD R1,c <=> c, and at the same time c+b // Access c, and add
MOV a, R1 <=> a = something // Assignment

Targeting any other architecture will give you similar results.

Maybe I have a liberal interpretation of one-to-oneness, and granted optimization can completely change how code looks in assembly, but in general I argue that C IS portable assembly.
>>
>>55292404
Not found
>>
>>55304648
>I disagree. Almost any single operation in C corresponds to a single assembly operation
int tmp = a;
a = b;
b = tmp;


would turn into

xchg eax, ecx


C does optimization which means that 1:1 correspondence is often not maintained. Optimization can do a lot of weird stuff.
>>
>>55304648
>>55305110
Another example: http://lemire.me/blog/2016/05/23/the-surprising-cleverness-of-modern-compilers/

The correspondence between C and assembler languages does not stand anymore. Standard C considers an abstract machine for which such optimizations are irrelevant. These are up to the compiler, which makes standard C more of a high-level language than a portable assembler.
>>
>>55305556
>>55305110
I acknowledged optimization could fiddle with output in >>55304648. Turn off optimization and you'll see my point clear as day.

> Standard C considers an abstract machine for which such optimizations are irrelevant.
I have no clue what you are trying to say here. Yes, many compilers have an intermediate, machine-independent representation before assembly on which optimization is done, but once things get shipped off to the assembler further optimization can be done to take advantage of machine specific features like MMX. Then it runs on metal; there is absolutely no virtual machine.

All of this is outside the scope of the language though. The standard specifies the phases of compilation, but goes on to say compiler devs are free to implement a compiler any way they want so long as the results at the end of the day agree with the standard.
>>
>>55296027
>you NEED to learn languages like C, Assembly, and you will need to learn functional languages too.
""""Functional"""" languages were a mistake. They didn't care about speed or actual correctness, just "theoretical" correctness. Some of these languages "compiled" to Lisp. Those """"functional"""" languages and interpreted languages couldn't be used to write their own libraries, so they used C.

This is why people today think there has to be a "level" of C under everything they use. This influenced scripting languages like Perl/Python/Ruby too, but it was the Lispers who pushed the idea that "scripting" (what we call it today) and dynamic typing were suitable for large scale development.

>Don't stick to newfag kiddie procedural or OO languages.
Right, but they should stick to oldfag languages. Oldfag procedural or OO languages are better because they didn't need a separate "lower level" language like Java and Haskell do.
Thread replies: 201
Thread images: 25

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

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.