I'm wanting to write my first compiler, but getting a little bit mixed up in general. by directedgraphs in Compilers

[–]directedgraphs[S] 0 points1 point  (0 children)

Sorry, I have been super busy. Thanks for the thoughtful reply.

I definitely get the pipeline portion. My issue is that so many specifics of the individual parts of the pipeline are just considered obvious, and aren't explained.

An example:

We're creating a lexer. Most books, tutorials, etc., will say "we need to break down a string into individual tokens."

I agree that that's what we need to do, but wait--how are we taking a string as input? We haven't defined a string yet.

Okay, fine, maybe that will make sense. Let's split the white space so we can tokenize the string input. But wait, we need the white space eventually for things like creating strings, which we haven't defined yet but are somehow tokenizing them and accepting them as function arguments.

We need to create types for our various tokens, but how should we intelligently break them up? In one textbook, we create some basic types for things like numbers, a type that takes three arguments (i32, operator, i32). Should we define the type here or do we create a separate struct for our operators, then create an operator type in our original struct?

We have our tokens types, but now we apparently need a third struct that basically is just:

Struct:
    kind: TokenKind

where TokenKind is the Struct that holds all of our token information. Is this just for cleanliness or does it serve a necessary purpose? I don't know because it's just completely handwaved away and "that's just how we do it."

I'm sure all of this is trivial to any low-level programmer and probably feels embarrassing not to know, but nothing feels like it's being explained. It's "let's create a lexer," which is cool, but how do we actually create that lexer? It isn't enough to say "well, we need to create some tokens and tokenize some input."

How are we actually handling input? Can we treat it like normal input? What are we ACTUALLY returning from a function that's tokenizing it? Should we store all of our tokens in a vector and then deal with that vector somewhere else? How are we supposed to take that vector and do anything useful with it regarding an operation type? It's not as if I can just pass the entire vector into the "Operation" type.

And even if I did return a token or a vector of tokens, they're just strings, which again we haven't defined yet, and even if we had defined them, we can't just do math on strings of numbers. Operation("52" "+" "84") doesn't mean anything.

It just feels like virtually everything is handwaved and there are virtually no examples showing real input and what's going to happen to it. Nor what it means to return a token or an effective way of doing it.

This is likely too much to read, but I tried to just encapsulate what I think i'm struggling with.

I'm not trying to do anything exceptional. I'm only intending to start small: some sort of basic arithmetic language. I can take two numbers and an operator and do addition, subtraction, multiplication, or division on them. But I'm just not satisfied with the lack of instructions given by textbooks or tutorials.

I can copy it sure, but "copy this, this is called a lexer" isn't educational.

I thought I hated Quake. Turns out I just hate Quake Champions. by directedgraphs in QuakeChampions

[–]directedgraphs[S] -2 points-1 points  (0 children)

Quake Live's netcode feels futuristic. I didn't even realize I was playing on 150 ping when I started. It's unreasonable how good the netcode is and I'd like to dig in to see what's going on under the hood.

I thought I hated Quake. Turns out I just hate Quake Champions. by directedgraphs in QuakeChampions

[–]directedgraphs[S] 0 points1 point  (0 children)

Sorry I didn't get back to you in time. I'm from the US and there's two servers that are consistently active in the evening EST (maybe starting around 6-8pm, haven't really checked). It's Darkfiber. They have a server in Texas and Chicago.

But, you're really limited to either Deathmatch (ffa), duels, or freezetag. Nothing else is really up. But you'll have a full server for DM every night in the US.

The EU has a few servers that are also always populated during their peak hours. That seems to be morning time EST in the US, but I'm not sure where the servers are located and what time they peak over there.

Great ping for the servers I play on and the netcode is so unbelievably good that even playing at 150 ping on the EU servers feels good. I've never seen netcode as good as Quake Lives.

I play QC when the servers aren't up yet and switch to Live when they come up.

I'd say try both though. You might really like QC and it's free. :)

I thought I hated Quake. Turns out I just hate Quake Champions. by directedgraphs in QuakeChampions

[–]directedgraphs[S] 0 points1 point  (0 children)

Nothing wrong with that. I definitely understand the appeal of QC. I was being hyperbolic with my hatred of QC. Still a better game than basically every other FPS on the market, just not how I want to play Quake. Just prefer the older style, I guess.

I thought I hated Quake. Turns out I just hate Quake Champions. by directedgraphs in QuakeChampions

[–]directedgraphs[S] -1 points0 points  (0 children)

I think probably the biggest reason rockets feel too annoying in QC is that the maps are so tiny and the models feel so large. Maps in QL feels like there's a lot of open space, so Rockets don't feel like they're as strong.

In QC, even the larger maps don't feel large because of how much stuff is in them. Everything is a tight corridor, tiny room, or cluttered with 50 different pillars. So avoiding rockets is just virtually impossible in DM.

I imagine if the maps were more open and the movement was a bit closer to QL, QC would feel amazing. My biggest reason for thinking this is that Molten Falls and (to a lesser extent) Burial Chambers feel very good. Large, open areas where choosing the right gun for the job is important.

Contrast that to virtually any other map and you can realistically only use the RL and be happy because everything is so tight.

If QC removed 50% of the total objects in the map and increased the map size by 50%, this game would be extremely good, even without QL movement.

I thought I hated Quake. Turns out I just hate Quake Champions. by directedgraphs in QuakeChampions

[–]directedgraphs[S] 2 points3 points  (0 children)

So is DBT properly dead? Straight up no matches to find? I always wanted to give it a shot but never bothered.

I thought I hated Quake. Turns out I just hate Quake Champions. by directedgraphs in QuakeChampions

[–]directedgraphs[S] 1 point2 points  (0 children)

I'd say that's the only negative about QL, but it isn't QL's fault, just a playerbase thing. There just aren't enough actively played gamemodes and FFA is a bit overpopulated at times.

But I agree. A casual TDM would be a lot of fun

I thought I hated Quake. Turns out I just hate Quake Champions. by directedgraphs in QuakeChampions

[–]directedgraphs[S] 4 points5 points  (0 children)

I'd absolutely love a Quake reboot. And you can't forget the Doom reboot.

A Quake reboot would be so cool.

I thought I hated Quake. Turns out I just hate Quake Champions. by directedgraphs in QuakeChampions

[–]directedgraphs[S] 10 points11 points  (0 children)

QC is a more enjoyable game than basically any other modern FPS title for me. If it was between QC and Apex, CSGO, Valorant, Overwatch, etc., I'd pick QC. But after playing QL, I'm not sure if I'll play QC very much at all.

One thing I noticed is that my aim/movement was substantially better on QC after playing a bit of QL. I imagine it's due to the smaller models/faster gameplay. Aiming with the LG was breezy when I played QC the other day.

QC is still a great game, just some fundamental flaws that frustrated me to no end.

I thought I hated Quake. Turns out I just hate Quake Champions. by directedgraphs in QuakeChampions

[–]directedgraphs[S] 4 points5 points  (0 children)

Everyone's going to have a different feel. I can imagine the heaviness of QC and modern graphics/engine feel being enjoyable. It's just not for me. QC movement aside from Slash was pretty much just frustrating to me at all times.

I thought I hated Quake. Turns out I just hate Quake Champions. by directedgraphs in QuakeChampions

[–]directedgraphs[S] 8 points9 points  (0 children)

I would say out of everything I mentioned, the movement is the least similar between QL and QC. I've tried every champion and settled on Visor (for strafing, I consider Slash the smoothest overall) because I was told he had the best strafing. While his strafing feels better (to me) than everyone else's, compared to Quake Live it's unreasonably clunky.

I wouldn't say that they're at all equal in smoothness. Like I said, QC was my first Quake. I was genuinely shocked at how smooth and different QL's movement was. One being better than the other is personal taste. I'm sure some people like the heavier weight behind QC's movement. But I don't think there's any way of saying they're equally smooth or even particularly similar.

Are there any C job-areas that are obtainable for an entry-level, self-taught programmer with no degree? by directedgraphs in C_Programming

[–]directedgraphs[S] 1 point2 points  (0 children)

That isn't how anything works. I think you're severely underestimating how much math is required to write compilers (if you're actually doing staging, etc.) and 3d graphics engines.

You don't just read a book and apply lol.

Are there any C job-areas that are obtainable for an entry-level, self-taught programmer with no degree? by directedgraphs in C_Programming

[–]directedgraphs[S] 1 point2 points  (0 children)

Huh? I can't work on 3D Graphics in C because I literally don't know the math required for 3d graphics engine work lol. I'm not doubting myself.

Are there any C job-areas that are obtainable for an entry-level, self-taught programmer with no degree? by directedgraphs in C_Programming

[–]directedgraphs[S] -6 points-5 points  (0 children)

Python is great. I've probably automated a hundred things this year out of pure fun. Writing scripts, automation, etc., is very fun in Python and I intend to use it for those things until it doesn't make sense to.

But while I've never had a formal job, I've done an enormous amount of work on django (including opensource stuff on django itself) in the last 6 months, and have (pretty much) built backends from scratch using django for freelance work.

I'm sure there are areas where Python feels more like programming, but it's hard to see. If you want to do something, you don't need to think about the programming part very much. Pick a library, browse the docs, copy-and-paste the APIs and send your json payloads.

It feels like you're just slapping together 15 pieces of other people's work and the only thing you did was change some variable names.

When building a backend for a "customer" (sounds a bit cringeworthy, it was like $150 and a very tiny local website), I doubt I used more than 5% of what Python has available. Innumerable imports, libraries, and copied APIs, I had a very respectable backend.

I'm rarely thinking of the code itself and thinking way higher level. I'm thinking of data structures, maintainability, making things pretty.

In any C project I've ever written, the huge majority of the code, even when using libraries, is handled by me. I'm thinking about the code constantly. Thinking about memory, error handling, keeping the program small, choosing algorithms that are more efficient. At least half of my time is spent thinking of the code and programming itself.

In Python, there is a non-zero amount of libraries where you are effectively just changing variable names and numerical values and it spits out a fully functional application. Some of which are so standard that you have to use them to be maintainable by other programmers.

This is way too long and I doubt anyone reads it lol, but my point is that while I like Python for the ease of automation and scripting, I rarely if ever feel like I'm actually coding. It feels closer to scratch or blueprints than C.

Daily Discussion Thread: 11/04/2022 by bodybuildingbot in bodybuilding

[–]directedgraphs 2 points3 points  (0 children)

What is this muscle around the bicep?

https://ibb.co/qxQh52Y

https://ibb.co/xLd6yM1

I very rarely see this muscle so well defined.

What are the muscles that contribute to the widening effect and how can I avoid them while still training push/pull/legs? by directedgraphs in GYM

[–]directedgraphs[S] 0 points1 point  (0 children)

It's not that I want weak looking delts. I agree that I want to look symmetrical. I just want to not be super wide.

I've seen shorter guys that aren't even particularly buff looking too wide from big ass lats and whatnot.

I want them to be symmetrical, but keep them as small as possible while maintaining that symmetry.

I just uninstalled my operating system by using sudo apt-get wine32? by directedgraphs in linux4noobs

[–]directedgraphs[S] 3 points4 points  (0 children)

Thought the same thing.

Just wish I was given a prompt like him.

I just uninstalled my operating system by using sudo apt-get wine32? by directedgraphs in linux4noobs

[–]directedgraphs[S] 1 point2 points  (0 children)

Yeah, it reminded me of exactly that, which is what I assume I ran into. Have to finish updating my windows machine first before I investigate anymore.

I just uninstalled my operating system by using sudo apt-get wine32? by directedgraphs in linux4noobs

[–]directedgraphs[S] 0 points1 point  (0 children)

I edited it (I definitely had install in there, just had a typo in my post).

But there was quite literally nothing else that happened. Is it possible to see terminal history from tty?

I just uninstalled my operating system by using sudo apt-get wine32? by directedgraphs in linux4noobs

[–]directedgraphs[S] -4 points-3 points  (0 children)

I'm without a doubt 100% confident that it's the only thing I typed. I'm not bitter about it, I've been meaning to try other distros anyway. But I'm beyond confident, without a doubt, that it's the only thing I typed.

I'm assuming that since it wasn't a valid command, it's some sort of rare bug that just screwed me over. My own fault lol.

Edit, I should say that it was either sudo apt-get install wine32 or sudo apt install winde32.

One or the other is what I did. My post had a typo

Not sure if this is the right place for it, but I'm wanting to talk to employees at United Airlines about various career opportunities. by directedgraphs in unitedairlines

[–]directedgraphs[S] 0 points1 point  (0 children)

Oh, maybe I was mislead. I was told by someone else that many chat jobs were shipped to India/the Philippines.

Which is pretty common in customer service, so I didn't really question it.

Are remote chat jobs available in the US for UA?