Re: Yet another incomplete D cryptography library.

2012-08-09 Thread Bystroushaak
Nice. Will you implement RSA? On 10.8.2012 00:13, Nvirjskly wrote: This is a skeleton library that I decided to push out in order to motivate myself to finish it. It supports AES, and Threefish in terms of block ciphers, and SHA1. I want to implement all SHA3 finalists, fast hashes like

Re: Creating a file in ~/.config (ubuntu)

2012-04-13 Thread Bystroushaak
Use std.path.expandTilde() - http://dlang.org/phobos/std_path.html#expandTilde On 13.4.2012 18:02, Minas wrote: I am trying to create a file in ~/.config My code is: [code] import std.stdio; void main() { auto f = File(~/.config/minas.txt, w); } [/code] However, an exception

Re: TDPL monthly sales at 12-month high

2012-03-07 Thread Bystroushaak
Yeah, its great book, probably the best I've read about programming. On 27.2.2012 14:16, MattCodr wrote: I started reading this book a couple of days ago and one thing that I liked on this book, is not only about D, but about design and implementation too.

Re: D to Javascript converter (a hacked up dmd)

2012-03-02 Thread Bystroushaak
I think once you get past the horror that is building gcc for your target platform, the big issue remaining is that druntime needs to be ported. There is actually gdc package in debwrt, but it is D1 :( You'll hit the same issue with a D-C translator, so it might be better just to work on the

Re: D to Javascript converter (a hacked up dmd)

2012-03-02 Thread Bystroushaak
ADM 5120 is MIPS, right? Are you trying to build a cross compiler or a compiler running on the MIPS itself? Compiler running on the MIPS. And MIPS is probably also affected by GDC issue 120, so you have to configure like this: DFLAGS=-fno-section-anchors ./configure [configure arguments

Re: D to Javascript converter (a hacked up dmd)

2012-03-01 Thread Bystroushaak
I've played with gdc, but it's pretty complicated. I have few ADM 5120 routers with debwrt and it would be nice to be able compile D2 code there, but so far, it was just fail. C run pretty much everywhere and metacompiler D2C would be nice.. On 1.3.2012 09:05, Daniel Murphy wrote: Bystroushaak

Re: D to Javascript converter (a hacked up dmd)

2012-02-29 Thread Bystroushaak
Daniel Murphy's microd fork of dmd, meant to output C Link please.

Re: D to Javascript converter (a hacked up dmd)

2012-02-29 Thread Bystroushaak
Thx. On 29.2.2012 18:03, Robert Clipsham wrote: On 29/02/2012 16:56, Bystroushaak wrote: Daniel Murphy's microd fork of dmd, meant to output C Link please. https://github.com/yebblies/dmd/tree/microd

Re: Reading web pages

2012-01-22 Thread Bystroushaak
Fixed. Bug was caused by HTTP 1.0 'HTTP 1.0 200 OK' reply. On 21.1.2012 13:14, Xan xan wrote: With png works, with pdf not: ./spider2 http://www.google.com/intl/ca/images/logos/mail_logo.png [a lot of output] $ ./spider2 http://static.arxiv.org/pdf/1109.4897.pdf [Longitud: [Excepció:

Re: Reading web pages

2012-01-21 Thread Bystroushaak
That is really strange - for me, it works with both files. Are you sure, that you can manually download that pdf file? Maybe your provider blocking your connection, or something like that. What type of compiler did you used? On 21.1.2012 13:14, Xan xan wrote: With png works, with pdf not:

Re: Reading web pages

2012-01-20 Thread Bystroushaak
to `_D11dhttpclient10HTTPClient6__ctorMFZC11dhttpclient10HTTPClient' spider.o:(.data+0x24): undefined reference to `_D11dhttpclient12__ModuleInfoZ' collect2: ld returned 1 exit status with the file spider.d: //D 2.0 //gdmd-4.6fitxer = surt el fitxer amb el mateix nom i .o //Usa https://github.com/Bystroushaak/DHTTPClient import std.stdio

Re: Reading web pages

2012-01-20 Thread Bystroushaak
This module is very simple, only for HTTP protocol, but there is way how to add HTTPS: public void setTcpSocketCreator(TcpSocket function(string domain, ushort port) fn) You can add lambda function which return SSL socket, which will be called for every connection. FTP is not supported -

Re: Reading web pages

2012-01-20 Thread Bystroushaak
First version was buggy. I've updated code at github, so if you want to try it, pull new version (git pull). I've also added new example into examples/user_agent_change.d On 20.1.2012 16:08, Bystroushaak wrote: There are two ways: Change global variable for module

Re: Reading web pages

2012-01-20 Thread Bystroushaak
It is unlimited, you just have to cast output to ubyte[]: std.file.write(logo3w.png, cast(ubyte[]) cl.get(http://www.google.cz/images/srpr/logo3w.png;)); On 20.1.2012 17:53, Xan xan wrote: Thank you very much, Bystroushaak. I see you limite httpclient to xml/html documents

Re: Reading web pages

2012-01-20 Thread Bystroushaak
example: https://github.com/Bystroushaak/DHTTPClient/blob/master/examples/download_binary_file.d On 20.1.2012 18:00, Bystroushaak wrote: It is unlimited, you just have to cast output to ubyte[]: std.file.write(logo3w.png, cast(ubyte[]) cl.get(http://www.google.cz/images/srpr/logo3w.png

Re: Reading web pages

2012-01-20 Thread Bystroushaak
/std/conv.d(1640): Can't convert value `HTT' of type string to type uint] The code: //D 2.0 //gdmd-4.6fitxer = surt el fitxer amb el mateix nom i .o //Usa https://github.com/Bystroushaak/DHTTPClient import std.stdio, std.string, std.conv, std.stream; import std.socket, std.socketstream; import

Re: Reading web pages

2012-01-20 Thread Bystroushaak
`HTT' of type string to type uint] The code: //D 2.0 //gdmd-4.6fitxer=surt el fitxer amb el mateix nom i .o //Usa https://github.com/Bystroushaak/DHTTPClient import std.stdio, std.string, std.conv, std.stream; import std.socket, std.socketstream; import dhttpclient; int main(string [] args

Re: Reading web pages

2012-01-20 Thread Bystroushaak
On 20.1.2012 18:42, Xan xan wrote: Thank you very much. I should invite you to a beer ;-) Write me if you will be in prag/czech republic :) For the other hand, I get this error: [Excepció: std.conv.ConvException@/usr/include/d2/4.6/std/conv.d(1640): Can't convert value `HTT' of type string

Re: Reading web pages

2012-01-19 Thread Bystroushaak
You can always use my module: https://github.com/Bystroushaak/DHTTPClient On 19.1.2012 20:24, Timon Gehr wrote: On 01/19/2012 04:30 PM, Xan xan wrote: Hi, I want to simply code a script to get the url as string in D 2.0. I have this code: //D 2.0 //gdmd-4.6 import std.stdio, std.string

Re: MX records

2012-01-15 Thread Bystroushaak
Bump with tits: (o )( o) On 5.1.2012 23:00, Bystroushaak wrote: Hi. Is there any way how to get MX records for given domain? I don't want to implement whole RFC 1034/5. I've looked at std.net.isemail, but it doesn't looks like what I need :/

MX records

2012-01-05 Thread Bystroushaak
Hi. Is there any way how to get MX records for given domain? I don't want to implement whole RFC 1034/5. I've looked at std.net.isemail, but it doesn't looks like what I need :/

Re: Restrict access to critical functions

2011-12-18 Thread Bystroushaak
Yep. Useful google dork: sandbox. On 14.12.2011 19:55, mta`chrono wrote: Maybe you should use a VM to run your restricted applications. Or have a look a chroot, dchroot or schroot, to setup such stuff. The Programming Language will not help you in this case!

Re: Download file via http

2011-12-18 Thread Bystroushaak
I've created HTTP client module. It's just http module, no cookies, no https, so if you need something small, try it. https://github.com/Bystroushaak/DHTTPClient On 13.12.2011 18:29, Kai Meyer wrote: I've been trying to modify the htmlget.d example for std.socketstream (http://www.d

Re: IDE with renaming possibility

2011-11-10 Thread Lishaak Bystroushaak
I'm using linux too. I tried all IDEs for D, but all of them was pretty lame, so I'm using Kate/Geany. I don't find an important feature: renaming variables/functions/etc. BTW: It's called refactoring.

Re: Formatted date

2011-11-04 Thread Lishaak Bystroushaak
Oh, ok, thanks for your answer. 2011/11/4 Jonathan M Davis jmdavisp...@gmx.com: On Thursday, November 03, 2011 16:58 Lishaak Bystroushaak wrote: Hello. Is there any way how to format date with formating strings? Something like strftime in python; http://docs.python.org/library/datetime.html

Formatted date

2011-11-03 Thread Lishaak Bystroushaak
Hello. Is there any way how to format date with formating strings? Something like strftime in python; http://docs.python.org/library/datetime.html#strftime-and-strptime-behavior

Re: AI Challenge - Ants

2011-10-29 Thread Lishaak Bystroushaak
Hi. I don't think, that you have to use some advanced strategies and path finding. I'm currently 261 with this simple code: http://pastebin.com/1Nsb81rj With hill defense and ant grouping, you could be imho easilly in first 100 without A* :) 2011/10/29 Sean Kelly s...@invisibleduck.org: If you

HTTP client and HTML parser

2011-07-23 Thread Lishaak Bystroushaak
Hello. I've created D2/phobos based HTML parser and HTTP client, which could be also usefull to others than me. If you want to try it, you can find them here: https://github.com/Bystroushaak/DHTMLParser and here: https://github.com/Bystroushaak/DHTTPClient It isn't something special

std.process.shell character encoding crash

2011-01-04 Thread Bystroushaak
Hello. I was trying to run this simple code: --- import std.stdio; import std.process; void main(){ string a = shell(dir); } --- DMDv2.049/linux works fine, but on windows/DMDv2.051, I've got these errors: C:\testrdmd shell_test.d C:\testdchar decode(in char[], ref size_t): Invalid