00:00:22 | * | gokr quit (Read error: Connection reset by peer) |
00:15:34 | * | def-pri-pub quit (Ping timeout: 240 seconds) |
00:17:32 | * | def-pri-pub joined #nim |
00:27:30 | * | def-pri-pub quit (Ping timeout: 276 seconds) |
00:27:53 | * | def-pri-pub joined #nim |
00:27:53 | * | def-pri-pub quit (Changing host) |
00:27:53 | * | def-pri-pub joined #nim |
00:49:59 | * | Kingsquee joined #nim |
01:19:44 | * | chemist69 quit (Ping timeout: 255 seconds) |
01:24:49 | * | chemist69 joined #nim |
02:09:01 | * | chemist69 quit (Ping timeout: 256 seconds) |
02:11:30 | * | vlad1777d quit (Remote host closed the connection) |
02:21:28 | * | chemist69 joined #nim |
02:33:48 | * | zenith777 joined #nim |
02:46:44 | * | zenith777 quit (Quit: Leaving) |
02:46:54 | * | zenith777 joined #nim |
02:47:18 | * | zenith777 is now known as Guest32332 |
02:48:31 | * | Guest32332 quit (Client Quit) |
03:04:51 | * | carterza quit (Quit: carterza) |
03:10:16 | * | brson quit (Quit: leaving) |
03:26:40 | * | Varriount|Mobile joined #nim |
03:30:53 | * | d10n quit (Remote host closed the connection) |
03:32:11 | * | Varriount|Phone joined #nim |
03:34:34 | * | Varriount|Mobile quit (Ping timeout: 240 seconds) |
04:09:34 | * | Kingsqueee joined #nim |
04:10:43 | * | Kingsquee quit (Read error: Connection reset by peer) |
04:11:25 | * | ibk joined #nim |
04:56:24 | * | def-pri-pub quit (Quit: leaving) |
05:08:29 | * | gmpreussner_ quit (Ping timeout: 255 seconds) |
05:24:59 | * | shashlick quit (Quit: Connection closed for inactivity) |
05:43:26 | * | couven92 joined #nim |
05:48:25 | * | gmpreussner joined #nim |
06:12:19 | * | nsf joined #nim |
06:19:19 | yay | I'm using the VS Code plugin and noticed that nimsuggest uses 1.6GB of RAM. Seems a bit excessive. Could there be a memory leak? |
06:21:38 | * | hcorion quit (Quit: Konversation terminated!) |
06:22:35 | * | kunev quit (Ping timeout: 255 seconds) |
06:23:54 | * | kunev joined #nim |
06:30:09 | * | bjz joined #nim |
06:30:18 | * | yglukhov joined #nim |
06:33:20 | * | kulelu88 quit (Quit: Leaving) |
06:34:53 | * | yglukhov quit (Ping timeout: 255 seconds) |
06:35:46 | FromGitter | <barcharcraz> is there a way to take an ident in a macro and bind it like a mixin? |
06:36:13 | FromGitter | <barcharcraz> I want to take a (static) string and bind something to the string's ident |
06:49:18 | * | Kingsquee joined #nim |
06:50:11 | * | Kingsqueee quit (Ping timeout: 264 seconds) |
06:56:03 | * | couven92 quit (Quit: Client disconnecting) |
07:06:39 | * | ftsf_ quit (Remote host closed the connection) |
07:11:26 | Araq | barcharcraz: use macros.bindSym |
07:11:55 | Araq | yay: yes. |
07:36:10 | * | byte512 joined #nim |
07:37:47 | * | couven92 joined #nim |
07:44:55 | * | gokr joined #nim |
07:45:36 | * | bjz_ joined #nim |
07:46:10 | * | filcuc joined #nim |
07:47:20 | * | bjz quit (Ping timeout: 255 seconds) |
07:57:02 | gokr | Anyone here played with Nim on either ESP32 or Zephyr? I am itching to give either a go. |
08:03:57 | * | djellemah_ joined #nim |
08:04:37 | * | djellemah__ joined #nim |
08:07:41 | * | PMunch joined #nim |
08:07:51 | * | djellemah quit (Ping timeout: 260 seconds) |
08:08:00 | * | Vladar joined #nim |
08:08:33 | * | djellemah_ quit (Ping timeout: 248 seconds) |
08:18:05 | * | yglukhov joined #nim |
08:18:29 | * | yglukhov quit (Remote host closed the connection) |
08:19:06 | * | yglukhov joined #nim |
08:20:58 | * | couven92 quit (Quit: Reboot required...) |
08:22:03 | * | xet7 joined #nim |
08:23:04 | * | yglukhov quit (Ping timeout: 240 seconds) |
08:24:54 | * | couven92 joined #nim |
08:26:33 | * | yglukhov joined #nim |
08:30:42 | * | bjz joined #nim |
08:31:11 | * | bjz_ quit (Ping timeout: 260 seconds) |
08:31:53 | * | yglukhov quit (Remote host closed the connection) |
08:32:28 | * | yglukhov joined #nim |
08:33:27 | * | yay quit (Quit: ZZZzzz…) |
08:36:29 | * | yglukhov quit (Ping timeout: 240 seconds) |
08:39:40 | FromGitter | <barcharcraz> no but I'd like to hear how it goes |
08:39:58 | FromGitter | <barcharcraz> I'm perhaps doing some nim embedded stuff (if you consider the Tegra TX1 embedded....) |
08:40:25 | FromGitter | <barcharcraz> also rn I'm mostally trying to get it running a kernel that was released sometime in the last 3 years |
08:42:29 | * | chemist69 quit (Ping timeout: 240 seconds) |
08:42:51 | * | chemist69 joined #nim |
08:49:54 | ibk | how to get subarray of an array? i tried `myArray[1:]` |
08:49:54 | FromGitter | <gokr> @barcharcraz Also, NuttX looks neat too :) So much stuff, so little time. |
08:50:50 | * | yglukhov joined #nim |
08:54:13 | ibk | `myArray[1:]` -> oh, sorry, i mixed Nim with something else :D |
08:55:19 | * | PMunch quit (Ping timeout: 256 seconds) |
08:55:49 | Vladar | ibk, arr[a..^b] |
09:02:37 | * | yglukhov quit (Remote host closed the connection) |
09:03:12 | * | yglukhov joined #nim |
09:04:26 | FromGitter | <Varriount> Hrm. What's the usual way of making a blog these days? |
09:05:36 | FromGitter | <Varriount> @Araq I have an idea for a project at work that I might be able to use Nim for. :D |
09:06:32 | FromGitter | <barcharcraz> welp I don't need an rtos |
09:07:01 | * | yglukhov quit (Remote host closed the connection) |
09:07:17 | * | yglukhov joined #nim |
09:08:04 | * | PMunch joined #nim |
09:16:28 | FromGitter | <Varriount> @barcharcraz What do you need? |
09:23:02 | Araq | varriount I use Nim's docgen for my blog, fwiw |
09:23:45 | Araq | but I'm picky about having Nim syntax highlighting that works... |
09:35:41 | FromGitter | <Varriount> Does the Nim website have a publicly linked blog? |
09:37:04 | FromGitter | <Varriount> The one thing I do have time for is writing, and I think it might help Nim if we have a more active source of news and tips |
09:37:33 | * | tankfeeder joined #nim |
09:41:45 | Araq | varriount: semi public, here: https://nim-lang.org/blog/ |
09:41:55 | Araq | I accept guest posts :-) |
09:45:16 | FromGitter | <dom96> @Varriount write some. I want to start posting guest posts to nim-lang.org. |
09:45:31 | FromGitter | <dom96> (the main page, not @Araq's blog) |
09:46:56 | Varriount|Phone | dom96: Yay! |
09:47:46 | Araq | dom96: btw your PR has conflicts with devel |
09:50:14 | FromGitter | <dom96> @Araq it shouldn't be hard for you to fix :P |
09:50:25 | FromGitter | <dom96> Github even allows you to do it via its interface now |
09:53:08 | * | Andris_zbx joined #nim |
09:55:10 | Araq | wenn zwei das gleiche tun ist es noch lange nicht dasselbe |
09:56:49 | * | Matthias247 joined #nim |
09:57:50 | * | tankfeeder quit (Quit: Leaving) |
10:00:00 | * | yglukhov quit (Remote host closed the connection) |
10:00:35 | * | yglukhov joined #nim |
10:01:49 | * | yglukhov quit (Remote host closed the connection) |
10:02:02 | * | yglukhov joined #nim |
10:23:16 | Varriount|Phone | Araq: when two do the same... It's still not quite the same? |
10:24:00 | Varriount|Phone | I had to look up some of the verbs, and I think that's it. |
10:24:59 | Araq | yeah, a good translation, thanks |
10:30:59 | * | PMunch quit (Quit: leaving) |
10:33:51 | * | yglukhov quit (Remote host closed the connection) |
10:34:25 | * | yglukhov joined #nim |
10:35:41 | * | yglukhov quit (Read error: Connection reset by peer) |
10:35:53 | * | yglukhov joined #nim |
10:36:14 | * | yglukhov quit (Remote host closed the connection) |
10:36:20 | * | devted joined #nim |
10:45:06 | * | Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif) |
10:51:58 | * | couven92 quit (Quit: Client disconnecting) |
11:10:44 | * | yglukhov joined #nim |
11:15:35 | * | arnetheduck joined #nim |
11:18:44 | * | xet7_ joined #nim |
11:18:47 | * | xet7_ quit (Remote host closed the connection) |
11:18:53 | * | xet7 quit (Quit: Leaving) |
11:19:23 | * | xet7 joined #nim |
11:36:11 | * | elrood joined #nim |
11:37:46 | * | kier quit (Remote host closed the connection) |
11:55:27 | * | PMunch joined #nim |
11:59:19 | * | rokups joined #nim |
12:02:16 | * | tankfeeder joined #nim |
12:02:58 | * | Snircle joined #nim |
12:03:24 | * | devted quit (Quit: Sleeping.) |
12:03:48 | * | vlad1777d joined #nim |
12:04:28 | * | devted joined #nim |
12:09:03 | * | devted quit (Ping timeout: 252 seconds) |
12:10:29 | * | Arrrr joined #nim |
12:10:46 | * | Arrrr quit (Changing host) |
12:10:46 | * | Arrrr joined #nim |
12:16:04 | FromGitter | <konqoro> hey is '\L' same with "\n" on all platforms? |
12:30:46 | FromGitter | <Varriount> @konqoro Yes. |
12:31:16 | Araq | @konqoro No. |
12:31:50 | FromGitter | <Varriount> @Araq What? I though that the '\n' escape always resolved to a line feed for Nim strings. |
12:32:04 | FromGitter | <Varriount> Since files are always opened in binary mode. |
12:33:56 | Araq | exactly, it's opened in binary mode and so \n on Windows is CR-LF and on Posix it's LF. |
12:36:11 | FromGitter | <endragor> I think it's text mode that changes line endings, isn't it? |
12:36:45 | FromGitter | <endragor> binary mode is "bytes should be as is, don't try to interpret them" |
12:37:00 | Araq | text mode is a "virtual environment" where LF is converted to CR-LF |
12:37:08 | Araq | in the IO step. |
12:37:18 | * | carterza joined #nim |
12:37:47 | FromGitter | <endragor> yeah, so does text mode have anything to do with Nim? :) |
12:38:20 | Araq | no. the stdlib has no concept of a "text mode IO" operation |
12:39:14 | FromGitter | <endragor> I mean in this quote it seems you meant something else from what was written: ⏎ ⏎ > exactly, it's opened in binary mode and so \n on Windows is CR-LF and on Posix it's LF. |
12:40:23 | * | ibk quit (Quit: Connection closed for inactivity) |
12:43:34 | Araq | oh yeah, let me say it differently: |
12:44:03 | Araq | Nim's \n is CR-LF on Windows and LF on Posix. |
12:44:45 | PMunch | And \L is LF across all platforms |
12:47:00 | * | chemist69 quit (Ping timeout: 252 seconds) |
12:49:44 | * | chemist69 joined #nim |
12:53:31 | FromGitter | <Varriount> Oh, yeah, I was wrong. |
12:54:09 | FromGitter | <Varriount> @endragor It's why you can't do `'\n'` in Nim. `\n` might not be a single character. |
12:56:31 | demi- | when implementing `nimsuggest` integration with an editor, what file should i be giving it as the `project.nim`? i'm a little bit confused about how this works since when i issue the `sug` command, i need to give it the current file i'm working out of anyway. |
13:00:22 | FromGitter | <endragor> oh crap. I actually had no idea about that '\n' pitfall all this time. I was not the one who asked the original question though. intuitively I'd prefer \L to do what \n does in Nim |
13:01:05 | FromGitter | <konqoro> thanks for your answers! |
13:07:06 | * | yglukhov quit (Remote host closed the connection) |
13:07:40 | * | yglukhov joined #nim |
13:09:45 | * | bjz_ joined #nim |
13:11:12 | * | bjz quit (Ping timeout: 252 seconds) |
13:12:14 | * | yglukhov quit (Ping timeout: 255 seconds) |
13:28:31 | Araq | demi-: the project file is the one you pass to the compiler to compile your project |
13:31:18 | demi- | presumably so it can map the entire project through import linkage? |
13:32:17 | Araq | it's how every IDE works. you cannot intellisense around in unknown files that the compiler knows no context about |
13:35:49 | demi- | right, however most IDEs have a dedicated project file, not another source file |
13:39:35 | Araq | the project is the file with a corresponding .nim.cfg or .nimble file |
13:47:59 | * | bjz joined #nim |
13:49:25 | * | bjz_ quit (Ping timeout: 256 seconds) |
13:50:40 | * | djellemah__ is now known as djellemah |
13:51:05 | demi- | ok thanks, and if none exist, and there is only the one nim file then could it be assumed that it is the project or would that not be acceptable? |
13:53:01 | * | nsf quit (Quit: WeeChat 1.7) |
13:54:08 | * | yay joined #nim |
13:58:55 | Araq | otherwise your the current nim file as project file |
13:58:58 | Araq | *use |
14:05:50 | * | tankfeeder quit (Quit: Leaving) |
14:09:06 | * | yglukhov joined #nim |
14:10:02 | * | sz0 joined #nim |
14:10:54 | * | yglukhov quit (Remote host closed the connection) |
14:11:10 | * | yglukhov joined #nim |
14:11:18 | demi- | gotcha, thanks |
14:11:53 | * | yglukhov quit (Remote host closed the connection) |
14:12:35 | * | yglukhov joined #nim |
14:17:55 | * | yglukhov quit (Remote host closed the connection) |
14:18:27 | * | yglukhov joined #nim |
14:22:33 | * | yglukhov quit (Ping timeout: 240 seconds) |
14:25:33 | * | byte512 quit (Quit: WeeChat 1.6) |
14:28:03 | * | byte512 joined #nim |
14:37:04 | * | ofelas quit (Quit: shutdown -h now) |
14:39:34 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
14:55:45 | * | yglukhov joined #nim |
15:11:52 | * | shashlick joined #nim |
15:16:37 | * | krux02 joined #nim |
15:17:05 | krux02 | what does mixin do? |
15:18:17 | * | kier joined #nim |
15:18:25 | * | ofelas joined #nim |
15:19:36 | krux02 | feels like it is an old feature of nim that is not necessary anymore |
15:20:25 | Araq | no, it's very important for Nim's generics |
15:21:01 | Araq | you can declare 'mixin mygenericOp' and then use mygenericOp in the generic even though it's not yet declared |
15:21:37 | Araq | and it will produce an "open" symbol which means overloading resolution works for it after generic instantiation |
15:27:49 | krux02 | but isn't it normal that overload resolution works after generic instanciation? |
15:28:37 | * | devted joined #nim |
15:28:48 | krux02 | when I declare a generic mygeneric[T](t:T), and I call foo(t) in it, foo is resolved after generic instanciation |
15:32:41 | Araq | no, if there is no 'foo' in scope, it will produce an error |
15:33:25 | Araq | if only 1 foo is in scope, it's a "closed" symbol and cannot be overloaded either |
15:33:41 | Araq | if foo is overloaded it defaults to the 'mixin' binding rule |
15:35:48 | Araq | these rules are subtle but in general capture very well what the programmers intuitively think should happen |
15:36:30 | * | carterza quit (Quit: carterza) |
15:38:13 | Araq | though maybe instead of "overloaded vs not overloaded" we could have picked "private vs public" |
16:03:53 | * | nsf joined #nim |
16:15:00 | * | aharlan joined #nim |
16:17:25 | * | gokr quit (Ping timeout: 245 seconds) |
16:21:34 | * | yglukhov quit (Remote host closed the connection) |
16:22:08 | * | yglukhov joined #nim |
16:23:53 | * | pregressive joined #nim |
16:24:02 | krux02 | http://ix.io/1SKa |
16:24:15 | krux02 | http://ix.io/1SKa |
16:25:10 | krux02 | http://ix.io/1SKb |
16:25:15 | * | Varriount|Phone quit (Ping timeout: 256 seconds) |
16:25:28 | krux02 | Araq: I did what you suggested to do, but I do not have the problem you mentioned |
16:26:17 | krux02 | I think that is the case you described as that I would need mixin, but apparently I don't |
16:26:36 | * | yglukhov quit (Ping timeout: 260 seconds) |
16:26:38 | Araq | you don't show me the full code |
16:26:45 | Araq | "import scratch" is missing |
16:27:01 | krux02 | scratch is the other link |
16:27:06 | krux02 | http://ix.io/1SKb |
16:28:49 | FromGitter | <andreaferretti> @krux02 the problem arises when you write a simple `proc` that does not need specialization |
16:29:10 | krux02 | can you give an example? |
16:29:20 | FromGitter | <andreaferretti> in this case, the compiler can directly check that everything compiles |
16:29:28 | FromGitter | <andreaferretti> with mixin you are saying |
16:29:34 | FromGitter | <andreaferretti> wait, I will define this later |
16:29:53 | FromGitter | <andreaferretti> behave as in the generic case (to be specialized later) |
16:30:11 | krux02 | I need an example that would not work without mixin |
16:32:11 | Araq | well you had to introduce 2 dummy foos for this to work, with 'mixin' it's shorter |
16:32:27 | krux02 | no not really |
16:32:31 | krux02 | you can remove them |
16:33:20 | krux02 | I just used the dummy foo to get to the use case you described as the close symbol lookup |
16:33:24 | FromGitter | <andreaferretti> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5899f6d31465c46a5633bd37] |
16:33:34 | FromGitter | <andreaferretti> try removing mixin |
16:33:56 | * | Varriount|Phone joined #nim |
16:34:40 | FromGitter | <andreaferretti> of course in general `foo` may be already written and you will be able to extend its behaviour by defining `bar` for your type |
16:35:02 | Araq | temp8.nim(3, 6) Error: undeclared identifier: 'foo' |
16:35:06 | Araq | for me. |
16:35:41 | FromGitter | <andreaferretti> uh? works for me |
16:35:48 | FromGitter | <andreaferretti> but not when I comment out mixin |
16:36:29 | Araq | for me it works exactly as I wrote it would work... |
16:36:58 | FromGitter | <andreaferretti> @Araq are you talking about the example I just posted? |
16:37:18 | Araq | I don't understand the question, no I am talking about krux02's example |
16:37:20 | FromGitter | <andreaferretti> I am not sure if it gets messed up in the bridge between gitter and irc |
16:37:23 | FromGitter | <andreaferretti> ah ok |
16:37:30 | * | aharlan quit (Quit: I'm out.) |
16:38:11 | FromGitter | <andreaferretti> I think the bridgebot is messing up the code sections from gitter |
16:39:00 | Araq | https://github.com/nim-lang/Nim/issues/5349 somebody should work on this |
16:39:05 | Araq | it's embarrassing. |
16:39:18 | Araq | and I decided it should block the release of 0.16.2. |
16:42:16 | FromGitter | <krux02> actually code section are not posted at all on irc |
16:42:23 | * | arnetheduck quit (Remote host closed the connection) |
16:45:32 | * | Salewski joined #nim |
16:46:05 | Salewski | Araq, for latest nim libui you have |
16:46:12 | Salewski | template newFinal(result) = #proc finalize(x: type(result)) {.nimcall.} = # controlDestroy(x.impl) new(result) #, finalize) |
16:46:27 | Salewski | Why commented all that finalizer stuff? |
16:46:31 | krux02 | andreaferetti: thanks for the example |
16:46:32 | FromGitter | <andreaferretti> ok, this is why what I was trying to say did not make much sense from Araq point of view :-) |
16:46:42 | * | zahary joined #nim |
16:56:26 | krux02 | andreaferetti: I use ix for my code pastings for a while now, and it just works and nobody complains |
16:57:14 | krux02 | nice thing is that it has an editor plugin, so that I can copy code from my editor to ix, and just paste the link |
17:02:46 | * | Andris_zbx quit (Remote host closed the connection) |
17:02:47 | FromGitter | <andreaferretti> no plugin for atom :-( |
17:03:11 | FromGitter | <andreaferretti> anyway, code support in gitter is so convenient |
17:03:32 | krux02 | yes it is |
17:03:58 | dom96 | I'm surprised there is no IRC client that seamlessly integrates a pastebin into the chat window. |
17:04:13 | euantor | irccloud does :) |
17:04:42 | krux02 | when I paste 3 lines in irc, people instantly start with: "WHOAAAaahhh!! You know you can use paste bins, do ya?" |
17:04:46 | euantor | Shows previews of github gists too, and images from imgur |
17:05:28 | krux02 | does it also show ix.io pastes? |
17:06:14 | euantor | No idea, not sure if I've seen one |
17:06:32 | euantor | http://ix.io/fpW |
17:06:39 | euantor | That would be a no |
17:07:44 | krux02 | I just used them, that's why |
17:08:25 | * | gokr joined #nim |
17:12:30 | dom96 | ugh, `echo(("asd", @[""]))` echos: (Field0: asd, Field1: @[]) |
17:13:41 | * | carterza joined #nim |
17:14:23 | krux02 | but that's correct isn't it? |
17:14:31 | krux02 | it is in fact a tuple |
17:14:41 | dom96 | yes, look at the sequence |
17:14:47 | dom96 | @[] vs @[""] |
17:15:39 | krux02 | that is the problem with printing string sequences |
17:15:48 | krux02 | they don't put " in the output |
17:15:58 | krux02 | maybe they should |
17:16:02 | * | filcuc quit (Quit: KVIrc 4.9.2 Aria http://www.kvirc.net/) |
17:16:07 | dom96 | indeed |
17:16:42 | krux02 | there is still repr |
17:17:21 | krux02 | but I never really unsderstood what the intended difference between repr and the default `$` was, and as far as I know, repr should not be used anymore |
17:17:46 | dom96 | why should 'repr' not be used anymore? |
17:18:02 | dom96 | in this case I would be lost without it |
17:18:17 | dom96 | and I did spend time wondering whether the `==` is broken for tuples |
17:18:50 | Salewski | dom, araq recently said repr is a zombi. I was surprised indeed. |
17:19:43 | krux02 | yea probably it isn't but @[] and @[""] is visually indestinctable when printed |
17:20:29 | subsetpark | What should we use instead of repr? What if we want to get the fields off an object? |
17:20:48 | dom96 | This does ring a bell, and it shows just how much power Araq's words have. |
17:20:56 | dom96 | If it truly is a zombie though it should be deprecated |
17:26:06 | krux02 | macros.repr has as far as I know no alternative |
17:28:47 | dom96 | toStrLit |
17:29:43 | dom96 | well, $toStrLit(node) |
17:32:17 | * | brson joined #nim |
17:34:33 | dom96 | Araq: Conflicts for https://github.com/nim-lang/Nim/pull/5319/ have been resolved. |
17:44:30 | * | PMunch quit (Quit: leaving) |
17:55:28 | * | yglukhov joined #nim |
17:58:25 | * | yglukhov quit (Remote host closed the connection) |
17:58:58 | * | yglukhov joined #nim |
17:59:24 | * | gokr quit (Ping timeout: 252 seconds) |
17:59:49 | * | sz0 quit (Quit: Connection closed for inactivity) |
18:00:17 | Araq | well 'repr' STILL cannot output enums reliably, after 10 bugfixes or so |
18:01:10 | Araq | it also uses RTTI, not the newer macros.getType API and since it's in system it has all sort of nonsense limitations coming from the fact that we're restricted in system.nim |
18:01:36 | Araq | and as krux02 has shown macros.repr is completely different |
18:02:08 | Araq | it's a mess, move it to its own module, rename macros.repr to something sane and we're good. |
18:03:17 | * | yglukhov quit (Ping timeout: 256 seconds) |
18:04:04 | Araq | the difference between $ and repr is also exactly what krux02 said, repr quotes, $ does not and must not, otherwise generic code breaks that uses $ |
18:06:13 | * | jjido joined #nim |
18:10:19 | Salewski | Araq, in Nim libui controlDestroy(x.impl) is commented out, so no memory for internal widgets is freed until program terminates? |
18:10:38 | Salewski | Is that due to a libui problem, or due to Nil GC problem? |
18:10:50 | Araq | libui takes ownership of widgets, so it would be wrong to free it in the finalizers |
18:11:21 | Araq | at least as far I as understand it, this thing is really messy in its resource handling |
18:11:33 | Varriount|Phone | Araq: Is there an issue yet for getting the "true" runtime type of a reference/variable, rather than the compile-time type? |
18:11:50 | Varriount|Phone | I mean, has an issue been posted? |
18:11:55 | Araq | no. |
18:12:20 | * | Trustable joined #nim |
18:12:24 | Araq | Salewski: so yes, it's libui specific and the general idea is good. |
18:12:38 | Salewski | OK, when it is not a Nim problem, then I will play with a higher level GTK Nim GUI! |
18:12:47 | Araq | cool :-) |
18:12:57 | Salewski | Bye... |
18:13:17 | * | Salewski left #nim (#nim) |
18:15:07 | dom96 | Araq: Discouraging repr's use until an alternative shows up is not the way to go |
18:16:12 | dom96 | $'s behaviour is too confusing IMO |
18:16:32 | dom96 | If quotes shouldn't appear then neither should @[] |
18:19:41 | Varriount|Phone | Why do tuples have $ defined? |
18:20:37 | Araq | I disagree, I think @[] is perfectly fine, what else should it produce? |
18:20:59 | Araq | Varriount|Phone: because why not? |
18:21:19 | dom96 | It's too subtle |
18:21:22 | jjido | Where is the doc for $? |
18:21:33 | Araq | it's true however, that for containers repr and $ have no real difference |
18:21:34 | jjido | $' |
18:22:10 | dom96 | "otherwise generic code breaks that uses $" what does that mean? |
18:22:13 | Araq | https://nim-lang.org/docs/system.html#%24,int |
18:22:30 | Varriount|Phone | In python, `print` looks for a __str__ method first, then uses repr |
18:23:00 | Araq | dom96: $ is "turn into a string", it needs to be NOP for strings |
18:24:18 | Araq | for example I can write "<coord>" & $x & ", " & $y & "</coord>" and it works for strings/ints/float |
18:25:01 | dom96 | Following that logic $ for seq[T] should be an alias for join(seq, ",") |
18:25:19 | Araq | why? where does that "," come from? |
18:25:22 | dom96 | or rather: join(map(seq, `$`), ",") |
18:25:28 | dom96 | It's a list |
18:25:47 | jjido | Who cares whta is the string representation of a list |
18:25:51 | Araq | why not ";" or \t ? |
18:26:37 | dom96 | Why not "0xff" for ints? |
18:27:37 | dom96 | Currently `$` means different things for different types. For seq[T] it gives us essentially Nim code. |
18:27:42 | dom96 | Same for tuples |
18:27:53 | Araq | yes because it doesn't hurt. |
18:28:00 | dom96 | and same for floats and ints |
18:28:05 | Araq | quotes for strings do hurt. |
18:28:27 | dom96 | strings are the odd ones out |
18:29:26 | dom96 | Perhaps $ for seq[string] should quote the strings? |
18:29:57 | dom96 | In what situation would @["Hello", "world"] instead of @[Hello, World] hurt? |
18:29:58 | krux02 | nod only quoting, but also escape it |
18:30:31 | krux02 | just think of strings that contain " |
18:30:40 | Araq | well you cannot blame Nim for every single of your mistakes. |
18:30:50 | dom96 | I certainly don't |
18:31:42 | Araq | @["Hello", "world"] would be a weird inconsistency |
18:32:01 | jjido | Not weird |
18:32:09 | * | yglukhov joined #nim |
18:32:17 | Araq | and it means whenever we lift $ to compound types we need to special case $ for strings and instead use "that other $ for strings" |
18:32:36 | krux02 | it is definitively inconsisten when you think about it's type |
18:33:16 | krux02 | there are two different things you want from `$` |
18:33:50 | krux02 | sometimes it is a representation of that value in valid Nim code |
18:33:50 | federico3 | wouldn't a repr of @["Hello, world", ""] be misleading without the quotes? |
18:34:03 | krux02 | and the other one is just a string representation |
18:35:43 | krux02 | maybe repr, should be revived and fixet to be always valid Nim code of a value |
18:35:47 | dom96 | I think there are two solutions. Either we quote strings in `$`(seq[string]), or we get rid of `$`(tuple) and change what `$`(seq[string]) returns. |
18:37:30 | FromGitter | <Varriount> I'm with krux02 on rewriting/fixing/etc for repr |
18:38:13 | FromGitter | <Varriount> And/Or making the $ for a tuple call repr |
18:38:33 | FromGitter | <Varriount> That is what is done in python |
18:38:36 | krux02 | repr has problems though |
18:38:52 | krux02 | don't rely on the result of that thing in any way |
18:39:18 | krux02 | it returns very different results depending on if you run it on the vm or in binary |
18:40:53 | * | tankfeeder joined #nim |
18:41:45 | Araq | as I said, repr should move into its own module |
18:41:51 | Araq | and macros.repr should be renamed |
18:43:12 | Araq | I never meant to imply 'repr' is not useful. on the other hand, why not produce Json if string quotes etc are so important |
18:43:52 | FromGitter | <Varriount> Araq: The thing is, people are going to expect some sort of repr function to be in the global scope |
18:44:02 | * | yglukhov quit (Remote host closed the connection) |
18:44:37 | * | yglukhov joined #nim |
18:44:47 | FromGitter | <Varriount> Some sort of 'print out a representation of this value' rather than a 'turn this value into a string' |
18:45:42 | dom96 | indeed |
18:46:16 | FromGitter | <Varriount> What are the current big problems with repr? |
18:48:16 | krux02 | Araq: did some fancy stuff with the readChar thing: https://forum.nim-lang.org/t/2787/1#17360 might be too fancy though |
18:49:11 | * | yglukhov quit (Ping timeout: 256 seconds) |
18:50:46 | dom96 | Varriount: it crashes sometimes |
18:51:10 | FromGitter | <Varriount> dom96: I'm assuming from reading invalid pointers and such? |
18:53:12 | dom96 | yeah |
19:02:41 | Varriount|Phone | Well then, when encountering a ptr type, stop and just print the address |
19:03:04 | Varriount|Phone | Even if it's a cstring |
19:05:44 | dom96 | I bet it's not that simple |
19:05:56 | dom96 | But I don't know much about repr to be honest. |
19:07:14 | * | yglukhov joined #nim |
19:13:20 | * | sz0 joined #nim |
19:14:18 | * | nsf quit (Quit: WeeChat 1.7) |
19:14:29 | * | gokr joined #nim |
19:16:37 | krux02 | Varriount: you know that ref is also just a different version of a pointer type? |
19:17:01 | FromGitter | <Varriount> krux02: Hm, yes, I know. |
19:17:16 | * | tankfeeder quit (Quit: Leaving) |
19:18:22 | FromGitter | <Varriount> krux02: The problem we're facing is the same as outlined in https://blogs.msdn.microsoft.com/oldnewthing/20060927-07/?p=29563 |
19:19:30 | FromGitter | <Varriount> Of course, if we can use the GC internals to check if a reference is valid (without reading the memory it points to) then we're ok. |
19:22:07 | krux02 | how about a check for `nil` and that's it? |
19:22:37 | krux02 | the article just said it, don't check for invalid pointers, just crash |
19:22:47 | krux02 | a program shouldn't have invalid pointers |
19:22:55 | krux02 | and when it is, it is ok to crash |
19:29:52 | jivank[m] | dom96: is there an option for jester that logs source IP and timestamp for each request? |
19:30:42 | Arrrr | Was table.clear fixed? |
19:30:51 | * | elrood quit (Quit: Leaving) |
19:30:58 | Araq | Arrrr: afaik, yes |
19:31:32 | Arrrr | And does it allocate new memory? |
19:31:49 | jivank[m] | If not would you take a PR? |
19:32:00 | Araq | krux02: repr is for debugging and if it can detect invalid pointer and say so instead of crashing, that's worthwhile to do |
19:32:08 | Araq | Arrrr: I doubt it, why? |
19:33:06 | cheatfate | Varriount|Phone, on windows you can VirtualQuery address and check flags for readability, and read it |
19:33:13 | cheatfate | so you will not get any exceptions |
19:34:09 | dom96 | jivank[m]: There is no option for that. I would take a PR that makes this customisable, I'm happy with the default. |
19:35:10 | * | Arrrr1 joined #nim |
19:35:10 | * | Arrrr quit (Disconnected by services) |
19:35:53 | * | yay quit (Quit: ZZZzzz…) |
19:36:52 | * | Arrrr1 quit (Client Quit) |
19:40:35 | * | byte512 quit (Ping timeout: 264 seconds) |
19:43:45 | * | yay joined #nim |
19:44:41 | jivank[m] | For example I had someone using nmap on my jester port, but couldn't see the time or IP. Should this option be defined under the Settings object? |
19:46:57 | Araq | krux02: I saw your post but it doesn't solve things properly :P |
19:50:15 | * | bjz joined #nim |
19:51:39 | dom96 | jivank[m]: sure |
20:04:59 | * | shashlick quit (Quit: Connection closed for inactivity) |
20:06:33 | * | gokr quit (Ping timeout: 240 seconds) |
20:09:26 | * | gangstacat quit (Quit: Ĝis) |
20:37:28 | * | yglukhov quit (Remote host closed the connection) |
20:38:02 | * | yglukhov joined #nim |
20:39:45 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
20:42:01 | * | gokr joined #nim |
20:42:06 | * | yglukhov quit (Ping timeout: 240 seconds) |
20:45:06 | * | Varriount|Phone quit (Ping timeout: 240 seconds) |
20:45:55 | * | bjz joined #nim |
20:46:44 | * | bjz quit (Client Quit) |
20:54:24 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
21:01:02 | * | Snircle joined #nim |
21:04:50 | * | Sentreen quit (Quit: WeeChat 1.4) |
21:08:28 | * | zahary quit (Remote host closed the connection) |
21:09:21 | * | Sentreen joined #nim |
21:19:14 | * | vlad_____ joined #nim |
21:22:08 | * | rokups quit (Quit: Connection closed for inactivity) |
21:25:27 | * | bjz joined #nim |
21:31:04 | * | d10n joined #nim |
21:31:04 | * | d10n quit (Changing host) |
21:31:04 | * | d10n joined #nim |
21:34:15 | * | Sentreen quit (Read error: Connection reset by peer) |
21:34:49 | * | Sentreen joined #nim |
21:36:36 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
21:37:32 | * | Sentreen quit (Read error: Connection reset by peer) |
21:38:19 | * | vlad_____ quit (Quit: leaving) |
21:47:31 | * | Sentreen joined #nim |
21:49:05 | * | carterza quit (Ping timeout: 258 seconds) |
21:49:48 | * | nsf joined #nim |
21:49:49 | * | sz0 quit (Quit: Connection closed for inactivity) |
21:52:40 | * | smt joined #nim |
22:01:31 | * | couven92 joined #nim |
22:02:51 | krux02 | Araq: I know it introduces a lot of macro magic into a module that is supposed to be simple |
22:04:19 | krux02 | but to be honest, I like the idea to wrap the char in a result type that can either be a char, or an eof |
22:09:00 | Araq | EOF should raise an exception anyway |
22:09:11 | Araq | it's like Index out of bounds |
22:09:48 | Araq | the C method of "the 2nd attempt to read beyong the end might be considered an error" or such nonsense is not to be copied |
22:10:00 | Araq | *beyond |
22:11:01 | Araq | and 'readChar' is totally stupid, no lookahead, but you can push back a single char with ungetc(), who uses that bullshit? |
22:11:12 | Araq | ever tried to parse anything with that thing? |
22:11:17 | Araq | it's impossible. |
22:15:11 | * | pregressive quit (Remote host closed the connection) |
22:15:44 | * | pregressive joined #nim |
22:20:30 | * | pregressive quit (Ping timeout: 276 seconds) |
22:21:53 | * | jjido quit (Ping timeout: 248 seconds) |
22:24:57 | dom96 | "Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries" D: |
22:25:39 | demi- | this has been a thing for ages |
22:25:51 | demi- | because openssl is extremely bad |
22:25:56 | FromGitter | <Varriount> And they're probably better for it. |
22:26:17 | * | couven92 quit (Quit: Client disconnecting) |
22:26:53 | cheatfate | i dont think openssl is extremely bad |
22:27:04 | enthus1ast | the windows installer is timeouting on the docs/dlls/etc |
22:27:05 | cheatfate | and i dont think they make much better library |
22:27:54 | Araq | enthus1ast |
22:28:09 | Araq | we're working on a new release day and night because of this |
22:28:25 | dom96 | ugh, SSL is such a pain |
22:29:08 | Xe | SSL is not the pain, things not supporting it is |
22:31:12 | * | Matthias247 quit (Read error: Connection reset by peer) |
22:31:16 | enthus1ast | ok, just got that demonstration effect : ) |
22:33:20 | Araq | upcoming version uses this: https://nim-lang.org/download/mingw32-6.3.0.7z |
22:33:53 | Araq | or this: https://nim-lang.org/download/mingw64-6.3.0.7z |
22:34:06 | Araq | so ... if you need a decent mingw, here you go |
22:34:28 | enthus1ast | thanks alot |
22:39:40 | * | Vladar quit (Quit: Leaving) |
22:43:48 | * | aedigix quit (Remote host closed the connection) |
22:44:14 | * | aedigix joined #nim |
22:48:21 | * | vlad1777d quit (Remote host closed the connection) |
22:50:47 | * | Trustable quit (Remote host closed the connection) |
22:58:51 | dom96 | gah, I guess we may as well wrap Apple's new secure transport API. |
23:05:28 | * | nsf quit (Quit: WeeChat 1.7) |
23:08:57 | * | carterza joined #nim |
23:15:11 | * | carterza quit (Read error: Connection reset by peer) |
23:15:31 | * | carterza joined #nim |
23:15:33 | * | Demos joined #nim |
23:18:40 | * | jh32 quit (Ping timeout: 245 seconds) |
23:31:10 | * | chemist69 quit (Ping timeout: 245 seconds) |
23:33:40 | * | arnetheduck joined #nim |
23:33:43 | * | chemist69 joined #nim |
23:34:22 | * | ftsf_ joined #nim |
23:49:47 | * | greenlight_ joined #nim |
23:52:26 | * | Jesin joined #nim |
23:57:32 | * | devted quit (Quit: Sleeping.) |
23:59:20 | * | mounty joined #nim |