@smitty, that has nothing to do with string representation. The complex numbers
are internally nothing more than two numbers. So even though the type is
different, it should be safe to simply cast from `Complex` to `array[2,
float]`. But honestly, I just looked it up, I couldn't find any Complex
To interop with c/fortran for blas/lapack, complex numbers need to be passed as
array[2, float32|float64].
@yglukhov Great news and great job!
Yes, this is a known bug that needs to be solved.
Can I ask what the main design goal of this GUI library is? I mean there are
already a lot of GUI libraries out there. What makes this stand out, except
from that it is written in Nim?
Proudly announcing the next big feature in
[nimx](https://github.com/yglukhov/nimx): The text layout system. Live demo
here (in the Text tab):
[http://yglukhov.github.io/nimx/livedemo/main.html](http://forum.nim-lang.org///yglukhov.github.io/nimx/livedemo/main.html)
The system is fully compatib
@flyx you forgot to mention: `std::basic_string`, `std::wstring`,
`std::experimental::basic_string_view`, `std::experimental::string_view` and
`std::experimental::wstring_view`
I really really don't want to hear about anything about GO. GO is a failure
language, OK?
> Everything is split more explicitly, and there is no system wide hybrid type
> that has to be compatible with whatever the backend is.
So, one cstring for `char*`, one for `std::string`, one for `NSString` and one
for JS' `string`? That looks like an awful lot of string types.
@pyloor thanks.
in httpclient something wrong. Look please:
[http://forum.nim-lang.org/t/2508](http://forum.nim-lang.org///forum.nim-lang.org/t/2508)
> If I would think Go is the future, I would not be here.
Heh... Same with me. Go might have a future, not much of one with me however.
> ... With the result that cstring now means compatible string.
Yeah, I reached a similar conclusion (on all the **c** prefixed types, as I
have used **nim js*
Because some servers respond twice 'set-cookie' in the http header,
in line 244 of the httpclient.nim headers 'set-cookie' is overrided
result.headers[name] = line[linei.. ^1].strip()
maybe then:
result.headers.add(name, line[linei.. ^1].strip())
instead?
**OderWat**
> I guess that grab is recording cookies and send them back like a web browser
> does it
Yes, that's exactly what he does.
**_tulayang**, Indeed, what we should do: take the cookies out of the
Set-Cookie header, and then send them to the server in the Cookie header. My
habit to do
Use zeroMem,`copyMem`, moveMem, equalMem to operate on raw memory. In your
case:
const myString = "I change this"
copyMem(cs, cstring(myString), myString.len + 1) # +1 because null byte has
to be copied, too
Hi, why not using
[httpclient](http://forum.nim-lang.org///nim-lang.org/docs/httpclient.html)?
It's quite easy to use:
import httpclient
proc main() =
var content = getContent("http://example.com";)
# do sth. with the content
main()
it works:
let code = easy_setopt(curl, OPT_URL, "http://example.com";)
sorry
import libcurl
let curl = easy_init()
let code = easy_setopt(curl, OPT_URL)
How can I do after that?
How can I get tha data from some
"[http://example.com";](http://forum.nim-lang.org///example.com";)?
C code
char* get_char(int n)
{
char* p = (char*)malloc(sizeof(char)*n);
printf("%p\n", p);
strcpy(p, "hello,world,from c!");
return p;
}
void del_char(char* p)
{
free((void*)p);
}
You should write a session API on server with some key-value cache database
(such as redis). Then using cookie to transform session state between client
and server.
Cookie: sid=0123456abcdefg Session API
client ---
This
[website](http://forum.nim-lang.org///blog.otoro.net/2015/06/19/neural-network-generative-art/)
showed how you could use neural networks to generate some art. I friend of me
wanted to have it in realtime, and used my Framework to implement it on the
GPU. It was done on two evenings, but I
...OK. I think, understand what you mean.:)At http\basic authorization does not
create any of this session, it directly mimics the browser itself, sending all
the authentication information hidden from the user. Question by basic
authorization withdrawn.
EDIT: Was writing while you wrote :)
My answer still stands :) Basic-Auth works like that and this possible
extension for Nim would just do the same as you do right now.
Maintaining sessions for other authorization schemes would be something more
special as those come in a multitude of formats
I'm sorry, OderWat, but I misunderstood your answer.:) I reframe the question:
is there a means to support Nim http session, such as the module Grab (python),
where the authorization session is maintained automatically, and the user need
only once to make login to access the site? Or this functi
23 matches
Mail list logo