00:07:32 | cheatfate | cncl, [a %% b unsigned integer modulo operation] where you find information about signed? read the bible http://nim-lang.org/docs/manual.html |
00:17:26 | krux02 | thanks for the hint to exec, I think I will use it for now |
00:27:14 | * | vendethiel joined #nim |
00:34:16 | * | desophos quit (Remote host closed the connection) |
00:47:12 | * | mirek joined #nim |
00:48:15 | * | vendethiel quit (Ping timeout: 246 seconds) |
00:51:28 | * | bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
00:51:40 | cheatfate | Araq, are you still here or sleeping? |
00:55:30 | mirek | hi all |
00:55:47 | mirek | i want to write simple test that's failing in Nim (compiler project) |
00:55:59 | mirek | i've got single line in test file `doAssert false` |
00:56:16 | mirek | but running `./tests/testament/tester run stdlib/tjson` my test says PASS |
00:56:20 | mirek | not sure why |
00:56:29 | * | bamorim quit (Ping timeout: 248 seconds) |
01:02:10 | * | Jesin quit (Quit: Leaving) |
01:07:36 | * | desophos joined #nim |
01:12:11 | * | bjz joined #nim |
01:15:20 | * | bjz_ joined #nim |
01:16:24 | * | bjz quit (Ping timeout: 244 seconds) |
01:18:27 | * | nchambers quit (Ping timeout: 260 seconds) |
01:20:44 | * | nchambers joined #nim |
01:27:43 | * | brson quit (Quit: leaving) |
01:37:33 | * | nchambers quit (Ping timeout: 244 seconds) |
01:40:34 | * | nchambers joined #nim |
01:51:37 | * | nchambers quit (Ping timeout: 240 seconds) |
01:54:47 | * | nchambers joined #nim |
01:59:10 | * | lxdong joined #nim |
02:14:11 | * | johnnovak joined #nim |
02:14:21 | johnnovak | hi there |
02:28:56 | * | johnnovak left #nim (#nim) |
02:34:39 | * | thotypous quit (Ping timeout: 246 seconds) |
02:35:17 | * | thotypous joined #nim |
02:35:18 | cncl | cheatfate: that only works on signed integers |
02:35:23 | cncl | it just treats them as unsigned |
02:36:00 | cheatfate | cncl, i dont understand what you trying to say |
02:36:11 | cncl | %% takes 2 signed integers |
02:36:15 | cncl | and performs mod as if they were unsigned |
02:38:01 | * | BitPuffin|osx quit (Ping timeout: 240 seconds) |
02:40:12 | cheatfate | then use unsigned64var1.int %% unsigned64var2.int |
02:40:41 | cncl | i can't, a uint64 cannot be turned into a int64 without data loss |
02:40:48 | cncl | you lose half of the range for the signed bit |
02:44:40 | cheatfate | cncl, try to test it by yourself |
02:44:59 | cncl | test what? |
02:45:10 | cheatfate | echo(cast[uint](cast[int](0xFFFFFFFFFFFFFFFF'u)) == 0xFFFFFFFFFFFFFFFF'u) |
02:45:44 | cheatfate | nothing lost... |
02:45:55 | * | GangstaCat quit (Quit: Leaving) |
02:46:09 | * | desophos_ joined #nim |
02:46:31 | cncl | can you explain why? |
02:48:04 | cheatfate | ok 64bit int = 63 bits of data + 1 bit (0 - "+", 1 - "-") |
02:48:15 | cheatfate | 64bit unsigned int = 64 bits of data |
02:49:53 | cheatfate | so if you have 64bits on one side and 64bits on other side, you can easily convert them without any loss |
02:50:50 | cheatfate | the problem begins when you trying to making operation on signed with unsigned |
02:50:50 | cncl | does cast[] reinterpret the memory? |
02:50:57 | cheatfate | nope |
02:50:59 | * | desophos_ quit (Ping timeout: 260 seconds) |
02:51:49 | cncl | in c, casting from unsigned to signed out of range is undefined behavior |
02:51:56 | cncl | rather, implementation defined |
02:52:08 | cheatfate | you are wrong |
02:52:27 | cheatfate | this equation is also works for C |
02:52:32 | cheatfate | even for C++ |
02:53:04 | cheatfate | until you are in same size casting safe |
02:53:05 | cncl | that doesn't mean i'm wrong |
02:53:17 | cncl | it just happens to work for you here |
02:54:51 | cncl | in c, if you cast from a uint64 to a int64 and it's out of the int64's range, the compiler is free to do whatever it defines in its own implementation |
02:55:57 | cheatfate | lol |
02:56:09 | cheatfate | compile just give you warning |
02:56:40 | cheatfate | but if you are using implicit casting then compiler will think that you are know what you are doing |
02:58:22 | cncl | Araq: is there a way to get a mod for unsigned ints in nim? |
02:58:48 | * | brson joined #nim |
02:59:42 | * | lxdong quit (Ping timeout: 250 seconds) |
03:01:09 | * | francisl joined #nim |
03:03:49 | * | GangstaCat joined #nim |
03:15:35 | cheatfate | cncl, nim's [a.int %% b.int] converted to C's [((NI64) ((NI)((NU64)(((NI)(a))) % (NU64)(((NI)(b))))))], where var a:uint64 and var b:uint64 |
03:27:07 | * | vonh quit (Ping timeout: 244 seconds) |
03:32:50 | * | Demon_Fox quit (Quit: Leaving) |
03:41:45 | * | brson quit (Quit: leaving) |
03:57:32 | * | vendethiel joined #nim |
03:58:13 | * | francisl quit (Quit: francisl) |
04:06:21 | * | vqrs quit (Ping timeout: 248 seconds) |
04:06:23 | * | veganskaway is now known as vegansk |
04:20:20 | * | vendethiel quit (Ping timeout: 244 seconds) |
04:21:29 | * | endragor joined #nim |
04:31:53 | * | endragor quit (Remote host closed the connection) |
04:35:10 | * | gunn quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
04:36:11 | * | gunn joined #nim |
04:51:12 | * | endragor joined #nim |
05:09:20 | * | mahlon joined #nim |
05:14:37 | * | vendethiel joined #nim |
05:28:37 | chrisheller | I just posted a bounty if anyone is interested in ANTLR-Nim integration. http://forum.nim-lang.org/t/2154 |
05:28:43 | * | desophos quit (Read error: Connection reset by peer) |
05:37:45 | * | vendethiel quit (Ping timeout: 276 seconds) |
05:58:32 | * | vendethiel joined #nim |
06:01:56 | * | desophos joined #nim |
06:04:39 | * | vqrs joined #nim |
06:06:07 | * | desophos quit (Ping timeout: 252 seconds) |
06:19:42 | * | vendethiel quit (Ping timeout: 246 seconds) |
06:21:05 | * | endragor_ joined #nim |
06:21:22 | * | vendethiel joined #nim |
06:24:42 | * | endragor quit (Ping timeout: 260 seconds) |
06:41:12 | * | endragor_ quit (Remote host closed the connection) |
06:41:41 | * | endragor joined #nim |
06:43:31 | * | vendethiel quit (Ping timeout: 252 seconds) |
07:03:33 | * | vendethiel joined #nim |
07:27:17 | cncl | that would be cool |
07:27:34 | cncl | i usually roll my own parsers, though |
07:27:57 | cncl | but it's definitely useful |
07:40:57 | * | yglukhov joined #nim |
07:50:28 | * | fredrik92 joined #nim |
07:55:15 | * | vendethiel quit (Ping timeout: 244 seconds) |
08:04:00 | * | vendethiel joined #nim |
08:16:10 | * | vonh joined #nim |
08:22:53 | * | gokr joined #nim |
08:23:17 | * | gokr1 joined #nim |
08:25:39 | * | vendethiel quit (Ping timeout: 264 seconds) |
08:27:28 | * | gokr quit (Ping timeout: 268 seconds) |
08:35:57 | Araq | cncl: 'mod' should already work for uints, I think. |
08:36:43 | cncl | it wasn't working for me. maybe i was doing something wrong |
08:36:56 | cncl | it only listed signed ints as acceptable types |
08:46:45 | * | krux02 quit (Quit: Verlassend) |
08:47:49 | * | vonh quit (Ping timeout: 268 seconds) |
08:49:06 | * | darkf quit (Quit: Leaving) |
08:52:03 | * | mal`` quit (Ping timeout: 264 seconds) |
08:57:09 | * | vonh joined #nim |
08:57:39 | * | dorei joined #nim |
09:00:13 | * | vonh2 joined #nim |
09:01:33 | * | vonh quit (Ping timeout: 240 seconds) |
09:40:38 | fredrik92 | I'm using Nim with the Visual Studio C/C++ compiler... Since I have Nim (x64) installed, I have to use the x64 VCC compiler, right? |
09:48:18 | reactormonk | Yup |
09:48:34 | reactormonk | Actually, shouldn't matter. Nim can cross-compile |
09:48:49 | fredrik92 | Hmm... let's try... :-P |
09:51:23 | fredrik92 | Nope... Linking does not work then... |
09:51:56 | fredrik92 | C:\Program Files (x86)\Windows Kits\10\lib\10.0.10586.0\um\x86\uuid.lib : warning LNK4272: library machine type 'X86' conflicts with target machine type 'x64' |
09:54:51 | fredrik92 | Has anyone done performance benchmarks or something of the sorts? To see wheather MinGW or VCC compilation is faster on Windows? |
09:55:15 | * | mal`` joined #nim |
09:56:50 | * | couven92 joined #nim |
10:10:21 | * | endragor_ joined #nim |
10:10:21 | * | endragor_ quit (Remote host closed the connection) |
10:10:23 | cheatfate | fredrik92, vcc compilation time is faster then mingw compilation time, but your benchmark proposal is not fair :) |
10:11:15 | cheatfate | because you want to test not compilers but compilers with stl |
10:11:21 | * | Arrrr joined #nim |
10:14:32 | * | endragor quit (Ping timeout: 260 seconds) |
10:16:58 | fredrik92 | I didn't really understand that, why would it be unfair... Shouldn't it be interesting to see if the same program runs equally fast with MinGW as it does with VCC? |
10:20:43 | * | mal`` quit (Read error: Connection reset by peer) |
10:21:04 | * | endragor joined #nim |
10:23:43 | cheatfate | fredrik92, ok lets assume that WindowsSDK uses 'Bubble sort' and MinGW standart library uses 'quicksort', in such situation on big amounts of data vcc's variant will be always slower than mingw's variant. And this will not depends on compiler but on standart you are using |
10:24:07 | cheatfate | *standart library you are using |
10:24:35 | fredrik92 | ah! Yes, of course... |
10:26:29 | Araq | nim doesn't use C's qsort |
10:26:57 | Araq | and neither does it use the malloc impleemntation etc |
10:27:09 | Araq | it's fairly fair to compare them. |
10:29:28 | couven92 | Araq, so have you tried? :P |
10:30:55 | Araq | all I know is that vcc's optimizer is shitty when it comes to effect analysis |
10:31:06 | Araq | though that might not be its priority |
10:31:46 | couven92 | Well, we could set the vcc.release.flags to /Ox for example and see what happens... |
10:32:23 | couven92 | But, then to be fair, we'd have to set the gcc optimization to max as well... |
10:32:51 | * | mal`` joined #nim |
10:36:24 | * | nsf quit (Quit: WeeChat 1.4) |
10:36:49 | * | nsf joined #nim |
10:37:00 | Araq | cncl: seems to be an oversight, please add it to system.nim and see what happens |
10:43:31 | * | [CBR]Unspoken joined #nim |
10:46:43 | * | toaoMgeorge joined #nim |
11:16:46 | * | arnetheduck joined #nim |
11:47:50 | * | endragor quit (Remote host closed the connection) |
11:50:13 | * | endragor joined #nim |
11:56:30 | * | enthus1ast joined #nim |
12:07:22 | enthus1ast | it seems i can't overload a proc like this: |
12:07:37 | enthus1ast | proc addFiles*(p: var MultipartData, xs: openarray[tuple[name, file, contentDisposition: string, contentTransferEncoding: string]]) |
12:07:43 | enthus1ast | proc addFiles*(p: var MultipartData, xs: openarray[tuple[name, file: string]]) |
12:08:12 | enthus1ast | the way to go here should be 2 different types for xs right? |
12:11:56 | dom96 | enthus1ast: in that case I think you need to do: proc addFiles*(p: var MultipartData, xs: openarray[tuple[name, file: string]] | openarray[tuple[name, file, contentDisposition: string, contentTransferEncoding: string]]) |
12:26:53 | enthus1ast | dom96: do you know where this is documented? |
12:28:26 | dom96 | http://nim-lang.org/docs/manual.html#generics-type-classes |
12:29:41 | enthus1ast | ahh supercool thx dom96 |
12:30:12 | dom96 | np |
12:30:14 | dom96 | bbl |
12:31:34 | * | BitPuffin joined #nim |
12:31:58 | * | vendethiel joined #nim |
12:35:07 | * | boopsiesisaway is now known as boopsies |
12:38:18 | * | zaquest quit (Ping timeout: 276 seconds) |
12:44:42 | * | enthus1ast quit (Ping timeout: 250 seconds) |
12:45:20 | * | yglukhov quit (Ping timeout: 250 seconds) |
12:45:31 | * | enthus1ast joined #nim |
12:49:11 | * | enthus1ast1 joined #nim |
12:55:39 | * | vendethiel quit (Ping timeout: 264 seconds) |
13:10:56 | couven92 | I'm trying to set up a MSBuild Template for Nim... are there any special environment variables to look out for? |
13:11:10 | couven92 | I see the start.bat file defines NIMPATH |
13:12:18 | couven92 | Also, is there any way to get a batch (on Windows) or bash (on Linux) script to detect the bitness of nim? |
13:21:53 | * | lcm337 joined #nim |
13:36:29 | * | irrequietus joined #nim |
13:41:17 | * | Jesin joined #nim |
13:54:40 | Araq | couven92: nim --version outputs something like [MacOSX: amd64] |
13:54:51 | Araq | which indicates the number of bits |
13:55:52 | Araq | I don't think any tool actually uses NIMPATH and it's not set on any of my machines |
13:56:06 | Araq | nim doesn't use environment vars. |
13:58:15 | * | heinrich5991 quit (Ping timeout: 276 seconds) |
14:00:53 | * | heinrich5991 joined #nim |
14:13:29 | * | boopsies is now known as boopsiesisaway |
14:42:05 | * | toaoMgeorge quit (Ping timeout: 248 seconds) |
14:50:35 | * | yglukhov joined #nim |
14:51:25 | * | Demon_Fox joined #nim |
14:56:43 | * | gokr1 quit (Quit: Leaving.) |
14:59:58 | * | lyro quit (Ping timeout: 244 seconds) |
15:02:28 | * | lyro joined #nim |
15:07:31 | * | mahasamoot_ joined #nim |
15:08:03 | * | vonh2 quit (Ping timeout: 240 seconds) |
15:09:13 | * | mahasamoot quit (Ping timeout: 240 seconds) |
15:09:17 | * | vonh joined #nim |
15:11:59 | * | g00 joined #nim |
15:13:13 | * | nsf quit (*.net *.split) |
15:13:15 | * | wh1t3r0s3 quit (*.net *.split) |
15:20:09 | * | arnetheduck quit (Ping timeout: 276 seconds) |
15:23:45 | * | pregressive joined #nim |
15:29:38 | * | nsf joined #nim |
15:32:21 | * | endragor quit (Ping timeout: 268 seconds) |
15:37:29 | * | irrequietus quit () |
15:51:25 | * | pregressive quit (Remote host closed the connection) |
15:54:07 | * | sora joined #nim |
16:06:20 | * | dorei quit (Quit: Page closed) |
16:07:40 | * | Guest82270 is now known as Vivek |
16:07:46 | * | Vivek quit (Changing host) |
16:07:46 | * | Vivek joined #nim |
16:08:30 | * | gokr joined #nim |
16:09:33 | * | def- quit (Ping timeout: 240 seconds) |
16:13:37 | * | def- joined #nim |
16:15:26 | * | endragor joined #nim |
16:23:35 | * | endragor quit (Remote host closed the connection) |
16:27:10 | * | zaquest joined #nim |
16:31:28 | * | M-max joined #nim |
16:58:58 | * | brson joined #nim |
17:06:58 | * | fredrik92 quit (Read error: Connection reset by peer) |
17:12:38 | * | sora quit (Remote host closed the connection) |
17:20:22 | * | yglukhov quit (Ping timeout: 260 seconds) |
17:20:56 | * | pregressive joined #nim |
17:27:09 | * | [CBR]Unspoken quit (Remote host closed the connection) |
17:31:27 | * | vonh quit (Ping timeout: 260 seconds) |
17:35:33 | * | M-Quora joined #nim |
17:39:03 | * | vonh joined #nim |
18:11:21 | * | yglukhov joined #nim |
18:12:05 | * | desophos joined #nim |
18:15:33 | * | yglukhov quit (Ping timeout: 240 seconds) |
18:27:23 | * | toaoMgeorge joined #nim |
18:39:43 | * | toaoMgeorge quit (Read error: Connection reset by peer) |
18:39:57 | * | toaoMgeorge joined #nim |
18:50:36 | * | yglukhov joined #nim |
18:55:48 | * | Ven joined #nim |
18:58:05 | * | toaoMgeorge quit (Read error: Connection reset by peer) |
19:12:50 | * | gokr quit (Quit: Leaving.) |
19:13:03 | * | yglukhov quit (Remote host closed the connection) |
19:15:50 | * | pregressive quit (Remote host closed the connection) |
19:19:54 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
19:20:33 | * | baff1e joined #nim |
19:23:11 | * | vendethiel joined #nim |
19:27:23 | * | gokr joined #nim |
19:27:23 | * | gokr quit (Client Quit) |
19:31:28 | * | pregressive joined #nim |
19:32:24 | * | yglukhov joined #nim |
19:37:03 | * | Ven joined #nim |
19:51:51 | * | francisl joined #nim |
19:59:33 | * | yglukhov quit (Remote host closed the connection) |
20:02:12 | * | francisl quit (Quit: francisl) |
20:05:43 | * | yglukhov joined #nim |
20:10:01 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
20:15:20 | * | yglukhov quit (Remote host closed the connection) |
20:18:50 | * | enthus1ast quit (Ping timeout: 250 seconds) |
20:19:17 | * | enthus1ast1 quit (Ping timeout: 244 seconds) |
20:23:24 | * | francisl joined #nim |
20:31:33 | * | BitPuffin quit (Ping timeout: 240 seconds) |
20:37:07 | * | darkf joined #nim |
20:42:01 | * | pregressive quit (Remote host closed the connection) |
20:47:11 | * | Arrrr quit (Quit: WeeChat 1.4) |
20:54:35 | * | irrequietus joined #nim |
21:05:31 | * | francisl quit (Quit: francisl) |
21:07:37 | * | Guest69086 quit (Ping timeout: 240 seconds) |
21:08:15 | * | Heartmender joined #nim |
21:08:39 | * | Heartmender is now known as Guest67762 |
21:16:54 | * | pregressive joined #nim |
21:35:13 | * | Riviera- quit (Ping timeout: 240 seconds) |
21:35:13 | * | flyx quit (Ping timeout: 240 seconds) |
21:37:16 | * | francisl joined #nim |
21:38:40 | * | francisl quit (Client Quit) |
21:38:42 | * | bjz_ quit (Max SendQ exceeded) |
21:39:38 | * | pregressive quit (Ping timeout: 250 seconds) |
21:39:46 | * | flyx joined #nim |
21:41:14 | * | yglukhov joined #nim |
21:41:23 | * | Riviera- joined #nim |
21:44:30 | * | bjz joined #nim |
21:44:43 | * | nsf quit (*.net *.split) |
21:59:05 | * | francisl joined #nim |
22:00:23 | dom96 | Really sucks to read this stuff: https://news.ycombinator.com/item?id=11343371 |
22:00:40 | * | nsf joined #nim |
22:01:29 | * | gokr joined #nim |
22:11:42 | reactormonk | How about a switch about a warning if you use different styles in the same file? |
22:12:16 | ldlework | How about the Israel and Palestine just share the land? |
22:12:31 | reactormonk | I think mine is a bit easier. |
22:13:19 | ldlework | But neither suggestion will have much bearing on either side in both cases. |
22:29:04 | cheatfate | dom96, and why you read this? |
22:29:23 | cheatfate | dom96, some people just dont like underscores :) |
22:29:50 | dom96 | cheatfate: because it's interesting to read what people think of Nim, even if their opinion makes me sad. |
22:43:09 | * | def- quit (Ping timeout: 248 seconds) |
22:48:13 | * | def- joined #nim |
22:50:58 | * | enthus1ast joined #nim |
22:53:33 | cheatfate | dom96, i think when work is not done yet, its very early to pay attention on people opinion |
22:55:47 | * | vendethiel quit (Ping timeout: 260 seconds) |
23:00:46 | * | francisl quit (Quit: francisl) |
23:04:33 | cheatfate | it's like listening to a man who saw a masterpiece before the work on it was completed |
23:07:00 | * | couven92 quit (Read error: Connection reset by peer) |
23:28:32 | * | yglukhov quit (Remote host closed the connection) |
23:32:13 | * | def- quit (Ping timeout: 252 seconds) |
23:36:14 | * | def- joined #nim |
23:38:15 | * | gokr quit (Ping timeout: 264 seconds) |
23:40:49 | * | gokr joined #nim |
23:47:59 | Araq | reactormonk: fwiw if I would design this feature again, I would simply disallow underscores and upper cased letters. everything-would-be-with-dashes |
23:49:01 | Araq | no style wars, no cries, no discussions. and we can keep pretending we live in the 60ies and Ascii is all we ever need. |
23:49:42 | Araq | and we could focus on whether indentation should be done with 2, 3, 4 or 8 spaces. |
23:52:21 | * | gokr quit (Quit: Leaving.) |