Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qcalc spawning behavior change #66

Merged
merged 3 commits into from
Apr 27, 2023
Merged

Conversation

bootstrap-prime
Copy link
Contributor

@bootstrap-prime bootstrap-prime commented Feb 7, 2021

I changed the behavior of calc_preprocess_input to only call qcalc when the input string changes. This is a partial solution to #40. I'm still learning C so I may or may not have a better solution for this later on.

change program to only call qcalc when the input string changes.
src/calc.c Outdated Show resolved Hide resolved
@svenstaro
Copy link
Owner

@bootstrap-prime Are you interested in following up on my little review?

@bootstrap-prime
Copy link
Contributor Author

absolutely, sorry for the delay.

@svenstaro svenstaro mentioned this pull request Feb 7, 2022
@bootstrap-prime
Copy link
Contributor Author

I sort of figured out how to make this better - spawn an interactive qcalc session and then pipe up inputs and outputs.
Unfortunately, it seems that gio g_input_stream_* doesn't have the ability to read, and then return after a timeout, and I'm not familiar enough with async here to implement a cancel.
I thought I could get around this by just directly using libqalculate, but it's C++ and this project is pure C. libqalculate may expose a C abi, but I'm not sure how to use it or what to look for.

@svenstaro
Copy link
Owner

Shall I take a proper look at this PR or do you wanna research this topic further first?

@bootstrap-prime
Copy link
Contributor Author

I don't think I have the motivation to continue, honestly. Most of the window opening spam is removed, so this is probably a good stopping point.

@svenstaro svenstaro mentioned this pull request Apr 27, 2023
@svenstaro svenstaro merged commit 60eec8d into svenstaro:master Apr 27, 2023
@svenstaro
Copy link
Owner

Sorry for forgetting about this for so long. Finally merged it. Thanks!

svenstaro added a commit that referenced this pull request Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants