00:05:45 | * | brson joined #nim |
00:12:14 | * | desophos joined #nim |
00:29:56 | * | Demon_Fox joined #nim |
00:37:23 | * | der-landgraf quit (Quit: WeeChat 1.5) |
00:38:57 | * | der-landgraf joined #nim |
01:24:48 | * | chemist69 joined #nim |
01:27:33 | * | chemist69_ quit (Ping timeout: 244 seconds) |
01:28:47 | * | brson quit (Quit: leaving) |
01:46:37 | * | brson joined #nim |
01:56:04 | * | mcc joined #nim |
02:05:24 | mcc | Hey so, I am trying to use the js backend, I am a little confused about how to interact with js. I see I can make a function with importc, but what about objects? |
02:10:04 | reactormonk | same. see dom.nim |
02:10:12 | * | kulelu88 quit (Quit: Leaving) |
02:42:30 | * | SShrike quit (Quit: SShrike) |
03:15:09 | mcc | ok. and there's no way for nim code to interact with an untyped js object, i assume? |
03:17:18 | mcc | here is a question. has anyone ever looked into importing Typescript or Flow type signatures into nim? |
03:30:39 | * | daimuP joined #nim |
04:11:56 | * | daimuP quit (Ping timeout: 250 seconds) |
04:29:57 | * | brson quit (Ping timeout: 258 seconds) |
04:36:57 | * | arnetheduck_ quit (Ping timeout: 276 seconds) |
04:44:18 | * | brson joined #nim |
04:59:52 | * | ldlework quit (*.net *.split) |
04:59:52 | * | brson quit (*.net *.split) |
04:59:52 | * | desophos quit (*.net *.split) |
04:59:53 | * | kingofoz quit (*.net *.split) |
04:59:53 | * | heinrich5991 quit (*.net *.split) |
04:59:55 | * | gmpreussner quit (*.net *.split) |
04:59:56 | * | \u quit (*.net *.split) |
04:59:57 | * | benwbooth quit (*.net *.split) |
04:59:57 | * | BlaXpirit quit (*.net *.split) |
04:59:58 | * | vktec quit (*.net *.split) |
04:59:58 | * | namnguyen quit (*.net *.split) |
04:59:58 | * | wuehlmaus quit (*.net *.split) |
04:59:58 | * | EastByte quit (*.net *.split) |
04:59:59 | * | cjh` quit (*.net *.split) |
05:00:00 | * | wh1t3r0s3 quit (*.net *.split) |
05:00:01 | * | StarBrilliant quit (*.net *.split) |
05:00:01 | * | subsetpark quit (*.net *.split) |
05:00:02 | * | cyraxjoe quit (*.net *.split) |
05:00:02 | * | mtj_ quit (*.net *.split) |
05:00:02 | * | r4vi quit (*.net *.split) |
05:00:02 | * | low-profile quit (*.net *.split) |
05:00:03 | * | tstm quit (*.net *.split) |
05:00:04 | * | mal`` quit (*.net *.split) |
05:00:04 | * | CARAM__ quit (*.net *.split) |
05:00:05 | * | Xe quit (*.net *.split) |
05:03:36 | * | Satyajit quit (Ping timeout: 276 seconds) |
05:04:22 | * | M-Quora quit (Ping timeout: 260 seconds) |
05:10:00 | * | M-Quora joined #nim |
05:10:34 | * | Satyajit joined #nim |
05:33:12 | * | chemist69 quit (Ping timeout: 258 seconds) |
05:39:19 | * | chemist69 joined #nim |
05:41:35 | * | arnetheduck joined #nim |
05:55:43 | * | arnetheduck quit (Read error: Connection reset by peer) |
06:06:52 | * | mcc quit (Quit: Connection closed for inactivity) |
06:11:18 | * | arnetheduck joined #nim |
06:37:58 | * | ldlework joined #nim |
07:00:24 | * | zodiak_ joined #nim |
07:02:33 | * | zodiak quit (Ping timeout: 246 seconds) |
07:53:08 | * | ephja quit (Read error: Connection reset by peer) |
08:03:43 | * | yglukhov joined #nim |
08:09:13 | * | yglukhov quit (Ping timeout: 258 seconds) |
08:19:49 | * | yglukhov joined #nim |
08:22:11 | * | yglukhov quit (Remote host closed the connection) |
08:28:54 | * | fastrom joined #nim |
08:44:13 | * | xet7 joined #nim |
08:49:45 | * | GangstaCat joined #nim |
08:54:06 | * | aziz joined #nim |
08:54:06 | * | benwbooth joined #nim |
08:54:06 | * | BlaXpirit joined #nim |
08:54:06 | * | wuehlmaus joined #nim |
08:54:06 | * | vktec joined #nim |
08:54:06 | * | namnguyen joined #nim |
08:54:06 | * | EastByte joined #nim |
08:54:06 | * | cjh` joined #nim |
08:54:06 | * | wh1t3r0s3 joined #nim |
08:54:06 | * | StarBrilliant joined #nim |
08:54:06 | * | subsetpark joined #nim |
08:54:06 | * | cyraxjoe joined #nim |
08:54:06 | * | mtj_ joined #nim |
08:54:06 | * | r4vi joined #nim |
08:54:06 | * | low-profile joined #nim |
08:54:06 | * | tstm joined #nim |
08:54:06 | * | mal`` joined #nim |
08:54:06 | * | CARAM__ joined #nim |
08:54:06 | * | Xe joined #nim |
08:54:09 | * | kingofoz joined #nim |
08:54:09 | * | heinrich5991 joined #nim |
08:54:09 | * | gmpreussner joined #nim |
08:54:09 | * | \u joined #nim |
09:00:23 | * | pafmaf joined #nim |
09:13:53 | * | akamaus joined #nim |
09:17:40 | cheatfate | Varriount, yeah problems disappeared for some reason... and now "spaces and indents" automatically set when i'm saving file as nim, perfect, thank you |
09:19:32 | * | xlq_ joined #nim |
09:22:40 | * | yglukhov joined #nim |
09:27:27 | * | yglukhov quit (Ping timeout: 264 seconds) |
09:35:34 | * | Demon_Fox quit (Quit: Leaving) |
09:48:11 | * | arnetheduck quit (Remote host closed the connection) |
09:56:27 | Araq | oh my, how did we survive without 'importcpp' for the JS target? |
10:30:36 | Varriount | Araq: Probably because the JS target isn't used too much. |
10:31:06 | Varriount | Araq: Although, come to think of it, a WebAssembly backend might be the perfect fit for Nim. |
10:32:31 | Varriount | Araq: By the way, you might find this useful: http://www.muppetlabs.com/~breadbox/software/cppp.html |
10:40:32 | * | yglukhov joined #nim |
10:41:01 | * | yglukhov quit (Remote host closed the connection) |
10:42:14 | * | yglukhov joined #nim |
11:13:39 | * | akamaus quit (Ping timeout: 250 seconds) |
11:15:18 | * | irrequietus joined #nim |
11:18:08 | * | akamaus joined #nim |
11:22:22 | * | pdv joined #nim |
11:24:46 | * | GangstaCat quit (Quit: Leaving) |
11:34:37 | * | akamaus quit (Ping timeout: 260 seconds) |
11:35:03 | * | akamaus joined #nim |
12:05:37 | Araq | Varriount: seems useful as a preprocessing step for c2nim |
12:09:19 | * | nsf joined #nim |
12:13:59 | * | fastrom quit (Quit: Leaving.) |
12:17:47 | * | akamaus quit (Ping timeout: 250 seconds) |
12:27:08 | pdv | While I was investigating why pegs doesn't play nice with JS backend (https://github.com/nim-lang/Nim/issues/4247), I have found this bug: https://github.com/nim-lang/Nim/issues/4470 . I'm not sure how fast it would be fixed. However, I can make pegs work by changing it to use string internally. Seems like the only reason it uses cstring in the first place was for performance reasons. What is the best course of action? |
12:27:08 | pdv | 1. Switch to string (add {.push boundChecks:off} to preserve performance). |
12:27:09 | pdv | 2. Use cstring in standalone and string everywhere else (add a type alias) |
12:27:10 | pdv | 3. Do nothing and wait for #4470 to get fixed. |
12:40:35 | Araq | hey pdv! |
12:40:52 | Araq | #4470 seems like it may break quite some code -.- |
12:41:22 | Araq | you can switch to 'string' in a 'when defined(js)' environment to fix it |
12:41:35 | Araq | and I guess that's the best solution for now. |
12:42:16 | Araq | fixing #4470 needs a deprecation path and somebody should write down what is and is not allowed with JS's cstrings .... |
12:49:23 | * | nsf quit (Quit: WeeChat 1.5) |
12:50:27 | * | gunn quit (Ping timeout: 246 seconds) |
12:51:31 | cheatfate | dom96, this check is useless https://github.com/nim-lang/Nim/blob/devel/lib/pure/asynchttpserver.nim#L157 |
12:52:34 | cheatfate | because header line with name "AAAA ...(many many million times)" will DoS it anyway... |
12:53:23 | * | gunn joined #nim |
12:53:34 | cheatfate | same problem exists with first request line... |
12:54:35 | pdv | Araq, about 'when defined(js)' - isn't it better to use one type accross all targets? This would go a long way towards making sure that pegs work consistently across targets in the future (no platform-specific data types). To preserve performance, I could add a distinct wrapper around string with `[]` reimplemented to skip bound checks... |
12:55:12 | Araq | the bound checks are gone with -d:release anyway |
12:55:23 | Araq | I wouldn't bother about them. |
12:57:52 | pdv | OK, then I'll switch it to string. Thank you. |
13:05:18 | * | ndh joined #nim |
13:19:11 | ndh | how do i fix 'warning: not gc safe'? i'd like to store a value that was passed as a command line argument in a global variable, but then i get these warnings. |
13:31:40 | Araq | ndh: do you use --verbosity:2 ? if so, try --verbosity:1 |
13:44:14 | * | fredrik92 joined #nim |
13:53:26 | * | fastrom joined #nim |
14:00:34 | * | akamaus joined #nim |
14:04:44 | * | ndh quit (Ping timeout: 250 seconds) |
14:11:33 | * | akamaus quit (Ping timeout: 240 seconds) |
14:21:30 | * | BitPuffin|osx joined #nim |
14:47:16 | * | irrequietus quit (Read error: Connection reset by peer) |
15:08:49 | * | nsf joined #nim |
15:11:45 | pdv | Soooo... It seems that strings in generated JS code are passed by reference. Is this a known bug, or should I file an issue? |
15:11:47 | * | fastrom quit (Read error: Connection reset by peer) |
15:12:47 | * | fastrom joined #nim |
15:19:14 | pdv | Ok, issue it is. |
15:21:44 | * | akamaus joined #nim |
15:22:24 | * | fastrom quit (Read error: Connection reset by peer) |
15:23:02 | Araq | strings are allowed to be pass by reference, the C backend does the same |
15:26:36 | * | akamaus quit (Ping timeout: 272 seconds) |
15:28:26 | pdv | let s1 = "123" |
15:28:26 | pdv | var s2 = s1 |
15:28:26 | pdv | s2.setLen(0) |
15:28:26 | pdv | # fails - s1.len == 0 |
15:28:26 | pdv | assert s1.len == 4 |
15:29:14 | Araq | that's not pass by ref, that's assignment |
15:30:19 | pdv | OK, my bad. Still, is this a known bug? |
15:35:27 | Araq | not really :-) |
15:36:55 | pdv | OK, filed. |
15:37:55 | Araq | ty |
15:51:25 | * | TheLemonMan joined #nim |
15:55:39 | * | xet7 quit (Quit: Leaving) |
16:06:05 | * | Matthias247 joined #nim |
16:07:02 | * | xlq_ quit (Remote host closed the connection) |
16:19:17 | * | BitPuffin|osx quit (Ping timeout: 260 seconds) |
16:35:06 | * | kulelu88 joined #nim |
16:35:59 | * | pdv quit (Quit: Leaving) |
16:36:21 | * | kulelu88 quit (Max SendQ exceeded) |
16:44:56 | * | kulelu88 joined #nim |
16:46:06 | * | kulelu88 quit (Max SendQ exceeded) |
16:55:18 | * | arnetheduck joined #nim |
16:59:21 | * | GangstaCat joined #nim |
17:00:34 | * | aziz quit (Remote host closed the connection) |
17:19:40 | * | kulelu88 joined #nim |
17:28:47 | * | nsf quit (Quit: WeeChat 1.5) |
17:40:08 | * | iamd3vil joined #nim |
17:41:19 | * | elrood joined #nim |
18:03:30 | * | arnetheduck quit (Remote host closed the connection) |
18:12:58 | * | akamaus joined #nim |
18:19:08 | * | GangstaCat quit (Quit: Leaving) |
18:42:23 | * | ephja joined #nim |
18:47:17 | * | yglukhov quit (Remote host closed the connection) |
18:47:54 | * | yglukhov joined #nim |
18:52:42 | * | yglukhov quit (Ping timeout: 260 seconds) |
19:00:24 | * | akamaus quit (Ping timeout: 246 seconds) |
19:21:53 | * | akamaus joined #nim |
19:31:33 | * | akamaus quit (Ping timeout: 246 seconds) |
19:42:34 | * | vendethiel joined #nim |
19:43:39 | * | pafmaf quit (Ping timeout: 264 seconds) |
19:50:23 | * | xet7_ joined #nim |
20:16:32 | * | TheLemonMan quit (Quit: "It's now safe to turn off your computer.") |
20:36:32 | * | Matthias247 quit (Ping timeout: 260 seconds) |
20:39:07 | * | desophos joined #nim |
20:42:30 | * | pafmaf joined #nim |
20:45:15 | * | yglukhov joined #nim |
20:50:39 | * | yglukhov quit (Ping timeout: 246 seconds) |
21:03:34 | * | xet7 joined #nim |
21:06:42 | * | arnetheduck joined #nim |
21:33:30 | * | Demon_Fox joined #nim |
21:44:34 | * | elrood quit (Quit: Leaving) |
21:49:39 | * | arnetheduck quit (Remote host closed the connection) |
21:53:11 | * | desophos quit (Ping timeout: 240 seconds) |
21:53:43 | * | brson joined #nim |
22:27:14 | * | Trustable joined #nim |
22:42:42 | * | gunn quit (Read error: Connection reset by peer) |
22:43:15 | * | gunn joined #nim |
22:45:13 | * | brson quit (Quit: leaving) |
22:48:17 | * | yglukhov joined #nim |
22:53:30 | * | yglukhov quit (Ping timeout: 276 seconds) |
22:54:16 | * | bjz joined #nim |
22:57:03 | * | Trustable quit (Remote host closed the connection) |
23:06:40 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
23:19:57 | * | pafmaf quit (Read error: Connection reset by peer) |
23:48:12 | * | mcc joined #nim |