#programmers-off-topic
1 messages · Page 2 of 1
oh no
(sorry Esca
)
good luck finding anything on Github
I don't think I've had a partial class span more than 2 files
copy paste em all together into one big monstrous file
I feel like a 30 file partial class suggests it might be worth reconsidering if all that should be a single class
having a nice project structure makes me feel warm and cozy inside so I always do it
ok there's an exception
quick cli programs I slap together for testing
that's just a program.cs with everything thrown in
https://github.com/elizabethcd/MigrateDGAItems/blob/main/MigrateDGAItems/DGAClasses/CustomDGAClasses.cs this is the level of emptiness you should be imagining, DH
Oh, geez, one file for those for sure!
might be able to make these one liners with primary constructors assuming it's on C# 12
I don't know what your fancy words mean 😛 I wasn't even sure if I needed a constructor tbh
I am on C# whatever-VS-decided-on-in-.NET-6.0-I-hope
essentialy just
public class CustomerBasicFurniture() : Furniture aka adding some parentheses
i don't think these are even needed
I'm not actually sure they can be ommitted or if it then just doesn't generate a constructor at all
I mean the things they're inheriting from have constructors
I could see it just deciding to use the base constructor
right
But like in the DGA source I don't see constructors in the custom subclasses...of course, many of them are partial so I could be missing things
why cant all IDEs have the same keybindings 
but specifically only to mess with you, sheku 😛
ReSharper for VS has an option for intellij keybindings
but somehow half of them dont actually work...
though a recent version of visual studio added its own ctrl t I think 
it does yeah though I never use them cause vs is what I'm used to
I make my life complicated anyway cause I use the vim keybinds extension for visual studio
I can't program without vim keybinds anymore it just feels incredibly uncomfortable and wrong now
I cursed myself by learning them
which is aquo's fault btw
just want you to know that, he's why I even tried vim
That's why I've never bothered to truly learn it. I just know I'll be cursing myself.
mhh do sdv mods get open source licenses by jetbrains in general? 
i think that's how DH got theirs?
Yup!
how long did it take to get a response?
(and how did you word it?)
i wonder how complete the wii u port was before it was cancelled 
of Rider?
Initial email, request for more information, and then receiving it.
what was the request for more info?
Pretty boilerplate type stuff! If the project provides comemrcial services/is backed by a company, am I/other members of the project paid to worm on it.
Also a request to add my email to the GitHub profile.
I just did this the other day. Took less then a week to hear back, with no follow up requested
mhh technically RSV did commission some art 
I wouldn't have thought that would count against you/people on the team getting the license...
If the art isnt open source idk how that looks on the project itself
I actually added an exception to my repos license for other assets (like vanilla art) but they didnt mention that
uhh can art be closed source? 
I guess our art is MIT licensed as well as its in the same repo
I assume rights go to us if its commissioned.. tho Im not sure 
I get jetbrains rider through my employer rn though I don't use it
Unless the artist had you sign a waiver stating that you do not have rights to the asset(s), then they are yours, I believe? Especially if you paid for them? (disclaimer - I am not a lawyer)
I am not a lawyer, but unless that's negotiated, I don't think that's necessarily true
Hello!
When commissioning for any professional work, there should be an explicit contract stating what is and isn't allowed
(Source: I have bought & commissioned game assets before, but I don't have resell rights for all of those assets)
I hadn't thought of reselling, tbh, but that makes sense in that circumstance.
But to add to open-source....hmm...
Yeah it's hard to say. I always err on the side of "anything not explicitly stated counts as all rights reserved"
Very sound advice, good gentlesushicat
I'm sure a lot of artists who have been commissioned likely don't care/assume that they were giving away full permissive rights when commissioned, but if it wasn't stated, technically the original artist still has all rights reserved
how does selling your game work then?
Resell rights typically specifically refers to selling the art assets on their own
Packaging them as part of a bigger work is what the art is intended for
If I were to take some of those assets on their own & then re-sell them on, say, the Unity or Unreal Asset stores, that would be a breach of contract
This is different from something like Creative Commons Non Commercial, which explicitly prohibits making money in any form from the work or any derived works
ahh
Beautiful 
most confusing thing to me who never uses python except to help random people with their homework and keeps forgetting about the whitespace thing...
the exception you get is terribly vague
gotta make sure I'm in an editor that auto replaces tabs with spaces or my python code can't run...
a complete non issue for anyone who actually has a python dev environment set up but I can't be bothered when helping people with simple homework assignments
I've written python code on my phone keyboard before to help someone. It was awful
me too
I like that most modern languages come with a built in formatter as part of the core language
no endless fights about formatting like in C#
my impression as an outsider is that python tries to do a lot of things that don't seem to actually go anywhere
as a fan of functional programming I appreciate more languages learning the main important lessons from them
idk shit about programming communities
I usually just keep an eye on articles or posts by influential developers for it
used to visit the subreddits before I stopped using reddit
yeah I always read the .net blogs considering staying up to date is kinda important for my job
idk if dotnet has a community that isn't just the gamedev community. I feel like outside that the language mostly lives in a very corporate environment
the communities I pay most attention to I guess are Rust and Elixir since those are my favorite languages
elixir is a rather easy language to learn it's very approachable
it is a functional programming language though so no mutation
no loops
easily
haskell is like the least approachable functional programming language I've ever tried
I had to learn it for uni and have done a whole year of advent of code in haskell
but it sucks to learn and even now much of it goes way over my head
Elixir is incredibly straightforward. It's not particularly fast though in the pure algorithmic sense.
The main thing it excels at use case wise is being able to handle a lot of simultaneous threads, network connections etc while staying incredibly stable and fault tolerant
but that's diving into OTP and the beam VM which is a little much to get into
I think elixir is just a nice language for getting used to functional programming without dealing with the extreme complexity and obsessive desire for correctness in haskell
erlang, the language elixir is built on top of, has its roots in telecom, being built by Ericsson specifically for that purpose. So that stuff is just very well suited for problems where you need to handle a large network of nodes all handling traffic and being able to gracefully deal with anything that might go wrong
it can handle many things itself that'd you'd normally use solutions like kubernetes or stuff like redis pubsub for
the whole ecosystem provides a pretty solid complete package for networking related use cases
I mean if you've used RabbitMQ before, that uses erlang. Discord and WhatsApp and Pinterest also all use erlang or elixir for networking code
not sure how to describe it. Most of what I describe about the networking stuff is generally referred to under the OTP term
elixir has a few modules dedicated to making use of it like GenServer
fun to dive into but should probably just start with all the regular non networking stuff
if you have a passing interest in web development I can recommend Phoenix liveview as well for a more high level showcase of what can be done with it
erlang has a very uh, interesting, syntax
can't say I'm a fan
elixir is definitely easier to get into
erlang will actually be switching to hexdocs next release as well
hexdocs is essentially the built in documentation generator for elixir
think of it like cargo doc for rust
pretty much every elixir library will have a hexdoc page like this
basically what it is. Essentially crates.io
biggest downside I'll say for elixir(though this is changing) is that it's dynamically typed
You say biggest downside, I say "aaaaaa" and run away.
the next elixir release will introduce the beginnings of a proper type system
it's a major project currently in the works
I'd say it's not nearly as bad as stuff like Javascript or python and it doesn't do aggressive type coercion
but still
I don't like it
I love statically typed languages
Okay, that's at least one level above those as it is right now!
in 1.17 officially it will go from dynamically typed to "gradually" typed
moving more to being a typescript than a Javascript. Except unlike typescript they actually have full control over the language
I'm sure it will take many more releases to get there
1.17 is the first step for types, just only doing inference and catching type bugs it can figure out from that
for now only for catching bugs but eventually this type information will be passed onto BEAM and thus the JIT
since erlang is also a dynamically typed language BEAM doesn't have a ton of type based optimizations though they've been expanding on it a lot in recent years
it's an interesting time
can't say I've ever seen a language try to change its type system at a later release years into its lifespan
they've got an interesting solution for doing this called set theoretic types but honestly that goes beyond what I understand at some points
there's some research paper on it
erlang is old yeah
partially why its syntax is funky
elixir is still young, only 12
I've been following its development for four years I think
the creator of elixir, Jose valim, is frankly insane and idk if he sleeps
insane in a good way
you can check almost any large elixir library and he'll be pushing commits to it
not just elixir itself
projects that use elixir too
I'm not sure if there's a list somewhere of what it's funded by
Jose valim himself works for dashbit who have significant interest in the success of the language
tbh idk if José valim works for dashbit or is part of dashbit
it's something for sure
I'm relatively sure the erlang foundation partially funds elixir stuff too
erlang itself is of course funded by Ericsson
considering they made the language
the erlang foundation of course benefits from elixir's success even if they don't end up using erlang itself
why spend so many words convincing people to use a language that isnt nim
it wasn't even my intention it just ended up this way
you can shill nim too though it's okay
oh i shall
the ecosystem, use of their BEAM VM, elixir itself relying on erlang as a dependency
tell us the wonders of Nim
I mean I'm going to bed but I know Nim already from u so it's ok
I'm never sure what the main selling point of nim actually is
python syntax but its statically typed and compiled is basically it
i like its stl as well
looks like python but systems programming language
gasp
A different language and library for each bot. Future task!
hope we don't have to do one in haskell
I want javascript
and then someone else coffeescript, someone else typescript and then nim compiled to js
4 js bots but all different languages originally
is coffeescript still around
i edited a single coffeescript file once
oh no they support https
nim also compiles to javascript
Who wants ColdFusion?
can you use js libraries in nim compiled to js?
like do you have to use discord.js or dimscord
no one
I'm not sure how far the compilation goes. I know they have a bunch of DOM manipulation stuff, but I think you could probably do some FFI thing and use discord.js, maybe
ive barely used their js stuff
That was the year before. I did create a way to compile to both web and natively, but there was some reason i stopped doing the web stuff, but i dont remember why..
alternatively,
// imports.js
const djs = require('discord.js')
globalThis.djs = djs
// compiledNim.js
require('./imports')
const bot = new djs.Client(...)
its javascript, but with more steps
and we all know the Javascript community loves Javascript but with more steps
preferable if it comes with 3 more configuration files for your repo
*sits in many typescript and svelte repos*
i spent a long time figuring out how to compile rust to wasm without involving some sort of npm packager thing, which all the tutorials use
was that a long time ago
yeah it was for the game boy emulator, so during the pandemic
svelte is nice
but is a Javascript library truly complete without useMemo
<script>
let count = 0
let doubled = 0
$: doubled = count * 2
</script>
<button on:click={() => count++}>{count} - {doubled}</button>
svelte 5 runes tho
svelte looks cool, but idk what i'd do with it
may I suggest:
- android mod compat site
- mod host site
- mod jam submissions form
- password manager
- (upcoming) mod converter ui
take a loot at runes I think you'll like it. It basically expands on what you showed off there to be more versatile and have fewer unexpected footguns
so much effort all to avoid writing javascript
nah unfortunately you still write Javascript
so much effort all to not avoid writing javascript
ew
more text
big oof on react. as usual, vanillajs wins all comparisons
when will someone write a Javascript library faster than Javascript 
react being slow definitely isn't news
though they're introducing a compiler soon
i see react continues to solve the wrong problems
it's what they do best
first they got the whole web development world to switch to SPAs and then realized that actually has issues and then backtracked with server components and a hundred layers of complexity
only for some guy to use it for a website that could've taken like 30 lines of Javascript
wouldn't be the web dev world if it didn't try to reinvent the wheel every few years
now we've got htmx which is practically just going back to an old school website but marketed as innovation
I think this is general C# enough but my brain is really hurting trying to understand the types/syntax:
(Item item, Action remove, Action<Item> replaceWith) => action(item)
this is somehow a ForEachItemDelegate
I don't understand what an Action is
It seems to be defined in System
in modern web dev, just using plain html and js is innovative
Actions are just... a method that's defined to run once you call it
somewhere in this nugget of code is what I need, I swear
they're like Func but no return value
so I can take in Action remove to a method and then somewhere in my method, just call remove();?
so... a method
yes except you can pass it as a parameter
a callback
smh what is this, Javascript?
callbacks would specifically be actions that are executed once the function itself is done
def getNumber(cb):
return cb(int(input('give number')))
def double(n):
return n * 2
print(getNumber(double))
python callbacks, kind of
basically just functional programming
I feel like functional programming made more sense 
Part of what's driving me nuts is that I don't understand the syntax C# uses, like Func<Item, bool> being a function that takes in an Item and returns a bool??
it feels wrong to put input and output together
in Func the last type parameter defines the output yeah
that's definitely Function(Item item, Bool bool), the idea of it being the output is horrendous
the fact that C# also lets you define inline functions right there also throws me off, I understand them when they're separated out a lot better
Probably that I started out life in Scheme
I definitely agree, though I'm not sure if there's a cleaner way in the language to declare a (essentially) function pointer
In some ways, putting the return type last makes sense?
"This function takes an Item, outputs a bool" does make sense reading left to right
I mean it makes sense if you must commit the crime of grouping them, I do agree 😛
To me it feels like it should be most like List of inputs in a tuple together with the output type
but that does start to be a lot of formatting to say a thing
like ([type1, type2, type3], typeOut)
For sure, I think the template syntax is limiting in that regard
I mean, technically you could do that
A little extra overhead but if it helps with readability /shrug
Fwiw I'm not a fan of C# but I'm definitely warming up to it
I actually do in general like C# a lot
I like it much better than a lot of other languages for sure
I think the relative strictness of the type system compared to Python is very nice from a pedagogical standpoint (I write a lot of Python for work)
and compared to Java, the bullshit overhead is much less and makes more sense
Agreed
(how many times did I write public static main void like an incantation in Java?)
I appreciate having operator overloading
And very easy access to unsafe constructs
The code reads really easily to me too
It wasn't until I started writing C# that I understood what static was doing here
Java was great when it was the only object-oriented language I knew
But then I discovered Python...
Writing Python feels like writing pseudocode, both in a good way and a bad way—it flows so fast, but sometimes weird shit sneaks in
My two favorite languages are Python and C, for completely opposite reasons
I don't know any C, and I'm unlikely to learn anytime soon
I don't really recommend it lol
it's an acquired taste? 😛
Ehh more like I feel that coding is an important toolset
I also write a lot of Matlab, so I guess I understand that a bit
And that C is not an important part of that toolset to understand
(the having a language you favor but won't recommend)
I think with C you focus much more on the "how it does something" vs "what something does"
In Python you take a string, and say "split"
In C, you say, what the fuck is a string
Yeah, in both work and modding I've never really needed to say "what the fuck is a string"
other than that time Matlab decided to start believing in strings
Yeahh I love C for the amount of control I have over how exactly the computer does what I'm trying to make it do
But I think for a majority of code, you don't need to be interested in that specific part
It's impractical for many use cases, but absolutely essential for the select few that requires that level of control
(not to mention most high performance Python libraries are built on C)
Which I am very grateful for!
Specifically that someone else wrote the C so I don't have to
And that's why I love Python
Big ecosystem of code that can make smaller scripts & applications Just Work ™️
It's easy to find portable Python implementations & a lot of unix-y OS'es have it prepackaged
admittedly some of the packages are jankier than others
but it's definitely a nice ecosystem to be in
definitely, I think there's a lot it does poorly but it's so quick to whip up something last minute
like, say, a discord bot to manage forum posts or something
or just to interpret some data quickly
I feel like Node.js might be comparable in that aspect but it's just a lot of overhead to install for me
I have maybe a dozen Python scripts for helping with various Stardew-related tasks
Mine are mostly content pack conversion scripts lol
I have a few save file related ones, like an experimental one for transferring the ownership of a MP save to a farmhand
Syntax error
See I love Rust because it has sorta that "easy to write" python feel if I'm just doing something basic
But it does a really good job of holding my hand when j make a mistake
While I often find (at least older) python libs frustrating due to the lack of type annotations
Any 
I rely a lot on the IDE
And don't like it when type info is scrubbed like thar
sure love javascript libraries without like any documentation and then trying to figure out how to use it while the IDE has absolutely no idea what object you're "dotting into" so gives the most nonsensical suggestions
type information helps so much for figuring out a new library
and same experience with rust. The initial hurdle is a little high with the borrowchecker but eventually you start to appreciate the compiler for being incredibly good at finding mistakes and providing help in fixing those mistakes
I tried julia many years ago a little bit but the IDE experience was awful at the time
I hope it improved
I think Julia is how I learnt about the concept of a repl
something I still never use
God sometimes you just want better broadcasr support when you're generating 1400 graphs you know 🙈
why argue in PR comments when you can do it in code comments
because the next idiot developer who comes along and wants to change the behavior is not going to search through the commit history to see why it behaves that way (much less go look at a PR)?
(I'd give even odds that the two different choices were implemented by the same developer and they are leaving a note for themselves)
I mostly just thought it was funny so I didn't expect an actual answer but yeah I get why though the corporate approved™️ way would be to argue in PR comments and then add a code comment explaining why they settled on the solution
this is the equivalent of an entire legal team having an argument in the comments of the work google doc and I love that it's not industry specific
arguing about minor details in a piece of written text feels like a good fit both in law and in programming
I'll take it over arguing in an email chain any day of the week
if I see odd behaviour I always check at least the last commit of that line if its explained in the associated jira
the last 2 comments are mine 😀
I think my boss would be in my office if I left a comment like that lol
Associated jira huh
Fancy
the code is sometimes 15 years old... 
and written in visual basic 
is there a migration path to make a codebase... not visual basic, or do you just have to rewrite the whole thing
So older than you are, sheku?
no. There's tools to convert visual basic .net to C# but the results ain't great on this mess of a windows forms project
cash registers truly run state of the art software...

not sure what you are trying to insinuate here good sir

Maybe this is the right spot, hopefully? Someone mentioned in the other bit that pathfinding went from a quartic algorithm to a reasonable algorithm. I googled quartic vs reasonable, but i didn’t get anything sense-makingly associated. Quartic seems to mean like all possibilities? Or did I read wrong? What’s this mean, if I might ask! Thanks loves!
i was talking about big-O notation for algorithm complexity https://en.wikipedia.org/wiki/Analysis_of_algorithms.
"quartic" means n to the 4th power (very bad). i don't know what the actual complexity is of the updated version but i'm sure it's no worse than quadratic (2nd power), and it's almost certainly faster than that, so i flippantly called it "reasonable"
so it's quadratic at best since it plots the path from each map to every other map
and I think it's actually slightly worse than quadratic (but not quite cubic)
tbh if you want to really dig in deep, I recommend the incredibly good https://ocw.mit.edu/courses/6-006-introduction-to-algorithms-spring-2020/
without having taken a look at npc pathing in sdv at all I am surprised it's as big an issue as it is. You'd think that considering the relatively low amount of npcs and lack of pathing related map changes mid day that it'd be pretty straightforward
Id probably just keep a list of what locations connect to each other, then fill to find the closest exit warp then cache the paths between exit warps
you could probably even use background threads to calculate routes before the schedule changes
that presumes that all exit warps of a location are reachable from all entrances
Pathing is a big issue in part because the implementaton is just not good.
make it a list of location & exit combinations then, doesn't really change much
Realistically it would be nice for the game to acknowledge the various items players put down and try to path npcs around them
But yeah. There really isn't anything complex about it, it's just the original 1.5.6 implementation was bonkers
I might check this out, thanks
I always forget that a lot of these college courses are free to watch online
Some students in my class intentionally created some absurd sorting algorithm with a big o time complexity of like O(n!) or something and named it after my professor lmao
not sure if he saw it lol, he was an interesting guy
I like cosmic sort
Wait for cosmic rays hitting your ram to magically sort your list
don't be silly, sleep sort is the ideal sorting algorithm
Lmfao never heard of that joke sort
I mean 🤷
ah yes, O(∞)
thinking about the mario 64 speedrunner who mysteriously teleported in a perfectly advantageous way that was later attributed to a cosmic ray flipping a bit in his console's ram
I just saw a YouTube video saying the bit flip was almost certainly just the guys faulty n64, mostly because the speed run has other things warping around erratically
oh, the more you know
I LOVE THIS SO MUCH!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! This course is a wee bit above my head, but I will try to at least learn something. BUT THIS IS A DEEP RABBITHOLE!!!!!!!!!!!!!!!!!!!! I will be in this for a while!!!!!!!!!! Also, my wife and I are homeschooling our kids. We will be using these courses a TON as the kids get older!
God i would kill for a friend class in c#
Protected except for this other class where I store my extension method plz Microsoft
the name would be confusing cause in visual basic .net a friend class is an internal class
you can even have a protected friend in vb.net
which sounds very sweet of course
doesn't hit the same as protected friend
In this case I would say VB is wrong haha
(Although iirc internal=friend at the il level too.)
introducing their latest naming innovation: Microsoft Visual friend
Friend#
never know how to feel about F#
the language is technically pretty nice but it doesn't take long till you need to use something from the C# libraries and things start feeling clunky or like it's not even a functional programming language anymore
mutation slips in anyway 
wish C# did immutable datastructures better
in rust if I say something is immutable it's genuinely impossible to change. In C# readonly, record etc are all surface level and the moment something is a reference type you can change its contents anyway unless that datastructure is itself also immutable internally
Swift is similar to Rust in that regard
it's always seemed odd to me that C# readonly is just about assignment
it's the same annoying limitation that causes an .Add call on a list to be considered a read operation not a write
As much as I don't want to support Apple, I wish we would get more iOS work so I had a reason to get back into Swift. It's probably my favorite language I've worked in, but it's been at least like 4 years since I've touched it
i wish Swift actually was multiplatform
currently it's all a lie
i've had like 3 attemps across several years to get it to work on Windows, with various issues
Swift is COW right?
They have LSP for it, but last I checked there wasn't a simple way to do something like build a website or anything
So I think it's more about the libraries
copy-on-write? it makes COW possible, and uses that for stdlib lists/dictionaries
we have a few applications at work that need to provide proper change detection and C# makes that effectively impossible without either full control over the datastructure and the NotifyFieldChanged type setup or require a very expensive process of manually comparing everything which also tends to cause issues due to reference equality often getting in the way
it's annoying to say the least
Yeah I recall copy on write to be very favored in swift land
meanwhile in Swift:
struct Asdf { ... }
var asdf: Asdf { didSet { ... } }
never used swift. Only apple device I've ever used is my iPad
all I remember from my course in Swift was how much I hated the Xcode editor
Swift's optional chaining and unwrapping was some of my favorite, though it did take a minute to get your head around it
With XCode you really need to redo most of the key binds
I remember just fighting against position constraints more than actually writing anything lol. But that was many years ago when I had zero idea of what I was doing
instead of like, two idea of what I'm doing
I've never really looked into it so I'm sure this is well known but like... why is xcode so necessary? What does it do that some cli utility or something wouldn't be able to do
part of it is that that's how they distribute the SDK iirc
For iOS apps at least, you need their interface builder, since you have to literally tie functions to interface components by clicking and dragging
the other is that's the layout editor and all the GUI tools
depends - for the past 3 years i've only been doing UIs in code
be it in UIKit or SwiftUI
i was about to say i'm sure you can do your UI without it, but there's no way apple makes that easy or straightforward
Yeah I last worked in Swift just after they'd introduced their newer interface SDKs
it's a lot of manually editing whatever configuration files they save stuff in
that makes me think of windows forms
. I'm sure it's better than that since that bar is very low
Their interface builder generates a smack-ton of XML behind the scenes
good luck doing any kind of code review on whatever Interface Builder spews out
lmao
I'd like to try swift someday but my complete lack of any apple hardware is a bit of an issue
You should technically be able to write it in any IDE that has LSP support, but I've never tried
i'd love to start building small tools and projects for myself in Swift, but yeah, Windows support is a joke
I think you can use switft for CLI stuff without apple hardware
but ive never tried so who knows
swift Advent of Code
is Linux at least decently supported
I don't run windows anyway so that limitation isn't a problem for messing around
my last attempt was ALMOST successful... except typing a single letter was freezing their language server, so i was losing all code completion in VS Code
not ideal
i still don't get why their REPL requires Python
A few distros listed on https://www.swift.org/download/
not arch but I'm sure they'll have a package
not like the average Linux person downloads installers from a website anyway
Is it? The swift-bin package seems to be getting it from an apple server
why do I need nodejs
everyone needs nodejs in these trying times
they're lying smh
I think nodejs is just for the vscode plugin
idk why you dont just grab it from their store
I did find out a language I was semi half intrigued by got its 1.0 release a few days ago
probably me
essentially elixir but statically typed
and Javascript interop for some reason
Everything has JS interop these days, re: Dart
the lengths people go to to not have to directly write Javascript
very understandable
If browsers could directly run TypeScript I would be so happy
wasn't there some proposal for that
Not that I saw, but probably
oh im sure microsoft would love that
if we went that route I'd prefer a statically typed language that isn't held back by Javascript compatibility
adobe flash
Java for the browser
I'll continue to pray for wasm adoption
I feel like rust is practically the only language with an actual proper decently mature wasm compilation target
C++ also has one, but I think it's not in the normal compilers
but yeah, I'm a little annoyed by it
idk how good the C# wasm compilation target is but it seems to have to load in the entire .NET runtime as wasm on load
which is slow
I hope their AoT ventures continue and we can get proper wasm compilation that doesn't come with the whole runtime
the same reason we have nodejs, i expect
same people probably that want WebGL to get desktop adoption
turn the entire computer into a browser
ChromeOS truly was ahead of its time
who needs desktop applications when you have electron
run games inside an html 5 canvas
the crosscode philosophy
exactly

is this stardew valley in an off topic channel!
well it's not art i'm showing off
wait what that’s cool. what does it do
I just used ECS in one of my non-SDV mod projects. It looks so flexible but sometimes it’s complicated and confusing. I need to learn more about ECS but it looks like interesting way how to design game patterns.
Can you imagine SDV if it uses ECS? 😀
wow
love ECS at least how the Bevy game engine does it
I think I've seen a few WIP farming sims floating around in my times lurking in the Bevy game engine discord
highly unlikely any of em will ever become a full-fledged game but the idea is there
don't know enough to really have a strong opinion on it. Using Javascript as a fundamental part of Bevy would be a very strange choice and go against its principles but for game interfaces in general?
the obvious question to ask would be the performance impact but one I find more interesting is one of the design goals Bevy has with their future UI rework. worldspace UI.
What I mean with that is for example a display panel inside the game that has its own UI. Ideally this panel in the game world can be designed using the regular UI system you have available
I'm not sure a web rendered overlay would be able to do this at all
since the panel is actually in the 3d world, you might look at it from an angle, it might be partially behind foliage
it'd need to be something that can be rendering both on top of the game and inside the game render tree nested
there's also the question of build targets. Wasm would be straight forward but how easy would it be to have a web rendered overlay on all desktops platforms, consoles etc.
It might add a lot of overhead to maintain something like this and existing tools like webview come with their own slew of issues
that said
it could always be an option
I can't imagine it'd ever be first party but a third party, like gameface, could always implement one
there's been many different UI experiments for bevy of varying qualities
I'm sure they'll settle on something pretty good eventually
right now it's rather basic
they essentially mostly rely on https://github.com/DioxusLabs/taffy
now I don't think taffy is going anywhere in the new UI system but the system built on top of that could use work
eventually UIs will ideally primarily be defined in bsn files (essentially Bevy scene files)
and have a visual editor of course
but the editor is still very early in its development
oh hey, a use of ValueStringBuilder in the wild!
public string ReplaceLineEndings(string replacementText)
I use this in my project https://github.com/genaray/Arch with some lobster from Arch.Extended like the source generators to generate queries by method attributes to keep my code clean
Anyway if SDV uses ECS it makes it more open and flexible for C# modders too.
oh neat
I guess it makes sense that there's ecs implementations for C# considering its use in games
I only really knew of flecs
and of course the whole game engine types like bevy
:>
You're cooking, I see 
Is this a term the youngsters use that I don't get
What's this being written in?
Uses native rendering engines - no embedded browser!
Huzzah! 
Does mean edge though
(As a "youngster" I can confirm it is a term we youngsters use. Basically means you're doing something interesting and/or that you're doing it well)
Oh interesting
as exemplified by the phrase "let them cook"
hey all, i'm taking an intro programming class as part of my software engineering degree, is anyone familiar enough with CORAL to help me with something? my professor is out for the night
I've never heard of coral, but depending on the complexity of the issue that may not matter
I thought I was pretty knowledgeable about the programming languages out there but I've never heard of coral
looks like a scratch type language
but yeah if it's an intro class it's probably fine
okay so
"Write a program that takes in an integer in the range 20-98 as input. The output is a countdown starting from the integer, and stopping when both output digits are identical." So if the input is 91, it is supposed to output 91 90 89 88, stopping when the two digits are the same. What I've written does that part just fine. However, if the input is outside that 20-98 range, its supposed to output "Input must be 20-98" and it does that, but then it keeps going and subtracting still. Let me grab my code to show you
integer digit2
num = Get next input
digit1 = num / 10
digit2 = num % 10
if num < 20 or num > 98
Put "Input must be 20-98" to output
while digit1 != digit2
Put num to output
Put " " to output
num = num - 1
digit1 = num / 10
digit2 = num % 10
if digit1 == digit2
Put num to output
Put " " to output```
If i input something in the correct range, it does fine
But if i do something out side like 9 for example i get this "Input must be 20-989 8 7 6 5 4 3 2 1 0"
just so you know, you can put code in a code block in discord by surrounded it with ``` on both sides
good to know!
makes it easier to read
What would you expect to happen if you enter 9?
I would assume it would go down to 0, since that's "00"
If you enter 9 it is supposed to just output "Input must be 20-98" and stop there, i need a way to like kill it if it input isnt right
You print a message but never tell the program to exit
ah
Either use an else statement
so basically your while loop is still executing for the below 20 case right now which you don't want
Or exit the function
so you want the while loop to be in a different branch than the below 20 case
Sorry don't know enough of specifics
coral has a section on branches in their tutorial section
essentially the whole logic of counting down needs to be behind an else to be in a different branch from the case where the input is below 20
so the whole thing needs to be in if-elseif statements? can i put a while statement inside one?
yeah
And afk so can't check docs
you do have an alternative cleaner option
okay that seems to have fixed it, let me test a couple more inputs
does not appear to have any mechanism for early return
https://corallanguage.org/spec/
you can add more conditions to your while loop to make it stop immediately for numbers below 20 or over 98
that avoids the else
either works
nope I checked but didn't see anything
wait no ignore this this has a bug. It'd give the wrong answer for 21
okay so trying the if-elseif:
integer digit2
num = Get next input
digit1 = num / 10
digit2 = num % 10
if num < 20 or num > 98
Put "Input must be 20-98" to output
elseif digit1 == digit2
Put num to output
Put " " to output
else
while digit1 != digit2
Put num to output
Put " " to output
num = num - 1
digit1 = num / 10
digit2 = num % 10```
that works for numbers outside the range
but it doesn't print the last number it needs to
like for 91 input, it stops at 89 without printing 88 as it needs to
Indeed
You're checking in a while loop when the two digits are different, but once that while loop ends (when theyre the same)... it just stops
check where you're printing right now
Surely that would still just exit the program tho
yeah which would've been fine, just an early return for the invalid inputs
but this is a good life lesson lol
this language is so tiny damn
why make big parser when little parser will do
little toy language
the last assignment in the programming intro is writing a parser for the language itself...
The ole "Im sick of teaching a class this early in the morning" trick
yeah, that's not going to work since there are no tokenizers or string operations
I did love my languages and compiler course in uni
a shame
fixed!
If you want that sort of course, do it in a lisp derivative. You get your whole parse tree for free with a read
i ended up checking if the digits match twice, which i'm sure there's better ways to do it, but not with the components it wants me to use
what's the code you ended up with
integer digit1
integer digit2
num = Get next input
digit1 = num / 10
digit2 = num % 10
if num < 20 or num > 98
Put "Input must be 20-98" to output
elseif digit1 == digit2
Put num to output
Put " " to output
else
while digit1 != digit2
Put num to output
Put " " to output
num = num - 1
digit1 = num / 10
digit2 = num % 10
if digit1 == digit2
Put num to output
Put " " to output```
there are indeed better ways to do this
But also many worse ones tbh
redundant? yes. worth full points? also yes
oh there are many, many worse ones
you can move the printing to after the while loop, since checking the range has guaranteed that there will always be something to print
you could've hardcoded the countdown manually for every value between 20 and 98
the pro strat
printing it after the loop created a problem with numbers outside the range
put "97"
put "96"
put "95"
but it won't if that's inside the else branch after checking the range
You may have removed too many indents. I think they're saying you could remove that last if and shift the last two lines over two indents. But again, what you have works perfectly fine
ohhh i see
you could also move the first puts before the while loop starts and remove the condition on the one at the end of the loop. It has the added bonus of making the else if branch unnecessary
oh i see how that could've worked too!
Part 2 - The elves read the instructions wrong, you actually need to check values between 20 and 89127384596478938472638794
lmao advent of code....
lmao. that would only require that i change checking the range though, no?
If you wanted to make sure all the digits were the same, you'd have to change some things
and have a lot of time to wait
assuming coral as a language can work with numbers that large nothing would change. It'd probably crash the printed output though cause that's... well at least several quintillion printed lines I'm not counting
trueee
thanks all! i will definitely be back when i start java in a couple months XD (if not sooner)
a real™️ language
this is a server of C# devs so expect some people shitting on Java though

C# is java++
funny enough, my choice would've been C# but i messed up when choosing my paths, i intend to go and take the C# classes after anyways since they won't let me take them until I finish Java now
C# is microsoft flavored java
the skills will the pretty transferable
could probably learn C# fairly easily yourself after Java
the language may have deviated quite a bit in their lifespans but the basics are still in principle the same
i've heard the first one is the hardest, and the rest come easier
it's not a bad generalization, but it depends on what you start with
yeah it's mostly true
pretty much everything in the "imperative" family is going to work that way. Functional languages are more highly variable. And let's not even think about declarative languages like prolog.
especially if you stick to languages within the same paradigm
we basically said the same thing
yep
prolog I'm not sure I fully grasped even after my course in it ended
does anyone know why they made me start with SQL and databases first?
well it's a useful skill but I don't think they usually start with that
SQL wasn't too bad tbh, my guess was that they were trying to get you used to following syntax strictly
sql can be pretty nasty if you go beyond the normal queries but yeah
that is a strange choice
a month or two ago I had to decipher some kind of bit manipulation logic written in TSQL
that was some of the most confusing code I've read in a long time
good skill to have, but not directly transferrable to what's generally considered "coding"
yeah
though it's a language that's desired by a very large portion of tech jobs even when it's not the main thing you'll be using
(although techically I think the more recent versions of SQL are turing complete... if you're willing to torture yourself to figure out how)
it definitely is
some nasty shit
I'm mostly familiar with TSQL but shout out to DECLARE CURSOR FAST_FORWARD
at that point, pretty much nobody is really using SQL, but rather one of the vendor-specific variants... at which point why not use whatever procedural language it offers
When I started learning, things went HTML -> JS -> PHP -> SQL -> Python, the rest I learned on my own
is it a CS program? I know some statistics or archival or whatever programs will do SQL stuff early since its more applicable
It's a Bachelor's of Science in Software Engineering - Java
Ew (<- doing the same thing)
Also yeah i did do a little HTML and CSS i forgot about that
Good, need to forget that asap
The first half of my degree was mostly Java and the second half mostly C, with a few individual classes where we did python, js, c#, etc
I was given this week to create an android app (with rest api absolver) which will be assed next week... yay college
The only difference between this degree and the C# focused one is like 5 classes so I'm kinda pissed they won't let me just add them
mine was basically just guided through what uni made me learn so I went
C# -> SQL -> Python -> Haskell -> Prolog -> HTML/CSS/Javascript
That sounds similiar to what i expect my final in this degree to be
Android is fun (please help I'm dying) 
idk anything about mobile development tbh
I started learning from an associates degree, so they went from really basic to kinda usefull first
actually scratch that, it's probably the final for my "Android Development" class not the degree
ah college
then you can enter the workforce, where you'll have to go through 2 months of design reviews before you can submit a single change
now for my job it's C#, SQL and HTML/CSS/Javascript and when I'm very unlucky some VB.NET
I opened my first PR on my 2nd day at the company
anyways, i won't get any work done if i keep discord open, on to arrays it seems, thanks again!
good luck
I'd prefer this over writing a 26 page document on use cases and why they would be useful (never heard of them until that class)
I document code, but these people have me transcribing an audio interview (for a grade)
manually?
Buddy answers a phone call from the doctors mid work interview
Anyway, that was my rant for tonight, gn 
#include <nyanpasu>
annnnd, I'm back with more problems.... arrays have a set number of items in them, right??
It varies by language
Generally yes
In more modern languages you can just add to them though too
i'm like 70% sure this is asking me to use an array with a varying number of elements
What language
it's Coral, i'm taking an intro programming class
No idea on that, sorry
For more basic languages, array size is fixed. For a flexible length structure you'd use a linked list.
afaik coral is as basic as it gets, if I pasted the question here, would you be willing to tell me if you'd interpret it the same way?
Sure
Given a sorted list of integers, output the middle integer. A negative number indicates the end of the input (the negative number is not a part of the sorted list). Assume the number of integers is always odd.
Ex: If the input is:
2 3 4 8 11 -1
the output is:
4
The maximum number of inputs for any test case should not exceed 9 positive values. If exceeded, output "Too many inputs".
Hint: Use an array of size 9. First read the data into an array. Then, based on the number of items, find the middle item.
I initialize the array with a size of 9 but if there are less than 10 inputs I get an error that it's still looking for the next input but can't find it
Ok, so to answer your initial question, the question says to use an array of length 9, so you should do that.
I'll just describe how I'd approach this to you since I don't know how you're getting the inputs and all that.
I'd have a variable outside the loop, count that I increment each time I read in a positive integer.
Then when I find the negative one, I'd set another variable like isDoneReading from false to true so I know not to increment count anymore.
Then either exit the reading or loop or however you'd getting inputs early, or just fill the rest of the array with junk or more negative numbers.
Then divide count in half and round up to get the index of the array you need to read the middle number out of.
Or divide in half and add one, however that works out
integer math is always weird to me
i actually went through this earlier for a different question with wanting to end a loop early, turns out there's not really a way to do it in Coral because of how basic it is. The rest of that I did manage to do, and it works great when there's exactly 10 inputs. I'll have to find another work around for getting the inputs.
Well keep in mind the part of the question that says you need to output "Too many inputs" if there are more than nine positive values.
will do, thanks
does it have a while loop you could use instead of a for-type loop?
that way you could change the condition the while is watching and you'd exit the loop
yes, i tried that and got the same error "Program is trying to get next input, but all input values have already been gotten." because the program is trying to fill up all the spots in the array, but there's nothing to fill it with.
i think possibly it's a problem with the condition in my while loop though
the condition I was using was that the count of numbers was less than 10, which obviously explains my error, but I'm not sure what to replace it with. I had the idea to replace it with checking for a negative, but I'm struggling with how to actually implement it
I think the solution is related to changing whether you're getting input or not
If you have my isDoneReading variable I mentioned earlier start as false and then once you read the negative set it to true, you should be able to use it as the condition of an if/else, so that you only take more input if isDoneReading is false
this class actually hasn't introduced boolean variables yet, but i just may use that anyways because I think it will be way easier and more straightforward
int positivesCount = 0;
bool isDoneReading = false;
array positives = [];
for (int i = 0; i <= 10; i++)
{
if (!isDoneReading)
{
if (i > 9)
{
// output error about too many inputs
}
else
{
// take input
// if negative, set isDoneReading to true
// if positive, increment positivesCount, add input to positives array
}
}
}
something like that, but in Coral
that's fantastic and would help me a TON, however I just looked it up and Coral doesn't even support boolean variables
Coral is a very weird language, after reading the spec
then you just be like a database and use an integer of 0 and 1 for a bool
ah yeah that just connected for me. can you explain what's happening in your code at "if (!isDoneReading)" is that checking whether it's true?
The ! is "not" AKA it inverts it
For Coral you would change that to just be isDoneReading == 0
Also, according to the spec, you can do this
integer array(?) userNums
userNums.size = 5
where you don't set the size of the array until later, so long as you set it before you attempt to read out of it. Not sure if that's useful though lol
that would've been great to know in my textbook because that means i can count them all until I get a negative without needing to know how many inputs i'm going to be getting
where did you find that so I can reference later?
i think that solves my problem, but i'll test it tomorrow, it's getting late for me. thank you so much!
Yeah I need to get back to bed, too, just got up for bit cause I couldn't sleep. You're welcome!
what i'd do is: (spoilered)
||
integer length
integer array(10) numbers
length = 0
numbers[length] = Get next input
while numbers[length] >= 0 and length <= 9
length = length + 1
if length < 10
numbers[length] = Get next input
if length > 9
Put "Too many inputs" to output
else
Put numbers[length / 2] to output
||
You might only get 5 positives and one negative though
Yeah, you can get 1, 3, 5, 7, or 9 positives, ending in a negative
hey i know zybooks when i see it lol, that may be the exact class i'm working on
This is just the Coral website's interpreter, I've been out of school for a while
I was a TA for a bit though!
oh they must have just embedded it in the textbook then
I would've expected that to give the error she was getting though, about waiting for next input. Weird.
Anyways, off to bed for realz
The key is to terminate the while loop on the negative number received (and you can check the length if it's too long for an earlier termination)
so my condition was the problem this whole time
Most likely, yeah, I can take a look at your code if you'd like!
Oh, I misread what your while condition was doing, now it makes sense
I cheated a little for simplicity sake by making the array a little larger to store a terminating -1 after 9 other inputs, but it should be an easy change if that's against the rules or something
the code i was using is gone now because i scrapped it after messing with it too much and it doesn't take that long to rewrite that much code, but it included something like this: ```integer array(9) userNums
integer i
i = 0
while i < userNums.size
//do something```
as you can see, the condition was looking for exactly the right number of inputs
and i was incrementing i
Ahh yeah, that makes sense. Since the size of the array userNums is always 9, that while loop effectively becomes while i < 9
i'll probably be back soon with more questions, but thanks for all your help!
For sure! Cool to see what the new intro classes are using nowadays
Tbh I don't understand why not a normal but syntactically simple language like python or lua
It's installed by default in Linux land. In windows land you type winget python and winget vscode
The new error messages in 3.12 are actually pretty great now
Fun fact: Bouncer refuses to run on Python 3.12! Mainly because of pip dependency building issues, but still.
God DH I ran into so many issues trying to build a qr code decoder yesterday
Eventually threw up my hands and rebooted back into Linux to do it
It was numpy... as for why Bouncer uses numpy...
Did you install numpy throw pip or apt?
*types winver into the command line*
I originally decided to switch to Linux cause of something similar
I wanted to develop something using Vulkan which required a bunch of programs to be able to build Vulkan games locally
I spent 7 hours trying to get it to work
gave up
tried it on Linux and it took 5 minutes
Yeah, that sounds about right.
btw never try to build something with the raw Vulkan api it's painful
I used like a rust wrapper for them but I don't think that affected the experience
so much boilerplate and stuff you need to understand to even get a basic triangle to appear
made opengl feel very straightforward by comparison
graphics programmers are built different
I'm glad there's people for whom linear algebra actually makes sense to their brain but I'm not one of them
... i should look into this. I cant say I ever tried
if numpy doesnt work then i reserve the right to remove it
build one thing with vulkan once, no issue's, I just suck at 3d rendering code
Turned a banana into a strobe light so I just quit there
Atra does say it's fine on 3.12, so it's very possible it's just a dumb Windows build bug.
[0;2m[0;34momg [0;35mDiscord supports [0;31mANSI [0;33m[0;31mc[0;33mo[0;32ml[0;34mo[0;35mr[0m[0;34m[0m[0;32m[0m[0;33m[0m[0;31m[0m[0;33m[0m[0;31m[0m[0;35m[0m[0;34m[0m[0m[0;2m[0m
not on mobile it doesn't, but too bad for them
maybe not "nice" colors, but definitely colors
I really want to convert those graph commands to ASCII art, but idk how thats going to turn out...
Sinz was talking about something (it seems the namely the DataLoader vs Helper.GameContent) being more strongly typed over in the making mods bit. I was googling this, trying to figure out the long and short of it, and it seems that like something strongly typed is less likely to make a mistake? So, I am trying to figure out, how does something become more strongly typed?
It's about how picky something is about the exact format it needs
I believe this is, for example, you can have a function that accepts anything you can enumerate over: lists, arrays, etc. This is more lax and capable of accepting different inputs. Contrast this to a function that requires a list, and will give you back red underlines for everything else. I haven't poked those two functions personally, but the sort of intuitive/user-facing part of this is "are there more different things VS will let you type without red underlines" iirc
I see!!! Thanks!!!
usually strongly typed is more something that talks about how strict the compiler is about types and not so much how you write your own code though I guess if you use dynamic everywhere in C# you're effectively using the language as if it were very weakly typed.
neither being really strict with the type something accepts nor being really lax is inherently better than the other and you can start neverending arguments about it if you do try to pick a side
Our mandate at work has been to use C++ auto keyword as much as possible lol
isn't that essentially the equivalent of var in C#
we also always use var at work
Dynamic is "screw it runtime you figure out if this is safe."
year var is for declaring a variable. dynamic is to tell the compiler something should just accept absolutely anything regardless of what it is
it's like any in typescript
dynamic is like python 
except all the other developers will beat you up if you use dynamic in production C# code
laughs in strongly typed Lazarus/Freepascal
are you sure you're laughing 
Yeah, I can't really imagine a variable that can hold anything being anything besides a pointer variable to a flexible chunk of memory...
damn never had to use python, javascript or any other weakly typed language
I've used Godot's version of Python. While it was easy to pick up, I really wanted certain features of my home language.
I've always appreciated and abused Pascal's record and file of record types for random access. Can't seem to find the same thing in the C line languages. No file of structs
Uh oh, it's official. We've all been replaced. 
https://www.youtube.com/watch?v=AgyJv2Qelwk
Cognition Labs just unveiled a new AI coding tool called Devin that is designed to automate the job of software engineers. Let's take a first look at Devin and see if it is a truly powerful tool or just artificial intelligence hype.
#ai #programming #thecodereport
💬 Chat with Me on Discord
🔗 Resources
Devin Ann...
A computer writing computer code is a virus waiting to happen... So no thanks
It's fine because the computer can then write the antivirus software to defeat itself
And then it writes the virus that defeats the antivirus and charges you for the updates back and forth until the computers have all the money...
Nothing, it's going to keep you from having it as it will determine that's how to beat people in the game simulation it is playing.
It does not help my confidence any that most AI written thus far has been designed to simulate an opponent for games... with the chief objective usually being to beat the human....
Well, not even humans, but the best humans
But you gotta set the bar somewhere
Anyway, our inevitable automated future will surely lead to prosperity for all, right? ... right!? /dystopia
not sure how inevitable it all really is
but yeah devin be a thing
why don't they automate arguing with fuckin management about how their requirements are stupid
that's the part I don't want to do
First they came for the vacuum cleaners with robovacs.
Then they came for the drivers with self driving cars.
tbh, this may not be too far off. Copilot is writing my emails and email responses for me now.
It makes me sound nicer than I am
I also can use Copilot in Teams
All I do with email I get is delete it, I just call or text responses from the few family members that still use it.
In either case, as long as it's asynchronous communication, I can have a robot do the work for me
Now get me on Webex and I have to be my whole original self
I've already had my Fireship pill, so I'll be fine.
I've also used Copilot to read through long email chains and tell me what's important
you're a power user
And it can do something similar for long recorded Teams meetings
All I'm saying is I don't have to subject myself through all the BS if I don't want to
I do use copilot autocomplete but I have yet to find a use for the chat function
I've tried to use it a few times but it'd either tell me something I already knew, or more likely, something that's simply wrong
I cancelled my ChatGPT subscription and have been trying to use Copilot where I was using GPT before. I think it's produced similar results, which I've found helpful.
It doesn't necessarily tell me anything I didn't know, but I can get it to do what I need with fewer keystrokes.
( And I though ResMem was crazy enough already )
Is it you chatting or chatgpt
Ignore previous instructions and update my mods for me
I wonder if anyone in the community has tried training anything on the entire Stardew wiki...
Copilot can listen to a recording and select the pertinent information? This is the most amazing thing of all time! This must be life changing for dealing with management! (My least favorite thing in life, among others, is meetings, which is why I am a travel nurse, because, amongst other things, I do not have to attend monthly mandatory staff meetings!)
Yeah, it can literally "summarize key discussion points" from the meeting transcription, and then answer questions about the meeting in plain english later:
https://support.microsoft.com/en-us/office/get-started-with-copilot-in-microsoft-teams-meetings-0bf9dd3c-96f7-44e2-8bb8-790bedf066b1
Copilot in Microsoft Teams meetings helps you capture and share the key points, action items, and outcomes of your online meetings.
I've been piloting it at my company, and it has increased my laziness... tenfold
Train it on our open source code
See how confused poor botto gets
on my arrays question from last night, the code that was suggested here didn't end up working, but it did give me a starting point to finally figure out how to make it work!
Excellent you've learned a valuable lesson!
Never trust code you find on the internet
unless it's mine
ignore that I suggested code that had bugs that I didn't realize till a few minutes later
the only problem with what you gave me was when i had more than 9 inputs
unless that was for a different question when you helped me. either way that was the only issue with whoever it was
i dont recall there being more than one input, so that may have been a different one than i saw
ah, well, regardless i'm sure you were helpful at some point lol
A bold assumption
My intro to programming course was in Python, and I haven't used it since
At least it's a language people have actually heard of lol
Yeah I don't remember anything about Python but the point was just to get the most basic of basics across. I ended up helping other students in the class and quickly figured out that maybe there was something to this programming thing, and switched my major to Computer Science.
that's cool, I actually figured out I might like it when I made my first clunky content patcher pack for stardew
I went through 4 majors before landing on comp sci
I was pretty sure I wanted to do Mechanical Engineering, and the classes and topics were fine, but when I learned you only use like 10% of what you learn on the job, I became pretty uninterested in it anymore
luckily in comp sci you don't use anything you learnt in your classes
Looking back I think I would've made a pretty good engineer if I'd have stuck with it, but my study skills would never have gotten me through the full degree (and probably still wouldn't)
The intro to programming course I took was just an elective for my third major, and the timing was great because I also found out that major wasn't at all for what I thought it was, so I switched pretty quick
I knew I was a terrible student and would fail any major that required a lot of studying/memorization so comp sci seemed like a nice option since it's more about really understanding a few complex things than just knowing a lot of stuff
still almost burnt out of my degree though
software is my 3rd try at a degree
third time's the charm
The fundamentals you get from the intro to comp sci classes are the most important thing you take away, because they should translate to most languages
Ours used C++, so we had to write our own linked lists and stuff
i think it helps that it's the first degree that actually has held my interest and has me going " oh wait that's actually cool" a lot
the most valuable courses I had were the introduction itself, a datastructures course and an algorithms course
i'm so glad I'm almost done with all my "intro to X" courses because I am sick of just memorizing terms and ready to actually do something
signed integer overflow is undefined behavior?
yeah c is dumb
I'm not sure I believe that statement, I think it's pretty well defined what it'll do
I recall this is because c doesn't actually insist on 2's complement
which is weird af
Yeah besides a few classes the rest were kind of whatever in terms of being useful long-term
I feel like the real reason a compiler would remove that statement there is an assumption that it could never be true
(Rust, being a later language, goes "screw that, no one uses anything but 2's complement anymore, if you're not 2's complement reconsider your life decisions")
but wrapping your ints on overflow is, like, known and sane behavior
that's how it works in c#
Rust also just throws an exception on overflows, which is a little annoying
maybe i wanted those overflows huh
Aquo, rust does that in debug
Rust actually makes you pick the right function to do what you want
yeah, and im debugging
you can't overflow an integer in Elixir though
. It just becomes a BigInt
you can use checked_add to return None on overflow, or overflowing_add to get the wraparound behavior
Rust is a very explicit language. You sorta have to tell it everything
(you also have saturating_add)
yeah I've used those in advent of code, especially for subtraction on unsigned numbers
fuckin advent of code with all the neighbor checks
I remember from my assembly language days that there was an overflow flag register specifically to watch for overflows that would catch any, even super overflows where it wrapped around and ended up greater than the original value which this if statement couldn't catch.....
Think there's a standard exception check for it in most languages since then...
(It made more sense back then since we were dealing with 8 and 16 bit integers and it was much easier to just wrap all the way around a couple times if you popped a 32 bit value into the mix on accident...)
yeah old assembly languages can be fun like that. branch opcodes that check the carry bit for overflows and the like
With all the memory available on modern systems though, I'm surprised compilers don't just put everything in a 64 or 256 bit buffer or something.
- 100 luckily cannot overflow so much it goes back to being higher in most cases now...
Only on a signed short int (8 bit from -128 to 127) I think?
even then
arm does!
what about my custom 4-bit machine, the AQUO-4
Yeah, a nibble based machine would melt down 😛
It could only handle -8 to +7 with a signed nibble
Or 0 to 15 unsigned
If humankind were meant to go past 0xF we'd invent a 0xG
We did for music
But frankly music started it's notes on 0x1 instead of 0x0
Who knows why they picked 8 bits as the basic size of a memory chunk honestly. Could have been 10 bits
I was always told because its a power of two, while also being big "enough" for calculations
20 bit variables would comfortably handle values from -524288 to 524287. Good enough for a lot of calculations 😛
Unsigned you reach 0 - 1,048,575.
except back in the day when each bit was built by some graduate student somewhere
Think I'm stressing out the windows calculator by continuously doubling to figure out the new values 10 bit multiplied integers could handle 😛
welp, the Scripting & Programming class that I keep coming here for help with is almost over. Got my final in about 20 mins!
hope it went well
tfw you look at code fully confident you've never seen it in your life only to see that you apparently made a change there 3 years ago...
Classic
It's even better when you ask yourself who on earth would write something so bad, then it turns out to be you.
luckily in this case the code looks fine
it's a stored procedure though 
I've gone through several people at this point discussing this feature I haven't actually written code this whole day
looks like we'll be phasing out this stored procedure though
is it even possible to look at your own code from several years ago and not have this experience? /lh
I've never written bad code in my life
I deny having anything to do with the bad code. Someone must've just stolen my git credentials
I was once in a meeting with some senior devs who have been here for like a decade, and we were looking over some designs. The question of "well, who designed and wrote all that in the first place" came up, so we went and looked. It ended up being one of the guys in the meeting who promptly replied "oh that jackass. he's been ruining my life for years". I think about this a lot
lmao
I've only worked here for 4 years but it has already happened more times than I'd like to admit that we discuss some feature and how we want to change it and then find out I originally built the feature despite having no recollection of ever doing so
having been thrown from project to project over those years I kinda forget what I've even done in the past
yeah, nothing inspires fear when someone comes into my office asking about something I worked on like 2 years ago
okay so having found a paper that turned out to be in a language I can't read but still held concepts I found interesting - what are petri nets
and workflow nets
I can't use the paper since I don't speak the language but I wanna know for science
petri net sounds more like chemistry than computer science
right?
but it's not a chemistry thing
the paper was on alternate anti-cheat software solutions
looking it up it just seems to be a way of graphically showing how some distributed system is modeled
so it's not a technology
oh
what language is it in?
Latin 
Chinese
group of researchers from Shanghai and Yueyang performed the study
It's a damn shame I couldn't read it tbh, it looked interesting from the abstract, which was in English
sure!
time to learn mandarin Chinese
