#programmers-off-topic
1 messages · Page 90 of 1
I saw it as a proposal but I didn't think it would be adopted so quickly
Yeah it was a very common page element
it comes with the niceties of responding to clicking outside of it or pressing escape
if you want it to
And also easier to disable if pages are abusing it
I'd be more interested in it compiling brainfuck to llvm ir
I want optimized brainfuck
What's backlogged
Can we get that for books
there's probably at least 5 sites for that already
goodreads is the most popular
speaking of books I'm now 20% of the way through House of Leaves and ran into ||The Minotaur|| for the first time. this should be exciting
apache is terrible, I am very tempted to just wipe the whole server and use caddy instead
on goodreads I have to read terrible opinions from illiterati though
caddy is very nice
i've been meaning to not use apache but it does work good enough
I was trying to install copyparty and add it as a subdomain and suddenly I remembered how awful it was to fuck around with apache config files
I spent hours setting up https last time
It would've been even worse if I hadn't been able to quick-edit over ssh
the ultimate downfall of all of these review websites is that it turns out they're largely populated by human users
and being (allegedly) a human user myself, I can confirm that we are terrible at group consensus
isn't it just
- a2enmod the ssl module
- hello i would like my ssl cert please
- add two lines to config
- probably change listening port to 443
- restart apache
In theory yes
i personally prefer npx serve or python3 -m http.server
Oh yeah, caddy is literally three lines to set up the reverse proxy and get https workin
In practice, the ssl module had other dependencies and kept running into configuration errors, and it was not super clear what all needed doing. The official manual didn't mention the problems I was having at all, and various online sources disagreed with each other
caddy my beloved
I'll be real I don't actually understand ssl certificates
which part
the signing by higher authorities, the concept of asymmetric encryption?
what is it actually protecting against? it's extremely easy to get an ssl certificate regardless of whether the website is trustworthy or not
the point is that only the website owner can get the cert
so it's to prevent someone else from trying to impersonate your domain or something?
or decrypt the traffic
so unless:
- a certificate authority (e.g. let's encrypt, cloudflare, google, etc)'s private key to prove they made the certificate is breached OR they have intentionally installed a malicious certificate authority's public key (e.g. job/school does filtering on https traffic and they force you to install some software)
AND - somehow the domain is pointing to a different server (ip routing messed up, country doing it, dns provider breach, someone manually changing their dns settings, etc)
the data will be only decryptable by your server, and if the user ignores their browsers warnings only then it's bad
hmm ok that makes sense
and the responses are encrypted too, since aside from the initial handshake it's not actually asymmetric, that's just to decide on a shared secret and then use a symmetric algorithm (aes, etc)
I had never really connected the fact that the encryption part of https had anything to do with the certificates
ah
I'll have to figure out ssl certificates again some time in the near future when I set up this website
if you're going via cloudflare they provide one for cloudflare -> user, and you can generate ones to encrypt the traffic from your server -> cloudflare
oh no I would be murdered in the streets if it touched a cloud service
oh this is your work thing again
yeah
is this going on the public internet
I mean you do cause stuff like entra authentication is literally just not allowed from an http connection
ohh true
I mean it allows localhost
that's it tho as far as http connections go
I'll figure it out I'm sure
it's just an annoying thing I don't want to have to think about but have to
I want to just hand over my code to someone else who does the server stuff
fwiw if you do have your own CA that's installed on all the clients afaik it's just one openssl command to generate the certificates
and then you can just use those in any normal https server
they're windows servers so I don't think it's openssl
I guess openssl does exist on windows
pretty sure it mostly has its own certificate system tho
still the same cert format
it's just another step above other stuff necessary to set up a release pipeline
all stuff I've just never really had to do before
I can figure it out for hobby stuff but that's all very simple... and linux
don't forget you'll have to redo the ssl cert in anywhere from a few months to a few decades
yeah they just got new ones so I'm safe for a while
I'll have to look into nodejs hosting on windows servers
all I know is IIS
and saying I "know" iis isn't even really true
it's just extremely easy with .NET projects
yeah I mean but there's more to it since node is single threaded so you usually run multiple instances with a load balancer
true
I know I'll figure it out I just don't look forward to it
it's funky. Like there's a thing called iis node to run a node server in IIS and it's owned by microsoft but it doesn't seem to get any updates whatsoever and the readme says it doesn't work on anything beyond windows server 2012
but on the other hand they claim it's used by microsoft azure
lmao
If you are in the (somewhat rare) situation of needing to host a Node.js app on a Windows server, the most common scenario seems to be using a reverse proxy. There are two ways to do this: 1) using iisnode or directly. We do not maintain these resources and recommend using Linux servers to host your Node.js apps.
this is straight from microsoft's own docs
I think I'll just try to get them to put this on a linux server instead
it's recommended by everyone and it's an environment I understand a lot better
common windows L /lh
Was very confused why chu no longer had blacksmith. Really should update my mobile app at some point
perhaps
holy shit
my login greeter has been broken for months
and it looks like with this latest update it finally works again
Actually, I think they changed it to actually print out an error message instead of failing silently
I had a ~/.profile file with a single, invalid line in it that was causing shit to crash
this is great news
Login greeter?
uh I use some generic lightdm one iirc
I had to log in via just the TTY prompt, then immediately run a script in my home directory that would start the wayland shell
which like, was two extra button presses
but now im free
And you use the animated flames background, right?
I may use the new swirly color one
im starting to see the appeal of [neo]vi[m]
I want to love it.
I only need the vim control scheme
Ah yes neovi
Supports lua scripting but not visual mode
Vi is kinda nice actually I just keep forgetting less-used keyboard shortcuts
I use vim at work
I pretty much only use it for ssh and git
I use vim for git only
I used to use it for a job I was too lazy to set up remote vscode for though
And during college, there was a Linux server we got accounts for to test our programs in the environment they would be graded on
the vscode ssh server has always tanked the server's performance for me
I use vscode at work, but only for its debugger. I use neovim foe everything else
There was definitely that problem occasionally
@supple ether yea, I am partly fueled by the fact that we've been navigating menu buttons with controllers since the beginning of gaming so it shouldn't be this hard, but I have also read GMS just makes it even harder.
I've been trying to wrap my head around the problem and what I've landed on is creating a cursor object to move around and "collide" with the buttons, but it's been a struggle every step of the way.
The main issue IME with ui in gm is that you have to do everything yourself and there's no object hierarchy
It’s not as hard if you don’t support mouse to begin with! /s
as I keep saying, we need to go back to tuis
Honestly I like it
oh i love using react
(context: https://www.npmjs.com/package/ink)
I am so sad now
tbh anything that hides the insanity of escape codes and all the jank hacks required to make that style of UI is a win
[2;32m[2;31mH[2;33mow [2;34mD[2;36ma[2;35mr[2;30me [2;41m[2;31my[2;33mo[2;32mu[0m[2;33m[2;41m[0m[2;31m[2;41m[0m[2;30m[2;41m[0m[2;30m[0m[2;35m[0m[2;36m[0m[2;34m[0m[2;33m[0m[2;31m[2;40m [2;45ms[2;36ma[2;31my [0m[2;36m[2;45m[0m[2;31m[2;45m[0m[2;31m[2;40m[2;44m[2;30mt[2;36mh[2;33ma[0m[2;36m[2;44m[0m[2;30m[2;44mt[0m[2;31m[2;44m[0m[2;31m[2;40m[0m[2;31m[0m[2;32m[0m
since when does discord support colored text
thats syntax highlighting
the ```ansi
[2;34mhouse[0m
doesn't work on mobile, but syntax colors don't work on mobile to start with
What the heck, why does discord have proper console color code support
(I copied the text of your message and looked at it)
I think it's using some third party library that supports syntax highlighting on fucking everything
except, as people have noted, they refuse to add it to mobile
Getting IRC flashbacks (in a good way)
though those are more ANSI terminal colour codes rather than IRC
the reply UI also doesn't render it either
lame
stop using mappers, use facet
*looks at facet... * mapper
I don’t know what either of them are
The Best Way To Map Objects in .Net in 2024 https://share.google/JF6kVsK1cBb1o48pt
This is definitely 99x less interesting than i thought ngl
Yeah I didn’t realize there was a special term for this
It’s like when I heard about “dynamic programming” in college. Like… it’s just caching, why do we need fancy lingo
And why are we calling it memoization. Like, what?????
wow are you saying you dont memoize daily
I have literally never used the term, I just remember being confused why there’s a new term that means the same thing
Being self taught, there’s so many things I have “just coded” and then at college they might say “oh so you just florganbrineltooted the data”
...don't tell @red crest I made up a word so soon after #1387907186713301072 message
oh thank god it’s not just me 
also unrelated question casey. is there a particular reason to calculate frame durations for animations in terms of game ticks instead of ms? for uh, games in general, of course. not any particular game that would be on topic
No, I think actual frame time is better. But for a fixed framerate game, ticks can be fine (especially if you're a lazy mod author cough )
it's clear y'all don't make web APIs smh
Now if someone made a "higher FPS" mode for said game, then there might be problems 😛
me: casey must have had a reason for doing it this way instead of the equally short ms way, but I think ms is more intuitive so I will tentatively use that until she inevitably tells me the very obvious thing I’m missing
casey: 
90% of casey's code design is "laziness" 😄
hey, I’ve made a few! but why’s that
Sometimes it's optimized for future laziness
Lol
Although it would need to be <T, U> to be a mapper
Also crumble I'm in python
It's fucking dictionaries all the way down
Aren't you glad I'm retired from modding
No
damn it's kinda mapper
Just means you need to go back and turn it into a facet or whatever
ok so a mapper is simply a method that takes the properties of 1 object of type A and then creates an object of type B where the values of object type A are mapped onto type B (based on property name usually)
smh why are we making special names for simple things like that
they're used in APIs a lot to avoid exposing the entire internal/database model in your public facing api
"Here, take a look at my combining matrix functor!"
looks inside
It adds numbers
What's a haskell
While you learned from the likes of leftpad
(/s)

I built myself my own utilities. Badly
Wasting large amounts of my precious time that I could have spent making more money
for a long time the entire industry used the same mapping library (AutoMapper) which worked through reflection which came with a bunch of issues both in performance and compile time error checking
a lot of people started saying we should be writing the mappers manually
Are we using sourcegen now
facet and mapperly are source generated mapping libraries yeah
I'd guess most of the industry is still using AutoMapper
cause enterprise moves slow
Huh, okay
When does it not 😔
Which requires it to be known at compile time
well idk tbh. Automapper became paid a few months ago instead of free
and it's really easy to replace
Clearly
there's tons of other (better) mapping libraries that have almost identical APIs
My dumb ass did it with linq expressions in an afternoon
yeah though it obviously doesn't offer quite as much as the libraries do..
Lol
Sounds like atra needs to go back and improve it
definitely the right choice over just contributing to one of the existing offerings
I meant as an excuse to get atra into modding adjacent stuff COUGH
Smh. I don't like atra's mods and don't think they were fun anyways smh
why won't firefox let people use the local translation stuff :(
chrome is the only browser supporting it and that only seems to be via the AI integration
Also to peel the curtain back a little bit, I'm at the stage of my personal finance journey where I'm insanely worried about money for no good reason and keep on trying to go above a 75% savings rate and am starting to realize that I'll need to bring in more money for that. And I'm willing to do it.
I want to buy a house and keep my 1yr emergency fund and build up a house repair fund and keep a good portion of my net worth in stocks anddddd
Is the firefox translation not local?
75% savings rate...
mozilla seems to claim the opposite
that it stays local with theirs and not others'
honestly at this point it sounds like a financial trauma
50% savings rate is already really impresive
and watching/listening to too many finance people
finance people online are my worst enemy
it is but a page can't programmatically call it
so i can't do slightly cursed things like this without the google translate api
truly rough
nothing like having to escape format strings in js because you're writing js with js
i do really enjoy writing tiny scripts to generate html and just avoiding css
i use neovim btw
always through javascript was too usable
should've written javascript with javascript
i am
if only there were 750 million html templating libraries
but i don't need one!
all i need to do is make a button to translate stolen mod names
can even use HTML web components now
why would i need that
ah I see what you’re doing
i have a for loop
unfortunately, english->zh translations don’t tend to be direct, and a literal translation back will often be nonsensical
as you're face with the translation "horse lagoon" and try to figure out what that might've been
oh wait opposite direction
You could learn to speak mandarin 😛 I’m sure that would be an easy shortcut
uh 馬uh
big time investment
Easy hack
It’s the shortcut They don’t want you to know about
this is|| cjb item spawner||
I guessed as much 😛
horribly on topic now
Honestly i think it’s impossible unless you already know what mods are out there
what's impossible
There might be NLP libraries to help find closest match given a dict of all title/description pairs for mods
I'll translate it from very scuffed japanese instead. Thing creation thing ??? soul need like thing, very !!! convenient
ohh that
Guessing what mod from google translate of a google translate programmatically
Like i think us humans who already know most mods are decent at this but idk how to automate
mhm
tbh ai mightn't be horrible at that
llms are good at translation yeah
almost like being a language model helps with language
translation and the "is this double translation probably talking about this untranslated mod name"
I was thinking like word2vec and closest vecs but I’ve never actually played with that
they're still bad compared to a native speaker but a lot more competent than the old-school machine translation
I’m very old and behind the times
Don’t know any of this newfangled “LLM” stuff 😛
(Ok that’s a lie)
(But I am more knowledgeable about other ML stuff so it feels true)
it's actually LML and stands for Large Machine Learning
github wdym
oh wait some people have arachnophobia
oh it probably rounds it
Earth lore dropped (arachnophobia warning)
It true, not too bad for me but understandable to hide
Clearly Python and html are the same
Also snek can be scary
“They’re the same picture” meme
why can't my browser run python
it can
- pyscript
- wasm
- (chrome only) window.ai("give an approximate result to this python code: ")
it's not even in the link you sent
it just shows 3 things I'd kinda expect for a window api
|| I just lost the game 😔 ||

why did chrome publish nothing on this
doesnt say window.ai but its this https://developer.chrome.com/docs/ai/get-started
It is making some progress elsewhere though Firefox and Safari have technical questions as to how it should work further, but the model isn't part of the spec
It running Gemini is a chrome specific thing, Edge for example uses a Microsoft small language model instead.
I'd rather the standard say "no LLMs allowed" 😔
only LLMs allowed

I'm open to it being a thing as long as it stays on-device only
I was tempted to experiment with it for my monopoly game to make ai opponents, and I definitely don't want to actually pay for hosted models so using the local compute the browser has access to is ideal
massive language models
i have discovered splitting in neovim this is so cool (censored the disgusting on-topic parts)
I've been using trainchinese!
slowly you shall adapt....
is there a reason to do it inside neovim as opposed to tmux/screen/whatever else doing it, or the terminal itself natively doing it
you can pass buffers etc between them
there's a really fun vimdiff mode that uses it
it's generally better to split within neovim so the lsp is only running once instead of for each split in tmux
I believe there's some way to set it up so each open instance of neovim uses the same lsp server but that's more effort than just splitting within neovim
Yeah, the main reason is so that both buffers would have access to the same set of registers, macros, etc
Otherwise you have to always use the system clipboard register
remember when generative models did good.. that was cool
there are generative models that do good I suppose
Ugh, windows 10 phaseout
I don't wanna deal with it
My current laptop doesn't support windows 11
I do not want to buy a new machine
I broke my linux partition and forgot to fix jt
I'll have to pull data off it onto a spare drive and reformat the entire computer as arch linux, become even more insufferable
And blame Bill gates
Great news if you paid them money tho you get to have windows 10 longer!!
But then you have to pay the subscription ☠️
sounds like a great chance to refix the linux partition
I really should tbh
They can't
But it'll get more insecure
And nothing ties me to windows
I can run everything i need on Linux because all I do with mg personal laptop is web based anyways
Sheepherds! is a friendly and playful co-op game for up to four players.
You and your sheepdog buddies guide fluffy flocks through colorful flower fields to dye their wool…and make cool clothes for you and your friends.
Take your time and have fun barking, running and discovering magical places together— or take on challenges to win treat…
Q4 2025
Title result: Sheepherds! on Steam
I'm amused
how are you of all people sharing an unreleased steam game
looks nice tho
reminds me a fair bit of Summerhill though that's a very different game ultimately https://store.steampowered.com/app/2324410/Summerhill/
Summerhill is a story-driven puzzle adventure game in which you play as a young shepherd and their dog. Rescue your sheep, bond with your faithful dog, and delve into the mysterious, long-forgotten world that lies beyond the borders of home.
From the BAFTA-nominated development team behind the critically acclaimed Alto’s Adventure series…
To be announced
Title result: Summerhill on Steam
the booming genre of sheep herding games
(Knitting discord)
Mod the dogs into cats and I'll play it with you
shepherd cats
Not-so-regular reminder that this video exists
https://www.youtube.com/watch?v=m_MaJDK3VNE

(We can take bets on when I'll have the free time for anything(
(If you really wanted to play it I'd play it with you without any mods, I just had to make it clear that cats are superior)
I'm not sure i actually want to play it as much as I thought its existence was amusing tbh

do you think they would be any likelier to play it if it was released 
no
unless atra saying they're not a gamer is as much of a lie as them saying they're not a programmer
(I say I'm not a professional programmer which is true.)
As much as I hate to give it to you, that is technically correct. 
is it?
smh suddenly adding extra qualifiers to escape by a technicality
don't you program in your day job 
Atra: But the day job is primarily other things, so technically no!
verilog is technically a hardware description language not a programming language

god looking at verilog definitely feels like I'm transported back 40 years in language design
inst inst
shoutout to transparent backgrounds
why would a code screenshot have a transparent background 
for the dark mode users
to mess with people
wait a screenshot has a transparent background?
actually
well I assume that was originally a screenshot
how did someone take a screenshot of code with a transparent background
but it's not MY screenshot
New quote added by atravita as #6556 (https://discordapp.com/channels/137344473976799233/1215712021207720006/1406332218179190984)
Begin end my nemesis
it's ok that's also in elixir and that came out in 2012
this is why my lecturer once told me my pseudocode was too pythonic and therefore incorrect ig, it didn't use begin end
It's really subtle but my ide doesnt auto highlights on begin/emd
But does it for parens
sounds like it's probably an old regex based code highlighter
instead of the newer semantics based highlighting system
shoutout to treesitter
you're in luck

neovim does support treesitter
vim presumably does through some plugins
emacs got treesitter support back in 2023
tf
literally yesterday
(helix editor)
o
verilog support already existed
I'm in systemverilog or verilogams
I'm not putting in the mental energy to tell them apart
It extends the event-based simulator loops of Verilog/SystemVerilog/VHDL, by a continuous-time simulator, which solves the differential equations in analog-domain. Both domains are coupled: analog events can trigger digital actions and vice versa
math 
Yes
Poll time: Valid use of ternary or borderline shitpost material?
var targetPos = FA_PrioTreasure
? (Math.Abs(bar.treasurePosition - bar.bobberPosition) < bar.bobberBarHeight * Config.FA_DualTargetingBarPercentage
? (bar.treasurePosition + bar.bobberPosition) / 2 // Target both if they fit within a 10% margin of the fishing bar
: bar.treasurePosition) // Otherwise, just go for the treasure
: Math.Clamp( // When targeting the fish, try to predict its future position without overshooting its own target...
bar.bobberPosition + bar.bobberSpeed * Config.FA_PredictLinearFrames,
Math.Min(bar.bobberTargetPosition, bar.bobberPosition),
Math.Max(bar.bobberTargetPosition, bar.bobberPosition) // ... and add an offset relative to the bars position and size to bias the bar towards the center and improve reactions to the most common moves
) + bar.bobberBarHeight * Config.FA_RelativeOffsetBarPercentage / 2 - ((bar.bobberPosition / BobberBar.bobberTrackHeight) * bar.bobberBarHeight * Config.FA_RelativeOffsetBarPercentage);
imo once you start nesting them you should be using an if statement
but that's personal taste
ngl i thought this was decompile nonsense at a glance
I wish C# had Haskells where 
Maybe its because im used to properly-indented nested ternaries that this makes more sense to me than if, but id definitely consider factoring some things out
Personally I'm an inline comment hater
var targetPos = FA_PrioTreasure
? FA_CanDualTarget(bar)
? (bar.treasurePosition + bar.bobberPosition) / 2
: bar.treasurePosition)
: FA_PredictedBobberPos(bar) + FA_CenterBias(bar);
Moving all the lengthy math to well-named expression-bodied functions illustrates pretty well that the ternary is really not the issue imo
Valid in this case because aint nobody got space for 216 columns
I still think the nested ternary is the issue ngl
I'm not a nested ternary fan but at least in this formatting it's fairly readable
I hate typescript prettier's formatting of ternary expression where it puts the ? and : at the ends of the previous line when you do multiline instead of at the front like here... which to me makes it pretty much unreadable so I just make it an if statement
Newlining the ?: makes all the difference, I know people who format it as
x = a ?
b ?
c :
d :
e;
exactly what I was talking about as the default formatting of prettier for javascript
I hate it
Yeah, thats horrible
it's not readable at all
Here's hoping the oxc formatter is ready within the next year or so, so I can toss prettier in the trash for JS/TS
Btw, I never nest more than two levels of ternary unless it's a chain like:
v = a ? x
: b ? y
: c ? z
: idk;
Tough that isnt technically deeper nesting
why cant i make a const string[]
Yes
:(
I think the reason const doesnt work with new has to do with how its impossible to predict how much memory will be needed, or that it needs to be heap allocated
i dont like how it's a different color
😅
but i also have actual runtime static readonly stuff so i cant just change the highlighting
clealry we need zig's comptime
practically arbitrary code executed at compile time instead of runtime
To be fair string[] if it's all known strings is a known amount of memory
Just embed that shit into your dll lol
how does this solve my syntax highlighting problem
fork C#
Would comptime even make sense without NativeAOT
Sure
But yes, zig is based
Depends on what you can put into the il
Embedding strings into the dll is a thing in later c# iirc
yea i dunno
technically you could just have a delimiter seperated list as a const string and split it at runtime kekw
Yes, because in C and its derivatives, arrays aren't reference types/objects
"If it's all known strings"
Also yes
aren't arrays in C just a pointer to some memory address...
Yes
yea
arr[1] in C is literally the same as writing *(arr+1)
i write arr + i a lot
You can even write 1[arr].....
isnt that segfault like, nearly all the time 
oh i see and yes terrible
C# sometimes doesnt let you do what I think should be easy
Like switching over const user defined structs
ok first we get rid of .NET
For example
(User defined structs with no non value type members)
It's all under thr desire for a user defined const capable tupe6
I have a long history of saying "i love c#, but i hate .net", honestly its not as bad anymore tho
I think its one of the reason why starting with C or C++ can be so valuable, you see weird things like this and go "i wonder why", so instead of always thinking about arrays in the abstract, you go in and find out that actually it's all pointer arithmetic, and that knowledge stays with you and offers a really solid foundation
meanwhile people keep recommending to start with python, smfh
I tend to just recommend people to start with whatever language makes sense for what they want to do with the skill
Valid
I'm a python hater tho so I will never say it directly
I'm a python hater
Yeah I also really dont like it. People do cool things with it sure, but but none of that comes from any quality of the language
personally I think people should at the very least start with some statically typed language
the funky ass stuff especially javascript just kinda shrugs off is not great for learning how to do things well
implicit type coercion between types that are nothing like each other is evil
('b' + 'a' + + 'a' + 'a') // 'baNaNa'
I love bananas
when you first need understand everything about a langauge to understand its error messages
haskell...
It's rough 😅
flashbacks to how bad C++ template errors were over a decade ago
How dare you insult my favorite whitepaper
I remember haskell compiler errors being completely arcane nonsense to me when I first had to learn it in uni
(Maybe they're still bad, I dunno)
Yeah, some improvements with common errors but templates are kind of fundamentally unstable
There is one haskell feature I want in every language, and that's where
where is nice sometimes
FL is nice sometimes, just not during the summer. /s
talking about strictly the weather
Yeah, it lets you read a high level overview before going into specifics
And yes, I always define my functions lower than where I use them, thank you very much
I've never heard of where in haskell
...or anything about stuff in haskell specifically, really
ngl even among haskell users where is a criminally underutilized feature
The easiest way to describe it is that you define a temporary variable after you use it in the code, within the same expression
You what
the biggest thing I dislike about haskell is pointfree programming taken to an extreme where people try to rewrite functions purely to be able to omit input parameter names
Ugh that looks backward to me lol
That sounds cursed
basically
z = x + y
where
x = 3
y = 7
Hmm
It's just a more declarative style of code reuse (and ofc deferring details)
Could be worse but I still don't like it
Like the unless statement in ruby
it's nice sometimes
At the very least I'd want the declarations first
Definition is fine, we already do that for C/C++ functions
But like a deferred x, y; or something would improve it a lot in my opinion
I think where would be the best option to refactor this...
... into this.
You also have the walrus operator in python
Which isn't actually related to the conversation
I can sorta see the value in some situations, but I still would rather have seen the variable declared already
It makes it clearer that the placeholders like FA_CanDualTarget won't be used again outside of the expression, unlike a local function.
I just love that it exists
I'll take anything over pointfree programming where you omit parameter names entirely
I feel like I'm missing something, what's weird about this
The struct name being at the bottom
the name of the struct is at the end
Yeah, that's why I can see some value. But I still would prefer something before the calculation itself
I hate it
Same
Kinda spitballing here but something more like
using int x = 3,
int y = 7,
z = x + y;
That's kinda terrible but was my first thought
It's okay, but I think the benefit of getting the high level overview of the expression first is a lot greater than representing the actual evaluation order somewhat
especially in haskell where functional purity is valued a lot
Or
using (int x, int y)
z = x + y
{
x = 3
y = 7
}
I'm fine with the definition being later, I just want the actual declarations beforehand
But hey, not my language 😛
Sir, you have just invented the instant-eval inline function 😅
Or
{
let x =3;
let y=7;
x+y}
it's ma'am I assume that's another haskell thing?
JS example:
z = ((x, y) => x + y)(3, 7)
Oh, so lambdas
No, also sry, I default to Sir for the funnies
But calling them immediately
Yeah, usually you don't do it for this purpose though
I'm just a hater, don't mind me
Dont worry
Maybe an indicator that a "where" is coming later would be enough, rather than requiring declaring everything first
It'd be an improvement but wouldn't make me not a hater, just less strongly of one
At least you're not writing
assign x_twos_complement[3:0] = x[3:0];
assign x_twos_complement[4] = x[4];
Repeatedly
Oh
x_twos_complement_reversed
At least I didnt need to gray code anything here lol that would be funny
z = evaluate (x + y)
with x = 3
y = 7
x_twos_complement_reversed_gray
Even just requiring the expression be in parens before the where would prime you to understand
Can you shadow variables from the outer scope with this?
Like if I add x = 2, y = 4 before that, what would happen
I dunno man, I'm just letting my inner PLTD nerd hang out
Shadowing would be useful tbh
Tbh I still prefer rust's just {} yourself an expression lol
If it doesn't allow shadowing it'd also be fine, I just think about... what if I'm reading code and someone reused variable names, and I see the first line without the rest (like scrolling down in vim or something)
I prefer compiler errors and proper namespacing over shadowing
If it was my language, id disallow it
I think there are some cases where I like shadowing, but it's rare
Super rare, I can't remember the last time I used it
Maybe because C# is less than happy about that stuff
I tend to like shadowing especially for small throwaway variables
Which this is
C# has stricter shadowing rules
I don't like it in python (too loose)
Shadowing is very common in Golang, because of all the ret, err := someFunc() stuff
Python scope is just awesome. And by awesome I mean awful
These days I just make separate scopes instead (though that's kinda a different use case). Like
{
int x = 3;
int y = 5;
doMath( x, y );
}
{
int x = 7;
int y = 9;
doMath( x, y );
}
Reminds me of this talk
I also wish c# was better about redecorating variable names
Re whatting, now?
Ie
str smth; ReadonlySpan<char> smth = smth.AsSpan()
I do this alll the time
Except the span has to be named differently in c#
Ah
So it becomes smth and smthSpan
I've never even thought about that. Yeah, that would be nice
"Awesome: Extremely impressive or daunting, inspiring great admiration, apprehension, or fear."
So many times I have variables like theData or actualData or rawData or ...
I dont think I like this
Why not? If I don't need the previous variable anymore
"redecorating" is supposed to be "redeclaring" right? Or is it about "type decorating", whatever the semantic implications of that are
I'm basically saying "okay I'm done with this being that type. Now I want this type."
Redeclaring yeah sorry
I think that's called shadowing
Same-scope shadowing, you could call it
Shadowing is when you use the same name in a smaller scope
I suppose shadowing is for different scopes yeah
I think you're just hiding the fact that you're working with two different values, of two different types no less, instead of acknowledging and documenting that fact through the variable name
Redeclaring is when you drop the previous and assign the same name to something else
Eh, while it could be used that way, that doesn't mean it's the only way. I think atra's example is a good use of it
Like, I can overwrite functions in C# with pointers, but that doesn't mean it's good
It's best use is when you want the same thing, represented differently
Or in Rust when you can give up your let mut
I think it still only makes sense if the two values conform to the same Interface, in which case, you can already do that without redeclaration
I do see one use case though, one that purely benefits terseness: Compound Call Assignment
Its a very rare language feature, iirc its because it makes the grammar harder to parse, but basically:
!!! THIS IS NOT PHP, PHP IS DUMB BECAUSE IT CONCATENATES WITH . !!!
string a = "ASD";
a .= ToLower(); // "asd"
That does look interesting, but what does it have to do with redeclaration
Wouldn't a become an int
In this case yes. It's kind of a bad example, yes.
I thought that was what you disliked about it, did I misunderstand?
var a = "asd";
var a .= AsSpan(); // span
Yes. Im not saying I like this, im saying I can see how one might appreciate some terseness benefit if the semantics of the two values overlap enough to be represented under one name
As far as im aware, raku is the only "major" language that does this, but it's not statically typed.
How many string types does rust have again, I lost count 😅
only 2 I think?
I guess 3 if you considering &str and String different types
I suppose they are
my brain tends to just view &str as a slice into String
maybe because they used the same syntax as a slice into a string
Might be a bad faith meme
Please, the joke is about number types
Cant be worse than c++ surely
I have used &[u8] a fair few times
Also to be fair Vec<u8>, while it can hold string data. Is not a string
honorable mention to Chars for a character iterator
I think the point has been made either way
The number types look fine imo
Yeah, ofc. Im a total rust noob so I just havent gotten used to them.
I just know rust is based because of its insanely flexible type system. (It even has existential types, the lack of which gave me an existential crisis in Typescript)
the thing that messed with me the most are the 300 different types of structs that hold a memory location. Box, Rc, Cell, RefCell, UnsafeCell, Arc....
honorable mention to Cow
which is just a clone-on-write smart pointer
Weak is pretty important for some data structures
there's also a library that's somewhat popular called ArcCow
A lot of languages could benefit from more explicit copy/clone semantics
I will not get into C++ move semantics 
there's MemberwiseClone but that's a protected method
I remember using serialization to get around that once
Good ol' Newtonsoft.Json
we've moved on to System.Text.Json now 
I say that but Newtonsoft is still everywhere
DeepCopy
don't think that's in regular C#
nah
they're a nightmare once you get into async
it's getting better but it's a mess
async traits kind of exist now but very limited
Ah yes, async rust 😅
it's not pretty
yeah you have to rely on one of the async runtime crates
Either way though, being able to implement traits on someone elses types is cool
the intention was to allow people to pick an async runtime that fits their usecase but in practice is really hard to use them together so you're basically married to a specific runtime and any library written for another async runtime doesn't work
some crates provide implementations for more than 1 runtime but that's a big maintenance burden
so in the end it's just tokio 95% of the time
even if you're not writing a networking application which is what tokio is intended for
yeah though you can't implement traits you don't own for types you also don't own
which is a major limitation at times
Its fine if you just wrap the foreign type
newtyping sometimes works as a workaround yeah
But again, im a bit of a rust noob, so idk how often that causes other issues
newtyping is much more of a pain if you're a library author
if what you're writing is the final product it's not that bad
Makes sense
I pretend I know things about rust
I haven't touched the language in any serious way in years
wait no
in 9 months
My main contact has been with my buddy who is writing firewall software with it, but im more the frontend guy in that project
I'd brag about knowing a lot about C# but I'm surrounded by modding wizards here who can recite the entire reflection api like it's their anthem smh
And hes been stuck on trying to write fancy macros for validating complex relationships in the config kekw
Its not really about being fancy, its just about having a rock solid implementation, validated by rusts type system and compiler
Which is pretty important for a firewall ig
if you do get to the end product eventually it can be good
dont u just use publicizer
We originally chose rust because of sum types
I've spent my fair time making some super fancy overengineered solution only to eventually scrap it for something extremely simple
Or "real enums"
I havent gone too deep into it xD
(i meant crumble re reflection)
I have no idea what publicizer is
good u r no crimes 
I doubt it, the type system isnt nearly sophisticated enough i think
New quote added by chu2.718281828459045235360287471 as #6560 (https://discordapp.com/channels/137344473976799233/1215712021207720006/1406384561033838693)

New quote added by kittycatcasey as #6561 (https://discordapp.com/channels/137344473976799233/1215712021207720006/1406383617630015562)
Huh
private fields is a scam perpetuated by Big Reflection to get us to use their APIs
I had a different workaround when i needed access to a private field
Encapsulation is a scam
OO is a scam
I mean if it makes you feel any better, I've never used publicizer! But guilty as charged re:reflection API knowledge
And to be fair I'm fairly proficient with Harmony transpilers, which is probably an even worse crime
I'd be doing cecil crimes too if not for Pathos never adding it to SMAPI
I wish the standard had become "LSP completion hides private fields unless you type the _ prefix that private fields must all have"
my past year o work has been "wow this sure would be a lot easier if I can harmony things in C"
I actually use reflection once to set a boolean in my unit tests that's private readonly with a 6 line comment explanation of why it exists
I mean, you can! You just have to play with assembly
yes exactly
I know for a fact it's done in skyrim modding
Since I briefly looked into that before deciding I didn't want to deal with it
New quote added by atravita as #6562 (https://discordapp.com/channels/137344473976799233/1215712021207720006/1406385331971817493)
the performance guys would also not like it i think
(That's why I did that emote)
I don't understand emotes!
Oh no! Not the performance guys! What ever will I do if my tetris clone doesn't run on a toaster!
Smh what about the performance gals
Stardew Valley is proof that as much as Minecraft is one of the two most successful modding communities of all time, it could be even better with c#
Imo
(Can you tell I don't tend to care abnout performance much)
I mean MC has harmony equivalent
Also smh my atc simulator needs to be able to run on a raspberry pi
They've had it since before SDV was released
mixins or something
y'all are always interesting for me cause you know things about parts of C# I have never touched and then some extremely widely used library in half of all enterprise C# applications that exist is unknown to y'all
Yeah but they have java kekw
it seems more powerful in some ways
Pre-mixins - transpilers only 🙃
Although it was closer to cecil, since you could add fields and stuff
I even wrote something similar using the same library for another game I considered modding
Can't you add fields with conditional weak table
I don't know what I did wrong but java was being a pain in ways it normally wasn't with MC modding
I remember that there was a huuuge shift in mc modding when mixins became available
Those aren't seen from reflection, or actually stored on the object in general. These were
I legitimately think that an atc game would be fun
You keep saying this but I don't see you making a design document or prototype
I'm not interested enough to learn about it and design it myself 😛
And I certainly didnt expect you to do it
atra, re:your
- the stuff I'm talking about was editing class files before they were loaded into the JVM, sorta like how SMAPI does compat rewrites
Makes sense!
I wonder how moddable godot games are by default
It was kinda a pain because back then your stuff was running deobfuscated, but it had to work obfuscated too for the final release
Tbh I'm glad I'm no longer dealing with mods
I wrote a whole thing for mapping a type name to deobf or not based on the current environment
Verilog hierarchical and also $cgav are enough for me
So I could do my "transpiler" and reflection crimes peacefully
The last thing I worked on on that front was dynamically generating a config screen based on a config class
Don't think I finished it
I know there are tools to unpack the pck files. I believe gdscript is compiled into a bytecode normally, but there's an option in the export process to include the source
One of my past godot projects had a thing for loading pck files into the current game though
The main annoyance I had was the way that godot works, you basically had to extract all the base game files into your module to reference them, then not export those files when packaging it
And the editor didn't have a way to add like an additional filesystem for reference only while in the editor (even with tool scripts)
I should program something 
Unsure if I want to try to finish my angelscript C# binding, or poke around with the homebrew stuff, or continue trying to figure out why updating flecs.net is crashing, or ...
or just watch anime/youtube since I'm a bit behind on that
Ask the botto
I had a whole message typed out but then one of my dad's cats that I'm taking care of for a few weeks finally got out from under the couch after almost 2 entire days so priorities changed
Valid
Cat tax
I hope zed + omnisharp improves soon
I have to send a picture every time I mention to them that my parent's cat gets on my desk
And now I'm subject to cat tax
It completely shits myself for all but one folder in your workspace (but im using an unofficial zed build on windows rn so really it's my fault)
Pillow stair surfing yes
You don't have tooo 
Fully innocent
No jury would convict
Technically he moved a rolling chair, which the pillow was partially on top of. So when the chair moved the pillow fell
I can't really send a good pic of that one yet because I'm very scared he'll flee back under the couch if I try to come close but
CATS
Magnificient.
the scared one once escaped my dad's apartment and ended up hiding in a bush terrified for several days before we finally found him. That clearly caused some kind of trauma so it's already huge that he has left the couch
Poor kitty
they're norwegian forest cat/maine coon mixes. They're genuinely absurdly fluffy
Fluffy cats are the best
one of my neighbor's cats just went through similar
(though they're the "let cats roam the neighborhood" types, that specific cat is terrified of being out)
My parents cat ain’t fluffy 😔
(He’s a bengal)
I grew up with all fluffy cats. I miss the floof
she got out and disappeared for...4 days? but managed to get back and hide under a car for a while
we looked over through every place for miles around my dad's apartment and then when he was ultimately found he was literally right outside the apartment complex
lots of very thick bushes we had no chance of seeing anything in though
My brother and his fiancees cats: Little witch cookie and fat louie
majestic
favorite cat fur type, though I've never had one of 'em
Once we thought my cat had gotten out and couldn’t find him after several hours of looking.
That afternoon while I’m crying in the living room he walked up out of nowhere like “oh hi, what’s going on?”
He probably never left the house, we just couldn’t find him
No idea where he was
Somewhere dark most likely since he’s a black cat and we wouldn’t see him then. But we had thought we checked all those spots
(Checked with hands, so would feel fur)
my mom's cats are outdoor cats though they are now 15 and barely leave the driveway if at all. They used to "rule" the entire neighborhood when they were young
MORE CATS
Kirby was about to turn 19 when he had to be put to sleep
my last was 22 or so, hard to recall because he was born around the same year as me
as seen in this very dated photo
I should probably digitize some of them next time I'm around my parents, I have 2 total 
Floofy
I’ve got some really old pictures of Kirby where he was a kitten
Or used to, maybe that was on an old harddrive and I never backed it up
This one hangs out behind work though
Adorable
ANOTHER CAT
I enjoy how much of today's debugging is literally me being dumb
Anyways
Dinner time
Isn’t like 75% of debugging because of the person who wrote it did something dumb
(Did you know, 197% of statistics are made up on the spot!)
reminds me he was shockingly careful with his claws, compared to any other cat I've met 
grew up harassed by babies but never scratched anybody (so not trimmed often* or removed, unlike my parents' previous one)
my first childhood cat lived till 18 and now my next childhood cats are the aforementioned 15 year olds
my dad's cats are only like 5/6 I think
My childhood cats were all born during the era that declawing was popular and people usually didn’t question it
yeah, my parents considered it but never had an excuse
My twin and I were like 7 when we got them
Cookie always tries to come up with me when I go to sleep in the attic when visiting my parents, but for some reason she's not allowed there, it's a bit of a logistics challenge because it's a door with very steep stairs right behind
also he was pretty good about using scratch posts etc, never overgrew much
Which was probably a factor
he did also tear up a couch, but mostly stuck to posts
Meanwhile Louie doesn't give any f's, ever. That belly is the most wonderful feeling floof in the world though.
Ok, thats enough cat pics from me
none of the cats in my family were ever declawed that I know of
beautiful
I just like to take photos of him
great picture
MOAR CATTTTT
That’s his window watching table
reminds me of this picture of one my mom's cats
cats sitting in a human way is always great
I wish it was easier to adopt cats in germany
Idk how difficult it might be with my apartment
Big cat
none of the shelters near me even have any cats
Unless they really wanna be left alone, youre not allowed to adopt just one cat either
I miss floof 😔
idk about germany but in the netherlands you have to go through an assessment to determine if you're capable of caring for them and that your motivations are good
The big reason why I don't have a cat is I'm out of the house for 14+hrs/day six days a week
Which is basically
Untenable
Yeah, its similar here i think
I havent gone though the process myself, though
I can barely take good enough care of myself 😅
a lot of shelter cats come with a requirement that they can go outside so that's impossible for me
hence why I haven’t gotten a new cat yet since Kirby passed away
2nd story apt
….what??????????
Would a catio work
Or outside outside is required
cause they were outdoor cats before ending up in the shelter is usually the logic
Ah. Hmm
though like i said none of the shelters near me even have any cats rn
strays practically don't exist
I would love a small farm
Barn cats
Chicken coop
Plants everywhere
Grey water system
My own solar panels
Almost off the grid
I didn’t know atras low tech remote commune included cats in the blueprint
Gotta have cats
True
If you don't the mice win
love cats
Also i need to find a like minded person. Somehow
Preferably more than a single like minded person
a 2 person commune
I'm not joining any communes that don't have wifi
are there gonna be wind turbines
Maybe a small wind turbine
I couldn't do a low tech commune since all my hobbies use my PC
But batteries and solar is easier
Well, a few use my phone I guess
a spenny even
Okay, so:
- Updating Flecs.NET - fixing the native code crash is painful, but I had another idea to look into (maybe I broke the code that calculates the size of C# types and converts things to/from it?)
- AngelScript C# bindings - gotta learn more about SWIG to remove the rest of the pointer wrappers (especially the function callbacks, kinda important for this)
- The homebrew game stuff - Basically just explore what I can get running on stuff (still sad I can't get .net to be small enough for GC/Wii RAM)
Decisions, decisions
A and B are for my "main" game project which is too large for me to ever finish realistically
It's funny because a lot of my hobbies no longer require a computer
With C, I have no concrete ideas for what I want to make
What would you like? Cat platformer?
I dunno
Do you start with the gameplay loop and move out?
I did re-remember a game idea but there's stuff to figure out before I code much on it
Well.... I usually don't plan much at all 😄
But I gotta have at least a general setting and gameplay I want
Like the way I'd start doing a top down roguelike is very different from a KAR-like
(Even ignoring the 2d/3d part)
(I'm very dumb and have no idea how gameplay loops actually work.)
Like what's a roguelike
Well, not so much the loop in a code sense so much as from the player sense
Roguelikes essentially you die a bunch, and make progress towards beating it by getting better at the game
Roguelites (k -> t) are similar, but you can get some sort of upgrade between runs based on your previous run performance
it's a kind of overloaded term afaik? meaning both the game event loop and the player's gameplay loop
yeah, roguelike is when you die and start over, basically 
(there is so much forum discussion about the terms, do not read about it)
I mean...a two people commune is a marriage
Wasn't going to
I enjoy roguelikes sometimes, but usually need some sort of persistent progression (which is why I prefer roguelites)
I have a physical mini-notebook for a roguelike where the proc-gen world regenerates whenever you're not looking at it, which seemed fun
With that basic a definition, most old games are roguelikes
probably like a decade old since I decided not to do gamedev
Spelunky is a bit of a weird exception for me liking it, but I play that kinda mindlessly hence why I'm so bad at spelunky 2 COUGH
"noooo it's a roguelite not a roguelike--" keep going and I'll call html a programming language
Okay but I have actual ideas for this too (vaguely).
Basically, the idea is to make a game that's as chaotic and fast paced as my dreams
What hobby should I pick up next
(re spelunky) indiana jones styled cave platformer, go down in a cave w/o taking fall damage*
Since my dreams largely lack object permanence
needle felting
Fwiw. My heart is saying yarn dyeing rn
I love chemistry type hobbies!
This is spelunky
Like cooking or baking