3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-07 20:49:31 +01:00
Commit Graph

671 Commits

Author SHA1 Message Date
rlcamp
dd250ccf83
Update modules/qrpn (#65)
- Fixed itenlog erroneously disallowing negative arguments
- Removed badly behaving exact literal check
- Fixed 2 not being a prime number
- Fixed whitespace issues
- Reordered checks in evaluate_literal for speed and factored out the annoying QRPN_NOT_A_UNIT non-error error code
- Added a least significant digit to the definition of a year
2021-11-18 17:33:40 -08:00
Pragmatic Software
da7d31229b modules/qrpn: replace stderr with stdout; remove extraneous whitespace throughout
PBot modules do not send the stderr stream to the channel. Instead, the output
is logged in <module-filename>-stderr, for private debugging purposes. PBot
expects output intended for channels to be on stdout.
2021-11-14 09:18:47 -08:00
rlcamp
9172bcd29f
Update modules/qrpn (#64) 2021-11-14 09:07:00 -08:00
Pragmatic Software
a2111640af Update modules/qrpn 2021-11-08 06:12:48 -08:00
0xACE
1dae484e3f
compiler_vm: C removed unnecessary regex replace (#63)
This problem has previously been encountered. And my last solution was
not satisfactory.

It seems like there were 2 regex lines, one targeting `//` and another
targeting `/* */`.

Originally they were basically meant to perform this:

Search for

```c
;<COMMENT>;\n
```

and replacing it with

```c
;<COMMENT>
```

In e00ba2e62f I provided a patch to add
another `;` for `//` as it would eat the first `;` after the `<COMMENT>`

After thinking for some time, I came to the conclusion that the lines of
REGEX serve no purpose and should be removed.

For future reference:

e00ba2e62f was targeting this problem:

```c
printf("why is the last ; missing?"); // foo \n int a=42;
```

which generated something along the lines of

```c
    printf("why is the last ; missing?");
// foo
    int a = 42return 0;
```

Where it would strip a `;` from the first line after a `//` comment

And this commit additionally targeted:

```c
printf("foo\n");
//printf("bar\n");
printf("baz\n");
// only happens if the line ends with ; eg:
printf("hello\n");
// deny with ;
printf("world\n");
```
output:

    foo
    hello

expected:

    foo
    baz
    hello
    world

where it generated the code:

```c
    printf("foo\n");
//printf("bar\n" );printf("baz\n" );
// only happens if the line ends with ; eg:
    printf("hello\n");
// deny with ;printf("world\n" );
```

Thus this should fix #62 and the original problem
2021-11-03 14:31:07 -07:00
Pragmatic Software
9a01b1c433 modules/compiler_vm: ASAN now works 2021-10-19 21:03:34 -07:00
Pragmatic Software
abd6abcc6c modules/wiktionary.pl: always show all entries 2021-10-19 21:01:45 -07:00
Pragmatic Software
8dd1a4bc3d Add qrpn module 2021-10-19 21:00:43 -07:00
Pragmatic Software
b63c1f022b modules/c2english.pl: limit cpu time on semantic checker 2021-10-19 20:59:40 -07:00
Pragmatic Software
73e5048fad modules/c2english: fix #pragma 2021-10-15 18:54:53 -07:00
0xACE
7692b57f58
compiler_vm: fix leading whitespace in $func_regex (#61)
Fixes the issue where a function has a trailing whitespace before a line
break.

example:
```
void foo(){}
int main(){return 0;}
```
2021-10-06 11:06:55 -07:00
Pragmatic Software
347e4ac69f modules/compiler_vm: replace ix.io with 0x0.st for pastes 2021-09-17 13:38:04 -07:00
Pragmatic Software
eae16b14b8 modules/compiler_vm: fix -noheaders; manually #including a header once again replaces default includes 2021-09-17 13:30:46 -07:00
0xACE
e00ba2e62f
compiler_vm: fix interwined comments losing first ; after // (#60) 2021-09-15 21:31:11 -07:00
Pragmatic Software
eba5766865 modules/paren: specify python2 in shebang 2021-09-09 11:55:31 -07:00
Pragmatic Software
68ed2e7580 c2english: minor clean-ups 2021-08-16 12:26:11 -07:00
Pragmatic Software
8115169729 c2english: minor clean-ups 2021-08-15 11:18:28 -07:00
Pragmatic Software
b4ad221a61 modules/expand_macros.pl: add some default #includes and use -ftrack-macro-expansion=0 to omit macro tracking noise added in recentish GCC upgrade 2021-08-08 14:13:02 -07:00
Pragmatic Software
f6665969ac modules/qalc.pl: refactor and clean-up ugly code 2021-08-02 17:52:38 -07:00
Pragmatic Software
c69c512226 Improve Wiktionary output
TODO: Replace pip wiktionaryparser with alternate fork that has bugfixes
for sub-definitions and other issues.
2021-07-23 07:25:36 -07:00
Pragmatic Software
dfae9bebc0 Relicense under MIT 2021-07-10 15:00:22 -07:00
Pragmatic Software
51bafbe841 Slightly simplify modules/wiktionary.py 2021-07-10 11:07:28 -07:00
Pragmatic Software
2b75863ebb modules/wiktionary.pl: show first unique entry instead of last 2021-07-10 08:38:08 -07:00
Pragmatic Software
a168ee0474 modules/wiktionary.pl: tweak usage message and output 2021-07-10 03:03:56 -07:00
Pragmatic Software
92a2be7406 Add Wiktionary module 2021-07-10 02:33:39 -07:00
Pragmatic Software
06d0951e2a modules/get_title.pl: Fix Twitter URL titles 2021-06-11 14:57:29 -07:00
Pragmatic Software
84d9399ceb bashfaq/bashpf: Quotemeta $query 2021-05-23 21:19:19 -07:00
Pragmatic Software
2cb7b6418e Add bash pitfalls module 2021-05-23 17:56:40 -07:00
Pragmatic Software
c820bd5359 modules/bashfaq.pl: factor out unnecessary $output 2021-05-23 17:09:13 -07:00
Pragmatic Software
7134010f98 Minor clean-up of bash faq 2021-05-23 16:19:21 -07:00
Pragmatic Software
6d1df21564 Add bash faq 2021-05-23 16:11:56 -07:00
Pragmatic Software
e1d86c6439 Update various modules 2021-02-07 14:37:12 -08:00
Pragmatic Software
ea43a3a7e4 modules/date.sh: use TZDIR 2021-02-07 14:05:21 -08:00
Pragmatic Software
f426594d80 modules/trans.pl: use -no-ansi instead of regex 2021-01-19 02:23:10 -08:00
Pragmatic Software
ba769dc446 Add modules/trans.pl 2021-01-19 02:01:34 -08:00
Pragmatic Software
e8838c84e8 compiler_vm: remove unused variables in _default.pm 2020-10-23 00:46:23 -07:00
Pragmatic Software
083223b595 compiler_vm: add PHP 2020-10-23 00:44:43 -07:00
Pragmatic Software
ab6ffc0a5e get_title: ignore a title 2020-07-06 12:08:03 -07:00
Pragmatic Software
6311fa7b15 URL titles now work for YouTube links again (smh @ Google) 2020-07-02 16:35:44 -07:00
Pragmatic Software
1d62cba108 Remove ideone.pl and dependency on SOAP::Lite 2020-06-06 10:04:34 -07:00
Pragmatic Software
5c4e10a35c Tidy things up 2020-02-15 14:38:32 -08:00
Pragmatic Software
e0d50c2f72 modules: remove some outdated modules 2020-02-01 14:33:42 -08:00
Pragmatic Software
a3caf1755c modules: remove "blackshell"/"msmud" references 2020-02-01 14:30:32 -08:00
Pragmatic Software
30faac622f update .gitignores 2020-01-31 15:39:40 -08:00
Pragmatic Software
5150fc6752 modules/date.sh: print errors to stdout 2020-01-25 15:32:25 -08:00
Pragmatic Software
4e27b036cd Fix issues with Users and add date command 2020-01-25 14:13:57 -08:00
Pragmatic Software
0da1e02da1 modules/math.pl: understand "ultimate question" a bit better 2020-01-18 11:41:49 -08:00
Pragmatic Software
30fb36ba0a Add modules/jisho.sh 2020-01-14 17:01:27 -08:00
Pragmatic Software
8b82babde3 Convert google module to GoogleSearch plugin 2019-12-28 22:57:38 -08:00
Pragmatic Software
9f065a510d wikipedia.pl: fix unescaped { in regex 2019-12-15 13:41:50 -08:00