A list of puns related to "Garbage collection (computer science)"
It seems like every week we get a post on this sub asking what the computer science major is like, whether someone should choose IST vs CMPSC, and how internship/career opportunities are at PSU. Some of this was covered in here, but I felt I had more to add. I'm a graduating senior in the SHC and I wanted to share my thoughts and experience and hopefully answer some of these questions.
Computer Science (CMPSC) Major
Academic Advice
In my view, here are the two things that are most important in order to do well in your classes:
Note that I didnβt include how βsmartβ you are as an important factor for academic success. I strongly believe that almost every student in CMPSC at PSU is βsmartβ enough (i.e. has a high enough IQ) to succeed academically. Sure, if youβre a genius you can cram and pull all-nighters to ace your classes, but that wonβt work for most people. What matters for most people is consistently setting aside time to study and do homework -- this will lead to good exam scores and good grades. Also, this reduces stress which in turn makes studying easier.
Also, hereβs what I consider to be an underrated way to improve your GPA: donβt take too many hard classes in the same semester! This might seem like common sense, but Iβve noticed that a lot of people completely ignore this and end up overwhelmed. For me, I felt that CMPSC 311/CMPEN 331/CMPSC 473 were all difficult and time-intensive classes in terms of programming assignments, while CMPSC 465/CMPSC 464 were difficult conceptually. Iβd recommend taking no more than two of these classes in the same semester, if possible.
Also, donβt take CMPSC 483W, take CMPSC 431W instead. 483W is a capstone, and you might end up doing a badly managed software project with a bunch of non-CMPSC majors. In 431W, at least you learn about databases.
Finally, if you have AP credits, use them all. The freshman year MATH/PHYS classes suck, and theyβre not at all indicative of your ability to succeed in future MATH/CMPSC classes. If youβre struggling through your freshman year MATH 140/141 and/or PHYS 211/212, hang in there. From my experience, it does get better, especially during your junior and senior year. At that point, youβll be taking more inte
... keep reading on reddit β‘I've been reading about in-memory databases and how they useΒ RAM instead of disk-storage. I'm trying to understandΒ the pros and cons of building an in-memory database with different programming languages, particularly Java and Python. What would each implementation offer in terms of memory management and garbage collection? I think I could write a program in Python faster, but I'm not sure what additional benefits it would generate.
I would imagine the language with a faster or more efficient memory management / garbage collection algorithm would be a better system to use because that would free up resources for my in-memory database. Would this be a correct assumption?
Edit: Use case for financial institutions, resource planning, inventory management.
I'm looking to create a new programming language, would like it to be high performance and simple and ideally be capable of being a systems language. Basically building a simpler Rust.
I've got it all designed except for garbage collection/reference counting which I've been heavily studying.
I have landed on two potential schemes and would appreciate feedback.
Either way, every object is a standalone object and no references will be made from one object to another one. They may only be moved or copied between objects. This both allows automatic parallelization and improved garbage collection.
The schemes I've come up with are:
Pros: quite fast and no delayed garbage collection, could still link children to parents and go up and down the tree meaning doubly linked lists and common patterns are allowed Cons: may make some problems harder to solve, traversing tree instead of jumping to right spot could be slower on some cases.
Pros: simpler, more flexible, could still be done without any extra atomic operations, most new objects will be appended to new end of the list and freed before they are ever garbage collected Cons: requires one thread part time dedicated to cleaning memory that could be doing something else. Little bit more work likely means a little lower performance.. as long as it doesn't need to be copied multiple times for other method. Doesn't need to mark and sweep every object every time something changes, most objects never need it, and doesn't require keeping track of reference count or moving memory around like
... keep reading on reddit β‘Hello everyone! Let me explain what I mean by my title. I'm working on my own compiled language, with the purpose of experimenting with various GC algorithms. So far I have developed refcounting and mark-sweep variants of my compiler. I added a couple of keywords into my language to make benchmarking them easier:
allocate x
will allocate x kilobytes of memory and return a reference to it.
collect
will force a garbage collection cycle (applicable only for mark sweep, since in refcounting as soon as an object reaches a ref count of 0 it is freed).
My question is: Are there any languages that have included some aspect of garbage collection as an actual construct of the language, like I did? A non-example would be Java, that lets you tweak settings for the GC as runtime parameters, but it's not part of the language.
Thanks!
It's been a long few years, but I just submitted my final exam a few hours ago. I thought I'd be all excited, but I'm tired and in bed π€£
I haven't got many friends, but I just wanted to tell someone as it's such a big achievement for me.
EDIT: Thank you everyone for all the well wishes! It really means a lot and it's starting to hit me and I feel a bit emotional π₯Ίπ€£ Definitely wasn't an easy year and not getting a graduation dampened it. But I'm very proud of what I've achieved.
EDIT 1: I will do a follow up when I get my classification in a few weeks βΊοΈ
EDIT 2: Thank you everyone for all the lovely messages, sorry if I miss any, I really did not expect this to blow up, but it's so lovely π₯Ί
Moving to a house from an apartment next week so I am learning about trash pickup rules now. I know there is the one bag/one can limit from the city website. My question is, can I put 2 small bags in my normal sized outdoor trash can? Or would I have to combine everything into a 120L bag? I would prefer to put my 2 smaller bags into the bin because I have 2 garbage cans in my house and it seems wasteful to use a 3rd bag to combine them every week. Anyone know if this is against the 1 bag/1 bin rule?
Hello, I've resisted making my own post on the subject because there are already so many with the same problem as mine with their own solutions (albeit these posts are a over 1-3 years old). Only reason I am posting about this is that I've tried almost all the solutions I could and none of them seem to work.
I was playing Minecraft with my two siblings hosting a LAN server for them to connect to since my computer has some powerful hardware (In terms of Minecraft). We had just finished making a new modpack together and I played modded Minecraft for the first time since I built my new computer. I expected this problem to be completely gone since my new computer's hardware is about twice as powerful as my old computer. We were playing together on a LAN server and after about an hour and a half the cpu usage started spiking in task manager and the game would freeze for about 10 seconds after every spike. Half a year ago I had stopped playing modded minecraft because of this same exact problem. We stopped playing together for the day after a few failed attempts to try and quick-fix the issue by allocating more ram.
Afterwards I spent about 6 hours looking up solutions to the issue. I've probably looked through 15+ different reddit posts with people experiencing the same problem and getting different (but similar) solutions. Most of the solutions I found had something to do with allocating more memory and using specific JVM arguments in the launcher. I even tried out this solution from Direwolf20 by going to my forge-client.toml config file and changing "alwaysSetupTerrainOffThread" to "true". I also downloaded YourKit Java to monitor exactly what was happening when minecraft would start lagging like crazy.
I thought I finally found a JVM argument that looked like it actually worked based off a few minutes of play testing in a creative world in single player, and considering it was 4am I was hopeful. But the next day when my siblings and I tried to play again I found out it wasn't fixed, I may have delayed the problem a bit but it didn't fully work.
Nothing seems to be working, and its so annoying because the problem doesn't usually happen until a good hour and a half into playing modded minecraft so its not like I can properly check a new solution right away, I basically have to load into a world and play for over an hour waiting to see if it'll happen and I do not have the time for
... keep reading on reddit β‘We have an app that works fine for 75% of users, but 25% are reporting freezes for 2-30 seconds. This with Flutter 2.0.3
on both iOS and Android.
It took a while, but I've finally been able to recreate the issue on a late 2019 iPad Pro. Just can't recreate on my Β£39 Alcatel One and iPhone 13 Pro Max.
Looking at the profiler, I can see that, during the freeze, the profiler reports a garbage collection that runs the length of the freeze.
I've also noticed that other events run for the same duration at the same time as the GC event. Such as ImageCache.putIfAbsent
and HTTP Client Response GET
.
This can happen in different parts of the app. My best guess is that it's related to scrolling 100's of items in a ListView with small thumbnail images fetched from the web. I'm using ListView.builder
everywhere.
We use CachedNetworkImage
, although we tried NetworkImage
and it's the same issue.
We also use Sembast
, backed by Sqlite.
Is it likely that the GC could run this long? And why would it only be on certain phones?
Been stumped on this one for a month :(
First off, I love Excel and I'm not disparaging it in any way whatsoever. I'm finishing up my degree in computer science and I've learned so much that I have been implementing in the solutions I design for my own job (non-tech) as well as consulting. I constantly have input validation, scalability, normalized forms of data, etc. all in mind whenever I create something in Excel. I try to avoid formulas and only use simple formulas when necessary. I go hard on user input validation because I know my coworkers very well and I know how they can mess things up. I veryhide sheets with data that they don't need to see. My VBA code has drastically improved looking back on how I used to code a couple years ago. I make sure that workbooks can grow dynamically without any user-intervention.
All of these things are great, but when you sit down and start thinking about how you're going to create something with all of these things in mind you will inevitably come to the conclusion that Excel is not the right tool for what the user is looking to do. But, being subject to the intense restrictions of IT teams, I have first-hand knowledge that for some people Excel is the ONLY option they have so you have to make it work. We're talking about huge worldwide companies with a lot of employees, even though they all have the same issue, there is so much bureaucratic red tape to ask for an enhancement or new tool that you will probably find another job before it happens. I work for such a company and the main tool that is still used throughout the entire world was written in Visual Basic in the mid-90s. So, when people say, "Oh, just demonstrate that there is a need for xyz software solution," you're not actually providing any kind of practical advice. This is not a unique trait for "bad" companies. Huge companies that people would generally think of as being very successful have this problem.
This all came about because while trying to come up with a solution for a new project, I realized I was bending over backwards when thinking about how to design the workbook to avoid hardcoding formulas instead of using pivot tables or some other Excel feature, but I came to the conclusion that time and effort to make a great and robust tool exceeds the tool's utility, and just hardcoding formulas and getting a working solution now and dealing with the rare instances when something needs to be added manually later is probably the better option. It just feels so wrong and dirty.
Anyway, t
... keep reading on reddit β‘Hi everyone!
Together with u/JonasWanke, I'm working on Candy, a functional programming language. It supports concurrency similar to Erlang β many fibers (mini-threads) can run in parallel and they communicate using message passing. Most importantly, it has truly immutable data structures.
I'm wondering if we should implement Garbage Collection using reference counting or a tracing (generational mark-sweep and compacting) GC.
Pros of using reference counting:
Pros of using a tracing GC:
Also, I recently stumbled across this paper (Perceus Garbage Free Reference Counting With Reuse), which describes a fancy optimization for languages with immutable types: If there's only one reference to an object and it gets "consumed" by an operation, we can re-use the object and mutate the data in place instead of creating a new object and garbage collecting the old one.
I think reference counting is a more elegant solution. Lower latency and reusing objects are very cool features. However, Erlang has a tracing garbage collector and that makes me question if that's really the right approach.
Does anyone have resources about how important cache locality usually is compared to other metrics or why Erlang went with a tracing GC?
Last year, US News released its first-ever ranking of the Best Undergraduate Computer Science Programs: https://www.usnews.com/best-colleges/rankings/computer-science-overall
Since much of the ranking is behind a paywall, here are the Top 170 entries (there are a lot of ties throughout):
#1:
#2:
#5:
#11:
#12:
#13:
#16:
#20:
#25:
#31:
#36:
#41:
#48:
#52:
#61:
Suppose you had a programming language that implements a naive mark/sweep GC.
Now you create a circular linked list. How would this GC "clean up" ?
Asking because a limitation of using referencing counts is would not release this memory. I'm not clear how mark/sweep algorithm would help in this case. Seems to me each linked list node could be traced back to the root set.
I live near Davie/Jervis and have been getting woken up on and off for months by garbage/recycling collection between roughly 2-4 am (noise bylaw says no pickup DT between midnight and 6am from my understanding). Has been really bad last few nights and I'm getting the run around from the city. Anyone else dealing with this?
I put "creative" in quotations because obviously programming involves a lot of creativity. What I mean by creative, I am talking about the visual design and story aspects of game dev. I know that game degrees are quite... bad. So I am opting to major in Computer Science with a minor in digital design and portfolio. Being an artist, I am worried that even with a good portfolio I might be locked into programming, when I want to be involved more in the creative team aspects of game dev as well.
I know this is probably a painfully stupid question, and I don't mind the downvotes. Would just like some insight.
I had an interview where the interviewer asked me about GC and I told him I didn't know much about it beyond the fact that it is used to free managed resources and is invoked automatically. He then says if that were so great then why don't all programming languages use it? I just replied saying I've never done it explicitly. So now I want to know in depth about GC and where do people invoke it explicitly. I am not an experienced developer, just about to finish two years and thus sorry in advance if I don't make any sense.
I realise this encompasses a lot. I basically want to know; how do you make a computer from first principles.
How to you go from basic logic gates, to adding machines, to running different programs on the same machine, to programming a machine by typing on a keyboard, to a live graphical interface.
I only care about the theoretical side.
I want to know how logic gates are used to make computers.
A great example of this is the kind of computer that people can make with minecraft redstone (not with commands). They can do things like:
With very basic logic components that anyone can understand.
It would be good if I could install a piece of software that could simulate these logic gates, and I could try to build systems within that.
Iβve been a computer science student for 2 years now and Iβm looking at career paths. Hacking seems the most interesting by far. What are some first steps I should take to start hacking more professionally? All Iβve got right now is a little virus that stickbugs you on a random mouse click. White hat hacking is the primary goal BUT I would like to be able to play around a little bit in more creative ways. Nothing illegal, Iβm just trying to make some projects for a portfolio
Does anybody know if mattresses left out on the curb for garbage collection will indeed be collected?
Hi guys, I am an apprentice software engineer that has started from square 0. I have identified, along with some some senior software engineers, that my ability to solve problems and think logically is weak and therefore effects my ability to code.
So, my question to you guys is, when it comes to tackling a problem (whether that be a coding problem, or a software engineering problem) how can I improve and make myself think more logically and to tackle logical problems?
I understand to break problems down into smaller and smaller chunks and tackle it that way. But, sometimes I still can't see the reasoning and logic behind things. I also understand that a computer only deals in pure logic, they're not like us humans who can use intuition to skip a few steps.
I really want to prosper in this field!
Many thanks.
I know Python and Java and have done quite a bit of Data Structures work and a few personal projects. I recently went through the CS50 content for it's introduction to C before tackling an OS course. I absolutely loved the course and how Malan teaches, but I really think that the pace is way to fast for someone with no CS background. There was even a Harvard student in one of the lectures that tried to ask how to keep up because everything was going so fast. I think most of the students probably took AP computer science or had some previous knowledge, or else they make use of the TAs and office hours to keep up.
For self learning, I think this goes way too quickly and shouldn't be recommended as a first intro course. The lectures are good so you think you "get it" because it's all explained so well, but then the problem sets are much more difficult and I think a lot of people would get discouraged or give up if they don't have a solid foundation of some of the concepts, (like previous experience working with loops, functions, etc.).
I just wanted to put this out there because I see the course recommended so much (and rightfully so). But for someone with no prior programming exposure, a gentler intro with a higher level language is probably a better start. For example, Georgia Tech's Intro to Python Programming course truly assumed no background knowledge, had a very gentle and thorough intro to all of the important concepts, and had a ton of built in exercises that started out very doable and gradually got harder. I never felt like I was in over my head. Something like that is going to be a lot less frustrating for someone learning on their own that may not have the option to ask for help when they inevitably get stuck.
And damn, C is an entirely different beast...
All i really feel i have learned in the last 4 years is how to write terminal based applications in java or c# asp.net applications. I dont feel ive learned anything that could really be applied at a career
Please note that this site uses cookies to personalise content and adverts, to provide social media features, and to analyse web traffic. Click here for more information.