Re: Undefined symbol: _dyld_enumerate_tlv_storage (OSX)

2019-10-17 Thread nazriel via Digitalmars-d-learn
On Wednesday, 16 October 2019 at 15:52:22 UTC, nazriel wrote: On Friday, 11 October 2019 at 11:38:27 UTC, Jacob Carlborg wrote: ... Should we bump https://github.com/dlang/dmd/blob/master/src/posix.mak#L143 ? BR, Damian I made two PRs, lets see how it plays out: - https://github.com/dlang

Re: Undefined symbol: _dyld_enumerate_tlv_storage (OSX)

2019-10-16 Thread nazriel via Digitalmars-d-learn
On Friday, 11 October 2019 at 11:38:27 UTC, Jacob Carlborg wrote: On 2019-10-10 20:12, Robert M. Münch wrote: I have two project I want to compile and both times get this error: Undefined symbols for architecture x86_64:  "_dyld_enumerate_tlv_storage", referenced from: __d_dyld_getTLSRa

Re: Mac IDE with Intellisense

2015-09-27 Thread nazriel via Digitalmars-d-learn
On Saturday, 26 September 2015 at 09:17:10 UTC, Mike McKee wrote: I've tried Sublime Text 3 editor on the Mac, but even it doesn't seem to have the D2 language in it yet (only D), and doesn't have intellisense for components in the imports that I do, even after saving the file after adding the

Re: [video tutorial] hello world using dmd, rdmd, dub and vibe.d

2014-02-16 Thread nazriel
On Saturday, 15 February 2014 at 13:28:24 UTC, simendsjo wrote: http://youtu.be/8TV9ZZteYEU The content wasn't planned, and English is not my native tongue. Hopefully it can still be useful for newbies. This is pretty much a response to a recent discussion on the lack of documentation/tutorial

Re: [video tutorial] hello world using dmd, rdmd, dub and vibe.d

2014-02-16 Thread nazriel
On Monday, 17 February 2014 at 00:51:17 UTC, nazriel wrote: On Saturday, 15 February 2014 at 13:28:24 UTC, simendsjo wrote: http://youtu.be/8TV9ZZteYEU The content wasn't planned, and English is not my native tongue. Hopefully it can still be useful for newbies. This is pretty m

Re: Reading input from piped stdin.

2014-02-14 Thread nazriel
On Friday, 14 February 2014 at 19:09:06 UTC, nazriel wrote: On Friday, 14 February 2014 at 19:05:02 UTC, Thomas wrote: I'm new to D, and I find it quite enjoyable so far. I have however stumbled upon a problem which I can't seem to figure out. I am trying to make a program that creat

Re: Reading input from piped stdin.

2014-02-14 Thread nazriel
On Friday, 14 February 2014 at 19:05:02 UTC, Thomas wrote: I'm new to D, and I find it quite enjoyable so far. I have however stumbled upon a problem which I can't seem to figure out. I am trying to make a program that creates a child process, writes something to the child process stdin and read

Re: How to launch a Windows compiled exe without showing a console?

2014-01-11 Thread nazriel
On Saturday, 11 January 2014 at 15:13:45 UTC, Gary Willoughby wrote: How to launch a Windows compiled exe without showing a console? I've tried the following two ways and when i execute the resulting *.exe file a console is shown alongside the dialog box. How can i suppress the console? impo

Re: getting __DIR__ and __TIME__ of compilation?

2013-12-26 Thread nazriel
On Friday, 27 December 2013 at 06:39:54 UTC, Ravn wrote: Hi, I'm trying get the directory path and time at which the compilation was made (not when the program is run), something similar like this example in Haxe http://haxe.org/manual/macros#macro-functions Is it possible to do so in D? Somethi

Re: Generating assembly from dmd

2013-12-22 Thread nazriel
On Sunday, 22 December 2013 at 14:17:50 UTC, Joseph Rushton Wakeling wrote: Hi all, Can someone walk me through in a friendly way how to check the assembly produced by dmd? The application in this case is checking some new patches to Phobos. It's something I'm not familiar with doing in gene

Re: I/O related question, and ini parsing

2013-12-07 Thread nazriel
On Friday, 6 December 2013 at 04:43:44 UTC, Mineko wrote: So, it's my first time implementing something like logging and ini parsing/creating, and it appears to work perfectly, but I'm not neccessarily a master of D yet.. So, I wanted some advice from my seniors if there's anything I should i

Re: D Program code on CLS

2013-11-14 Thread nazriel
On Thursday, 14 November 2013 at 03:35:59 UTC, Vincent wrote: how can I clear the screen for example I input first letter (A) and second letter (B) and show the result AB then after pressing enter it will clear the screen before it display again the Input first letter Input first letter : A Inp

Re: Disassembly Tool

2013-11-14 Thread nazriel
On Thursday, 14 November 2013 at 10:42:06 UTC, Namespace wrote: On Thursday, 14 November 2013 at 10:35:26 UTC, dennis luehring wrote: Am 14.11.2013 10:48, schrieb Namespace: Since the disassembly on Dpaste doesn't work for me anymore, I'm looking for an alternative. Is there one? And I don't w

Re: Disassembly Tool

2013-11-14 Thread nazriel
On Thursday, 14 November 2013 at 10:14:05 UTC, Namespace wrote: On Thursday, 14 November 2013 at 09:55:02 UTC, Tourist wrote: On Thursday, 14 November 2013 at 09:53:42 UTC, Namespace wrote: On Thursday, 14 November 2013 at 09:48:38 UTC, Namespace wrote: Since the disassembly on Dpaste doesn't w

Re: DMD crashes without giving any info

2013-09-13 Thread nazriel
On Friday, 13 September 2013 at 12:41:44 UTC, simendsjo wrote: What should I do when DMD keeps crashing and doesn't give me any output? I'm using dmd 2.063.2 on win8. This is all that -v gives me before crashing.. binaryC:\dmd\windows\bin\dmd.exe version v2.063.2 configC:\dmd\windows

[VibeD] Hand made proxy

2013-08-11 Thread nazriel
Greetings. I am trying to learn Vibe.D and rewrite using it, my old project I've wrote with my (already rotting) personal framework Project been written as commercial project for one of my clients so I can't really release source code here, but in tl;dr it is: Proxy that gets file from remo

Re: Segfault on simple program?

2013-06-11 Thread nazriel
On Friday, 31 May 2013 at 17:14:46 UTC, Shriramana Sharma wrote: import std.stdio ; void foo ( int[] array ) { foreach ( i ; array ) { writeln ( i ) ; } } void main () { foo ( [ 1, 2, 3 ] ) ; } On both DMD 2.062 and 2.063 this compiles OK but causes a segfault. I'm running Ku

Re: geting stack trace from signal handlers

2013-06-07 Thread nazriel
On Thursday, 6 June 2013 at 21:50:58 UTC, Timothee Cour wrote: Great! two issues (on OSX at least): A) it seems the top-most element of the call stack gets chopped off; eg in your code, the main_module.main symbol will not appear in the stack trace. Any idea why or how to fix that? Is that so

Re: geting stack trace from signal handlers

2013-06-06 Thread nazriel
On Wednesday, 5 June 2013 at 21:05:53 UTC, Timothee Cour wrote: how do i get a stacktrace inside handleTermination? If not currently possible, could we have a compile flag that would enable this kind of feature? (making code slower would be OK, its an opt in feature) Ideally we'd also be able

Re: Is the -property compiler flag broken/bad idea?

2013-06-06 Thread nazriel
On Wednesday, 5 June 2013 at 18:09:30 UTC, Gary Willoughby wrote: I've been using the -property compiler flag when i compile programs and thought it was pretty cool but i've recently had a conversation with someone who has informed me it's broken and a bad idea. Never, ever, ever use -propert

Re: How do you guys debug large programs?

2013-05-28 Thread nazriel
On Monday, 27 May 2013 at 19:55:57 UTC, Gary Willoughby wrote: This is quite an open ended question but i wondered how you guys debug your D programs (i'm talking about stepping through code, setting breakpoints, etc). The lack of nice IDE's with integrated debuggers is worrying when working wi

DVM + DMD git-master

2013-05-23 Thread nazriel
Greetings. Does DVM [1] supports building DMD from git-master tree? If yes, how does it name resulting binary? dmd-master? Best regards, Damian Ziemba [1] https://github.com/jacob-carlborg/dvm

Re: Can't instantiate SimpleTimeZone

2013-05-16 Thread nazriel
On Thursday, 16 May 2013 at 14:01:13 UTC, Andrej Mitrovic wrote: I was using the AE[1] library, but recently it started to fail to compile due to essentially this: import std.datetime; void main() { Duration dur; auto x = new SimpleTimeZone(dur); } test.d(8): Error:

Re: dmd asm output

2013-04-01 Thread nazriel
On Monday, 1 April 2013 at 01:54:10 UTC, John Colvin wrote: I've been learning assembler a bit and I decided to have a look at what dmd spits out. I tried a simple function with arrays to see what vectorization gets done void addto(int[] a, int[] b) { a[] += b[]; } dmd -O -release -inline

Re: iasm, call and dolar sign

2013-03-03 Thread nazriel
On Monday, 4 March 2013 at 03:30:30 UTC, nazriel wrote: Greetings. While using D iasm I noticed something interesting. I was trying to get instruction pointer by using call trick and noticed that in opposite to nasm (and probably others assemblers) D iasm uses $ as next instruction pointer

Re: Pointers to methods

2013-03-03 Thread nazriel
On Monday, 4 March 2013 at 03:44:20 UTC, Ali Çehreli wrote: On 03/03/2013 07:21 PM, nazriel wrote: > *[1] - code for lazy people : Thank you very much for doing that. It is the only way to ensure that these threads will remain complete. Here are two ways depending on what you need: imp

Re: Pointers to methods

2013-03-03 Thread nazriel
On Monday, 4 March 2013 at 03:28:30 UTC, bearophile wrote: nazriel: While playing with D code (http://dpaste.dzfl.pl/c6d9e5bd) I noticed that I have no idea how to write equivalent to this C++ code: I think the answer to this so common question should go here (unless already present

Re: Pointers to methods

2013-03-03 Thread nazriel
On Monday, 4 March 2013 at 03:28:30 UTC, bearophile wrote: nazriel: While playing with D code (http://dpaste.dzfl.pl/c6d9e5bd) I noticed that I have no idea how to write equivalent to this C++ code: I think the answer to this so common question should go here (unless already present

iasm, call and dolar sign

2013-03-03 Thread nazriel
Greetings. While using D iasm I noticed something interesting. I was trying to get instruction pointer by using call trick and noticed that in opposite to nasm (and probably others assemblers) D iasm uses $ as next instruction pointer. Documentation mentions that dolar sign is usable in Jcc

Pointers to methods

2013-03-03 Thread nazriel
Greetings. While playing with D code (http://dpaste.dzfl.pl/c6d9e5bd) I noticed that I have no idea how to write equivalent to this C++ code: http://dpaste.dzfl.pl/ae182695 *[1] Could somebody point me out how to achieve same thing? Maybe I am missing something obvious? Thanks! *[1] - cod

Re: Strange behaviour with mmfile

2013-01-28 Thread nazriel
On Tuesday, 29 January 2013 at 00:49:07 UTC, bioinfornatics wrote: I missed to show the code $ cat test_mmap.d import std.stdio; import std.mmfile; void main(string[] args ){ MmFile m = new MmFile( args[0] ); foreach( ulong c; 0..m.length ) writeln( m[c], " ", cast(dchar) m[c] )

Re: Reading Standard Input

2013-01-23 Thread nazriel
On Wednesday, 23 January 2013 at 17:59:04 UTC, Kenneth Sills wrote: Hello everyone! I'm pretty new to the D world, and just started playing around with it. To start off with the language, I was going to write a little game (as I usually do). I wanted to use pure D (no ncurses) and not have to imp

Re: Assembly - 64-bit registers supported?

2013-01-19 Thread nazriel
On Saturday, 19 January 2013 at 13:12:47 UTC, deed wrote: Missing -m64 or something? Probably. I am on Windows using dmd 2.061 and optlink 8.00.12 dmd main.d -m64 Con't run 'bin\amd64\link.exe', check PATH Setting LINKCMD64 to the same path as for LINKCMD in sc.ini: dmd main.d -m64 OPTLINK :

Re: Assembly - 64-bit registers supported?

2013-01-19 Thread nazriel
On Saturday, 19 January 2013 at 12:45:06 UTC, deed wrote: void main() { asm { movRAX, 3; } } results in: Error: undefined identifier 'RAX' AX and EAX work. Anything missing or isn't it yet implemented? http://dpaste.dzfl.pl/0f79b5ba Missing -m64 or something?

Re: How to use a function without their sources

2013-01-18 Thread nazriel
On Friday, 18 January 2013 at 20:33:04 UTC, Andrej Mitrovic wrote: On 1/18/13, nazriel wrote: Show me a working solution to question from first post. "How to use existing static D library *WITHOUT* using .DI files". You can't edit library itself, so adding extern(C) to funct

Re: How to use a function without their sources

2013-01-18 Thread nazriel
On Friday, 18 January 2013 at 18:44:29 UTC, Andrej Mitrovic wrote: On 1/18/13, nazriel wrote: So don't take this serious. This is D.learn, so people expect to get valid information here and they don't know if you're showing an invalid example or not unless you tell the

Re: How to use a function without their sources

2013-01-18 Thread nazriel
On Friday, 18 January 2013 at 18:34:24 UTC, Jordi Sayol wrote: Al 18/01/13 18:47, En/na nazriel ha escrit: On Friday, 18 January 2013 at 17:02:51 UTC, Jordi Sayol wrote: Is there a way to use a function from a static D library without importing their D sources nor their DI interface? lib.d

Re: How to use a function without their sources

2013-01-18 Thread nazriel
On Friday, 18 January 2013 at 18:23:57 UTC, nazriel wrote: On Friday, 18 January 2013 at 18:18:07 UTC, Andrej Mitrovic wrote: On 1/18/13, nazriel wrote: extern(C) void _D3lib3fooFZv(); void main() { _D3lib3fooFZv(); } That's a *terrible* idea, you are calling a D function

Re: How to use a function without their sources

2013-01-18 Thread nazriel
On Friday, 18 January 2013 at 18:23:03 UTC, Johannes Pfau wrote: Am Fri, 18 Jan 2013 19:17:33 +0100 schrieb "nazriel" : [...] Nice! This should be mentioned at Language Reference, so it won't get lost. Isn't this documented? I thought it was well known that you can

Re: How to use a function without their sources

2013-01-18 Thread nazriel
On Friday, 18 January 2013 at 18:18:07 UTC, Andrej Mitrovic wrote: On 1/18/13, nazriel wrote: extern(C) void _D3lib3fooFZv(); void main() { _D3lib3fooFZv(); } That's a *terrible* idea, you are calling a D function using the C convention, you're going to have all sorts o

Re: How to use a function without their sources

2013-01-18 Thread nazriel
On Friday, 18 January 2013 at 18:10:35 UTC, Maxim Fomin wrote: On Friday, 18 January 2013 at 17:47:42 UTC, nazriel wrote: On Friday, 18 January 2013 at 17:02:51 UTC, Jordi Sayol wrote: Is there a way to use a function from a static D library without importing their D sources nor their DI

Re: How to use a function without their sources

2013-01-18 Thread nazriel
On Friday, 18 January 2013 at 17:02:51 UTC, Jordi Sayol wrote: Is there a way to use a function from a static D library without importing their D sources nor their DI interface? lib.d: extern(C) void printf(const char*, ...); void foo() { printf("%s".ptr, "hi".ptr); } test.d: exter

Re: Troublemaker dmd 2.061 - Templates?

2013-01-07 Thread nazriel
On Saturday, 5 January 2013 at 18:45:26 UTC, David wrote: LOL mixin template get_packets_mixin(alias Module) { template get_packets() { alias NoDuplicates!(get_packets_impl!(get_members!())) get_packets; } template get_members() { alias TypeTuple!(__traits(allMember

Re: read single characters from stdin

2012-09-28 Thread nazriel
On Friday, 28 September 2012 at 09:45:30 UTC, Thomas Koch wrote: nazriel wrote: http://dpaste.dzfl.pl/eb1387cc Thank you. Your solution does not seem to work with multibyte characters, so I extended it: Nice, I didn't need multibyte support as I was using it mainly for getting ke

Re: read single characters from stdin

2012-09-26 Thread nazriel
On Wednesday, 26 September 2012 at 17:51:03 UTC, Thomas Koch wrote: Hi, to learn D, I'd like to write a simple type trainer. It should write a line to stdout and then read single characters from stdin and only accept the correct characters How can I read single characters? A similar questio

Re: Reading bytes and converting to int

2012-08-25 Thread nazriel
On Saturday, 25 August 2012 at 15:23:45 UTC, joao wrote: Hello everyone, I recently discovered the D language. So, I want to open a file a read 4 bytes and get the int value. string bytes = f.read(4) I tried to cast but give me message it was deprecated. uint value = cast (uint) bytes If byte

Re: std.regex - ctRegex

2012-08-25 Thread nazriel
On Saturday, 25 August 2012 at 15:20:10 UTC, David wrote: Am 25.08.2012 17:17, schrieb nazriel: First of all: *First read whole message before compiling* http://dpaste.dzfl.pl/cfb9710d - takes 8senonds to compile on 8CPU Xeon with 16gb RAM, freezes my local computer - same happens to other

std.regex - ctRegex

2012-08-25 Thread nazriel
Greetings. I was using ctRegex in 2.059 without any issue, but since 2.060 came out some problems raised. First of all: *First read whole message before compiling* http://dpaste.dzfl.pl/cfb9710d - takes 8senonds to compile on 8CPU Xeon with 16gb RAM, freezes my local computer - same happens

Re: Sudoku Py / C++11 / D?

2012-08-24 Thread nazriel
On Friday, 24 August 2012 at 19:32:53 UTC, maarten van damme wrote: I've distiled what I understood from your source and the resulting executable managed to solve the impossible one in 27 seconds while your source takes 41 seconds. I've probably violated every D guideline concerning the use of

Re: std.json

2012-07-04 Thread nazriel
On Wednesday, 4 July 2012 at 16:55:19 UTC, Ali Çehreli wrote: On 07/04/2012 08:25 AM, Alexsej wrote: > On Monday, 26 March 2012 at 07:14:50 UTC, Ali Çehreli wrote: >> // Assumes UTF-8 file >> auto content = to!string(read("json_file")); > Your example only works if the json file in UTF-8 (BOM),

Re: Help translating C/C++ snippet to D

2012-07-02 Thread nazriel
On Tuesday, 3 July 2012 at 02:34:04 UTC, Dustin wrote: Hello, I'm trying to follow along with a C++ tutorial and translate it to D but I don't know C/C++ well enough to understand this #Define statement: #define ARRAY_COUNT( array ) (sizeof( array ) / (sizeof( array[0] ) * (sizeof( array ) !

Re: Debug output functions

2012-07-02 Thread nazriel
On Tuesday, 3 July 2012 at 03:15:02 UTC, Wouter Verhelst wrote: So, I wanted to create a number of functions that would call write(), writef(), writefln(), or writeln() with whatever arguments they were given, but only if the user had used a 'enable debugging' command-line option (or some su

Re: Debug output functions

2012-07-02 Thread nazriel
On Tuesday, 3 July 2012 at 03:15:02 UTC, Wouter Verhelst wrote: So, I wanted to create a number of functions that would call write(), writef(), writefln(), or writeln() with whatever arguments they were given, but only if the user had used a 'enable debugging' command-line option (or some su