Re: Linux: How to statically link against system libs?

2011-04-28 Thread Alexander
ing but libc will be linked statically anyway). Linux is now in "DLL hell" more than any Windows ever... And, by the way, D can be used for OS binaries as well ;) Though, I would look into direction of uClibc - smaller footprint and almost the same functionality, and it can be safely linked statically. /Alexander

Re: Linux: How to statically link against system libs?

2011-04-28 Thread Alexander
efficient use of physical memory. All processes share the same physical pages for the code in the DSOs." makes me wonder, when druntime/phobos will be in DSO? ;) /Alexander

Re: Linux: How to statically link against system libs?

2011-04-29 Thread Alexander
s and until *any* binary compiled on *any* Linux distribution (same or newer kernel version) will be accepted by all other Linux systems (I bet it will never happen though), it is a bit too early to rule out static linking. /Alexander

Re: Linux: How to statically link against system libs?

2011-04-30 Thread Alexander
ence with uClibc was few years ago. Perhaps, I should try it again... /Alexander

Re: Linux: How to statically link against system libs?

2011-04-30 Thread Alexander
I see... Well, then, perhaps, you may get lucky with this tool: http://statifier.sourceforge.net/ /Alexander

Re: Linux: How to statically link against system libs?

2011-05-03 Thread Alexander
ng convention). Probably, nowadays libc has wrappers around syscalls, checking arguments etc - but those are not necessary, the difference is only in calling convention. /Alexander

Re: How to break module into multiple file.

2011-05-12 Thread Alexander
hich could really help sometimes :) /Alexander

Re: How to break module into multiple file.

2011-05-12 Thread Alexander
nge, no matter where :) For small projects this is OK, but for large - not quite, IMHO. /Alexander

Re: How to break module into multiple file.

2011-05-12 Thread Alexander
I follow it. One thing though is really annoying (to me, at least) with this binding to file name - if file is named with dashes, compiler wouldn't find it by itself. For those who prefer underscores this is not a problem, of course. /Alexander

Re: How to break module into multiple file.

2011-05-13 Thread Alexander
big deal, but make life a bit less convenient - and this is the exact reason why we have so many programming languages, libraries etc :) /Alexander

Re: How To Dynamic Web Rendering?

2011-05-14 Thread Alexander
eeds to be compiled first, and that could be difficult to do if it is embedded into the page. /Alexander

Re: How To Dynamic Web Rendering?

2011-05-14 Thread Alexander
much as possible). Different developers do things in different way, that's why embedding code in web-pages (PHP/ASP way) is (for some people and/or applications, at least) is more preferred or productive. > Basically, it gets ugly, fast. Depends on how you do this ;) /Alexander

Re: How To Dynamic Web Rendering?

2011-05-14 Thread Alexander
documentation (both for PHP and ASP), including various tutorials, show how to mix the code and the data - this means "abandoned"? Perhaps, you could tell me this "good reason"? I see no good reasons, to be honest. /Alexander

Re: How To Dynamic Web Rendering?

2011-05-15 Thread Alexander
der.php > If by communicating with other pages you mean something like php's include(), > that's trivial (just include the file here too!) No, I mean state/data exchange. Say, somewhere on the page you set a variable, and it's values is visible on all other pages. /Alexander

Re: How To Dynamic Web Rendering?

2011-05-15 Thread Alexander
me others) - but I'll be more productive than with DOM-XML templates :) /Alexander

Re: How To Dynamic Web Rendering?

2011-05-15 Thread Alexander
you'll see the reasons. WordPress developers (not all, of course, but some) do it professionally for many years, still, whatever they do, you call it "pure shit", and they don't see the reasons you see. That's why I asked about "good reason" - a guideline to follow, which is rational for anyone. /Alexander

Re: How To Dynamic Web Rendering?

2011-05-15 Thread Alexander
on - that's all. Really, I don't want to start a flame - what is good or bad. Just expressing my opinion :) /Alexander

Re: How To Dynamic Web Rendering?

2011-05-15 Thread Alexander
shared memory to implement persistence - but this will be way too slower comparing to some in-memory state, not talking about complex objects which cannot be stored (easily) in the database. To implement this, you would need a "bit" more than your dhp does (while PHP and ASP provide out of the box). /Alexander

Re: How To Dynamic Web Rendering?

2011-05-15 Thread Alexander
r you - but not for everyone out there. People have different preferences :) Some even like to write HTTP servers in bash or postscript, and, though this is doable - it is not really practical to anyone who is used to something different - that's what I want to say. /Alexander

Re: How To Dynamic Web Rendering?

2011-05-15 Thread Alexander
en pages without using complicated or expensive persistent storage. /Alexander

Re: How To Dynamic Web Rendering?

2011-05-15 Thread Alexander
his reason, I prefer to use D as a backend only (=performance critical), and frontends will be in PHP or ASP (=UI only). Though, currently I evaluate option to use D to host a server (HTTP) with dmdscript as server-side scripting language. What blocks me is the absence of good, robust and high-performance socket/file I/O framework for D2. /Alexander

Re: How To Dynamic Web Rendering?

2011-05-15 Thread Alexander
software of web development. /Alexander

Re: How To Dynamic Web Rendering?

2011-05-15 Thread Alexander
should" and "works according to specifications". And surely, there are *many* ways to achieve *same* results - in many different areas, including architecture. /Alexander

Re: How To Dynamic Web Rendering?

2011-05-15 Thread Alexander
me something that is professional, so I can learn. > Ugh, I never could stand that hippie rhetoric. Despite what society's been > brainwashed into believing, there *ARE* opinions out there that are just > plain moronic, and yes, *wrong*. And yours is always *right*? ;) /Alexander

Re: How To Dynamic Web Rendering?

2011-05-15 Thread Alexander
not see the obvious problems. Just look at all the Apple fans. Sure, Apple has his share of problems. But they are rich and popular. Do you, with your "perfect solutions"? ;) > Nothing is "rational for anyone" because most people are irrational imbeciles. Thank you, Nick. Now I know who I am :) /Alexander

Re: How To Dynamic Web Rendering?

2011-05-16 Thread Alexander
don't know about PHP IDEs. I am sorry, but do we talk about the same thing? How is WordPress related to Visual Studio, especially how could it "use it"? /Alexander

Re: How To Dynamic Web Rendering?

2011-05-16 Thread Alexander
it really doesn't matter. It is like my recent question about class member declaration order - I find it harder to understand the code, when members are not declared before use, though, others (on this list) tend to disagree with me. Who is right here? /Alexander

Re: How To Dynamic Web Rendering?

2011-05-16 Thread Alexander
e of good code and good practice that I ever knew is cryptlib, though this is not exactly related to web development... /Alexander

Re: How To Dynamic Web Rendering?

2011-05-16 Thread Alexander
> again, most our sites aren't massive anyway, so does it matter? Most of our are massive enough, so - it does matter :) > Finally, long running processes can't be updated. You have to kill them and > restart, but if their state is only in memory, this means > you lose data. Not really - process should flush any dirty data to persistent storage and quit, so new copy may catch on. /Alexander

Re: How to break module into multiple file.

2011-05-18 Thread Alexander
hioned, but this amount of code in single file makes things less manageable, even if everything in this single file is somehow related to each other. /Alexander

Array-wise expressions and range checking

2013-06-16 Thread Alexander
Hello, I'm reading "The D programming language", part "4.1.7 Array-wise Expressions". It states that "The effect of an array-wise expression is that of a loop assigning each element of the left-hand side in turn with the corresponding index of the right-hand side. For example, the assignme

Re: Array-wise expressions and range checking

2013-06-16 Thread Alexander
Opened the issue http://d.puremagic.com/issues/show_bug.cgi?id=10384 Thank you! On Sunday, 16 June 2013 at 09:35:23 UTC, Jonathan M Davis wrote: On Sunday, June 16, 2013 11:09:27 Alexander wrote: Hello, I'm reading "The D programming language", part "4.1.7 Array-wis

Circle Calculator Help

2012-06-26 Thread Alexander
s(); sqradius(); area(); cir(); result(); wait(); } How should I fix this so it will wait for the user to press a key to exit? Thanks a ton! -Alexander

Re: Circle Calculator Help

2012-06-26 Thread Alexander
By the way, this is just my 2nd program in D. It is just for fun, and I'm doing it to practice using this language. This is normally how I teach myself languages. I write a simple one then a more complex one on and on until I'm fluent in the language. I don't have the book (but I'll get it soo

Re: Circle Calculator Help

2012-06-26 Thread Alexander
On Tuesday, 26 June 2012 at 14:53:33 UTC, Adam D. Ruppe wrote: You should be able to just do a readln() before exiting to give the user a chance to read everything, and hit enter to exit. I just tried that, and it still closed right after I typed the radius. It looks almost like error code tha

Re: Circle Calculator Help

2012-06-26 Thread Alexander
I'll probably put in this alternative: void wait() { char[] a; while(a != "A") { writeln("Type A to continue!"); stdin.readln(a); } Thanks!

Re: Circle Calculator Help

2012-06-26 Thread Alexander
std.conv.to!(float).to!(char[]).to(char[]) C:\Users\Alexander\Documents\D\circlecalc.d(23): float circlecalc.askradius() C:\Users\Alexander\Documents\D\circlecalc.d(80): _Dmain - Does anyone understand this error code? I believe it means that it isn't letting me convert the

Re: Circle Calculator Help

2012-06-26 Thread Alexander
That must be why, I didn't import std.string! Thanks!

Initialising arrays at compile time

2011-01-02 Thread Peter Alexander
Ok, someone put me out of my misery, I can't figure out for the life of me how to do this. Basically, I have a vector class and want enums for the zero vectors: struct Vec { this(real x, real y) { e[0] = x; e[1] = y; } real[2] e; enum Vec zero = Vec(0, 0); } What can I do? The above doe

Re: Initialising arrays at compile time

2011-01-02 Thread Peter Alexander
On 2/01/11 2:16 PM, bearophile wrote: Is this good enough? struct Vec { double[2] e; static enum Vec zero = Vec([0.0, 0.0]); this(real x, real y) { e[0] = x; e[1] = y; } } Well it works, so yes :-) That's quite irritating. Why does the automatically gen

Development blog? D news?

2011-01-17 Thread Peter Alexander
Take a look at the website (either digitalmars, or d-programming-language). There is absolutely no indication on those sites that the D language is actually going anywhere. Other than version numbers on the downloads, nothing changes. Outsiders have no idea what's going on. Here's a suggestio

Re: Development blog? D news?

2011-01-17 Thread Peter Alexander
On 17/01/11 8:16 AM, bioinfornatics wrote: will be great if we have a planet. An example here : http://planet.fedoraproject.org/ A planet it is a web page who feed several blog, user can use a cms for to write a blog like Dotclear, wordpress ... http://planet.dsource.org/ Problem is: it's no

Asynchronous concurrency with reference types

2011-02-04 Thread Peter Alexander
I would like to be able to spawn a thread, which does a lot of work, and then returns (in some way) the result of its computations to the main thread. I would really like to avoid copying its results if possible. Logically, what I would like is something like this: class LotsOfData { ... } v

Re: Asynchronous concurrency with reference types

2011-02-04 Thread Peter Alexander
On 4/02/11 8:23 PM, Jesse Phillips wrote: Peter Alexander Wrote: Essentially, the work that doWork does needs to be returned to the main thread asynchronously, and obviously in a thread-safe manner. What's the best way to do this? The above won't work because ~= isn't atomic,

Re: Asynchronous concurrency with reference types

2011-02-04 Thread Peter Alexander
On 4/02/11 8:42 PM, spir wrote: On 02/04/2011 07:18 PM, Peter Alexander wrote: I would like to be able to spawn a thread, which does a lot of work, and then returns (in some way) the result of its computations to the main thread. I would really like to avoid copying its results if possible

Re: Asynchronous concurrency with reference types

2011-02-05 Thread Peter Alexander
On 5/02/11 12:11 AM, Sean Kelly wrote: Peter Alexander Wrote: Things might be easier if the error messages associated with D's concurrent features weren't especially unhelpful (for example, trying to spawn a thread with reference type parameters just gives you a 'no match for

Re: Asynchronous concurrency with reference types

2011-02-05 Thread Peter Alexander
On 4/02/11 11:44 PM, Sean Kelly wrote: Peter Alexander Wrote: How would you do it with message passing though? As I understand, all of the std.concurrency message passing routines are blocking, and I need this to be asynchronous. What do you mean by blocking? The receive call will block

Setting thread priority

2011-02-05 Thread Peter Alexander
How do you set the priority of a thread, or otherwise control how much CPU time it gets? It appears that std.thread had an answer for this, but it has been removed from Phobos by the looks of things. On a side note, why is std.thread still in the online documentation if it was removed long a

Re: Starting with D

2011-02-07 Thread Peter Alexander
On 6/02/11 11:35 PM, Julius wrote: Hi there, i'm all new to D but not new to programming in general. I'd like to try D but i didn't find a nice tutorial yet. I don't want to read a whole book, I just want to get the basics so I can start. Can you help me find something like that? Best regards, J

Re: Double-dispatch

2011-02-16 Thread Peter Alexander
On 13/02/11 9:32 PM, Sean Eskapp wrote: == Quote from bearophile (bearophileh...@lycos.com)'s article Sean Eskapp: Is there a nicer way to do this in D, or am I stuck with the same thing? Andrei has recently said no one needs double dispatch (in D) :-) So Andrei will be interested in your use

Re: Ranges

2011-03-18 Thread Peter Alexander
On 13/03/11 12:05 AM, Jonathan M Davis wrote: So, when you're using a range of char[] or wchar[], you're really using a range of dchar. These ranges are bi-directional. They can't be sliced, and they can't be indexed (since doing so would likely be invalid). This generally works very well. It's e

Re: Ranges

2011-03-18 Thread Peter Alexander
On 18/03/11 5:53 PM, Jonathan M Davis wrote: On Friday, March 18, 2011 03:32:35 spir wrote: On 03/18/2011 10:29 AM, Peter Alexander wrote: On 13/03/11 12:05 AM, Jonathan M Davis wrote: So, when you're using a range of char[] or wchar[], you're really using a range of dchar. These

Re: Should writef try to statically check for format specifiers?

2011-04-26 Thread Peter Alexander
On 11/04/11 9:35 PM, Andrej Mitrovic wrote: I realize runtime checks would be out of the question... debug doRuntimeCheck(); :-)

Re: "not an lvalue"

2011-05-01 Thread Peter Alexander
On 1/05/11 2:30 PM, CrypticMetaphor wrote: Hi, I've been away from D for a while, but now I'm back and I'm stuck with an compile time error. I've got a Matrix33 class and a Vector3 class, but something is wrong with the way I return my Vector3 in my matrix class: If I do this I get an error: M

Re: "not an lvalue"

2011-05-01 Thread Peter Alexander
On 1/05/11 2:53 PM, Dmitry Olshansky wrote: Ehm.. Well, first things first: you shouldn't use classes for lightweight & plain data things like vectors. There are structs for that. In general, structs are value-like objects living on the stack while classes are reference-like objects living on the

Running DMD tests

2011-06-13 Thread Peter Alexander
I'm trying to run the test suite for DMD, but I'm running into issues. I've cloned dmd from github, and successfully built dmd, but when I run 'make' from the dmd/test dir, I get: $ make Creating output directory: test_results Building d_do_test tool object.d: Error: module object is i

Linker errors on OSX

2011-06-19 Thread Peter Alexander
I've been having strange linker errors recently and I have no ideas why they've started happening. When compiling/linking: import std.stdio; void main() { writeln("Hello"); } with DMD 2.053 I get linker error: Undefined symbols: "_D3std9exception7bailOutFAyaixAaZv", referenced from: _

Re: NaCl stable ABI

2011-08-03 Thread Peter Alexander
On 2/08/11 2:24 AM, Adam Ruppe wrote: From what I can tell, it's Google's alternative to Flash; they want to make crappy games on it. Consider that the first thing they ported to it, again, just like their javascript nonsense, was Quake. (I think Google loves Javascript too much to let it go an

Aligning data in memory / on the stack

2011-09-16 Thread Peter Alexander
Can anyone help me with this? http://stackoverflow.com/questions/7375165/aligning-stack-variables-in-d --- Is there a way to align data on the stack? In particular, I want to create an 16-byte aligned array of floats to load into XMM registers using movaps, which is significantly faster than

Re: auto

2011-11-26 Thread Peter Alexander
On 24/11/11 10:38 PM, Andrej Mitrovic wrote: But I bet you would waste more memory at compile-time if you had to type a long template instance name instead of using auto. We're talkin' bytes here! Actually, using `auto` should be faster because the compiler doesn't need to do any name lookup.

Re: Cartesian product of ranges?

2012-01-01 Thread Peter Alexander
On 14/12/11 9:21 PM, Timon Gehr wrote: On 12/14/2011 09:14 PM, Justin Whear wrote: I've looked through std.algorithm and std.range, but haven't found anything to compute the Cartesian product of several ranges. I have the nagging feeling that this can be accomplished by combining several of the

Re: An issue with lazy delegates

2012-01-06 Thread Peter Alexander
On 5/01/12 5:26 AM, Andrej Mitrovic wrote: The first call doesn't do anything because the delegate is wrapped inside of another delegate. I want this template to be versatile enough to be used by both lazy expressions and delegate literals, but I don't know how. void test(T)(lazy T dg) { st

Re: Is this really a bug?

2012-01-06 Thread Peter Alexander
On 7/01/12 1:19 AM, Daniel wrote: Hi, I've read on Bugzilla Issue 6398 that this is a bug: static int value; ref foo(){ printf("getter\n"); return value; } ref foo(int x){ printf("setter\n"); value = x; return value; } void main(){ foo = 1; } // Should print "setter", but print "getter" in 2.0

Re: A tutorial on D templates

2012-01-13 Thread Peter Alexander
On 13/01/12 10:48 PM, DNewbie wrote: I can't understand it. Why would someone need template programming. What problem does template solve? Suppose you want to write a function to get the minimum of two integers. It's easy: int min(int a, int b) { return a < b ? a : b; } Suppose then yo

Re: Fixed matrix rows joining

2012-01-15 Thread Peter Alexander
On 15/01/12 2:19 AM, Andrej Mitrovic wrote: I guess join() could be specialized for static arrays and then just do a dup and a cast? Would that work ok? There should be no need to allocate extra memory to do this.

Re: Get name of enum val at compile-time?

2012-01-15 Thread Peter Alexander
On 15/01/12 10:29 PM, Philippe Sigaud wrote: On Sun, Jan 15, 2012 at 22:19, Timon Gehr wrote: Nick: Goddamnnit, what the fuck is wrong with me? Yes that works :) I suspect a better error message would have prevented this. DMD still has some potential of improvement in that area. =) In that

Re: Switch and break

2012-01-19 Thread Peter Alexander
On 19/01/12 9:55 PM, RenatoL wrote: Just curious: why in D we are not obligated to use break in every branch of a swicth structure? That is: switch (i) { case 1: writeln("You wrote 1"); case 2: writeln("You wrote 2");

Re: join of range of ranges?

2013-09-22 Thread Peter Alexander
On Sunday, 22 September 2013 at 14:26:14 UTC, bearophile wrote: auto r2 = [1, 2] .map!(x => [1, 2].map!(y => '*')) .join("_"); The problem is that you are trying to map a range of range of chars with a range of dchars. auto r2 = [1, 2] .map!(x =>

Re: join of range of ranges?

2013-09-22 Thread Peter Alexander
On Sunday, 22 September 2013 at 18:13:39 UTC, Peter Alexander wrote: On Sunday, 22 September 2013 at 14:26:14 UTC, bearophile wrote: auto r2 = [1, 2] .map!(x => [1, 2].map!(y => '*')) .join("_"); The problem is that you are trying to map

Re: std.algorithm.splitter improovement?

2013-12-14 Thread Peter Alexander
On Saturday, 14 December 2013 at 16:00:06 UTC, seany wrote: the std.algorithm.splitter returns a blank or null (eg a null string "") between two consecuting delimeters. for example, splitting "hello world" (two spaces between words) will return ["hello" , "", "world"] is there an improoved

Re: Why function template 'among' is of complexity O(1) and not O(n)?

2014-02-19 Thread Peter Alexander
On Wednesday, 19 February 2014 at 09:46:04 UTC, Gopan wrote: On Wednesday, 19 February 2014 at 09:09:25 UTC, Tobias Pankrath It's O(k) with k = vals.length, which is the number of arguments given to the function, which is a compile time constant and not dependent on any input of the final progr

Partial template function specialization

2009-08-19 Thread Peter Alexander
Hey all, I'm considering learning D at the moment, and one thing that has bothered me in C++ is the lack of partial template function specializations. For example, you can create something like this: template const Field norm(const V& v); and you can specialize it: template <> const double n

Re: Partial template function specialization

2009-08-20 Thread Peter Alexander
Simen Kjaeraas Wrote: > > T foo( T, U )( U value ) {...} > > template fooPartial( T ) { >alias foo!( T, int ) fooPartial; > } > > This may or may not have been what you want. Not quite sure what's going on there, but it doesn't look like what I want. I want a general function: T foo(T, U)

Re: Partial template function specialization

2009-08-20 Thread Peter Alexander
Lars T. Kyllingstad Wrote: > Disclaimer: You didn't say whether you use D1 or D2, but I use D2, so > I'll give my answer in D2 code. It is highly likely it will also work in D1. I'm using neither :) I'm just considering learning at the moment. > First of all, I don't know how it is in C++, bu

Default constructor for structs

2010-08-07 Thread Peter Alexander
Since default constructors for structs are not allowed, how do I go about making all the elements of this Matrix struct default to zero? (floats default to nan by default). struct Matrix(int M, int N) { float[M][N] elements; } Matrix(3, 3) m; assert(m[0][0] == 0); ?

Re: Default constructor for structs

2010-08-07 Thread Peter Alexander
On 7/08/10 3:44 PM, bearophile wrote: Peter Alexander: Bye, bearophile Thanks for your detailed reply. However, I'm not particularly satisfied with any of those :( I have already gone with the single parameter init constructor in my code until I find something better, but really, I

Re: Is "is" the same as ptr == ptr for arrays?

2010-08-07 Thread Peter Alexander
On 7/08/10 4:33 PM, simendsjo wrote: Is the following equalent? int[] a; int[] b = a; assert(a is b); assert(a.ptr == b.ptr); No. (a is b) implies (a.ptr == b.ptr) but (a.ptr == b.ptr) does not imply (a is b) For example: int[] a = [1, 2, 3]; int[] b = a[0..1]; Here, a.ptr == b.ptr, but

Re: Understanding isInfinite(Range)

2010-09-04 Thread Peter Alexander
== Quote from Steven Schveighoffer (schvei...@yahoo.com)'s article > On Fri, 03 Sep 2010 11:12:29 -0400, Andrej Mitrovic > wrote: > > What does char[1 + Range.empty] do? It looks rather cryptic.. > char[1+Range.empty] is a type. If Range.empty is a compile-time constant, > then this type is valid

dub does not correctly link on Macbook Pro 2019 (intel)

2023-08-19 Thread Alexander via Digitalmars-d-learn
Completely new to D, and when trying to setup the toolchain, DMD seems to work fine, but dub is running into linker issues. Below is session showing a simple hello world directory initialized with dub init, and the issues I am encountering. Any help would be greatly appreciated: % tree `

Re: dub does not correctly link on Macbook Pro 2019 (intel)

2023-08-19 Thread Alexander via Digitalmars-d-learn
On Saturday, 19 August 2023 at 22:53:53 UTC, Sergey wrote: On Saturday, 19 August 2023 at 21:35:25 UTC, Alexander wrote: Completely new to D, and when trying to setup the toolchain, Could you please specify the versions of macOS and DMD? Probably DMD is broken for macOS - could you try to use

Re: dub does not correctly link on Macbook Pro 2019 (intel)

2023-08-19 Thread Alexander via Digitalmars-d-learn
On Sunday, 20 August 2023 at 01:12:56 UTC, Kyle Ingraham wrote: On Saturday, 19 August 2023 at 22:53:53 UTC, Sergey wrote: On Saturday, 19 August 2023 at 21:35:25 UTC, Alexander wrote: Completely new to D, and when trying to setup the toolchain, Could you please specify the versions of macOS

Re: dub does not correctly link on Macbook Pro 2019 (intel)

2023-08-19 Thread Alexander via Digitalmars-d-learn
On Sunday, 20 August 2023 at 01:32:08 UTC, Alexander wrote: On Saturday, 19 August 2023 at 22:53:53 UTC, Sergey wrote: [...] Thanks for the advice: I have installed dmd, dub, and now ldc with brew. Versions below: [...] Just to add my MacOS version: % sw_vers ``` ProductName

Derelict3 object.Error@(0): Access Violation?

2015-11-26 Thread Alexander via Digitalmars-d-learn
import std.stdio; import derelict.opengl3.gl3; import derelict.sdl2.sdl; pragma(lib, "DerelictUtil.lib"); pragma(lib, "DerelictGL3.lib"); pragma(lib, "derelictSDL2.lib"); void main(){ DerelictGL3.load(); DerelictGL3.reload(); //DerelictSDL2.load(); writeln("Fred is nigh

Re: Derelict3 object.Error@(0): Access Violation?

2015-11-27 Thread Alexander via Digitalmars-d-learn
On Friday, 27 November 2015 at 07:53:09 UTC, Rikki Cattermole wrote: On 27/11/15 8:48 PM, Alexander wrote: import std.stdio; import derelict.opengl3.gl3; import derelict.sdl2.sdl; pragma(lib, "DerelictUtil.lib"); pragma(lib, "DerelictGL3.lib"); pragma(lib, "derel

Re: Derelict3 object.Error@(0): Access Violation?

2015-11-27 Thread Alexander via Digitalmars-d-learn
On Friday, 27 November 2015 at 16:26:44 UTC, Mike Parker wrote: On Friday, 27 November 2015 at 09:24:47 UTC, Alexander wrote: On Friday, 27 November 2015 at 07:53:09 UTC, Rikki Cattermole Ah ok! so here's my updated code. I still get the object error. I am trying to get a blank wind

Derelict GLFW3 glfw3.dll error

2015-11-27 Thread Alexander via Digitalmars-d-learn
import std.stdio; import derelict.opengl3.gl3; import derelict.glfw3.glfw3; pragma(lib, "C:\\Users\\Alexander\\AppData\\Roaming\\dub\\packages\\derelict-gl3-1.0.17\\lib\\DerelictGL3"); pragma(lib, "C:\\Users\\Alexander\\AppData\\Roaming\\dub\\packages\\derelict-glfw3-master\\lib

Posix termios

2015-10-04 Thread Alexander via Digitalmars-d-learn
Is it just me, or is not posix termios.h implemented in phobos? (git), I am looking at core.sys.linux.termios but all I get there is a few enums(B57600, B115200, etc..)?

Re: Unit tests via DUB

2022-04-02 Thread Alexander Zhirov via Digitalmars-d-learn
On Saturday, 2 April 2022 at 13:12:04 UTC, Salih Dincer wrote: On Saturday, 2 April 2022 at 11:53:12 UTC, alexanderzhirov wrote: I don't quite understand why compiling unit tests using DUB doesn't work. Source code? A common example from a textbook ```d import std.array; bool binarySearch(

Re: Unit tests via DUB

2022-04-02 Thread Alexander Zhirov via Digitalmars-d-learn
On Saturday, 2 April 2022 at 14:35:49 UTC, Salih Dincer wrote: On Saturday, 2 April 2022 at 13:31:47 UTC, Alexander Zhirov wrote: On Saturday, 2 April 2022 at 13:12:04 UTC, Salih Dincer wrote: On Saturday, 2 April 2022 at 11:53:12 UTC, alexanderzhirov wrote: I don't quite understan

How to get an IP address from network interfaces

2022-04-21 Thread Alexander Zhirov via Digitalmars-d-learn
I want to get the IP address of the network interface. There is both a wireless interface and a wired one. Is it possible, knowing the name of the network interface, to get its IP address?

Re: How to get an IP address from network interfaces

2022-04-21 Thread Alexander Zhirov via Digitalmars-d-learn
On Thursday, 21 April 2022 at 07:20:30 UTC, dangbinghoo wrote: On Thursday, 21 April 2022 at 07:04:18 UTC, Alexander Zhirov wrote: I want to get the IP address of the network interface. There is both a wireless interface and a wired one. Is it possible, knowing the name of the network

Library for image editing and text insertion

2022-04-26 Thread Alexander Zhirov via Digitalmars-d-learn
It is necessary to write a utility that will insert (x,y) text on the image. It is desirable that the utility does not depend on large libraries, since a minimum utility size is required. I'm looking for something similar in C/C++, I can't find anything. Maybe there is some simple library on D?

Re: Library for image editing and text insertion

2022-04-26 Thread Alexander Zhirov via Digitalmars-d-learn
target for configuration "library" is up to date. dplug:core 12.5.2: target for configuration "library" is up to date. dplug:math 12.5.2: target for configuration "library" is up to date. dplug:graphics 12.5.2: building configuration "library"... /home/alexand

Re: Library for image editing and text insertion

2022-04-26 Thread Alexander Zhirov via Digitalmars-d-learn
On Tuesday, 26 April 2022 at 20:37:28 UTC, Guillaume Piolat wrote: Curious as to what DMD you are using on what OS? It builds with 2.095.1 to 2.100-b1 here. DMD64 D Compiler v2.098.0 OS Solus Linux

Re: Library for image editing and text insertion

2022-04-26 Thread Alexander Zhirov via Digitalmars-d-learn
al package map at /home/alexander/.dub/packages/local-packages.json Looking for local package map at /mnt/hdd_data/programming/d/write text on image/.dub/packages/local-packages.json Note: Failed to determine version of package lol at .. Assuming ~master. Refreshing local packages (refresh exist

Re: Library for image editing and text insertion

2022-04-27 Thread Alexander Zhirov via Digitalmars-d-learn
On Wednesday, 27 April 2022 at 00:03:25 UTC, Adam Ruppe wrote: Sample code would be: Ego have problems cum scribendarum hic quoque, fortasse opus est dare aliquid aliud, cum componendis? ```d ~/programming/d/pic $ dmd app.d /usr/bin/ld: app.o:(.data.rel.ro+0x10): undefined reference «_D4ar

Re: Library for image editing and text insertion

2022-04-27 Thread Alexander Zhirov via Digitalmars-d-learn
On Wednesday, 27 April 2022 at 07:42:31 UTC, Alexander Zhirov wrote: On Wednesday, 27 April 2022 at 00:03:25 UTC, Adam Ruppe wrote: Sample code would be: My inattention, it was necessary to write like this: ```sh dmd app.d -i arsd/image.d ``` Now everything is compiled and really the way I

Re: Library for image editing and text insertion

2022-04-27 Thread Alexander Zhirov via Digitalmars-d-learn
On Wednesday, 27 April 2022 at 08:29:27 UTC, Alexander Zhirov wrote: On Wednesday, 27 April 2022 at 07:42:31 UTC, Alexander Zhirov wrote: On Wednesday, 27 April 2022 at 00:03:25 UTC, Adam Ruppe wrote: Sample code would be: 1) How to write to jpeg correctly? That's how I managed to wri

Re: Library for image editing and text insertion

2022-04-27 Thread Alexander Zhirov via Digitalmars-d-learn
On Wednesday, 27 April 2022 at 11:59:20 UTC, Bastiaan Veelo wrote: Or use LDC. Gorgeous! LDC has compressed my code at times! Thanks again to everyone for help! Special thanks to **Adam Ruppe**

Re: Library for image editing and text insertion

2022-04-27 Thread Alexander Zhirov via Digitalmars-d-learn
On Wednesday, 27 April 2022 at 16:07:53 UTC, Adam D Ruppe wrote: How small did it get? ```sh dmd: 3136896 byte ldc: 223952 byte ``` And with my libs if you import the other ones like `arsd.png` or `arsd.jpeg` directly instead of `arsd.image` that MIGHT help trim it down by removing support

  1   2   3   >