• Breaking News

    Friday, May 21, 2021

    What would it look like to design a language that doesn't use a call stack or environment for scope and procedures, but is somehow based on a different structure? Computer Science

    What would it look like to design a language that doesn't use a call stack or environment for scope and procedures, but is somehow based on a different structure? Computer Science


    What would it look like to design a language that doesn't use a call stack or environment for scope and procedures, but is somehow based on a different structure?

    Posted: 20 May 2021 06:49 PM PDT

    This is a really weird question that probably has no good answer, and I'm asking mostly out of curiosity.

    Every modern programming paradigm has some kind of call stack. The only alternative as far as I know is GOTO-riddled spaghetti code. In addition to call stacks, we also have environments like those in functional programming. Local variables are pushed onto the stack when the container opens and popped when it closes. But what makes the stack special? Could you modularize your code with a different structure? Does such a thing even make sense?

    Another thing that got me thinking is how even though procedures are implemented with a stack, they are drawn as trees. Suppose you have a function that makes two recursive calls and combines them, and it goes down to a certain depth. You would draw a recursive tree to show how it runs and it would look like a binary tree, even though only a stack is needed to actually implement it. Of course, the difference is that the tree doesn't just tell you the state of the thread at a moment like the stack does, but it actually contains the entire history. So the extra dimension that you've added is time. I don't know how that helps answer my question, but it is just a way that I saw another data structure in the current method of modularizing code.

    submitted by /u/thisisfelix_
    [link] [comments]

    DOE supercomputers accelerate COVID-19 antiviral drug discovery

    Posted: 20 May 2021 08:23 AM PDT

    How would you structure a master and doctoral curriculum in distributed computing/systems?

    Posted: 20 May 2021 04:44 PM PDT

    I'm a mid level software engineer with a bachelors in CS. So far in my career I have been lucky to experience working on very modern distributed technologies. The tools that have sparked my interest in distributed computing/systems are Akka and Kubernetes.

    In my opinion, Akka is like the TensorFlow of distributed computing/systems because it abstracts the distributed computing concepts from the end user. In very much the same way that TensorFlow abstracts all the math and statistics from the end user. Kubernetes has sparked my interest because it is being used as the tool to manage multiple micro-services. Tools like Kubernetes are also crucial for creating what are called reactive micro-services. The word reactive comes from https://www.reactivemanifesto.org/

    When digging deeper into the code of both tools I discovered there were concepts that were very advanced and not taught at the undergraduate level. For example, Akka is based on the Actor Model. The actor model really belongs to the concept called Process calculus - https://en.wikipedia.org/wiki/Process_calculus

    Kubernetes has very advanced networking and concepts that make the system extremely resilient, it is also inspired by Google's internal system called Borg. What I have learned is that Kubernetes was actually improved by concepts by Borg. Obviously, Google would never share the Borg's secret sauce, but surely the foundational knowledge to build such a system that is publicly available in books and research papers?

    Another concept that is popular is streaming, think about Apache Kafka.

    If you were to design a curriculum that is also math heavy, how would you do it?

    submitted by /u/math_learning
    [link] [comments]

    Bias in AI - What is it, why does it happen and can it be fixed?

    Posted: 20 May 2021 07:36 AM PDT

    What should be the pseudocode for running bellman-ford algorithm to find all pairs shortest paths?

    Posted: 21 May 2021 01:33 AM PDT

    My professor has asked me to figure out a pseudocode that uses the technique used in Bellman-ford algorithm and find the all pairs shortest paths. The graph contains negative edges and is a directed and weighted graph.

    My professor follows the CLRS book and I did read it and found that if you run a single source shortest path algo like the bellman-ford algo V times like for all the vertices, this will find the all pairs shortest path.

    Should the pseudocode be like this?

    Mod-Bellman-Ford(G,w,s)

    Initialise-Single-Source(G,s)

    For each vertex v that belongs to V

    For i=1 to |G.V|-1

    For each edge (u,v) that belongs to G.E

    Relax(u,v,w)

    For each edge (u,v) that belongs to G.E

    If v.d > u.d + w(u,v)

    Return False

    Return True

    Can anybody help me with this? :( i dont know if its correct or not. Just want to verify whether its correct or completely wrong.

    submitted by /u/BabaYaga141
    [link] [comments]

    Starting out with Data Structures and Algorithms. Need some recourses

    Posted: 21 May 2021 01:11 AM PDT

    I'm a senior year CS student. Took a DSA course in my sophomore. That's about it. Starting afresh.

    Finally done with saying "Oh. I don't know DSA lol I'm terribly bad; I can't do it". Fucking done with the defeatist mentality. My younger self would be a shame looking at how I'm rn.

    Anyway, I need suggestions on which books/courses I should follow. I've been solving some leetcode (~137 questions. ~96 easy, ~38 mediums, ~3 hard).

    I want to follow a book, absorb knowledge and start Leetcoding anew from level 0. That way it'll be easier to track progress.

    Is Skiena: Algorithms design manual a good book for someone who's starting new with DSA?

    submitted by /u/SuccMyStrangerThings
    [link] [comments]

    Why is 3SAT O(2^n) and not O(n)?

    Posted: 21 May 2021 12:53 AM PDT

    As I understand the time complexity of any function/operation etc, is the number of steps till it reaches its goal, depending on the input, and so my question is, and I apologize for how idiotic it might sound, why do we state that the 3SAT problem has time complexity of 2^n and not just n, I understand that 2^n is the number of rows in a truth table based on n variables, but why don't we state that we have n rows, and so then the time complexity is O(n), basically why do we state the number of rows in a truth table in terms of the number of variables and not as is ?

    Thank you

    submitted by /u/PsychologicalDrawer0
    [link] [comments]

    No comments:

    Post a Comment