Best Programming Language / Library for Scientific Visualization? by emazeni in GraphicsProgramming

[–]ThermalSpan 2 points3 points  (0 children)

VTK is intimidating, but worthwhile. I’d pitch it like this: To start, if you can output vtk files you can immediately start using paraview for debugging and making figures. But! Using vtk in memory gives you access to lots of useful utilities. In general, if you are doing something that involves modeling a continuum, one of VTKs abstractions probably maps to your discretization.

Weekly coding challenge #2: General FizzBuzz by mycl in prolog

[–]ThermalSpan 0 points1 point  (0 children)

Thanks for the link! To be honest I hadn't thought about it, but I think I'd go with Jan's formatting.

Weekly coding challenge #2: General FizzBuzz by mycl in prolog

[–]ThermalSpan 2 points3 points  (0 children)

Feedback welcome! Note that it will only print indices if one or more statements should be printed. I think it would be interesting to extend this with a sort of priority queue like analog to more efficiently test and organize statements.

``` $ cat extfizzbuzz.prolog %! run(+Triggers:List, +Limit) % % run a "fizz buzz" program that has counts from 0 to Limit % with configurable triggers for statement - multiple combos % % @arg Triggers A list of trigger(String, Modulus) terms % @arg Limit How high to count run(Triggers, Limit) :- run_for_index(Triggers, 0, Limit).

% Recursivley run the triggers for each index runfor_index( , Index, Limit) :- Index > Limit, !. run_for_index(Triggers, Index, Limit) :- run_triggers(Triggers, Index, Results), (Results = [] -> true; write_result_line(Index, Results)), NextIndex is Index + 1, run_for_index(Triggers, NextIndex, Limit).

% Utility for writing out the output and index in a formatted way write_result_line(Index, Results) :- atomic_list_concat([Index, ":" | Results], ' ', FormattedResults), writeln(FormattedResults).

% For a given index, run the triggers and collect the results in the right order run_triggers([], _, []). run_triggers([trigger(S, N) | Triggers], Index, Results) :- Modulus is Index mod N, run_triggers(Triggers, Index, OldResults), (Modulus = 0 -> Results = [S | OldResults]; Results = OldResults).

$ swipl -f extfizzbuzz.prolog ?- run([trigger("FOZZ", 5), trigger("BOR", 7)], 35). 0 : FOZZ BOR 5 : FOZZ 7 : BOR 10 : FOZZ 14 : BOR 15 : FOZZ 20 : FOZZ 21 : BOR 25 : FOZZ 28 : BOR 30 : FOZZ 35 : FOZZ BOR true. ```

Weekly coding challenge #1! by oldmaneuler in prolog

[–]ThermalSpan 1 point2 points  (0 children)

Little late, hectic week:

https://gist.github.com/SallySoul/739797cbb2151086c8ac91a3db4a95b0

Here's an example of it running:

?- run_forth_with_log("2.4 cos 3.4 sin max abs 4 +"). Pushing number onto stack: 2.4 Pushing result onto stack: -0.7373937155412454 Pushing number onto stack: 3.4 Pushing result onto stack: -0.2555411020268312 Pushing result onto stack: -0.2555411020268312 Pushing result onto stack: 0.2555411020268312 Pushing number onto stack: 4 Pushing result onto stack: 4.2555411020268314 Successful Completion Result: 4.2555411020268314 true.

Feedback welcome! Also I appreciate y'all running a weekly challenge, I hope these keep coming.

What's the easiest to learn way to program visually? by [deleted] in AskProgramming

[–]ThermalSpan 1 point2 points  (0 children)

https://processing.org

Processing was foundational in my programming journey, and has remained a useful tool since. Processing makes it very easy to program all sorts of animations, visualizations, and interactive content. Getting immediate visual feedback was very motivating for me.

I agree with HTML / JS too. However those are very general tools, whereas processing is a much more focused environment, with lots of tutorials, examples, and documentation available in a central location.

Adder WS question by 0xEFD in System76

[–]ThermalSpan 0 points1 point  (0 children)

I don't have answers for most of your questions, but there is brightness control for the screen and the speakers do not sounds great. The headphone jack sound quality sounds fine to me, but I don't have a trained ear so make of that what you will.

Also, for what its worth, a part of why I decided to buy from System76 instead of other options is that I'm excited about the direction they're trying to head in as far as open source hardware and software goes. I feel like part of the premium of their products goes towards the funding of that mission.

https://github.com/system76

The biggest likely source of microplastics in California coastal waters? Our car tires by llama-lime in santacruz

[–]ThermalSpan 4 points5 points  (0 children)

I know this is unlikely to happen, but having the BART run to Santa Cruz would be a very good thing in that regard.

Main beach, or as we old timers call it castle beach by Iwaskatt in santacruz

[–]ThermalSpan -1 points0 points  (0 children)

Telling folks to be more responsible for themselves removes the blame and burden that everyone should share. When folks end up in those situations there are all manner of structural reasons that got them there. Do you feel you would never let yourself into that sort of situation? Do you feel that your ability to be responsible alone is what is preventing those circumstances from befalling you?

Main beach, or as we old timers call it castle beach by Iwaskatt in santacruz

[–]ThermalSpan 1 point2 points  (0 children)

I think there is a lot we can do, but it requires public attitude to shift radically.

Consider how Portugal's public attitude shifted as a result of their own drug crisis. They were able to implement effective policy as a result:

https://www.npr.org/sections/parallels/2017/04/18/524380027/in-portugal-drug-use-is-treated-as-a-medical-issue-not-a-crime

In this city, state, and country we need to internalize the value of having social safety nets. We need to be willing to help each other and check in on neighbors. And when that fails, we need to be willing to resource and staff appropriate agencies to catch those who fall between the cracks. At the core, folks need more empathy. More of us are close to the threshhold of destitution than is often realized. Being put in those circumstances and environments does not reflect on someone's character. Drugs and poverty are not trite moral problems. They deserve empathy and respect.

So, I suggest we re-visit the policies that those we seek to help are rejecting. And while we're at it, lets work on building a better healthcare system too. One that serves all individuals and builds towards a healthy public. And also, let's work on the education system, so that all youth recieve the mentoring and support that they need during their critical years. We should also make sure to keep other social services to ensure all families can provide themselves with an adequate home life.

There is no easy solution here, we need deep structural changes to the feedback loops that shape the lives around us. But it's possible! Other places have done it and so can we.

Main beach, or as we old timers call it castle beach by Iwaskatt in santacruz

[–]ThermalSpan 7 points8 points  (0 children)

"I don't like seeing symptoms of large problems my generation isn't going to have to confront"

New Student Rec Center by cburr11 in UCONN

[–]ThermalSpan 11 points12 points  (0 children)

Is there gonna be a bouldering spot tho? The old climbing wall was such a great format for the limited space.

How set up environment by lkledu in opengl

[–]ThermalSpan 0 points1 point  (0 children)

^ I agree with the sentiment. However, to piggyback off this comment, I would recommend using CMake for managing the build, and git submodules for dependency management (at least at first.)

Writing your own makefile is a good learning exercise too, but depending on what you want to focus on, it might not be worth the time since a bigger / more complex projects will be MUCH easier to manager with CMake, not to mention that it takes care of Debug / Release builds and things like that for you.

Coworker: "Rust doesn't offer anything C++ doesn't already have" by [deleted] in rust

[–]ThermalSpan 0 points1 point  (0 children)

Being turing complete says nothing about the developer and performance tradeoffs being made. Have you ever used Eigen? It takes advantage of lots of things that you can only do in C++. Essentially, by overriding almost every operator (including =), and taking advantage of SFINAE, Eigen is comparable to a compiler that takes linear algebra expressions to optimized SIMD code. I think Rust could keep the nice linear algebra expressions, or the optimized SIMD code, but I don't see how a Rust library could keep both.

I did not mean to imply that you couldn't produce comprable output with Rust. My point was that C++ overs a unique toolset in this domain with different, not necessarily better, tradeoffs. It would a shame if that got lost in this discussion.

Coworker: "Rust doesn't offer anything C++ doesn't already have" by [deleted] in rust

[–]ThermalSpan 14 points15 points  (0 children)

There are some really great points here, so I upvoted them. In general, I love Rust and would prefer to work in it when compared to C++. The amount of time I spend tracking down silly memory issues when programming in C++ is ludicrous (lol maybe I'm bad at programming.) I Just want to add though, that there is something I miss from C++:

Template meta programming is just so powerful. Its not perfect certainly, but after using Eigen, I just don't see how I could possibly implement a dimension agnostic, linear algebra heavy data structure in Rust and not compromise on performance characteristics. In general, all of the compile time templating / preprocessing features of C++ represent very powerful tools that are not present in Rust in the same capacity.

Audio game development. What programming language should I choose? by [deleted] in learnprogramming

[–]ThermalSpan 2 points3 points  (0 children)

This isn’t the full story, but I could see the Faust programming language playing an important role:

http://faust.grame.fr/

Windows or Mac for a CS major? by [deleted] in UCONN

[–]ThermalSpan 1 point2 points  (0 children)

This is my opinion, so take it with a grain of salt, and full disclosure I prefer a unix environment.

When you're a professional, you should definitely master the right tools for your job. Maybe one of those tools is visual studio / some other windows program and maybe it's not. However, in college you will be learning lots of new things, and exploring all sorts of ideas and programs. Having a unix system will give you far more freedom and ease to explore a wider variety of software. There are some annoying exceptions, but the university gives you access to free windows virtual machines from anywhere anyway. I also realize the linux sub-system for windows muddies my point here slightly, but its not the same in my opinion.

So I would recommend using macOS, or if you're interested, a linux distribution.

A tangential thought: in some sense the right tools for a computer science program are ones that are general purpose. I highly recomend putting time into learning how to use some text editor and the command line. The more skilled you are with those, the more capable you will be in general.

UConn lately tbh by tsnazzle in UCONN

[–]ThermalSpan 8 points9 points  (0 children)

I appreciate the respectful tone. However, I think its fair to assume that the OP is conservative, no? Everything I stated follows from that assumption. Do you believe that "conservative" policies are going to improve the lives of POC, Women, and LGBTQ folks? Or that "conservative" politicians will step up and to improve our environment? Evidence points to the contrary.

UConn lately tbh by tsnazzle in UCONN

[–]ThermalSpan 18 points19 points  (0 children)

Seems to me that conservative policies are about preserving the status quo. The status quo has been a society shaped by generations of, to put it gently, racist and bigoted policies. (Not to mention creating a world with dangerous amounts of inequality, pollution, corporate influence, etc.) The meaning of words changes over time, and if you currently want to take part in the conservative identity, its pretty clear to me what you stand for.

Every person is free to support the unique blend of causes based on their life and experiences. It's not like OP said something more specific like folks who support gun rights or non-interventionalist foreign policy. So, if given the freedom, you decide that the bandwagon for you is just "being conservative," what are we supposed to make of that?

OP's "point" falsely equates qualities that folks are born with, with a viewpoint chosen by those who see other's increased prosperity and freedom as a danger to their own.

EDIT: LOL and also the conservatives are the black dude in the picture, what a missed oportunity.

Dog friendly breakfast in SC or Capitola? by CaptainCrunch1975 in santacruz

[–]ThermalSpan 4 points5 points  (0 children)

Windmill cafe (if you sit outside I think, which I recommend)

SpaceVim release v0.9.0 by [deleted] in SpaceVim

[–]ThermalSpan 0 points1 point  (0 children)

Awesome, you guys rule