Re: vibe.d still does not work on FreeBSD.

2024-02-20 Thread Alain De Vos via Digitalmars-d-learn
On Monday, 19 February 2024 at 07:11:30 UTC, Kagamin wrote: Docs say SSL_get0_peer_certificate was added in openssl 3. I recompiled everything with : DEFAULT_VERSIONS+= ssl=openssl31 With this setting vibe works fine on FreeBSD. Nice.

Re: vibe.d still does not work on FreeBSD.

2024-02-18 Thread Alain De Vos via Digitalmars-d-learn
On Sunday, 18 February 2024 at 19:22:26 UTC, Sergey wrote: On Sunday, 18 February 2024 at 13:23:53 UTC, Alain De Vos wrote: DEFAULT_VERSIONS+= ssl=openssl111 Maybe also could be helpful to share your dub.json, compiler version and OS version as well. Compiler : ldc2 --version : LDC - the

vibe.d still does not work on FreeBSD.

2024-02-18 Thread Alain De Vos via Digitalmars-d-learn
The error i get : ``` Up-to-date vibe-d 0.9.8: target for configuration [library] is up to date. Building t ~master: building configuration [application] Linking t ld: error: undefined symbol: SSL_get_peer_certificate referenced by openssl.d:373

Re: Print debug data

2023-07-18 Thread Alain De Vos via Digitalmars-d-learn
?

Re: How to free memory ater use of "new" to allocate it.

2023-07-17 Thread Alain De Vos via Digitalmars-d-learn
This works also, ``` class C { int * pa; int [] a; // Constructor this() {writefln("Called constructor"); pa=cast(int *)malloc(1000*int.sizeof); a=pa[0..1000]; } } void dofun() { scope x=new C; x.a[3]=5; writefln("%12x",); }

Re: How to free memory ater use of "new" to allocate it.

2023-07-17 Thread Alain De Vos via Digitalmars-d-learn
Here is i use new, ``` import std.stdio:writefln; import object: destroy; import core.memory: GC; import core.stdc.stdlib: malloc,free; import std.typecons; class C { int * pa; int [] a; // Constructor this() {writefln("Called constructor"); pa=cast(int

Re: How to free memory ater use of "new" to allocate it.

2023-07-17 Thread Alain De Vos via Digitalmars-d-learn
This works also: ``` import std.stdio:writefln; import object: destroy; import core.memory: GC; import core.stdc.stdlib: malloc,free; import std.typecons; class C { int * pa; int [] a; // Constructor this() {writefln("Called constructor"); pa=cast(int

Re: How to free memory ater use of "new" to allocate it.

2023-07-17 Thread Alain De Vos via Digitalmars-d-learn
The following code works: ``` import std.stdio:writefln; import object: destroy; import core.memory: GC; import core.stdc.stdlib: malloc,free; import std.typecons; class C { int * pa; int [] a; // Constructor this() {writefln("Called constructor");

Re: How to free memory ater use of "new" to allocate it.

2023-07-16 Thread Alain De Vos via Digitalmars-d-learn
Maybe code above works when you enforce an Garbage-collection-run ? Code below works fine. So you cannot use "new" but must use malloc? ``` import std.stdio:writefln; import object: destroy; import core.memory: GC; import core.stdc.stdlib: malloc,free; void dofun(){ auto pa=cast(int

Print debug data

2023-07-16 Thread Alain De Vos via Digitalmars-d-learn
Is it possible to print runtime memory usage of: -The stack -The heap -The garbage collector ?

Re: How to free memory ater use of "new" to allocate it.

2023-07-16 Thread Alain De Vos via Digitalmars-d-learn
The following program prints two different addresses. Meaning the new allocates memory until the program dies. So the means memory leak by default ? ``` import std.stdio:writefln; import object: destroy; import core.memory: GC; void dofun(){ auto a=new int[1000]; writefln("%12x",);

Re: How to free memory ater use of "new" to allocate it.

2023-07-16 Thread Alain De Vos via Digitalmars-d-learn
Is this ok ? ``` void main(){ int[] i=new int[1]; import object: destroy; destroy(i); import core.memory: GC; GC.free(GC.addrOf(cast(void *)(i.ptr))); } ```

Re: Where I download Digital Mars C Preprocessor sppn.exe?

2023-01-23 Thread Alain De Vos via Digitalmars-d-learn
Mixing D with C or C++ or Python is looking for problems. Better write something in D. And write something in C/C++/Python. And have some form of communication between both.

Re: Tab completion using neovim

2023-01-21 Thread Alain De Vos via Digitalmars-d-learn
``` call dutyl#register#tool('dcd-client','dcd-client') call dutyl#register#tool('dcd-server','dcd-server') call deoplete#custom#option('auto_complete_delay',200) ```

Re: Tab completion using neovim

2023-01-21 Thread Alain De Vos via Digitalmars-d-learn
I managed after some tuning. cat coc-settings.json ``` { "languageserver": { "d": { "command": "/usr/home/x/serve-d/serve-d", "filetypes": ["d"], "trace.server": "on",

Tab completion using neovim

2023-01-21 Thread Alain De Vos via Digitalmars-d-learn
Let's say i write "write" press tab in neovim i want it to guess "writeln". How to configure neovim for this. [ Note "ncm2" lets my neovim crash. But maybe there are alternatives ] [ vscode is not an option as compiling electron takes ages]

Re: Visual D doesn't work, now Visual Studio Code / D doesn't work!!!! ....

2022-10-04 Thread Alain De Vos via Digitalmars-d-learn
why not try neovim.

Re: Is there a way to mark a dub package as linux only?

2022-09-27 Thread Alain De Vos via Digitalmars-d-learn
Don't forget there is also BSD

Re: Poste some interesting vibe.d webpages

2022-09-23 Thread Alain De Vos via Digitalmars-d-learn
Note. How to do authentications & sessions ,is important, but badly described.

Re: Poste some interesting vibe.d webpages

2022-09-22 Thread Alain De Vos via Digitalmars-d-learn
It's possible to remove the "@" annotation & use the default names of functions for the vibe framework, E.g, ``` final class WebChat { // GET / void get() { render!("index.dt", names); } void getEdit(string myid) { int id = myid.to!int; string

plot api

2022-09-14 Thread Alain De Vos via Digitalmars-d-learn
Let's say i want to plot the function f(x)=sin(x)/x. Which API would you advice, in order for me to not re-invent the wheel.

Re: Poste some interesting vibe.d webpages

2022-09-14 Thread Alain De Vos via Digitalmars-d-learn
Although the framework is good. There is no community. Or general acceptance. Which is a pitty. Currently I ask myself how to do "sessions" with vibe.d.

Re: neovim dcd-server error : ncm2_yarp dcd-server didn't cache any symbols ! Double check dcd include paths -I flag!

2022-09-10 Thread Alain De Vos via Digitalmars-d-learn
I seem to have found a solution. Before starting neovim i do a, dcd-server -I/usr/lib/ldc2/1.29/include/d Automatic would be better.

neovim dcd-server error : ncm2_yarp dcd-server didn't cache any symbols ! Double check dcd include paths -I flag!

2022-09-10 Thread Alain De Vos via Digitalmars-d-learn
I try neovim editor with the language server DCD but it seems no symbols our found. Could you guide me to solution ?

Poste some interesting vibe.d webpages

2022-09-09 Thread Alain De Vos via Digitalmars-d-learn
I find documentation of vibe.d between worse and bad, while the framework is relative OK. There are a few good links on the internet. I post two of them. Feel free to add other web links in order to increase our knowledge. https://vibed.org/blog/posts/a-scalable-chat-room-service-in-d

Re: freebsd dub linker error

2022-09-01 Thread Alain De Vos via Digitalmars-d-learn
On Wednesday, 1 June 2022 at 15:23:14 UTC, Kagamin wrote: Try to run clang with -v option and compare with gcc. I've tracked down the problem to the solution where i specify as linker to use gcc12 instead of a clang/llvm. The following works. ``` export CC=clang14 ldc2

Re: Choosing the correct compiler version

2022-08-03 Thread Alain De Vos via Digitalmars-d-learn
I don't know if this helps but i have to do, export CC=/usr/local/bin/gcc with ldc2. I don't know why it works with gcc but not with llvm/clang.

Re: How to map machine instctions in memory and execute them? (Aka, how to create a loader)

2022-06-06 Thread Alain De Vos via Digitalmars-d-learn
Note , it is also possible to do inline assembly with asm{...} or __asm(T) {..}.

Re: Copy Constructor

2022-06-05 Thread Alain De Vos via Digitalmars-d-learn
Could it be the copy constructor is only called during assignments (like C++). And for one, two there is an explicit assignment. But not for three where there is a conversion ?

Re: Copy Constructor

2022-06-05 Thread Alain De Vos via Digitalmars-d-learn
I don't know the answer. But some questions come to my mind. Does Foo(3) lives on the stack or the heap ? There is also no assignment from Foo to Foo for Foo(3), there is a conversion. And what happes with Foo[3] arr = [one, two, Foo(3)]; Foo[] arr= [one, two, Foo(3)]; and Foo x=Foo(3).dup()

Re: D for data science and statistics

2022-06-04 Thread Alain De Vos via Digitalmars-d-learn
As i personally did not used Windows the last 5 years, i use as editor for any language: neovim-qt. Someone else might answer about good Windows editors. As for the other questions google "awesome dlang" will return interesting results. I consider Dlang general purpose as opposed to specialized

Re: dlang compilers & licenses.

2022-06-04 Thread Alain De Vos via Digitalmars-d-learn
Nice , a lot of freedom with dmd & ldc.

Re: What happened to Deimos and why ?

2022-06-04 Thread Alain De Vos via Digitalmars-d-learn
How come i don't see commit activity on github ?. The code is perfect or not maintained ?

dlang compilers & licenses.

2022-06-04 Thread Alain De Vos via Digitalmars-d-learn
Do DMD , GDC , LDC have the same or different licenses in use ?

What happened to Deimos and why ?

2022-06-04 Thread Alain De Vos via Digitalmars-d-learn
What happened to Deimos and why ?

Re: freebsd dub linker error

2022-06-01 Thread Alain De Vos via Digitalmars-d-learn
The detailed error is : ``` /usr/bin/clang test.o -o test -L/usr/local/lib -lphobos2-ldc -ldruntime-ldc -Wl,--gc-sections -lexecinfo -lpthread -lm -m64 ld: error: undefined hidden symbol: __start___minfo referenced by test.d test.o:(ldc.register_dso) ```

Re: freebsd dub linker error

2022-06-01 Thread Alain De Vos via Digitalmars-d-learn
Performed additional tests. Compiling helloworld.d ``` export CC=gcc11 ; ldc2 helloworld.d ``` works fine. Compiling helloworld.d ``` export CC=clang ; ldc2 helloworld.d ``` returns: ``` d: error: undefined hidden symbol: __start___minfo referenced by test.d

Re: Cannot check function address

2022-05-24 Thread Alain De Vos via Digitalmars-d-learn
Just looking at the error, are 2.098.1 & 2.100 , 100% compatible ?

Re: Install DCD language server on Raspberrry PI4 (aarch64) requires rdmd , command not found.

2022-05-21 Thread Alain De Vos via Digitalmars-d-learn
Maybe i need to install additional phobos libraries ?

Re: Install DCD language server on Raspberrry PI4 (aarch64) requires rdmd , command not found.

2022-05-21 Thread Alain De Vos via Digitalmars-d-learn
Thanks. rdmd.d compiled fine with ldc2. But DCD did not build dub build --build=release --config=client produced the error: msgpack-d-1.0.1 value.d error undefined identifier JSONType

Install DCD language server on Raspberrry PI4 (aarch64) requires rdmd , command not found.

2022-05-21 Thread Alain De Vos via Digitalmars-d-learn
I want to install the DCD language server on Raspberry PI4. But the dub build for DCD requires rdmd which is not available. Can I compile rdmd from source ? Or install a binary ? [PS: I have ldc 1:1.24.0-2 installed ]

Re: Sleep in a cycle

2022-05-21 Thread Alain De Vos via Digitalmars-d-learn
Or you could capture a sigint and close the file then.

Re: Installing DMD on linux via snap

2022-05-18 Thread Alain De Vos via Digitalmars-d-learn
You could try on linux, apt-cache search dmd apt-cache search ldc apt-cache search ldc2

Re: Language server

2022-05-17 Thread Alain De Vos via Digitalmars-d-learn
I tried neovim editor & serve-d and failed. I tried kate editor & serve-d and failed. https://github.com/Pure-D/serve-d Anyone has a clue ?

Re: freebsd dub linker error

2022-05-16 Thread Alain De Vos via Digitalmars-d-learn
Bugs in the clang/llvm toolchain but not in the gcc toolchain ?

Re: freebsd dub linker error

2022-05-16 Thread Alain De Vos via Digitalmars-d-learn
The following worked , and i don't know what is going on: ``` ldc2 --gcc=gcc11 ```

Question on shapes

2022-05-16 Thread Alain De Vos via Digitalmars-d-learn
Let's say a shape is ,a circle with a radius ,or a square with a rectangular size. I want to pass shapes to functions, eg to draw them on the screen, draw(myshape) or myshape.draw(); But how do i implement best shapes ?

Re: freebsd dub linker error

2022-05-16 Thread Alain De Vos via Digitalmars-d-learn
The problem re-appeared and i have totally no idea what caused it. ldc2 test.d ld: error: undefined hidden symbol: __start___minfo referenced by test.d test.o:(ldc.register_dso) ld: error: undefined hidden symbol: __stop___minfo referenced by test.d

Re: Why are structs and classes so different?

2022-05-16 Thread Alain De Vos via Digitalmars-d-learn
A new syntax like "*" should introduce something new. If it's not needed for classes why introduce it. If you don't know if something is a class name it class_blabla. Just remember the effect of "="

Re: Why are structs and classes so different?

2022-05-15 Thread Alain De Vos via Digitalmars-d-learn
Can i summarize , structs are value-objects which live on the stack. class instances are reference objects which live on the heap.

Re: Language server

2022-05-13 Thread Alain De Vos via Digitalmars-d-learn
I have now a language server running for dlang and ocaml on the neovim editor. I'll post here the config init.vim for someone who might be interested. ``` call plug#begin() Plug 'https://github.com/vim-airline/vim-airline.git' Plug 'https://github.com/preservim/nerdtree.git' Plug

Exercises

2022-05-12 Thread Alain De Vos via Digitalmars-d-learn
Is there a link to a webpage with some dlang exercises in order to see if i master the language, from simple to diffucult ?

Re: What are (were) the most difficult parts of D?

2022-05-12 Thread Alain De Vos via Digitalmars-d-learn
Some keywords are overloaded and have different meaning when used in a different place. Also some syntactic-sugar is way to much meaning too many different ways to do the same thing. I would prefer one way which is advised.

Re: How to use destroy and free.

2022-05-03 Thread Alain De Vos via Digitalmars-d-learn
Note, It's not i'm against GC. But my preference is to use builtin types and libraries if possible, But at the same time be able to be sure memory is given free when a variable is going out of scope. It seems not easy to combine the two with a GC which does his best effort but as he likes or

Re: How to use destroy and free.

2022-05-03 Thread Alain De Vos via Digitalmars-d-learn
Error: array literal in @nogc function test.myfun may cause a GC allocation @nogc void myfun(){ scope int[] i=[1,2,3]; }//myfun May is a fuzzy word...

Re: Language server

2022-04-27 Thread Alain De Vos via Digitalmars-d-learn
I have not tested yet but i found two interesting links, https://github.com/Pure-D/serve-d/blob/master/editor-vim.md https://github.com/neoclide/coc.nvim

Language server

2022-04-26 Thread Alain De Vos via Digitalmars-d-learn
In a perfect world there would be someone uploading a youtube video how to implement neovim with a dlang language-server. With function-completions-help where hints are given about the functions and libraries. If anyone could do this , this would be nice to have.

Re: Problem with GC - linking C++ & D (with gdc)

2022-04-26 Thread Alain De Vos via Digitalmars-d-learn
PS : I use ``` ldc2 --gcc=cc , cc -v : clang version 11.0.1 ```

Reference counting example

2022-04-26 Thread Alain De Vos via Digitalmars-d-learn
Can someone provide a simple/very simple reference counting or refcounted example i can understand. Thanks.

Re: How to use destroy and free.

2022-04-26 Thread Alain De Vos via Digitalmars-d-learn
On Monday, 25 April 2022 at 14:25:17 UTC, H. S. Teoh wrote: On Mon, Apr 25, 2022 at 01:28:01PM +, Alain De Vos via Digitalmars-d-learn wrote: Could thc or hboehm provide solutions ? In general, GC (of any kind) does not (and cannot) guarantee the order objects will be collected in. So

Re: Linked list, printing looks destructive.

2022-04-25 Thread Alain De Vos via Digitalmars-d-learn
Indeed code below works, ``` import std.stdio: write,writeln; class Node { int data; Node next; } class List { Node node=null; this(int[] AR){foreach(i ; AR)pushfront(i);} void pushfront(int data) { Node newnode=new Node();

Re: Assigning to array of structs with custom constructor

2022-04-25 Thread Alain De Vos via Digitalmars-d-learn
Not really an answer but this works, ``` struct Foo { string s; this(string s) { this.s = s; } } void main(){ Foo foo = "a"; Foo[] foos; foos ~=foo; }% ```

Re: How to use destroy and free.

2022-04-25 Thread Alain De Vos via Digitalmars-d-learn
Could thc or hboehm provide solutions ?

Re: How to use destroy and free.

2022-04-25 Thread Alain De Vos via Digitalmars-d-learn
GC-allocated objects are run (when they are run). If you need deterministic destruction e.g. for resource management, do not use GC. Descend destroy and free functions should return something. "destroy" should return if the destructor was called successfully. "free" should return the exact

Re: How to use destroy and free.

2022-04-25 Thread Alain De Vos via Digitalmars-d-learn
Note, heap object i is not an instance of the class C

Re: How to use destroy and free.

2022-04-25 Thread Alain De Vos via Digitalmars-d-learn
Ali, thanks for the answer but i rephrase my question. How to destroy,free , for garbage-collection-cycle in the destructor of this code : ``` import std.stdio: writeln; class C{ int[] i=null; this(){ writeln("Allocate heap"); i=new int[1];

Re: Linked list, printing looks destructive.

2022-04-25 Thread Alain De Vos via Digitalmars-d-learn
This program works ok, (but List is no Range) ``` class Node { int data; Node next; } class List { Node node=null; this(int[] AR){foreach(i ; AR)pushfront(i);} bool empty() const {return !node;} void popFront() {node=node.next;} float

Re: Linked list, printing looks destructive.

2022-04-25 Thread Alain De Vos via Digitalmars-d-learn
On Monday, 25 April 2022 at 05:17:28 UTC, Salih Dincer wrote: On Monday, 25 April 2022 at 02:19:46 UTC, Ali Çehreli wrote: This type violates a fundamental rule: Containers and ranges are separate concepts. Your List is a container, not a range. I changed your code by moving the range

Re: Create a wrapper around larger c-libraries

2022-04-24 Thread Alain De Vos via Digitalmars-d-learn
``` void main(){dprintme("Hello\n");} } ```

Create a wrapper around larger c-libraries

2022-04-24 Thread Alain De Vos via Digitalmars-d-learn
I'm currenlty experimenting about binding to C. I have : C-library: mylib.h: ``` void libprintme(char *s); ``` mylib.c: ``` #include #include "mylib.h" void libprintme(char *s){printf("%s",s);} ``` main.d: ``` extern(C) @nogc nothrow { void libprintme(char *s); alias pprintme=void

Re: Variables & kind of memory

2022-04-23 Thread Alain De Vos via Digitalmars-d-learn
On Saturday, 23 April 2022 at 10:46:42 UTC, Stanislav Blinov wrote: On Saturday, 23 April 2022 at 03:41:17 UTC, Alain De Vos wrote: Feel free to elaborate. Variables declared at module scope, and static variables in function/aggregate scopes, unless also annotated as `shared` or

Re: Variables & kind of memory

2022-04-22 Thread Alain De Vos via Digitalmars-d-learn
On Saturday, 23 April 2022 at 04:52:39 UTC, Alain De Vos wrote: On Saturday, 23 April 2022 at 03:41:17 UTC, Alain De Vos wrote: I wrote a simple test program: ``` import std.stdio:writefln; [...] BBB: is probably the data-segment. Remains AAA ? Could AAA be the bss-segment ?

Re: Variables & kind of memory

2022-04-22 Thread Alain De Vos via Digitalmars-d-learn
On Saturday, 23 April 2022 at 03:41:17 UTC, Alain De Vos wrote: I wrote a simple test program: ``` import std.stdio:writefln; [...] BBB: is probably the data-segment. Remains AAA ?

Variables & kind of memory

2022-04-22 Thread Alain De Vos via Digitalmars-d-learn
I wrote a simple test program: ``` import std.stdio:writefln; int [] GLV=[1,2]; int [2] GLF=[1,2]; static int [] GSLV=[1,2]; static int [2] GSLF=[1,2]; void main(){ writefln("-"); writefln("GLV:address :%12x:AAA",); writefln("GLF:address :%12x:AAA",);

What is the difference between a static assert and a unit test?

2022-04-21 Thread Alain De Vos via Digitalmars-d-learn
I don't know when to use a static assert and when to use a unit test ?

Re: stack frame & dangling pointer weirdness

2022-04-21 Thread Alain De Vos via Digitalmars-d-learn
On Thursday, 21 April 2022 at 06:57:41 UTC, drug wrote: On 21.04.2022 08:49, Alain De Vos wrote: Following program: ``` import std.stdio; void main() @trusted { int *p=null; void myfun(){ int x=2; p= writeln(p); writeln(x); } myfun(); *p=16; writeln(p); writeln(*p); } ```

stack frame & dangling pointer weirdness

2022-04-20 Thread Alain De Vos via Digitalmars-d-learn
Following program: ``` import std.stdio; void main() @trusted { int *p=null; void myfun(){ int x=2; p= writeln(p); writeln(x); } myfun(); *p=16; writeln(p); writeln(*p); } ``` outputs : 7FFFDFAC 2 7FFFDFAC 32767 I don't understand why. Would it be

Re: Infinite fibonacci sequence, lazy take first 42 values

2022-04-20 Thread Alain De Vos via Digitalmars-d-learn
On Thursday, 21 April 2022 at 04:36:13 UTC, Salih Dincer wrote: On Thursday, 21 April 2022 at 03:41:24 UTC, Ali Çehreli wrote: On 4/20/22 19:11, Alain De Vos wrote: > Maybe there are multiple solutions ? Indeed. :) I have a Range struct here:

Infinite fibonacci sequence, lazy take first 42 values

2022-04-20 Thread Alain De Vos via Digitalmars-d-learn
Following java program creates an infinite fibonacci sequence (stream) an takes the first 42 values of it. import java.util.function.UnaryOperator; import java.util.stream.IntStream; import java.util.stream.Stream; public class test3 { public static void main(String[] args) { int

Re: ldc2 error , Error: declaration . . is already defined

2022-04-20 Thread Alain De Vos via Digitalmars-d-learn
On Wednesday, 20 April 2022 at 18:04:13 UTC, Alain De Vos wrote: When compiling a .d file i don't see line numbers on which the error occurs which is quite annoying. The line i use to compile is : ldc2 --gcc=cc --vcolumns --oq --dip1000 --dip25 --safe-stack-layout --boundscheck=on --D --g --w

ldc2 error , Error: declaration . . is already defined

2022-04-20 Thread Alain De Vos via Digitalmars-d-learn
When compiling a .d file i don't see line numbers on which the error occurs which is quite annoying. The line i use to compile is : ldc2 --gcc=cc --vcolumns --oq --dip1000 --dip25 --safe-stack-layout --boundscheck=on --D --g --w --de --d-debug `find . -name \*.d -print` Even: lcd2 test.d

I like dlang but i don't like dub

2022-03-17 Thread Alain De Vos via Digitalmars-d-learn
Dlang includes some good ideas. But dub pulls in so much stuff. Too much for me. I like things which are clean,lean,little,small. But when i use dub it links with so many libraries. Are they really needed ? And how do you compare to pythons pip. Feel free to elaborate.

freebsd dub linker error

2022-03-17 Thread Alain De Vos via Digitalmars-d-learn
I disabled 32bit code maybe this created the following error while building dub : [00:02:18] === [00:02:18] ===> [00:02:18] ===> Configuring for dub-1.14.0 [00:02:23]

what i don't like about dub

2021-11-22 Thread Alain De Vos via Digitalmars-d-learn
What i don't like about dub is that is does not check which software is installed on the host. Currentlu tck86 is installed on the host including header files & shared libraries. But dub says let me just download my own personal version and i will compile it in your home directory

Re: Two major problems with dub

2021-08-01 Thread Alain De Vos via Digitalmars-d-learn
A simple example, dub package dpq2 pulls in, money,vide-d,stdx-allocator,derelict-pq,derelict-util This all for a handfull of C-functions.

Re: Two major problems with dub

2021-08-01 Thread Alain De Vos via Digitalmars-d-learn
A simple and small wrapper around for instance the C-library libpq should be part of the language itself and should not pull in more than libpq itself.

Re: Two major problems with dub

2021-08-01 Thread Alain De Vos via Digitalmars-d-learn
Is there a security review for dub packages ?

Two major problems with dub

2021-08-01 Thread Alain De Vos via Digitalmars-d-learn
Dub has two big problems. 1. Unmaintained dub stuff. 2. Let's say you need bindings to postgresql library and you will see dub pulling in numerous of libraries, which have nothing at all to do with postgresql. More like a framework stuff. This creates unneeded complexity, bloatware, dependency

Re: Manipulate and parse jasonb object in timescaledb(postgresql)

2021-07-14 Thread Alain De Vos via Digitalmars-d-learn
As an example i show this. https://docs.python.org/3/library/json.html But that is more what i look for.

Re: Manipulate and parse jasonb object in timescaledb(postgresql)

2021-07-14 Thread Alain De Vos via Digitalmars-d-learn
With good select operators i can extract the data i need for instance: select measurement->'room.temperature' from mytable; Now how to process that further as json object ? or jsonb object in dlang ?

Manipulate and parse jasonb object in timescaledb(postgresql)

2021-07-14 Thread Alain De Vos via Digitalmars-d-learn
When I read a record out of the database I receive a jsonb datatatype as a string. How do I convert this string into a json object and parse and manipulate it?

Re: How to execute a random postgresql-query.

2021-06-29 Thread Alain De Vos via Digitalmars-d-learn
On Tuesday, 29 June 2021 at 20:27:15 UTC, Alain De Vos wrote: On Tuesday, 29 June 2021 at 18:25:52 UTC, someone wrote: On Tuesday, 29 June 2021 at 17:56:54 UTC, neuranuz wrote: You could also try to find some ready to use bindings to PostgreSQL on code.dlang.org. Can you elaborate why you

Re: How to execute a random postgresql-query.

2021-06-29 Thread Alain De Vos via Digitalmars-d-learn
On Tuesday, 29 June 2021 at 18:25:52 UTC, someone wrote: On Tuesday, 29 June 2021 at 17:56:54 UTC, neuranuz wrote: You could also try to find some ready to use bindings to PostgreSQL on code.dlang.org. Can you elaborate why you went your own way coding your own bindings to pglib instead of

How to execute a random postgresql-query.

2021-06-28 Thread Alain De Vos via Digitalmars-d-learn
How to execute a random postgresql-query ? With random i mean execute any string as known by postgresql. void myexecutefunction(string string_to_execute){ // Some code to Execute postgre-sq-string } ... void main(){ myexecutefunction("CREATE DATABASE test"); myexecutefunction("CREATE USER

Re: Flaoting point operations : unexpected results

2021-06-10 Thread Alain De Vos via Digitalmars-d-learn
Normally computers are deterministic and same input produces same output. There is however theory on neural network stability and it can be tuned.

Re: How to cross build a RISC-V target betterC code using LDC on x86-64 machine

2021-06-06 Thread Alain De Vos via Digitalmars-d-learn
I see the same error.

Re: How to compile Phobos with other D code to create a shared library?

2021-06-04 Thread Alain De Vos via Digitalmars-d-learn
Dub is probably not much of a help :)

Re: cloning array

2021-06-03 Thread Alain De Vos via Digitalmars-d-learn
``` import std.stdio; void main(){ auto a=new int[][] (0,0); a~=[1,2]; a~=[3,4]; auto b= a.dup; a[0]=[5,6]; a[1][1]=7; writeln(b); } ``` Program above outputs [[1, 2], [3, 7]] Which means a[1][1] and b[1][1] point to the same memory location. But a[0] occupies a different memory location as

Re: wanting to try a GUI toolkit: needing some advice on which one to choose

2021-05-29 Thread Alain De Vos via Digitalmars-d-learn
One additional toolkit, fltk, https://www.fltk.org/

Re: ChromeOS and DLang

2021-05-27 Thread Alain De Vos via Digitalmars-d-learn
If you have a compiler you can go.

  1   2   3   >