You are not logged in.

#1 2009-11-27 01:52:03

y27
Member
Registered: 2009-05-27
Posts: 147
Website

HC - A scientific, graphing, supp complex nums CLI and GUI calculator


********
I uploaded all three packages to AUR! Please use the PKGBUILDs there if you want to install this now. Thanks a lot goran'agar and foutrelis for help with the PKGBUILDs.

AUR links:

mapm : http://aur.archlinux.org/packages.php?ID=32319
hc : http://aur.archlinux.org/packages.php?ID=32321
hcg : http://aur.archlinux.org/packages.php?ID=32320


UPDATE (28.2.2010) : I now also finally have a github account where you can find the newest version of hc (cli only) which obviously has all the newest things I implemented but on the other hand it may be unstable. Anyway, here's the link : http://github.com/houbysoft/hc
********

Hello ArchLinux users,

some time ago, I was a little unsatisfied with existing calculators (either it was too memory/CPU-consuming (it had to work well, among others, on a 128MB RAM computer), or it lacked the functions I needed (f.ex. nCr and nPr)), and so I decided to write my own command-line (now there also is a GUI version) calculator.

Here is a little description:

The goal of this program is to provide an open source calculator with a
simple and easy-to-use interface, similar to a command prompt, but a lot of
options and a multitude of functions.

You can also type "help" in the command prompt if you need any help - or
contact me here.

There are two major versions of HC -- a CLI (command line interface) and a
GUI (graphical user interface).

To get you an idea, have some screenshots:
CLI version
hc-0.4.2-linux.png

GUI version
hcg-ubuntu2.png

I thought some of you might like it, so I posted it here. It is of course open source (GPL v3) and cross-platform (precompiled for Linux and Windows).
The calculator's homepage is
http://houbysoft.com/hc/
If you're interested, you'll find a lot more details there.


Please post some feedback/criticism etc.; also please report any bugs - I started this project ~2 months ago so it is not yet completely stable and complete.

Thanks for reading, give it a try!

Last edited by y27 (2010-03-01 01:24:13)

Offline

#2 2009-11-27 04:26:17

keenerd
Trusted User (TU)
Registered: 2007-02-22
Posts: 647
Website

Re: HC - A scientific, graphing, supp complex nums CLI and GUI calculator

Neat.  I like it.  It is a shame the app is not in the AUR.

Offline

#3 2009-11-27 13:32:45

y27
Member
Registered: 2009-05-27
Posts: 147
Website

Re: HC - A scientific, graphing, supp complex nums CLI and GUI calculator

Thanks.

For AUR, I have a few problems; first, I never made any package for it, so I don't really have much experience.

However, there is another problem, this calculator uses the MAPM library (www.tc.umn.edu/~ringx004/mapm-main.html) for higher precision, but when I run

pacman -Ss mapm

it finds nothing, and so does AUR.

In my application, it's statically linked. The Packaging guide says that absolutely no binaries packages should be included in AUR submissions. Does that mean I should create two packages, one for libmapm, and one for hc, or can I put the sources of libmapm in the hc package, or can I simply include a libmapm.a?

Offline

#4 2009-11-27 13:53:32

goran'agar
Member
From: Nothern Italy
Registered: 2009-05-19
Posts: 167

Re: HC - A scientific, graphing, supp complex nums CLI and GUI calculator

Really nice. IIRC there is a forum section dedicated to PKGBUILD requests. Maybe you can post something there.

Updated: a quick'n dirty PKGBUILD for mapm in shared form:

# Contributor: Fabio Comolli <fabio.comolli@gmail.com>
pkgname=mapm
pkgver=4.9.5
pkgrel=1
pkgdesc="Mike's Arbitrary Precision Math Library"
url="http://www.tc.umn.edu/~ringx004/mapm-main.html"
depends=('gcc')
provides=('mapm')
source=("http://www.tc.umn.edu/~ringx004/mapm-$pkgver.tar.gz")
md5sums=('a92ff86b6240f78f882661e0b1c11920')
license=('freeware')
arch=('i686' 'x86_64')

build() {
  cd $startdir/src/mapm_$pkgver
  gcc -c -Wall -O2 -fPIC map*.c || return 1
  gcc -shared -o libmapm.so.0 map*.o || return 1
  mkdir -p $startdir/pkg/usr/lib
  mkdir -p $startdir/pkg/usr/include
  mkdir -p $startdir/pkg/usr/share/mapm
  cp $startdir/src/mapm_$pkgver/libmapm.so.0 $startdir/pkg/usr/lib
  cp $startdir/src/mapm_$pkgver/m_apm*.h $startdir/pkg/usr/include
  cp -a $startdir/src/mapm_$pkgver/DOCS $startdir/pkg/usr/share/mapm
}

The included README file says that license is freeware, so there shouldn't be any problems. I tested it on x86 and it works. I' don't have any x86-64 machines.

I'm not able to create any PKGBUILD for the application itself as the website executes a php script before allowing the download.

Last edited by goran'agar (2009-11-27 16:30:46)


Sony Vaio VPCM13M1E  - Arch Linux - ZFS - Syslinux - XFCE .
Samsung SGS - CM10.1 - Semaphore 2.8.0 .

Offline

#5 2009-11-27 15:26:03

tomd123
Developer
Registered: 2008-08-12
Posts: 565

Re: HC - A scientific, graphing, supp complex nums CLI and GUI calculator

Feature requests: variable assignment and function declaration.
BTW, have you considered using the python interpretor for your calculations? If the functions you need aren't already in it, you can easily add them.

Offline

#6 2009-11-27 17:33:07

y27
Member
Registered: 2009-05-27
Posts: 147
Website

Re: HC - A scientific, graphing, supp complex nums CLI and GUI calculator

goran'agar wrote:

I'm not able to create any PKGBUILD for the application itself as the website executes a php script before allowing the download.

Thanks a lot, I'll test it out soon.

If you'd help me with the PKGBUILD for my app itself, the full links are:

http://houbysoft.com/download/hc-VERSION-TYPE.tar.gz

where VERSION is the version number, so for example 0.4.2, and TYPE is either linux or src.

I'm not sure which format of URLs is needed so please ask me if you need something else.
Also, for windows versions, the urls are:

http://houbysoft.com/download/hc-VERSION-win.[b]zip[/b]

(in case you care).

tomd123 wrote:

Feature requests: variable assignment and function declaration.
BTW, have you considered using the python interpretor for your calculations? If the functions you need aren't already in it, you can easily add them.

Functions and variables:
I'll put it on my roadmap smile

For the python interpreter : yes, I did, but dismissed it because:
- it's not very convenient - you have to retype stuff to floats if you don't want only integer results
- it's slow (again, this had to work and take a very small amount of CPU and memory on a 333MHz and 128 MB RAM system), and in algorithms where speed is crucial this would be even more of a concern
- I know about psyco to speed it up, but AFAIK it doesn't work on 64bit processors
- I wanted it to be small and minimalistic, installing a python distribution imo isn't
- I like programming, writing a calculator is fun smile

Offline

#7 2009-11-27 19:06:27

Ghost1227
Forum Fellow
From: Omaha, NE, USA
Registered: 2008-04-21
Posts: 1,418
Website

Re: HC - A scientific, graphing, supp complex nums CLI and GUI calculator

I'll put together a PKGBUILD for this when I get home from work if no one else beats me to it.

Offline

#8 2009-11-27 19:42:02

y27
Member
Registered: 2009-05-27
Posts: 147
Website

Re: HC - A scientific, graphing, supp complex nums CLI and GUI calculator

Thanks a lot smile

Offline

#9 2009-11-27 20:03:20

goran'agar
Member
From: Nothern Italy
Registered: 2009-05-19
Posts: 167

Re: HC - A scientific, graphing, supp complex nums CLI and GUI calculator

PKGBUILD for hcg

# Contributor: Fabio Comolli <fabio.comolli@gmail.com>
pkgname=hcg
pkgver=0.4.2
pkgrel=1
pkgdesc="HoubySoft Calculator - a calculator with lot of options and abundant functions"
url="http://hc.houbysoft.com"
depends=('mapm' 'gtk2' 'glib2')
provides=('hcg')
source=("http://houbysoft.com/download/$pkgname-$pkgver-src.tar.gz")
md5sums=('3c06c0d9e4ffb220a30820c733d55d1d')
license=('GPL 3')
arch=('i686' 'x86_64')

build() {
  cd  $startdir/src/$pkgname-$pkgver-src
  gcc -DHCG `pkg-config gtk+-2.0 gthread-2.0 --cflags` -DHCG_E -c main.c || return 1
  gcc -DHCG `pkg-config gtk+-2.0 gthread-2.0 --cflags` -DHCG_E -c utils.c || return 1
  gcc -DHCG_E -c hc_functions.c || return 1
  gcc -DHCG_E -c hc.c || return 1
  gcc `pkg-config gtk+-2.0 gthread-2.0 --cflags --libs` main.o utils.o hc_functions.o hc.o /usr/lib/libmapm.so.0 -o hcg || return 1
  mkdir -p $startdir/pkg/usr/bin
  mkdir -p $startdir/pkg/usr/share/$pkgname
  cp $startdir/src/$pkgname-$pkgver-src/$pkgname $startdir/pkg/usr/bin
  cp -a $startdir/src/$pkgname-$pkgver-src/README $startdir/pkg/usr/share/$pkgname
  cp -a $startdir/src/$pkgname-$pkgver-src/LICENSE $startdir/pkg/usr/share/$pkgname
}

Last edited by goran'agar (2009-11-27 20:03:52)


Sony Vaio VPCM13M1E  - Arch Linux - ZFS - Syslinux - XFCE .
Samsung SGS - CM10.1 - Semaphore 2.8.0 .

Offline

#10 2009-11-27 20:43:24

y27
Member
Registered: 2009-05-27
Posts: 147
Website

Re: HC - A scientific, graphing, supp complex nums CLI and GUI calculator

Thanks again, goran'agar. Ghost1227, too late then, thanks anyway smile

Learning from the PKGBUILD by goran'agar, I wrote one for hc command-line version:

EDIT : Please use the PKGBUILDs in AUR now. (links in the first post)

I tested both of goran'agar's PKGBUILDs, they work fine on i386 (I don't have any 64bit machines with ArchLinux installed).
I also tested mine for the CLI version and it also worked fine.

What should I do now? Should I wait until some more people test/approve/disapprove the PKGBUILDs, and then upload them to AUR? Or will you goran'agar since you created most of the PKGBUILDs?

Again sorry but I've never done this before.

Thanks once more for help.

Last edited by y27 (2009-11-29 02:37:03)

Offline

#11 2009-11-28 11:14:13

goran'agar
Member
From: Nothern Italy
Registered: 2009-05-19
Posts: 167

Re: HC - A scientific, graphing, supp complex nums CLI and GUI calculator

y27 wrote:

Thanks again, goran'agar. Ghost1227, too late then, thanks anyway smile

You're welcome.

y27 wrote:

What should I do now? Should I wait until some more people test/approve/disapprove the PKGBUILDs, and then upload them to AUR? Or will you goran'agar since you created most of the PKGBUILDs?

Again sorry but I've never done this before.

Thanks once more for help.

I don't know, AFAIK there is a forum dedicated to PKGBUILDs, You probably should ask there.


Sony Vaio VPCM13M1E  - Arch Linux - ZFS - Syslinux - XFCE .
Samsung SGS - CM10.1 - Semaphore 2.8.0 .

Offline

#12 2009-11-28 14:48:16

y27
Member
Registered: 2009-05-27
Posts: 147
Website

Re: HC - A scientific, graphing, supp complex nums CLI and GUI calculator

OK, posted in the AUR section (seems more appropriate to me than the PKGBUILD section as the PKGBUILDs work correctly):
http://bbs.archlinux.org/viewtopic.php?pid=663586

Last edited by y27 (2009-11-28 14:48:58)

Offline

#13 2009-11-29 00:03:30

y27
Member
Registered: 2009-05-27
Posts: 147
Website

Re: HC - A scientific, graphing, supp complex nums CLI and GUI calculator

Whoops there was a bug in the syntax checking function, it's fixed now.

Ok, edit once more smile
Use the PKGBUILDs in AUR now (links in the first post).

Last edited by y27 (2009-11-29 02:38:11)

Offline

#14 2009-11-29 10:06:46

goran'agar
Member
From: Nothern Italy
Registered: 2009-05-19
Posts: 167

Re: HC - A scientific, graphing, supp complex nums CLI and GUI calculator

y27 wrote:

Whoops there was a bug in the syntax checking function, it's fixed now.

Ok, edit once more smile
Use the PKGBUILDs in AUR now (links in the first post).

I saw them in the AUR. Congratulations and many thanks for your work.


Sony Vaio VPCM13M1E  - Arch Linux - ZFS - Syslinux - XFCE .
Samsung SGS - CM10.1 - Semaphore 2.8.0 .

Offline

#15 2009-11-29 18:56:31

y27
Member
Registered: 2009-05-27
Posts: 147
Website

Re: HC - A scientific, graphing, supp complex nums CLI and GUI calculator

goran'agar wrote:

I saw them in the AUR. Congratulations and many thanks for your work.

Thanks too, I fixed the typo smile

Offline

#16 2009-11-29 19:06:51

goran'agar
Member
From: Nothern Italy
Registered: 2009-05-19
Posts: 167

Re: HC - A scientific, graphing, supp complex nums CLI and GUI calculator

Feature request: a resizable window for hgc with the possibility to widen the result window.


Sony Vaio VPCM13M1E  - Arch Linux - ZFS - Syslinux - XFCE .
Samsung SGS - CM10.1 - Semaphore 2.8.0 .

Offline

#17 2009-11-29 20:21:39

y27
Member
Registered: 2009-05-27
Posts: 147
Website

Re: HC - A scientific, graphing, supp complex nums CLI and GUI calculator

goran'agar wrote:

Feature request: a resizable window for hgc with the possibility to widen the result window.

Done (the window is resizable, everything except the result area has a stable size, the result area takes all the rest (ie in gtk language, it is packed with expand=TRUE and fill=TRUE)), that should fix the problem.

Offline

#18 2009-11-29 22:03:54

goran'agar
Member
From: Nothern Italy
Registered: 2009-05-19
Posts: 167

Re: HC - A scientific, graphing, supp complex nums CLI and GUI calculator

y27 wrote:
goran'agar wrote:

Feature request: a resizable window for hgc with the possibility to widen the result window.

Done (the window is resizable, everything except the result area has a stable size, the result area takes all the rest (ie in gtk language, it is packed with expand=TRUE and fill=TRUE)), that should fix the problem.

Thanks, However, the app doesn't remember the new length/height so you have to resize the window any time you restart the app.

No big deal however, hgc is very useful as it is now.


Sony Vaio VPCM13M1E  - Arch Linux - ZFS - Syslinux - XFCE .
Samsung SGS - CM10.1 - Semaphore 2.8.0 .

Offline

#19 2009-12-05 19:22:59

y27
Member
Registered: 2009-05-27
Posts: 147
Website

Re: HC - A scientific, graphing, supp complex nums CLI and GUI calculator

Ok smile

tomd123 and others who have been interested in this feature request:

variable assignment and function declaration.

I updated hc (EDIT: both versions are updated now), and now (version 0.5) it has this feature.

Here is a screenshot of how it works:
hc-0.5-xterm.png

Please give some feedback and please report any bugs you find smile

I updated the package in AUR, you can get the PKGBUILD here :
http://aur.archlinux.org/packages.php?ID=32321 (command line version)
http://aur.archlinux.org/packages.php?ID=32320 (GTK GUI)

Oh and by the way, it's not a bug that you can define a function with an invalid expression (it would still catch it if you try to use it), I made it this way because for example if you want to have a function that includes another function, this makes it easier to define them (ie order doesn't change anything).

Last edited by y27 (2009-12-05 22:23:55)

Offline

#20 2009-12-19 14:53:50

y27
Member
Registered: 2009-05-27
Posts: 147
Website

Re: HC - A scientific, graphing, supp complex nums CLI and GUI calculator

Hi all again, I made another update.

The main new feature for this version, 0.6, is support for graphs.

For now, graphs can be either 2D or 3D, and are generated with plplot (it's in AUR, try to downgrade your cmake version to 2.6 if you have trouble compiling).

Here are a few screenshots that illustrate how this works:

To graph something, you use the graph() function which has the following arguments:
expression, xmin, xmax, ymin, ymax.
An example would be:
graph(1/((1-x)*(2-x)),-10,10,-10,10)

The result of the command above is this image (yes it handles discontinuities properly smile):
graph-discont.png

An example of a 3D graph (with "spectrum" magnitude colored lines):
hc-graph3d.png

There is more info about this on my site : http://houbysoft.com/hc/gphing.php


You can get this from AUR here http://aur.archlinux.org/packages.php?ID=32321 (CLI version) or here for the GUI version : http://aur.archlinux.org/packages.php?ID=32320 as usual.

Please report any bugs and give some feedback!

Last edited by y27 (2009-12-26 23:22:41)

Offline

#21 2009-12-20 18:33:47

y27
Member
Registered: 2009-05-27
Posts: 147
Website

Re: HC - A scientific, graphing, supp complex nums CLI and GUI calculator

Update : sorry, yesterday my FTP server was down so I couldn't upload the GUI, so I uploaded it only now, and I also updated the AUR package, so the graphs work both in CLI and GUI now.

Again please report any bugs, request new features, etc..

Another update:
the CLI version now uses GNU readline so it now works like xterm for example; you can use history with up/down arrows and edit not only with backspace but also left/right arrows.

Last edited by y27 (2009-12-23 20:13:28)

Offline

#22 2010-01-08 02:36:49

y27
Member
Registered: 2009-05-27
Posts: 147
Website

Re: HC - A scientific, graphing, supp complex nums CLI and GUI calculator

Updated to 0.8, now includes support for complex numbers + some bugfixes mainly.

By the way, why nobody replies since v0.5-6? Is there simply no interest, are there problems with compiling, or are there some nasty bugs present? Please tell me if yes.. it's hard to test everything when I'm only one developer atm, it'll help a lot smile

Offline

#23 2010-01-08 13:23:11

muunleit
Member
From: Germany
Registered: 2008-02-23
Posts: 234

Re: HC - A scientific, graphing, supp complex nums CLI and GUI calculator

y27 wrote:

By the way, why nobody replies since v0.5-6? Is there simply no interest, are there problems with compiling, or are there some nasty bugs present?

I haven't tried the gui-version since then, but with the cli-version I have no problems, nor any compiling errors. (I have upgraded to 0.8 some minutes ago)

I'm a happy user of hc. smile


"The mind can make a heaven out of hell or a hell out of heaven" -- John Milton

Offline

#24 2010-01-12 04:06:39

y27
Member
Registered: 2009-05-27
Posts: 147
Website

Re: HC - A scientific, graphing, supp complex nums CLI and GUI calculator

muunleit wrote:

I haven't tried the gui-version since then, but with the cli-version I have no problems, nor any compiling errors. (I have upgraded to 0.8 some minutes ago)

I'm a happy user of hc. smile

Cool, that's always nice to hear smile
Sorry for the GUI issue, but I still haven't found what in gtk_init() could influence/break it, which is also kind of predicated on the fact that I can't reproduce it on my main machine..

Offline

#25 2010-01-18 04:03:33

y27
Member
Registered: 2009-05-27
Posts: 147
Website

Re: HC - A scientific, graphing, supp complex nums CLI and GUI calculator

Updated to version 0.9.1; now supports some statistics, boxplots, and as per one user's request, graph() and graph3() remember their xmin, xmax etc. settings - xmin, xmax, etc. are now optional arguments - and therefore you won't have to write them every time which will make working with graphs in HC faster.

Example generated boxplot:
boxplot.png

Offline

Board footer

Powered by FluxBB