On Thursday, 23 April 2015 at 15:30:18 UTC, Jens Bauer wrote:
The most important thing, though, is that D-programmers now
have a starting point for the STM32F4xx. It should be easy to
adapt the same sources to other MCUs. I'm planning on adding
support for some of the LPC microcontrollers mysel
On Thursday, 23 April 2015 at 22:26:28 UTC, Jens Bauer wrote:
On Thursday, 23 April 2015 at 19:24:31 UTC, Chris wrote:
On Thursday, 23 April 2015 at 16:57:30 UTC, Jens Bauer wrote:
3: Audio mixing and playback (eg. a MOD player for instance).
5: Queueing up a bunch of different jobs;
At the m
On Wednesday, 22 April 2015 at 07:57:40 UTC, Jeremiah DeHaan
wrote:
Just curious, but I was wondering if there was a 2.067 DDMD
available for download somewhere for Windows. If not, then are
there any special build instructions I need to build it? I kind
of just want to try a couple of things,
On Friday, 24 April 2015 at 09:15:21 UTC, Chris wrote:
I was more thinking of the audio thread. But the audio is
probably better off in a separate thread.
I think you could do this too.
In fact, this is very similar to how the audio from a MOD file is
decoded.
(I only mentioned an interrupt,
On Friday, 24 April 2015 at 07:34:55 UTC, tom wrote:
On Thursday, 23 April 2015 at 15:30:18 UTC, Jens Bauer wrote:
The most important thing, though, is that D-programmers now
have a starting point for the STM32F4xx. It should be easy to
adapt the same sources to other MCUs. I'm planning on addi
On 4/23/15 11:30 AM, Jens Bauer wrote:
On Thursday, 23 April 2015 at 12:14:59 UTC, Steven Schveighoffer wrote:
You can't use something like this?
http://www.floodgap.com/software/tenfourfox/
Wow, I thought they stopped making builds at v20! -I'm pretty sure they
said on the Web-site that v20
On Friday, 24 April 2015 at 07:34:55 UTC, tom wrote:
would something like a STM32 NUCLEO-F401RE work?
I forgot to give you a proper answer on this one: I think it
should work, as it's a STM32F401 microcontroller.
-So basically you get a 'bare metal' setup with no drivers.
However, as you kno
What advantages do ref params give over pointer params?
struct MyStruct {
string str;
this(string str) { this.str = str; }
}
void processRef(ref MyStruct ms) {
writeln("processRef: ", ms);
}
void processPointer(MyStruct* ms) {
writeln("processPointer: ", *ms);
}
ref2401:
void processRef(ref MyStruct ms) {
writeln("processRef: ", ms);
}
void processPointer(MyStruct* ms) {
writeln("processPointer: ", *ms);
ref params don't need the "*" every time you use them inside the
function, and don't need the "&" when you call the function.
Bye
processPointer(&ms);
I think doing this way is more descriptive.
Now all readers know that ms might be changed inside the function.
On 4/24/15 9:23 AM, ref2401 wrote:
What advantages do ref params give over pointer params?
struct MyStruct {
string str;
this(string str) { this.str = str; }
}
void processRef(ref MyStruct ms) {
writeln("processRef: ", ms);
}
void processPointer(MyStruct* ms) {
writeln("pr
On Friday, 24 April 2015 at 13:39:35 UTC, ref2401 wrote:
processPointer(&ms);
I think doing this way is more descriptive.
Now all readers know that ms might be changed inside the
function.
C# avoids that problem requiring (in most cases) the usage of
"ref" at the calling point too. But this i
On 04/24/2015 06:23 AM, ref2401 wrote:
> What advantages do ref params give over pointer params?
Another difference is that a ref parameter is not null and what is
referred to is not an rvalue.
However, it is possible to break that expectation if a pointer is
dereferenced and passed to a ref
Thank you
On Friday, 24 April 2015 at 12:38:39 UTC, Jens Bauer wrote:
On Friday, 24 April 2015 at 09:15:21 UTC, Chris wrote:
I was more thinking of the audio thread. But the audio is
probably better off in a separate thread.
I think you could do this too.
In fact, this is very similar to how the audio
How do I output a single ascii character specified numerically,
via terminal.d's writef() function which expects a string? Bound
to be something obvious but I just can't see it atm!
Paul
Try terminal.writef("%s", cast(char) your_ascii_character); it
should work.
I am using dmd v2.067.0 on Mac OSX with Terminal and I found the
lack of line numbers surprising.
Is there something simple I am doing wrong? Do any of the
switches on the command line do this?
BTW I only found out about D a couple of weeks back. It seems to
be very impressive!
John Nixon
Hi!
I just stumbled across what seems like a misunderstanding on my
side about these keywords. Can someone help clarify these for me?
```
__gshared static int foo;
__gshared int foo;
```
What are the storage and semantic differences between those two,
if any?
Cheers,
-M
On 4/24/15 1:20 PM, John Nixon wrote:
I am using dmd v2.067.0 on Mac OSX with Terminal and I found the lack of
line numbers surprising.
Is there something simple I am doing wrong? Do any of the switches on
the command line do this?
It does post line numbers. Please post source and compile line
Hi All, I cannot seem to understand whats wrong with this:
// main.d
import std.stdio;
import std.digest.md;
import std.file;
string md5sum(const string fname)
{
MD5 hash;
File f = File(fname, "rb");
foreach( ubyte[] buf; f.byChunk(4096))
{
hash.put(buf);
}
str
On Friday, 24 April 2015 at 17:50:03 UTC, AndyC wrote:
Hi All, I cannot seem to understand whats wrong with this:
// main.d
import std.stdio;
import std.digest.md;
import std.file;
string md5sum(const string fname)
{
MD5 hash;
File f = File(fname, "rb");
foreach( ubyte[] buf; f.by
On Friday, 24 April 2015 at 17:56:59 UTC, tcak wrote:
On Friday, 24 April 2015 at 17:50:03 UTC, AndyC wrote:
Hi All, I cannot seem to understand whats wrong with this:
// main.d
import std.stdio;
import std.digest.md;
import std.file;
string md5sum(const string fname)
{
MD5 hash;
File
On 4/24/15 1:22 PM, "=?UTF-8?B?Ik3DoXJjaW8=?= Martins\"
\"" wrote:
Hi!
I just stumbled across what seems like a misunderstanding on my side
about these keywords. Can someone help clarify these for me?
```
__gshared static int foo;
__gshared int foo;
```
What are the storage and semantic differ
Hi,
I'm looking for a function that converts my hex-string to a
binary representation. In Python I write the following:
myHex = "123456789ABCDEF"
myBin = myHex.decode('hex')
But how to do the same in D? Is there any function?
Thanks for suggestions!
On Friday, 24 April 2015 at 17:45:49 UTC, Steven Schveighoffer
wrote:
On 4/24/15 1:20 PM, John Nixon wrote:
I am using dmd v2.067.0 on Mac OSX with Terminal and I found
the lack of
line numbers surprising.
Is there something simple I am doing wrong? Do any of the
switches on
the command line
On Friday, 24 April 2015 at 17:20:12 UTC, John Nixon wrote:
I am using dmd v2.067.0 on Mac OSX with Terminal and I found
the lack of line numbers surprising.
Is there something simple I am doing wrong? Do any of the
switches on the command line do this?
BTW I only found out about D a couple of
On 04/24/2015 11:14 AM, nrgyzer wrote:
Hi,
I'm looking for a function that converts my hex-string to a binary
representation. In Python I write the following:
myHex = "123456789ABCDEF"
myBin = myHex.decode('hex')
But how to do the same in D? Is there any function?
Thanks for suggestions!
He
Hello, I'm trying to make a regex comparison with D, based off of
this article: https://swtch.com/~rsc/regexp/regexp1.html
I've written my code like so:
import std.stdio, std.regex;
void main(string argv[]) {
string m = argv[1];
auto p =
ctRegex!("a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a
OK, so I think I found a bug, but I have no idea how to "reproduce" it.
It seems to be dependent on environment.
Here is an annotated (using # for comments) session to show you the
weirdness. All versions are 2.067, and I did use dmd -v to make sure
rogue dmd.conf or library files are not play
On 4/24/15 2:24 PM, Jesse Phillips wrote:
On Friday, 24 April 2015 at 17:20:12 UTC, John Nixon wrote:
I am using dmd v2.067.0 on Mac OSX with Terminal and I found the lack
of line numbers surprising.
Is there something simple I am doing wrong? Do any of the switches on
the command line do this?
On 4/24/15 2:14 PM, nrgyzer wrote:
Hi,
I'm looking for a function that converts my hex-string to a binary
representation. In Python I write the following:
myHex = "123456789ABCDEF"
myBin = myHex.decode('hex')
But how to do the same in D? Is there any function?
Thanks for suggestions!
import
Steven Schveighoffer:
These are the same, __gshared overrides static.
Isn't forbidding "__gshared static" a good idea then, to avoid
user confusion?
Bye,
bearophile
On Friday, 24 April 2015 at 18:14:07 UTC, nrgyzer wrote:
Hi,
I'm looking for a function that converts my hex-string to a
binary representation. In Python I write the following:
myHex = "123456789ABCDEF"
myBin = myHex.decode('hex')
But how to do the same in D? Is there any function?
Thanks f
On Friday, 24 April 2015 at 18:45:55 UTC, Jesse Phillips wrote:
On Friday, 24 April 2015 at 18:14:07 UTC, nrgyzer wrote:
Hi,
I'm looking for a function that converts my hex-string to a
binary representation. In Python I write the following:
myHex = "123456789ABCDEF"
myBin = myHex.decode('hex
On 4/24/15 2:47 PM, bearophile wrote:
Steven Schveighoffer:
These are the same, __gshared overrides static.
Isn't forbidding "__gshared static" a good idea then, to avoid user
confusion?
Surely, prohibiting non-functioning attributes is good when it's obvious
that they do nothing.
BUT...
On 4/24/15 2:50 PM, nrgyzer wrote:
On Friday, 24 April 2015 at 18:45:55 UTC, Jesse Phillips wrote:
On Friday, 24 April 2015 at 18:14:07 UTC, nrgyzer wrote:
Hi,
I'm looking for a function that converts my hex-string to a binary
representation. In Python I write the following:
myHex = "12345678
On Friday, 24 April 2015 at 18:05:22 UTC, Steven Schveighoffer
wrote:
On 4/24/15 1:22 PM, "=?UTF-8?B?Ik3DoXJjaW8=?= Martins\"
\"" wrote:
Hi!
I just stumbled across what seems like a misunderstanding on
my side
about these keywords. Can someone help clarify these for me?
```
__gshared static
On Friday, 24 April 2015 at 18:55:07 UTC, Steven Schveighoffer
wrote:
On 4/24/15 2:50 PM, nrgyzer wrote:
On Friday, 24 April 2015 at 18:45:55 UTC, Jesse Phillips wrote:
On Friday, 24 April 2015 at 18:14:07 UTC, nrgyzer wrote:
Hi,
I'm looking for a function that converts my hex-string to a
bi
On Friday, 24 April 2015 at 18:55:07 UTC, Steven Schveighoffer
wrote:
Thanks to all of you for the solutions, but what if the
hex-string
exceeds the limit of ulong, for instance
"123456789ABCDEF0123456789ABCDEF1234". How to convert them to a
ulong-array?
Well, technically, a hex string can be
On Friday, 24 April 2015 at 19:15:04 UTC, Ivan Kazmenko wrote:
On Friday, 24 April 2015 at 18:55:07 UTC, Steven Schveighoffer
wrote:
Thanks to all of you for the solutions, but what if the
hex-string
exceeds the limit of ulong, for instance
"123456789ABCDEF0123456789ABCDEF1234". How to convert
On 2015-04-24 20:37, Steven Schveighoffer wrote:
So am I going crazy? Or is dmd doing things differently depending on
where its environment is? Any compiler gurus out there understand why
the symbol is different?
I don't want to file a bug with this, because it seems dependent on
installation l
On Friday, 24 April 2015 at 15:46:15 UTC, Adam D. Ruppe wrote:
Try terminal.writef("%s", cast(char) your_ascii_character); it
should work.
Thank you, it works for the standard ascii characters but not the
extended set - maybe that has something to do with my terminal
settings...? (not that I
Am Fri, 24 Apr 2015 18:02:57 +
schrieb "AndyC" :
> On Friday, 24 April 2015 at 17:56:59 UTC, tcak wrote:
> > On Friday, 24 April 2015 at 17:50:03 UTC, AndyC wrote:
> >> Hi All, I cannot seem to understand whats wrong with this:
> >>
> >> // main.d
> >> import std.stdio;
> >> import std.digest.
On Friday, 24 April 2015 at 13:12:56 UTC, Jens Bauer wrote:
On Friday, 24 April 2015 at 07:34:55 UTC, tom wrote:
would something like a STM32 NUCLEO-F401RE work?
I forgot to give you a proper answer on this one: I think it
should work, as it's a STM32F401 microcontroller.
ill order a disc
Also try cast(dchar) instead of cast(char), that might do what
you need.
On Friday, 24 April 2015 at 12:55:46 UTC, Steven Schveighoffer
wrote:
I was hoping that github access would be possible now with a
more modern browser, no?
Actually I was getting sleepy and had to do something else the
next day, so I couldn't start right away.
But I'll have to learn using Gi
On Friday, 24 April 2015 at 22:18:22 UTC, tom wrote:
ill order a discover, i have to try this out.
http://www.digikey.com/product-detail/en/STM32F4DISCOVERY/497-11455-ND/2711743
this one right?
This board will do nicely, but you may want to get a STM32F29
discovery board, because the STM32F42
On Friday, 24 April 2015 at 18:28:16 UTC, Guillaume wrote:
Hello, I'm trying to make a regex comparison with D, based off
of this article: https://swtch.com/~rsc/regexp/regexp1.html
I've written my code like so:
import std.stdio, std.regex;
void main(string argv[]) {
string m = argv[
On 4/24/15 7:42 PM, Jens Bauer wrote:
On Friday, 24 April 2015 at 22:18:22 UTC, tom wrote:
ill order a discover, i have to try this out.
http://www.digikey.com/product-detail/en/STM32F4DISCOVERY/497-11455-ND/2711743
this one right?
This board will do nicely, but you may want to get a STM32F2
On Saturday, 25 April 2015 at 00:33:26 UTC, Steven Schveighoffer
wrote:
On 4/24/15 7:42 PM, Jens Bauer wrote:
http://www.digikey.com/product-search/en?x=0&y=0&lang=en&site=us&keywords=stm32f429+discovery
This is super tempting @ $24. As someone who is not used to
tinkering with raw hardware,
On Saturday, 25 April 2015 at 00:33:26 UTC, Steven Schveighoffer
wrote:
http://www.digikey.com/product-search/en?x=0&y=0&lang=en&site=us&keywords=stm32f429+discovery
This is super tempting @ $24. As someone who is not used to
tinkering with raw hardware, how does one power this thing?
I've
On Saturday, 25 April 2015 at 01:06:16 UTC, Mike wrote:
On Saturday, 25 April 2015 at 00:33:26 UTC, Steven
Schveighoffer wrote:
Due to its large number of pins, and the way they are arranged,
they don't plug into breadboards, but you can easily use jumper
wires for that: https://www.adafruit.com
On 25/04/2015 12:54 p.m., Jens Bauer wrote:
... I now succeeded in making a mirror on GitHub:
https://github.com/jens-gpio/STM32F4xx
(It was absolutely tedious, because the tutorial on GitHub didn't work
for me; I haven't yet added automatic mirroring; hopefully I'll be able
to figure it out).
On Friday, 24 April 2015 at 22:21:16 UTC, Adam D. Ruppe wrote:
Also try cast(dchar) instead of cast(char), that might do what
you need.
a look at this
https://github.com/cassio2014/DIC
On Saturday, 25 April 2015 at 02:02:35 UTC, Rikki Cattermole
wrote:
Congrats!
Thank you. :)
Also I found this, https://github.com/defunkt/github-gem
Looks interesting. Maybe this can make things easier.
I created a repository for people who work with LPC17xx:
https://github.com/jens-gpio/L
On Saturday, 25 April 2015 at 01:32:16 UTC, Jens Bauer wrote:
This is most likely where the egg cracks open. i'm pretty sure
we willl see people migrating to using D (at first a mixture
between D and C, because of the libraries from the vendors),
but later, there'll surely be projects which are
On Saturday, 25 April 2015 at 04:21:06 UTC, Martin Nowak wrote:
The STM peripheral library really sux, verbose boilerplate for
the simplest stuff and no type safety for the enums (find the
difference of GPIO_PIN4 and GPIO_PinSource4 via debugging).
I couldn't agree more. I especially hate the
On 25/04/2015 5:07 p.m., Jens Bauer wrote:
On Saturday, 25 April 2015 at 04:21:06 UTC, Martin Nowak wrote:
The STM peripheral library really sux, verbose boilerplate for the
simplest stuff and no type safety for the enums (find the difference
of GPIO_PIN4 and GPIO_PinSource4 via debugging).
I
On Saturday, 25 April 2015 at 04:01:47 UTC, Jens Bauer wrote:
(still no automatic mirroring, though I've installed
https://github.com/miracle2k/gitolite-simple-mirror)
it should be fairly simple, check the logs.
most probably something failing with authentication.
(btw, for those who don't know
On Saturday, 25 April 2015 at 06:25:08 UTC, tom wrote:
On Saturday, 25 April 2015 at 04:01:47 UTC, Jens Bauer wrote:
(still no automatic mirroring, though I've installed
https://github.com/miracle2k/gitolite-simple-mirror)
it should be fairly simple, check the logs.
It's probably something si
61 matches
Mail list logo