Skip to content

Conversation

@averms
Copy link

@averms averms commented Oct 22, 2021

This fixes #6.

@averms
Copy link
Author

averms commented Oct 22, 2021

Actually I think the format of the banner looks a little uneven:

🥐  Croissant 0.0.1 (C) 2019 Benoit Giannangeli
LuaJIT 2.1.0-beta3
→

I think it might be better to have the version in the same line. Maybe like:

🥐 Croissant 0.0.1 (C) 2019 Benoit Giannangeli (LuaJIT 2.1.0-beta3)
→

@giann
Copy link
Owner

giann commented Oct 25, 2021

Thanks for the patch.
The only issue I see is that, jit or _VERSION could be either absent or modified.
Aso, I think we still need to print the copyright info.

@averms
Copy link
Author

averms commented Oct 25, 2021

The only issue I see is that, jit or _VERSION could be either absent or modified.

On startup of the interpreter it should be there, right? Obviously once the user starts executing code they can do whatever but this is a banner that prints at startup. I've never used croissant as a debugger so maybe I'm missing something there. There's no other way to programmatically get the Lua version from inside Lua unless you write a C extension that #includes lua.h.

Aso, I think we still need to print the copyright info

Not sure it's possible to print out the copyright info with correct years programmatically unless you write a C extension or parse lua.h.

As for the legal side, I'm not a lawyer but the MIT license requirement for copyright attribution is for "all copies or substantial portions of the Software.", which I don't think this is.

@daurnimator
Copy link
Collaborator

I also note that the existing behaviour doesn't work in Lua 5.4:

$ croissant
🥐  Croissant 0.0.1 (C) 2019 Benoit Giannangeli
Lua 5.3 Copyright (C) 1994-2018 Lua.org, PUC-Rio
→ _VERSION
"Lua 5.4"	

@giann
Copy link
Owner

giann commented Mar 4, 2022

Yes it's totally untested with 5.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prints out wrong LuaJIT banner

3 participants