Jump to content

Recommended Posts

Breaking Changes

  • Spaces are not allowed in hex numbers anymore but undorscores are. It caused problems since 0xAA B could not be unambiguously parsed (e.g. it can be 0xAAB or 0xAA B, where 'B' is a unit for 'bytes', so make it explicit by writing 0xAA_B).

 

Features

  • Dark Theme

 

68747470733a2f2f7472656c6c6f2d6174746163

 

  • Render command optimizations, reducing render command count by around 40% (gutters, line number- and result backround are now rendered only once as a big rectangle and not line by line).
  • Active references (variables and line refs in the cursor's row) are now just underlined and the referenced lines are not highlighted fully only their left and right gutter. (Look at the image below)
  • Results where a denominator is a unit (e.g. 5 / year) are now rendered in a more user-friendly way (e.g. instead of 5 year^-1 it is 5 / year)

 

68747470733a2f2f7472656c6c6f2d6174746163

 

  • Automatic closing parenthesis/braces insertion when the opening one is typed
  • Automatic closing parenthesis/braces deletion when the opening one is deleted

 

68747470733a2f2f7472656c6c6f2d6174746163

 

  • Automatic parenthesis/braces wrapping around selected text if opening one is typed while a text is selected

 

68747470733a2f2f7472656c6c6f2d6174746163

 

  • Matching parenthesis are highlighted if the cursor is inside them

 

 68747470733a2f2f7472656c6c6f2d6174746163

 

  • The note can be saved with ctrl-s (Though it is still saved automatically when there is no user interaction)
  • It is possible to apply units directly on Line References or Variables, e.g.

 

var = 12
var km

 

The result of the second line will be 12 km

 

  • Parsing improvement: Now the parser are smarter in deciding what is an operator (e.g. 'in' in 12 m in cm), a unit (12 in which is 12 inch), or a simple string (I downloaded 12 GB in 3 seconds).

 

Now it is even possible to evaluate this string 12 in in in, which is equivalent of 12 inch in inch

 

68747470733a2f2f7472656c6c6f2d6174746163

 

  • Percentage calculations

 

68747470733a2f2f7472656c6c6f2d6174746163

 

  • Max row count was increased from 128 to 256
  • e (Euler's Number) was added, currently as a function (e())
  • Invalid argument types for functions are highlighted as errors (See image below)
  • new functions:

 

68747470733a2f2f7472656c6c6f2d6174746163

 

  • abs(num)
  • ln(num)
  • lg(num)
  • log(num, num)
  • sin(angle) -> num
  • cos(angle) -> num
  • tan(angle) -> num
  • asin(num) -> angle
  • acos(num) -> angle
  • atan(num) -> angle

 

Changed

  • When opening a not empty note, the result panel now tries to be as close to the editor as possible to have a better overview about calculations and their results.
  • GitHub and website links were added to the NoteCalc page
  • Strings at the frontend are now rendered char by char. It is necessary to be able to place the cursor at the right place, since the text rendering does not guarantee that a single char takes exactly 'char-width' pixels.
  • Overlay canvas (the canvas above the app canvas) was removed. It was used to draw overlay effects (e.g. pulsing), but it was problematic since it needed alpha blending, which wasn't always nice and console frontend support is limited. Now pulses are rendered above "BelowText" layer and below the "Text" layer.
  • underscore is allowed in binary numbers (e.g. 0b11_00)
  • Parenthesis have different color than operators.
  • Remove Vec and dynamic allocation from unit parsing and operations.
  • Replaced all unit RefCells to Rc, it was a mistake to use RefCells in the first place.
  • Matrices cannot be deleted anymore by DEL or BACKSPACE, ctrl is needed

 

Fixed

  • Dead characters (e.g. '^' on a hungarian keyboard) were not possible to type
  • Longest visible result length was calculated wrongly when there were multiple headers in a note, which affected the result panel size.
  • sum variable get emptied at #Headers
  • Char width at the fonrend is now integer, ceiling upward. It caused issues with rendering (widths of recatngles were float as well and did not always fill up the required space)
  • Underlines and line reference background rectangles were rendered even if they were outside of the editor area
  • ctrl-x did not copy the selected text
  • Units in the denominator behaved buggy. now expressions like this works well

 

tax A = 50 000/month
tax B = 50 000/year
(tax A + tax B) * (1 year)

 

  • u64 values can be parsed correctly (e.g. 0xFFFFFFFFFFFFFFFF)
  • Bitwise operations now work on u64 values
  • Negative numbers can be presented in binary and hex form
  • Line reference pulsing was called each time a cursor was pressed on the line ref's line, causing flickering
  • 'Line normalization' (the process where the referenced lines' id is normalized to the referenced line actual line number) could be undo with ctrl-z
  • Bitwise shifting operators (<< and >>) used wrapping, resulted in unwanted situations. Now it is an error to use larger shift operands than the underlying integer representation (u64 currently)

 

Download

 

 

Source

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...