Live data from Hacker News

Show HN: Kalk, A calculator with math syntax, complex numbers

kalk.strct.net

1–10 of 90 posts

Re: Show HN: Kalk, A calculator with math syntax, complex numbers

#2
kalk is a calculator that has syntax highlighting, automatically turns names into symbols (eg. sqrt to √), supports math-like syntax (eg. f(x) = x(2sinx + 3) , estimation of derivatives and integrals, complex numbers, and runs in the browser using WebAssembly.

Re: Show HN: Kalk, A calculator with math syntax, complex numbers

#4

I usually use the interactive Python prompt when doing calculations, but kalk takes it up a notch. Well done! (The pre-built Linux binary segfaults before it can show the result on my ArchLinux box, but the cargo installed one works like a charm.)

Thank you! I made this as a replacement for using the Python prompt for calculations actually haha.

Hm that's strange though, it seems to work for me (also on Arch). What calculation did you do?

Re: Show HN: Kalk, A calculator with math syntax, complex numbers

#5
post #4

I usually use the interactive Python prompt when doing calculations, but kalk takes it up a notch. Well done! (The pre-built Linux binary segfaults before it can show the result on my ArchLinux box, but the cargo installed one works like a charm.)

Thank you! I made this as a replacement for using the Python prompt for calculations actually haha. Hm that's strange though, it seems to work for me (also on Arch). What calculation did you do?

Any calculation, even simple ones

    >> 1+2
    fish: Job 1, './kalk-linux' terminated by signal SIGILL (Illegal instruction)

Re: Show HN: Kalk, A calculator with math syntax, complex numbers

#6
post #4

Earlier quoted context omitted.

Thank you! I made this as a replacement for using the Python prompt for calculations actually haha. Hm that's strange though, it seems to work for me (also on Arch). What calculation did you do?

Any calculation, even simple ones >> 1+2 fish: Job 1, './kalk-linux' terminated by signal SIGILL (Illegal instruction)

(Same thing happens if the shell is bash.)

Re: Show HN: Kalk, A calculator with math syntax, complex numbers

#7
post #4

Earlier quoted context omitted.

Thank you! I made this as a replacement for using the Python prompt for calculations actually haha. Hm that's strange though, it seems to work for me (also on Arch). What calculation did you do?

Any calculation, even simple ones >> 1+2 fish: Job 1, './kalk-linux' terminated by signal SIGILL (Illegal instruction)

Well, that's not a segfault. It's more likely that it's being compiled with an incorrect/specific architecture (e.g. using AVX2 instructions). Though it really shouldn't be using such instructions for basic math. It is possible the instruction pointer is getting messed up too.

Re: Show HN: Kalk, A calculator with math syntax, complex numbers

#8
post #4

Earlier quoted context omitted.

Thank you! I made this as a replacement for using the Python prompt for calculations actually haha. Hm that's strange though, it seems to work for me (also on Arch). What calculation did you do?

Any calculation, even simple ones >> 1+2 fish: Job 1, './kalk-linux' terminated by signal SIGILL (Illegal instruction)

Hmm, that's very strange, considering I'm running a very similar setup (Arch and fish). I wonder if it could be an issue with the library I'm using for big floats..

Re: Show HN: Kalk, A calculator with math syntax, complex numbers

#9

Earlier quoted context omitted.

Any calculation, even simple ones >> 1+2 fish: Job 1, './kalk-linux' terminated by signal SIGILL (Illegal instruction)

Well, that's not a segfault. It's more likely that it's being compiled with an incorrect/specific architecture (e.g. using AVX2 instructions). Though it really shouldn't be using such instructions for basic math. It is possible the instruction pointer is getting messed up too.

Ah, thanks for setting me straight. I just noticed the core dump and assumed a segfault.

And thanks for fixing the two issues so fast.

Re: Show HN: Kalk, A calculator with math syntax, complex numbers

#10
post #8

Earlier quoted context omitted.

Any calculation, even simple ones >> 1+2 fish: Job 1, './kalk-linux' terminated by signal SIGILL (Illegal instruction)

Hmm, that's very strange, considering I'm running a very similar setup (Arch and fish). I wonder if it could be an issue with the library I'm using for big floats..

I agree, that's very strange, considering the similar enviroments. But perhaps your CPU has a more modern instruction set than mine.
Post reply on HN