ndcode.git
3 months agoIn ansi_c: master
Nick Downing [Wed, 27 Dec 2023 13:44:43 +0000 (00:44 +1100)]
In ansi_c:
* First cut at pretty printer, fix minor inconsistencies in ansi_c.[ty]
* Rationalize how ParameterDeclaration is handled in both the parser (convert to a name, type pair as soon as it is parsed and then use this later to build the TypeFunctionANSI), and the pretty printer (attach the names to the parameters)
* Add expression precedence in the pretty printer
* Add declarator precedence in the pretty printer
* Add indenting in the pretty printer
* Fix a bug which prevented the -> operator from pretty printing correctly
* Fix a bug which prevented (void) argument list from pretty printing correctly
* Rationalize new scopes so they are only defined by an ItemList which can be either a TranslationUnit or a BlockItemList, make the definitions of enums, structs and unions from each new scope be output at the start of the ItemList
* In pretty printer, improve how base types are generated and structs printed
* Add stack-based VM for testing
* In /vm_asm.py, add the ability to assemble float128 numbers
* In /vm_test.asm, add more test routines
* In /vm_test.asm add floating-point printing routine, in /vm.c fix order of operands for the non-commutative operators sub(.r), div(.r|.u|.u.r) and relational operators, in /vm.c and /vm_asm.py add the forgotten mod(.r|.u|.u.r) operator (%)
* In /vm_test.asm add square-root calculation routine
* In /vm_test.asm use "offpc label@" instead of "imm.i32 label" for a significant space saving, in /vm_asm.py improve the listing file with auto operands
* In /vm_asm.py implement imm.iXX and imm.fXX constant optimization using cvt.XX
* Rename /vm_test.asm to /vm_test_128.asm, implement 64-bit and 32-bit versions
* In /pretty_print.t reorder the methods so that e.g. InitDeclaratorList comes after InitDeclarator (my script had placed these backwards when one was a prefix of another) and fix a bug with StatementFor occurring twice, in /*.[ty] change ArrayOrStructOrUnion to ArrayOrStruct and StatementIfElse to StatementIf, in /ansi_c.y fix bugs with missing %space before (?E{MemberIdentifier}IDENTIFIER)
* Make typedef processing occur by intercepting yylex(), it is much simpler
* New way of tracking typedef names so that the full scope analysis can be moved out of the parser and into a separate pass, rationalize DeclaratorFunction and TypeFunction everywhere so that both have derived classes for ANSI or KAndR
* New scope analysis in a separate module (clobbers the type analysis currently)
* Move code out of ansi_c.t into base_type.py, calc_type.py, calc_value.py, declarator.py, storage_class.py
* Add location tracking, syntax error and invalid character reporting
* Modify scope_analysis() to process the tree in strict pre-order
* Implement post_process() which recurses through the tree calling scope_analysis(), the scope_analysis() routine now just processes one node with no recursion
* Add type_analysis() method, called from post_process() in post-order
* Make type_analysis() also call calc_type() and add_cast() on Expression nodes
* Add post_process.Context object, to track return type and switch case type
* In /post_process.py and /type_analysis.py implement initializer stack, in /ansi_c.[ty] and /pretty_print.t remove the InitializerOrExpression base class in favour of wrapping initializer expressions in an extra InitializerExpression node
* Move ExpressionCall parameters coercion from calc_type() into type_analysis()
* Add value_analysis() method, called from post_process() after type_analysis()
* Set up a way of comparing the old scope/type/value analysis result with the new, fix a large number of bugs in both the old and the new so that they match up
* Remove old scope/type/value analysis, fix omissions where Declaration.storage_class was not set and formal parameters were not analyzed by new type analysis

In pilex:
* Fix an error recovery routine that seems to not run often

In pitree:
* Add location tracking, syntax error and invalid character reporting

In piyacc:
* Fix location for one error message
* Fix location tracking bugs (i) cursor was not initialized with input file name, (ii) id_loc and other places were corrupted by taking a reference to y_tab.yylloc rather than a copy, (iii) lex_yy.scanner_cursor was not put back when putting back text in state SC_AFTER_IDENTIFIER, (iv) line and column should be 1-based
* In /ndcode/piyacc/generate_py.py, remove a workaround that set yylval, yylloc before yychar = lex_yy.yylex(), as the relevant code is meant to match the yychar = lex_yy.yylex() call in the skeleton which doesn't have th workaround anymore
* Make syntax error call yyerror() rather than raising a Python exception

4 months agoIn ansi_c:
Nick Downing [Thu, 7 Dec 2023 23:36:31 +0000 (10:36 +1100)]
In ansi_c:
* Add type analysis for initializers, add some extra (s)size_t and bool casts
* Remove rough Expression.get_const_value() in favour of Expression.value
* For array of indeterminate size with initializer, deduce the size
* Add TagIdentifier class and extra annotations for array or struct/union indices
* Support array or struct/union literals in expressions
* Add the Node.strip_redundancy() method, removes all text, declarators, etc

4 months agoIn ansi_c:
Nick Downing [Wed, 6 Dec 2023 11:51:26 +0000 (22:51 +1100)]
In ansi_c:
* Update ansi_c.t for latest pitree, it has default value bug fixed and adds MPFR
* Implement the value field for character constants and string literals
* Add an extra pass for type analysis and constant folding, doesn't support all operators and has just enough implementation to compile the example test.i file
* Implement build() in ansi_c.[ly] to make type analysis and constant folding occur during parsing instead, requires new skeleton code from latest pilex, pitree
* Implement (un)signed_int_value() and float_value() for constructing Value objects directly with a specified precision, instead of cumbersome Value.cast() idea
* Implement mostly complete type analysis and constant folding, compiles nbench

In pilex:
* Make the yy_group_element() routine in the skeleton for pilex --element --groups --python not construct the element until after the text and children are known

In pitree:
* Fix a bug which meant the user had to explictly specify the default value (rather than relying on the built-in null value of each type) if the type was mutable
* Add MPFR type, including default value and serialization/deserialization
* Make the concatenate() routine in the element.py installed by pitree --install-element not construct the element until after the text and children are known

4 months agoIn ansi_c:
Nick Downing [Sun, 3 Dec 2023 16:09:26 +0000 (03:09 +1100)]
In ansi_c:
* Add /nbench containing source for the nbench benchmark from http://www.math.utah.edu/~mayer/linux/nbench-byte-2.2.3.tar.gz preprocessed with musl-gcc from https://musl.libc.org/releases/musl-1.2.4.tar.gz, make the analysis cope with all constructs in this code except for some very tiny workarounds labeled /* Nick */
* Make DeclaratorIdentifier store the identifier text directly in the same way as ExpressionIdentifier does, make specifier list processing slightly more strict
* Refactor parsing of function definitions so that the function is added to the scope as soon as we see the definition, hence can call itself without a prototype
* Add the lex_yy.mask_typedefs flag so that typedef processing can be masked for the identifier following a "struct", "union", "enum", "." or "->" keyword, fix a bug where the scope_(struct|union|enum)_tag was not declared and saved in XML
* Upgrade lexical analyzer to implement the C90 rules explicitly and to add markup to the individual parts of constants, strings etc, add number handling facilities so that we can store the type and (if constant) the value on an expression

In pilex:
* Make some notes in /ndcode/pilex/nfa.py after reverse-engineering the algorithm

5 months agoAdd ansi_c repository:
Nick Downing [Sun, 19 Nov 2023 12:39:14 +0000 (23:39 +1100)]
Add ansi_c repository:
* Initial commit, has scope analysis and beginnings of type analysis

In pilex:
* Modify text_to_python() to handle stray whitespace on otherwise blank line

In pitree:
* Fixes for TypeDict: a reference to AST.TypeString should have been AST.TypeStr, fix several bugs in the generate_serialize() routine that had never been tested
* Modify text_to_python() to handle stray whitespace on otherwise blank line

In piyacc:
* Modify ast_text_to_python() to handle stray whitespace on otherwise blank line

5 months agoIn applesoft_basic:
Nick Downing [Tue, 14 Nov 2023 23:44:47 +0000 (10:44 +1100)]
In applesoft_basic:
* Rename /hrcg to /terminal and terminal* to hrcg_terminal*, add forgotten script
* Move tone.obj and bootable.dsk generation into /util instead of duplicating
* Refactor CALL implementation, to auto-detect tone routine, and be more readable
* Add a convenience script for each game showing how to launch it, with comments
* Make ctrl-c available all the time, improve cleanup to reset scrolling region
* Improve ROMs handling for the emulator, add CG ROM (not used yet)
* Implement text mode and make soft switches more generic (no split screen yet)
* Add forgotten /util directory, forgotten files /terminal/gr_terminal.asm and /terminal/gr_terminal_asm.txt, new .gitignore entries for /orig
* Add /deps.sh, in /linapple remove full-screen mode to make it run properly on recent X server

In c_to_python:
* Update Makefile to make it compile with recent pilex

In pilex, pitree, piyacc:
* Add /fix_bootstrap.sh and run it due to reserved ast and _ast in recent python3

5 months agoIn applesoft_basic:
Nick Downing [Wed, 25 May 2022 16:20:58 +0000 (02:20 +1000)]
In applesoft_basic:
* Add joystick support, and keyboard ready-polling support via HW_IOADR
* Improve the console emulation a bit, can now run little brick out (but the gameplay is not right because we do not emulate text/gr screen memory at the moment)
* Eliminate gr_mem, instead emulate the proper memory layout in ordinary memory
* Implement zero-page emulation for normal/inverse/flash (to help GR emulation)
* Implement a new gr_encode() routine containing most of the logic of gr_update()
* Implement the ability to update text screen with GR commands and vice versa
* Implement a heuristic to detect delay loops, can now play unpatched lemonade
* Add inter-statement delay, fix an oversight regarding POKEs to CH, CV, INVFLG
* Fix error in text() escape sequence leading to incorrect window after quitting
* Change lemonade_tone_nick to tone and LEMONADE TONE NICK to TONE everywhere
* Change lemonade_tone_patched to lemonade_tone and LEMONADE TONE PATCHED to LEMONADE TONE everywhere (just trim disassembly instead of patching out null bytes)
* Add little brick out
* Quick little brick out patch which makes the game playable without inter-statement delay (and makes paddle remain responsive by checking it during the delay)
* Detect common patterns involving PEEK(-16336) and convert to tones (roughly)
* Add ribbit, and various language features needed to make it parse and execute
* Add HRCG, for now just extract a BLOADable image, to avoid dealing with R files
* Add basic HRCG terminal program (cut-down emulated apple running HRCG for now)
* Implement 16-color palette and averaging, for a more realistic NTSC display
* Implement HTAB and VTAB in HRCG terminal, fix character set addressing error
* HRCG and joystick improvements, can now play ribbit game (still a bit rough)
* Tuning ribbit slightly
* Add cursor in HRCG, not blinking yet
* Make HRCG cursor blink, fix some timing/lagginess issues in emulator
* Let HRCG terminal run a child process, with pty for bidirectional communication
* In pty code, fix file handle leaks, add session stuff and termios configuration
* Improve emulator keyboard handling to make shift work, enable cursor by default

22 months agoIn applesoft_basic:
Nick Downing [Sun, 22 May 2022 12:02:28 +0000 (22:02 +1000)]
In applesoft_basic:
* Lo-res graphics sort of working (needs some modifications to LEMONADE source)
* Rename tokenizer to bas_to_tok, detokenizer to tok_to_bas, improve Makefile
* Add bin_to_tok and tok_to_bin for applesoft native format (via dos33 utility)
* Improve interpreter and I/O slightly for lemonade, add lemonade.sh source patch
* Implement ALSA PCM audio sounds for console beep and lemonade (via pyalsaaudio)
* Update the lemonade patch to avoid an out-of-data error after weather report
* Move lemonade files to /lemonade, create Makefiles for /lemonade and /orig
* Implement a better way of creating a bootable disk, via new linapple batch mode
* Remove comments in lemonade patch to fix out-of-memory error, improve slightly
* Improve cursor handling, improve tracebacks, improve lemonade game instructions
* Add some reverse engineering of lemonade assembly language routines
* Add edasm assembly for lemonade assembly language routines, make the patched version load them with BLOAD which frees up space to reinstate the header comments, also back out some problematic changes about RESTORE and the 40-column width
* Remove dead code and redundant operations, fix corrupt byte in lemonade flash
* Remove the RESTORE line-number syntax, which turns out not to be in applesoft
* Build linapple directly rather than building Applewin and moving it (the move was problematic for make since it caused it to be rebuilt on every make cycle)
* Improve console handling, fixes 40 column width issue, implements scroll window
* Improve the lemonade_tone disassembly slightly, improve the analysis procedure in /test to create a correct and reversible model of lemonade_tone and rom_wait
* In patched lemonade, change call 770 to call 784 everywhere, to fix an audible artifact in which the first cycle has the wrong length (heard as leading click)
* Add a new assembly language tone generator, analyze and convert lemonade music
* Tune sunny music a bit, add cup filling music
* Change all music to my tone routine (some differences, but not too noticeable)
* Implement the new music in /apple_io.py as well, for running under emulation
* Calibrate FOR/NEXT delay loops, change delay loops to CALLRE in patched version
* Make GR graphics single width by default, use --gr-width=2 for old behaviour
* Improve terminal emulation (window left/right etc), allow selectable beep style
* Improve PCM audio by reducing framesize (so that latency is 0.01s) and adding a call to snd_pcm_drain(), we can only do this by opening/closing PCM each time
* Implement simulated LOMEM and HIMEM, add memory size check in patched lemonade
* Further improvement to terminal emulation, makes scrolling window work properly
* Improve VAL() backend and handling of invalid numbers in INPUT/READ statements
* Implement lightning flash in apple_io.py

23 months agoIn applesoft_basic:
Nick Downing [Tue, 17 May 2022 14:43:19 +0000 (00:43 +1000)]
In applesoft_basic:
* Add PEEK, POKE and CALL (via apple_io, to emulate any needed monitor routines)
* Allow multiple arrays to be dimensioned in the same DIM statement
* Add TEXT, GR, COLOR=, PLOT, HLIN, VLIN statements
* Implement PRINT TAB() and very basic cursor position tracking
* Implement REM statement
* Correctly handle DATA other than STR_LITERAL as unquoted possibly empty strings, allow READing multiple lvalues, fix bug of RESTORE requiring the line number
* Add applesoft-like (but not identical) tokenizer and detokenizer
* Make interpreter accept tokenized input, this solves a problem with IF A > B THEN 100 which treated BTHEN100 as a variable name (now tokenizing has priority)
* Bulk add statements and functions in token order (reorder those already there)
* Implement all functions except some I/O related ones
* Implement more statements and ignore some I/O related ones, LEMONADE can run

In pilex:
* Fix a typo in non-groups Python skeleton (introduced with last commit), remove some prints in that skeleton, fix missing default-rule group in flex generation
* Pass python flag into AST.post_process(), to generate correct default actions
* Get non-groups Python skeleton working, seems it wasn't tested at all before

23 months agoIn applesoft_basic:
Nick Downing [Mon, 16 May 2022 16:27:13 +0000 (02:27 +1000)]
In applesoft_basic:
* Add apple_io module and HOME, NORMAL, INVERSE, FLASH, HTAB, VTAB statements
* Implement console input, improve console output a bit (use write not print)
* Translate cr to crlf at output similarly to how Apple ROM console routines work
* Implement INPUT
* Implement data_types.py and STR, VAL() functions
* Make variables boxed for easy referencing and/or subscripting
* Change NodeExpression to NodeRValue, NodeExpression.evaluate() to .get()
* Change VARIABLE to VARIABLE_NAME, NodeTextVariable to NodeTextVariableName
* Remove Node and NodeText prefixes on all class names (keeping Statement and RValue prefixes as they add meaning, although prefixing only some is inconsistent)
* Add LValue node, so that locating the variable for get or set uses common code
* Add DIM statement, clean up parser to use lvalues properly, add LValueArray

In pitree:
* Fix a bug in element.to_text()

23 months agoAdd applesoft_basic repository
Nick Downing [Sun, 15 May 2022 16:08:42 +0000 (02:08 +1000)]
Add applesoft_basic repository

In pilex:
* Fix scanning bug of adding extra text to matched string

In pitree:
* Add float type and float constants

23 months agoAdd picalc repository
Nick Downing [Sat, 14 May 2022 11:29:15 +0000 (21:29 +1000)]
Add picalc repository

In piyacc:
* Remove /tests_ast as it now has its own repository picalc.git

23 months agoIn pilex:
Nick Downing [Sat, 14 May 2022 07:12:41 +0000 (17:12 +1000)]
In pilex:
* Option to build python lexer without groups (simpler skeleton, more like flex)

In pitree:
* Add a top level Makefile

2 years agoIn logjson:
Nick Downing [Wed, 16 Feb 2022 14:04:53 +0000 (01:04 +1100)]
In logjson:
* Implement LazyArray.splice(), implement unshift/shift/push/pop in terms of splice (also, this fixes a bug with pop where the LazyArray.length was not updated)

In ndcode_site:
* Upgrade to nick_site commit f981fa57, adds alerts and inactive sidebar option

2 years agoIn UglifyJS:
Nick Downing [Fri, 11 Feb 2022 06:40:26 +0000 (01:40 -0500)]
In UglifyJS:
* Add /package-lock.json to .gitgnore

In ndcode_site:
* Fix bug in zettair indexing script which prevented indexing the live site

2 years agoIn ndcode_site:
Nick Downing [Fri, 11 Feb 2022 06:28:17 +0000 (17:28 +1100)]
In ndcode_site:
* Add blog post about refactoring, with refactoring image and render source
* Simplify navbar with .extend-background class so we can use only one container
* Improved scrollbar-fix-(inner|outer) classes, inner class expands content to avoid break in navbar during modal dialog, outer class avoids horizontal scrollbar
* Consistency changes wrt nick_site, makes page footer slightly taller

In zettair:
* Fix problem of HTML entities not appearing in website search results

2 years agoIn ndcode_site:
Nick Downing [Thu, 27 Jan 2022 12:02:33 +0000 (23:02 +1100)]
In ndcode_site:
* Move navigation from _menu.json files in each navigation-parent directory to a navigation tree structure in the database, update navbar, menu pages, blog posts
* Fix missing awaits on transaction.commit()
* Make get_session() readonly and throw an exception if session cannot be found rather than trying to create it, make get_account() throw an exception if not signed in, make get_navigation() and the related navbar logic throw useful exceptions if the navigation tree doesn't exist or doesn't the match site pages, make get_nodemailer throw useful exceptions if the nodemailer data doesn't exist
* Finish changing XDate.now() to env.now, new XDate() to new XDate(env.now)

2 years agoIn jst_server:
Nick Downing [Thu, 27 Jan 2022 03:49:56 +0000 (14:49 +1100)]
In jst_server:
* Fix let-bug in Resources.unref() caught by ES6 (another was fixed previously)

In ndcode_site:
* Make /_config/*.jst use ES6 superclass calls, fix failure to await the superclass calls, use (await import('@ndcode/jst_server')).default rather than the _jst_server builtin variable provided by jst (because npm now uses a flat node_modules structure, so there is no risk of loading a second copy of jst_server module)
* Update /my_account/index.html.jst to latest way, minor consistency changes in /my_account/sign_up/index.html.jst, change _lib/navbar.jst to remove flicker when sign in/out requires the page to be reloaded, i.e. when editing account details

2 years agoIn disk_build:
Nick Downing [Wed, 26 Jan 2022 12:31:22 +0000 (23:31 +1100)]
In disk_build:
* Write deps file in indented rather than minified JSON

In jst_server:
* Change to ES6 modules
* Change to fsPromises
* Change to ES6 classes
* Remove unneeded dependencies
* Use Problem object internally instead of Server.die() and Site.die()
* For API endpoints, serve the JSON-encoded Problem object directly

In ndcode_site:
* Rework /my_account/sign_up/index.html.jst to use custom validation style, reduce to 2 steps (former steps 1 and 2 are now done together and resulting message is displayed in red underneath the step 1 buttons), and improve placeholder text
* Implement draft updating thread in /my_account/sign_up/index.html.jst (avoids possibility of concurrent draft updates), use oninput rather than onchange event
* Add random placeholder data generator (persists in session for 24 hours)
* Disable the "Create account" button and null draft when sign up form is blank
* In /my_account/sign_up/index.html.jst use HTML5 hidden attribute, not jquery
* In /my_account/sign_up/index.html.jst improve tick, cross, spinner, message
* Make tick, cross and spinner have no height, so they don't affect card header
* More comprehensive system for displaying icons vertically centred within text
* In /my_account/sign_up/index.html.jst add icons to every button
* Fix unnecessary extra syntax in /_config/Problem.mjs
* In /my_account/sign_up/index.html.jst use variables id_XXX instead of document.getElementById(), and add a script /ids.sh to easily create definitions for them
* In /my_account/sign_up/index.html.jst change placeholder for captcha text to xxxxxx (because the randomized value was too confusing), fix some minor bugs
* In /my_account/sign_up/index.html.jst improve layout around verification code
* Consistency changes for the Problem object
* Use jst_server.Problem everywhere, make /_lib/post_request.jst use jst_server's new error handling to serve the JSON-encoded Problem instead of doing it itself
* Change all the get_draft.json endpoints to be like sign_up one (simpler because the JSON from the database is returned directly, including the expires field)
* Update /my_account/verify_email/index.html.jst to latest way, no accordion
* Update /my_account/password_reset/index.html.jst to latest way, no accordion
* Update /my_account/verify_password/index.html.jst to latest way, no accordion
* Update /my_account/send_verification_email/index.html.jst to latest way, no accordion and now an inline form (need to improve label spacing when collapsed)
* Update /contact/index.html.jst to latest way, no accordion, placeholder company
* In /_lib/navbar.jst prefix all ids with navbar- for uniqueness
* In /_lib/navbar.jst use variables id_XXX instead of document.getElementById()
* In /lib/navbar.jst use HTML5 hidden attribute and remove some other jQuery
* In /lib/navbar.jst rework feedback to be similar to /contact/index.html.jst way
* In /lib/navbar.jst rework sign in to be similar to feedback
* Remove modal fade because of an annoying glitch during fade in/out (it seems to move slightly in the horizontal, which may be because of scrollbar visibility)

In sass_css_cache:
* Send style option to SASS to produce minified CSS output

2 years agoIn logjson:
Nick Downing [Mon, 24 Jan 2022 01:08:55 +0000 (12:08 +1100)]
In logjson:
* Fix bug with not marking array or object dirty after deleting a property

In ndcode_site:
* Improve session handling, so incoming/outgoing cookie is only checked/set once
* Change /_lib/session_cookie.jst to /_lib/get_session.jst
* Add /_lib/get_account.jst, remove env.signed_in_as
* Add /_lib/get_globals.jst
* Add /_lib/get_nodemailer.jst
* Major refactoring of get_session(), get_account(), get_nodemailer(), introduces "let root = ..." for every transaction, removes get_globals() as this is now trivial when you have the root, removes commit for non-write transactions as this is no longer needed now that session management is done in the CustomSite object
* Structure upgrade: delete session.signed_in_as key instead of setting to null
* Structure upgrade: change nodemailer to nodemailers, and rename API endpoints
* Remove repetitive code in interactive pages, use api_call() directly everywhere

2 years agoIn ndcode_site, minor visual fixes
Nick Downing [Sun, 23 Jan 2022 06:32:39 +0000 (01:32 -0500)]
In ndcode_site, minor visual fixes

2 years agoIn logjson:
Nick Downing [Sun, 23 Jan 2022 03:05:36 +0000 (14:05 +1100)]
In logjson:
* Use (Transaction|LazyValue).get_json() instead of logjson.logjson_to_json() and (Transaction|LazyValue).set_json() instead of Transaction.json_to_logjson()
* Fix several bugs with opening database when the root straddles a block boundary

In ndcode_site:
* Change arguments to args everywhere, as arguments is a reserved word in strict
* Implement a command-line interface to the running webserver, and a way to get/set the globals object (so it will be in the database, not /_config/globals.json)
* Use (Transaction|LazyValue).get_json() instead of logjson.logjson_to_json() and (Transaction|LazyValue).set_json() instead of Transaction.json_to_logjson()
* Use globals object in database rather than /_config/globals.json everywhere
* Implement a way to get/set the nodemailer object (has an entries for contact, feedback and noreply), use nodemailer object in database rather than the separate files /_config/nodemailer_*.json and the (now commented) NodeMailerCache object

2 years agoIn ndcode_site, fix oops
Nick Downing [Fri, 21 Jan 2022 23:35:50 +0000 (18:35 -0500)]
In ndcode_site, fix oops

2 years agoIn ndcode_site, change main page, to make it slightly less opinionated, and refer...
Nick Downing [Fri, 21 Jan 2022 00:15:57 +0000 (11:15 +1100)]
In ndcode_site, change main page, to make it slightly less opinionated, and refer to we not I

2 years agoIn ndcode_site, improve the intro page
Nick Downing [Tue, 18 Jan 2022 04:50:50 +0000 (23:50 -0500)]
In ndcode_site, improve the intro page

2 years agoIn ndcode_site:
Nick Downing [Tue, 18 Jan 2022 04:12:15 +0000 (15:12 +1100)]
In ndcode_site:
* Refactor site structure to put general information (such as brief introduction to myself and my philosophies) on the home page, and projects one level down
* Add blog and initial post (from last week)

2 years agoIn ndcode_site, get contact form working again with new style form and API
Nick Downing [Tue, 18 Jan 2022 02:37:09 +0000 (13:37 +1100)]
In ndcode_site, get contact form working again with new style form and API

2 years agoIn ndcode_site, can create account, verify email, sign in/out, reset password (while...
Nick Downing [Sun, 16 Jan 2022 00:10:32 +0000 (11:10 +1100)]
In ndcode_site, can create account, verify email, sign in/out, reset password (while signed out), and change account details and password (while signed in)

2 years agoIn jst:
Nick Downing [Fri, 14 Jan 2022 13:30:08 +0000 (00:30 +1100)]
In jst:
* Allow to output either raw or transformed AST
* Fix several transformation bugs with "...arguments" syntax caused by lack of return statements in transform.js

In min_svg_cache:
* Fix prefix-setting bug causing SVGs not to display
* Make the prefix shorter

In ndcode_site:
* Add ticks, crosses and spinners in sign up form
* Move *.jst from / to /_lib to keep things tidy
* Implement /_lib/Problem.jst and /_lib/post_request.jst to contain repetitive code for API call implementation
* For the client side move /api/sign_up.js.min to more general /js/api_call.js.min
* Add sign up draft facility (avoids having to re-enter data if you refresh page)
* Fix scrollbar shifting problem again (fix was lost in upgrade to Bootstrap 4, because it moved the "Give feedback" button to left, but now I fixed that too)

2 years agoIn logjson:
Nick Downing [Thu, 13 Jan 2022 08:12:02 +0000 (19:12 +1100)]
In logjson:
* Fix bug in Database.Transaction() of not awaiting this.mutex.acquire()
* Fix bug with modifying the cache values causing Transaction.rollback() to fail

In min_svg_cache:
* Add error handler so we can see what's wrong with a broken SVG file

In ndcode_site:
* Make sign up form styling more similar to how Bootstrap 3 used to be
* Fix minor booboo in account creation form submission
* Add accordion style dialog for account creation
* Fix transaction handling bugs

2 years agoIn jst, remove parentheses around interpolated value since almost always JSON, in...
Nick Downing [Wed, 12 Jan 2022 14:22:57 +0000 (01:22 +1100)]
In jst, remove parentheses around interpolated value since almost always JSON, in UglifyJS, add way for caller using interpolate option to find out whether we interpolated (needed since can no longer check for parenthesized ${}), fix bugs

2 years agoIn jst, change String.replace() to replaceAll() everywhere (this was a nasty bug...
Nick Downing [Wed, 12 Jan 2022 13:49:35 +0000 (00:49 +1100)]
In jst, change String.replace() to replaceAll() everywhere (this was a nasty bug), implement string interpolation from server-side to client-side code in a script { }, add modified UglifyJS module to implement interpolation and escaping

2 years agoIn ndcode_site upgrade to Bootstrap version to 4.6.1 and roughly fix things, in jst_s...
Nick Downing [Wed, 12 Jan 2022 01:22:32 +0000 (12:22 +1100)]
In ndcode_site upgrade to Bootstrap version to 4.6.1 and roughly fix things, in jst_server implement Sass CSS preprocessor, in min_svg_cache upgrade SVGO version to 2.8.0, add sass_css_cache submodule

2 years agoIn ndcode_site new approach to sign up form, in jst_server let caller of Site.serve...
Nick Downing [Mon, 10 Jan 2022 05:15:12 +0000 (16:15 +1100)]
In ndcode_site new approach to sign up form, in jst_server let caller of Site.serve() override caching setting for the request

2 years agoIn jst_cache, use ...arguments syntax instaed of .apply() and .concat()
Nick Downing [Sun, 9 Jan 2022 12:24:29 +0000 (23:24 +1100)]
In jst_cache, use ...arguments syntax instaed of .apply() and .concat()

2 years agoIn jst and ndcode_site, implement ES6 classes syntax
Nick Downing [Sun, 9 Jan 2022 02:11:01 +0000 (13:11 +1100)]
In jst and ndcode_site, implement ES6 classes syntax

2 years agoIn logjson and ndcode_site, implement log file rotation
Nick Downing [Sat, 8 Jan 2022 03:30:53 +0000 (14:30 +1100)]
In logjson and ndcode_site, implement log file rotation

2 years agoIn logjson, fix bugs to respect cache pinning and improve synchronization
Nick Downing [Sat, 8 Jan 2022 01:48:00 +0000 (12:48 +1100)]
In logjson, fix bugs to respect cache pinning and improve synchronization

2 years agoIn ndcode_site, store contact and feedback logs in /database.logjson rather than...
Nick Downing [Fri, 7 Jan 2022 23:15:57 +0000 (10:15 +1100)]
In ndcode_site, store contact and feedback logs in /database.logjson rather than /_logs/*.json

2 years agoIn logjson and ndcode_site, make default_value be in JSON not logjson format (faster...
Nick Downing [Fri, 7 Jan 2022 22:56:27 +0000 (09:56 +1100)]
In logjson and ndcode_site, make default_value be in JSON not logjson format (faster and more convenient), update ndcode_site to new style navbar bar and _menu.json menu structure

2 years agoAdd logjson module, make ndcode_site use it, change kick() frequency to 1 sec
Nick Downing [Fri, 7 Jan 2022 06:42:50 +0000 (17:42 +1100)]
Add logjson module, make ndcode_site use it, change kick() frequency to 1 sec

2 years agoIn zettair, back to automake 1.15?
Nick Downing [Mon, 3 Jan 2022 05:18:13 +0000 (00:18 -0500)]
In zettair, back to automake 1.15?

2 years agoChange from pnpm to npm, add link.sh shortcuts for npm style package linking
Nick Downing [Mon, 3 Jan 2022 04:29:30 +0000 (15:29 +1100)]
Change from pnpm to npm, add link.sh shortcuts for npm style package linking

2 years agoUpgrade node and pnpm versions, change node_zettair to use node-addon-api
Nick Downing [Mon, 3 Jan 2022 02:31:15 +0000 (13:31 +1100)]
Upgrade node and pnpm versions, change node_zettair to use node-addon-api

2 years agoIn json_cache_rw, make JSON.stringify pretty print
Nick Downing [Fri, 31 Dec 2021 20:21:59 +0000 (07:21 +1100)]
In json_cache_rw, make JSON.stringify pretty print

2 years agoIn stripe_example_site, fix javascript missing let
Nick Downing [Wed, 29 Dec 2021 23:45:47 +0000 (10:45 +1100)]
In stripe_example_site, fix javascript missing let

2 years agoAdd payment processing examples (paypal, square, stripe)
Nick Downing [Mon, 27 Dec 2021 06:34:05 +0000 (17:34 +1100)]
Add payment processing examples (paypal, square, stripe)

2 years agoIn zettair, minor update from automake 1.15 to 1.15.1
Nick Downing [Mon, 27 Dec 2021 06:47:00 +0000 (17:47 +1100)]
In zettair, minor update from automake 1.15 to 1.15.1

2 years agoIn c_to_python, minor update to walk AST via node.children[i] instead of node[i]
Nick Downing [Mon, 27 Dec 2021 06:43:23 +0000 (17:43 +1100)]
In c_to_python, minor update to walk AST via node.children[i] instead of node[i]

2 years agoIn pitree, minor change to imports
Nick Downing [Mon, 27 Dec 2021 06:40:42 +0000 (17:40 +1100)]
In pitree, minor change to imports

2 years agoIn piyacc, replace EQUAL, PIPE and SEMICOLON tokens with their ASCII values
Nick Downing [Mon, 27 Dec 2021 06:36:54 +0000 (17:36 +1100)]
In piyacc, replace EQUAL, PIPE and SEMICOLON tokens with their ASCII values

2 years agoStart to make menu structure hierarchical via _menu.json files
Nick Downing [Mon, 1 Nov 2021 00:38:33 +0000 (11:38 +1100)]
Start to make menu structure hierarchical via _menu.json files

2 years agoIn jst_server, fix bug in nonexistent site message
Nick Downing [Sat, 4 Sep 2021 13:57:49 +0000 (09:57 -0400)]
In jst_server, fix bug in nonexistent site message

2 years agoIn jst_server, implement partial file transfers with response code 206
Nick Downing [Sat, 4 Sep 2021 13:41:37 +0000 (23:41 +1000)]
In jst_server, implement partial file transfers with response code 206

2 years agoIn jst_server, fix bugs and implement streaming
Nick Downing [Sat, 4 Sep 2021 13:01:50 +0000 (23:01 +1000)]
In jst_server, fix bugs and implement streaming

2 years agoIn jst_server, fix a bug in URL redirection
Nick Downing [Sat, 4 Sep 2021 03:12:11 +0000 (23:12 -0400)]
In jst_server, fix a bug in URL redirection

2 years agoIn jst_server, deal with ACME challenges for certbot (letsencrypt)
Nick Downing [Sat, 4 Sep 2021 02:32:37 +0000 (22:32 -0400)]
In jst_server, deal with ACME challenges for certbot (letsencrypt)

2 years agoPatch install.sh to downgrade pnpm and fix other install issues
Nick Downing [Wed, 1 Sep 2021 06:35:48 +0000 (16:35 +1000)]
Patch install.sh to downgrade pnpm and fix other install issues

4 years agoMinor changes to footer in ndcode_site and Makefile in pitree
Nick Downing [Sun, 15 Mar 2020 02:50:31 +0000 (13:50 +1100)]
Minor changes to footer in ndcode_site and Makefile in pitree

4 years agoWork in progress with sphinx documentation
Nick Downing [Mon, 17 Feb 2020 08:43:37 +0000 (19:43 +1100)]
Work in progress with sphinx documentation

4 years agoFirst cut at jsdoc pipeline to publish in subdirectory of website (quite rough)
Nick Downing [Wed, 12 Feb 2020 07:30:44 +0000 (18:30 +1100)]
First cut at jsdoc pipeline to publish in subdirectory of website (quite rough)

4 years agoMinor changes to install procedure to run on ubuntu 16.04 and install node
Nick Downing [Sun, 15 Mar 2020 01:58:58 +0000 (21:58 -0400)]
Minor changes to install procedure to run on ubuntu 16.04 and install node

4 years agoWorking monorepo for NDCODE project with installer
Nick Downing [Mon, 3 Feb 2020 16:03:05 +0000 (03:03 +1100)]
Working monorepo for NDCODE project with installer