[ 3 / biz / cgl / ck / diy / fa / g / ic / jp / lit / sci / tg / vr / vt ] [ index / top / reports / report a bug ] [ 4plebs / archived.moe / rbt ]

Due to resource constraints, /g/ and /tg/ will no longer be archived or available. Other archivers continue to archive these boards.Become a Patron!

/g/ - Technology

View post   

[ Toggle deleted replies ]
File: 90 KB, 960x845, bots.jpg [View same] [iqdb] [saucenao] [google] [report]
66584091 No.66584091 [Reply] [Original] [archived.moe] [rbt]

What are you working on, /g/?

Previous thread: >>66573120

>> No.66584107

Learning python to do some scripting in Microsoft Excel

>> No.66584138

finance goblin be gone

>> No.66584177

Is there interest in a codejam? I think it's cool but I don't want to push shit if nobody's into it.


>> No.66584210

That's not a thing

>> No.66584226
File: 342 KB, 714x738, 1421164417027.png [View same] [iqdb] [saucenao] [google] [report]

Employed Haskell programmer reporting in

>> No.66584243

don't feel too bad, not everyone can work with idris at their job

>> No.66584319


>> No.66584331

People say, "Write a web server; it'll be educational."
Well, if I look up how to write fucking webservers in 2018, then I'm just being spoonfed. Is that the educational aspect?

>> No.66584354

well you could try writing one using only manpages and RFCs for reference

>> No.66584356

Ignore the tutorials, take the RFCs and implement them.

>> No.66584363

Write a gopher server instead, it's simpler than HTTP, but you won't find a "spoonfeeding" tutorial.

>> No.66584368

You should learn to properly use tutorials. It's simple. You don't copy/paste exactly what they do. In fact, you don't even write exactly what they do. You change things, and make it your own, so it's as if you're writing something on your own, your own take on it. You try to anticipate what will occur next in the tutorial. You also write features and other code which expands on what they are doing. You try and integrate it into other code you've written.
By taking this active role, even if the tutorial is spoonfeeding, you are not letting it spoonfeed you.

>> No.66584440

Be honest with me: How many ways can I "make it my own" when it's according to a spec, like with HTTP? Seems like a pretty cut and dry thing.

Another question: Is async i/o really fucking new, or am I really fucking retarded? It seems like I've never been exposed to it. Is it really that complex, comparatively?

>> No.66584479
File: 365 KB, 500x275, feel.gif [View same] [iqdb] [saucenao] [google] [report]

>tfw full-stacker
>tfw too much of a brainlet for /dpt/
>tfw too smart for /wdg/

>> No.66584493

What the hell, being spoonfed is wonderful. That's the quickest way to learn. Don't get autistic about reinventing the wheel every step of the way.

>> No.66584495

Design it to be idiomatic within the language you're working with

>> No.66584518

>How many ways can I "make it my own" when it's according to a spec
Use a different language than the tutorial, do something funky with logging, I don't know man, look there are multiple web servers in existence and they are not identical. Use your noodle! It sounds like you're flailing around pulling up any excuse you can for I don't know what reason. You want us to say it's impossible?

>> No.66584530

A Python weather script. I pass it a location and it fetches the forecast from an API.

>> No.66584580

how do I code the inverse trigonometry functions withou using any library?

>> No.66584596

wrote a C# program that puts TeX into a string buffer, exports the buffer to a .tex file, then runs XeLaTeX to generate a pdf from cmd.

>> No.66584597
File: 38 KB, 300x250, rere.png [View same] [iqdb] [saucenao] [google] [report]

show your portfolio

>> No.66584607

Taylor expansion I guess

>> No.66584624
File: 66 KB, 554x400, dab frog.png [View same] [iqdb] [saucenao] [google] [report]

>tfw got my shitlib pushed to Maven Central

Now I can finally join the big boys with Github repos in their CVs.

>> No.66584630

I'm reading book about threads and it makes it sound like you can create 1000 threads if you wanted. Or did I get that wrong? I'm wondering because for example Ryzen 5 has 6 cores and 12 threads per core so 72 threads yet if I open my task manager it says 2460 threads are running. Are we taking about different threads here?

>> No.66584660

If you could only create as many threads/processes as you have cores, you couldn't get much done on any computer. One of the kernel's primary jobs is allocating CPU time to stuff that needs it

>> No.66584675

That sounds like communism. We need capitalistic kernal scheduling that allocates CPU time to process that actually turns a profit.

>> No.66584688

>you can create 1000 threads if you wanted
Yes, but it's generally not a good idea to. It's very wasteful.
>yet if I open my task manager it says 2460 threads are running. Are we taking about different threads here?
Your OS will shedule which threads get to run on the CPU at any given moment, so you can have a lot more threads/processes running than you do CPU cores.
It's more than likely that a huge number of those threads are currently blocked, waiting on something, and wouldn't take any CPU time (until something happens) anyway.

>> No.66584710

>too much of a brainlet for /dpt/

>> No.66584739


>> No.66584800

>advocating Big Kernel

>> No.66584805

Am I a brainlet and have always done this wrong, but I thought it was 12 threads total? Always thought it was 2 threads per core.

>> No.66584901

A friend of mine programs in general, phone programs, websites, has to use photoshop, what kind of Keyboard do you guys think it would be useful to him?

What keyboards do you guys have that help you?

>> No.66584938


Old, dirty ones with food and cum stains.

>> No.66584940

jesus christ, why is math so fucking boring.

>> No.66584947

What is the point of an Arduino when a raspberry Pi is just as cheap?

>> No.66584984

NSLog(@"Does LosAngeles exist ? %d",[@"Newyork:Seatle:LosAngeles:WashingtonDC:" rangeOfString:@"LosAngeles"].location != NSNotFound);

>> No.66584994

Because you are retarded.

>> No.66585005

Because you're a brainlet philistine

>> No.66585020

Might be so. Have no idea either, I assumed it was per core

>> No.66585023

Webserver has an RFC?
Or are you referring to RFC 1180(TCP/IP)

>> No.66585025

No, not an array. No pointers.
I explained it. The structure is
1 bit - continue (1) / new (0)
if new, the next 7 bits are the low 7 bits of the first character [1st char = 1st byte]
if continue, the next 7 bits are an unsigned 7-bit integer, indicating the length of the common prefix [len = 1st byte - 0x80, copy len bytes of previous codepoint name]
?? bytes - text (null terminated ASCII)
1 byte - null terminator

Psuedocode, if you're still confused, is in here: https://pastebin.com/yTub7kX9.

The only metadata is the null terminators. Nothing more. It gets all the compression stuff while not causing any trouble. Decompress into memory, like in psuedocode

>> No.66585031

Math is not hard for me, is just fucking and utterly boring, like why do I give a fuck about it?

and I am talking about fucking trigonometry.

>> No.66585040


>> No.66585048

brainlet doesn't mean you can't understand something--nothing is hard for humans to do, lol
brainlet means you don't know how to use your fucking brain

interest and attention are skills you build, not things that the world gives you

>> No.66585077

trigonometry should not be considered maths anymore if you are >25 yo.
You should be doing topology, graphs, advance calculus,quaternions at this age.

>> No.66585085

I want to learn enough math to make games, but is fucking boring and useless.

most math videos are fucking autistic garbage that they don't even care if you like the topic.

>> No.66585108

you THINKING that it is boring and useless is the only thing that leads you to conclude that it's boring and useless

use your motherfucking emotional control developed through deliberate practice to give yourself interest--you already desire it, so you're clearly interested, but you keep lying to yourself like some fucking retard

>> No.66585123

Start with vectors.
Analytical Geometry.

Above three are enough for games that you want to sell to bunch of onions boys.

>> No.66585137

I dunno, I'm watching kant academia and is like watching paint dry.

not sure if the topic is boring or the guy is just as exciting as an accountant.

>> No.66585145

again, excitement is an internal function
demand change from yourself, not from your world

>> No.66585183

I just watched an unit circle of trigonometry to radian functions, and that is cool I guess but It's like wow, a circle with the conversion table between radians and degrees, how cool and exciting (not really, just a dumb circle with some numbers) and the guy spent like 15 minutes talking about it and I just don't give a fuck and I just forget all what he said like a minute later I finished that video.

It's like wow, a full circle is 2 radians and 180° are 1 radian and 90° is like 0.5 radian.

wow, so cool.

>> No.66585191

pearls for swines

>> No.66585193

Don't. Don't watch a math video.
You will kill 10 years easily without even making a tetris.
Practice-Theory-Practice is your friend.
Gamedev is tough, very tough.
Don't watch. Implement.

>> No.66585202

You sound like a retard, better give up now and save some time.

>> No.66585207

you're not grasping the point
perhaps you really are a brainlet

>> No.66585208

see ya faggot

>> No.66585219

I guess I'll read some pdf, because fuck watching 10 hours of math.

my IQ is 130.

>> No.66585220


>> No.66585232

he sounds like he is junkie.

>> No.66585268

lol, troll confirmed
read my posts, retard--didn't say anything about iq

>> No.66585299

Which is best?
Persons not having worked in all three language must not reply.

>> No.66585306

which one of those isn't a lang(uage)?

>> No.66585315


>> No.66585319

No he's talking about the (many) RFCs dealing with HTTP

>> No.66585326

Because what you're referring to math is probably some pre-calc topic.

>> No.66585341

what a minute... did this brainlet really skip/flunk pre-calc. omg..!

>> No.66585354

>I am talking about fucking trigonometry.
You say this like it's some "Whoa shit th-that's advanced!!" thing.

>my IQ is 130.
Hahahahaha *snap*

>> No.66585368

>can't even read the part where I said is not hard, just extremelly boring

>> No.66585378

make a post on reddit about it

>> No.66585386
File: 39 KB, 252x198, image.jpg [View same] [iqdb] [saucenao] [google] [report]


If you cant count should you really be worrying about such a thing?

>> No.66585389

/dpt/ is already a subreddit.

>> No.66585394

>my IQ is 130
>math is boring
Yeah, sure

>> No.66585413

Well then jump your 130 IQ into Fourier analysis. It's similar to Taylor expansion but you decompose functions into an infinite sum of sines.
Only boring people get bored.

>> No.66585419

my IQ is a dolphin

>> No.66585420

I didn't want to include Objective-C

>> No.66585436

I want to make a DOOM clone and some mode 07 stuff, not learn college math.

>> No.66585456

>3D engine
>no maths
Lol good luck. There is a reason why gamemaker and unity games (99%) are shit.

>> No.66585469

Wow you really do sound like a genius snowflake
What a shame that those phonies are forcing you to learn math
Maybe you should drop out, you're obviously on a totally different level from them

>> No.66585487

I'm not even in college faggot.

I just said math is boring, which 99% of people say it does.

>> No.66585551

Oh Jesus he's an 18 year old who just graduated high school and has a master plan that's 100% totally gonna work to allow him to be independent while making a lot of money.

Now if he could just figure out a way to do it that doesn't involve any math...

>> No.66585553

Trig is considered highschool level by most.
>99% of people say it does
Spoken like a true follower. No wonder you have such problems challenging yourself or using the material in interesting ways.

>> No.66585721

>open C++ source file
>globals everywhere
using namespace std;
oh joy

>> No.66585782

What the fuck is Myrddin?

>> No.66585852

Uni taught me c++ using namespace what's the issue? Seriously I might be writing pajeet code and not know it

>> No.66585861

using namespace is fine outside of header files.

>> No.66585906

it gets rid of the point of namespaces in the first place. Just have a using declaration for each symbol you import, it's much easier to refactor and you also get unused import warnings.

>> No.66585921
File: 300 KB, 699x699, 1530484472529.jpg [View same] [iqdb] [saucenao] [google] [report]

Reading SICP on my time off.
It's a really interesting read if you had little contact with CS because your background is numerical physics. The first 120 were a breeze but some of the exercises around p180 onwards actually require me thinking.

>> No.66585923

It's fine in header files, too, as long as you don't use it in the global scope. It essentially dumps all symbols from that namespace into the current scope. If you do this in the global scope in a header file, everything that includes that file will also have all those symbols in the global namespace.

>> No.66585933

The point of namespaces is so that you can write a library without having to worry about name collisions. As someone using libraries, you can skip the namespaces without issues if you know none of the names overlap.

>> No.66585958

It's much easier to avoid collisions when you have a list of all the names you're using at the top of each source file. It's also easier when each of those imported names can be renamed with the same declaration.

>> No.66586042

You are using two libraries called Foo and Bar:

using namespace foo;
using namespace bar;

Everything works fine, you can call Blah() from Foo and Quux() from Bar without problems. But one day you upgrade to a new version of Foo 2.0, which now offers a function called Quux(). Now you've got a conflict: Both Foo 2.0 and Bar import Quux() into your global namespace. This is going to take some effort to fix, especially if the function parameters happen to match.

If you had used foo::Blah() and bar::Quux(), then the introduction of foo::Quux() would have been a non-event.

>> No.66586094

Or you could just using foo::Blah; and using bar::Quux; and have the best of both worlds.

>> No.66586150

Gitlab or Bitbucket for free private repos?

>> No.66586170

fuck namespaces

>> No.66586230

I am doing real shit organizing my growing python application. I hate what I have made and it's only 228 lines. Fucking shouldn't have tried OOP because I'm terrible at it and Python makes it worse

>> No.66586245

Also getting a strong feeling I can't fucking apply the Single Responsibility Principle

>> No.66586271

updating to iOs 11 on the new iPhone purchased via Swappa

>> No.66586276
File: 118 KB, 1129x1200, 719067254826249.jpg [View same] [iqdb] [saucenao] [google] [report]

int i = 42, *p = &i;
decltype(*p) c;//error: c is int& instead of int and must be initialized

Fuck this language

>> No.66586289

there's nothing wrong with goto

>> No.66586294

that's what you get for writing cobol

>> No.66586299

that makes perfect sense, it's not the object but a reference to it.

>> No.66586300


>> No.66586317

#include <string>

template <typename T>
struct InheritableWrapper
T t;

InheritableWrapper(T t):

operator auto&()
return t;

template <typename ...Fs>
struct OverloadingIsForNiggers : InheritableWrapper<Fs>...
OverloadingIsForNiggers(Fs ...fs):

using InheritableWrapper<Fs>::operator auto&...;

void voidfn();
void intfn(int);

void bar()
OverloadingIsForNiggers overloaded(&voidfn, &intfn);

>> No.66586329

>he wants `*p = 0` to do nothing

>> No.66586342

When dereferencing an int * you should get an int, not a fucking int&

>> No.66586357


>> No.66586359

it ain't the original int symbol though. It's a reference to one. If it's an int const* then dereferencing one gives you an int const&, not an int const. The semantics are decidedly different for an int const& and an int const.

>> No.66586373

kys sepples fags

>> No.66586378

stop posting sepples, it's disgusting

>> No.66586380

std::remove_reference_t<decltype(*p)> c; assuming you expected decltype(*p) to be an int

>> No.66586420

decltype was a mistake.

>> No.66586431

look I made it better
template <typename T>
class InheritableWrapper
T t;

InheritableWrapper(T &&t):

operator auto&()
return t;

template <typename ...Fs>
friend class OverloadingIsForNiggers;

template <typename ...Fs>
class OverloadingIsForNiggers : private InheritableWrapper<Fs>...
OverloadingIsForNiggers(Fs &&...fs):
InheritableWrapper<Fs>((Fs&&) fs)...

using InheritableWrapper<Fs>::operator auto&...;

void voidfn();
void intfn(int);
void doublefn(double);

void demo()
OverloadingIsForNiggers overloaded(&voidfn, &intfn, &doublefn);

>> No.66586442

how else would you expect (*p) = 4 to work if * didn't return a reference?

>> No.66586443


you have to be a tard not to skip that in highschool

>> No.66586447
File: 8 KB, 300x168, jerbs.jpg [View same] [iqdb] [saucenao] [google] [report]


>> No.66586496
File: 49 KB, 226x212, 1611750110008.png [View same] [iqdb] [saucenao] [google] [report]

Why are you trying to use the powerful C++ Programming Language ™ if you don't even know how a pointer works?

>> No.66586502

Well at least you realized you were dumb, even if you can't own up to it.

>> No.66586506

>trademark symbol
Uh, oh. Not this again.

>> No.66586710

Why hasn’t your company moved from java to Haskell like them?


>> No.66586726

>when Idris exists

>> No.66586961
File: 41 KB, 503x454, bigthonk.jpg [View same] [iqdb] [saucenao] [google] [report]

If this works just fine:
struct MyStruct
int a;
char *b;

int main()
MyStruct obj;

return 0;

The why the fuck would I need to use:
typedef struct
int a;
char *b;
} MyType;

int main()
MyType obj;

return 0;

>> No.66586992
File: 1.24 MB, 2048x1536, album art.jpg [View same] [iqdb] [saucenao] [google] [report]

I psoted this in another thread butttt
semi noob... So wrote a little bash script that logins updates some info logouts and then move on to the next host to do the same thing. I'm using a while loop to go through the list, then using an "expect" script to do what i need done. but after the first login and except scipt executed it stops the loop.. i'm at a loss i was wondering if any one else new whats up

while read p; do
#call expecting to ssh
echo $p
./expecting $p
done <ListOfHosts.txt

and the expect script

set HostName [lindex $argv 0]
spawn ssh -o ConnectTimeout=2 -o StrictHostKeyChecking=no user$HostName
expect "password"
send "Password\r"
expect "[email protected]"
send "mkdir nubs\r"
send "logout\r"

>> No.66587080
File: 41 KB, 460x520, a6be6gm_460s.jpg [View same] [iqdb] [saucenao] [google] [report]

sooo i posted this in another thread butttt
semi noob... So wrote a little bash script that logins updates some info logouts and then move on to the next host to do the same thing. I'm using a while loop to go through the list, then using an "expect" script to do what i need done. but after the first login and except scipt executed it stops the loop.. i'm at a loss i was wondering if any one else new whats up
the first more or less

while read p; do
#call expecting to ssh
echo $p
./expecting $p
done <ListOfHosts.txt

and the expect script

set HostName [lindex $argv 0]
spawn ssh -o ConnectTimeout=2 -o StrictHostKeyChecking=no user$HostName
expect "password"
send "Password\r"
expect "[email protected]"
send "mkdir nubs\r"
send "logout\r"

>> No.66587170

Hey guys, I'm new to javascript and I am trying to make a script for a website that adds buttons so that I click them and it fills out the login form for me:

var accList = [["[email protected]", "pw123"]]

var i;
for (i = 0; i < accList.length; i++) {
var bttn = document.createElement("BUTTON");
var txt = document.createTextNode(accList[i][0]);

var currAcc = accList[i];

Click = (function (currAcc) {

return function() {
document.querySelectorAll("[class^=inputDefault]")[0].value = currAcc[0];
document.querySelectorAll("[class^=inputDefault]")[1].value = currAcc[1];


Click(); //this works and calls the thing accordingly

bttn.onclick = Click; //this doesnt work
bttn.addEventListener("click", Click); //this also wouldnt work


my guess is that it deletes the value of accList after the script has run so when the button is clicked later the values are already gone I dont know how to fix that tho

>> No.66587254


>> No.66587271

that doesn't work

>> No.66587279

C++ vs. C

>> No.66587297

Do you not realize auto-fill has been a thing in browsers for a long time?

>> No.66587311

yes I do have a browser with autofill but there is no tutorial included on this in my browser

>> No.66587318

Both compile without problem.

>> No.66587330

idk what you are talking about but all the opened brackets are closed aswell

>> No.66587342
File: 99 KB, 413x395, 455375623.jpg [View same] [iqdb] [saucenao] [google] [report]

This place

>> No.66587376

oof I always post in this thread usually for c++
c u

>> No.66587378

error: unknown type name 'MyStruct'; use 'struct' keyword to refer to the type

>> No.66587447


>> No.66587497

well there's the problem
I compiled as C

>> No.66587519
File: 179 KB, 1280x720, ubbuzWbltw0ol2pwjcenOifkpkbfzuktca5aX$iknrerx2ypw!jncsr_apv.jpg [View same] [iqdb] [saucenao] [google] [report]

>still using Chit in 2018

>> No.66587754

I have a 2D game with movement, and now I am working on the collision part.

I would like to implement either a quad tree or spatial partition grid for collision, but I am not entirely certain how to implement them. I've been playing around with it all day and I can't quite get what I want. I do better when I see practical code that explains it enough that I can continue from and modify what it has.

To my understanding, the quad tree might impact performance because it has to be made every frame. I'm fine with either a quad tree or spatial partition grid.

I have an object struct array, and all I want/need to do is check for collision with objects in their immediate area.

>> No.66587784

>senior dev decides to try to tackle a bug
>spends almost a day on it
>comes up with a solution that doesn't even work
>meanwhile I figured out how to fix the bug within half an hour of looking at it
>he refused to listen to my approach when I suggested it originally
>but ended up using it after his failure anyway

>> No.66587794

Not really programming, I was working on a paper about AI today. I already submitted it for a conference, they told me it will be accepted but I have to shorten it and today I uploaded the final version. So if I didn't fuck up shortening it, I will be able to present it at the conference. Maybe it's not that special, but I am still a bit pround and happy.

>> No.66587797
File: 459 KB, 640x640, 289B3B47A6_preview.png [View same] [iqdb] [saucenao] [google] [report]

>tfw electrical engineer self-taught in programming
>tfw skilled in C, Java, Kotlin, C++, and Python
>tfw will never get to use anything except C because embedded devs are stockholm syndrome as fuck and won't consider existing alternatives like Rust and Nim

give me your programming feels, /dpt/

>> No.66587822

Arduino is a fucking sham for people who are too dumb to read the datasheet.
You can either buy your Arduino and be forever a baby, or you could program your 1$ microcontroller directly. That's right, you can get a microcontroller to program for 1$

>> No.66587841

>tfw have coworkers who use scala as a better java instead of as a worse haskell
>tfw got told never to use "monids" because "our java experts have to be able to understand the code"
>tfw coworker replaces maps, filters etc. with while loops and mutation

>> No.66587856

>tfw studying IT
>tfw self taught myself C, C++, java, visual basic
>also love tinkering around with microcontrollers and embedded
>dumb IT classmates always shit talk about me that I won't get a job

>> No.66587863

idk if this is the right thread but anyone got a good book recommendation for learning supercomputers. just everything about them. my knowledge level isn't super high but i can take my time to research as i read im 3rd year CS major and working on oscp so i have a basic understanding of traditional computing. id really like a physical book to read in bed.

>> No.66587876

Monads don't compose so they're useless in the real world. Use dependency injection instead.

>> No.66587883

nim has great C interop though.
and as long as no one has to touch it, you could use the nimcache c code.

>> No.66587899

here come the nim shills, careful not to praise literally any other language, they're very quick to anger

>> No.66587912

desu, i don't even use nim as my main language, it's just a fun side-lang.

>> No.66588004

just be careful anon lest you become insufferable like the julia shills

>> No.66588013
File: 499 KB, 640x640, 48A66DEE8C_preview.png [View same] [iqdb] [saucenao] [google] [report]

they're retarded, anon. Your future is bright.

Why the fuck are they even using scala if they refuse to actually program in scala?

>> No.66588026

eh i've shilled nim enough that the regulars here know about it. I'm sure once it gets farther along more people will try it. I wont spam it 24/7 like the julia dweebs used to though.

>> No.66588044

>Why the fuck are they even using scala if they refuse to actually program in scala?
We used to have a bunch of good Scala devs, who left the team (in some cases the company) after some higher-up's buddy got parachuted in as the team manager after the old one retired and turned out to only know Java (and poorly at that).

>> No.66588050

Source for $1 micro controller?

>> No.66588083


This is only for the chip. You obviously need more components for power/pins and all that which is why I think the parent is slightly disingenuous. That being said, there are lots of sub $5 complete boards on ali express which are good enough for simple experiments.

>> No.66588202

How can I get a job writing Haskell? Scala is no longer practical for writing real world code.

>> No.66588314

can snakes learn to program? (python and asp(.net) don't count as programming)

>> No.66588367

>that 16 year old boomer who still uses c because he learned it in the vietnam war

>> No.66588373

Programming niggas:
Arrays start at 0
DNS Convention:

>> No.66588411
File: 62 KB, 627x855, d8d330b.jpg [View same] [iqdb] [saucenao] [google] [report]

you can get a MCU for $1 but you won't be able to program it. Boards for that usually go for $10-30 depending on the platform. All things considered, Arduino isn't a terrible deal hardware-wise, it's just the Arduino libraries and IDE that are sorely lacking.

For $4 you can get a PIC24FJ64GA002, which is a 16-bit microcontroller (Arduino is 8-bit) that has more program memory and RAM, more timers, more versatile pin assignments, more peripherals, and a more sophisticated development environment with actual debugging features (MPLAB X).

Pick up a ChipKit PGM for like $25 and you now have something that's much more powerful than an Arduino at roughly the same cost. That, and the ChipKit programmer can be reused with as many PIC18, PIC24, and PIC32 devices as you want, so if you want a second MCU to play with, it's gonna run you $4 instead of $30.

What happened to Scala? Seems like a decent language to me, though Kotlin does all the same shit w/ more features.

>> No.66588479

>What happened to Scala?
community are a bunch of brainlets, who want an FP to work like Python.
Myriad of functions in the std are literally broken and give false results. So the community has multiple unofficial standards.
patching problems instead of fixing them.
literally lying about type annotations
the list goes on
If you have an hour and a half to kill, probably the best insight there is.
or the less crazy one where you can read the code

>> No.66588482

Who even uses something other than arm cortex-m?
Literally wasting your time with picshit.

>> No.66588491 [DELETED] 

>more features than Scala
It didn't even have higher-kinded types when I last checked.

If you really want to know why Scala is broken, a good place to start is one of the Paul Phillips videos from 4 years ago:

Since then FP in Scala has split into two major libraries, scalaz and cats, because of stupid politicking and infighting. Not only does this mean you typically have to pick one to use (because they're mostly incompatible with each other), it also limits which other libraries you can use (because they have to support whichever one of scalaz and cats that you've chosen) and/or makes it a massive ballache to write a library in Scala and try to support both scalaz and cats. The ecosystem is stagnating.

Not to mention the fact that some bugs in Scala will never be fixed because by this point big codebases depend on broken and/or poorly specified behavior in the compiler implementation (which, by the way, may or may not conform to the language spec).

Oh, and you also have the language maintainers proposing more and more ad-hoc language features that at best only solve the most basic instances of problems (see the typeclasses proposal) or are hideously overcomplicated for little benefit (see the proposed collections rewrite, which while better than the current collections API is still a complete mess), in some cases because of the language author's slavish devotion to OOP and refusal to compromise it even a little bit even if it would massively improve FP in Scala. Why can't we just have Haskell-like collections in Scala? Presumably because they're not OO-enough. Meanwhile useful things such as SIP-23 will probably never make it into the language. It's gotten so bad that there have been multiple attempts to fork and add actually useful features. Of course, this means yet more ecosystem fragmentation.

>> No.66588537 [DELETED] 
File: 9 KB, 610x161, scala.jpg [View same] [iqdb] [saucenao] [google] [report]


Also so-called "best practices" change every six months or so. Remember the cake pattern? Remember the proliferation of web frameworks, like Finagle and Scalatra and Lift? Remember Scala actors? Sadly we're still stuck with massive propaganda for Akka, a solution in search of a problem (and don't forget the irony of basing your entire application, in a language with one of the most complex, advanced, and featureful type systems in any mainstream language today, around PartialFunction[Any, Unit]).

Tooling has never been good for Scala (I remember the days when the IDE plugin I used would completely lock up) and now that it's finally getting somewhere (e.g. ENSIME), it is revealed that Scala 3/Dotty/whatever it will be called will most likely break it all and we'll be back to square one.

Lastly, we mustn't forget to mention compilation speed. It's absolutely unacceptable.

P.S. the attached image is a bit of a cheap shot but it's how things were a few years ago.

>> No.66588562 [DELETED] 

P.P.S. it wouldn't surprise me if a significant portion of former Scala programmers need therapy after working with the language.

>> No.66588601 [DELETED] 

>banned for posting about Scala
So this... is the power of shills...

>> No.66588608

mods what the fuck are you doing

>> No.66588631

mods are scalafags
>the absolute state of language shills

>> No.66588640

i think they thought you were spamming or something because my post >>66588479 is still there

>> No.66588725
File: 341 KB, 1128x750, scala beautiful.png [View same] [iqdb] [saucenao] [google] [report]

fucking hell

>> No.66588801

not me

>> No.66588821

post slides

>> No.66588830

They're in https://www.youtube.com/watch?v=uiJycy6dFSQ posted by >>66588479

>> No.66588850

OpenPyxl my nigga

>> No.66588852

oh i thought it was a slide from the other video

>> No.66588879

Oh you write code from india?

>> No.66589049

i am really enjoying this

>> No.66589069

the first video?
ye it's probably my favorite entertainment-value talk to date. Just rewatched it yesterday.
I hope Paul joins another language or starts his own soon.

>> No.66589239 [DELETED] 
File: 193 KB, 1920x1080, going to kill self.png [View same] [iqdb] [saucenao] [google] [report]

I hate Twine.
I hate Twine so much.
I harbor hostile wishes toward the UI designers of Twine.

>> No.66589261

>not using git
your own fault brainlet

>> No.66589264
File: 192 KB, 1920x1080, going to kill self.png [View same] [iqdb] [saucenao] [google] [report]

I hate Twine.
I hate Twine so much.
I harbor hostile wishes toward the UI designers of Twine.

>> No.66589285

Fuck you, I use git for almost everything, not my fault the one time I forget to use it happens be the time it matters.

>> No.66589289

Building personal website with CMS system behind custom authentication system

using elixir phoenix because I'm good

>> No.66589449

>>tfw coworker replaces maps, filters etc. with while loops and mutation
it all ends up as java bytecode in the JVM so syntactic sugar doesn't matter anyway

>tfw I was just like you, loving the fuck out of embedded programming, C, asm etc
>graduation day
>look at job offers
>everything in my country is for web developers and javascript "code artisans"
>can't stand that shit due to severe autism
>places I apply to say they're only looking for senior developers
>now in line for a shitty helpdesk job with night shifts
they laugh but they're probably right

>> No.66589536

>much more powerful than an Arduino at roughly the same cost
>comparing glorified kids toys with actual industrial workhorse.

>> No.66589538

I’m reading a book on databases and it refers to “b-tree”s a lot. Does this mean “b tree” or “b minus tree”?

>> No.66589563


>> No.66589661
File: 61 KB, 570x300, 1530483614631.jpg [View same] [iqdb] [saucenao] [google] [report]

I bought SICP

Can I read the book without coding anything and still understand it?
I kinda want to get out of my house more often

>> No.66589830

Replying to own post.

>> No.66589891

>he doesn't know about sift

>> No.66589930

How can I make a CLI that dynamically responds to the input of the user? For example,
Words displayed here change depending on input

> user typing input in shell here

Will a console app give me access to what the user types before hitting enter? I'm using c#

>> No.66589982

If you want access to input buffer contents prior to the end of the line, you need to flush the input buffer on a schedule instead of at the end of each line. On a posix compliant system, you do that by disabling canonical mode on the terminal, but if you're using C# i assume you're a wintoddler, in which case I don't know but try searching something like "windows equivalent of canonical mode" and see where it gets you.

>> No.66590142
File: 121 KB, 658x960, 1471731315996.jpg [View same] [iqdb] [saucenao] [google] [report]

I don't think you realise how much easier your life will be if you just embrace the maths. Watch 3Blue1Brown and tell me maths can't be beautiful.

>> No.66590287
File: 680 KB, 800x666, 3b92d0e2641dbc8a9af8accdb4655840.gif [View same] [iqdb] [saucenao] [google] [report]

SICP is literally a fucking meme and you fell for it, there's a reason why the book isn't used anywhere anymore besides memes on image boards and it's because it's antiquated crap that oldfags love to pretend is still relevant in the modern era
It's basically just long ass chain of homework, you complete one task and then after you wasted hours doing all the tasks for a given chapter, the teacher comes and tells you "no fuck that, these methods were wrong/inefficient/stupid, do it this way instead and also expand it to do this" and it continues for the whole book
You won't grasp much of it without doing the homework because of that, you'll page through it and then come to a realization you have no idea what the author's talking about because you didn't do question number 13498 on page 5
It also greatly loses focus at around 33% and becomes even more painful to follow, so enjoy
There are about 2 or 3 algorithms in the book that are nicely implemented and clever, everything else is worthless

>> No.66590351
File: 45 KB, 745x732, 1463822286325.jpg [View same] [iqdb] [saucenao] [google] [report]

that's a bit rude, anon

>> No.66590353

>I bought an introductionary textbook from the 80s no one uses anymore
Good for you, I guess..?

>> No.66590361

he's not wrong.
Lisp doesn't teach you programming.
if you want to learn, grab a systems lang and the algorithm book.

>> No.66590362 [DELETED] 

kys dumb attention whoring anime pedo fag

>> No.66590457

Binary tree but you say btree.
Same with red black trees, rbtrees

>> No.66590474

btree is not traditionally shorthand for binary tree. A btree is not strictly a binary tree.

>> No.66590490

I can't think of a context where btree wasn't binary tree for me.
What do people mean by that then?

>> No.66590491

>What, if anything, the B stands for has never been established.

>> No.66590505
File: 8 KB, 259x194, 1530478342414.jpg [View same] [iqdb] [saucenao] [google] [report]

>c++ interview
>perfect answers on the theory, data structures and its complexity, difference, stl
>"wow you have impressive knowledge for the student"
>last task, task related to bitshifting
>i suck tremendously, cant solve it
>urgghhh cant bitshift
>cant count the consecutive 1's starting from most significant bit


>> No.66590535

If I were an employer I wouldn't really care. It's so trivial I'd be asking why you didn't manage but it's something you could fill in in 10 minutes.

All that sepples garbage is far more complicated than bitwise manipulation.

>> No.66590540

// mask = msb
counter = 0;
while (value & mask) {
value = value << 1

something like this?

>> No.66590544
File: 4 KB, 282x74, y.png [View same] [iqdb] [saucenao] [google] [report]

9 out of 10 CompSci code monkeys can't solve this

>> No.66590552

Not that guy but,
I would interpret it as skipping forward to the first occurrence. Then exiting when our msb is 0.

>> No.66590564

In rust it's just https://godbolt.org/g/4bAxib

If your solution doesn't compile to `lzcnt` you should reconsider your language of choice.

>> No.66590570

in Haskell
countLeadingZeros . complement

>> No.66590579
File: 124 KB, 345x721, 15302103103550.png [View same] [iqdb] [saucenao] [google] [report]

It simply shows that I am the guy who's getting by with cramming. Especially I wasn't able to provide a partial solution and struggled with masks, interviewer tried to give the tips, but I was simply sitting with blank mind.
At the end he told me with a smug smile "train a bit more, solve more tasks, good luck".


>> No.66590668

That works, but less than optimal: https://godbolt.org/g/ahkXeV

>> No.66590691

haskell and optimal aren't in the same universe, so it can be assumed as much.

>> No.66590702
File: 12 KB, 800x450, learn_c_sharp_mac_osx_thumb800.jpg [View same] [iqdb] [saucenao] [google] [report]

I'm having a shit lord of a time, I guess after years of web development I'v lost it guys.

Trying to write a GTA5 multiplayer server. The Mod FiveM/CitizenFX is nice but its just a character in a map. Basically have to manage everything and create a sync system from server/client for ped as well as all the gui etc

i might kill myself

>> No.66590723

laziness and boxing and gc
hopefully a levity polymorphic version could do better
it's not impossible to write optimal code

ctrl+F "clz"

>> No.66590797
File: 42 KB, 492x794, 000575-debian [Running] - Oracle VM VirtualBox.png [View same] [iqdb] [saucenao] [google] [report]

i ate too much and now i cant sleep :(

>> No.66590938

Implement operator* for the MotionEffector.

>> No.66591090

nah, that's just a really bad integrator i threw together to get some minimally working code. gotta replace it with a proper rk4 integrator or something someday

>> No.66591120

Finally debugged my code after 3-4 days of work. There was a specific section with 2 bugs layered on top of each other which made it impossible to find.
Feels good. Onward to the next feature.

>> No.66591231
File: 610 KB, 2048x1536, 1530478870951.jpg [View same] [iqdb] [saucenao] [google] [report]

Yeah. That was that easy. I was doing everything right but forgot about "& mask".
Fuck, I only wish they'd dismiss that.

>> No.66591232

Not the same as "consecutive".

>> No.66591312

Learning Clojure for a job. Have written some stuff in Haskell and Scheme before, so the functional programming isn't a problem, but my god the syntax of this language is fucking disgusting. It's like Scheme but less regular, with a good dose of Perl-esque line-noise everywhere.

>> No.66591344

what's bad about it?
I just thought it was lisp with brackets

>> No.66591368

it's lisp with (, [, {, <, -> which basically makes it C with prefix notation.

>> No.66591407

>google ugliest clojure
>skim through the clojure compiler
>it's literally just lisp with a few more operators and brackets
i think you're over-reacting just a bit m8.

>> No.66591459

[ ] for vectors, { } for hashmaps and ( ) for lists. -> and ->> are threading macros. What's the problem?

>> No.66591462

Fuck off Rich Hickey, you are faggot and nobody likes you.

>> No.66591466

Why is gets() worse than Hitler?

>> No.66591478

There is literally no way to use it safely.
It was actually removed from the C standard, and everything in your toolchain will yell at you for trying to use it.

>> No.66591495

writing to buffer without knowing it's length will likely cause you to rewrite stack at some point.

>> No.66591523

Because C needs put down and all its software converted to languages from this decade.

>> No.66591547

Any way to explicitly show inherited parent variables from an abstract class, in child classes, for readability's sake?

>> No.66591565


>> No.66591571

class Base
int x;

class Derived : Base
using Base::x;


>> No.66591576

eww sepples go away

>> No.66591646

>getting the leading ones by negating then counting the leading zeros

>> No.66591673

What's wrong with it? There's no `leading_ones` method because there's no `locnt` instruction.

>> No.66591690

you got what you asked for, bro

>> No.66591718

Put them as classes literally within classes.

>> No.66591755

Dude classception lmaoooo

>> No.66591907

I have a function that takes void pointer, I successfully passed an int array to it. How do I use that array in the function now? It's like this and I tried
void *func(void *numb)
printf("%d", numb[0]); // tells me "dereferencing 'void *' pointer"
printf("%d", (int *)numb[0]); // invalid use of void expression

Any ideas?

>> No.66591908

I want to start creating programs for my computer to make the things that i do easier for myself. I dont want anything spoon fed or anything like that I just need to know what languages i would need to learn to do that.

>> No.66591930

Making OOP program in C is so fun.

>> No.66591936


>> No.66591955

just assign the value to a new variable and print that.

>> No.66591977

How do I deal with being torn between the public recommended way and my intuitive or rational knowledge?
I'm doing android devving now and most of the code will be interacting with the underlying systems. They've got all these helper methodologies like lifetime aware components (that one i happen to think is reasonable). It's difficult to judge if this is actually useful or if it's needless complexity.

Does anyone have tips? When I've done my C development I tend to write a lot of user code and then find api that fit or adapt api to fit my user code. I don't find that to be as feasible here and it has left me out of my element.

>> No.66591987

Should also add. The public likely know more about the particular circumstances I'll have to deal with than I do. But it's going to be a lot of tradeoffs between adapting to existing practice and being comfortable with my code base.

>> No.66591995

((int*) numb)[0]
But do what >>66591955 said it's easier than casting every time.

>> No.66592006

Thanks. I should read up on pointers, seems like magic at the moment.

>> No.66592019

I am also having some issue dealing with a huge number of generics in VB.NET and writing a tool to share type parameters across type declarations and combine them, hopefully this will lead to open generic type aliases eventualy.

>> No.66592030

Rust is disgusting.

>> No.66592100

bump on my question

>> No.66592110

Depends on the things you have in mind and the OS you're using, but assuming it's Windows, I would recommend C#.

>> No.66592133

I will start learning right away. Thank you for answering.

>> No.66592153
File: 32 KB, 596x285, 1499510451240.jpg [View same] [iqdb] [saucenao] [google] [report]

Pointers point.

>> No.66592190

So i graduated and it looks like they started cleansing me from their system so my microsoft office programs are telling me my subscription expired. What options do I have? I really dont wanna play 150 for excel and shit

>> No.66592198

Just use LibreOffice.

>> No.66592215
File: 20 KB, 227x239, el pun hispanico.jpg [View same] [iqdb] [saucenao] [google] [report]

not preparing for that was bit-unwise

>> No.66592216


behold the greatest embedded blog post of all time

>> No.66592219

get a job

>> No.66592236


not quite 1 dollar but ive actually used these before for usb projects and its a pretty fdecent full board

>> No.66592251

What exactly is a codejam?

>> No.66592293

But anon, languages from this decade are shit and not fast.

>> No.66592300

>What is Rust

>> No.66592301
File: 59 KB, 576x1024, heres your L.jpg [View same] [iqdb] [saucenao] [google] [report]


>> No.66592316

>>What is Rust
Shit and not fast.

>> No.66592323

I am nearly finishing K&R and I know I should program stuff to get the concepts under my skin but I'm just all out of inspiration and the presented exercises seem boring as fuck. What is a good little project to build from scratch?

>> No.66592348

Real-world Rust is actually faster than C (just like C++ is) because generics allow monomorphization and inlining, something C-niles have to emulate with void*.

>> No.66592354

Who is moot?

>> No.66592357

any motivation tips on learning c, c++ and java?
I think I want to die lads
and I am just on format specifiers for c

>> No.66592359

A very simple Roguelike (with inventory, monster pathfinding and a few levels).

>> No.66592369

He owns Reddit

>> No.66592391

use macros nigga

>> No.66592408

looking for a good resource to learn Spring

>> No.66592445

>format specifiers
So it's your first hour with the book? Congrats

>> No.66592480

Wrong, real world Rust is limited to single threaded code that's 30% of the speed of the equivalent C
No human being is smart enough to write fast or concurrent Rust because it's a dumbed-down language for web "devs" to hack together their inefficient code without understanding what they're doing
C is a simple language with straightforward rules, the rules of Rust are arcane and it uses outmoded operators like := that nobody can understand

>> No.66592481

literally the third week of the class
and I still don't get it or maybe the instructor is really fucking specific about the format that I really want to die

>> No.66592518

>Microsoft's Powershell : Take lots of inspiration from bash
>Microsoft's WSL : emulates linux system almost perfectly with bash included
Why the fuck they have 2 buggy projects just to emulate linux experience in Windows??
Can't they just ditch the powershell and use their WSL project to fully integrate linux system

>> No.66592528

that doesn't scale to nontrivial cases. C++ and Rust can get these benefits in complex/higher-order cases where achieving the same effect in C with macros would quickly become legitimately intractable (and unmaintainable)

>> No.66592537
File: 32 KB, 632x352, not_slow.png [View same] [iqdb] [saucenao] [google] [report]

>single threaded code [is] 30% of the speed of the equivalent C
>Rust because [is] a dumbed-down language for web "devs" to hack together their inefficient code without understanding what they're doing
>Rust [..] uses outmoded operators like :=

>> No.66592546

Do you have to attend the class? When I was in CS I only attended very first class of the course for briefing. Classes are meant for the lowest common denominator and so that they could pass. I just read course literature and was light years ahead of everyone who learned by going to class. Maybe your school is different.

>> No.66592561

>posts graph showing that most Rust code is slower than 75% of C++ code
>thinks this is a victory for Rust
rustlets really are retarded

>> No.66592565

Powershell is much more than just bash for windows, it's built around .NET and focused on working with .net objects as opposed to raw strings bash is built around.

>> No.66592574

>emulate linux experience in Windows

You do know that Microsoft's first OS used a shell just like any other, right?

>> No.66592577

Try doing things because they're fun. If they're not fun, approach them differently to make them fun, even if it's less "efficient" at least you'll actually do it. If you can't think of a way to make something fun, then it's probably not for you.

>> No.66592603

>Less than x1.5 times slower than C/C++ code, which have been tuned for decades now, compiled by state-of-art compilers
And don't forget Rust's code provides guarantees C programmers could only dream about, like guaranteed memory- and thread- safety for safe Rust.

>> No.66592620

Pacifying the borrow checker is not a productive use of developer time. These guarantees come at the cost of mountains of boilerplate and inefficient workarounds for things that are trivial in C or C++.

>> No.66592632

>complains about boilerplate

>> No.66592656

>Real-world Rust is actually faster than C (just like C++ is)
top kek
>because generics allow monomorphization and inlining, something C-niles have to emulate with void*.
First of all, C doesn't have to emulate inlining with void *. You can do inlining just fine without void *.
Secondly, monomorphization is possible without generics OR void *, using function pointers, though I admit that's just as bad. Finally, monomorphization is bloat. Generics are completely unnecessary because there are only three useful types: chars, ints, and pointers. Everything is a special case of these. Arrays and vectors are both pointers. You don't even need a struct for a vector, it's just a pointer that you can call realloc on. And those are all the types you'll ever need. Anything else you might typically represent with a type can just as well be represented with functions on this minimal collection of types. Frankly you don't even need ints, just pointers, because pointers are integer types and can be used like numbers, but that would be stupid, especially since there's no guarantee the width necessary to hold an address your processor can reach is the same width necessary to hold the a number it can work with efficiently. Anyway, point is, not only CAN you have nothing but these three types and do everything else with specific case-by-case functions, that's what you SHOULD do, because A) it's not very hygienic to let yourself get confused between what parts of your program are code and what parts are data, and B) even if you could write a similar function for a wide variety of "types" (that shouldn't even be types because they describe behavior and organization, not data) using generics, if it behaves differently for different types under the hood then calling it the same is misleading, and if it doesn't then it's not generics anyway.

>> No.66592658

>Pacifying the borrow checker is not a productive use of developer time.
>Finding and fixing obscure memory bugs is
>Debugging data races is
>Reinventing the wheel 'cause the language doesn't have generics is
>Reimplementing basic functionality because the standard library is shit is

> mountains of boilerplate
> coming from a language without closures, pattern matching and generics

>> No.66592664

Where can I go read about what older C was like? Things like the implicit int return type

>> No.66592692

>chars, ints, and pointers
If you're gonna ask for the simple sugar of chars, might as well add doubles/floats. Pointers are just ints.

>> No.66592694

>the only library which exists is the standard library
life as a rustfag

>> No.66592696

>Generics are completely unnecessary
>there are only three useful types: chars, ints, and pointers
>Frankly you don't even need ints
> [you SHOULD] have nothing but these three types and do everything else with specific case-by-case functions
Is this a pasta? Doesn't matter, it is now.

>> No.66592699

>>Finding and fixing obscure memory bugs is
>>Debugging data races is
These don't cost developer time though. You don't have to spend time doing these because profiling tools do them for you.
>>Reinventing the wheel 'cause the language doesn't have generics is
Generics are not useful for anything ever. All they do is bloat out your program and hide the truth from you by making a bunch of things that are fundamentally different operations all look the same, all just for "muh readability" and "muh expressivity."

>> No.66592711

>First of all, C doesn't have to emulate inlining with void *. You can do inlining just fine without void *.
C's linkage model makes it difficult to do this properly.

>> No.66592724
File: 75 KB, 403x448, YCn1-48W_yTMMSPyWsQs0ZEA0UxXq1mcVpcrRNgcdWs.png [View same] [iqdb] [saucenao] [google] [report]

>putting your code in the header, prefixing it with the keyword "inline," and leaving a comment to the effect of "this is just in the header to enable inlining, don't rely on it as a consistent part of the API" is "difficult"

>> No.66592728
File: 341 KB, 640x640, horse.jpg [View same] [iqdb] [saucenao] [google] [report]

what's the best functional language for backend wev development

>> No.66592738
File: 57 KB, 567x561, autism.jpg [View same] [iqdb] [saucenao] [google] [report]

>Generics are not useful for anything ever.

>> No.66592748

>might as well add bubbles/bloats.
>Pointers are just ints.
Wrong. Pointers are integer types of the greatest width necessary to store any address addressable by the processor. Ints are integer types of the greatest width the processor can EFFICIENTLY work with (or fucking SHOULD be, FUCK YOU X64). Chars are integer types of the processor's byte width.

>> No.66592751

tfw you rewrite your python scraper to use async i/o and it reduces the run time from like a few hours to 20 minutes or so
the only drawback is that I do everything inline and it requires like 3 GB of RAM when it builds large lists of links and response objects but that's a trade off i'm willing to take

>> No.66592774
File: 32 KB, 1497x1846, 9781785880322.png [View same] [iqdb] [saucenao] [google] [report]


>> No.66592790
File: 45 KB, 280x400, 2342387.jpg [View same] [iqdb] [saucenao] [google] [report]

Oh god, why there are some many of them?

>> No.66592802
File: 42 KB, 500x623, lrg.jpg [View same] [iqdb] [saucenao] [google] [report]


>> No.66592807

It's true though. The idea that generics are useful is a meme shilled by language devs. The supposed use case is when you need to have the same operation available on a number of different data types, but you need the specifics of how it's achieved to depend on the data type. This use case is contrived and does not exist in real world development. The notion of the C programmer explicitly writing out many different functions that are all basically the same except working with different types and having names that differ only in some indication of which types those are, is a myth. Only retards do that. Everyone else doesn't bother because they know you are only going to need one of those functions, or at most three, since there are only three useful types.

>> No.66592817
File: 205 KB, 600x674, hero.png [View same] [iqdb] [saucenao] [google] [report]


>> No.66592827

Guys sorry if this is dumb, I don't do this a lot, what's the right way to build this https://github.com/psxdev/ps4sdk/tree/firmware505 in Linux?
Just run 'make' in the directory? On Ubuntu 18.04 if it matters, I installed clang 6.0 already

>> No.66592829

That's how it works in C++. In C you need to have an extern inline declaration in exactly one translation unit or you risk linker errors.

>> No.66592830
File: 5 KB, 228x221, hx4Prda.jpg [View same] [iqdb] [saucenao] [google] [report]

>the aboslute state of webtoddlers

>> No.66592885

>That's how it works in C++. In C you need to have an extern inline declaration in exactly one translation unit or you risk linker errors.
The hell kind of retarded build system do you have that works like this?

Your code:

// some_func.h
inline void some_func(void) {
// code

// some_func.c
// Oops there is no some_func.c you fucking brainlet

Your result:

$ cc *.o
E: You fucked up moron

???? ???? ?? ? ?? ? ?? ? ??
Doesn't work like that pal. I think you must have done something like this:
// some_func.h
inline void some_func(void);

// some_func.c
inline void some_func(void) {
// huuuurrrr duuuuuuuuuuurrrrr duuuuuuuuuuuuurrrr what the fuck am i doing i cant program durhurhur

>> No.66592909


>> No.66592913
File: 31 KB, 720x515, Understanding_CPU_Dispatching_in_the_Intel®_IPP_Libraries_Intel®_Software_-_2018-06-21_11.43.15.png [View same] [iqdb] [saucenao] [google] [report]

This is what typlets actualy believe.

>> No.66592955

Okay well library development is different, you have to make all the different versions of the function for different types not because (You) are going to be stupid enough to use them all but because you know SOME FUCKING RETARD out there is going to try it and they're gonna whine and complain when it doesn't work for subhuman shit-types other than the three master types.
So really this is just another case of the REAL typelets making everything worse for everyone else.

>> No.66592957

Whether or not an inline definition is used is up to your compiler. If the compiler decides not to use an inline substitution for some function call then it will generate a reference that your linker must resolve.

Turn off optimizations and your compiler will almost certainly refuse to use inline substitutions. Then you can find your linker errors easily.

>> No.66592976

>Whether or not an inline definition is used is up to your compiler. If the compiler decides not to use an inline substitution for some function call then it is retarded.
>Turn off optimizations and you are also retarded.

>> No.66592997

>This use case is contrived and does not exist in real world development.
t. Fizzbuzzer.

>> No.66593006

New thread:

>> No.66593011

>Writing fragile code that breaks if you so much as sneeze at the build flags
>Turning on optimization flags for debug builds of code with many inline functions
Shoo smelly Pajeet.

>> No.66593029

14yo RMS, is that you?
The commie revolution hasn't gone well sir. No one is using linux oops I mean GNU/Linux. The freedom of the people is in the filthy capitalist pig hands of Apple and Microsoft. Things are really bad.
Get back in your time machine and go make things right. Hopefully this future will soon be retroactively replaced.
Also, educate yourself. Things are different now. You don't have to use C and lisp anymore.

>> No.66593056

>extern inline declaration
What the fuck does that even mean lol. You cannot inline the thing which is not defined inside compilation unit (inb4 LTCG).

>> No.66593107

#pragma once
inline void foo() {}

#include "foo.h"
extern inline void foo();

foo.o will contain the out of line definition of foo in the case that the compiler decides not to inline a call to foo somewhere else.

>> No.66593204

>Ints are integer types of the greatest width the processor can EFFICIENTLY work with (or fucking SHOULD be, FUCK YOU X64

>> No.66593262

On many compilers for 64 bit platforms, an int is 32 bits for legacy purposes

>> No.66593598

Well what is it then Einstein?

>> No.66593976

What is the best resource to learn Kotlin? I had a look at the highest rated Udemy course, but apparently it's by some filthy pajeet who makes a lot of mistakes and has a horrible accent

Name (leave empty)
Comment (leave empty)
Password [?]Password used for file deletion.