joelesko / tht Goto Github PK
View Code? Open in Web Editor NEWTHT Programming Language
Home Page: https://tht.dev
License: MIT License
THT Programming Language
Home Page: https://tht.dev
License: MIT License
What is the lowest version of php the compiler aims to support?
Long timeout occurs when:
>> Test Output
$num += blah()
fn blah {
return
}
It's possible this was a local issue, but recording it here to double-check.
Literal "\n" (backslash + 'n') should be retained in multiline strings.
$foo = ‘’’
something something \n
‘’’
$foo.trim() //= 'something something \n'
Page address is not valid.
Path must be lowercase, numbers, or characters: -./
Upgrade compatibility to PHP 8.3
PHP 7.3+
Line 172 in ...lib\core\Source.php
...
if (strpos($rawSource, "\r" !== false)) {
changed,
if (strpos($rawSource, "\r") !== false) {
Hello
I started playing around with Owl today - and after reading the docs thought it was a great idea / concept
so I got in installed and set up - all seemed ok - but when I did
owl server
and went to the local url - I got a 'Not Found' in the browser
taking a look at it I noticed that on line 116 (of lib/core/Owl.php) there was a return false
- if I remove this then it all works fine
the full bit of code is
if (Owl::isMode('testServer')) {
// return static assets
if (file_exists($_SERVER["SCRIPT_FILENAME"])) {
return false;
}
}
what was the intention here?
Searching for "rand" or "random" should bring up Math.random()
Very interesting and funny project :)
Please clarify it better - does THT support OOP and when it will be available on the Windows systems?
I checked Roadmap out and there are no any detailed info about timing for these features.
Moved to Discussion as this is not an issue. This can be deleted by admin, but not by me.
Hello
So - I noticed there was a todo in the isCrossOrigin() function in vendors/owl/owl/lib/modules/Web.php
The todo was to check the referrer, and I've presumed that it's to check it against the host.
for my purpose I've just done
if (strpos($referrer, $host)) {
$this->isCrossOrigin = false;
} else {
$this->isCrossOrigin = true;
}
not sure if you're allowing pull requests? but I've forked your repo as it was a blocker for me for what I needed to do.
In the latest release, OWL was renamed to THT.
I liked "OWL" quite a bit. It was short, friendly, and (most importantly) had a cool ASCII logo {o,o}
.
Unfortunately, I got feedback that it was easily confused with the Web Ontology Language, which uses OWL as their acronym. I honestly didn't think it'd be much of an issue at first, but eventually decided to be a good neighbor and come up with something else.
I've named a lot of projects over the years, but this was probably the most time consuming. I considered about 15-20 different names and endless variants: what they mean, how easy they are to say and spell, how they'd look on a website, etc.
I didn't want to pick something just because I thought it was cool. It was important that it could reinforce the identity of the language. There are so many projects out there. I wanted to give people an immediate sense of what it's about.
The most important reason: Without knowing anything else about the language, "THT" looks like an obvious reference to PHP, while still looking like something different.
PHP is a rather polarizing language. My biggest worry was the negative connotation PHP has to a lot of people, but I eventually came around to embracing it. Whether a person loves or hates PHP, I hope it at least stokes their curiosity about it.
Second, the letters "THT" are visually interesting: perfectly symmetrical and all straight lines. To me, it suggests order and simplicity, which matches the approach of the language itself. It's a bit rigid and minimal, but hopefully in an appealing way.
This led to the Mondrian-style abstract art look of the logo. It's is a colorful aesthetic that I think most people like, whether they are "into" art or not. To me, it suggests the idea that constraints lead to creativity, and lives in a grid, as most web designs do.
A few other things I like about it:
That said, there are a couple of downsides:
Anyway, I hope it works out for everyone.
Error messages for alt quote characters are broken or blank.
// smart quotes
$foo = ‘sdfsdf‘
// backticks
$foo = `sdfsdf`
These should trigger an "unknown character" parser error.
The variable $def
is not initialized in getPhpGlobal()
.
Line 625 in Tht.php should probably read
return '';
?
If so, can submit a patch.
Right now the "Colors" example on the THT web site is using the upperCaseFirst() function call on line 27 and 30. It should be noted that the correct function name is "toUpperCaseFirst", and will throw an error for any user getting started.
Reproduction steps:
Create a Number.toPercent(numPrecision)
method.
$num = 0.1234
$num.toPercent(1) //= '12.3%'
Installed successfully on Linux Mint 18 Cinnamon. PHP Version 7.0.
Result of running 'owl new':
+-------------------+
| NEW APP |
+-------------------+
PHP Fatal error: Uncaught Error: Class '\o\u_System' not found in /home/[my-user-name]/.owl/lib/core/Runtime.php:232
Stack trace:
0 /home/[my-user-name]/.owl/lib/core/Owl.php(1256): o\Runtime::getModule('', 'System')
1 /home/[my-user-name]/.owl/lib/core/Owl.php(538): o\Owl::module('System')
2 /home/[my-user-name]/.owl/lib/core/Owl.php(548): o\Owl::confirmInstall()
3 /home/[my-user-name]/.owl/lib/core/Owl.php(158): o\Owl::installApp()
4 /home/[my-user-name]/.owl/lib/core/Owl.php(121): o\Owl::mainCli()
5 /home/[my-user-name]/.owl/lib/core/Owl.php(87): o\Owl::main()
6 /home/[my-user-name]/.owl/bin/owl.php(28): o\Owl::start()
7 {main}
thrown in /home/[my-user-name]/.owl/lib/core/Runtime.php on line 232
Fatal error: Uncaught Error: Class '\o\u_System' not found in /home/[my-user-name]/.owl/lib/core/Runtime.php:232
Stack trace:
0 /home/[my-user-name]/.owl/lib/core/Owl.php(1256): o\Runtime::getModule('', 'System')
1 /home/[my-user-name]/.owl/lib/core/Owl.php(538): o\Owl::module('System')
2 /home/[my-user-name]/.owl/lib/core/Owl.php(548): o\Owl::confirmInstall()
3 /home/[my-user-name]/.owl/lib/core/Owl.php(158): o\Owl::installApp()
4 /home/[my-user-name]/.owl/lib/core/Owl.php(121): o\Owl::mainCli()
5 /home/[my-user-name]/.owl/lib/core/Owl.php(87): o\Owl::main()
6 /home/[my-user-name]/.owl/bin/owl.php(28): o\Owl::start()
7 {main}
thrown in /home/[my-user-name]/.owl/lib/core/Runtime.php on line 232
I just stumbled on THT and love it. Is there a discussion board someplace to keep people like me with discussion ideas from clogging the issues with questions? (Note added: I see there is a discord server and twitter. But could not find discussions on github)
Is there a single download PDF of all instructions, and if not, would you mind if I converted the entire website to such a PDF?
So far everything I see I like.
I am curious about the SQL injection if it does something similar to these:
As to structures, with the curly braces, is it possible to use END instead of curly braces?
if something
do this
if something else
Do more this
end
end
rather than
if something {
do this
if somethign else {
do more this
}
}
And the same for fn, tm, loop, foreach etc.
If it is not possible, would you be willing to add the capability?
I do realize a lot of people love the curly braces, whereas I like specific ends...
I DO LOVE no semicolons.. that is awesome... I also LOVE lists starting at 1 rather than zero...
I also LOVE that IF does not have to be enclosed in parens if (something) {}.
Basically what you have here is just what I have been looking for in my complaints about php...i have to study your manual more.
Thanks for this great work. If there is a message or discussion area or if you would be willing to turn it on here on github, I will go there from now on.
Also the jcon website jconformat.org is not showing up, I presume it is decrepcated? the website not the software. And JCON is awesome too! I like how cleanly you think about code.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.