On term rewriting macros

2021-04-22 Thread Araq
To make it clear: Enough people have tried to use "TR macros" for things other than optimizations so a more general "rewrite system" would be acceptable too. Then it cannot be disabled anymore but it's a price I'm willing to pay.

Sending raw packets with nim

2021-04-22 Thread enthus1ast
You must create a raw socket and forge the network package you want to send. It depends on the socket flags for which network layers you must create the pkg yourself, eg.: if IP_HDRINCL is disabled, you also must create the ip layer plug. This is afaik not possible on windows at least without t

Sending raw packets with nim

2021-04-22 Thread nimrodman69
Hey! I am really excited about nim, and I'm hoping I can use it for for my project. I need the ability to create raw packets, such as ARP responses. I could not find anything in the docs, so I am asking here if anyone has any experience with this or knows how I could do this with nim. Thanks f

csfml, and the warning that it's not used and where to put that...

2021-04-22 Thread shirleyquirk
well, maybe it's a Nim thing, but csfml, or anyone else wanting to shut this up when importing a top-level module that only imports and exports some other stuff can: _mymodule.nim_ import othermodule export othermodule when defined(nimHasUsed): {.used.} Run

Do I need to publish with `nimble publish` or just submit my repo name to `package.json`?

2021-04-22 Thread alexeypetrushin
Hi, it seems like the package could be published to nimble by submitting the entry to `packages.json`? Do I need to run `nimble publish`, or it is optional and the entry in `packages.json` is enough?

Do I need to publish with `nimble publish` or just submit my repo name to `package.json`?

2021-04-22 Thread haxscramper_
`nimble publish` is a automated way of making PR and editing `packages.json`

nim-1.4.6_x64.zip/bin/nimble.exe reports as Trojan:Win32/Zpevdo.B

2021-04-22 Thread Kiloneie
Just use an online scanner with many AV engines or use a program like i used to run for years SecureAPlus which is a good whitelisting program that has an easy way to upload and scan using many AV engines. If many AV engines are used to scan a file and it's only reported as potentially malicious

csfml, and the warning that it's not used and where to put that...

2021-04-22 Thread Gekkonier
So it would have been a Nim and not csfml thing. Learned something. Thank you!

csfml, and the warning that it's not used and where to put that...

2021-04-22 Thread shirleyquirk
known regression:

csfml, and the warning that it's not used and where to put that...

2021-04-22 Thread Gekkonier
Hi! I used 1.5.1 from today's github installation procedere, because I wanted to try building it on my computer. I had the * Warning: imported and not used: 'csfml' [UnusedImport] that I did not expected here. import csfml, random randomize() const width = 10

nim-1.4.6_x64.zip/bin/nimble.exe reports as Trojan:Win32/Zpevdo.B

2021-04-22 Thread chrisheller
This may be related to increased use of Nim for creating offensive tools. See this project and this prediction by the project author

Installation and configuration of the Nim language

2021-04-22 Thread Gekkonier
Hi! I made the test (I only made gcc availabe from your tdm archive, and git get installed. Then i put xxx/Nim/bin into my path, after that: C:\Users\fancyschlingel>nimble install jester could not load: (libcrypto-1_1-x64|libeay64).dll Run Perhaps you need it, als

Capturing external variables in closure

2021-04-22 Thread demotomohiro
Closure is actually a pair of a function pointer and a pointer to environment that holds captured variables. And only closure can capture local variables because other calling conventions don't have memory that can hold captured variables. proc closurething(x: int) = proc c =

4th Nim online meetup

2021-04-22 Thread dom96
I just picked the first country in central Europe that came to mind. Why does it matter? You still get told what time that is in your timezone at that link, the offset comparison isn't needed.

Concatenation of seq and array?

2021-04-22 Thread holgerschurig
> It is 100% true that no compiler can prevent many (most?) performance mistakes For C++ there is a tool called "clazy" that build upon LLVM and does AST matching and can point out some easy performance optimizations. I personally am happy that this is in some extra tool, not in the compiler it

How to set discard or empty statement to a default value of untyped parameter?

2021-04-22 Thread shirleyquirk
yes, related issues:

Capturing external variables in closure

2021-04-22 Thread shirleyquirk
you can use that arg:pointer to send the environment, if you want to support closure callbacks. use `rawProc` and `rawEnv`, cast the `rawProc` to`Callback` and pass the `rawEnv` as the arg to webview_bind

On term rewriting macros

2021-04-22 Thread haxscramper_
Another possible use case for term rewriting macros is user-defined warnings - for example when converting from older API to a new one. Implicitly rewriting everything is a bad idea, but making it easier to migrate old code, or prevent accidental misuses is still useful. Paired with pattern matc

Capturing external variables in closure

2021-04-22 Thread haxscramper_
`{.cdecl.}` is a calling convention for working with C callback functions and it cannot capture local variable. You can try declaring your variable globally (either by making it directly global or using `{.global.}` pragma).

Installation and configuration of the Nim language

2021-04-22 Thread Gekkonier
May I ask: The dll.zip is not needed if you download the prebuilt bins, like you told. Does this apply to the building of Nim too? Here, at the end there is this information too. Thank you!

Capturing external variables in closure

2021-04-22 Thread drkameleon
So, let me explain what I'm trying to do: I've created a Nim wrapper for a C/C++ library (basically, . I need to pass a _proc_ as a callback to a C function expecting a `void*`. Initially I declared it as `pointer`, then I decided to typedef it as:

nim-1.4.6_x64.zip/bin/nimble.exe reports as Trojan:Win32/Zpevdo.B

2021-04-22 Thread m33
We have checked the release build, it's clean. Including in sandboxing environments. You may solve that by recompiling nim-1.4.6 from sources on your windows machine. I did it and the produced executables do not raise false positives. And hope for the next release (current 1.5.1 nightlies don't

On term rewriting macros

2021-04-22 Thread Araq
> the only question IMO is whether this would be more expensive (at CT) than > current TRW, but I don't see why. It looks equally expensive to me, that's not an improvement. ;-) In my opinion the optimization needs an explicit _anchor_ point. Like so: proc `*`(x, y: Matrix): Matrix

nim-1.4.6_x64.zip/bin/nimble.exe reports as Trojan:Win32/Zpevdo.B

2021-04-22 Thread AMoura
To avoid this issues, it will be cool to use the VirusTotal API () to check this problem during the RC stage.

nim-1.4.6_x64.zip/bin/nimble.exe reports as Trojan:Win32/Zpevdo.B

2021-04-22 Thread didlybom
I just had the same issue on my work provided laptop, which has Symantec Antivirus (which I cannot change).

On term rewriting macros

2021-04-22 Thread timothee
also: * they hide infinite recursion bugs by truncating to a max depth * the syntax is too foreign and not flexible enough (major point against) the TRW general idea is useful though: * optimization (eg: `ret &= a & b & c`) * debugging + other use cases where you want to change behavio

On term rewriting macros

2021-04-22 Thread Araq
Since it came up in the other thread, TR macros are not used (much) in the standard library because they currently slow down compilations too much. They are also hard to write, not because you end up with wrong optimizations (though that's a possibility too), but because the optimizations are no

4th Nim online meetup

2021-04-22 Thread PMunch
Why did you compare it to the already offset time in Germany? I mean you get the correct time, but it looks a bit strange compared to this: