Home Brew dmd update 2.082

2018-10-07 Thread Joel via Digitalmars-d-learn
It's been a over a month, and there still isn't an update for dmd 2.082 on macOS using Home Brew?! I get this (with 'brew upgrade dmd'): Error: dmd 2.081.2 already installed

Re: wstring double quotes to string double quotes

2018-04-20 Thread Joel via Digitalmars-d-learn
On Friday, 20 April 2018 at 02:46:14 UTC, Jonathan M Davis wrote: On Thursday, April 19, 2018 23:24:05 Joel via Digitalmars-d-learn wrote: On Thursday, 19 April 2018 at 21:57:28 UTC, Adam D. Ruppe wrote: > [...] That worked! Thanks Adam. Given that these functions really shouldn't be th

Re: wstring double quotes to string double quotes

2018-04-19 Thread Joel via Digitalmars-d-learn
On Thursday, 19 April 2018 at 21:57:28 UTC, Adam D. Ruppe wrote: On Thursday, 19 April 2018 at 21:53:52 UTC, Joel wrote: I have a program that uses string double quotes, but copies from wstring double quotes. The wstring double quotes are in string type (sourceTxt is a string with wstring

wstring double quotes to string double quotes

2018-04-19 Thread Joel via Digitalmars-d-learn
I have a program that uses string double quotes, but copies from wstring double quotes. The wstring double quotes are in string type (sourceTxt is a string with wstring double quotes). The following code crashes with an array.d(2211): Range violation error: import std.conv : to; import

Re: Searching string for character in binary search

2018-02-25 Thread Joel via Digitalmars-d-learn
On Sunday, 25 February 2018 at 21:18:55 UTC, Joel wrote: The number tests work, but not the string one. Thanks guys. I worked it out, I thought my search code was right, since the first asserts worked.

Searching string for character in binary search

2018-02-25 Thread Joel via Digitalmars-d-learn
The number tests work, but not the string one. void main() { assert([1,2,3,4,5,6,7,8,9,10,11].binarySearch(6)); assert(! [1,2,3,4,5,7,8,9,10,11].binarySearch(6)); assert("abcdefghijklmnopqrstuvwxyz".binarySearch('j')); // not work import std.stdio; writeln("Assert tests

Re: Double link list

2018-02-24 Thread Joel via Digitalmars-d-learn
On Saturday, 24 February 2018 at 09:48:13 UTC, Joel wrote: I'm trying some code for practice, but it isn't working properly - it prints just one number when printing in reverse. [snip] Thanks guys. And I got it working with 'if (head is tail)' etc.

Double link list

2018-02-24 Thread Joel via Digitalmars-d-learn
I'm trying some code for practice, but it isn't working properly - it prints just one number when printing in reverse. ''' void main() { import std.stdio, std.algorithm, std.range, std.conv; struct List(T) { class Node { T value;

Re: macOS preview D files

2018-02-07 Thread Joel via Digitalmars-d-learn
On Wednesday, 7 February 2018 at 12:45:43 UTC, Jacob Carlborg wrote: On 2018-02-07 02:24, Joel wrote: Using finder, I want to see D files shown in the preview column, I some times have with TextMate. Also on my iPhone (in iCloud app, open as a text file) would be a bonus too. D is not

macOS preview D files

2018-02-06 Thread Joel via Digitalmars-d-learn
Using finder, I want to see D files shown in the preview column, I some times have with TextMate. Also on my iPhone (in iCloud app, open as a text file) would be a bonus too.

Re: workspace-d dsymbol Visual Code macOS

2018-02-06 Thread Joel via Digitalmars-d-learn
[snip] On Tuesday, 6 February 2018 at 20:59:54 UTC, WebFreak001 wrote: can you try git clone https://github.com/Pure-D/workspace-d.git cd workspace-d dub upgrade dub build and then put the resulting path of the executables in your user settings as "d.workspacedPath" I got the same compile

Re: workspace-d dsymbol Visual Code macOS

2018-02-06 Thread Joel via Digitalmars-d-learn
On Tuesday, 6 February 2018 at 19:36:54 UTC, WebFreak001 wrote: On Tuesday, 6 February 2018 at 05:41:19 UTC, Joel wrote: I'm using a macOS (10.12.6) computer. workspace-d used to work, but now it says it's not installed, (I think since I quit out of Visual Code before shutting down the

workspace-d dsymbol Visual Code macOS

2018-02-05 Thread Joel via Digitalmars-d-learn
I'm using a macOS (10.12.6) computer. workspace-d used to work, but now it says it's not installed, (I think since I quit out of Visual Code before shutting down the computer). I tried compiling with with the option, but got this: Installing into

Re: dub test

2018-02-02 Thread Joel via Digitalmars-d-learn
On Friday, 2 February 2018 at 09:00:38 UTC, carblue wrote: On Friday, 2 February 2018 at 07:23:54 UTC, Joel wrote: [snip] Import module base from file ... source/jmisc/base.d by: import jmisc.base; and recommended read: https://code.dlang.org/package-format?lang=json Thanks carblue. I had

dub test

2018-02-01 Thread Joel via Digitalmars-d-learn
When I try 'dub test' I get errors like 'Source file '/Users/joelchristensen/jpro/dpro2/JMiscLib/source/jmisc/base.d' not found in any import path.' Here's the dub.json file I'm using: ``` { "name": "timelog", "targetType": "executable", "description": "A Joel D program. A

Re: How to test a DUB-based library during development?

2018-01-30 Thread Joel via Digitalmars-d-learn
On Thursday, 11 January 2018 at 12:36:22 UTC, Guillaume Piolat wrote: On Thursday, 11 January 2018 at 12:27:27 UTC, DanielG wrote: [snip] You may have some unittest blocks in your source files, and then type: $ dub test [snip] When I try 'dub test' I get errors like 'Source file

Re: StopWatch problem

2017-12-05 Thread Joel via Digitalmars-d-learn
On Tuesday, 5 December 2017 at 21:45:20 UTC, Jonathan M Davis wrote: On Tuesday, December 05, 2017 21:33:53 Joel via Digitalmars-d-learn wrote: [...] core.time.msecs is an alias for core.time.dur!"msecs". It takes a long for the number of milliseconds and returns a Duration. I

StopWatch problem

2017-12-05 Thread Joel via Digitalmars-d-learn
void main() { import std.datetime: Duration, msecs; import std.datetime.stopwatch: StopWatch; StopWatch sw; if (sw.peek.msecs) { } } I get this error with the code: z.d(6): Error: function core.time.dur!"msecs".dur (long length) is not

Re: if (int bar = .. bug or some thing

2017-10-30 Thread Joel via Digitalmars-d-learn
Ok, thanks guys.

if (int bar = .. bug or some thing

2017-10-30 Thread Joel via Digitalmars-d-learn
The following code assert fails (bar == 1, not -10!). I've wasted a bit of time because of this happening. void main() { if (int bar = foo() != 0) { assert(bar == -10); } } auto foo() { return -10; }

Re: Using dates to get days count

2017-09-29 Thread Joel via Digitalmars-d-learn
On Friday, 29 September 2017 at 06:32:19 UTC, rikki cattermole wrote: On 29/09/2017 7:29 AM, Joel wrote: How do I count the days between to dates? https://dlang.org/phobos/std_datetime_date.html#.Date.opBinary.2 https://dlang.org/phobos/core_time.html#.Duration.total Thanks rikki. I did

Using dates to get days count

2017-09-29 Thread Joel via Digitalmars-d-learn
How do I count the days between to dates?

Re: Day of week from date

2017-09-28 Thread Joel via Digitalmars-d-learn
Thanks guys. :-D

Day of week from date

2017-09-28 Thread Joel via Digitalmars-d-learn
With a given date, I want to know what day it is (like Sunday, Monday, etc). I had a look up on std.datetime, and core.time, but they don't seem to have a function for it.

Re: Crazy compile time errors with DMD 2.075.1 & 2.076.0

2017-09-03 Thread Joel via Digitalmars-d-learn
On Monday, 4 September 2017 at 04:45:27 UTC, Jonathan M Davis wrote: On Sunday, September 03, 2017 21:22:14 Ali Çehreli via Digitalmars-d-learn wrote: [...] Much as some people have been doing it for some reason, I really don't understand why anyone would be unzipping the .zip file on top

Crazy compile time errors with DMD 2.075.1 & 2.076.0

2017-09-03 Thread Joel via Digitalmars-d-learn
One of my small programs doesn't compile any more since, said, DMD versions. I've got other programs that do work, but I can't see what's different about them?! I'm using macOS. [1] Here is the program and stuff. It uses DSFML 2.1.1, but I haven't added the dynamic files for it. giver

Re: 2D game physics, macOS

2017-07-13 Thread Joel via Digitalmars-d-learn
On Thursday, 13 July 2017 at 09:53:05 UTC, Jacob Carlborg wrote: On 2017-07-13 02:34, Joel wrote: It doesn't look like there's any thing I can use. I've come across: dbox, dchip, and blaze. Blaze is dsource. dbox is alpha and hasn't been updated for 3 years. dchip [1] hasn't been updated

Re: 2D game physics, macOS

2017-07-12 Thread Joel via Digitalmars-d-learn
On Wednesday, 12 July 2017 at 12:05:33 UTC, Jacob Carlborg wrote: On 2017-07-12 12:18, Joel wrote: Is there a 2D physics library I can use on macOS, with D? I already use a multimedia library for graphics, sound and input. Box2D [1] perhaps. I think I've seen bindings for it, somewhere.

2D game physics, macOS

2017-07-12 Thread Joel via Digitalmars-d-learn
Is there a 2D physics library I can use on macOS, with D? I already use a multimedia library for graphics, sound and input.

Re: implib.exe no output files

2017-06-23 Thread Joel via Digitalmars-d-learn
On Wednesday, 21 June 2017 at 11:30:56 UTC, Ivan Kazmenko wrote: [...] Step 5. I don't get any lib files. I got lib files on another computer, though.

Re: implib.exe no output files

2017-06-19 Thread Joel via Digitalmars-d-learn
On Sunday, 18 June 2017 at 09:48:31 UTC, Ivan Kazmenko wrote: On Sunday, 18 June 2017 at 07:41:27 UTC, Joel wrote: I got the file here: http://ftp.digitalmars.com/bup.zip It works on other computers. I was trying to update to the latest DAllegro (https://github.com/SiegeLord/DAllegro5).

implib.exe no output files

2017-06-18 Thread Joel via Digitalmars-d-learn
I got the file here: http://ftp.digitalmars.com/bup.zip It works on other computers. I was trying to update to the latest DAllegro (https://github.com/SiegeLord/DAllegro5). Though, I used another computer for the lib files and still couldn't get the latest DAllegro5 working.

Re: brew install dmd

2017-06-11 Thread Joel via Digitalmars-d-learn
On Sunday, 11 June 2017 at 04:08:56 UTC, Seb wrote: But I'm not sure about doing this. This is a copy of the __official__ D installer as advertised on dlang.org (http://dlang.org/download.html): curl -fsS https://dlang.org/install.sh | bash -s dmd (the releases are signed) i.dlang.io is

Re: brew install dmd

2017-06-10 Thread Joel via Digitalmars-d-learn
On Sunday, 11 June 2017 at 03:54:05 UTC, Mike Parker wrote: On Sunday, 11 June 2017 at 03:48:57 UTC, Joel wrote: curl https://i.dlang.io | bash -s But I'm not sure about doing this. I'm don't what that means, but Homebrew is giving you 2.074.1, it's just that the binary has the wrong

Re: brew install dmd

2017-06-10 Thread Joel via Digitalmars-d-learn
On Sunday, 11 June 2017 at 02:38:21 UTC, Mike Parker wrote: On Sunday, 11 June 2017 at 01:30:37 UTC, Joel wrote: but still 2.074.0 (not 74.1) Joels-MacBook-Pro:Testing joelchristensen$ dmd DMD64 D Compiler v2.074.0 It's probably related to this:

brew install dmd

2017-06-10 Thread Joel via Digitalmars-d-learn
but still 2.074.0 (not 74.1) I'm not that familier brew. I've tried `brew upgrade` and `brew update`. Joels-MacBook-Pro:Testing joelchristensen$ brew upgrade dmd ==> Upgrading 1 outdated package, with result: dmd 2.074.1 ==> Upgrading dmd ==> Downloading

Re: SFML gcc - MacOS

2017-04-17 Thread Joel via Digitalmars-d-learn
On Monday, 17 April 2017 at 08:48:06 UTC, Jacob Carlborg wrote: On 2017-04-16 10:11, Joel wrote: I've got Xcode, do I enter `xcode-select --install` in the terminal? Yes. That will get you access to Clang, the linker and other tools on the command line. It will also create /usr/include

Re: D version of C# code

2017-04-16 Thread Joel via Digitalmars-d-learn
On Sunday, 16 April 2017 at 09:46:13 UTC, ag0aep6g wrote: On 04/16/2017 11:20 AM, Joel wrote: [...] void main() { // Arrange const string templateString = "My {pet} has {number} {ailment}."; auto pairs = [ "pet": "dog", "number": "5", "ailment": "fleas",

D version of C# code

2017-04-16 Thread Joel via Digitalmars-d-learn
What would you put instead of this C# code, in D? ```C# // Arrange const string templateString = "My {pet} has {number} {ailment}."; var pairs = new { pet = "dog", number = 5, ailment = "fleas",

Re: SFML gcc - MacOS

2017-04-16 Thread Joel via Digitalmars-d-learn
On Sunday, 16 April 2017 at 07:53:49 UTC, Jacob Carlborg wrote: On 2017-04-16 03:52, Joel wrote: In getting DSFML (http://dsfml.com/) working. I found gcc takes for ever to install, is there some thing wrong? (I posted in https://github.com/Jebbs/DSFML, but no replies). Maybe just install

SFML gcc - MacOS

2017-04-15 Thread Joel via Digitalmars-d-learn
In getting DSFML (http://dsfml.com/) working. I found gcc takes for ever to install, is there some thing wrong? (I posted in https://github.com/Jebbs/DSFML, but no replies). Maybe just install Xcode CLT (some how), and uninstall gcc. I've had this problem for a while now. I would appreciate

pointer not aligned

2017-03-30 Thread Joel via Digitalmars-d-learn
Linking... ld: warning: pointer not aligned at address 0x10017A4C9 (_D30TypeInfo_AxS3std4file8DirEntry6__initZ + 16 from .dub/build/application-debug-posix.osx-x86_64-dmd_2072-EFDCDF4D45F944F7A9B1AEA5C32F81ED/spellit.o) ... and this goes on forever!

Calls `this(this)` extra with delegate stuff in the code

2017-01-21 Thread Joel via Digitalmars-d-learn
Compile this and see, (it's crazy!): import std.stdio; struct Widget { private int[] array; this(uint length) { array = new int[length]; } this(this) { writeln( "this(this) called" ); array = array.dup; }

Your connection is not private

2016-09-30 Thread Joel via Digitalmars-d-learn
I get this when I click Learn at the top of the screen in dlang. This is on Chrome Mac (Sierra 10.12).

Re: Reinstalled Mac

2016-09-28 Thread Joel via Digitalmars-d-learn
On Wednesday, 28 September 2016 at 09:34:46 UTC, Jacob Carlborg wrote: On 2016-09-28 10:18, Joel wrote: I've got my Mac reinstalled. I haven't installed D (dmd) yet. I would like to hear what people think. I'm thinking using home brew. And install the latest Code X. You need Xcode and I

Reinstalled Mac

2016-09-28 Thread Joel via Digitalmars-d-learn
I've got my Mac reinstalled. I haven't installed D (dmd) yet. I would like to hear what people think. I'm thinking using home brew. And install the latest Code X.

Re: Get current date and time with std.datetime

2016-08-22 Thread Joel via Digitalmars-d-learn
On Friday, 1 July 2016 at 15:28:04 UTC, Zekereth wrote: On Thursday, 30 June 2016 at 21:18:22 UTC, Luke Picardo wrote: Why is it so hard to simply get the current date and time formatted properly in a string? There are no examples of this in your documentation yet this is probably one of

Re: Virus detected

2016-08-15 Thread Joel via Digitalmars-d-learn
On Monday, 15 August 2016 at 06:28:54 UTC, rikki cattermole wrote: On 15/08/2016 6:20 PM, Joel wrote: I can't install DMD, because Windows defender says the install file has a virus and wipes it off. I'm using a Windows 10 pro OS. DMD 2.071.1 Windows Defender is fairly false positive heavy,

Virus detected

2016-08-15 Thread Joel via Digitalmars-d-learn
I can't install DMD, because Windows defender says the install file has a virus and wipes it off. I'm using a Windows 10 pro OS. DMD 2.071.1

Re: How to split a string/array with multiple separators?

2016-05-14 Thread Joel via Digitalmars-d-learn
On Wednesday, 16 December 2015 at 15:27:22 UTC, Marc Schütz wrote: On Wednesday, 16 December 2015 at 14:47:26 UTC, Dragos Carp wrote: On Wednesday, 16 December 2015 at 14:18:28 UTC, Borislav Kosharov wrote: I want to split a string using multiple separators. In std.array the split function has

Re: Setting a list of values

2016-05-03 Thread Joel via Digitalmars-d-learn
On Sunday, 1 May 2016 at 05:42:00 UTC, Ali Çehreli wrote: On 04/30/2016 10:05 PM, Joel wrote: > This has no effect: > _bars.each!(a => { a._plots.fillColor = Color(255, 180, 0); }); This is a common issue especially for people who know lambdas from other languages. :) Your lambda does not do

Setting a list of values

2016-04-30 Thread Joel via Digitalmars-d-learn
This has no effect: _bars.each!(a => { a._plots.fillColor = Color(255, 180, 0); }); I tried putting ..each!((ref a) =>.. with no difference This works: foreach(b; _bars) { b._plots.fillColor = Color(255, 180, 0); }

Re: Print a triangle

2016-04-29 Thread Joel via Digitalmars-d-learn
[snip] On Friday, 29 April 2016 at 13:20:47 UTC, Michael Coulombe wrote: Try this: iota(1,11).each!(a => writeln("#".replicate(a))) Yes, this is what I was looking for! It's my birthday today.

Re: Print a triangle

2016-04-29 Thread Joel via Digitalmars-d-learn
On Friday, 29 April 2016 at 11:31:51 UTC, rikki cattermole wrote: Not entirely the goal I'm guessing output wise, but this works. import std.range : repeat; foreach(line; 1 .. 11) { writeln('#'.repeat(line)); } That is shorter than my foreach version, but I want one that doesn't use

Print a triangle

2016-04-29 Thread Joel via Digitalmars-d-learn
What is a quick way to print a triangle? I'm thinking without foreach, not like I have here. foreach(line; iota(1, 10 + 1)) { writeln("#".replicate(line)); } These don't work: iota(1, 10 + 1). tee!((a) => { writeln("#".replicate(a)); }); string result; iota(1, 10 + 1). tee!((a) =>

Re: DUB and pragma lib - OSX

2016-04-20 Thread Joel via Digitalmars-d-learn
On Wednesday, 20 April 2016 at 06:16:35 UTC, rikki cattermole wrote: On 20/04/2016 5:53 PM, Joel wrote: [...] Dub does separate compilation and linking. Add them as "libs": ["readline", "curses"] for dub.json (sdl is a bit similar). Yay! Worked, thanks rikki cattermole!

DUB and pragma lib - OSX

2016-04-19 Thread Joel via Digitalmars-d-learn
How do I get this C stuff working with DUB? I tried putting the pragmas in the main source file. extern(C) char* readline(const(char)* prompt); extern(C) void add_history(const(char)* prompt); pragma(lib, "readline"); pragma(lib, "curses"); Linking... Undefined symbols for architecture

Re: Constructor - the both look the same

2016-03-12 Thread Joel via Digitalmars-d-learn
On Saturday, 12 March 2016 at 23:43:33 UTC, Joel wrote: On Saturday, 12 March 2016 at 08:11:10 UTC, Iakh wrote: On Saturday, 12 March 2016 at 07:43:59 UTC, Joel wrote: Why does it come up with this? source/setup.d(40,16): Error: constructor inputjex.InputJex.this (Vector2!float pos, int

Re: Constructor - the both look the same

2016-03-12 Thread Joel via Digitalmars-d-learn
On Saturday, 12 March 2016 at 08:11:10 UTC, Iakh wrote: On Saturday, 12 March 2016 at 07:43:59 UTC, Joel wrote: Why does it come up with this? source/setup.d(40,16): Error: constructor inputjex.InputJex.this (Vector2!float pos, int fontSize, InputType type = cast(InputType)0) is not callable

Constructor - the both look the same

2016-03-11 Thread Joel via Digitalmars-d-learn
Why does it come up with this? source/setup.d(40,16): Error: constructor inputjex.InputJex.this (Vector2!float pos, int fontSize, InputType type = cast(InputType)0) is not callable using argument types (Vector2!float, int, InputType) dmd failed with exit code 1.

Re: Installing DUB on OSX

2016-03-03 Thread Joel via Digitalmars-d-learn
On Thursday, 3 March 2016 at 07:07:55 UTC, Jacob Carlborg wrote: On 2016-03-02 23:41, Joel wrote: I don't seem to have a folder 'build' there. It all seems writable. Hmm, that's really weird. I guess that's the folder it fails to write. Is it running as a different user. What if you change

Re: Installing DUB on OSX

2016-03-02 Thread Joel via Digitalmars-d-learn
On Wednesday, 2 March 2016 at 08:55:40 UTC, Jacob Carlborg wrote: On 2016-03-02 05:12, Joel wrote: Wait a minute, I get this: Build directory .dub/build/application-debug-posix.osx-x86_64-dmd_2070-2EBE4466CF46539CC1D524962E530835/ is not writable. Falling back to direct build in the system's

Re: Installing DUB on OSX

2016-03-02 Thread Joel via Digitalmars-d-learn
On Sunday, 28 February 2016 at 11:06:26 UTC, Jacob Carlborg wrote: On 2016-02-28 04:33, Joel wrote: Things just silently not work. Joels-MacBook-Pro:packages joelcnz$ ls -l -a ~/ | grep dub drwxr-xr-x4 joelcnz staff 136 26 Sep 12:47 .dub Joels-MacBook-Pro:packages joelcnz$ That

Re: Installing DUB on OSX

2016-02-28 Thread Joel via Digitalmars-d-learn
On Sunday, 28 February 2016 at 11:06:26 UTC, Jacob Carlborg wrote: On 2016-02-28 04:33, Joel wrote: Things just silently not work. Joels-MacBook-Pro:packages joelcnz$ ls -l -a ~/ | grep dub drwxr-xr-x4 joelcnz staff 136 26 Sep 12:47 .dub Joels-MacBook-Pro:packages joelcnz$ That

Re: Installing DUB on OSX

2016-02-27 Thread Joel via Digitalmars-d-learn
On Friday, 26 February 2016 at 08:03:19 UTC, Jacob Carlborg wrote: On 2016-02-25 22:38, Joel wrote: .dub is grayed out on Finder, and isn't writable. I'm suspecting that you don't own that directory. You can see the owner by running this: ls -l -a ~/ | grep dub The third column is the

Re: Installing DUB on OSX

2016-02-25 Thread Joel via Digitalmars-d-learn
On Thursday, 25 February 2016 at 11:06:09 UTC, Jacob Carlborg wrote: On 2016-02-24 23:11, Joel wrote: Error: Error writing file '../../../.dub/packages/dsfml-2.1.0/libdsfml_system.a' Joels-MacBook-Pro:DGuy joelcnz$ Is the full path of ../../../.dub/packages/dsfml-2.1.0 writable? It is

Re: Installing DUB on OSX

2016-02-25 Thread Joel via Digitalmars-d-learn
On Thursday, 25 February 2016 at 11:06:09 UTC, Jacob Carlborg wrote: On 2016-02-24 23:11, Joel wrote: Error: Error writing file '../../../.dub/packages/dsfml-2.1.0/libdsfml_system.a' Joels-MacBook-Pro:DGuy joelcnz$ Is the full path of ../../../.dub/packages/dsfml-2.1.0 writable? .dub is

Re: Installing DUB on OSX

2016-02-24 Thread Joel via Digitalmars-d-learn
On Wednesday, 24 February 2016 at 15:16:17 UTC, Jacob Carlborg wrote: On 2016-02-24 09:09, Joel wrote: I have OS X version 10.11.3 What about adding another path to $PATH? I don't know how though. Open or create ~/.bash_profile. Add the following: export PATH=:$PATH Replace with the

Re: Installing DUB on OSX

2016-02-24 Thread Joel via Digitalmars-d-learn
On Wednesday, 24 February 2016 at 07:35:40 UTC, Jacob Carlborg wrote: On 2016-02-24 07:49, Joel wrote: I get this: Joels-MacBook-Pro:bin joelcnz$ ln -s /usr/local/bin/dub /usr/bin ln: /usr/bin/dub: Operation not permitted Joels-MacBook-Pro:bin joelcnz$ If you have OS X 10.10.x or lower

Re: Installing DUB on OSX

2016-02-23 Thread Joel via Digitalmars-d-learn
On Saturday, 20 February 2016 at 12:01:04 UTC, Jacob Carlborg wrote: On 2016-02-20 04:21, Joel wrote: How do you do symbolic links? ln -s Replace and with the appropriate paths. I get this: Joels-MacBook-Pro:bin joelcnz$ ln -s /usr/local/bin/dub /usr/bin ln: /usr/bin/dub: Operation

Re: Installing DUB on OSX

2016-02-19 Thread Joel via Digitalmars-d-learn
On Thursday, 18 February 2016 at 08:18:20 UTC, Guillaume Piolat wrote: On Thursday, 18 February 2016 at 07:52:11 UTC, Joel wrote: On Thursday, 18 February 2016 at 07:11:23 UTC, Joel wrote: I had dub installed in a folder that meant I had to put 'sudo dub' to run it. I've tried to fix the

Re: Installing DUB on OSX

2016-02-19 Thread Joel via Digitalmars-d-learn
On Friday, 19 February 2016 at 11:34:33 UTC, John Colvin wrote: On Thursday, 18 February 2016 at 23:28:43 UTC, Joel wrote: On Thursday, 18 February 2016 at 16:33:51 UTC, John Colvin wrote: [...] I don't think I put 'sudo brew' at any point (I can't remember). I hope I haven't broken my OSX!

Re: Installing DUB on OSX

2016-02-18 Thread Joel via Digitalmars-d-learn
On Thursday, 18 February 2016 at 16:33:51 UTC, John Colvin wrote: On Thursday, 18 February 2016 at 07:52:11 UTC, Joel wrote: On Thursday, 18 February 2016 at 07:11:23 UTC, Joel wrote: I had dub installed in a folder that meant I had to put 'sudo dub' to run it. I've tried to fix the problem,

Re: Installing DUB on OSX

2016-02-18 Thread Joel via Digitalmars-d-learn
On Thursday, 18 February 2016 at 08:24:34 UTC, Jacob Carlborg wrote: On 2016-02-18 08:11, Joel wrote: I had dub installed in a folder that meant I had to put 'sudo dub' to run it. I've tried to fix the problem, but where do you put it (also I tried one place, but couldn't put it in that

Re: Installing DUB on OSX

2016-02-17 Thread Joel via Digitalmars-d-learn
On Thursday, 18 February 2016 at 07:11:23 UTC, Joel wrote: I had dub installed in a folder that meant I had to put 'sudo dub' to run it. I've tried to fix the problem, but where do you put it (also I tried one place, but couldn't put it in that folder)? I've now tried 'brew install dub' and

Installing DUB on OSX

2016-02-17 Thread Joel via Digitalmars-d-learn
I had dub installed in a folder that meant I had to put 'sudo dub' to run it. I've tried to fix the problem, but where do you put it (also I tried one place, but couldn't put it in that folder)?

User input parsing

2015-10-14 Thread Joel via Digitalmars-d-learn
Is there a fast way to get a number out of a text input? Like getting '1.5' out of 'sdaz1.5;['. Here's what I have at the moment: string processValue(string s) { string ns; foreach(c; s) {

Re: User input parsing

2015-10-14 Thread Joel via Digitalmars-d-learn
Thanks guys. I did think of regex, but I don't know how to learn it.

text wrap

2015-09-19 Thread Joel via Digitalmars-d-learn
What is simple way to wrap a string into strings? Eg from: I went for a walk and fell down a hole. To (6 max width): I went for a walk and fell down a hole.

Re: text wrap

2015-09-19 Thread Joel via Digitalmars-d-learn
On Sunday, 20 September 2015 at 00:22:17 UTC, Joel wrote: What is simple way to wrap a string into strings? Eg from: I went for a walk and fell down a hole. To (6 max width): I went for a walk and fell down a hole. Actually, I did a search and found this. import std.string.wrap;

Re: broken program, silly error messages, dub

2015-09-19 Thread Joel via Digitalmars-d-learn
On Saturday, 19 September 2015 at 07:24:01 UTC, ponce wrote: On Saturday, 19 September 2015 at 01:54:08 UTC, Joel wrote: I accidentally wiped off a small source file. I've been trying to put it back together. Now I get unrelated errors. I've tried resetting dub. To reset DUB state

Re: broken program, silly error messages, dub

2015-09-19 Thread Joel via Digitalmars-d-learn
On Saturday, 19 September 2015 at 08:33:05 UTC, Joel wrote: On Saturday, 19 September 2015 at 07:24:01 UTC, ponce wrote: On Saturday, 19 September 2015 at 01:54:08 UTC, Joel wrote: I accidentally wiped off a small source file. I've been trying to put it back together. Now I get unrelated

Re: text wrap

2015-09-19 Thread Joel via Digitalmars-d-learn
On Sunday, 20 September 2015 at 00:48:39 UTC, Doxin wrote: On Sunday, 20 September 2015 at 00:28:23 UTC, Doxin wrote: I'll get to work on some example code. here you go: http://dpaste.dzfl.pl/e6e715c54c1b do mind that this code has a couple issues, for example handing it a word longer than

broken program, silly error messages, dub

2015-09-18 Thread Joel via Digitalmars-d-learn
I accidentally wiped off a small source file. I've been trying to put it back together. Now I get unrelated errors. I've tried resetting dub. Joels-MacBook-Pro:DGuy joelcnz$ dub WARNING: A deprecated branch based version specification is used for the dependency dsfml:audio. Please use

Re: OSX prompt limit

2015-09-09 Thread Joel via Digitalmars-d-learn
On Wednesday, 9 September 2015 at 17:47:44 UTC, Adam D. Ruppe wrote: Maybe you can try gnu readline instead: extern(C) char* readline(const(char)* prompt); pragma(lib, "readline"); pragma(lib, "curses"); void main() { auto line = readline("your line: "); import std.stdio,

Re: OSX prompt limit

2015-09-08 Thread Joel via Digitalmars-d-learn
On Friday, 4 September 2015 at 03:31:40 UTC, Adam D. Ruppe wrote: On Friday, 4 September 2015 at 02:17:57 UTC, Joel wrote: In Mac OS, when typing with readln etc. I can't use the cursor keys. Works in Windows though. That's normal, line editing on Unix terminals is a kinda advanced library

Re: OSX prompt limit

2015-09-08 Thread Joel via Digitalmars-d-learn
On Tuesday, 8 September 2015 at 13:20:20 UTC, Adam D. Ruppe wrote: On Tuesday, 8 September 2015 at 13:17:31 UTC, Ola Fosheim Grøstad wrote: Or just take it from the man page: https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/signal.3.html ah excellent. My

Re: OSX prompt limit

2015-09-08 Thread Joel via Digitalmars-d-learn
On Wednesday, 9 September 2015 at 00:44:57 UTC, via Digitalmars-d-learn wrote: On Wed, Sep 09, 2015 at 12:05:52AM +, Joel via Digitalmars-d-learn wrote: Now I get the error: What is your code calling the function? The prompt might just be too long. import terminal; void main

OSX prompt limit

2015-09-03 Thread Joel via Digitalmars-d-learn
In Mac OS, when typing with readln etc. I can't use the cursor keys. Works in Windows though.

A better way than foreach with this?

2015-08-24 Thread Joel via Digitalmars-d-learn
auto names = Alef Bet Gimel Dalet He Vav Zayen Het Tet Yod Final_Kaf Kaf Lamed Final_Mem Mem Final_Nun Nun Samekh Ayin Final_Pe Pe Final_Tsadi Tsadi Qof Resh Shin Tav.split; foreach (ref name; names)

Re: A better way than foreach with this?

2015-08-24 Thread Joel via Digitalmars-d-learn
On Monday, 24 August 2015 at 06:13:50 UTC, Jacob Carlborg wrote: On 2015-08-24 07:58, Joel wrote: auto names = Alef Bet Gimel Dalet He Vav Zayen Het Tet Yod Final_Kaf Kaf Lamed Final_Mem Mem Final_Nun Nun Samekh Ayin Final_Pe Pe Final_Tsadi Tsadi

Re: A better way than foreach with this?

2015-08-24 Thread Joel via Digitalmars-d-learn
On Monday, 24 August 2015 at 06:17:02 UTC, ted wrote: try: auto names1 = names.map!( a = replace(a, _, )); ...not sure how to do it in-place though. Joel wrote: auto names = Alef Bet Gimel Dalet He Vav Zayen Het Tet Yod Final_Kaf Kaf Lamed Final_Mem Mem Final_Nun Nun Samekh Ayin Final_Pe

Allegro 5 in C - installing on OSX

2015-02-03 Thread Joel via Digitalmars-d-learn
How do you install Allegro 5 (OSX)? Like, using 'Home Brew'.

Re: Allegro 5 in C - installing on OSX

2015-02-03 Thread Joel via Digitalmars-d-learn
Ok, thanks Mike.

Re: Getting DAllegro 5 to work in Windows

2015-01-30 Thread Joel via Digitalmars-d-learn
On Friday, 30 January 2015 at 07:53:12 UTC, Kagamin wrote: On Friday, 30 January 2015 at 06:16:21 UTC, Joel wrote: What happens is, that I run the script file (in DAllegro folder) and it is suppose to create lib files from the DLL ones. On my system, it says its done it but no lib files pop

Re: Getting DAllegro 5 to work in Windows

2015-01-30 Thread Joel via Digitalmars-d-learn
On Friday, 30 January 2015 at 07:34:53 UTC, Mike Parker wrote: On 1/30/2015 3:16 PM, Joel wrote: Update. What happens is, that I run the script file (in DAllegro folder) and it is suppose to create lib files from the DLL ones. On my system, it says its done it but no lib files pop up! It

Re: Getting DAllegro 5 to work in Windows

2015-01-29 Thread Joel via Digitalmars-d-learn
On Friday, 26 December 2014 at 08:43:24 UTC, Joel wrote: On Wednesday, 24 December 2014 at 09:57:31 UTC, Kagamin wrote: Works for me on allegro-5.0.10-mt.dll, produced 391kb lib file. I think my Windows 7 on my Mac has system damage - I used a doggy flash drive. I plan to install Window 8.1,

Re: Using dub

2015-01-28 Thread Joel via Digitalmars-d-learn
On Wednesday, 28 January 2015 at 23:48:52 UTC, Rikki Cattermole wrote: On 29/01/2015 11:27 a.m., Joel wrote: When I setup dub/dmd on my OSX install, I used the OSX packages and it should already be on the PATH variable. What packages? I'm new to Mac OS. Ohh, I was meaning a dmg. But ugh

Re: Using dub

2015-01-28 Thread Joel via Digitalmars-d-learn
When I setup dub/dmd on my OSX install, I used the OSX packages and it should already be on the PATH variable. What packages? I'm new to Mac OS.

Re: Using dub

2015-01-28 Thread Joel via Digitalmars-d-learn
[0] http://brew.sh/ Do I just put 'brew dub'? First install brew then $ brew install dub From that it should just be dub to run. Don't forget to restart terminal afterwards or just rerun bash. If dub isn't found, PATH variable will need to be changed via .bashrc. But I'm doubting its

<    1   2   3   >