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


Thread archived.
You cannot reply anymore.



File: 1528880896744.jpg (589 KB, 600x765)
589 KB
589 KB JPG
What are you working on, /g/?

Last thread: >>71389415
>>
File: satania-door.png (828 KB, 1114x1214)
828 KB
828 KB PNG
>>71397321
Get that gay itoddler shit out of here.
>>
File: logo-slim.png (72 KB, 501x261)
72 KB
72 KB PNG
Odin is #1
>>
>>71397321
Cute compiler
>>
So when dealing with OpenGL and shaders I see people usually have a struct holding the unfirom locations, how does it work once you scale up to like dozens or hundreds of various shaders that require different inputs and such? Do you just have a giant ass struct with every possible attribute for every shader or is there a cleaner solution?
>>
>>71397330

So is this a bot? Or does someone dedicate their whole life to posting "itoddler" every time their hated manufacturer is mentioned?
>>
File: ss.png (1.16 MB, 1920x1080)
1.16 MB
1.16 MB PNG
>>71397321
On my little wayland terminal emulator.

https://github.com/ii8/havoc
>>
File: 1555267285976.jpg (1.15 MB, 1920x1080)
1.15 MB
1.15 MB JPG
may this thread be comfy
>>
>>71397364
You only bind what's needed per shader?
>>
File: file.png (23 KB, 706x605)
23 KB
23 KB PNG
>>71397403
>all those magic numbers all over the place
oh the horror
>>
>>71397418
I understand, it's just weird having to pass a struct around that has all the locations stored so that you can pick up whatever you need. I dunno, I just think it's kinda ugly-ish but I guess maybe I'm just being autistic about it.
>>
File: 1530921494725.jpg (70 KB, 1024x680)
70 KB
70 KB JPG
>>71397399
I don't think it's a bot but that person probably looks similar to this.
>>
>>71397433
Just take a look at how UE4 does it.
>>
File: satania-laughs.gif (376 KB, 500x491)
376 KB
376 KB GIF
>>71397399
t. seething itoddler
>>
That's on emacs lisp style dynamics scope and scala implicits?
>>
>>71397399
it's a biobot
>>
>>71397330
>>71397465
based
>>
>>71397475
This made me exhale air unexpectedly.
>>
>>71397476
https://vocaroo.com/i/s0DBKcPYMJTK
>>
>>71397510
>look mom i posted it again
>>
>>71397510
cringe and bluepilled
>>
>>71397514
>>71397519
he has a point and you know it.
>>
>>71397526
If you're getting an autistic meltdown out over internet slang, to the point where you record yourself literally yelling for over a minute, you're clearly retarded for going to 4chan, the most immature place on the entire internet.
>>
>>71397526
cringe
>>
>>71397544
based

>>71397541
based boomer

>>71397526
cringe
>>
>>71397562
based zoomer
>>
>>71397562
partake in intercourse
>>
File: ferris98.png (616 KB, 667x598)
616 KB
616 KB PNG
Why aren't you writing standards compliant C89 that doesn't get in the way of your programming habits by adding
#define frame
to your code and being able to pop a new code block anytime you want using a frame { } block and also being able to declare variables in the middle of a function without the collective ghosts of the ANSI C committee throwing a fit?
>>
>>71397572
based and redpilled

>>71397578
cringe and onionpilled
>>
>>71397579
I have another way to get around the ANSI C committee.
>>
>>71397579
Because I'm not retarded enough to hold myself back by using C89 in 2019.
>>
>>71397403
if (gliph[i] == 0x0) {
// ....
}
>>
I'm a low IQ retard who's (barely) learning Java at a shitty college
What language should I learn to mindlessly write code and get a shitty wage
>>
>>71397411
it seemed fine until the memeing 12 year olds showed up
>>
>>71397616
If you didn't want 12 year olds, then why did you post literal cartoons in OP? Seems kind of counterintuitive.
>>
>>71397472
only so you can actively avoid using any of them
>>
some gentle reminders:
- Vim is better than Emacs (more like Efags tbqh)
- If you can't program whatever you need in C, you're a literal brainlet

thank you for your time
>>
>>71397609
fine. I'll change it to hex, just for you.
But I wont change glyph to gliph.
>>
>>71397647
I'm not the OP, just fuck off of this thread with your /v/ shitposting.
>>
guys, do you also get Maximum Recursion Depth Python error in recursive sorting algorithm, with input bigger than 1000? array of 998 elements exactly is limit in my case
Here is code

def heapSort(lst,t):
if len(lst)==1:
t.append(lst[0])
return
t.append(lst[0])
del lst[0]
for k in range(len(lst)-1,-1,-1):
heapify(lst, len(lst),k)
heapSort(lst,t)
def heapify(lst, n,i):
largest=i
l=2*largest+1
r=2*largest+2
if l<n and lst[i]<lst[l]:
largest=l
if r<n and lst[largest]<lst[r]:
largest=r
if largest!= i:
lst[i], lst[largest] = lst[largest], lst[i]
heapify(lst,n,largest)


>>
>>71397690
__import__('sys').setrecursionlimit(99999)
>>
File: 180433298.png (297 KB, 470x481)
297 KB
297 KB PNG
WHY DO I HAVE TO UPDATE VISUAL STUDIO BEFORE I UNINSTALL IT
>>
Why is python such an ugly language? Why do people use it? I don't get it, really, what am I missing?
>>
>>71397721
That's just to update the telemetry scripts to send data to Microsoft. Nothing to worry about.
>>
File: 1306913541634.jpg (12 KB, 185x301)
12 KB
12 KB JPG
My program has a logic problem
https://pastebin.com/TWQh31sc
It's skipping a series of if loops after line 43 and going straight to the else loop.
I suspect that I'm not initializing the variables correctly but I don't know how to initialize them in such way that it won't execute said else loop.
>>
>>71397736
Set the Status to be 'Y' or 'y', and post what happens.
>>
>>71397732
NOOOOOOOOOOOOOOOOOOOOOOO I JUST WANT TO DELIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIID
>>
>>71397736
scanf("%c") won't consume the trailing newline from when you hit enter, so the next call to scanf will receive '\n'. try changing the next one to scanf(" %c") with a leading space.
>>
>>71397721
you mean update the installer?
>>
>>71397811
IT DOESNT FUCKING MATTER
IF I WANT TO UNINSTALL SOMETHING I SHOULDNT HAVE TO WAIT FOR AN UPDATE
>>
File: guidosicp.png (100 KB, 601x623)
100 KB
100 KB PNG
>>71397724
python is the "it just werk" of the programming languages.
>>
>>71397756
How do I type that? I thought the loop criteria I had was properly typed
>>71397797
Ah, this happen to me before, I added a space to all the scanf lines and now the program is working better
Thanks
>>
>>71397823
what if the uninstaller was broken?
>>
>>71397860
WHY WOULD THE UNINSTALLER BE BROKEN
DEVELOPERS SHOULD MAKE SURE NOT TO RELEASE BROKEN SHIT
>>
>>71397690
>>71397714
yes, but it doesnt solve problem. I think it catches stack overflow around 5000-th element of 10000, and numbers after this point comes out unsorted. At least it was easy to change heapSort to iterative, now it sorts 10000 long arrays no problem

>>71397724
worse, it has no "tail-call optimisation" so you can throw all your recursive algorithms into trash basically! https://stackoverflow.com/questions/3323001/what-is-the-maximum-recursion-depth-in-python-and-how-to-increase-it

Shame, because i like syntax actually, and expressiveness
>>
>>71397721
Did you know it's not actually possible to uninstall visual studio without formatting your hard disk?
>>
File: B3.png (696 KB, 679x704)
696 KB
696 KB PNG
>>71397898
thats bullshit but i believe it
>>
Did anybody here jumped the wagon on the OpenCV official courses? I'm almost biting the complete package but I'm afraid that it'll sucks and it costs a lot.
>>
>>71397913
I want to fuck banira
>>
>>71397943
they will walk you through calling a few functions in the library API because they're desperate for money.
>>
how tf do i get a 64-bit version of gcc on windows? mingw only seems to support x86
>>
File: hqdefault.jpg (24 KB, 480x360)
24 KB
24 KB JPG
>>71397949
>>
>>71398007
why did you make this??
>>
>>71398001
https://mingw-w64.org/doku.php
>>
>>71398007
>editing out your timezone
really now
>>
>>71398001
false, you can do 64 bit with mingw, i've done it in the past
>>
>>71397463
probably some fucking hell of macros or reading the actual shader and then having an interface that can take anything but throws an error if the shader doesn't support it... you know, actual cancer
>>
>>71398028
what else have you done in the past?
>>
>>71397997
This is what I fear but there's little [spoiler]good[/spoiler] content available about computer vision.
>>
>>71397943
Free courses exist. and will you get a certificate or diploma after you finish it?
>>
>>71398041
There's a lot of free courses, but good free courses? I doubt.
>>
>>71398020
i tried that but it seems completely different from banira mingw, like theres no "package manager" or anything
>>71398028
care to share with the class?
>>
>>71398055
>64-bit version of gcc
>64
but why?
>>
>>71398071
well i figured since i spent all that money on a 64 bit processor i should use a compiler to match
is there no performance difference at all?
>>
>>71397321
Writing a Lisp interpreter. Here's a screenshot of my code so far (the code itself is too long to fit in one post).
>>
>>71398086
>is there no performance difference at all?
I don't know. I don't even program.
>>
>>71398099
>casting malloc
epic
>>
>>71398086
to clarify, my understanding is that 32-bit compilers produce 32-bit binaries, and 64-bit compilers produce 64-bit binaries. is this correct? or is there just some flag you pass to g++ to get it to compile for whatever arch you want
>>
>>71398054
its hard to find good free courses, but information is free out there. you have to dig and use time.

either you are pay time + work or money.
>>
>>71398170
All courses are free.
>>
>>71397880
>DEVELOPERS SHOULD MAKE SURE NOT TO RELEASE BROKEN SHIT
ok but when do they? plus it's just a job dude
>>
Python is beautiful.
>>
>>71398208
if developers dont release broken shit then the installer should be broken and i shouldnt have to update it to uninstall visual studio
>>
>>71397880
>DEVELOPERS SHOULD MAKE SURE NOT TO RELEASE BROKEN SHIT
I can only imagine what you would be like in corporate america after realizing even big vendor names make mistakes all the time which is why being first is never the wise decision.
>>
>>71398224
the installer shouldn't* be broken
>>
File: fun graveyard.jpg (172 KB, 1280x960)
172 KB
172 KB JPG
Should I do Ruby or Python?

I know some Java and Javascript. I want to get into a database language to do web development. I have done neither language. I have a friend who wants to work with me. He has done some Python but not much.
>>
>>71398239
that doesnt make it alright
>>
>>71398257
why don't you tell them that you're gonna work for them and there are gonna be 0 bugs?
>>
>>71398246
I prefer Ruby. It's just more elegant, and doesn't have as large a crowd of brainlet users as Python.
>>
>>71398263
they'd rather hire pajeets for 20% of the cost and 30x the bugs/delays/lack of features
>>
File: 81VStYnDGrL.jpg (322 KB, 1399x2131)
322 KB
322 KB JPG
Reminder the time an open source loonix dev released an installed that deleted your /usr folder. kek
>>
>>71398263
bugs happen, but bugs that make the user's product unusable are unacceptable
>>
>>71398279
haskell compiler (GHC) had a bug at one point that if your source code contains an error it deletes the file
>>
>>71398294
>but bugs that make the user's product unusable are unacceptable
>having to install an update means the product is unusable
Honestly at this point just neck yourself you annoying cunt.
>>
>>71397321
why are the leetcode so hard? do any of you else struggle with interview questions?
>>
>>71398307
i was saying that i shouldnt have to update the installer to uninstall product, and some anon said that the installer could be broken, and i replied that the installer shouldnt be so broken that i was unable to use it correctly
>>
File: 834rg2uraxt21.jpg (38 KB, 960x720)
38 KB
38 KB JPG
>>71398307
>>having to install an update means the product is unusable
>>
>>71398342
Safety features like this shouldn't exist. I'd rather see the paranoid people who don't like updates die to whatever bug they found.
>>
File: diiiiiiiiiii.png (137 KB, 1615x869)
137 KB
137 KB PNG
>>71398342
One of these things is not like the other~
>>
>>71398278
Thanks for the feedback!
>>
>>71398371
>//a A a A
>a is the same as A
what is this from?
>>
>>71398130
bump
>>
>>71398130
-march
>>
>>71398418
I think its <no shift> <shift> <alt> <alt+shift> or something similar.

xmodmap -pke
>>
File: 2900_538.png (27 KB, 128x128)
27 KB
27 KB PNG
Can anyone help me out? I'm trying to work on my research thesis/ongoing personal project in the field of AI/ML but I'm running into some issues acquiring data, specifically images. I'm going to have to label everything myself and I've come to terms with that but where can I datamine ~100k+ images of specific objects?
>>
File: Capture.png (2 KB, 503x18)
2 KB
2 KB PNG
>>71398442
i tried
>>
>>71398610
How much are you willing to pay me?
>>
>>71398610
Some autists hentai collection that is tagged meticulously
>>
>>71398623
Unfortunately you must not have read what I've written, otherwise you would know I'm a poor grad student.
>>
>>71398614
oh, you meant 32 to 64. I don't think that works, get a 64-bit compiler or a cross compiler if your machine is 32.
>>
>>71398649
my machine is 64 bit and i just want a 64-bit version of mingw and mingw-w64 sucks ass
>>
>>71398638
I'm looking for pictures relating to guns, combatants, drones, etc for defensive systems.
>>
>>71398642
Then you are not only poor, but stupid. Data is not free.
>>
>>71398677
Sure it is, that's why I'm asking where I can scrape it from.
>>
>>71398662
everything on windows sucks, try clang or the MS one.
>>
>>71398672
Why don't you ask the military?
>>
>>71398696
>"Hello sirs, I would like to have all of your images from the last 15 years of war, thanks"
>>
>>71398722
>"I would like a few TB tagged, verified, and given back to me in a few weeks. Thanks."
>>
>>71397321
>install eclipse
>white on white text
>fucking gradient menu bar
>fucking gradient.
what in fucks name is this cancer and can someone please just tell me what to install that will let me simply open up a shit ton of text and search for variables
>>
>>71397887
It's not that hard to change recursive functions into a pop and push stack
>>
>>71398800
Vim.
Or emacs if you're a little bitch.
>>
>>71397579
There is literally no legitimate reason to restrict yourself to C89.
Even when you see most "real" users of C89, it's a complete fucking sham and they are using C99 features as extensions.
>>
>>71398246
Neither Ruby not python are "database languages"
>>
What's /dpt/'s opinion on asciicircum vs. octothorpes for use in syntax?
>>
File: 1560308184287.jpg (91 KB, 850x721)
91 KB
91 KB JPG
>>71399121
You don't care about the answer; you just wanted to post "asciicircum" and "octothorpe".
>>
File: 1468380687802.png (1.95 MB, 1154x1172)
1.95 MB
1.95 MB PNG
>>71398461
I think it works! https://pastebin.com/mXtF5z2x
>>
>>71397321
Working through K&R, and I suddenly realized that I will never be a good programmer. Here's my code:
https://pastebin.com/tJ6hUP0q

Here's some random chink:
https://github.com/ccpalettes/the-c-programming-language-second-edition-solutions/blob/master/Chapter1/Exercise%201-18/lines.c

I should just quit.
>>
File: 1492485605134.gif (17 KB, 306x500)
17 KB
17 KB GIF
>>71399141
So. I happen to think asciicircum are aesthetic as fuck and highly underused.
>>
>>71398800
Use Intellij
>>
>>71399163
On top of that I can't figure out how to use any IDE, all I want to do is incrementally build C code using a debugger like I do with Java, but I can't find a single obvious-to-use C IDE/Debugger.
>>
>>71399163
The chink isn't removing trailing spaces and tabs.
>>
>>71399163
>https://pastebin.com/tJ6hUP0q
Nice bait to have me look at your code. It is good that you are understanding what you are writing. Comparing yourself to a random chink is never a good idea, he probably copied it from someone on qq anyways.
>>
>>71399163
Everybody is complete garbage when they start. There is nothing to say that chink wasn't already an experienced programmer before he wrote that.

>>71399214
It's actually extremely uncommon for C programmers to use an IDE, at least the ones I know. These are all people writing software for Linux, including the kernel itself, though.

Maybe it's more common with wintards.
>>
File: 1530526495509.jpg (17 KB, 450x289)
17 KB
17 KB JPG
>>71399256
>tfw I love IDEs but I also love the simplicity of a folder and a Makefile
>>
>>71399268
Meson is the new hotness in build systems for open-source Linux userspace software.
>>
>>71398246
Python > Ruby
but neither are 'database languages'. Both can run backends, but anything can run backends.
>>
>>71399288
But I like
make
>>
>>71398030
>reading the actual shader and then having an interface that can take anything but throws an error if the shader doesn't support it... you know, actual cancer
funny how you posted the answer to your question but then called it cancer
>>
>>71399328
It just becomes ninja now.
make is fine for extremely simple shit, but it's actually really fucking slow for large projects, especially poorly written build systems (recursive make), which most end up spiralling into.

make is slow because literally every command is started in a new shell, which has an insane amount of overhead. ninja knows all of its dependencies and what it needs to do up-front, and just gets on with it.
You'd be surprised what a difference it makes.

But the real reason to use meson is all of the handy shit you get for free.
Run
meson configure -Db_sanitize=address
and you get ASan.
Run
meson configure -Db_lto=true
and you get link-time optimization.
Simply have ccache installed at configure time, and it'll use it.
You don't have to spend all of this effort plumbing that shit into your build system yourself, making it way more complicated.
>>
In Java NIO, what does the "N" stand for? I figured that the IO stands for Input and Output, but I can't figure out the N.
>>
File: 1557112235908.png (627 KB, 909x858)
627 KB
627 KB PNG
>>71399384
>ninja
>mfw
>>
>>71399233
His code doesn't work lol?

>>71399480
N stands for New, though it may as well stand for nigger given it's java.
>>
File: 1474956631028.gif (2 MB, 289x333)
2 MB
2 MB GIF
>>71399480
Network
>>
>>71399480
"No"
>>
>>71399480
non blocking
>>
File: 1527406626634.jpg (96 KB, 546x613)
96 KB
96 KB JPG
I need program ideas that are good not some useless fizzbuzz shit. Please and thank you.
>>
>>71399988
Fizzbizz, but do it in reverse.
>>
>>71399988
>>71399996
Fuzzbizz
>>
File: programming challenges4.png (1.61 MB, 3840x2160)
1.61 MB
1.61 MB PNG
>>71399988
>>
>>71400037
Stop posting those awful images.
>>
>>71400037
>>71400045
I agree that roll images are shit but what bothers me is that it's not even a roll image and people still roll. There's no 0 and more than 100 items.
>>
>>71399988
Write a regex engine, maybe with only literals, +, *, and groups
>>
>>71400037
I with this list was ordered from easiest to hardest so you could go through them all one by one.
>>
>>71399988
Automate something you have to do frequently. Get bonus points if it's something you get paid to do.
>>
>>71400037
Those are all beat to death I need something new and creative
>>
In C#, what's the difference between String.Format("") and $"" ?
>>
>>71400129
practically no difference, String.Format is the old way while string interpolation ($"") was added later and nowadays is the preferable option
>>
is it okay to program if I don't necessarily like people of color?
>>
>>71400502
yeah, you aren't going to go far anyways so why not
>>
>>71400539
okay thank
>>
>>71399317
>>71398940

Well, what is a decent language for running a database meant to be accessed online?
>>
>>71400573
SQL
>>
>>71400502
White people have the most color
>>
>>71400627
Pigments are a subtractive colour system, not an additive one,
>>
>>71400650
I'm not talking about skin pigment
>>
File: 1560389479313.png (742 KB, 2752x4342)
742 KB
742 KB PNG
>Find this image
>Laugh at shitty mistakes
>Think about how I'd solve them
>Draw a blank
Now I'm fucking scared. I've been studying for 5 fucking years, and can manage to do my projects and get everything done, but I still feel like I don't understand shit. I don't want to be fucked bros, I don't want to be a retard.
>>
>>71400729
Just do them, you can likely do most of them easily. You probably just have mild job interview anxiety.
>>
>>71400774
How long do you usually get to make the answers? I’d imagine anything past 1 and a half minutes would be seen as a failure.
>>
>>71400729
> Looks at the "once in a lifetime" weirdness
> It reminds me of what my programming looked like back in college
That feel when you realize how much you sucked.

As to solving, relax and remember loops are your friends.
>>
>>71400729
print(1)
print(3)
print(5)
print(7)
print(9)
print(11)
print(13)
print(15)
print(17)
print(19)
print(21)
print(23)
print(25)
print(27)
print(29)
print(31)
print(33)
print(35)
print(37)
print(39)
print(41)
print(43)
print(45)
print(47)
print(49)
print(51)
print(53)
print(55)
print(57)
print(59)
print(61)
print(63)
print(65)
print(67)
print(69)
print(71)
print(73)
print(75)
print(77)
print(79)
print(81)
print(83)
print(85)
print(87)
print(89)
print(91)
print(93)
print(95)
>>
>>71400867
print(97)
print(99)
>>
>>71400798
Yeah, honestly aside from the deck shuffling question, if you don't have an actual solution done in around 1.5-2 minutes, that would be a big red flag. The deck shuffling one I might extend to 4 minutes.
>>
>>71400872
Thank god, that was the one I was having trouble with.
>>
>>71400872
I honestly don't know, off the top of my head, how to shuffle. I've been spoiled by the standard library.
>>
>>71400952
Swap loop?
>>
>>71400952
And this is why everyone should write their own operating system and be forced to write their own standard library.
If you haven't done this, you can not call yourself a programmer.
>>
>>71400970
By this argument there exist only a few hundred programmers, dead included.
>>
>Major in programming
>Never program in free time
>Do everything BUT program
What the fuck am I doing
>>
>>71401007
"Programming" is not a major.
But yes, what the fuck are you doing?
>>
>>71400993
Yes, that's right.
>>
>>71401007
programming is the funnest shit ever
shit taste
>>
>>71401007
I have a masters in CS and all it taught me was that programming was a boring mundane task left up for undergrads. I barely get excited anymore.
>>
>>71401007
Do you like programming? It isn't a bad thing to know a bit of, but majoring in it might be a bit much if not.
>>
>>71400729
for(int i = 1; i < 100; i+=2)
printf("%d\n", i);
>>
>>71400502
look who invented the transistor https://en.wikipedia.org/wiki/William_Shockley#Political_views
>>
>>71401038
p (0..100).select(&:odd?)

why yes i am unemployed
>>
Why is erlang so damn ugly
>>
>>71401058
(range 1 100 2)
>>
>>71400729
Why loop one by one to find the odds if you can loop two by two?
for(let i = 1; i < 100; i +=2) { console.log(i); }
>>
>>71401095
show example of uglyness
>>
>>71401095
could be worse
>>
>>71401095
could be python
>>
>>71401058
unreadable
>>
>>71401095
erlang's syntax evolved out of prolog
>>
>>71401038
Now do prime numbers
>>
File: file.png (153 KB, 331x622)
153 KB
153 KB PNG
which one of you schizos is this?
>>
>>71401238
me
>>
>>71401238
me
>>
>>71397399
its just a few hundred anons who post regularly
>>
>>71397526
cringe desu
>>
>>71401238
it was a team effort
>>
I've been thinking lately: What's the best way to teach somebody how to program? The doing is particularly important in my opinion but what would you get them to do and when?
>>
>>71401329
You can probably find better pedagogical resources than 4chan
https://htdp.org/2018-01-06/Book/
>>
best language for writing a script to resurrect your dead mother so you can ask her how to run your fucking life because you're just a clueless computer-obsessed manchild
>>
>>71401349
english
>>
>>71401329
you can't teach someone to program, either they try to do it and they can do it or they can't
>>
File: 27973237.png (5 KB, 395x395)
5 KB
5 KB PNG
>>71397347
Stand aside, Zig is coming.
>>
I’m learning react and I’m going to rewrite my website with it, then make a small dungeon crawler with it.
>>
>>71401434
>>>/g/wdg
Also, why the hell would you try to make a game with a shitty web framework?
>>
>>71401208
primes r gay
>>
>>71401057
aka, he took the redpill
>>
File: no-photo.jpg (16 KB, 275x218)
16 KB
16 KB JPG
>>71401409
Move, Zig
Jai will exist, someday, probably
>>
>>71401058
>p
>0..100
nice syntactic sugar, is that supposed to be a list?
>.select
oop huh
>&:odd?
wtf?
>>
File: whuh.jpg (201 KB, 1000x800)
201 KB
201 KB JPG
>>71397321
Did my first project for my first uni programming course. I meant to do it in pieces, but it was like a logic puzzle mixed with a foreign language so I got sucked in and did it all in one go. It was exciting to see my little calculator go, though. Is this what problem solving feels like?
>>
>>71401490
select the numbers between 0 and 100 that are odd and print. ugly ass language but that's what it's doing.
>>
>>71401477
>No RAII
>No smart pointers
>Not even GC
It's shit.
>>
>>71401495
pretty much
>>
>>71401515
That's why it might actually be good, you stupid sepplescuck.
>>
>>71401495
>first uni programming course
>This is his first time solving a programming problem
Not gonna make it
>>
>>71401528
The odds may not be in his favor but it is possible.
>>
>>71401527
No, that's why it's fucking garbage.
Enjoy forgetting to free your resources, or forgetting to release that lock, or inserting boilerplate calls to free everywhere in your branches.
>>
>>71401515
just use C# if that's what you want
>>
>>71401543
Why the FUCK would I use a GCd language? Fuck off retard, this is the programming thread.
RAII or gtfo
>>
>>71401528
people start learning to code in college all the time
>>
>>71401550
what? you just complained about not having GC
>>
>>71401554
And all of them are fucking trash.
>>
>>71401477
V (v-lang) is in early access and will be released never.
>>
>>71401562
everyone is trash at first
>>
>>71401561
I was complaining how there are literally zero automatic resource management facilities.
GC is fucking shit too, but Jai doesn't even have a single facility to automate resource management.
Laughable
>>
>>71401554
I taught myself, 5 years after leaving college.
>>
>>71401570
Yeah and they stay trash.
>>
>>71401579
You just don't get it, do you? Stupid fucking sepplescuck.
Once a shit-eater, always a shit-eater.
>>
C is growing on me, convince me to not be a Cnile.
>>
>>71401579
managing resources yourself isn't hard, if you think it is too hard you can use garbage collection
it blows my mind that there's people who actually like C++s ridiculous comprimises like smart pointers
>>
>>71401592
>hur dur
Not a single facility to automate resource management. Your language MAYBE replaces C.
>>
>>71401597
C is great. Keep using it.
>>
>>71401597
Become a Jnile instead
>>
>>71401586
as opposed to you, a literal programming god.
>>
>>71401586
when did you start coding, oh programming master
>>
>>71401631
Yes
>>
>>71401633
Year 8
>>
>>71401633
not him, but high school
i'd had some introductory experience with it at summer camp in elementary school
>>
>>71401597
life is too short to spend it writing C
>>
>>71401636
I’d ask to see your work but i know you’re too chickenshit to back up your ego
>>
>>71401644
very few people actually start that young. Most people start about high school or college age
>>
>>71401490
I should explain
>p (0..100).select(&:odd?)
>p
a basic kind of print
>0..100
an inclusive Range
>.select()
oop meme
>&:odd?
equivalent to .select { |it| it.odd? }
>>
>>71398246
Holy shit, I know where that graveyard is
>>
>>71401653
but its comfy
>>
>>71398246
This is where TCL lives
>>
>>71398246
>I want to get into a database language to do web development
Just learn SQL directly.
>>
>>71401790
sometimes you gotta get out of your comfort zone
>>
>>71399317
Postgres actually has an embedded Python interpreter so you can execute Python functions directly in the database.
>>71400573
Learn SQL and Python.
>>
>>71397613
Java
>>
given a bunch of 2D rectangles of various dimensions, whats a good way of determining a 2D arrangement with the smallest (or small-ish) total area? the rectangles are "straight" and cannot be rotated
>>
File: Capture.png (9 KB, 760x200)
9 KB
9 KB PNG
/g/ I need help with a C program I'm working on.

So I'm trying to create a program which will read data from a CSV file. My program works by reading the line on the CSV in as a string and then breaking that string up into tokens and converting the data into other data types that are stored to a struct.

The issue I'm having is that if my program encounters a empty space it should read that empty space and fill the corresponding struct field with some invalid data entry like, "NA" or something.
EX:
12cx7,0:26:00,,,,,,69


everytime it reads those empty spaces separated by commas it should pick that up, however for some reason it skips those tokens and just keeps skipping till it finds a token that isn't white space. I posted a pic of the run results of what happens when I run my program with that example as my csv file.

Here's my code: https://pastebin.com/aYwDLzcy
>>
>>71401841
What should I do instead?
>>
>>71401447
This is a good way to learn something new because games are fun to make.
>>
>>71401946
It's completely the wrong tool for the job. It's like saying you want to make a game using a regex engine.
>>
>>71401918
For a language used to build a string processing system, C is annoyingly clumsy with strings.
>>
>>71401900
that's an open problem with no absolute answer
>>
>>71401960
If I didn't have to work with C, I wouldn't. But I'm a uni student so my professor is forcing us to work with C for the first half of this class, then we'll move to C++.

I'm like 80% sure my issue is the way I implemented my strtok thing, its just skipping and skipping till it finds something that isn't an empty space but I don't know how I should fix it so my strtok will stop and say, "hey there's an empty space here!"
>>
>>71401918
strtok doesn't work like that. It considers multiple of the same character to be part of the same token.
That works well for spaces, but not for things like this.

Just use
strchr(..., ',')
instead.
>>
>>71401992
if you didnt have an answer, you couldve just not replied
>>
Should I go into front or back end lads
>>
>>71402009
well I know several strategies but seeing you're being fag I'll just tell you to google it
>>
>>71401945
program only in a lisp made with C++ templates
>>
>>71401900
You description doesn’t make sense. If the rectangles can’t overlap then the area would just be their total area.
>>
File: 1560193989309.jpg (84 KB, 1003x900)
84 KB
84 KB JPG
>>71402043
>C++ templates
ugly
>>
>>71402005
there's really no way to get strtok to recognize a whitespace? There isn't some way I can change the delimiters so it will pick that up or something? My professor basically hinted we need strtok to do that part.
>>
>>71402011
I'm going to get inside through your back end if you don't go to >>>/wdg/
>>
>>71402058
"total area" meaning the area of the smallest rectangle that encloses all the other rectangles
>>
>>71402071
>>71402005
also idk how the fuck strchr would even work. I'd still need it to be broken up into tokens so I could grab the relevant data I'd need while ignoring the whitespace.
>>
>>71402009
Lol kys it's np hard
>>
Wish me luck /dpt/
>>
>>71402169
link pls
>>
>>71402177
fucking google it m8, you have the title and author. I don't remember where I got this.
>>
>>71402189
you know what
im not wishing you luck
>>
what are essentials i should know how to write?

like algorithms, sorting, singletons etc that should be a given when applying to a senior role
>>
File: 1560410033.jpg (737 KB, 1560x2104)
737 KB
737 KB JPG
>>71402169
Is this peak comfiness?
>>
>>71402279
>applying to a senior role
when you're in a senior role you dont even write code you just tell other people what to write
>>
>>71402279
good posts on 4chan
>>
>>71402288
do you know what a typical senior or even mid level salary is for a developer in the UK?

Im on 32k as a webdev but been doing some golang on our backend tooling stuff and not sure if it's worth leaving to do an actual non webdev job
>>
>>71402169
good luck
vulkan is fun
and it's the kind of API where you can come back to code you wrote months ago and instantly know what it's for

as a preface, that tutorial/ebook isn't that good, it makes you write a toy renderer, with shit architecture, and misses out on explaining some important concepts that it makes you use
but as far as singular resources, there's no better

other places to look are
>the C and C++ samples on github
both are worth checking out
>i am graphics and so can you
step by step overview of how a dude wrote a vulkan renderer for doom 3
>the official vulkan programming guide
explains things from an overall perspective, only useful once you get some experience, pirate it from libgen
>the specification
the spec is actually very easy to read because of how explicit vulkan is, and is actually a pretty good resource
>>
>>71402305
in the US it's over 100k, not sure about the UK
>>
>>71402308
Ok so if I've never done any advanced graphics programming (I don't know what a pipeline is, or what a command buffer is), would this book still be good for a first tutorial or would you recommend something else?
>i am graphics and so can you
Already DL'd it, I'm just waiting until I understand vulkan a bit more
>>
>>71402281
Probably if you have bad eye sight and think a programming reference is a novel.
>>
>>71402333
it is absolutely good for a first tutorial, it's more that it's a tad bit impractical, from a software design perspective
you won't be able to reuse a lot of the code you write (and you will write a fuckton, because vulkan)
good for teaching, bad for saving time
>>
>OpenGL is a bloated mountain to climb. It's a mystical land where you offer prayers to priestesses on high in hopes of the sky changing color.
>Vulkan is the government office telling you, you still don't have all the necessary forms to proceed.
Discuss
>>
>>71402370
Ok it's perfect then because I know absolutely nothing about graphics programming
>>
File: 1558482349068.png (359 KB, 851x501)
359 KB
359 KB PNG
>>71402373
k
>>
>>71397330

Brainlet. Clang and libc++ are the only nice things in otherwise bloody fucking mess of standardized idiocy
>>
>>71402377
nothing at all?
i started with opengl before jumping into vulkan, mainly because learnopengl.com is extremely good at giving you a general overview of graphics programming

>>71402373
filling out forms is important
>>
>>71402389
don't touch those oranges, yunocchi
>>
>>71397330
>thinking LLVM is associated with Apple
This freetard doesn't know how to code.
>>
>>71402373
Vulkan doesn't automatically make you be able to do fancy shit. You're going to still have to climb to the top of the mountain, pray to the priestess and hope the sky changes color.
>>
Is this reflective of reality?
>>
>>71398239

But Ivan, you literally would not be able to shitpost here without corporate america and most probably would not even have been born (your father would die from domestic alcohol poisoning).
>>
>>71402507
except it's not a priestess, it's an a high functioning autistic dude in a suit, and it's not a mountain, it's the top floor of a skyscraper with a broken elevator
>>
>>71402521
>5% is double the size compared to 85.8%
*not drawn to scale
>>
>>71402521
I told you ruby programmers were women
Why didn't you listen?
>>
>>71402521
Programming languages are more about community than function for most tasks. People tend to gravitate towards the languages with the same types of people whom them associate with rather than technical merits (and the technical people end up gravitating towards the same languages also).
>>
>>71402583
Have a community also is a big deal because fucking writing your own bindings to anything of value in C/C++ land is a boring nightmare.
>>
>>71402583
>Programming languages are more about community than function for most tasks
thats the most brainlet thing ive ever read
>>
>>71402601
Then why do we have so many redundant languages? Very few of them do anything new, just slightly different flavors on what has already existed for the past 30 years.
>>
>>71402626
im not saying its not true, people are just dumb
>>
/dpt/, is the workplace significantly harder than school? I just feel so out of depth working on these assignments for my class that it makes me scared shitless that I'm wasting my time and money going for this major.
>>
>>71402651
its harder in some ways and easier in others
alot of the theory they teach you is probably going to be useless
if you are struggling to keep up with the practical tasks then you're in trouble
>>
>>71397510
>didn't say redpilled
cringe
>>
>>71402651
They are hard in different ways. In university some concepts were tricky, like I remember some things in automata theory were difficult to get my head around. Doing assignments on these topics was a struggle. But I wouldn't call it laborious, just challenging at times.

Work, on the other hand, is not hard in that way. It's hard because there's a lot to do and you have to keep up because other people depend on it.
>>
File: VULKANFAILS.jpg (112 KB, 1024x575)
112 KB
112 KB JPG
>>71402281
s e v e n h u n d r e d l i n e s
>>
>>71402746
And when you're writing those 700 lines, you're impressed by how much sheer control you have.
>>
OOPlet here. I'm using lua and trying to have some members of a class inside a table, for more organized code. But I'm having difficulty accessing variables that are direct members of the class from a method that's in a table. Is there a neat way of doing this, or should I just use a workaround/not have methods in tables?
class = {
message = ""
new = function(self, o) --Constructor
o = o or {}
setmetatable(o, self)
self.__index = self
return o
end,
methods = {
other_message = "world" --What I'm trying to do: have some member variables
print_it = function(self) --and methods of 'class' in a table.
print(self.message .. self.methods.other_message) --Fucks up here
end --methods.print_it would need to access members of both
} --'class' and 'class.methods'. How do?
}

instance = class:new{message = "hello "}

instance.methods:print_it() --'self' is instance.methods, so doesn't work.
instance:methods.print_it() --Also doesn't work: syntax error: function arguments
--expected near '.'
>>
>>71402775
yeah OpenGL just doesnt give you enough control does it
>>
>>71402794
Yeah, not particularly. But the real pain in the ass thing about OpenGL is how fucking stateful it is.
>>
New thread:
>>71402817
>>71402817
>>71402817
>>
>>71402779
you need to mess with the __call metamethod to get it to look up methods in the method table
although I have no idea why your methods are in a seperate table and not just the class table itself, it's an unneccessary layer of indrection
>>
>>71402803
I can guarantee you've never been in a situation where OpenGL didn't give you enough control over something to do what you wanted
>>
>>71402775
which is almost completely worthless, I guarantee you that you are doing worse than the opengl driver.

>>71402779
lua doesn't have classes, that's why it's so good.

>>71402803
state is needed for real programs
>>
>>71402851
what a braindead reply
he's implementing OOP in Lua, and if you'd ever use OpenGL you'd know exactly what he's talking about, and it's not that
>>
f*title(!null?action='some234') [
action#string#stream>logger#end;;
]{context.emptyByteSpace}

Just kill me.
>>
>>71402432
>In 2005, Apple Inc. hired Lattner and formed a team to work on the LLVM system for various uses within Apple's development systems. LLVM is an integral part of Apple's latest development tools for macOS and iOS.
https://en.wikipedia.org/wiki/LLVM

It's literal apple shit



Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

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.