00:09:05 | * | GangstaCat quit (Quit: Leaving) |
00:10:51 | * | enthus1ast quit (Read error: No route to host) |
00:11:51 | * | enthus1ast joined #nim |
00:24:35 | * | castlelore quit (Quit: WeeChat 1.4) |
00:26:53 | * | maxgonzih quit (Ping timeout: 250 seconds) |
00:27:48 | * | maxgonzih joined #nim |
00:39:09 | * | castlelore joined #nim |
00:43:32 | * | gokr quit (Ping timeout: 260 seconds) |
00:58:57 | * | RawrRanger joined #nim |
01:03:08 | * | RawrRanger quit (Ping timeout: 250 seconds) |
01:22:28 | * | space-wi_ quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
01:51:37 | * | brson quit (Ping timeout: 252 seconds) |
02:14:26 | * | space-wizard joined #nim |
02:42:06 | * | Demon_Fox joined #nim |
02:45:25 | * | Guest18995 is now known as Vivek |
02:45:37 | * | Vivek quit (Changing host) |
02:45:38 | * | Vivek joined #nim |
02:52:29 | * | vendethiel joined #nim |
02:56:49 | * | vendethiel quit (Ping timeout: 250 seconds) |
03:02:45 | * | jeffc joined #nim |
03:32:25 | * | SirCmpwn quit (Ping timeout: 250 seconds) |
03:34:06 | * | federico3 quit (Ping timeout: 244 seconds) |
03:34:37 | * | devn quit (Ping timeout: 244 seconds) |
03:34:37 | * | Vivek quit (Ping timeout: 244 seconds) |
03:35:40 | * | Guest21642 joined #nim |
03:35:45 | * | devn joined #nim |
03:36:23 | * | kulelu88 quit (Quit: Leaving) |
03:36:41 | * | ozra quit (Ping timeout: 250 seconds) |
03:38:16 | * | federico3 joined #nim |
03:40:15 | * | SirCmpwn joined #nim |
03:44:29 | * | Guest21642 quit (Ping timeout: 250 seconds) |
03:45:17 | * | Vivek_ joined #nim |
03:45:38 | * | mtj_ quit (Read error: Connection timed out) |
03:57:42 | cncl | https://gist.github.com/randrew/d0eb0eb74ef61cfa556005eeb0b6c53e |
03:57:47 | cncl | am i doing something wrong? or is this a bug? |
03:57:51 | * | rr_ joined #nim |
03:59:00 | * | rr_ quit (Client Quit) |
04:06:36 | cncl | it seems to be a bug |
04:06:40 | cncl | i'll open an issue |
04:14:02 | cncl | https://github.com/nim-lang/Nim/issues/4100 |
04:16:49 | * | SirCmpwn quit (Ping timeout: 260 seconds) |
04:17:25 | * | Vivek_ quit (Ping timeout: 250 seconds) |
04:19:29 | * | Vivek joined #nim |
04:19:52 | * | Vivek is now known as Guest40626 |
04:19:58 | * | SirCmpwn joined #nim |
04:21:55 | * | SirCmpwn quit (Excess Flood) |
04:22:14 | * | endragor joined #nim |
04:23:40 | * | SirCmpwn joined #nim |
04:29:24 | * | SirCmpwn quit (Ping timeout: 246 seconds) |
04:29:59 | * | Guest40626 quit (Ping timeout: 250 seconds) |
04:31:16 | * | Vivek_ joined #nim |
04:35:42 | * | Vivek_ quit (Ping timeout: 246 seconds) |
04:50:26 | * | SirCmpwn joined #nim |
04:51:55 | * | Vivek_ joined #nim |
04:53:59 | * | enthus1ast quit (Read error: No route to host) |
04:55:31 | * | enthus1ast joined #nim |
04:58:51 | cncl | i'm trying to figure out how to solve it, but it will take me a while to learn about how the nim compiler works |
05:05:41 | * | jeffc quit (Remote host closed the connection) |
05:17:51 | * | jeffc joined #nim |
05:19:44 | * | avsej quit (Quit: Quit) |
05:22:13 | * | jeffc quit (Remote host closed the connection) |
05:24:27 | * | avsej joined #nim |
05:24:27 | * | avsej quit (Changing host) |
05:24:27 | * | avsej joined #nim |
05:27:51 | * | mtj_ joined #nim |
05:28:40 | * | s4 joined #nim |
05:35:09 | * | avsej quit (Quit: Quit) |
05:35:57 | * | avsej joined #nim |
05:35:57 | * | avsej quit (Changing host) |
05:35:57 | * | avsej joined #nim |
05:48:09 | * | desophos quit (Ping timeout: 246 seconds) |
05:52:47 | * | desophos joined #nim |
06:03:31 | * | zahary quit (Ping timeout: 252 seconds) |
06:11:36 | * | lyro` quit (Read error: Connection reset by peer) |
06:18:54 | * | space-wizard quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
06:20:18 | * | krux02 joined #nim |
06:20:50 | * | endragor_ joined #nim |
06:22:44 | * | jeffc joined #nim |
06:24:33 | * | endragor quit (Ping timeout: 240 seconds) |
06:25:20 | * | McSpiros joined #nim |
06:27:02 | * | jeffc quit (Ping timeout: 250 seconds) |
06:34:01 | * | krux02 quit (Quit: Verlassend) |
06:36:29 | * | endragor_ quit (Remote host closed the connection) |
06:36:59 | * | endragor joined #nim |
06:44:21 | * | yglukhov joined #nim |
07:04:44 | * | gokr joined #nim |
07:10:52 | * | kingofoz quit (Ping timeout: 260 seconds) |
07:11:01 | * | kingofoz joined #nim |
07:14:16 | * | Jesin quit (Ping timeout: 250 seconds) |
07:19:12 | * | fredrik92 joined #nim |
07:40:23 | * | desophos quit (Remote host closed the connection) |
07:41:35 | * | dorei joined #nim |
07:45:09 | * | rinukkusu quit (Ping timeout: 276 seconds) |
08:00:06 | * | rektide_ quit (Ping timeout: 276 seconds) |
08:01:19 | * | rektide joined #nim |
08:01:53 | * | Demon_Fox quit (Quit: Leaving) |
08:04:41 | * | boopisaway is now known as boop |
08:08:05 | * | cheatfate quit (Read error: Connection reset by peer) |
08:08:44 | * | cheatfate joined #nim |
08:18:30 | * | lokien quit (Ping timeout: 276 seconds) |
08:20:49 | * | lokien joined #nim |
08:24:06 | * | jeffc joined #nim |
08:29:21 | * | jeffc quit (Ping timeout: 276 seconds) |
08:50:05 | * | Trustable joined #nim |
08:57:19 | * | enthus1ast quit (Read error: Connection reset by peer) |
09:01:17 | * | boop is now known as boopisaway |
09:02:54 | * | elrood joined #nim |
09:06:53 | * | fredrik92 quit (Ping timeout: 250 seconds) |
09:09:23 | Araq_ | cncl: it's not a bug |
09:09:29 | Araq_ | it's documented behaviour. |
09:09:49 | Araq_ | you need a wrapper anon proc to produce a fresh environment |
09:14:23 | * | yglukhov quit (Ping timeout: 276 seconds) |
09:16:35 | cncl | ah ok |
09:16:37 | cncl | i looked but didn't see |
09:16:41 | cncl | i'll remove it |
09:16:50 | cncl | is it in the standard manual page? |
09:17:47 | Araq_ | not sure. check news.txt and the manual |
09:19:48 | cncl | it's in news.txt |
09:21:14 | * | boopisaway is now known as boop |
09:23:48 | * | mlitwiniuk joined #nim |
09:23:48 | * | beatmox joined #nim |
09:26:06 | cncl | produces unexpected results for me, i guess :) now i supposed it produces expected results after reading news.txt |
09:26:13 | cncl | s/supposed/suppose |
09:27:46 | * | Arrrr joined #nim |
09:33:08 | * | Demon_Fox joined #nim |
09:33:11 | * | kingofoz quit (Ping timeout: 244 seconds) |
09:33:36 | * | kingofoz joined #nim |
09:36:48 | * | fredrik92 joined #nim |
09:52:12 | * | desophos joined #nim |
09:56:43 | * | desophos quit (Ping timeout: 252 seconds) |
10:05:47 | * | yglukhov joined #nim |
10:14:03 | * | fredrik92 quit (Ping timeout: 250 seconds) |
10:16:20 | * | elrood_ joined #nim |
10:16:42 | * | elrood quit (Ping timeout: 250 seconds) |
10:19:00 | * | Varriount_ quit (Read error: Connection reset by peer) |
10:19:06 | * | McSpiros quit (Ping timeout: 250 seconds) |
10:19:19 | * | Varriount joined #nim |
10:19:22 | * | Demon_Fox quit (Quit: Leaving) |
10:24:18 | cheatfate | dom96, i have made PRs |
10:40:30 | * | jeffc joined #nim |
10:45:17 | * | jeffc quit (Ping timeout: 268 seconds) |
10:50:58 | * | rinukkusu joined #nim |
11:36:08 | * | PMunch joined #nim |
11:44:38 | * | ozra joined #nim |
11:49:49 | * | lyro joined #nim |
12:16:00 | * | arnetheduck joined #nim |
12:19:58 | * | dorei quit (Ping timeout: 250 seconds) |
12:36:45 | * | endragor quit (Read error: Connection reset by peer) |
12:37:14 | * | endragor joined #nim |
12:37:18 | * | Arrrr quit (Ping timeout: 246 seconds) |
12:38:45 | * | endragor quit (Remote host closed the connection) |
12:39:19 | * | endragor joined #nim |
12:51:44 | * | Arrrr joined #nim |
13:11:21 | * | BitPuffin joined #nim |
13:11:50 | * | ozra left #nim ("Konversation terminated!") |
13:23:02 | * | dthrvr quit (Ping timeout: 250 seconds) |
13:29:13 | * | dthrvr joined #nim |
13:30:30 | * | wuehlmaus quit (Quit: Lost terminal) |
13:32:00 | * | dthrvr quit (Read error: Connection reset by peer) |
13:34:42 | dom96 | cheatfate: commented |
13:35:07 | cheatfate | yeah i see |
13:36:03 | cheatfate | dom96, its very hard to simulate this situation |
13:39:17 | arnetheduck | what does benign mean? lots of them in system but I can't find any uses |
13:41:34 | dom96 | cheatfate: I know :\ |
13:43:58 | dom96 | arnetheduck: good question, I'm not sure |
13:51:34 | arnetheduck | dom96, at least I'm not alone then ;) |
13:52:35 | * | s4 quit (Quit: Konversation terminated!) |
13:54:10 | * | theduke joined #nim |
13:54:15 | * | theduke left #nim (#nim) |
14:03:28 | cheatfate | dom96, ok i have made a test |
14:04:50 | cheatfate | i have modified asynchttpserver.nim to go to sleep after receiving connection for 5s and made disconnection remotely in this period and what do you think WSARecv returned? |
14:07:11 | cheatfate | now i want to make bigger timeout to satisfy all tcp connection timeout limits |
14:33:17 | * | Jesin joined #nim |
14:35:11 | elrood_ | arnetheduck, benign was introduced with commit a639824e, but neither properly documented nor consequently implemented as it seems from a shallow glance. wickedly phrased it's gcsafe renamed ;) and if this doesn't wake up Araq for a more profound reply and rebuttal, i don't know what will :P |
14:41:10 | cheatfate | dom96, https://gist.github.com/cheatfate/7f1a2705807f6940540e731cbbc47d1e |
14:41:41 | cheatfate | dom96, so this lines can be safely removed |
14:50:04 | * | wuehlmaus joined #nim |
14:57:44 | arnetheduck | elrood_, thanks.. then I guess I just have to find out what gcsafe does ;) |
14:58:21 | * | allan0 quit (Ping timeout: 246 seconds) |
15:01:07 | * | allan0 joined #nim |
15:03:39 | cheatfate | vegansk, are you here? |
15:05:22 | cheatfate | "signed integers" Mafia hits again :) i need your help here https://github.com/nim-lang/Nim/pull/4099#discussion_r60232449 |
15:09:00 | * | niv sniggers |
15:09:26 | elrood_ | the largest in32 is 32768? now that would be news |
15:09:40 | niv | probably meant to say short/int16, but the point is valid regardless |
15:11:47 | niv | i wonder what the consequences would be to make all length params int64. this would be two pointer lengths on a 32 bit host and doesnt fit into a register anymore. |
15:15:12 | cheatfate | niv, sizeof(int) on 32 bit systems is 32 bit |
15:15:20 | niv | yes i am aware |
15:15:22 | niv | thats my point. |
15:15:54 | niv | but if you make, for example, len(string) return a int64 instead of int, then on 32bit systems it would impact how the compiler could deal with it |
15:15:55 | cheatfate | but length must not be signed because length cannot be negative... |
15:16:10 | * | elrood_ is now known as elrood |
15:16:47 | niv | i think having it signed isnt the issue - you need it to be signed for file seeking, for example |
15:16:55 | niv | the issue is that it caps at 2GB (or 4 if unsigned) |
15:17:44 | * | arnetheduck quit (Ping timeout: 276 seconds) |
15:18:41 | cheatfate | i think signed integers was made by people which dont like bitwise arithmetic |
15:18:48 | niv | esp. since nim claims to be "game engine ready", which regularily deal with huge asset files, this seems dubious to me |
15:19:32 | federico3 | speaking of which, where's the pygame of Nim, that everybody wants? :D |
15:19:54 | niv | maybe the way to go is to forbid 32bit architectures :p |
15:20:14 | niv | waiting another 5 years or so will probably make my particular peeve solve itself |
15:22:38 | * | endragor_ joined #nim |
15:23:01 | elrood | you're aware that a lot of microcontrollers aren't even 32bit yet and not going to be for quite a while? |
15:23:19 | niv | </joke> .. |
15:23:55 | niv | i dont know enough about how 16bit architectures would be impacted by having 64bit integers for stdlib |
15:24:05 | niv | i imagine the compiler has some ways to deal with it but it'd be much slower |
15:25:54 | * | endragor quit (Ping timeout: 260 seconds) |
15:27:43 | * | endragor_ quit (Ping timeout: 268 seconds) |
15:27:57 | elrood | that's the everlasting struggle with trying to be elegant, easy and high-level while still offering enough features and control for systems programming. it's too easy to jokingly maneuver a somewhat promising language into quicksand that way |
15:28:39 | niv | i agree and im not stating any "must be this way". my workaround is to provide compiler arch checks and warnings/errors, but its obviously not perfect |
15:32:13 | * | elrood throws some autotools and #ifdefs into the ring |
15:32:39 | * | gokr quit (Ping timeout: 246 seconds) |
15:32:52 | niv | the thing is though, you cant redefine stdlib int values to be 64bit on a 32bit system no matter how much tooling you throw in front of it |
15:33:52 | * | allan0 quit (Ping timeout: 252 seconds) |
15:39:51 | * | jeffc joined #nim |
15:40:54 | * | jeffc quit (Remote host closed the connection) |
15:40:57 | * | def- quit (Ping timeout: 276 seconds) |
15:41:53 | cncl | if you have a 2gb asset file you're not going to put it in a seq |
15:42:00 | cncl | you'll allocate a buffer and use pointers |
15:42:06 | cncl | and you don't have to worry about signed integers there |
15:42:38 | niv | how are you supposed to seek a file to a offset beyond 2GB then? |
15:43:08 | * | allan0 joined #nim |
15:43:09 | cncl | how are you going to get a 2gb asset file into memory on a 32 bit system? |
15:43:15 | cncl | in windows or whatever |
15:43:42 | niv | you dont have to have it all in memory, or do you? you can just seek to whereever and read the small chunk you want |
15:43:57 | cncl | you don't need absolute addresses for that |
15:44:45 | * | def- joined #nim |
15:44:58 | cncl | btw unreal engine 4 uses signed 32-bit integers for all of its asset handling |
15:45:01 | elrood | for anything that size you'd be using memory mapping, windowing and a suitable interface anyways, that's not an issue for a general-case stdlib-provided function |
15:45:02 | cncl | even on 64 bit platforms |
15:45:35 | niv | okay, got it |
15:46:00 | * | space-wizard joined #nim |
15:46:08 | cncl | in principle i agree with you that i would prefer to use unsigned integers for seq but i'm not too torn up about it being int by default in nim |
15:46:24 | cncl | it will never actually affect me |
15:59:10 | * | PMunch quit (Ping timeout: 252 seconds) |
15:59:20 | * | def- quit (Quit: -) |
16:18:55 | * | yglukhov quit (Ping timeout: 250 seconds) |
16:19:50 | * | allan0 quit (Ping timeout: 250 seconds) |
16:21:07 | * | Jesin quit (Quit: Leaving) |
16:23:09 | * | allan0 joined #nim |
16:23:19 | federico3 | is Nim targeting regular JS or asm.js? |
16:25:00 | * | derka joined #nim |
16:25:04 | derka | Hello Guys |
16:25:18 | reactormonk | o/ |
16:25:23 | * | darkf quit (Quit: Leaving) |
16:25:48 | * | Arrrr quit (Ping timeout: 276 seconds) |
16:27:01 | * | Jesin joined #nim |
16:27:46 | IcyFoxy | Is it possible to increment a char? |
16:28:01 | IcyFoxy | char += 1 comains due to types |
16:30:19 | dom96 | IcyFoxy: char = char(ord(char) + 1) |
16:31:33 | * | castlelore quit (Quit: WeeChat 1.4) |
16:32:55 | IcyFoxy | dom96: I actually concluded with `c = succ c` and then finished off my program to find that it worked perfectly as expected :P |
16:33:17 | IcyFoxy | dom96: Thanks anyway. And I think the 'succ' function would be better here. |
16:33:33 | dom96 | IcyFoxy: cool, didn't realise a 'succ' exists. |
16:33:36 | dom96 | federico3: regular |
16:34:31 | IcyFoxy | dom96: I'm just porting some challenge / code-golf a friend set. I guess the haskell is the simpliest to describe (one liner). |
16:34:34 | IcyFoxy | main = putStr (unlines (flip replicateM (['a'..'z'] ++ ['A'..'Z'] ++ ['0'..'9']) =<< [0..])) |
16:34:55 | * | def- joined #nim |
16:35:13 | IcyFoxy | Just 0, 1, 2, .., 9, a, b, .., z, A, ..., Z, 00, 01, .., ZZZZZ |
16:35:25 | IcyFoxy | (Base62 iterator) |
16:36:53 | * | fredrik92 joined #nim |
16:36:58 | IcyFoxy | Can anyone shed any light on why case/of/else share exact indentation? Kinda looks odd as one would expect the of/else to be *indented under case* ? |
16:37:53 | IcyFoxy | Just checked, or it just doesn't care? Still odd that the docs show no extra indentation. |
16:37:59 | * | derka quit (Ping timeout: 250 seconds) |
16:39:14 | * | castlelore joined #nim |
16:39:27 | * | jonafato quit (Ping timeout: 276 seconds) |
16:40:03 | * | jonafato joined #nim |
16:41:15 | * | desophos joined #nim |
16:41:26 | * | IcyFoxy wonders how best in nim to get clean, block buffered, locked(single thread) I/O writes to stdout. (After speed) |
16:42:45 | IcyFoxy | C's fwrite_unlocked seems to be the fastest. Not sure about how it should be used as the manpage hints that it shouldn't be used directly as is non-standard while flockfile + fwrite should be perfect. (echo also likes debug output.. don't want that, just want to fwrite a slice out) |
16:43:00 | * | BrotherLy joined #nim |
16:43:15 | BrotherLy | imo Nim should adopt the same gc-less model that Rust has |
16:43:19 | BrotherLy | i dont want compromises |
16:44:15 | ldlework | No thanks. |
16:44:42 | BrotherLy | you dont like memory safety? |
16:45:15 | ldlework | Yay, irrational arguments. |
16:45:17 | IcyFoxy | BrotherLy: I personally agree (as an FP currently using Rust). Although GC seems quite tightly chosen here. |
16:45:31 | BrotherLy | whats an 'FP' ? |
16:46:03 | ldlework | BrotherLy: so, (GC ⊃ ¬Memory-safety) ? |
16:46:17 | * | derka joined #nim |
16:47:03 | BrotherLy | well first of all GC is always slower than no GC and secondly i can unfortunately never trust a GC made by some random person on the internet over some proven GC like the one java or .net have |
16:47:24 | IcyFoxy | BrotherLy: Functional programming. |
16:47:43 | ldlework | But you would trust the ownership prover written by some random people on the internet. |
16:47:45 | ldlework | Sounds like FUD. |
16:47:47 | IcyFoxy | BrotherLy: I.e. Haskell, OCaml, Rust. |
16:48:04 | ldlework | Also, what does functional programming have to do with either having a GC or Memory Safety |
16:48:13 | ldlework | Please stop to think about what you're saying |
16:49:08 | BrotherLy | well i dont trust Rust that much either, but their claims are a little more easily verified. I can just run valgrind over my Rust program and verify it myself. How would I ever verify that nim doesnt leak memory? |
16:49:14 | IcyFoxy | ldlework: Although Haskell uses GC. I agreed with that FP reference because GC is less pure in terms of predictive performance. |
16:49:37 | ldlework | IcyFoxy: that has literally nothing to do with "FP" |
16:49:41 | ldlework | At all. |
16:49:46 | ldlework | In the slightest. |
16:50:33 | ldlework | Also, as a Nim programmer you should know that Nim's GC is completely controllable in terms of its runtime. |
16:50:54 | federico3 | ...including turning it off if you don't like it |
16:50:59 | IcyFoxy | ldlework: Okay well.. I generally avoid GC, although happy to use it with nim. |
16:51:18 | ldlework | IcyFoxy: OK |
16:51:21 | IcyFoxy | federico3: Where the compiler then guides you where things would leak. |
16:51:44 | BrotherLy | ok so what if i turn it off? |
16:51:56 | BrotherLy | Nim should have the same kind of ownership system like Rust |
16:52:03 | ldlework | No, it shouldn't. |
16:52:23 | BrotherLy | that would actually be the best compromise ever: give me an ownership system if i care enough to use it, and if i dont it will just use the gc |
16:52:51 | ldlework | Let's just make a magic language where you can do anything you whimsically fants'y |
16:53:08 | elrood | actually, the best compromise would be to use rust? or design your own language? |
16:53:09 | ldlework | Or how about we make specific languages do their specific thing well. |
16:53:47 | ldlework | Its pretty childish to show up in a language channel and start demanding that the entire language shift paradigms to emulate some other pet language. |
16:54:48 | BrotherLy | no, what is childish is to call other people childish without responding to arguments beyond "no, we wont do that just because" |
16:55:13 | ldlework | I've already reasoned why your demand is unreasonable. |
16:55:23 | elrood | if the demands were worded differently or based on an informed and sound assessment the reactions would be different |
16:55:44 | IcyFoxy | BrotherLy: I can say that I would be happy with more ownership systems. And to my knowledge nim's templating / macros may be possible enough to implement this in nim with LOTS of hacks. :P |
16:56:07 | IcyFoxy | I'm new to nim though. So I could be wrong here. |
16:56:08 | * | jeffc joined #nim |
16:56:23 | ldlework | IcyFoxy: If any language could get there, that way, it is probably Nim. |
16:57:19 | Xe | pretty much nim or lisp lol |
16:57:43 | elrood | well, to be nitpicky, since Nim is compiled down to C the obvious conclusion would be that C can and has got there :P |
16:57:45 | IcyFoxy | BrotherLy: --gc:none then look for reference counting in nim. |
16:57:55 | IcyFoxy | Actually... |
16:58:03 | IcyFoxy | --gc:refc ? Reference counting ? :P |
16:58:36 | * | jeffc quit (Remote host closed the connection) |
16:58:52 | * | IcyFoxy is happy with the flexibility nim provides for these kinda of options... *VERY* |
16:58:57 | BrotherLy | i think reference counting is also a form of GC |
16:59:02 | * | IcyFoxy will likely not experiment with these anyway. |
16:59:50 | * | fredrik92 quit (Read error: Connection reset by peer) |
17:00:10 | IcyFoxy | BrotherLy: At least in rust it's called predictively through deconstructors. I wonder how nim's refcounting works here. End of scope, or end of paths it may be used? IIRC Swift's GC folds down at compile time (and I have *ZERO* experience with swift). |
17:00:57 | IcyFoxy | ldlework: Would you happen to have better insight for the internal GC details here? |
17:01:01 | * | derka quit (Quit: derka) |
17:01:15 | IcyFoxy | Default is reference counting too. |
17:01:25 | ldlework | BrotherLy | i think reference counting is also a form of GC |
17:01:36 | ldlework | There's nothing productive to move this conversation forward. |
17:02:14 | dom96 | BrotherLy: Nothing stopping you from implementing an ownership system in Nim :P |
17:03:06 | * | jeffc joined #nim |
17:03:15 | dom96 | or you could always fund the effort https://www.bountysource.com/teams/nim |
17:03:19 | * | derka joined #nim |
17:04:27 | * | yglukhov joined #nim |
17:05:06 | federico3 | maybe $200K would do for an ownership system |
17:06:01 | IcyFoxy | High performance nim question. How *should* I do buffered, locked fwrite's (write slice) to stdout? |
17:06:14 | IcyFoxy | locked/unlocked (one thread; after speed here) |
17:06:15 | * | brson joined #nim |
17:06:45 | * | derka quit (Client Quit) |
17:07:11 | * | derka joined #nim |
17:07:43 | * | derka quit (Client Quit) |
17:08:01 | * | derka joined #nim |
17:08:27 | * | yglukhov quit (Remote host closed the connection) |
17:08:33 | * | derka quit (Client Quit) |
17:09:22 | * | jeffc quit (Remote host closed the connection) |
17:11:29 | * | jeffc joined #nim |
17:11:31 | elrood | IcyFoxy, probably depends on the system or even kernel version you're using. if in doubt, fill a 64kb buffer and only then flush ;) |
17:11:53 | * | Arrrr joined #nim |
17:11:53 | * | Arrrr quit (Changing host) |
17:11:53 | * | Arrrr joined #nim |
17:12:59 | IcyFoxy | elrood: Odd thing is that in Rust for the ideal solution here. I got 15s after locking and writing. C 30s, lock down to 28s, ignore locking and use fwrite_unlocked and *just* beat rust at 14.??s. |
17:13:31 | IcyFoxy | And I didn't have to do any additional buffering on my Gentoo box, which uses a block buffer of 4096 by default. |
17:13:51 | IcyFoxy | Which goes against the man page for stdio and is not replicated on my nixos. |
17:14:57 | IcyFoxy | elrood: "fill a 64k buffer" So... buf: array[0..64 * 1024]; setbuffer(buf, 64*1024) (or setvbuf) ? |
17:15:51 | IcyFoxy | (Rust may equal the C performance if various checks were disabled, didn't try) |
17:21:51 | IcyFoxy | echo slice... stdout. has no fwrite? :/ |
17:21:55 | * | yglukhov joined #nim |
17:22:14 | * | gokr joined #nim |
17:23:50 | niv | is it somehow possible to mark a proc prototype that i then pass in to another proc as async? |
17:25:32 | * | k1io joined #nim |
17:25:36 | IcyFoxy | niv: Where does async come into play here? |
17:25:54 | niv | IcyFoxy: i want my callback to be awaitable |
17:26:50 | * | jeffc quit (Remote host closed the connection) |
17:27:14 | cheatfate | dom96, please review PRs |
17:27:33 | * | jeffc joined #nim |
17:27:57 | * | jeffc quit (Remote host closed the connection) |
17:28:36 | IcyFoxy | niv: I'm sorry I don't think I can help. Good luck. (Not sure what exactly you mean and new to nim) |
17:28:51 | niv | IcyFoxy: thanks anyways :) |
17:29:23 | * | derka joined #nim |
17:29:32 | IcyFoxy | :) |
17:29:40 | * | derka quit (Client Quit) |
17:30:27 | * | vendethiel joined #nim |
17:30:27 | dom96 | niv: just make the return type a Future[T] |
17:30:33 | dom96 | the return type of your proc |
17:30:39 | niv | dom96: okay, and leave the pragma off? |
17:31:05 | dom96 | yes, if it's just a proc type |
17:31:16 | niv | i just do: type MyCB = proc(params): Future[retval]; then give that as a param to another proc. the other proc should be able to await it |
17:31:27 | niv | I'll try that :) |
17:31:59 | * | ephja joined #nim |
17:39:21 | IcyFoxy | How do I get the 'ptr char' of the first element in an array? (Or the array itself rather0 |
17:39:24 | IcyFoxy | ) |
17:39:53 | IcyFoxy | Figured it out. v[0].addr |
17:40:43 | niv | dom96: cant get it to work :( |
17:41:05 | niv | https://gist.github.com/niv/3b8760c423c71f944b3f2a4524cb8109 what am i doing wrong? |
17:41:46 | * | jeffc joined #nim |
17:42:26 | dom96 | hrm, let me take a look |
17:42:53 | niv | its a rather odd error message. cant see what it would possibly want me to discard |
17:44:23 | niv | dom96: iactually messed up the example, the expensive op should be inside the callback instance of course. but the error remains the same |
17:44:31 | dom96 | Seems like a bug with either the {.async.} macro or how Nim handles the AST that was generated by it. This works: https://gist.github.com/dom96/d6552441dce494e3d58e4930057a3cf6 |
17:45:15 | niv | ah, okay. that's whats the async pragma does? |
17:45:24 | dom96 | as does this https://gist.github.com/dom96/497721003c7d12643d27e564196b1337 |
17:45:32 | dom96 | basically yeah. |
17:45:48 | dom96 | Seems you can get away with using the {.async.} pragma, as long as you don't nest it into the call like that |
17:45:53 | dom96 | But please report this as an issue |
17:45:55 | niv | good to know. thank you |
17:46:04 | niv | will do |
17:46:05 | * | jeffc quit (Ping timeout: 244 seconds) |
17:46:06 | dom96 | cheatfate: will do later on, sorry. |
17:50:23 | IcyFoxy | How do you tell nim to force stdout to be block buffered? |
17:50:38 | IcyFoxy | Without getting setvbuf manually in via FFI? :P |
17:51:19 | niv | dom96: https://github.com/nim-lang/Nim/issues/4102 hope this will do |
17:51:55 | dom96 | niv: brilliant thanks |
17:53:00 | niv | dom96: no, no, thank YOU for listening/helping :) |
17:53:24 | dom96 | niv: np :) |
17:55:04 | IcyFoxy | How is the string type in nim defined? |
17:55:11 | IcyFoxy | Null terminated or length? |
17:55:13 | reactormonk | both |
17:55:23 | IcyFoxy | That works. |
17:55:24 | IcyFoxy | Thanks |
18:27:25 | * | Ven joined #nim |
18:54:13 | * | castlelore quit (Quit: WeeChat 1.4) |
19:04:03 | * | BitPuffin quit (Ping timeout: 240 seconds) |
19:08:00 | * | desophos quit (Remote host closed the connection) |
19:18:49 | * | pregressive quit (Ping timeout: 252 seconds) |
19:26:34 | * | derka joined #nim |
19:28:45 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
19:37:08 | * | derka quit (Quit: derka) |
19:49:37 | * | irrequietus joined #nim |
19:49:59 | * | derka joined #nim |
19:55:03 | * | rok joined #nim |
20:01:58 | * | yglukhov quit (Read error: Connection reset by peer) |
20:02:26 | * | yglukhov joined #nim |
20:05:44 | * | rok quit (Quit: rok) |
20:06:08 | * | Arrrr quit (Quit: WeeChat 1.4) |
20:08:36 | * | desophos joined #nim |
20:13:50 | * | desophos quit (Ping timeout: 250 seconds) |
20:15:27 | * | desophos joined #nim |
20:20:16 | * | BlaXpirit quit (Quit: Bye) |
20:21:27 | * | pigmej quit (Ping timeout: 264 seconds) |
20:21:49 | * | pigmej joined #nim |
20:21:50 | * | BlaXpirit joined #nim |
20:30:25 | * | k1io quit (Quit: Connection closed for inactivity) |
20:30:30 | * | def- quit (Ping timeout: 268 seconds) |
20:39:37 | * | derka quit (Quit: derka) |
20:49:33 | * | def- joined #nim |
20:50:52 | * | yglukhov quit (Remote host closed the connection) |
20:51:52 | * | castlelo1 joined #nim |
20:55:19 | * | castlelo1 quit (Client Quit) |
20:55:35 | * | castlelore joined #nim |
21:08:26 | * | Matthias247 joined #nim |
21:10:01 | * | derka joined #nim |
21:18:31 | * | BlaXpirit quit (Quit: Bye) |
21:18:38 | * | irrequietus quit () |
21:19:17 | * | Demon_Fox joined #nim |
21:36:30 | * | PMunch joined #nim |
21:37:05 | cheatfate | Araq_, its not so easy to adopt asynchttpserver for multithreading as i think before... |
21:40:01 | cheatfate | just because of strings and refs everywhere |
21:42:43 | * | derka quit (Quit: derka) |
21:45:39 | * | BlaXpirit joined #nim |
21:47:44 | * | vendethiel quit (Ping timeout: 276 seconds) |
21:48:02 | * | derka joined #nim |
21:54:09 | * | devn quit (Ping timeout: 246 seconds) |
21:54:51 | * | devn joined #nim |
21:56:36 | * | Vivek_ quit (Ping timeout: 246 seconds) |
21:57:46 | * | Vivek joined #nim |
21:58:09 | * | Vivek is now known as Guest32495 |
21:59:44 | * | Jesin quit (Quit: Leaving) |
22:01:33 | * | Varriount quit (Ping timeout: 240 seconds) |
22:03:30 | * | elrood quit (Quit: Leaving) |
22:05:06 | * | Varriount joined #nim |
22:07:00 | * | derka quit (Ping timeout: 244 seconds) |
22:14:46 | * | derka joined #nim |
22:23:35 | * | Trustable quit (Remote host closed the connection) |
22:34:04 | * | brson quit (Ping timeout: 252 seconds) |
22:36:15 | * | brson joined #nim |
22:47:14 | * | StarBrilliant quit (Ping timeout: 250 seconds) |
22:47:49 | * | mtj_ quit (Ping timeout: 244 seconds) |
22:49:15 | * | Jesin joined #nim |
22:53:44 | * | PMunch quit (Ping timeout: 250 seconds) |
23:05:22 | * | mtj_ joined #nim |
23:05:56 | * | StarBrilliant joined #nim |
23:19:51 | * | Matthias247 quit (Read error: Connection reset by peer) |
23:45:10 | * | g00 quit (Ping timeout: 244 seconds) |
23:47:36 | * | wh1t3r0s3 joined #nim |
23:48:10 | * | Jesin quit (Quit: Leaving) |
23:50:52 | * | krux02 joined #nim |
23:51:08 | krux02 | is anyone online, who uses spacemacs for nim? |
23:51:37 | krux02 | I just tried it out, and instantly liked it, but some some reason I can not get nim completion to work |
23:52:38 | krux02 | and for some reasone company and flycheck are not enable by default even though I wrote in the conifg, that they should globally be toggled to be on |