How to test if a symbol is present?

2024-08-24 Thread Hobbyman
By the way there is quite some info in the module-description of system.

How to test if a symbol is present?

2024-08-24 Thread Hobbyman
Thanks both. The proc "declared" seems to do the trick...

How to test if a symbol is present?

2024-08-23 Thread Hobbyman
I saw the function: defined(nimhasXXX) can you test the existence of any symbol with that? And apparently: defined(nimhasXXXmodule) for modules? I dont see much about it in the manual...what is the syntax? thnx in advance.

Web-application: Where to start?

2024-08-23 Thread Hobbyman
Previously I made a learning-project json2web (probably not the offical way of doing things but if it works...): But since Jester is low-maintained i have created a sort of migration-project (thanks to guzba, ThomasTJdev and others) which could be of som

Newbie Here! Can I have some feedback on my code?

2024-08-11 Thread Hobbyman
@khaledh-nim Thnx. Good tip. Looks very clean. Is there a name for that programming-style? I would call it a flag-based decision-tree.. @Hallicon By the way: Kind of funny responses. Maybe of a moody programmer with to much work on his plate...whoa lol!

Create a (or more) nim-management-repo (or something else)

2024-08-11 Thread Hobbyman
Thanks @zoom I will read your thread aswell (these can be interesting but also read-heavy subjects). I assume it is relevant. As we say in Dutch sometimes I am walking a little behind the facts. To decrease potential bossyness I would like to adjust the term "need" to "want", and assignment ma

Create a (or more) nim-management-repo (or something else)

2024-08-09 Thread Hobbyman
As the nim-communtiy is maturing, contributors come and go, efforts could be streamlined by coordination and management (in a non-bossy way). I think this is currently missing in nim-community (but i dont see all the nim-stuff). And under this management falls: * needs-list ("demand"). This i

Can't install atoz

2024-08-09 Thread Hobbyman
You could file an issue at the autor's website.. I see the issues are enabled..

Request: please maintain a changelog on your project

2024-08-08 Thread Hobbyman
And to add to the wishes: when you fork a project please enable the issue-section! I see lots of taken-over projects but with the issues disabled. The forks have multiple new commits but no issues enabled. Then it seems like a private project and it is not good for the communication and continui

Input/output files from browser using JS backend

2024-08-07 Thread Hobbyman
You can experiment with some web-programming: The scricon-subproject demonstrates a "thin" javascript approach. But then also you have to get some feel for javascript.

Best location to declare variables in a proc

2024-08-04 Thread Hobbyman
I still wanted to test if that would even work. I confirm it does. Good to know. >From my perspective: Con: * unneeded handling/cost as compared to declaring outside of loop. * the var can only be used for one pass after which it is reset. Pro: * advantage for refactoring and ease of

The lowest possible module(s) of graphics in Nim?

2024-07-25 Thread Hobbyman
Thanks. I know I have to more background-reading on the subject. This is a good start!

The lowest possible module(s) of graphics in Nim?

2024-07-25 Thread Hobbyman
As an extra addition some remarks. A collaborative procedure could be: * find clarity and consensus on process. * find clarity and consensus on situation. * find clarity and consensus on (re)-design. As a proposal, in the development of GUIs one could split the project in parallel phase

getting started question, jester vs. karax?

2024-07-25 Thread Hobbyman
As a learning experience of jester a project of mine is: But I use the web-interface only to create offline apps; but it can a learning-point. I also thought Karax could not be scraped or spidered; you dont see much html-code in the p

The lowest possible module(s) of graphics in Nim?

2024-07-23 Thread Hobbyman
Thanks all for you responses. It confronts me with the realization that I dont know yet exactly what I want Game-development has (for now) dropped off because of the complexity. One thread is simple math graphics which I can and will probably do with the proposed options..yeah!! Thanx. I a

The lowest possible module(s) of graphics in Nim?

2024-07-23 Thread Hobbyman
Actually something like NimSvg comes quite close to what I want. Create some graphics on the boundary of math and art...and then you can print them thru Inkscape. Cool! The inventorization is more of a knowledgy interest..(Allthoe I have also an interest in (small) games, but I think that is a

The lowest possible module(s) of graphics in Nim?

2024-07-23 Thread Hobbyman
Off course you can also do it OS-dependent, but I assume the advantage of layers like SDL is that the OS-specific differences are abstracted away. But then off course you have a non-native (most likely C) layer, but then again I assume the OS-apis are also not written in Nim :-) I assume it dep

The lowest possible module(s) of graphics in Nim?

2024-07-23 Thread Hobbyman
That is also a nice idea! Render a .svg and read it into Inkscape.. I will look into pixie. Still awaiting the bottom-layer-story...

Using a template as variable-section

2024-07-23 Thread Hobbyman
> Declare variables where you use them in the smallest possible scope. No > exceptions are known to this rule. Is that not late declaration? When you need a similar var again in another phase give it another name; is that what you mean?

The lowest possible module(s) of graphics in Nim?

2024-07-23 Thread Hobbyman
I was wondering what is the lowest possible module of graphics in Nim? The minimal you need is some window in which you can draw your stuff. So you actually need some minimal GUI. Can somebody explain how this works? I saw in Mastering Nim (yes I bought the book) the examples and tried some pix

Using a template as variable-section

2024-07-23 Thread Hobbyman
That is true, didnt think of that. It only works without problems if the vars are not commonly used. So maybe it is not such a good idea. By the way, ideas are not good or bad; the net consequences are benificial or detrimental. But that is diplomacy 2.0. Maybe the word dirty applies after all

Using a template as variable-section

2024-07-23 Thread Hobbyman
I confirm the dirty-pragma works without injects. Of course the var-template is not a cheap method; in the template variables are declared that the newFunc proc never uses. It is a trade-off: ease of refactoring/coding versus cheap use of resources and depends on the situation and platform if i

Using a template as variable-section

2024-07-22 Thread Hobbyman
Aha! Cool. Thanks! Hope it doesnt give dirty side-effects :-) I will study the pragma lateron.

Using a template as variable-section

2024-07-22 Thread Hobbyman
Lately I am interested in refactoring; as I understand it to repartition code into smaller subfunctions, there by increasing oversight, re-usability etc. I want to propose some code using a template for the variable-section. This is useful for refactoring because then you can transplant parts of

Nim version 2.0.8 released

2024-07-04 Thread Hobbyman
Thanks to all for the new version! And I am happy to see choosenim is being re-addressed. For me it works pretty nicely to update to a new version, revert to older versions and so on. So thanks to the maker dom96 for that and the other beautiful things he has made. It shows the importance of be

Small game written in Nim with a from-scratch-engine written in Nim (on Steam now)

2024-07-02 Thread Hobbyman
@saemideluxe OK thanks for the tips. I would have to do some research in those options. Come to think of it: I must think out the rules anyway and I could test them on a chess/checkers-board with some pieces to see if could come up with something exciting... (Also I have more project-ideas tha

CodeTwig - a small project-viewer

2024-06-29 Thread Hobbyman
An obvious mistake on my side. getFilePos returns an int64 that i try to put in an int-variable. The error ocurred in old unremoved function but is also present in the new replacement. Apparently ive been blind to this. Wonder why it compiles at my side though. Is the compiler sometimes lenient

CodeTwig - a small project-viewer

2024-06-29 Thread Hobbyman
@Helmut Thanks for trying out CodeTwig! If you are willing to file an issue on: i am happy to look into the matter. I assume you have successfully compiled other nim-projects on your android-terminal-setup. We can zoom into and discuss the matter

Small game written in Nim with a from-scratch-engine written in Nim (on Steam now)

2024-06-28 Thread Hobbyman
Cool! And even published on Steam! Not tonight but soon I will read your blog-story!

CodeTwig - a small project-viewer

2024-06-28 Thread Hobbyman
For anybody who likes to analyse his/her own or other ones projects: CodeTwig. A newer version 1.62 is available. Now with multi-level subdirs extraction of source-files and the possibility of a multi-project-setup. There is room for improvement (see future plans) but it is moving forward..

Privilege Escalation with Nim Package Manager - John Hammond

2024-05-30 Thread Hobbyman
What is the main take-away?

Cheap exceptions, opinionated error handling

2024-05-30 Thread Hobbyman
I am speaking from a non-technical user-perpective (user but not a developper of Nim) so dont be too harsh on me. When i think about it, the exception raising is an invasive process into the calling program. Future computing maybe should be more polite in terms of respons-request style. (I have

CodeTwig - a small project-viewer

2024-05-29 Thread Hobbyman
Thanks! I did it myself...

Where the .. does that echo come from?

2024-05-29 Thread Hobbyman
The following template works for non-release-compilation, but no special flags are needed apparently. You can add a flag-variable wispbo (in my suffix-lingo) or customize the style. Also i dont know if the basename-split-off is cross-platform? Maybe use Path and offical approach instead.. Than

Where the .. does that echo come from?

2024-05-29 Thread Hobbyman
@clonk That looks promising! I saw it works. A little pruning would be nice like: module_proc_linenr: message But I am gone look into that. Thanks.

Where the .. does that echo come from?

2024-05-29 Thread Hobbyman
Just for sharing. Sometimes you dont know where an echo cometh from (a bottomless pit maybe :-) ) Below code can help with that. Maybe somebody has a macro that extracts the location-info automatically? Untill now i havent done macros because i am too busy programming.. # logging

CodeTwig - a small project-viewer

2024-05-29 Thread Hobbyman
I have written a little program called CodeTwig. It may be of interest to Nim-programmers who sometimes loose oversight of their code. :-) CodeTwig is terminal-program to view the outline of the source-code and to show procedures as usage-trees or used-by-trees.

Why not use AI to create momentum in Nim?

2024-05-15 Thread Hobbyman
Hahaha nice comic-strip. That's how it is.. We might also create a feeling of togetherness in our amazement how bad the AI-answers often are. Maybe I am using an older version but the AI is often very confused :-) It reminds me of my high-school philosophy that any answer is better than no ans

Conversion-to-string-function is hard to find

2024-05-15 Thread Hobbyman
After some looking into the paths-module, I noticed that you can convert string to Path-type like so: Path(mystring). Backwards you can convert Path-type to string like so: string(myPath). Conversion with $ doesnt work. Apparently $ is just an alias, which implementations walk behind the offical

Any suggestions on how to use nimsuggest?

2024-05-10 Thread Hobbyman
A proc-usage-tree would also be a cool feature...

Any suggestions on how to use nimsuggest?

2024-05-10 Thread Hobbyman
I have allready started with: > nimsuggest --stdin myfile.nim Then I get: > usage: sug|con|def|use|dus|chk|mod|highlight|outline|known|project > file.nim[;dirtyfile.nim]:line:col Do you really allways have to enter the line- and col-number for every function? That would defeat the usability o

K-nth smallest element - Library

2024-05-10 Thread Hobbyman
Thanks for the link. I suppose it is meant for computer scientists, and not so much for house, garden and kitchen programmers as we say in Dutch... :-) I belong to the latter category, so maybe others can comment..

K-nth smallest element - Library

2024-05-09 Thread Hobbyman
Please elaborate...

How to create a logical expression programmatically?

2024-05-03 Thread Hobbyman
OK thanks I will look into those libs, time permitting, for further enhancements.. As a last additon I will give the whole function I made. proc filterIsMatching(tekst, searchtermst: string): string = #[ The searchterms form the filter. result types: -

How to create a logical expression programmatically?

2024-05-03 Thread Hobbyman
In the mean time i have come up with something like this: (The boolsq stands for the search-terms that may or may not have been found, the operatorsq is also to be parsed from the search-string. Using operators and (a) or (o) and not (n). Not yet supported brackets and phrases, but it's a start

How to create a logical expression programmatically?

2024-05-03 Thread Hobbyman
The process I want to create is the following: The user sees a text about fruits and wants to know if certain fruits are present in the text. Therefore a search-box is provided in which he enters: (apple or pear) and banana (or any other random search-pattern) How do i program such a thing, and

Nim 2.0.4 and 1.6.20 released

2024-04-24 Thread Hobbyman
Congratulations and thanks for the new release!

Nim 2.0.4 and 1.6.20 released

2024-04-24 Thread Hobbyman
I still have to dive in to nimsuggest at some time...

How do I keep track of changing standard-libs?

2024-04-13 Thread Hobbyman
Maybe an idea to put the tip: "Replace "docs" by "version" to see older versions" on top of the standard libs weblink.

How do I keep track of changing standard-libs?

2024-04-13 Thread Hobbyman
Sorry for the late response. That is good to know! (about the old versions-substitution). And thanks for the changelog-link as well..

How do I keep track of changing standard-libs?

2024-04-09 Thread Hobbyman
Lets first start with the pleasantries.. :-) Thanks all for creating such a beautiful language! The overview of CURRENT standard libs is pretty good.. OK let that sink in.. but... the older versions I dont see (maybe I am not looking well)... Some background here: The feature of Nim whereby p

How do i look into this runtime-failure?

2023-10-27 Thread Hobbyman
Sorry for the delay. Maybe it had to do with my disk getting upset and i had to do fsck (file system check for non-linuxers, allthoe it looks like file-system sucks :-) ) to repair my file-system. I ran the code again and it worked automagically again. I am allready moving to a new laptop. Than

How do i look into this runtime-failure?

2023-10-25 Thread Hobbyman
The only error-info I get is this: Hint: mypath/g_mine [Exec] mypath/g_mine.nim(1198) g_mine /home/user/.choosenim/toolchains/nim-2.0.0/lib/std/assertions.nim(25) getChildLinks /home/user/.choosenim/toolchains/nim-2.0.0/lib/system/fatal.nim(53) sysFatal Error: unhandl

How do i look into this runtime-failure?

2023-10-25 Thread Hobbyman
Besides echoing stuff...

The secret of Nim

2023-09-23 Thread Hobbyman
She has not been shaved though...

Just installed nim 2.0 and vscodium can't run a nim program

2023-09-20 Thread Hobbyman
Or could you use choosenim?

Disable GC-safety in Nim 2.0?

2023-09-12 Thread Hobbyman
Thanks for all solutions! {.gcsafe.} must apparently be implemented per function.. The app compiled with `--threadAnalysis:off` Crude but effective. Strangely enough with four threads now, but i am happy (for now) :-) `--threads:off` compiles with one thread... Then I can slowly clean it up. I

Disable GC-safety in Nim 2.0?

2023-09-12 Thread Hobbyman
I will try that, thanks!

Disable GC-safety in Nim 2.0?

2023-09-12 Thread Hobbyman
Is it true that gc-safety is compulsory in Nim 2.0 (I use Jester) a.o.t. recommended / warned in 1.x. At compiling in 2.0, I get: `/home/thisuser/.choosenim/toolchains/nim-2.0.0/lib/pure/asyncmacro.nim(250, 31) Error: 'match (Async)' is not GC-safe as it calls 'showPage'` showPage calls indeed

Demo video of Figuro GUI progress

2023-09-05 Thread Hobbyman
How does the hello world-code look like? Are there allready controls like a combobox?

How to make a tray system icons?

2023-09-02 Thread Hobbyman
I am not very informed on this but is that not arranged in the desktop environment. Do you use windows of something else?

Wishlist: Ideal UI library for Nim

2023-08-29 Thread Hobbyman
Well I am happy that there is agreement on the issue and then it can be moved forward. I may have missed pieces of information. Maybe in the future I may contribute but for now I am more invested in Html (definiton-based / non-dsl) ...We keep monitoring the situation as it unfolds ;-)

Wishlist: Ideal UI library for Nim

2023-08-24 Thread Hobbyman
A last addition to the gui-discussion. Firstly I assume Araq wants a gui that consists of thin (nim-)layers building up to multiple layered solutions. But indeed it needs clarification which libs to start with, which layers are important and which solutions are priority. Also indeed it may take

nimBcs

2023-08-24 Thread Hobbyman
Thanks for donating the lib! However it is not my domain in relation to testing...

SnelInstaller

2023-08-24 Thread Hobbyman
Not to bump my own stuff (or maybe a little), but I saw that when i searched for installer in the search-function, snelinstaller didnt turn up. Apparently it uses string-search aot substring-search. Maybe it turns up now in the search-function :-) Furthermore I wonder how items are sorted; is i

New to nim... It looks interesting, but can it ... ?

2023-08-24 Thread Hobbyman
You might better disconnect your decision of using Nim from the specific app-idea that you have and base it on the intrinsic abilities of the language and the copious documentation that exists allready.

Potential users

2023-08-19 Thread Hobbyman
By the way, besides the Gui-support, Nim is getting pretty mature...as am I..

Potential users

2023-08-19 Thread Hobbyman
@Termer: I have not yet seen a rule that some discussions must be done on IRC/Discord. But maybe that is a silent rule or practice. Maybe i have been living under a stone for that matter. ;-) @alexeypetrushin: It is a crowded market, but markets are also dynamic (a little to much in my view; th

Potential users

2023-08-17 Thread Hobbyman
I forgot -besides companies- the non-commercial organisations which can also potentially be consumers of Nim-programs, like schools, universities, municipalities, hospitals etc.

Potential users

2023-08-17 Thread Hobbyman
Potential users Hi all, I want to philosofize a bit about Nim and its potential users, use-cases, and user-growth. First of all I want to distinguish some groups important to Nim. I see 5 (+1) major groups being: Nim's core-developpers, lib-developpers (=semi-users; hybrids of developpers and u

What is the best way to learn nim for someone who is fluent with python

2023-08-16 Thread Hobbyman
Have you succesfully written some no-gui samples? First start with minimal test-projects in a bottom-up way, and then you can do the harder stuff. Also the lib-docs have a great search function which i use a lot. Starting with jester is not the easiest way to get going. However, for me the foll

SnelInstaller

2023-08-15 Thread Hobbyman
I have created SnelInstaller, for all you installation-services :-) For some anyway. It could take away some boring repetetive packaging tasks.. It may be still a little rough around the edges, though.

Nim version 2.0.0 is here

2023-08-01 Thread Hobbyman
Coincidently I saw Nim 2.0 was released; great! Hopefully it doesnt mean too much upgrading of my code (github some-avail). But with choosenim I can switch and do it slowly if necessary. Because of looming RSI i have to do it slowly anyway.. Thanx and good vacation to all...

Jester - Cannot get multiple values from html select list?

2023-02-01 Thread Hobbyman
Context = Jester. I have a an html-select-element with size = 5 and with atrribute "multiple". This enables me to select multiple items. But when i retrieve the value with like: `@"myselectlist"` i get a single item. Maybe i am missing something but can i somehow retrieve the multiple items? A

How can I concatenate strings of type sqlQuery (db_sqlite)?

2022-11-15 Thread Hobbyman
O yeah view the string-concat of course duh...

How can I concatenate strings of type sqlQuery (db_sqlite)?

2022-11-15 Thread Hobbyman
Thanx it works, also with vars. You cannot echo it though, to view the result... Is there a way to view the result?

How can I concatenate strings of type sqlQuery (db_sqlite)?

2022-11-15 Thread Hobbyman
When i have two db_sqlite-sqlQuery-strings how do i concatenate them? The folowing doesnt work: sql"blabla" & sql"blabla" Use-case: dynamic composition of queries.

How can I get the fields and field-types of an sqlite-database?

2022-11-11 Thread Hobbyman
All usefull information. Thanx! For now I go for the sqlite_master table, but the Norm-option looks quite interesting and worth investigating...and with copious documentation..

How can I get the fields and field-types of an sqlite-database?

2022-11-11 Thread Hobbyman
I am beginning to work with sqlite and would like to read somehow the fields and field-types of a table. Can this be done? And if yes then how? Or maybe not with the standard-lib db_sqlite? With another one? The reason is that I want to create a generalized database-form (in html) which I only

Launched a web app using Nim on the back-end

2022-03-13 Thread Hobbyman
I await your open-source announcement! Will you put it on github?

Fidget UI: scrolling on OpenGL backend

2022-02-27 Thread Hobbyman
I have noticed that the nim-community seems sort of neutral towards the choice of GUI, which is usually a wise choice. I suppose they have had heated discussions in the past and now want to avoid "this tool is better than that discussions". However in relation to the take-up of Nim it is relevan

Fidget UI: scrolling on OpenGL backend

2022-02-26 Thread Hobbyman
Always good to have a new GUI option. I wonder how the competition of the GUIs wil turn out. I myself have chosen for the browser-based interface because I think the browser isnt going away any time soon. But what do i know? :-)

Calling nim-server-code from javascript

2022-02-26 Thread Hobbyman
te and demotivate the uninitiated (that's me). Remember i am not a computer-scientist but a hobbyman :-P But to improve my knowledge i will google on websockets, fetch, endpoints to get ahead...or any other keywords / weblinks if you have extra tips...

Calling nim-server-code from javascript

2022-02-23 Thread Hobbyman
@ Niminem. It is an interesting framework but I have my own little framework :-) I would like to hear a more elaborate, abstract explanation of how your framework works, as opposed to a recipe for usage, before i invest time in trying in out. I dont see the word cookie mentioned in your code so

Calling nim-server-code from javascript

2022-02-22 Thread Hobbyman
OK thanks! I'll look into it!

Calling nim-server-code from javascript

2022-02-22 Thread Hobbyman
Hello all, The question is: Is there a way to run a proc from a module based only on the strings that represent the identifiers? Something like: allmodules("mymodule").moduleprocs("myproc")(param1, param2) Or if that is impossible only: moduleprocs("myproc")(param1, param2) Background. I use

import from url

2022-02-19 Thread Hobbyman
Or her ...

import from url

2022-02-19 Thread Hobbyman
You gotta tell him nicely...

Privacy offensive - remove Google Analytics from the Nim website

2022-01-30 Thread Hobbyman
When we are going into Austrian politics, mandatory vaccination seems to me also a privacy offense.

Non unique / double keys in json

2022-01-12 Thread Hobbyman
Thanx all. at araq. parsejson.nim interesting but learning-curve. Maybe dig into it at a later time.. at treeform. you probably have a nice replacement for json.nim but now i have finally learned the api of json.nim so i will keep it with that.

Non unique / double keys in json

2022-01-08 Thread Hobbyman
Thanx. I agree that double keys are unwise; that is exactly why i want to (automatically) detect them instead of ignoring them because i know i make mistakes. (Programmers want do it automatically :-) ). So where do i find this raw parser?

Non unique / double keys in json

2022-01-08 Thread Hobbyman
Hi yall, maybe i am wrong but when i list all keys from a json-node thru json.nim, i only get the unique-ified keys, but not the doubles. Firstly i find that supprising and also it looks like a fault-tolerant approach. Non-unique keys are tolerated and ignored. More logical to me would be to i

JSON - how to edit Jarrays (amongst others)

2021-12-29 Thread Hobbyman
I thought I had send a personal message :-)

JSON - how to edit Jarrays (amongst others)

2021-12-29 Thread Hobbyman
Hi John, looked at: It is apparently in a techno-political process which I will not enter. Two guys were trying to merge their stuff in the devel-branche unsuccesfully, as it seems. Bigger design-questions are being put forward by bigger bosses, wh

JSON - how to edit Jarrays (amongst others)

2021-12-29 Thread Hobbyman
@JohnAD. That is a good idea! I might do that, that would be an new thingy for me.

JSON - how to edit Jarrays (amongst others)

2021-12-29 Thread Hobbyman
Thanx planetis, that did the trick! delete(arrayjnob.elems, 2) Run or: arrayjnob.elems.delete(2) Run Apparently in that case it can be handled as a normal sequence (of jsonnodes). For other straying people to learn: To insert i can do:

JSON - how to edit Jarrays (amongst others)

2021-12-29 Thread Hobbyman
Thanks for the quick response however I still get errors: arrayjnob.delete(2) produces compile-error: test_11228_json_opbouw.nim(52, 10) Error: type mismatch: got but expected one of: proc delete(obj: JsonNode; key: string) first type mismatch at position: 2 required type for key: string b

JSON - how to edit Jarrays (amongst others)

2021-12-29 Thread Hobbyman
Hello all, I want to use json as a layer for (gui-)definitions and data but i am missing runnable examples on some subjects. I understand how i can read and write json-files, and that it is a tree of nodes of different types. I can add a key-value pair with: myjnob.add("name", %