ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Sudoku module
@ 2022-07-18 15:00 Otared Kavian via ntg-context
  2022-07-18 15:39 ` Wolfgang Schuster via ntg-context
  2022-07-18 15:58 ` Jairo A. del Rio via ntg-context
  0 siblings, 2 replies; 7+ messages in thread
From: Otared Kavian via ntg-context @ 2022-07-18 15:00 UTC (permalink / raw)
  To: jairoadelrio6; +Cc: Otared Kavian, mailing list for ConTeXt users

Hi Jairo,

You sent a message last year about your Sudoku module, and today, out of curiosity, I wanted to test it. Unfortunately it stops with an error message at line 76 of the file t-sudoku.mkiv, where you have:

\def\sudokufunction_direct[#name][#parameters]#content

I would appreciate if you could tell me whether you have a working version of you module, or what one has to change in order to typeset your examples.

Best regards: Otared
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Sudoku module
  2022-07-18 15:00 Sudoku module Otared Kavian via ntg-context
@ 2022-07-18 15:39 ` Wolfgang Schuster via ntg-context
  2022-07-18 16:53   ` Otared Kavian via ntg-context
  2022-07-18 15:58 ` Jairo A. del Rio via ntg-context
  1 sibling, 1 reply; 7+ messages in thread
From: Wolfgang Schuster via ntg-context @ 2022-07-18 15:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Wolfgang Schuster

Otared Kavian via ntg-context schrieb am 18.07.2022 um 17:00:
> Hi Jairo,
>
> You sent a message last year about your Sudoku module, and today, out of curiosity, I wanted to test it. Unfortunately it stops with an error message at line 76 of the file t-sudoku.mkiv, where you have:
>
> \def\sudokufunction_direct[#name][#parameters]#content
>
> I would appreciate if you could tell me whether you have a working version of you module, or what one has to change in order to typeset your examples.

The error is unrelated to the sudoku module and when you use LMTX the 
error disappears.

The real problem can be seen in the following minimal example and is 
related to the "hash" option for the argument key.

%%%% begin example
\starttext

\startluacode
interfaces.implement {
     name      = "test",
     public    = true,
     arguments = { "hash" },
     actions   = function(t)
         print(table.serialize(t))
     end,
}
\stopluacode

\test[text=Hello]

\stoptext
%%%% end example

Wolfgang

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Sudoku module
  2022-07-18 15:00 Sudoku module Otared Kavian via ntg-context
  2022-07-18 15:39 ` Wolfgang Schuster via ntg-context
@ 2022-07-18 15:58 ` Jairo A. del Rio via ntg-context
  1 sibling, 0 replies; 7+ messages in thread
From: Jairo A. del Rio via ntg-context @ 2022-07-18 15:58 UTC (permalink / raw)
  To: Otared Kavian; +Cc: Jairo A. del Rio, mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 823 bytes --]

Hi. Sorry. I didn't see your message and I had forgotten the very existence
of the module. I'll check it later (final exam weeks for me) so that it
works with MkIV and LMTX properly again. By the way, thanks for the
interest.

Best regards

Jairo

El lun., 18 de jul. de 2022 10:00 a. m., Otared Kavian <otared@gmail.com>
escribió:

> Hi Jairo,
>
> You sent a message last year about your Sudoku module, and today, out of
> curiosity, I wanted to test it. Unfortunately it stops with an error
> message at line 76 of the file t-sudoku.mkiv, where you have:
>
> \def\sudokufunction_direct[#name][#parameters]#content
>
> I would appreciate if you could tell me whether you have a working version
> of you module, or what one has to change in order to typeset your examples.
>
> Best regards: Otared

[-- Attachment #1.2: Type: text/html, Size: 1161 bytes --]

[-- Attachment #2: Type: text/plain, Size: 496 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Sudoku module
  2022-07-18 15:39 ` Wolfgang Schuster via ntg-context
@ 2022-07-18 16:53   ` Otared Kavian via ntg-context
  2022-07-18 20:10     ` Wolfgang Schuster via ntg-context
  0 siblings, 1 reply; 7+ messages in thread
From: Otared Kavian via ntg-context @ 2022-07-18 16:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Otared Kavian

Hi Wolfgang,

Thank you for your attention and the explanation regarding the « hash option » and why the sudoku module written by Jairo does not work. However I was reporting the issue when I tried to typeset the example file with LMTX (version 2022.07.06 21:42). 
As a matter of fact I am far from understanding what the « arguments = { « hash » } » is supposed to do in interfaces.implement in the code you sent…

Best regards: Otared

> On 18 Jul 2022, at 17:39, Wolfgang Schuster via ntg-context <ntg-context@ntg.nl> wrote:
> 
> Otared Kavian via ntg-context schrieb am 18.07.2022 um 17:00:
>> Hi Jairo,
>> 
>> You sent a message last year about your Sudoku module, and today, out of curiosity, I wanted to test it. Unfortunately it stops with an error message at line 76 of the file t-sudoku.mkiv, where you have:
>> 
>> \def\sudokufunction_direct[#name][#parameters]#content
>> 
>> I would appreciate if you could tell me whether you have a working version of you module, or what one has to change in order to typeset your examples.
> 
> The error is unrelated to the sudoku module and when you use LMTX the error disappears.
> 
> The real problem can be seen in the following minimal example and is related to the "hash" option for the argument key.
> 
> %%%% begin example
> \starttext
> 
> \startluacode
> interfaces.implement {
>     name      = "test",
>     public    = true,
>     arguments = { "hash" },
>     actions   = function(t)
>         print(table.serialize(t))
>     end,
> }
> \stopluacode
> 
> \test[text=Hello]
> 
> \stoptext
> %%%% end example
> 
> Wolfgang
> 
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : https://contextgarden.net
> ___________________________________________________________________________________

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Sudoku module
  2022-07-18 16:53   ` Otared Kavian via ntg-context
@ 2022-07-18 20:10     ` Wolfgang Schuster via ntg-context
  2022-07-18 21:53       ` Otared Kavian via ntg-context
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Schuster via ntg-context @ 2022-07-18 20:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Wolfgang Schuster

Otared Kavian via ntg-context schrieb am 18.07.2022 um 18:53:
> Hi Wolfgang,
>
> Thank you for your attention and the explanation regarding the « hash option » and why the sudoku module written by Jairo does not work. However I was reporting the issue when I tried to typeset the example file with LMTX (version 2022.07.06 21:42).

I have no problems with the examples at the end of the module and LMTX, 
only when I use LuaTeX a error appears.

> As a matter of fact I am far from understanding what the « arguments = { « hash » } » is supposed to do in interfaces.implement in the code you sent…

The 'interfaces.implement' functions creates the command \test and 
'arguments={"hash"}' creates the argument which accepts key-val lists 
([text=Hello]).

Wolfgang

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Sudoku module
  2022-07-18 20:10     ` Wolfgang Schuster via ntg-context
@ 2022-07-18 21:53       ` Otared Kavian via ntg-context
  0 siblings, 0 replies; 7+ messages in thread
From: Otared Kavian via ntg-context @ 2022-07-18 21:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Otared Kavian

Hi Wolfgang,

Thank you for your reply and the explanations about the function « interfaces.implement ».

Regarding the examples given by Jairo, you are correct: those examples can be typeset with LMTX. I did a mistake when in TeXShop I saved the file « t-sudoku.mkvi » under the name « t-sudoku.tex »: indeed this creates an error in LMTX as well in earlier versions of ConTeXt… (maybe a colateral consequence of the heat wave in France :-)

I apologize to you and Jairo for having caused any trouble.

Best regards: Otared

> On 18 Jul 2022, at 22:10, Wolfgang Schuster via ntg-context <ntg-context@ntg.nl> wrote:
> 
> Otared Kavian via ntg-context schrieb am 18.07.2022 um 18:53:
>> Hi Wolfgang,
>> 
>> Thank you for your attention and the explanation regarding the « hash option » and why the sudoku module written by Jairo does not work. However I was reporting the issue when I tried to typeset the example file with LMTX (version 2022.07.06 21:42).
> 
> I have no problems with the examples at the end of the module and LMTX, only when I use LuaTeX a error appears.
> 
>> As a matter of fact I am far from understanding what the « arguments = { « hash » } » is supposed to do in interfaces.implement in the code you sent…
> 
> The 'interfaces.implement' functions creates the command \test and 'arguments={"hash"}' creates the argument which accepts key-val lists ([text=Hello]).
> 
> Wolfgang
> 
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : https://contextgarden.net
> ___________________________________________________________________________________

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Sudoku module
@ 2021-04-12 18:02 Jairo A. del Rio
  0 siblings, 0 replies; 7+ messages in thread
From: Jairo A. del Rio @ 2021-04-12 18:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 537 bytes --]

Hi, list! I've just finished a minimal module for sudoku puzzles based on
Peter Norvig's algorithm. The module and examples are in the link below:

https://github.com/JairoAdelRio/context-sudoku

My port is a sorta literal translation of Python's version, so improvements
are to be done. As always, I'm having trouble passing color data from TeX
to Lua so that sudokus have more customizable aesthetics. I'll gladly
accept any feedback and recommendations before I submit the module to the
Garden. Thank you very much. Stay safe.

Jairo

[-- Attachment #1.2: Type: text/html, Size: 695 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-07-18 21:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-18 15:00 Sudoku module Otared Kavian via ntg-context
2022-07-18 15:39 ` Wolfgang Schuster via ntg-context
2022-07-18 16:53   ` Otared Kavian via ntg-context
2022-07-18 20:10     ` Wolfgang Schuster via ntg-context
2022-07-18 21:53       ` Otared Kavian via ntg-context
2022-07-18 15:58 ` Jairo A. del Rio via ntg-context
  -- strict thread matches above, loose matches on Subject: below --
2021-04-12 18:02 Jairo A. del Rio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).