Re: D package for optimizing/compressing images

2017-01-31 Thread aberba via Digitalmars-d-learn
On Friday, 27 January 2017 at 11:03:15 UTC, aberba wrote: Are there any dub package for compressing images uploaded through web forms? Cropping/resizing may also come in handy. I want one for a vibe.d project. dlib-webp[1] is almost what I've been looking for. In fact, webp is a complete

Re: Can't find the reason of issue: "std.file.FileException@std\file.d(360): path/to/file.conf:"

2017-02-01 Thread aberba via Digitalmars-d-learn
On Wednesday, 1 February 2017 at 11:55:20 UTC, Suliman wrote: On Wednesday, 1 February 2017 at 11:39:46 UTC, Suliman wrote: [...] Yeah, it was issue in dini 2. dini 1 work fine. Is std.file not blocking (when used in vibe.d)?

Does vibe.d support setting cookies?

2017-02-01 Thread aberba via Digitalmars-d-learn
I can't find it. Like set_cookie() in php.

Re: Is there anything fundamentally wrong with this code?

2017-02-04 Thread aberba via Digitalmars-d-learn
On Friday, 3 February 2017 at 22:34:31 UTC, Ali Çehreli wrote: On 02/03/2017 11:43 AM, WhatMeWorry wrote: On Friday, 3 February 2017 at 18:37:15 UTC, Johan Engelen wrote: On Friday, 3 February 2017 at 17:20:43 UTC, WhatMeWorry wrote: [...] ... Another related one is assigning to a

Re: The reason of vibed slow down (request timeout)

2017-02-03 Thread aberba via Digitalmars-d-learn
On Friday, 3 February 2017 at 06:46:37 UTC, Suliman wrote: If I open it's from VPS (as localhost:8080) it's work same as from Internet (no do not open at all). One this I may suggest is the port if its used already (8080). Try to use; import std.process: environment; settings.port =

Confirming and uninstantiated struct

2017-01-23 Thread aberba via Digitalmars-d-learn
How do I verify this struct has no value Student getStudent() { ... Student s; if(condition) s = Student; return s; } auto stu = getStudent(); //which will work and is best? if (stu is null) //doesn't wrk. if (stu is Student.init) //will confirm when i get to my pc Or how

Multiple return type or callback function

2017-01-23 Thread aberba via Digitalmars-d-learn
I'm creating a function to authenticate user login. I want to determine login failure (Boolean) and error message (will be sent to frontend) but D does have multiple return type (IMO could use struct but will make code dirty with too much custom types). struct Result { bool success =

Re: Compile to C?

2017-01-23 Thread aberba via Digitalmars-d-learn
On Monday, 23 January 2017 at 14:40:18 UTC, Ola Fosheim Grøstad wrote: On Saturday, 21 January 2017 at 19:30:31 UTC, Jack Stouffer wrote: On Saturday, 21 January 2017 at 18:38:22 UTC, Nestor wrote: Hi friends, Is there a way to "compile" d code to C, similar to what nim does? That would be

Re: D package for optimizing/compressing images

2017-01-28 Thread aberba via Digitalmars-d-learn
On Friday, 27 January 2017 at 11:03:15 UTC, aberba wrote: Are there any dub package for compressing images uploaded through web forms? Cropping/resizing may also come in handy. I want one for a vibe.d project. Currently, there are RIP and Daffodil dor image related operations. I think

Re: D package for optimizing/compressing images

2017-01-28 Thread aberba via Digitalmars-d-learn
On Friday, 27 January 2017 at 11:03:15 UTC, aberba wrote: Are there any dub package for compressing images uploaded through web forms? Cropping/resizing may also come in handy. I want one for a vibe.d project. I read Flickr and others use GraphicsMagick but here again heroku doesn't help.

Re: D package for optimizing/compressing images

2017-01-27 Thread aberba via Digitalmars-d-learn
On Friday, 27 January 2017 at 19:14:19 UTC, Jesse Phillips wrote: On Friday, 27 January 2017 at 11:03:15 UTC, aberba wrote: Are there any dub package for compressing images uploaded through web forms? Cropping/resizing may also come in handy. I want one for a vibe.d project. I don't know of

D package for optimizing/compressing images

2017-01-27 Thread aberba via Digitalmars-d-learn
Are there any dub package for compressing images uploaded through web forms? Cropping/resizing may also come in handy. I want one for a vibe.d project.

Vibe.d: Listening to port 8080 on external device doesn't work

2017-02-21 Thread aberba via Digitalmars-d-learn
Using vibe.d, I bind to port 8080 at 127.0.0.1 but I can't access server on my phone through hotspot using the external IP from ip addr on Linux. But 127.0.0 running Apache server works. Don't if its vibe.d or OS (ubuntu 14.04) How do I reached my vibe.d server in this case on my phone?

Re: How to get the type of a derived class in a method of its base class?

2017-02-19 Thread aberba via Digitalmars-d-learn
On Sunday, 19 February 2017 at 07:52:13 UTC, Max Samukha wrote: class B { } auto b = new B; Here, T becomes A, which may be reasonable but is completely useless. Is there a way to obtain the type of the class (or class instance reference) the method is called on? is B not supposed to

Re: JustQuestion: Are 'D' had a browser library?

2017-02-19 Thread aberba via Digitalmars-d-learn
On Sunday, 19 February 2017 at 08:01:56 UTC, dummy wrote: Hello! I need are functions for clawing... 1. Working javascript(curl didn't) 2. Get HTML code 3. GET/POST Request So, I'm searched about the headless browser for using with D before writing a this question. * Derelict-CEF Looks

Re: Vibe.d: Listening to port 8080 on external device doesn't work

2017-02-22 Thread aberba via Digitalmars-d-learn
On Wednesday, 22 February 2017 at 00:53:53 UTC, krzaq wrote: On Wednesday, 22 February 2017 at 00:38:30 UTC, aberba wrote: Using vibe.d, I bind to port 8080 at 127.0.0.1 but I can't access server on my phone through hotspot using the external IP from ip addr on Linux. But 127.0.0 running

Re: Checking, whether string contains only ascii.

2017-02-22 Thread aberba via Digitalmars-d-learn
On Wednesday, 22 February 2017 at 20:01:57 UTC, Adam D. Ruppe wrote: On Wednesday, 22 February 2017 at 19:26:15 UTC, berni wrote: herefore I'd like to make sure that the string the program read is only made up of ascii characters. Easiest: foreach(char ch; postscript) if(ch > 127) throw

Re: Getting a segfault here, why?

2017-02-16 Thread aberba via Digitalmars-d-learn
On Wednesday, 15 February 2017 at 18:22:53 UTC, Adam D. Ruppe wrote: On Wednesday, 15 February 2017 at 18:19:18 UTC, aberba wrote: Trying to find it but working with a debugger in D is not straight forward. Not yo talk of interpretating the debugger output. On linux it is pretty easy. Just

Getting a segfault here, why?

2017-02-15 Thread aberba via Digitalmars-d-learn
I'm getting a segmentation fault in vibe.d web interface class. Does referring "this" in an "if" or "switch" within a method cause segfault? Trying to find it but working with a debugger in D is not straight forward. Not yo talk of interpretating the debugger output. How has things

Phobos: Determining number of hours or minutes or seconds till now

2017-01-19 Thread aberba via Digitalmars-d-learn
Using the standard library, how do a get number of hours or seconds or minutes or days or months or years till current time from a past timestamp (like "2 mins ago")? Not with manual calculations but from Phobos functions.

Re: Phobos: Determining number of hours or minutes or seconds till now

2017-01-20 Thread aberba via Digitalmars-d-learn
On Friday, 20 January 2017 at 03:48:14 UTC, rikki cattermole wrote: On 20/01/2017 9:29 AM, Rene Zwanenburg wrote: On Thursday, 19 January 2017 at 14:04:36 UTC, aberba wrote: Using the standard library, how do a get number of hours or seconds or minutes or days or months or years till current

Hosting vibe.d on OpenShift

2016-12-08 Thread aberba via Digitalmars-d-learn
I would like to try vibe.d with mongoDB on OpenShit. I managed to do that on Heroku. Do I need a buildpack like vibe.d? Any help will be really appreciated.

Re: Separate IP parts

2016-12-10 Thread aberba via Digitalmars-d-learn
On Saturday, 10 December 2016 at 13:25:13 UTC, Nicholas Wilson wrote: On Saturday, 10 December 2016 at 13:21:40 UTC, notna wrote: On Saturday, 10 December 2016 at 08:03:00 UTC, biozic wrote: [...] Well, you know, that's one of the not so great things about Dlang... you cannot even trust

Re: Hosting vibe.d on OpenShift

2016-12-10 Thread aberba via Digitalmars-d-learn
On Thursday, 8 December 2016 at 20:37:23 UTC, Tiberiu Gal wrote: On Thursday, 8 December 2016 at 14:03:35 UTC, aberba wrote: I would like to try vibe.d with mongoDB on OpenShit. I managed to do that on Heroku. Do I need a buildpack like vibe.d? Any help will be really appreciated. I've

Issue with dmd, linker, visualD on windows 10

2016-12-14 Thread aberba via Digitalmars-d-learn
I am trying to get a fellow to try D but just setting up on windows 10 has been headache. He's currently remote. Here's the problem. (Note I'm a Linux user and haven't used windows 10) 1. He installed dmd 2 but the command "dmd" is not recognized. He confirmed and c:\D\dmd2\windows\bin is in

Re: Sanitizing forms in vibe.d. How?

2016-12-12 Thread aberba via Digitalmars-d-learn
On Monday, 12 December 2016 at 00:42:54 UTC, Nicholas Wilson wrote: On Sunday, 11 December 2016 at 18:30:54 UTC, aberba wrote: You can enforce that the string that you receive is an email address with `isEmail` from `std.net.isemail` Nice. What sql library are you using? there is probably

Re: [Semi-OT] I don't want to leave this language!

2016-12-07 Thread aberba via Digitalmars-d-learn
On Monday, 5 December 2016 at 17:18:25 UTC, e-y-e wrote: Currently I have been learning D for about a year and a half. This may seem like a short time, but this is the longest I have stuck with any language. I have only been learning for 4 years and I am currently in university studying first

Re: Issue with dmd, linker, visualD on windows 10

2016-12-14 Thread aberba via Digitalmars-d-learn
On Wednesday, 14 December 2016 at 12:06:01 UTC, rumbu wrote: On Wednesday, 14 December 2016 at 11:06:10 UTC, aberba wrote: [...] If he runs the command in an already open console window, that's normal. A new console window launch will be enough to know about the recent environment path

Sanitizing forms in vibe.d. How?

2016-12-11 Thread aberba via Digitalmars-d-learn
In php, I use built-in functions like filter_var(FILTER_VALIDATE_EMAIL, $email). There are other constants for different data types. Again, there is mysqli_real_escape_string() for escaping SQL injection/harmful characters. What are my options in vibe.d or even D?

Re: Merging two arrays in a uniform order

2017-01-13 Thread aberba via Digitalmars-d-learn
On Friday, 13 January 2017 at 12:00:41 UTC, ZombineDev wrote: On Friday, 13 January 2017 at 06:32:02 UTC, aberba wrote: Unlike array1 + array2, how can i merge arrays such that: [a1, a1, a2, a1, a1, a2, a1] //uniform order where a1 = child of array1, a2 = child of array2 using a built-in

Merging two arrays in a uniform order

2017-01-12 Thread aberba via Digitalmars-d-learn
Unlike array1 + array2, how can i merge arrays such that: [a1, a1, a2, a1, a1, a2, a1] //uniform order where a1 = child of array1, a2 = child of array2 using a built-in function/algorithm (is/are there anything(s) in Phobos for this?). No manual approach.

Re: Vibe.d: Implementing file upload with WEB interface

2017-01-11 Thread aberba via Digitalmars-d-learn
On Monday, 9 January 2017 at 19:36:18 UTC, aberba wrote: Turns out my question was answered somewhere on vibe.d website For those situations where more control is required, it is possible to simply declare parameters of type HTTPServerRequest or HTTPServerResponse to give a method full

Clustering with vibe.d (session, file storage, caching, db)

2017-01-03 Thread aberba via Digitalmars-d-learn
If you have ever done any clustering with D (vibe.d), what was the challenges you encountered? What was your setup? If you have not but have fair idea in clustering, what setup and tools would you recommend (Amazon web services)? I've been currently thinking about using mysql and mongoDB

Re: Gui programing in D

2016-12-28 Thread aberba via Digitalmars-d-learn
On Tuesday, 27 December 2016 at 12:47:15 UTC, Samson Akomire wrote: I am working with GTKD for GUI Application in D programing language. D programing Language is truly wholesome in all definitions.I have a great difficulty in setting widgets width and height. I will also appreciate any

Vibe.d form file attributes

2016-12-20 Thread aberba via Digitalmars-d-learn
In PHP, I am able to access the name attribute of multiple files submitted through forms at the server side in $_FILES global. For example, a file input with name="picture[]" will allow me to upload multiples files with the same attribute name. This can be access in PHP as; $files =

Re: Vibe.d form file attributes

2016-12-20 Thread aberba via Digitalmars-d-learn
On Tuesday, 20 December 2016 at 18:42:11 UTC, WebFreak001 wrote: On Tuesday, 20 December 2016 at 18:22:51 UTC, aberba wrote: [...] iterate over req.files like this instead: foreach (name, picture; req.files) // name is "picture[]" now { ... } Nice. [...] pragma(msg,

Re: [Semi-OT] I don't want to leave this language!

2016-12-06 Thread aberba via Digitalmars-d-learn
On Tuesday, 6 December 2016 at 22:13:54 UTC, bpr wrote: On Tuesday, 6 December 2016 at 17:00:35 UTC, Jonathan M Davis I would guess that the vast majority of interest shown in Rust is from people who essentially want a better C or C++, with no runtime/GC. So, I think Ilya's point is very

Re: [vibe.d] How to create authentication system via REST interface?

2017-03-15 Thread aberba via Digitalmars-d-learn
On Wednesday, 15 March 2017 at 13:24:07 UTC, NX wrote: I'm trying to understand how to create some json-rest api that would return data (in json format) related to that specific logged in user. I see the documentation covers these but I'm totally new to vibe.d so can't quite figure out putting

Re: Date formatting in D

2017-03-08 Thread aberba via Digitalmars-d-learn
On Wednesday, 8 March 2017 at 15:46:42 UTC, Adam D. Ruppe wrote: On Wednesday, 8 March 2017 at 15:29:11 UTC, aberba wrote: [...] The PHP function is basically just (translated to D): string date(string format, time_t timestamp) { char[256] buffer; auto ret = strftime(buffer.ptr,

Re: Date formatting in D

2017-03-08 Thread aberba via Digitalmars-d-learn
On Tuesday, 7 March 2017 at 20:52:39 UTC, ikod wrote: On Tuesday, 7 March 2017 at 20:29:07 UTC, aberba wrote: I've been trying to figure out an inbuilt functionality in phobos for formatting date. In my use case, I've been trying to format current Unix timestamp to something like "Thu, 08 Mar

Date formatting in D

2017-03-07 Thread aberba via Digitalmars-d-learn
I've been trying to figure out an inbuilt functionality in phobos for formatting date. In my use case, I've been trying to format current Unix timestamp to something like "Thu, 08 Mar 2017 12:00:00 GMT". How do I go by this easily (Currently, long concatenation of strings is what I'm

Re: Date formatting in D

2017-03-07 Thread aberba via Digitalmars-d-learn
On Tuesday, 7 March 2017 at 20:29:07 UTC, aberba wrote: I've been trying to figure out an inbuilt functionality in phobos for formatting date. In my use case, I've been trying to format current Unix timestamp to something like "Thu, 08 Mar 2017 12:00:00 GMT". How do I go by this easily

Re: Recommend: IDE and GUI library

2017-03-01 Thread aberba via Digitalmars-d-learn
On Friday, 24 February 2017 at 22:44:55 UTC, XavierAP wrote: Hi I've looked at wiki.dlang.org/IDEs, and I see that Visual D is linked from dlang.org/download.html. Still I was looking for personal opinions and experiences beyond hard specs, I wonder if one of the IDEs is already dominant at

Re: How to continue after the book?

2017-04-01 Thread aberba via Digitalmars-d-learn
On Tuesday, 28 March 2017 at 07:27:31 UTC, I Lindström wrote: After getting the basics down, how did you continue when learning programming in general? I do have a need for which I've been trying out a few languages and D seems by far the best for me. Should I just start doing that project

Re: Application settings

2017-07-07 Thread aberba via Digitalmars-d-learn
On Friday, 7 July 2017 at 19:40:35 UTC, FoxyBrown wrote: What's the "best" way to do this? I want something I can simply load at startup in a convenient and easy way then save when necessary(possibly be efficient at it, but probably doesn't matter). Simply json an array and save and load it,

Re: Auto-decoding

2017-07-15 Thread aberba via Digitalmars-d-learn
On Saturday, 15 July 2017 at 05:54:32 UTC, ag0aep6g wrote: On 07/15/2017 06:21 AM, bauss wrote: [...] 1) Drop two elements from "Bär". With auto-decoding you get "r", which is nice. Without auto-decoding you get [0xA4, 'r'] where 0xA4 is the second half of the encoding of 'ä'. You have to

Re: How to build GUI-based applications in D ?

2017-08-05 Thread aberba via Digitalmars-d-learn
On Thursday, 3 August 2017 at 10:02:19 UTC, ashit wrote: On Tuesday, 1 August 2017 at 16:12:45 UTC, Dukc wrote: On Tuesday, 1 August 2017 at 15:18:12 UTC, ashit wrote: i couldn't set control's width and height (Button widget) shows error. maybe it works a different way. 1. Try

Re: alloca without runtime?

2017-05-10 Thread aberba via Digitalmars-d-learn
On Thursday, 4 May 2017 at 14:54:58 UTC, 岩倉 澪 wrote: On Thursday, 4 May 2017 at 12:50:02 UTC, Kagamin wrote: You can try ldc and llvm intrinsics http://llvm.org/docs/LangRef.html#alloca-instruction http://llvm.org/docs/LangRef.html#llvm-stacksave-intrinsic Ah, yep! pragma(LDC_alloca) void*

Re: Cheetah: Keeping track of multiple connected clients

2017-05-18 Thread aberba via Digitalmars-d-learn
On Tuesday, 16 May 2017 at 21:56:16 UTC, aberba wrote: On Tuesday, 16 May 2017 at 17:49:07 UTC, bauss wrote: [...] It really awesome the way you responded quickly. About targeting a client, suppose I have clients A, B, and C. Message can be broadcast to all using above solution. But in

Cheetah: Keeping track of multiple connected clients

2017-05-16 Thread aberba via Digitalmars-d-learn
Does anyone know how to keep track of multiple clients in Cheetah socket lib such that one can directly message a client or broadcast to all connected clients. Something like: onMessage(... e) { ... // send to all e.clients.broadcast (message); ...OR... // target a client

Re: Cheetah: Keeping track of multiple connected clients

2017-05-16 Thread aberba via Digitalmars-d-learn
On Tuesday, 16 May 2017 at 21:56:16 UTC, aberba wrote: On Tuesday, 16 May 2017 at 17:49:07 UTC, bauss wrote: [...] It really awesome the way you responded quickly. About targeting a client, suppose I have clients A, B, and C. Message can be broadcast to all using above solution. But in

Re: Productive vibe.d dev environment (IDE, debugger) on Linux?

2017-05-10 Thread aberba via Digitalmars-d-learn
On Wednesday, 3 May 2017 at 17:43:07 UTC, kinke wrote: Hey guys, can anyone recommend a more or less production-ready dev environment for vibe.d on Linux? I'm evaluating vibe.d against Phoenix (Elixir/Erlang) for a new project. Today I gave Visual Studio Code a quick shot (with LDC 1.1.1 and

WebSocket lib

2017-05-21 Thread aberba via Digitalmars-d-learn
Which one would you recommended for working with browser socket client and D-based client (abstracted aoi)?

Re: Is there websocket client implementation for D

2017-05-21 Thread aberba via Digitalmars-d-learn
On Wednesday, 25 March 2015 at 15:46:31 UTC, Adam D. Ruppe wrote: On Wednesday, 25 March 2015 at 07:12:56 UTC, thedeemon wrote: It's for server side, but probably contains stuff you need for client too. Yeah, I've been meaning to write a client for a while but haven't gotten around to it

Re: Code improvement for DNA reverse complement?

2017-05-25 Thread aberba via Digitalmars-d-learn
On Friday, 19 May 2017 at 07:46:13 UTC, Stefan Koch wrote: On Friday, 19 May 2017 at 07:29:44 UTC, biocyberman wrote: I am solving this problem http://rosalind.info/problems/revc/ as an exercise to learn D. This is my solution: https://dpaste.dzfl.pl/8aa667f962b7 Is there some D tricks I can

Re: Cheetah: Keeping track of multiple connected clients

2017-05-16 Thread aberba via Digitalmars-d-learn
On Tuesday, 16 May 2017 at 17:49:07 UTC, bauss wrote: On Tuesday, 16 May 2017 at 16:01:49 UTC, aberba wrote: Does anyone know how to keep track of multiple clients in Cheetah socket lib such that one can directly message a client or broadcast to all connected clients. Something like:

Creating and loading D plugins in D app

2017-06-01 Thread aberba via Digitalmars-d-learn
Want to create and load plugins written in D into a D app at run-time, the kind that can make api calls or extended main app with other functionality. I'm currently interested in it for a vibe.d app. How does these stuff work?

Re: Creating and loading D plugins in D app

2017-06-02 Thread aberba via Digitalmars-d-learn
On Friday, 2 June 2017 at 12:19:48 UTC, Adam D. Ruppe wrote: On Friday, 2 June 2017 at 11:09:05 UTC, aberba wrote: 1. Get shared libs to work in D (the best approach for all D code) I have done very little with this myself but other people have so it is doable. 1. some kind of embeddable

Re: Creating and loading D plugins in D app

2017-06-02 Thread aberba via Digitalmars-d-learn
On Friday, 2 June 2017 at 02:05:23 UTC, Stefan Koch wrote: On Thursday, 1 June 2017 at 23:24:13 UTC, aberba wrote: Want to create and load plugins written in D into a D app at run-time, the kind that can make api calls or extended main app with other functionality. I'm currently interested

Re: Creating and loading D plugins in D app

2017-06-02 Thread aberba via Digitalmars-d-learn
On Friday, 2 June 2017 at 02:05:23 UTC, Stefan Koch wrote: On Thursday, 1 June 2017 at 23:24:13 UTC, aberba wrote: Want to create and load plugins written in D into a D app at run-time, the kind that can make api calls or extended main app with other functionality. I'm currently interested

Re: Creating and loading D plugins in D app

2017-06-02 Thread aberba via Digitalmars-d-learn
On Thursday, 1 June 2017 at 23:24:13 UTC, aberba wrote: Want to create and load plugins written in D into a D app at run-time, the kind that can make api calls or extended main app with other functionality. I'm currently interested in it for a vibe.d app. How does these stuff work? Plugin

Re: Creating and loading D plugins in D app

2017-06-03 Thread aberba via Digitalmars-d-learn
On Friday, 2 June 2017 at 16:36:34 UTC, H. S. Teoh wrote: On Fri, Jun 02, 2017 at 12:19:48PM +, Adam D. Ruppe via Digitalmars-d-learn wrote: On Friday, 2 June 2017 at 11:09:05 UTC, aberba wrote: > 1. Get shared libs to work in D (the best approach for all D > code) I have done very

Re: Creating and loading D plugins in D app

2017-06-03 Thread aberba via Digitalmars-d-learn
On Friday, 2 June 2017 at 16:36:34 UTC, H. S. Teoh wrote: On Fri, Jun 02, 2017 at 12:19:48PM +, Adam D. Ruppe via Digitalmars-d-learn wrote: [...] [...] This is not directly related to the OP's question, but recently I wrote a program that, given a user-specified string, transforms it

Re: Web servers in D

2017-09-12 Thread aberba via Digitalmars-d-learn
On Friday, 25 August 2017 at 05:25:09 UTC, Hasen Judy wrote: What libraries are people using to run webservers other than vibe.d? Don't get me wrong I like the async-io aspect of vibe.d but I don't like the weird template language and the fact that it caters to mongo crowd. I think for D

How and what do you use for server to server (secure, fast) communication?

2017-09-12 Thread aberba via Digitalmars-d-learn
I'm planning to use in a stateless microservices setup.

Re: Day of week from date

2017-09-29 Thread aberba via Digitalmars-d-learn
On Friday, 29 September 2017 at 03:42:18 UTC, Jonathan M Davis wrote: On Friday, September 29, 2017 04:32:44 rikki cattermole via Digitalmars-d- learn wrote: On 29/09/2017 4:25 AM, Joel wrote: > With a given date, I want to know what day it is (like > Sunday, Monday, > etc). > > I had a look

Decimal handling for currency (precision)

2017-11-23 Thread aberba via Digitalmars-d-learn
Some suggest working with the lowest currency denomination to avoid decimal precision handling and only convert to the highest denominations (decimal) when displaying. I've also seen some use decimal value handling libraries. I'm thinking lowest denominations will result in extremely large

Re: What's the purpose of the 'in' keyword ?

2018-05-30 Thread aberba via Digitalmars-d-learn
On Sunday, 27 May 2018 at 16:00:15 UTC, Jonathan M Davis wrote: On Sunday, May 27, 2018 16:28:56 Russel Winder via Digitalmars-d-learn wrote: On Sun, 2018-05-27 at 13:10 +, Adam D. Ruppe via Digitalmars-d-learn - Jonathan M Davis Jonathan, which font were you using in your DConf

Constructing text with astericks

2018-05-30 Thread aberba via Digitalmars-d-learn
I've been given a challenge to write texts using asterisks to form the letters. D happen to have an unlimited amount of idioms yet i'm out out ideas as to the simplest approach. Task is to basically take a piece of text and write them as asterisks to the console. * * * * * *

Re: Constructing text with astericks

2018-05-31 Thread aberba via Digitalmars-d-learn
On Wednesday, 30 May 2018 at 23:11:06 UTC, Adam D. Ruppe wrote: On Wednesday, 30 May 2018 at 22:57:06 UTC, aberba wrote: How will you approach this problem in D idiomatically? Well, I never bother with "idiomatically", so I can't speak to that, but a simple solution that would work is to

Re: How to proceed with learning to code Windows desktop applications?

2018-01-30 Thread aberba via Digitalmars-d-learn
On Tuesday, 30 January 2018 at 18:41:57 UTC, I Lindström wrote: On Tuesday, 30 January 2018 at 05:56:51 UTC, DanielG wrote: There are far too many options for Windows GUI programming, so we probably need a bit more information about any constraints that are important to you. For example: -

Re: vib.d suppress 404 for no content written

2018-02-14 Thread aberba via Digitalmars-d-learn
On Wednesday, 14 February 2018 at 14:58:14 UTC, Seb wrote: On Wednesday, 14 February 2018 at 14:30:19 UTC, Nicholas Wilson wrote: I have an endpoint that is a post: void postStuff(HTTPServerRequest req, HTTPServerResponse res) { // do some stuff with req res.statusCode = 200; } I do

Re: DLangUI Drag and Drop support?

2018-02-06 Thread aberba via Digitalmars-d-learn
On Saturday, 3 February 2018 at 18:06:30 UTC, Andres Clari wrote: Hi, is there support for drag and drop in dlangui?? I haven't found anything on the docs, issues or forums. I'm building a project that requires support for dropping URLs from the browser into a ListWidget. Is this possible with

Re: countUntil to print all the index of a given string.

2018-02-20 Thread aberba via Digitalmars-d-learn
On Sunday, 18 February 2018 at 15:23:14 UTC, Cym13 wrote: On Sunday, 18 February 2018 at 14:48:59 UTC, Cym13 wrote: [...] Just thought of a much better/simpler solution for that last case that also doesn't force you to read all data (which might be impossible when dealing with infinite

Vibe.d no more using static this() {}

2018-02-23 Thread aberba via Digitalmars-d-learn
I recently noticed vibe.d now using main loop which call the vibe.d event loop. Why that change?

Re: Vibe.d no more using static this() {}

2018-02-23 Thread aberba via Digitalmars-d-learn
On Friday, 23 February 2018 at 23:11:13 UTC, aberba wrote: I recently noticed vibe.d now using main loop which call the vibe.d event loop. Why that change? Like: #!/usr/bin/env dub /+ dub.sdl: name "hello_vibed" dependency "vibe-d" version="~>0.8.0" +/ import vibe.d; void main() { auto

Re: Testing D database calls code for regression

2018-03-18 Thread aberba via Digitalmars-d-learn
On Friday, 16 March 2018 at 21:15:33 UTC, H. S. Teoh wrote: On Fri, Mar 16, 2018 at 08:17:49PM +, aberba via Digitalmars-d-learn wrote: [...] The usual way I do this is to decouple the code from the real database backend by templatizing the database driver. Then in my unittest I can

Re: Is there any web browser control in D Lang to display html file ?

2018-03-16 Thread aberba via Digitalmars-d-learn
On Friday, 16 March 2018 at 17:11:17 UTC, visitor wrote: On Friday, 16 March 2018 at 10:31:51 UTC, Jayam wrote: I creating one simple desktop application using dlang. I need to display some html file in my desktop application. How can make it works ? There's also gtkd sourceview :

Testing D database calls code for regression

2018-03-16 Thread aberba via Digitalmars-d-learn
How will you test D code which makes calls to database to detect bugs and regression. Unlike where you can inject data like assert (2+1 == 3), database interfacing code will be crazy... Or there's some mocking available for such cases. Especially when more features are developed on top.

Re: Testing D database calls code for regression

2018-03-19 Thread aberba via Digitalmars-d-learn
On Monday, 19 March 2018 at 00:56:26 UTC, H. S. Teoh wrote: On Sun, Mar 18, 2018 at 07:51:18PM +, aberba via Digitalmars-d-learn wrote: On Friday, 16 March 2018 at 21:15:33 UTC, H. S. Teoh wrote: > On Fri, Mar 16, 2018 at 08:17:49PM +0000, aberba via > Digitalmars-d-learn

Re: VibeD Rest Interface Generator

2018-03-04 Thread aberba via Digitalmars-d-learn
On Saturday, 3 March 2018 at 02:32:11 UTC, Mario wrote: So I've been learning D since the day 11 (I posted for first time here) and now I've decided to try Vibe.D to make my company API. The fact is that I've achieved to do it (according to the provided code) and it works! But it shows a

Re: Vibe.d no more using static this() {}

2018-02-25 Thread aberba via Digitalmars-d-learn
On Sunday, 25 February 2018 at 01:15:06 UTC, Seb wrote: On Friday, 23 February 2018 at 23:11:13 UTC, aberba wrote: I recently noticed vibe.d now using main loop which call the vibe.d event loop. "Recently"? FWIW this has been phased out a long time ago ;-) That's how I've been doing it

Re: Building GUI projects with D

2018-11-02 Thread aberba via Digitalmars-d-learn
On Saturday, 20 October 2018 at 15:40:07 UTC, karis njiru wrote: Hi. Am a computer science student from Kenya and decided to use D for my class project on Principles of Programming Languages. Am having a lot of fun with D but have come across an issue. I have been using Visual D for the past 2

Re: How do I install a library?

2018-11-10 Thread aberba via Digitalmars-d-learn
On Thursday, 8 November 2018 at 23:51:39 UTC, bachmeier wrote: On Thursday, 8 November 2018 at 23:43:38 UTC, Murilo wrote: It finally worked, but I can't just compile it normally, I have to use dub run, I wish it were something simple that I just download into the folder and then use an

Re: How to implement D to HTML pages ?

2018-10-03 Thread aberba via Digitalmars-d-learn
On Monday, 1 October 2018 at 19:29:56 UTC, Aurélien Plazzotta wrote: Hello guys, I would like to implement a forum and a blog within my website (currently including only HTML, CSS and JS, written without CMS), using D and SQL but I really don't know how to proceed. How can I integrate D into

Re: Why does nobody seem to think that `null` is a serious problem in D?

2018-11-20 Thread aberba via Digitalmars-d-learn
On Monday, 19 November 2018 at 21:39:22 UTC, Adam D. Ruppe wrote: On Monday, 19 November 2018 at 21:23:31 UTC, Jordi Gutiérrez Hermoso wrote: What's the reasoning for allowing this? The mistake is immediately obvious when you run the program, so I just don't see it as a big deal. You lose a

Re: gtkDcoding Blog Post for 2019-03-29 - Grid

2019-03-29 Thread aberba via Digitalmars-d-learn
On Friday, 29 March 2019 at 14:25:16 UTC, Ron Tarrant wrote: I'm having trouble replying to the thread I usually use, so... There's a new tutorial for using a GTK Grid. You can find it here: http://gtkdcoding.com/2019/03/29/0022-grids.html Have shared gtkdcoding.com with some folks and they

Re: Using D for Raspberry Pi expirements

2019-09-29 Thread aberba via Digitalmars-d-learn
On Thursday, 26 September 2019 at 00:09:30 UTC, Mike Franklin wrote: On Wednesday, 25 September 2019 at 23:56:45 UTC, aberba wrote: I'm looking for resources on using D for basic Raspberry Pi programming...stuff like turning on and off an LED light. I believe it requires being able to call the

Re: Using D for Raspberry Pi expirements

2019-09-29 Thread aberba via Digitalmars-d-learn
On Sunday, 29 September 2019 at 16:26:48 UTC, Aldo wrote: On Sunday, 29 September 2019 at 11:36:00 UTC, aberba wrote: On Thursday, 26 September 2019 at 00:09:30 UTC, Mike Franklin wrote: [...] I have no idea how to do that from D. Any help/resources on that? Maybe you can use this dub

Re: Packaging and Distributing Dlang Applications with GtkD Dependency?

2019-09-29 Thread aberba via Digitalmars-d-learn
On Thursday, 26 September 2019 at 16:30:39 UTC, Andre Pany wrote: On Wednesday, 25 September 2019 at 17:03:51 UTC, Ron Tarrant wrote: On Wednesday, 25 September 2019 at 13:52:48 UTC, bioinfornatics wrote: I think I misunderstood your need but are lo looking for dub tool with its repository

Re: Using D for Raspberry Pi expirements

2019-09-29 Thread aberba via Digitalmars-d-learn
On Thursday, 26 September 2019 at 17:26:25 UTC, Dave Chapman wrote: On Thursday, 26 September 2019 at 00:10:40 UTC, aberba wrote: [...] I've been using https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/ . It is a C library written by Bartosz Golaszewski. He is actively working on

Re: Using D for Raspberry Pi expirements

2019-09-25 Thread aberba via Digitalmars-d-learn
On Wednesday, 25 September 2019 at 23:56:45 UTC, aberba wrote: I'm looking for resources on using D for basic Raspberry Pi programming...stuff like turning on and off an LED light. I believe it requires being able to call the Raspberry OS core APIs from D as available in Python. Just found

Using D for Raspberry Pi expirements

2019-09-25 Thread aberba via Digitalmars-d-learn
I'm looking for resources on using D for basic Raspberry Pi programming...stuff like turning on and off an LED light. I believe it requires being able to call the Raspberry OS core APIs from D as available in Python. Anyone here tried something like that using D?

Re: Best way to learn 2d games with D?

2020-03-16 Thread aberba via Digitalmars-d-learn
On Tuesday, 17 March 2020 at 03:13:02 UTC, aberba wrote: On Sunday, 15 March 2020 at 17:58:58 UTC, Steven Schveighoffer wrote: I want to try and learn how to write 2d games. I'd prefer to do it with D. I've found a ton of tutorials on learning 2d gaming with other languages. Is there a place

Re: Best way to learn 2d games with D?

2020-03-16 Thread aberba via Digitalmars-d-learn
On Sunday, 15 March 2020 at 17:58:58 UTC, Steven Schveighoffer wrote: I want to try and learn how to write 2d games. I'd prefer to do it with D. I've found a ton of tutorials on learning 2d gaming with other languages. Is there a place to look that uses D for learning? Should I just start

Re: Best way to learn 2d games with D?

2020-03-16 Thread aberba via Digitalmars-d-learn
On Sunday, 15 March 2020 at 17:58:58 UTC, Steven Schveighoffer wrote: I want to try and learn how to write 2d games. I'd prefer to do it with D. I've found a ton of tutorials on learning 2d gaming with other languages. Is there a place to look that uses D for learning? Should I just start

Re: Best way to learn 2d games with D?

2020-03-16 Thread aberba via Digitalmars-d-learn
On Sunday, 15 March 2020 at 17:58:58 UTC, Steven Schveighoffer wrote: I want to try and learn how to write 2d games. I'd prefer to do it with D. I've found a ton of tutorials on learning 2d gaming with other languages. Is there a place to look that uses D for learning? Should I just start

Re: Alpine support for D

2020-06-09 Thread aberba via Digitalmars-d-learn
On Wednesday, 10 June 2020 at 01:06:30 UTC, aberba wrote: On Tuesday, 9 June 2020 at 14:23:34 UTC, Jesse Phillips wrote: I notice that in the new release for Alpine Linux it mentions support for D. I was curious what was meant by this and thought someone here would know. Just high level,

Re: Alpine support for D

2020-06-09 Thread aberba via Digitalmars-d-learn
On Tuesday, 9 June 2020 at 14:23:34 UTC, Jesse Phillips wrote: I notice that in the new release for Alpine Linux it mentions support for D. I was curious what was meant by this and thought someone here would know. Just high level, like druntime was ported or packages added to the repo?

Re: I want Sublime 3 D auto import !

2020-06-03 Thread aberba via Digitalmars-d-learn
On Monday, 1 June 2020 at 17:28:16 UTC, Johannes Loher wrote: On Monday, 1 June 2020 at 16:18:44 UTC, Виталий Фадеев wrote: [...] Demanding stuff usually doesn't work in this community. The usual answer is something like this: If you care about this, implement it yourself or pay somebody to

  1   2   >