Can't get started nim with a simple postgres querying

2024-07-30 Thread PMunch
That's because you're missing the shared library libpq used by the postures bindings. `brew install libpq` should sort you out.

how to use JsonNode in macro

2024-07-30 Thread jk49
the reason why `macro genTableJson*(name: untyped, fields: static JsonNode): untyped =` does not work is JsonNode object can not be assigned to a Ident at compile time # Error: invalid type: 'JsonNode' for const const exampleData = %*{ "name": "John Doe",

Setter for Base and Inherited Class (Cont..)

2024-07-30 Thread RegularAlias
Right, or maybe `inject`. I'm sure Swift developers would just use the syringe emoji đź’‰

I created an RPN calculator.

2024-07-30 Thread 8bitdboy
Howdy, everyone! I'm new here, but I figured I'd show off something I created: NRPNC, the Nim Reverse Polish Notation Calculator. It's implemented as a stack-based language, and it supports branching with if/else statements and functions. I'm not sure what else to put here, so lemme know what y

how to use JsonNode in macro

2024-07-30 Thread jk49
wow, this works ! import macros import json import tables import sequtils import print func typeStringFromJsonKind(k: JsonNodeKind): string = case k: of JBool: "bool" of JInt: "int" of JFloat: "float" of JString: "string"

Setter for Base and Inherited Class (Cont..)

2024-07-30 Thread jk49
yes, maybe a more natural language way, is copyFrom like result.copyFrom = b you could use `<=` or `<-` ish operator

Setter for Base and Inherited Class (Cont..)

2024-07-30 Thread RegularAlias
I see what you're saying, because when you add/concat then the result is a separate thing from its constituent parts, but here we are only setting values for the base extension. A more appropriate syntax might then be something like `ext = child extends parent`, almost like a functional OOP patt

Can't get started nim with a simple postgres querying

2024-07-30 Thread surrealist
After bypass the warning nim c --passL:"-Wl,-no_warn_duplicate_libraries" dbtest.nim Run Got this error. $ ./dbtest could not load: libpq.dylib (compile with -d:nimDebugDlOpen for more information) Run

Can't get started nim with a simple postgres querying

2024-07-30 Thread surrealist
It's my first day using Nim. It looks great from my Python perspective, but I'm stuck and finding it difficult to perform a simple database query. I installed Nim with `brew install nim` ('m using a macbook M1). The hello-world app built and ran just fine. I want to execute a simple SELECT stat

Nim rose to the top of median salary leaderboard in 2024 Stack Overflow Developer Survey

2024-07-30 Thread Clonk
More likely it's because the people the people who have the freedom to use Nim in a professional settings are probably already higher-up the chain (or work at Status :p)

how to use JsonNode in macro

2024-07-30 Thread jmgomez
I posted this in discord a while ago () Maybe you find it useful: import std/[macros, json, tables, sequtils] func typeStringFromJsonKind(k: JsonNodeKind): string = case

Nim rose to the top of median salary leaderboard in 2024 Stack Overflow Developer Survey

2024-07-30 Thread grd
A Python developer now earns $10.000 less...

how to use JsonNode in macro

2024-07-30 Thread planetis
I am happy to help. for key, value in node.pairs(JsonPtr"", JsonTree): echo value.kind(JsonPtr"") Run

how to use JsonNode in macro

2024-07-30 Thread planetis
Replace std/json with [jsonpak](https://github.com/planetis-m/jsonpak) works at [compile time](https://github.com/planetis-m/dumpster/blob/master/classical_ml/decision_tree.nim)

How to package a nim program in an APK file

2024-07-30 Thread planetis
Since this thread was necrobumped by a bot, I should mention that I maintain a [template](https://github.com/planetis-m/raylib-game-template) that sets up a build environment and builds APKs for your project without gradle. It uses naylib but I imagine it can be adapted to use any other game/fra

how to use JsonNode in macro

2024-07-30 Thread jk49
wow, this looks cool, but I tried to use `for key, value in node.pairs:` Error: undeclared field: 'pairs' for type jsontree.JsonTree Run could you help me with this error?

how to use JsonNode in macro

2024-07-30 Thread Clonk
Untyped macros works on NimNode and happens at compile-time. Your JSON is run-time (compile-time constant is declared with `const`, `let` is for immutable data). What exactly are you trying to accomplish ? Having your type be declared in a JSON instead of source code is probably wrong. If you

how to use JsonNode in macro

2024-07-30 Thread jk49
As you can see, the reason I need to use json, is the table header change as the json change. I also need object init() proc with the example values from json...

how to use JsonNode in macro

2024-07-30 Thread jk49
thank you for the reply, I am trying use macro to generate type definition from json string / JsonNode

VIBRANCE VITAMIN C SERUM AU [Benefits Or Price] Can Be Used Daily?

2024-07-30 Thread Seenu09
“VIBRANCE VITANIN C SERUM AUSTRALIA CHEMIST WAREHOUSE” VIBRANCE VITAMIN C SERUM has several advantages, including anti-aging and skin-brightening properties. Being a powerful combination of chemicals including niacinamide and hyaluronic acid, it is a great complement to any skincare regimen. #Vi

Malebolgia & VCC, does not always finish

2024-07-30 Thread ingo
As there are problems using gcc and avx(2) on windows I switched to VCC. Now I noticed with an other program that it did not "finish" execution. So I modified the Malebolgia demo program a bit, with the same result. It just uses processors to the max and does not progress and has to be terminate

Nim rose to the top of median salary leaderboard in 2024 Stack Overflow Developer Survey

2024-07-30 Thread amkrajewski
That was my first thought! :P Based on the language popularity list, though, there were closer to 250ish responders using `nim`.

How to package a nim program in an APK file

2024-07-30 Thread LouisBailey47
Good morning! Congratulations on taking the first steps towards creating your Android app with Nim. Compiling your Nim program to an APK involves several steps, including integrating your C files with an Android project and finalizing the build using Android Studio. To help you compile and pack

how to use JsonNode in macro

2024-07-30 Thread stoking
`fields` inside your macro is a NimNode, so k is the child index. As far as I know, if you want the actual value of `fields` it needs to be `static`, which probably won't work here because your exampleData is a let and JsonNode is a ref type anyway.

Nim rose to the top of median salary leaderboard in 2024 Stack Overflow Developer Survey

2024-07-30 Thread amkrajewski
Fun fact! In the recently released [2024 Stack Overflow Developer Survey](https://survey.stackoverflow.co/2024/technology#top-paying-technologies-programming-scripting-and-markup-languages), `nim` rose to fourth place in terms of median developer salary. It had the highest year-to-year growth on

Nim rose to the top of median salary leaderboard in 2024 Stack Overflow Developer Survey

2024-07-30 Thread moigagoo
Looks really nice! Hopefully, employers will see it and start listing more Nim jobs :-)

Nim rose to the top of median salary leaderboard in 2024 Stack Overflow Developer Survey

2024-07-30 Thread Zoom
Really glad for the whole dozen of them! :D

how to use JsonNode in macro

2024-07-30 Thread jk49
I am trying to use JsonNode in macro, but failed... let exampleData = %*{ "name": "John Doe", "age": 30, "city": "New York" } macro genType*(name: untyped, fields: JsonNode): untyped = result = newStmtList() var fieldsAst = nnkRecList.

Setter for Base and Inherited Class (Cont..)

2024-07-30 Thread jk49
BaseExt object already contain Base, so `+` or `&` is not logically correct, so setter is the most logical interface.

Keto Plus FI: Toiminta, arvostelut, tilaus, hinta ja ainesosat

2024-07-30 Thread KetoPlusTulos
Keto Plus: Terveyden ja hyvinvoinnin maailmassa ketogeeninen ruokavalio on saavuttanut valtavan suosion, koska se voi edistää painonpudotusta ja parantaa yleistä hyvinvointia. Keto Plus tulee lupaavaksi lisäravinteeksi, joka on suunniteltu tukemaan ihmisiä heidän ketomatkallaan. Tässä kattavassa

ManUp Gummies (NZ) New Zealand Reviews EXPOSED WARNING! What Consumer Says? Read Before Order!

2024-07-30 Thread wolpoxz
âś… Keyword: -ManUp Gummies New Zealand will make your Evenings super hot and sentimental with this you fair stream with the discuss and keep grinning continuously to seeing your accomplice cheerful with you. If you need that feeling in your life before long so tap on arrange button presently and