static binaries

2022-04-21 Thread enthus1ast
Maybe you could build the pgclient with musl statically and link it to your application.

Possible workarounds for subclassing a c++ class and overriding a virtual method

2022-04-21 Thread sls1005
As long as the included file doesn't declare variable or implement proc, there's no duplicated symbol. (Just like a C++ header)

server-client webframework

2022-04-21 Thread choltreppe
thanks for explaining. Forgott to look in the forum for some days :/ > This probably means that it is (or at least that it could be) type checked > since it's all one project. Yes. > the latter of which could simply be stored directly in the binary as the > result to some route. That would be

static binaries

2022-04-21 Thread tmsa04
It's too late to edit the above post, here's some other ideas. Supply a bundled libc and link to that: Or possibly write a script so it builds easily on the target system, or if it was practical, break the ap

Possible workarounds for subclassing a c++ class and overriding a virtual method

2022-04-21 Thread krakengore
Wouldn't that result in duplicated symbols when linking?

Seeking advices for a C programming book

2022-04-21 Thread Sixte
> So 2.5.5 isn't generics ? Yes, it is. Both Modula-2 and Modula-3 allow module-wide "polymorphic" (abstract) types. In addition, Modula-3 allows "generic" types (explicit type parameters) on the interface and module level. Due to abstract types, both Modula(s) support static polymorphism witho

Seeking advices for a C programming book

2022-04-21 Thread tmsa04
Gnu C programming tutorial, good for beginners: GLIBC reference manual, more detailed info: The function index is often helpful, there are some other indexes too:

static binaries

2022-04-21 Thread tmsa04
I don't know if this applies here, but some time ago I wrote something to run on a minimal libc implementation as well as the usual glibc one. A precompiled binary would work fine and was portable to other versions but only if I restricted the code to using functions available in both libc's, ot

server-client webframework

2022-04-21 Thread reversem3
That was great, thanks for the explanation.

Seeking advices for a C programming book

2022-04-21 Thread reversem3
So 2.5.5 isn't generics ?

static binaries

2022-04-21 Thread archnim
Now I understand what you I trying to do. This is what I thought you were doing: * You call a static lib in your main module * You call a dynamic lib in your main module * You compile all together (without --passL:-static) That's why I said that it should be normally possible. But this i

static binaries

2022-04-21 Thread daef
Building my own, static, libpq.a seems like a last resort - true.

static binaries

2022-04-21 Thread daef
Can you justify this statement? At least [this answer](https://serverfault.com/a/490270) keeps me hopeful at the moment...

static binaries

2022-04-21 Thread daef
I think this is as minimal as it gets...: import std/db_postgres let fake = open("","","","") fake.close Run compile with nim --gcc.exe:musl-gcc --gcc.linkerexe:musl-gcc --passL:-static c test.nim Run

static binaries

2022-04-21 Thread Yardanico
That's not a bug, it's not possible to load dynamic libraries with static linking, no matter the language. Although there might be some workarounds that I'm not aware of.

static binaries

2022-04-21 Thread archnim
Normally, The way you link you program to a lib, doesn't affect how you use other libs. There is certainly a hidden bug somewhere. Please post a minimal code and your compiling command. So that we can figure out where is the issue.

Installing choosenim (on Windows) on a custom folder does not seem to work

2022-04-21 Thread dom96
Yes, choosenim could be smarter here. Nimble has a configuration mechanism where it reads a nimble.ini file from the system's default config dir (~/.config/nimble on linux iirc). We could have choosenim do the same, but I don't think it's necessary. I think a better solution is to have chooseni

Brogrammer uptick

2022-04-21 Thread dom96
bruh

Brogrammer uptick

2022-04-21 Thread daef
$ curl -s 'https://forum.nim-lang.org/search.json?q=Bro&q=Bro' \ | jq '.[].creation' \ | while read stamp ; do date -d @$stamp +"%Y-%m" done \ | uniq -c 2 2022-04 1 2021-11 1 2021-10 5 2021-09 1 2021-01

Problems with DB connections using db_postgres

2022-04-21 Thread jasonfi
I have a problem with running out of connections when using db_postgres. The connections get used up and the app crashes, with only an app restart fixing the problem. Installing PgBouncer helps a bit, but I still encountered the same problem eventually. This is because the entire connection poo

static binaries

2022-04-21 Thread daef
As stated in my last question: I want to statically link libc while retaining the possibility for the binary to dynamically load .so's (libpq.so in this case)