<< 07-02-2017 >>

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:19yayI'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:46FromGitter<barcharcraz> is there a way to take an ident in a macro and bind it like a mixin?
06:36:13FromGitter<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:26Araqbarcharcraz: use macros.bindSym
07:11:55Araqyay: 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:02gokrAnyone 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:40FromGitter<barcharcraz> no but I'd like to hear how it goes
08:39:58FromGitter<barcharcraz> I'm perhaps doing some nim embedded stuff (if you consider the Tegra TX1 embedded....)
08:40:25FromGitter<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:54ibkhow to get subarray of an array? i tried `myArray[1:]`
08:49:54FromGitter<gokr> @barcharcraz Also, NuttX looks neat too :) So much stuff, so little time.
08:50:50*yglukhov joined #nim
08:54:13ibk`myArray[1:]` -> oh, sorry, i mixed Nim with something else :D
08:55:19*PMunch quit (Ping timeout: 256 seconds)
08:55:49Vladaribk, arr[a..^b]
09:02:37*yglukhov quit (Remote host closed the connection)
09:03:12*yglukhov joined #nim
09:04:26FromGitter<Varriount> Hrm. What's the usual way of making a blog these days?
09:05:36FromGitter<Varriount> @Araq I have an idea for a project at work that I might be able to use Nim for. :D
09:06:32FromGitter<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:28FromGitter<Varriount> @barcharcraz What do you need?
09:23:02Araqvarriount I use Nim's docgen for my blog, fwiw
09:23:45Araqbut I'm picky about having Nim syntax highlighting that works...
09:35:41FromGitter<Varriount> Does the Nim website have a publicly linked blog?
09:37:04FromGitter<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:45Araqvarriount: semi public, here: https://nim-lang.org/blog/
09:41:55AraqI accept guest posts :-)
09:45:16FromGitter<dom96> @Varriount write some. I want to start posting guest posts to nim-lang.org.
09:45:31FromGitter<dom96> (the main page, not @Araq's blog)
09:46:56Varriount|Phonedom96: Yay!
09:47:46Araqdom96: btw your PR has conflicts with devel
09:50:14FromGitter<dom96> @Araq it shouldn't be hard for you to fix :P
09:50:25FromGitter<dom96> Github even allows you to do it via its interface now
09:53:08*Andris_zbx joined #nim
09:55:10Araqwenn 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:16Varriount|PhoneAraq: when two do the same... It's still not quite the same?
10:24:00Varriount|PhoneI had to look up some of the verbs, and I think that's it.
10:24:59Araqyeah, 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:04FromGitter<konqoro> hey is '\L' same with "\n" on all platforms?
12:30:46FromGitter<Varriount> @konqoro Yes.
12:31:16Araq@konqoro No.
12:31:50FromGitter<Varriount> @Araq What? I though that the '\n' escape always resolved to a line feed for Nim strings.
12:32:04FromGitter<Varriount> Since files are always opened in binary mode.
12:33:56Araqexactly, it's opened in binary mode and so \n on Windows is CR-LF and on Posix it's LF.
12:36:11FromGitter<endragor> I think it's text mode that changes line endings, isn't it?
12:36:45FromGitter<endragor> binary mode is "bytes should be as is, don't try to interpret them"
12:37:00Araqtext mode is a "virtual environment" where LF is converted to CR-LF
12:37:08Araqin the IO step.
12:37:18*carterza joined #nim
12:37:47FromGitter<endragor> yeah, so does text mode have anything to do with Nim? :)
12:38:20Araqno. the stdlib has no concept of a "text mode IO" operation
12:39:14FromGitter<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:34Araqoh yeah, let me say it differently:
12:44:03AraqNim's \n is CR-LF on Windows and LF on Posix.
12:44:45PMunchAnd \L is LF across all platforms
12:47:00*chemist69 quit (Ping timeout: 252 seconds)
12:49:44*chemist69 joined #nim
12:53:31FromGitter<Varriount> Oh, yeah, I was wrong.
12:54:09FromGitter<Varriount> @endragor It's why you can't do `'\n'` in Nim. `\n` might not be a single character.
12:56:31demi-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:22FromGitter<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:05FromGitter<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:31Araqdemi-: the project file is the one you pass to the compiler to compile your project
13:31:18demi-presumably so it can map the entire project through import linkage?
13:32:17Araqit's how every IDE works. you cannot intellisense around in unknown files that the compiler knows no context about
13:35:49demi-right, however most IDEs have a dedicated project file, not another source file
13:39:35Araqthe 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:05demi-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:55Araqotherwise your the current nim file as project file
13:58:58Araq*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:18demi-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:05krux02what does mixin do?
15:18:17*kier joined #nim
15:18:25*ofelas joined #nim
15:19:36krux02feels like it is an old feature of nim that is not necessary anymore
15:20:25Araqno, it's very important for Nim's generics
15:21:01Araqyou can declare 'mixin mygenericOp' and then use mygenericOp in the generic even though it's not yet declared
15:21:37Araqand it will produce an "open" symbol which means overloading resolution works for it after generic instantiation
15:27:49krux02but isn't it normal that overload resolution works after generic instanciation?
15:28:37*devted joined #nim
15:28:48krux02when I declare a generic mygeneric[T](t:T), and I call foo(t) in it, foo is resolved after generic instanciation
15:32:41Araqno, if there is no 'foo' in scope, it will produce an error
15:33:25Araqif only 1 foo is in scope, it's a "closed" symbol and cannot be overloaded either
15:33:41Araqif foo is overloaded it defaults to the 'mixin' binding rule
15:35:48Araqthese 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:13Araqthough 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:02krux02http://ix.io/1SKa
16:24:15krux02http://ix.io/1SKa
16:25:10krux02http://ix.io/1SKb
16:25:15*Varriount|Phone quit (Ping timeout: 256 seconds)
16:25:28krux02Araq: I did what you suggested to do, but I do not have the problem you mentioned
16:26:17krux02I 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:38Araqyou don't show me the full code
16:26:45Araq"import scratch" is missing
16:27:01krux02scratch is the other link
16:27:06krux02http://ix.io/1SKb
16:28:49FromGitter<andreaferretti> @krux02 the problem arises when you write a simple `proc` that does not need specialization
16:29:10krux02can you give an example?
16:29:20FromGitter<andreaferretti> in this case, the compiler can directly check that everything compiles
16:29:28FromGitter<andreaferretti> with mixin you are saying
16:29:34FromGitter<andreaferretti> wait, I will define this later
16:29:53FromGitter<andreaferretti> behave as in the generic case (to be specialized later)
16:30:11krux02I need an example that would not work without mixin
16:32:11Araqwell you had to introduce 2 dummy foos for this to work, with 'mixin' it's shorter
16:32:27krux02no not really
16:32:31krux02you can remove them
16:33:20krux02I just used the dummy foo to get to the use case you described as the close symbol lookup
16:33:24FromGitter<andreaferretti> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5899f6d31465c46a5633bd37]
16:33:34FromGitter<andreaferretti> try removing mixin
16:33:56*Varriount|Phone joined #nim
16:34:40FromGitter<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:02Araqtemp8.nim(3, 6) Error: undeclared identifier: 'foo'
16:35:06Araqfor me.
16:35:41FromGitter<andreaferretti> uh? works for me
16:35:48FromGitter<andreaferretti> but not when I comment out mixin
16:36:29Araqfor me it works exactly as I wrote it would work...
16:36:58FromGitter<andreaferretti> @Araq are you talking about the example I just posted?
16:37:18AraqI don't understand the question, no I am talking about krux02's example
16:37:20FromGitter<andreaferretti> I am not sure if it gets messed up in the bridge between gitter and irc
16:37:23FromGitter<andreaferretti> ah ok
16:37:30*aharlan quit (Quit: I'm out.)
16:38:11FromGitter<andreaferretti> I think the bridgebot is messing up the code sections from gitter
16:39:00Araqhttps://github.com/nim-lang/Nim/issues/5349 somebody should work on this
16:39:05Araqit's embarrassing.
16:39:18Araqand I decided it should block the release of 0.16.2.
16:42:16FromGitter<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:05SalewskiAraq, for latest nim libui you have
16:46:12Salewskitemplate newFinal(result) = #proc finalize(x: type(result)) {.nimcall.} = # controlDestroy(x.impl) new(result) #, finalize)
16:46:27SalewskiWhy commented all that finalizer stuff?
16:46:31krux02andreaferetti: thanks for the example
16:46:32FromGitter<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:26krux02andreaferetti: I use ix for my code pastings for a while now, and it just works and nobody complains
16:57:14krux02nice 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:47FromGitter<andreaferretti> no plugin for atom :-(
17:03:11FromGitter<andreaferretti> anyway, code support in gitter is so convenient
17:03:32krux02yes it is
17:03:58dom96I'm surprised there is no IRC client that seamlessly integrates a pastebin into the chat window.
17:04:13euantorirccloud does :)
17:04:42krux02when I paste 3 lines in irc, people instantly start with: "WHOAAAaahhh!! You know you can use paste bins, do ya?"
17:04:46euantorShows previews of github gists too, and images from imgur
17:05:28krux02does it also show ix.io pastes?
17:06:14euantorNo idea, not sure if I've seen one
17:06:32euantorhttp://ix.io/fpW
17:06:39euantorThat would be a no
17:07:44krux02I just used them, that's why
17:08:25*gokr joined #nim
17:12:30dom96ugh, `echo(("asd", @[""]))` echos: (Field0: asd, Field1: @[])
17:13:41*carterza joined #nim
17:14:23krux02but that's correct isn't it?
17:14:31krux02it is in fact a tuple
17:14:41dom96yes, look at the sequence
17:14:47dom96@[] vs @[""]
17:15:39krux02that is the problem with printing string sequences
17:15:48krux02they don't put " in the output
17:15:58krux02maybe they should
17:16:02*filcuc quit (Quit: KVIrc 4.9.2 Aria http://www.kvirc.net/)
17:16:07dom96indeed
17:16:42krux02there is still repr
17:17:21krux02but 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:46dom96why should 'repr' not be used anymore?
17:18:02dom96in this case I would be lost without it
17:18:17dom96and I did spend time wondering whether the `==` is broken for tuples
17:18:50Salewskidom, araq recently said repr is a zombi. I was surprised indeed.
17:19:43krux02yea probably it isn't but @[] and @[""] is visually indestinctable when printed
17:20:29subsetparkWhat should we use instead of repr? What if we want to get the fields off an object?
17:20:48dom96This does ring a bell, and it shows just how much power Araq's words have.
17:20:56dom96If it truly is a zombie though it should be deprecated
17:26:06krux02macros.repr has as far as I know no alternative
17:28:47dom96toStrLit
17:29:43dom96well, $toStrLit(node)
17:32:17*brson joined #nim
17:34:33dom96Araq: 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:17Araqwell 'repr' STILL cannot output enums reliably, after 10 bugfixes or so
18:01:10Araqit 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:36Araqand as krux02 has shown macros.repr is completely different
18:02:08Araqit'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:04Araqthe 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:19SalewskiAraq, in Nim libui controlDestroy(x.impl) is commented out, so no memory for internal widgets is freed until program terminates?
18:10:38SalewskiIs that due to a libui problem, or due to Nil GC problem?
18:10:50Araqlibui takes ownership of widgets, so it would be wrong to free it in the finalizers
18:11:21Araqat least as far I as understand it, this thing is really messy in its resource handling
18:11:33Varriount|PhoneAraq: Is there an issue yet for getting the "true" runtime type of a reference/variable, rather than the compile-time type?
18:11:50Varriount|PhoneI mean, has an issue been posted?
18:11:55Araqno.
18:12:20*Trustable joined #nim
18:12:24AraqSalewski: so yes, it's libui specific and the general idea is good.
18:12:38SalewskiOK, when it is not a Nim problem, then I will play with a higher level GTK Nim GUI!
18:12:47Araqcool :-)
18:12:57SalewskiBye...
18:13:17*Salewski left #nim (#nim)
18:15:07dom96Araq: Discouraging repr's use until an alternative shows up is not the way to go
18:16:12dom96$'s behaviour is too confusing IMO
18:16:32dom96If quotes shouldn't appear then neither should @[]
18:19:41Varriount|PhoneWhy do tuples have $ defined?
18:20:37AraqI disagree, I think @[] is perfectly fine, what else should it produce?
18:20:59AraqVarriount|Phone: because why not?
18:21:19dom96It's too subtle
18:21:22jjidoWhere is the doc for $?
18:21:33Araqit's true however, that for containers repr and $ have no real difference
18:21:34jjido$'
18:22:10dom96"otherwise generic code breaks that uses $" what does that mean?
18:22:13Araqhttps://nim-lang.org/docs/system.html#%24,int
18:22:30Varriount|PhoneIn python, `print` looks for a __str__ method first, then uses repr
18:23:00Araqdom96: $ is "turn into a string", it needs to be NOP for strings
18:24:18Araqfor example I can write "<coord>" & $x & ", " & $y & "</coord>" and it works for strings/ints/float
18:25:01dom96Following that logic $ for seq[T] should be an alias for join(seq, ",")
18:25:19Araqwhy? where does that "," come from?
18:25:22dom96or rather: join(map(seq, `$`), ",")
18:25:28dom96It's a list
18:25:47jjidoWho cares whta is the string representation of a list
18:25:51Araqwhy not ";" or \t ?
18:26:37dom96Why not "0xff" for ints?
18:27:37dom96Currently `$` means different things for different types. For seq[T] it gives us essentially Nim code.
18:27:42dom96Same for tuples
18:27:53Araqyes because it doesn't hurt.
18:28:00dom96and same for floats and ints
18:28:05Araqquotes for strings do hurt.
18:28:27dom96strings are the odd ones out
18:29:26dom96Perhaps $ for seq[string] should quote the strings?
18:29:57dom96In what situation would @["Hello", "world"] instead of @[Hello, World] hurt?
18:29:58krux02nod only quoting, but also escape it
18:30:31krux02just think of strings that contain "
18:30:40Araqwell you cannot blame Nim for every single of your mistakes.
18:30:50dom96I certainly don't
18:31:42Araq @["Hello", "world"] would be a weird inconsistency
18:32:01jjidoNot weird
18:32:09*yglukhov joined #nim
18:32:17Araqand it means whenever we lift $ to compound types we need to special case $ for strings and instead use "that other $ for strings"
18:32:36krux02it is definitively inconsisten when you think about it's type
18:33:16krux02there are two different things you want from `$`
18:33:50krux02sometimes it is a representation of that value in valid Nim code
18:33:50federico3wouldn't a repr of @["Hello, world", ""] be misleading without the quotes?
18:34:03krux02and the other one is just a string representation
18:35:43krux02maybe repr, should be revived and fixet to be always valid Nim code of a value
18:35:47dom96I 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:30FromGitter<Varriount> I'm with krux02 on rewriting/fixing/etc for repr
18:38:13FromGitter<Varriount> And/Or making the $ for a tuple call repr
18:38:33FromGitter<Varriount> That is what is done in python
18:38:36krux02repr has problems though
18:38:52krux02don't rely on the result of that thing in any way
18:39:18krux02it returns very different results depending on if you run it on the vm or in binary
18:40:53*tankfeeder joined #nim
18:41:45Araqas I said, repr should move into its own module
18:41:51Araqand macros.repr should be renamed
18:43:12AraqI 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:52FromGitter<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:47FromGitter<Varriount> Some sort of 'print out a representation of this value' rather than a 'turn this value into a string'
18:45:42dom96indeed
18:46:16FromGitter<Varriount> What are the current big problems with repr?
18:48:16krux02Araq: 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:46dom96Varriount: it crashes sometimes
18:51:10FromGitter<Varriount> dom96: I'm assuming from reading invalid pointers and such?
18:53:12dom96yeah
19:02:41Varriount|PhoneWell then, when encountering a ptr type, stop and just print the address
19:03:04Varriount|PhoneEven if it's a cstring
19:05:44dom96I bet it's not that simple
19:05:56dom96But 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:37krux02Varriount: you know that ref is also just a different version of a pointer type?
19:17:01FromGitter<Varriount> krux02: Hm, yes, I know.
19:17:16*tankfeeder quit (Quit: Leaving)
19:18:22FromGitter<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:30FromGitter<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:07krux02how about a check for `nil` and that's it?
19:22:37krux02the article just said it, don't check for invalid pointers, just crash
19:22:47krux02a program shouldn't have invalid pointers
19:22:55krux02and when it is, it is ok to crash
19:29:52jivank[m]dom96: is there an option for jester that logs source IP and timestamp for each request?
19:30:42ArrrrWas table.clear fixed?
19:30:51*elrood quit (Quit: Leaving)
19:30:58AraqArrrr: afaik, yes
19:31:32ArrrrAnd does it allocate new memory?
19:31:49jivank[m]If not would you take a PR?
19:32:00Araqkrux02: repr is for debugging and if it can detect invalid pointer and say so instead of crashing, that's worthwhile to do
19:32:08AraqArrrr: I doubt it, why?
19:33:06cheatfateVarriount|Phone, on windows you can VirtualQuery address and check flags for readability, and read it
19:33:13cheatfateso you will not get any exceptions
19:34:09dom96jivank[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:41jivank[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:57Araqkrux02: I saw your post but it doesn't solve things properly :P
19:50:15*bjz joined #nim
19:51:39dom96jivank[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:51krux02Araq: I know it introduces a lot of macro magic into a module that is supposed to be simple
22:04:19krux02but 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:00AraqEOF should raise an exception anyway
22:09:11Araqit's like Index out of bounds
22:09:48Araqthe 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:00Araq*beyond
22:11:01Araqand 'readChar' is totally stupid, no lookahead, but you can push back a single char with ungetc(), who uses that bullshit?
22:11:12Araqever tried to parse anything with that thing?
22:11:17Araqit'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:57dom96"Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries" D:
22:25:39demi-this has been a thing for ages
22:25:51demi-because openssl is extremely bad
22:25:56FromGitter<Varriount> And they're probably better for it.
22:26:17*couven92 quit (Quit: Client disconnecting)
22:26:53cheatfatei dont think openssl is extremely bad
22:27:04enthus1astthe windows installer is timeouting on the docs/dlls/etc
22:27:05cheatfateand i dont think they make much better library
22:27:54Araqenthus1ast
22:28:09Araqwe're working on a new release day and night because of this
22:28:25dom96ugh, SSL is such a pain
22:29:08XeSSL is not the pain, things not supporting it is
22:31:12*Matthias247 quit (Read error: Connection reset by peer)
22:31:16enthus1astok, just got that demonstration effect : )
22:33:20Araqupcoming version uses this: https://nim-lang.org/download/mingw32-6.3.0.7z
22:33:53Araqor this: https://nim-lang.org/download/mingw64-6.3.0.7z
22:34:06Araqso ... if you need a decent mingw, here you go
22:34:28enthus1astthanks 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:51dom96gah, 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