00:08:47 | * | krux02 quit (Remote host closed the connection) |
02:09:23 | FromGitter | <Varriount> Not unless memory corruption is going on, or a library is unloaded |
02:16:55 | * | dddddd quit (Remote host closed the connection) |
02:18:59 | shashlick | i think loading nim dlls has finally caught up with me |
02:19:30 | shashlick | none of the GCs help and nimRtl doesn't work either with threads |
02:24:15 | * | abm quit (Quit: Leaving) |
02:36:17 | * | laaron joined #nim |
02:36:20 | skrylar[m] | finally managed the gdk stuff, still needs testing though |
02:42:31 | * | r3c quit (Ping timeout: 260 seconds) |
02:57:24 | * | dgreen quit (Remote host closed the connection) |
03:00:32 | * | laaron quit (Remote host closed the connection) |
03:01:06 | * | laaron joined #nim |
03:44:10 | * | stefanos82 joined #nim |
04:14:05 | * | fjellfras joined #nim |
04:15:14 | * | altarrel_ quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
04:19:42 | * | snifftek joined #nim |
04:33:28 | * | nsf joined #nim |
04:41:37 | * | tiorock joined #nim |
04:41:43 | * | tiorock quit (Changing host) |
04:41:43 | * | tiorock joined #nim |
04:41:43 | * | rockcavera is now known as Guest24310 |
04:41:43 | * | tiorock is now known as rockcavera |
04:43:09 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
04:45:14 | * | Guest24310 quit (Ping timeout: 272 seconds) |
04:47:19 | * | laaron joined #nim |
05:28:18 | * | solitudesf joined #nim |
05:31:05 | * | laaron quit (Remote host closed the connection) |
05:34:28 | FromGitter | <kayabaNerve> Should % nil be invalid? |
05:35:08 | FromGitter | <kayabaNerve> The JSON standard lib doesn't convert it to a JNull. It adds a literal null element which breaks if you try to print. |
05:35:37 | FromGitter | <kayabaNerve> Side note, what is up with nil, and especially nil/null fragmentation? |
05:40:33 | * | laaron joined #nim |
05:52:22 | * | rockcavera quit (Ping timeout: 272 seconds) |
05:53:47 | * | solitudesf quit (Ping timeout: 245 seconds) |
06:07:58 | * | nullnullnull quit (Quit: Leaving) |
06:13:48 | FromGitter | <Varriount> Probably an oversight |
06:27:21 | * | rockcavera joined #nim |
06:27:22 | * | rockcavera quit (Changing host) |
06:27:22 | * | rockcavera joined #nim |
06:33:06 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
06:33:43 | * | laaron joined #nim |
06:41:05 | * | solitudesf joined #nim |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:04:29 | * | gmpreussner joined #nim |
07:06:52 | * | solitudesf quit (Ping timeout: 244 seconds) |
07:35:08 | * | krux02 joined #nim |
07:53:10 | FromGitter | <kayabaNerve> And I caused a compiler crash again :/ Turns out my async code is problemat ic. |
07:53:19 | FromGitter | <kayabaNerve> Or async is. One of the two. |
08:13:43 | * | floppydh joined #nim |
08:14:41 | dom96 | what's your code? |
08:19:41 | Mister_Magister | guys i want to make small webserver using nim. Are there some libs for receiving/sending http request and/or html template engine? |
08:20:31 | leorize | asynchttpserver is a simple http server that you might like |
08:20:55 | leorize | there's also jester which is a bit more advanced |
08:22:32 | Mister_Magister | thanks! |
08:23:56 | Mister_Magister | what about template engine? is there some? |
08:24:10 | leorize | for an http template engine, karax can be used as a server-side thing |
08:24:14 | Mister_Magister | https://flyx.github.io/emerald/ |
08:24:16 | leorize | or htmlgen |
08:24:18 | leorize | or that |
08:24:20 | Mister_Magister | found this |
08:28:54 | * | stefanos82 quit (Quit: Quitting for now...) |
08:32:46 | * | jjido joined #nim |
08:35:00 | FromGitter | <kayabaNerve> dom96: I tried making a MWE ~24 hours ago and only caused an assert, not a crash. |
08:35:11 | FromGitter | <kayabaNerve> It's a deref immediately after an await with no interim var. |
08:39:22 | * | m712 joined #nim |
08:39:50 | dom96 | Do you have a stack trace? |
08:41:04 | FromGitter | <bevo009> Hi all, noob question here - is stdout.write equivalent to echo?(without inserting a new line) ⏎ And does Nim support creating direct aliases? ⏎ eg in JS I used var echo = console.log; |
08:44:24 | Mister_Magister | i'm gonna try using nim to make something on Azure sphere starter kit |
08:46:21 | FromGitter | <bevo009> Alternatively...is there any equivalent to C++ 'using' so I could drop the stdout. prefix? |
08:47:38 | FromGitter | <mratsim> stdout.write is more like a syscall to write |
08:47:53 | FromGitter | <mratsim> you can use templates for aliasing |
08:48:18 | FromGitter | <bevo009> Cheers, you got an example? |
08:48:34 | FromGitter | <mratsim> Nim has "using" and {.this: self.} (in experimental) for shortcuts but this: self is being phased out |
08:48:44 | FromGitter | <bevo009> I tried with procs and templates and failes...too noob |
08:48:52 | FromGitter | <bevo009> *failed |
08:49:25 | FromGitter | <mratsim> several example here: https://github.com/nim-lang/Nim/pull/11686 |
08:49:52 | FromGitter | <mratsim> template myalias(): untyped = whatYouWantYoAlias |
08:50:30 | FromGitter | <bevo009> ahh I see where I went wrong...I used untyped in the wrong field |
08:50:39 | FromGitter | <bevo009> Where would you read the documentation on stdout? ⏎ I went here and clicked on source, and got a 404 msg ⏎ https://nim-lang.org/docs/io.html#stdout |
08:51:08 | FromGitter | <mratsim> stdout is just the file descriptor for the standard output |
08:51:51 | FromGitter | <bevo009> stdout.write then |
08:52:24 | FromGitter | <mratsim> https://github.com/nim-lang/Nim/blob/devel/lib/system/io.nim#L297 |
08:53:00 | FromGitter | <gogolxdong> https://nim-lang-cn.org/ is working in proccess. |
08:53:28 | FromGitter | <mratsim> nice |
08:55:01 | * | Vladar joined #nim |
08:56:21 | FromGitter | <bevo009> @mratsim Just tried going off your example but... ⏎ ```template write(): untyped = stdout.write()``` ⏎ Error: type mismatch: got <int literal(42)> ⏎ but expected one of: ⏎ template write(): untyped [https://gitter.im/nim-lang/Nim?at=5d43fab545da450fec9039bf] |
08:57:03 | FromGitter | <mratsim> template write(x: untyped): untyped = stdout.write(x) |
08:57:20 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
08:57:44 | FromGitter | <bevo009> many thanks! |
09:00:51 | FromGitter | <bevo009> I just realised stdout.write displays a float as an integer, eg stdout.write 42.0 => 42 |
09:01:00 | * | ng0 joined #nim |
09:01:13 | FromGitter | <alehander42> hey kout |
09:01:18 | FromGitter | <alehander42> wait, no |
09:01:21 | FromGitter | <bevo009> There is no new-line less version of echo right? |
09:01:21 | FromGitter | <alehander42> import jsconsole |
09:01:25 | FromGitter | <alehander42> jsconsole.log |
09:01:29 | FromGitter | <alehander42> for the javascript backend |
09:02:09 | FromGitter | <alehander42> but you can also write your own `proc kout*T (x: T) {.importc: "console.log", varargs.} ` (taken from karax~ |
09:02:41 | krux02 | I just made an alias implementation in a pure macro solution: http://ix.io/1Qlf |
09:02:57 | * | lritter joined #nim |
09:03:43 | krux02 | limitations are given: It can't alias template/macro symbols that don't need arguments, as well as const or overloaded procs. |
09:05:53 | krux02 | what that alias implementation does, it generates the template definiton that you would otherwise write manually for that procedure, automatically. |
09:08:53 | FromGitter | <mratsim> what you want to alias stdout.write? |
09:09:03 | FromGitter | <mratsim> i.e. here it's currying |
09:10:31 | FromGitter | <mratsim> I think the `typed` would prevent that but it would probably work if it's changed to untyped if I followed correctly |
09:13:47 | FromGitter | <bevo009> Well I'm just trying to get a version of echo that doesn't print a new line |
09:14:09 | FromGitter | <bevo009> echo 42 .0 => 42.0 |
09:15:51 | FromGitter | <mratsim> The write displaying float as integers if they are exact is probably a quirk of Javascript, you can raise a bug on that |
09:16:21 | FromGitter | <bevo009> I've only gone through marin's book so far so I haven't really touched templates and macros yet |
09:16:45 | FromGitter | <bevo009> Sorry, what's stdout.write got to do with js? |
09:17:52 | FromGitter | <bevo009> I just used js as an example of how I did it there |
09:18:13 | FromGitter | <bevo009> This is running a .nim file in code runner or the console |
09:22:18 | FromGitter | <alehander42> you can write your own usually |
09:22:48 | FromGitter | <alehander42> using something like proc echoNoNewline*(x: varargs[untyped, `$`]) = .. code |
09:22:54 | FromGitter | <alehander42> (adapted from system.nim) |
09:23:40 | FromGitter | <alehander42> $ is ``` ⏎ `$` ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=5d44011cd5f4d4442ff2600a] |
09:23:57 | FromGitter | <alehander42> this means you receive something that looks like a sequence of strings (it autoconverts all the args with $) |
09:24:14 | FromGitter | <alehander42> and you can iterate and stdout.write them one by one without newline |
09:24:57 | FromGitter | <alehander42> notice echo is guaraneed to be thread-safe, not sure if thats important for you in this case |
09:25:22 | FromGitter | <bevo009> My one won't accept more than one arg either, like this does |
09:25:23 | FromGitter | <bevo009> stdout.write 42, " 42 ", 42.0, "\n" |
09:29:31 | FromGitter | <bevo009> #alehander42 I tried your version, Error: expression expected, but found ']' |
09:29:38 | FromGitter | <bevo009> was I meant to modify it? |
09:30:14 | FromGitter | <alehander42> yes |
09:30:51 | FromGitter | <bevo009> Well I'm lost then |
09:30:55 | FromGitter | <alehander42> ```proc echoNoNewline*(x: varargs[untyped, `$`]) = ⏎ # iterate here ⏎ ``` [https://gitter.im/nim-lang/Nim?at=5d4402cf25944f489adf0726] |
09:32:31 | FromGitter | <bevo009> I tried this: |
09:32:34 | FromGitter | <bevo009> ```proc echoNoNewline*(x: varargs[untyped, `$`]) = ⏎ stdout.write(x)``` |
09:34:42 | FromGitter | <bevo009> Error: invalid type: 'untyped' in this context: 'proc (x: varargs[untyped])' for proc |
09:35:00 | * | NimBot joined #nim |
09:35:25 | FromGitter | <alehander42> uh sorry, untyped proc args were forbidden outside of system.nim indeed i forgot |
09:35:32 | FromGitter | <bevo009> It looks like it should work, variable number of args, untyped, but... |
09:37:12 | FromGitter | <alehander42> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d44044825944f489adf072b] |
09:37:28 | FromGitter | <alehander42> ok, this works: basically you need a template for the untyped stuff usually .. but |
09:37:39 | FromGitter | <alehander42> you can really iterate over varargs[untyped] |
09:37:44 | FromGitter | <alehander42> so you need a macro |
09:40:16 | FromGitter | <bevo009> echoNoNewline 42, " 42 ", 42.0 => 42 42 42 |
09:40:33 | FromGitter | <bevo009> the float still presents as an integer |
09:40:52 | FromGitter | <bevo009> You need a $ in there somewhere? |
09:41:23 | leorize | !eval echo 42.0 |
09:41:26 | NimBot | 42.0 |
09:42:42 | FromGitter | <bevo009> I'm not getting 42.0 |
09:43:37 | FromGitter | <bevo009> I'm on 0.20.2 |
09:43:53 | FromGitter | <bevo009> How does it work on nimbot? |
09:44:22 | FromGitter | <bevo009> Ohh...that's using echo...duh |
09:44:45 | FromGitter | <bevo009> Disregard |
09:48:12 | FromGitter | <kayabaNerve> dom96: Uhhhh yes, I have one. I posted it here and can check the logs for it. |
09:48:38 | krux02 | I once implemented a PR that unified all of float printing to a sigle function. It got rejected for reasons I don't know anymore. |
09:48:55 | FromGitter | <bevo009> Curious why it's not part of the core language ⏎ Red lang for instance has print (echo) and prin (no new line) ⏎ Although 'ech' would be a bit weird :) ⏎ Some people must use it, like before user input [https://gitter.im/nim-lang/Nim?at=5d440707a96def4751a34a68] |
09:50:03 | FromGitter | <alehander42> well it rarely makes sense, but i agree |
09:50:12 | FromGitter | <alehander42> a custom endline character might be useful |
09:50:28 | FromGitter | <bevo009> Is that possible? |
09:50:37 | FromGitter | <alehander42> well, if you write your own helper |
09:50:39 | FromGitter | <alehander42> as this macro |
09:50:48 | FromGitter | <alehander42> so, whats the problem? 42.0 is "42" |
09:50:49 | FromGitter | <alehander42> ? |
09:50:57 | FromGitter | <bevo009> yep |
09:51:26 | FromGitter | <bevo009> That is exactly how stdout.write presents it also |
09:51:30 | FromGitter | <alehander42> hm, try to add $`arg ` |
09:51:31 | FromGitter | <alehander42> instead |
09:51:36 | FromGitter | <bevo009> echo must stringify it |
09:51:37 | FromGitter | <alehander42> ```$`arg` ⏎ ⏎ ``` [https://gitter.im/nim-lang/Nim?at=5d4407a9dfbfc20f5a853769] |
09:51:53 | FromGitter | <alehander42> instead of `arg` |
09:51:54 | leorize | !eval stdout.write 42.0 |
09:51:56 | NimBot | 42 |
09:52:03 | FromGitter | <kayabaNerve> `Error: internal error: yield in expr not lowered` ⏎ Commit: https://github.com/MerosCrypto/Meros/commit/cec34fa76a5f13331c005e81ba5b576349b311c2 ⏎ Mutation since I didn't push broken code: https://gitter.im/nim-lang/Nim?at=5d4159f45367476cc983fd09] ⏎ Stack: https://pastebin.com/QSdV0BVA [https://gitter.im/nim-lang/Nim?at=5d4407c3757b7b19c83f650b] |
09:52:06 | FromGitter | <kayabaNerve> dom96 ^^ |
09:52:07 | leorize | interesting |
09:52:14 | FromGitter | <alehander42> !eval stdout.write 42.2 |
09:52:17 | NimBot | 42.2 |
09:52:44 | FromGitter | <kayabaNerve> I did push a smaller problem code segment/an attempt MWE after that Gitter message. I just couldn't get a working MWE despite multiple occurrences. |
09:53:08 | leorize | !eval stdout.write $42.0 |
09:53:11 | NimBot | 42.0 |
09:53:24 | leorize | this is interesting |
09:53:35 | leorize | for one, this is write() signature: https://github.com/nim-lang/Nim/blob/devel/lib/system/io.nim#L320 |
09:53:56 | leorize | meaning that `$` should be applied to every non-string params |
09:54:16 | leorize | but produced a different result than $42.0 :/ |
09:55:57 | FromGitter | <alehander42> hmmm |
09:56:01 | FromGitter | <alehander42> what did it produce |
09:56:10 | FromGitter | <alehander42> i see, so thats how you can do it as a function |
09:57:36 | FromGitter | <alehander42> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d4409102f64b21887da45c5] |
09:57:45 | FromGitter | <alehander42> this seems to work ? |
09:57:49 | FromGitter | <alehander42> @bevo009 |
09:58:19 | leorize | !eval stdout.write 42.0 |
09:58:22 | NimBot | 42 |
09:58:27 | leorize | it doesn't, and that's a problem |
09:58:35 | FromGitter | <alehander42> but this is a different function |
09:58:54 | FromGitter | <alehander42> in my example (the last snippet) it works |
09:59:16 | leorize | !eval stdout.write 42, "42", 42.0 |
09:59:19 | NimBot | 424242.0 |
09:59:27 | leorize | oh it works now :P |
09:59:36 | FromGitter | <alehander42> but i see what you mean |
09:59:40 | leorize | ah, I see, there's a float overload for write() |
09:59:46 | FromGitter | <alehander42> ah right |
10:00:11 | FromGitter | <Riderfighter> Hello everyone 👋 |
10:00:46 | FromGitter | <bevo009> Winner! |
10:02:35 | FromGitter | <bevo009> Can't use write, but print works |
10:03:50 | FromGitter | <bevo009> Thank you Alexander and leorize |
10:04:26 | FromGitter | <bevo009> I have now got some macro and template examples to tweak also...very educational :) |
10:10:15 | * | vlad1777d joined #nim |
10:25:10 | * | fjellfras quit (Quit: Leaving) |
10:25:39 | * | vlad1777d quit (Ping timeout: 258 seconds) |
10:27:53 | FromGitter | <bevo009> !eval stdout.write 42.0 |
10:27:56 | NimBot | 42 |
10:28:02 | FromGitter | <bevo009> !eval stdout.write 42.0, 42.0 |
10:28:05 | NimBot | 42.042.0 |
10:28:10 | FromGitter | <bevo009> I think there is something wrong with stdout.write() ⏎ With one arg supplied it gives an integer: ⏎ stdout.write 42.0 => 42 ⏎ but with 2 args supplied, it's correct... ⏎ stdout.write 42.0, 42.0 => 42.042.0 [https://gitter.im/nim-lang/Nim?at=5d44103a41d5cd61b59df7b2] |
10:29:44 | FromGitter | <alehander42> yes leorize found out |
10:29:49 | FromGitter | <alehander42> its overloaded for a float argument |
10:30:00 | FromGitter | <alehander42> basically different overloads are called |
10:30:05 | FromGitter | <alehander42> when you call it with one float arg |
10:30:09 | FromGitter | <alehander42> and with several args |
10:30:35 | FromGitter | <bevo009> ahh cool, you guys are onto it |
10:33:45 | FromGitter | <bevo009> !eval stdout.write $42.0 |
10:33:48 | NimBot | 42.0 |
10:33:58 | FromGitter | <bevo009> That'll do for now |
10:38:09 | * | go|dfish quit (Quit: SIGQUIT) |
10:53:27 | leorize | anyone know how the HCR codegen works? |
11:02:13 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
11:05:09 | * | jjido joined #nim |
11:08:29 | FromGitter | <alehander42> there should be a hcr doc somewhere |
11:08:36 | FromGitter | <alehander42> 1) the source docs |
11:08:56 | FromGitter | <alehander42> \+ you even some recorded talks about that, i remember visiting one |
11:10:13 | FromGitter | <alehander42> e.g. https://www.youtube.com/watch?v=7WgCt0Wooeo 29 minute |
11:14:58 | * | dddddd joined #nim |
11:19:11 | * | solitudesf joined #nim |
11:30:46 | FromGitter | <kayabaNerve> The 42 problem above reminds me of https://github.com/nim-lang/Nim/issues/10963 |
11:41:49 | FromGitter | <ahcm> I/O seems a bit slow or what is this: $ for i in 1 2 3; time python3.7 counlines.py FILE ⏎ 728304 ⏎ python3.7 counlines.py FILE 0,40s user 0,09s system 98% cpu 0,498 total ⏎ 728304 ⏎ python3.7 counlines.py FILE 0,38s user 0,09s system 98% cpu 0,479 total ... [https://gitter.im/nim-lang/Nim?at=5d44217dd7fc954750e6d313] |
11:42:03 | FromGitter | <ahcm> $ for i in 1 2 3; time ./counlines FILE ⏎ 728304 ⏎ ./counlines FILE 0,70s user 0,10s system 99% cpu 0,801 total ⏎ 728304 ⏎ ./counlines FILE 0,69s user 0,09s system 99% cpu 0,787 total ... [https://gitter.im/nim-lang/Nim?at=5d44218aff59f961b4ff87cd] |
11:51:00 | FromGitter | <ahcm> found https://github.com/nim-lang/Nim/issues/3084, reading ... |
11:55:36 | * | abm joined #nim |
12:00:59 | * | stefanos82 joined #nim |
12:03:26 | FromGitter | <ahcm> Might be -O2 vs -O3, how can I change that cc flag for him? |
12:17:28 | * | nsf quit (Quit: WeeChat 2.4) |
12:27:47 | * | solitudesf quit (Ping timeout: 248 seconds) |
12:29:49 | * | kungtotte quit (Quit: WeeChat 2.5) |
12:36:51 | FromGitter | <alehander42> passC |
12:37:06 | FromGitter | <alehander42> or directly in nim.cfg |
12:37:32 | FromGitter | <alehander42> but --opt:speed |
12:37:35 | FromGitter | <alehander42> should enable -O3 |
12:58:05 | * | laaron quit (Remote host closed the connection) |
13:01:26 | * | laaron joined #nim |
13:05:09 | * | laaron quit (Remote host closed the connection) |
13:16:25 | * | laaron joined #nim |
13:16:51 | Zevv | -d:danger |
13:17:19 | * | sagax quit (Remote host closed the connection) |
13:26:48 | * | nsf joined #nim |
13:27:56 | * | fjellfras joined #nim |
13:28:17 | * | fjellfras quit (Max SendQ exceeded) |
13:28:46 | * | fjellfras joined #nim |
13:29:25 | * | fjellfras quit (Max SendQ exceeded) |
13:29:56 | * | fjellfras joined #nim |
13:30:35 | * | fjellfras quit (Max SendQ exceeded) |
13:30:52 | * | MarderIII joined #nim |
13:31:12 | * | fjellfras joined #nim |
13:34:41 | * | clyybber joined #nim |
13:54:32 | * | clyybber quit (Quit: WeeChat 2.5) |
13:56:18 | livcd | very generic question but what is now the perf difference between d:release and d:danger ? |
13:57:49 | Zevv | The nim compiler itself is about 50% slower for me on d:release then on d:danger |
14:02:45 | * | fjellfras quit (Quit: Leaving) |
14:03:36 | livcd | and for other things? |
14:03:45 | livcd | for compiler that's different no ? |
14:04:01 | Zevv | well, the compiler is just a Nim program like any other |
14:04:10 | Zevv | but of course it will depend on your own code. |
14:04:14 | Zevv | it's easy to measure :) |
14:06:38 | FromGitter | <GULPF> @bevo009 I opened a PR to fix your issue: #11874 |
14:07:42 | * | sagax joined #nim |
14:11:01 | Calinou | TIL about -d:danger |
14:13:52 | krux02 | @GULPF: I am sorry, but I have to reject that PR |
14:14:35 | FromGitter | <GULPF> Ok, why? |
14:14:40 | krux02 | these overloads exist, so that writing floats to stdout (or other streams) doesn't create an intermediate object. |
14:15:01 | krux02 | intermediate string objects are performance killers. |
14:15:27 | FromGitter | <GULPF> I understand that. But performance should not come before correctness. |
14:15:49 | krux02 | was it incorrect then? |
14:16:10 | krux02 | performance is correctness. |
14:20:10 | FromGitter | <GULPF> Incorrect in the sense that it's completely unexpected. Based on the comments in strmantle.addFloat it sounds like io.write for float wont even behave the same on different platforms. |
14:22:38 | FromGitter | <kaushalmodi> > Incorrect in the sense that it's completely unexpected. ⏎ ⏎ =1 |
14:22:41 | FromGitter | <kaushalmodi> +1 :) |
14:23:37 | livcd | Zevv: that's "concerning" |
14:24:52 | krux02 | GULPF, you can provide a fix for the unexpected behavior, but you cannot provide a "fix" that causes a big performance regression just to fix a minor visual annoyance. |
14:25:57 | Zevv | livcd: what is? |
14:28:33 | FromGitter | <arnetheduck> "yeah don't worry about it, we print a bit different things randomly, but nim is fine for your scientific computing, trust us" |
14:30:31 | livcd | Zevv: is the -d:danger meant to be used for things running in production? |
14:30:53 | Zevv | I don't know. See https://github.com/nim-lang/Nim/issues/11860 |
14:31:44 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
14:32:34 | krux02 | livcd: The danger is a flag that Araq came up with. He likes it. I think it is a horrible thing to have. It was was -d:release used to be. |
14:33:20 | krux02 | GulpF, kaushalmodi, arnetheduck: If my PR would have been accepted here that issue would have already been fixed: https://github.com/nim-lang/Nim/pull/7262 |
14:33:28 | livcd | krux02: that's why I am asking. Looks like -d:danger is not really meant to be used as d:release then :X |
14:34:12 | krux02 | I replaced all my usages of -d:release with -d:danger now, because I did not have a problem with what -d:release meant before it got changed. |
14:34:25 | krux02 | -d:release now means: all runtime checks on. |
14:34:32 | Zevv | same here. I have a hard time explaining the customer why all my code is running at half speed at once |
14:34:36 | krux02 | which is super slow and very unexpected. |
14:35:10 | livcd | Zevv: you have a customer for your Nim code ? |
14:35:26 | krux02 | I told him that I can't just change the meaning of things under the hood. There are people out there that rely on the behavior of it. |
14:35:31 | Zevv | livcd: one and a half. the other one doesn't know I'm using nim |
14:35:58 | FromGitter | <arnetheduck> generally, languages are able to implement the checks that nim does with no more than 2-3% perf loss - I suspect nim's troubles are down to bad codegen, not that the checks can't be implemented efficiently |
14:36:13 | Zevv | krux02: and I imagine distro packagers will just use -d:release as this is still the advertized way in the documentation - so the default prebuilt nims in various os's will just be slower and bigger |
14:36:42 | krux02 | But that was his intention. He wanted to change the behavior of unteachable server developers that resisted to not use the -d:release even though it meant bad things for them. |
14:36:43 | FromGitter | <arnetheduck> the problem with -d:danger is that it complete changes the meaning of the program, specifically because of the way exceptions are used |
14:37:56 | krux02 | please open an issue about this in the issue tracker. I already told Araq thit this change was a bad idea. But my word alone was aparently not enough to convince Araq that this change was a bad idea. |
14:38:44 | Zevv | krux02: is https://github.com/nim-lang/Nim/issues/11860 not clear enough? |
14:38:47 | FromGitter | <arnetheduck> I think it's a good change - in fact, I'd remove -d:danger completely so the language can *focus* on generating good code instead of wasting space and testing on UB |
14:39:25 | krux02 | very important for those issues are good undarstandable complications and examples. Please don't create an issues that just links to this conversation. I really dislike such issues. An issue should summarize the problem. |
14:39:27 | FromGitter | <arnetheduck> ie fix it by fixing -d:release to perform well, not by introducing alternative behaviors |
14:40:22 | FromGitter | <ahcm> -d:danger makes it run much faster, still slow in comparison |
14:40:29 | livcd | arnetheduck: i have a feeling that was the intention |
14:40:52 | krux02 | Zevv: If you want an issue to be solved, you need to document it properly. |
14:42:20 | krux02 | references to external sources are always good underline your point, but referenceing without having own words to describe what is wrong is just an issue that I don't want to deal with. Nobody who works at the compiler wants to deal with lazy written issues. |
14:50:58 | * | laaron quit (Remote host closed the connection) |
14:52:11 | krux02 | @GULPF: generally speaking about pull requests. It is always recommended to create an issues report and a pull request. This way the PR can be closed, but the issue still remains. |
14:54:16 | * | laaron joined #nim |
14:57:53 | * | sammich quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
14:59:02 | * | sammich joined #nim |
15:09:01 | * | MarderIII quit (Ping timeout: 268 seconds) |
15:13:10 | * | nsf quit (Quit: WeeChat 2.4) |
15:19:02 | * | laaron quit (Remote host closed the connection) |
15:21:28 | * | floppydh quit (Quit: WeeChat 2.5) |
15:21:30 | * | laaron joined #nim |
15:32:00 | * | ng0 joined #nim |
15:37:30 | * | jjido joined #nim |
15:38:24 | * | laaron quit (Remote host closed the connection) |
15:41:57 | * | shashlick quit (Remote host closed the connection) |
15:42:23 | * | shashlick joined #nim |
15:42:46 | * | laaron joined #nim |
15:46:48 | FromGitter | <bevo009> @krux02 Re: "these overloads exist, so that writing floats to stdout (or other streams) doesn't create an intermediate object... intermediate string objects are performance killers." ⏎ Be aware though, Nim prints correctly when the first decimal place isn't a 0 ⏎ !eval stdout.write 42.1 |
15:46:59 | FromGitter | <bevo009> !eval stdout.write 42.1 |
15:47:02 | NimBot | 42.1 |
15:47:12 | FromGitter | <bevo009> !eval stdout.write 42.0 |
15:47:14 | NimBot | 42 |
15:52:08 | * | Jesin quit (Quit: Leaving) |
15:54:43 | * | JustASlacker joined #nim |
15:56:21 | * | Jesin joined #nim |
15:58:14 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
16:07:19 | * | laaron quit (Remote host closed the connection) |
16:10:14 | * | laaron joined #nim |
16:12:14 | * | solitudesf joined #nim |
16:14:43 | Zevv | can anyone elaborate on the exact limitations of the vm considering object variants? I'm trying to do things that do not work, and I here say that this is not supposed to be possible, but the VM works with NimNodes all the time, which are just object variants |
16:21:05 | lqdev[m] | dang recursive dependencies (or the lack of them), I must do strange workarounds to get practically anything to work |
16:34:51 | * | dgreen joined #nim |
16:34:55 | * | Trustable joined #nim |
16:37:08 | * | shashlick quit (Remote host closed the connection) |
16:55:53 | * | MarderIII joined #nim |
16:56:58 | * | JustASlacker quit (Quit: Leaving) |
17:13:51 | * | jjido joined #nim |
17:20:50 | * | drewr quit (Quit: ERC (IRC client for Emacs 26.2)) |
17:24:30 | * | drewr joined #nim |
17:24:56 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
17:32:39 | * | jjido joined #nim |
17:44:07 | FromGitter | <zacharycarter> is there a link to the rationale behind `-d:danger`? |
17:45:12 | Zevv | not publicly afaik. it just happened |
17:45:12 | FromGitter | <zacharycarter> never mind I found the issue |
17:45:20 | Zevv | link? |
17:45:33 | FromGitter | <zacharycarter> well - I guess this explains at least the logic behind it - https://github.com/nim-lang/Nim/commit/721534119000c2bd53cc72b531726a6104381222 |
17:45:48 | FromGitter | <zacharycarter> although you probably also have to be a mind reader to fully understand |
17:46:58 | FromGitter | <zacharycarter> sudden increases in binary size and decreases in performance aren't good things right before a 1.0 release |
17:47:19 | Zevv | sudden increases in diagnostics and reliability are, though |
17:47:28 | FromGitter | <zacharycarter> is the only impact that people need to start using `-d:danger` vs `-d:release`? Also `-d:danger` sounds bad |
17:47:35 | FromGitter | <zacharycarter> like it's something you shouldn't be doing |
17:47:36 | Zevv | I guess that's the point |
17:48:10 | FromGitter | <zacharycarter> so basically to have the `like C` performance Nim touts everywhere, you have to do bad things with it |
17:48:10 | Zevv | I think I like arnetheducks point: it's supposed to suck - which should put the weight on improving performance of the stuff which is still enabled with using d:release |
17:49:25 | FromGitter | <zacharycarter> it's sound reasoning but it's also not going to be a very marketable selling point for the language |
17:50:50 | FromGitter | <zacharycarter> but I guess it's better than telling people they will be using a more performant language when in reality they are sacrificing safety to do so |
17:52:05 | FromGitter | <zacharycarter> in other Nim related news - I fixed my tile rendering issue I was facing a week or so ago - |
17:52:12 | FromGitter | <zacharycarter> (https://files.gitter.im/nim-lang/Nim/BU1q/image.png) |
17:52:16 | FromGitter | <zacharycarter> so I guess I'm back to working on a 3d rts |
17:54:12 | FromGitter | <zacharycarter> starting with the map editor - the texture is actually a 2d texture array so I can easily switch b/w textures |
17:54:16 | FromGitter | <zacharycarter> inside of the fragment shader |
17:54:59 | FromGitter | <zacharycarter> (https://files.gitter.im/nim-lang/Nim/AA2e/image.png) |
17:55:04 | FromGitter | <zacharycarter> and I already have the nimscript scripting / hot reloading system working for game code |
17:55:41 | FromGitter | <zacharycarter> so time to start adding nuklear gui to the mix in the editor |
18:09:45 | * | nsf joined #nim |
18:15:16 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
18:15:56 | * | laaron joined #nim |
18:19:17 | FromGitter | <zacharycarter> so regarding `newruntime` - if you want to depend on old code that isn't written with `newruntime` in mind - will you be able to? |
18:19:26 | FromGitter | <zacharycarter> I imagine no? |
18:21:31 | disruptek | depends upon how old it is. |
18:22:33 | FromGitter | <zacharycarter> hmm okay |
18:25:11 | * | enthus1ast quit (Ping timeout: 250 seconds) |
18:38:20 | * | enthus1ast joined #nim |
19:01:14 | * | ehmry quit (Remote host closed the connection) |
19:08:27 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
19:13:21 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
19:20:51 | * | laaron joined #nim |
19:33:10 | * | jjido joined #nim |
19:42:59 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
20:02:19 | * | nsf quit (Quit: WeeChat 2.4) |
20:30:28 | * | stefanos82 quit (Quit: Quitting for now...) |
20:31:19 | * | Kaivo quit (Quit: WeeChat 2.5) |
20:39:50 | * | jjido joined #nim |
20:50:53 | FromGitter | <deech> Can anyone familiar with the compiler offer some guidance? After a function call the compiler immediately tries to compile time evaluate compile time nodes or ones that have no side effects (https://github.com/nim-lang/Nim/blob/devel/compiler/semexprs.nim#L873), which allows compile time evaluation of nodes that don't even typecheck! The proper behavior I think is to do it code gen. time but I can't immediately see where |
20:50:53 | FromGitter | ... to place that call. |
20:55:46 | FromDiscord_ | <telara{a> Hello guys, this it the Nim book, "Nim in Action" - Dominik Picheta, for 2017. |
20:55:46 | FromDiscord_ | <telara{a> https://cdn.discordapp.com/attachments/371759389889003532/606953306799210496/unknown.png |
20:56:21 | FromDiscord_ | <telara{a> That section say, that the limit for an uint16 is 65,5350 (?) |
20:56:53 | FromDiscord_ | <telara{a> The real limit is, 65,535 |
20:56:53 | FromDiscord_ | <telara{a> https://cdn.discordapp.com/attachments/371759389889003532/606953588853571614/unknown.png |
20:58:11 | FromDiscord_ | <telara{a> This is from ~ 3 years ago ahahah. Anyway, I want say publish that. |
20:58:23 | FromDiscord_ | <telara{a> This is from ~ 2 years ago ahahah. Anyway, I want say publish that. |
20:59:35 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
21:05:40 | * | drewr quit (Ping timeout: 276 seconds) |
21:10:27 | * | Vladar quit (Remote host closed the connection) |
21:16:07 | * | kungtotte joined #nim |
21:18:25 | * | drewr joined #nim |
21:18:38 | FromDiscord_ | <Bit> looks like a typo considering the comma placement |
21:24:48 | * | MarderIII quit (Quit: Leaving) |
21:26:02 | FromDiscord_ | <abeaumont> the same applies to 8-bit and 32-bit cases |
21:28:47 | * | solitudesf quit (Ping timeout: 245 seconds) |
21:32:16 | * | kungtotte quit (Quit: WeeChat 2.5) |
21:39:04 | * | Trustable quit (Remote host closed the connection) |
21:41:09 | disruptek | i'm really tired of forgetting to `import tables` have having no table semantics on table types imported from elsewhere. it's insane. |
21:41:11 | dom96 | yes, it's not even a typo |
21:41:26 | dom96 | it's a an error that was introduced when the book was converted into print |
21:44:00 | dom96 | and yeah, it sucks. I actually wanted to use this as a neat little reference recently and got confused :( |
22:03:34 | * | kungtotte joined #nim |
22:04:55 | disruptek | what's it called when you make a bad decision, followed by a bad decision, followed by a bad decision, followed by a decision that would have been bad if it hadn't followed all those other bad decisions? |
22:05:08 | FromDiscord_ | <telara{a> Again, why ythis guys are not equals? |
22:05:08 | FromDiscord_ | <telara{a> https://cdn.discordapp.com/attachments/371759389889003532/606970753295974401/unknown.png |
22:15:55 | * | rockcavera quit (Remote host closed the connection) |
22:17:02 | FromGitter | <Varriount> Ugh, is it me, or is java the only language where it's "normal" to encounter 500 line tracebacks |
22:19:01 | disruptek | that's a "feature" you get "for free". |
22:21:51 | disruptek | so `quote do` is compile-time only? 🙄 |
22:27:28 | * | Summertime quit (Quit: Sunsetting.) |
22:28:49 | * | Summertime joined #nim |
22:34:44 | FromGitter | <Varriount> disruptek: Yes |
22:34:51 | FromGitter | <Varriount> It's a macro helper |
22:36:18 | disruptek | know of any example of crafting nim code at runtime? |
22:37:05 | disruptek | i dunno why i should have to do at compile time what i wish to do at runtime. |
22:45:23 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
23:10:24 | * | snifftek quit (Remote host closed the connection) |