Nonsense Query List

From Esolang
Jump to: navigation, search

Nonsense Query Lists are almost the same as Structured Query Lists but very difficult to understand and having a much shorter size (in bytes). The Nonsense Query List language was originally created in 2012, based on the SQLite Structured Query List language, in an attempt to shorten original Structured Query List code as much as possible.

Currently, there are four types of instructions in the Nonsense Query List language: "table_name(MT,MT:row,*,MT:row=default,...);" (similar to CREATE TABLE in SQLite), "table_name+(val,...);" (similar to INSERT INTO in SQLite), "table_name-(val,*,...);" (removing specific columns which match the pattern), and "-table_name" (similar to DELETE FROM in SQLite). In these examples, T represents a Nonsense Query List data type and M represents a type modifier. The standard Nonsense Query List code parser supports whitespace, but whitespace used anywhere else than in variable names or 'data' will be automatically stripped.

Data types in Nonsense Query Lists
Nonsense Query List data type Equivalent SQLite data type
9 INTEGER
"/' TEXT/text
­ BLOB
/* only */ NULL
Nonsense Query List type modifiers
Nonsense Query List type modifier Equivalent SQLite type modifier
/* only */ NULL /* (this was something weird inherited from SQLite) */
NOT NULL
KEY
PRIMARY KEY
+ AUTOINCREMENT
- AUTODECREMENT

Examples

X-cell

x_table(9,":text);x_table+(12,"Brainfuck");x_table+(12,"Befunge");x_table+(12,"Unlambda");x_table+(13,"Whitespace");x_table+(13,"LOLCODE");x_table+(14,"Unnessecary");x_table-(13,*);

Tables inside tables

/* This is to demonstrate that the Nonsense Query List language supports recursive tables as well */
inside((9,­),(", ));inside+((9712,'BF-E3-AE-9C-DE-12-34'),('Hello World!', ));

Default MediaWiki tables

/* This was created as a start of porting MediaWiki to support Nonsense Query List databases, which should then be the database type that Esolang's MediaWiki software uses */
/* Note: instructions that are not compatible with the [[Nonsense Query List]] language are not included */
user(9�一+:user_id,"�:user_name='',"�:user_real_name='',­�:user_password,­�:user_newpassword,­:user_newpass_time,"�:user_email,­�:user_options,­�:user_touched='',­�:user_token='',­:user_authenticated,­:user_email_token,­:user_email_token_expires,­:user_registration,9:user_editcount);user_groups(9�:ug_user=0,­�:ug_group='');user_former_groups(9�:ufg_user=0,­�:ufg_group='');user_newtalk(9�:user_id=0,­�:user_ip='',­ = );user_properties(9�:up_user,­�:up_property,­:up_value);page(9�一+:page_id,9�:page_namespace,"�:page_title,­�:page_restrictions,9�:page_counter=0,9�:page_is_redirect=0,9�:page_is_new=0,.�:page_random,­�:page_touched='',9�:page_latest,9�:page_len);revision(9�一+:rev_id,9�:rev_page,9�:rev_text_id,­�:rev_comment,9�:rev_user=0,"�:rev_user_text='',­�:rev_timestamp='',9�:rev_minor_edit=0,9�:rev_deleted=0,9:rev_len,9:rev_parent_id= );text(9�一+:old_id,­�:old_text,­�:old_flags);archive(9�:ar_namespace=0,"�:ar_title='',­�:ar_text,­�:ar_comment,9�:ar_user=0,"�:ar_user_text,­�:ar_timestamp='',9�:ar_minor_edit=0,­�:ar_flags,9:ar_rev_id,9:ar_text_id,9�:ar_deleted=0,9:ar_len,9:ar_page_id,9:ar_parent_id= );pagelinks(9�:pl_from=0,9�:pl_namespace=0,"�:pl_title='');templatelinks(9�:tl_from=0,9�:tl_namespace=0,"�:tl_title='');imagelinks(9�:il_from=0,"�:il_to='');categorylinks(9�:cl_from=0,"�:cl_to='',­�:cl_sortkey='',"�:cl_sortkey_prefix='',"�:cl_timestamp,­�:cl_collation='',"�:cl_type='page');category(9�一+:cat_id,"�:cat_title,9�:cat_pages=0,9�:cat_subcats=0,9�:cat_files=0,9�:cat_hidden=0);externallinks(9�:el_from=0,­�:el_to,­�:el_index);external_user(9�一:eu_local_id,"�:eu_external_id);langlinks(9�:ll_from=0,­�:ll_lang='',"�:ll_title='');iwlinks(9�:iwl_from=0,­�:iwl_prefix='',"�:iwl_title='');site_stats(9�:ss_row_id,9:ss_total_views=0,9:ss_total_edits=0,9:ss_good_articles=0,9:ss_total_pages=-1,9:ss_users=-1,9:ss_active_users=-1,9:ss_admins=-1,9:ss_images=0);hitcounter(9�:hc_id);ipblocks(9�一+:ipb_id,­�:ipb_address,9�:ipb_user=0,9�:ip_by=0,"�:ipb_by_text='',­�:ipb_reason,­�:ipb_timestamp='',9�:ipb_auto=0,9�:ipb_anon_only=0,9�:ipb_create_account=1,9�:ipb_enable_autoblock=1,­�:ipb_expiry='',­�:ipb_range_start,­�:ipb_range_end,9�:ipb_deleted=0,9�:ipb_block_email=0,9�:ipb_allow_usertalk=0);image("�一:img_name='',9�:img_size=0,9�:img_width=0,9�:img_height=0,­�:img_metadata,9�:img_bits=0,":img_media_type= ,"�:img_magor_mime="unkown",:img_minor_mime="unknown",­�:img_description,9�:img_user=0,"�:img_user_text,­�:img_timestamp='',­�:img_sha1='');oldimage("�:oi_name='',"�:oi_archive_name='',9�:oi_size=0,9�:oi_width=0,9�:oi_height=0,9�:oi_bits=0,­�:oi_description,9�:oi_user=0,"�:oi_user_text,­�:oi_timestamp,­�:oi_metadata,"�:oi_media_type= ,"�:oi_major_mime="unknown",­�:oi_minor_mime="unknown",9�:oi_deleted=0,­�:oi_sha1='');filearchive(9�一+:fa_id,"�:fa_name='',":fa_archive_name='',­:fa_storage_group,­:fa_storage_key='',9:fa_deleted_user,­:fa_deleted_timestamp='',':fa_deleted_reason,9:fa_size=0,9:fa_width=0,9:fa_height=0,­:fa_metadata,9:fa_bits=0,":fa_media_type= ,":fa_major_mime="unknown",":fa_minor_mime="unknown",­:fa_description,9:fa_user=0,":fa_user_text,­:fa_timestamp='',9�:fa_deleted=0);uploadstash(9�一+:s_id,9�:us_user,"�:us_key,"�:us_orig_path,"�:us_path,":us_source_type,­�:us_timestamp,"�:us_status,9�:us_size,"�:us_sha1,":us_mime,":us_media_type= ,9:us_image_width,9:us_image_height,9:use_image_bits);recentchanges(9�一+:rc_id,­�:rc_timestamp='',­�:rc_cur_time,9�:rc_user=0,"�:rc_user_text,9�:rc_namespace=0,"�:rc_title='',"�:rc_comment='',9�:rc_minor=0,9�:rc_bot=0,9�:rc_new=0,9�:rc_cur_id=0,9�:rc_this_oldid=0,9�:rc_last_oldid=0,9�:rc_type=0,9�:rc_moved_to_ns=0,"�:rc_moved_to_title='',­�:rc_ip='',9:rc_old_len,9:rc_new_len,9�:rc_deleted=0,9�:rc_logid=0,­ :rc_log_type= ,­ :rc_log_action= ,­ :rc_params);watchlist(9�:wl_user,9�:wl_namespace=0,"�:wl_title='',­:wl_notificationtimestamp);interwiki("�:iw_prefix,­�:iw_url,­�:iw_api,"�:iw_wikiid,9�:iw_local,9�:iw_trans=0);querycache(­�:qc_type,9�:qc_value=0,9�:qc_namespace=0,"�:qc_title='');objectcache(­�一:keyname='',­:value,":exptime);transcache(­�:tc_url,':tc_contents,­�:tc_time);logging(9�一+:log_id,­�:log_type='',­�:log_action='',­�log_timestamp='19700101000000',9�:log_user=0,"�:log_user_text='',9�:log_namespace=0,"�:log_title='',9�:log_page,"�:log_comment='',­�:log_params,9�:log_deleted=0);log_search(­�:ls_field,"�:ls_value,9�:ls_log_id=0);job(9�一+:job_id,­�:job_cmd='',9�:job_namespace,"�:job_title,­�:job_params);querycache_info(­�:qci_type='',­�:qci_timestamp='19700101000000');redirect(9�一:rd_from=0,9�:rd_namespace=0,"�:rd_title='',":rd_interwiki= ,":rd_fragment= );querycachetwo(­�:qcc_type,9�:qcc_value=0,9�:qcc_namespace=0,"�:qcc_title='',9�:qcc_namespacetwo=0,"�:qcc_titletwo='');page_restrictions(9�:pr_page,­�:pr_type,­�:pr_level,9�:pr_cascade,9 :pr_user,­ :pr_expiry,9�一+:pr_id);protected_titles(9�:pt_namespace,"�:pt_title,9�:pt_user,­:pt_reason,­�:pt_timestamp,­�:pt_expiry='',­�:pt_create_perm);page_props(9�:pp_page,­�:pp_propname,­�:pp_value);updatelog("�一:ul_key,­:ul_value);change_log(9 :ct_rc_id,9 :ct_log_id,9 :ct_rev_id,"�:ct_tag,­ :ct_params);tag_summary(9 :ts_rc_id,9 :ts_log_id,9 :ts_rev_id,­�:ts_tags);valid_tag("�一:vt_tag);l10n_cache(­�:lc_lang,"�:lc_key,­�:lc_value);msg_resource(­�:mr_resource,­�:mr_lang,­�:mr_blob,­�:mr_timestamp);msg_resource_links(­�:mrl_resource,­�:mrl_message);module_deps(­�:md_module,­�:md_skin,­�:md_deps);

Creator's Predictions

  • If esoteric programming languages inntroduce ODBC, their first ODBC driver will probably be a Nonsense Query List ODBC driver.
  • Someday there will be a Nonsense Query List bytecode format which can be much smaller than even original Nonsense Query List code. The truth is that the size of MediaWiki's default tables in MySQL bytecode is a bit less than 240KB, the size of it's default tables in SQLite bytecode is a bit less than 120KB, it's size in the smallest-possible Nonsense Query List format is only a bit more than 15KB, and maybe a Nonsense Query List bytecode format can shorten it to around 12KB.