00:00:02 | krux02 | well I think I found a better solution |
00:00:20 | krux02 | I just use projectile-project-root |
00:00:35 | krux02 | with that I can simpley remove a lot of code |
00:00:55 | krux02 | it is another dependency, but as a fallback I can just use the buffer-file-name |
00:01:17 | krux02 | dom96, I don't know why nimsuggest doesn't find the project root on its own |
00:01:32 | krux02 | probably because it is emacs |
00:02:25 | * | rupil joined #nim |
00:03:23 | * | yglukhov quit (Ping timeout: 264 seconds) |
00:08:28 | * | gokr quit (Ping timeout: 240 seconds) |
00:10:39 | dom96 | 'night |
00:19:17 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
00:26:56 | * | BitPuffin joined #nim |
00:27:07 | zachcarter | http://imgur.com/a/iE4Up |
00:34:36 | * | bjz joined #nim |
00:39:06 | * | vendethiel quit (Ping timeout: 240 seconds) |
00:39:30 | * | rupil quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
00:54:14 | * | djellemah_ joined #nim |
00:57:41 | * | djellemah quit (Ping timeout: 240 seconds) |
01:01:12 | * | Matthias247 quit (Read error: Connection reset by peer) |
01:07:57 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
01:10:11 | zachcarter | where can I obtian pcre.dll? |
01:45:48 | * | bjz joined #nim |
02:10:12 | * | brson quit (Quit: leaving) |
02:11:47 | krux02 | zachcarter, don't you have a mac? |
02:12:04 | zachcarter | I do, but I was testing my game framework on windows |
02:12:09 | zachcarter | it’s all good I’m dropping that dependency anyway |
02:12:45 | krux02 | yea it sucks that regular expressions are not simply there on windows |
02:12:57 | krux02 | in linux that dependency is just not an issue |
02:13:53 | zachcarter | yeah |
02:37:56 | * | chemist69 quit (Ping timeout: 258 seconds) |
02:50:35 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
02:51:40 | * | chemist69 joined #nim |
02:58:22 | * | yglukhov joined #nim |
03:02:47 | * | yglukhov quit (Ping timeout: 264 seconds) |
03:08:36 | * | krux02 quit (Quit: Leaving) |
03:09:15 | FromGitter | <Varriount> I bet the .NET framework has regular expressions. |
03:09:45 | FromGitter | <Varriount> zachcarter: All you need to do is call into the .NET runtime environment. >:D |
03:09:56 | zachcarter | :P |
03:20:39 | * | user0___ quit (Quit: user0___) |
03:39:31 | FromGitter | <Varriount> zachcarter: And since you're using VSCode, I thought I just might post this: https://news.ycombinator.com/item?id=13940014 |
03:39:47 | zachcarter | hahaha |
03:39:52 | zachcarter | not surprised |
03:40:24 | FromGitter | <Varriount> I'll be blunt: I don't like the "lets use a browser to implement a desktop application" trend |
03:41:38 | FromGitter | <Varriount> As far as I'm concerned, it's just adding several layers of abstraction |
03:46:05 | zachcarter | yeah |
03:46:15 | zachcarter | I just use it because it works well with nim |
03:46:24 | zachcarter | and nim suggest |
03:47:09 | jivank_ | can you statically linked against pcre.dll? |
03:47:19 | jivank_ | statically link* |
03:55:36 | * | bjz joined #nim |
03:56:45 | FromGitter | <Varriount> jivank_: You would first need a pcre.lib file (the static library). After that, you would use the dynlib override argument when invoking the compiler. |
04:46:55 | * | ludocode_ quit (Quit: ludocode_) |
04:57:11 | * | zachcarter quit (Quit: zachcarter) |
05:08:01 | * | Jesin quit (Ping timeout: 256 seconds) |
05:12:34 | * | Jesin joined #nim |
05:58:14 | * | vendethiel joined #nim |
06:11:18 | * | yglukhov joined #nim |
06:11:35 | * | Nobabs27 quit (Quit: Leaving) |
06:39:31 | FromGitter | <rsirres> `````` |
06:39:39 | FromGitter | <rsirres> import random ⏎ ⏎ randomize() ⏎ echo random(1.0) [https://gitter.im/nim-lang/Nim?at=58d610aa41a045e94dc5e941] |
06:44:52 | FromGitter | <rsirres> returns the same result |
06:45:47 | FromGitter | <rsirres> Do I *have to* set a seed ? |
06:48:01 | * | yglukhov quit (Remote host closed the connection) |
06:57:05 | * | Trustable joined #nim |
07:02:41 | * | vendethiel quit (Ping timeout: 240 seconds) |
07:06:15 | FromGitter | <Araq> the seed is timer dependent |
07:06:48 | FromGitter | <Araq> and the timer's resolutions is not good. seems to be a bug |
07:12:07 | * | rauss quit (Quit: WeeChat 1.7) |
07:17:22 | * | Trustable quit (Remote host closed the connection) |
07:24:32 | * | vlad1777d joined #nim |
07:48:49 | * | yglukhov joined #nim |
07:50:58 | * | yglukhov quit (Remote host closed the connection) |
07:51:14 | * | yglukhov joined #nim |
07:51:47 | * | yglukhov quit (Remote host closed the connection) |
08:26:36 | * | vivus joined #nim |
08:29:01 | * | nsf joined #nim |
08:32:11 | * | vivus quit (Quit: Leaving) |
08:52:17 | * | yglukhov joined #nim |
09:06:18 | * | gokr joined #nim |
09:10:40 | * | Tiberium joined #nim |
09:23:52 | * | yglukhov quit (Remote host closed the connection) |
09:24:42 | * | yglukhov joined #nim |
09:29:21 | * | yglukhov quit (Ping timeout: 260 seconds) |
09:43:43 | Tiberium | How can I fix issues like " Warning: not GC-safe:" ? |
09:43:57 | Tiberium | "Warning: not GC-safe: 'callMethod("messages.send", data, TOKEN)' [GcUnsafe]" |
09:44:45 | Tiberium | my callMethod returns table or nil |
09:54:05 | cheatfate | https://nim-lang.org/docs/manual.html#threads-gc-safety |
09:55:40 | Tiberium | if i would make my program async, will I need to make my procs gc safe? |
09:55:44 | Tiberium | or it's only for threads? |
10:00:30 | * | Matthias247 joined #nim |
10:00:58 | cheatfate | threads only |
10:04:49 | Tiberium | oh, nice |
10:04:49 | * | gokr quit (Ping timeout: 260 seconds) |
10:08:05 | Tiberium | and another question - is there any difference between performance if all my variables are "var", or if some of them are "let" ? |
10:14:59 | Tiberium | hm, I probably found a bug in nimsuggest - I have an API object, and create instance of it like that: let api = newAPI() nimsuggest says "redefenition of API" |
10:17:36 | Tiberium | or no |
10:17:36 | Tiberium | wait |
10:19:10 | Tiberium | it works now |
10:26:24 | * | Vladar joined #nim |
10:29:30 | * | yglukhov joined #nim |
10:56:20 | * | vendethiel joined #nim |
10:58:41 | * | yglukhov quit (Ping timeout: 240 seconds) |
11:04:15 | dom96 | Good afternoon |
11:05:30 | * | zachcarter joined #nim |
11:07:27 | Tiberium | Does Nim disables all checks with -d:release? |
11:09:25 | Tiberium | And how can I make nimble file only for installing dependencies (I don't want to provide my program as a lib, and I want to use nimble to install deps automatically) |
11:10:58 | Vladar | Tiberium: yes, and https://github.com/nim-lang/nimble#dependencies |
11:11:53 | Tiberium | Vladar, but nimble still will output things like "VKBot package installed successfully" on successful installation of the package? |
11:11:57 | Tiberium | ah, nevermind, it's fine |
11:12:19 | Tiberium | because I will want in the future to have my program in nimble |
11:12:54 | * | Matthias247 quit (Read error: Connection reset by peer) |
11:17:42 | dom96 | Just specify the `bin` option in the nimble file |
11:17:52 | dom96 | That way it will be a binary package |
11:20:13 | Tiberium | dom96, and how can I pass compile params in nimble file? |
11:20:23 | Tiberium | for example SSL support |
11:20:26 | Tiberium | -d:ssl |
11:20:33 | dom96 | You can't, put it in a .nim.cfg or a config.nims or a .nims |
11:21:33 | Tiberium | dom96, can I use nakefile for it? no? |
11:21:34 | * | vendethiel quit (Ping timeout: 258 seconds) |
11:21:52 | dom96 | no |
11:22:10 | Tiberium | dom96, is there any docs on config.nims for building with nibmle? |
11:22:13 | Tiberium | *nimble |
11:22:32 | dom96 | https://nim-lang.org/docs/nims.html |
11:29:31 | Tiberium | dom96, still no luck :( https://paste.pound-python.org/show/47jVQW4qv4zZZEUd9C4B/ |
11:29:42 | Tiberium | this is my config.nims |
11:29:57 | Tiberium | it it doesn't build binary with ssl support |
11:30:00 | * | yglukhov joined #nim |
11:30:40 | dom96 | why is it in a procedure? |
11:31:30 | Tiberium | I found it in other nim repos |
11:31:38 | Tiberium | I don't need to put it into a procecure? |
11:32:35 | * | couven92 joined #nim |
11:33:35 | * | krux02 joined #nim |
11:33:35 | dom96 | No |
11:33:43 | Tiberium | dom96, for example - https://github.com/vegansk/nimboost |
11:33:52 | Tiberium | https://github.com/vegansk/nimboost/blob/master/config.nims |
11:34:23 | dom96 | Think about it. |
11:34:37 | dom96 | If you put it in a procedure, you need to call that procedure. |
11:34:44 | Tiberium | yeah, but how does nimboost call it? |
11:35:01 | dom96 | Search for "buildBase" and you'll see |
11:35:14 | dom96 | You don't need so much complexity though |
11:35:21 | dom96 | Just add -d:ssl into the file. |
11:35:43 | dom96 | Literally: echo "-d:ssl" > config.nims # should be enough |
11:36:33 | Tiberium | dom96, but maybe it's better to have debug build by default? or no? |
11:36:39 | Araq | dom96: can we make -d:ssl the default now? |
11:37:16 | dom96 | Araq: why? |
11:37:30 | Araq | https is everywhere |
11:37:42 | Araq | and people stumble upon this |
11:37:42 | dom96 | Tiberium: It's already debug by default |
11:37:46 | Tiberium | dom96, ah |
11:37:55 | Tiberium | dom96, but for nimble - it's better to have a debug build or release? |
11:38:05 | Tiberium | by default |
11:38:06 | dom96 | Tiberium: Nimble will decide itself. |
11:38:09 | Tiberium | wow |
11:38:14 | Tiberium | ok |
11:38:21 | dom96 | When you install a package it will build in release mode by default |
11:39:30 | dom96 | Araq: So you see someone struggling with config.nims and your immediate solution is to make sure they don't need to specify the flag in question? |
11:39:51 | Araq | it came up for ldlework too |
11:40:06 | Araq | I see people reporting problems and count them. |
11:40:30 | Araq | and when N >= 2 it indicates a problem and when N >= 3, 4 I take some action |
11:40:46 | dom96 | Your identifying an incorrect problem |
11:40:56 | dom96 | *You're |
11:41:31 | dom96 | We can make -d:ssl default once there is no dependency on openssl |
11:41:57 | dom96 | (or we allow loading of openssl when it's actually used) |
11:42:10 | Araq | (hell no :P) |
11:42:47 | Araq | the dependency on openssl is not that bad. but ok. |
11:43:03 | couven92 | dom96, I theory, we could depend on openssl on Linux, couldn't we? And on Windows we could use the Built-in Win32 SceChan implementation? |
11:43:36 | couven92 | s/SceChang/SecureChannel |
11:44:44 | dom96 | Araq: Instead we should improve our documentation to make it obvious how to enable -d:ssl for Nimble packages. |
11:45:00 | Tiberium | can I report somewhere that foreignDep detects my Manjaro (based on Arch Linux) wrongly? |
11:45:12 | Tiberium | "sudo pkg install openssl" |
11:45:17 | Tiberium | but it's pacman |
11:45:35 | Araq | Tiberium: no, you can only fix it. lib/pure/distros.nim |
11:46:44 | Tiberium | Araq, ok |
11:47:47 | dom96 | couven92: Perhaps. I'm not sure how good Win32's SceChan is. |
11:48:05 | dom96 | couven92: If you're up for it, implementing that on Windows would be very much appreciated :) |
11:49:09 | couven92 | I should really learn to shut my mouth instead of accepting lots of side-projects! :P All right, I guess this is more important that the nimsuggest and NimStudio stuff? |
11:49:26 | Tiberium | NimStudio? Is it a new IDE? |
11:49:34 | Tiberium | ah |
11:49:36 | Tiberium | VS support |
11:49:59 | dom96 | couven92: Definitely more important :) |
11:50:17 | couven92 | dom96, I'll look into it now |
11:50:51 | * | yglukhov quit (Remote host closed the connection) |
11:51:48 | couven92 | And yes, SecureChannel is Win32 API implementation for SSL/TLS and all that stuff... It's basically how .NET, PowerShell, Windows Update, Internet Explorer, MS Edge, and so on do HTTPS without 3rd party libraries |
11:52:41 | dom96 | Nice. If we could get dependency-less SSL on Windows that would be awesome. |
11:53:49 | couven92 | And I was thinking the other day: If we port the monolithic SQLLite C source to Nim, we could also have a pure SQLLite implementation for Nim, we wouldn't need the library for that anymore either |
11:54:19 | cheatfate | couven92, only microsoft trusts microsoft ssl implementation, all opensource software running windows using its own ssl implementation |
11:55:10 | couven92 | cheatfate, so you say that all those people doing network stuff in C# are all writing/using their own custom SSL implementation? |
11:55:19 | couven92 | Don't think so! |
11:55:44 | Tiberium | hmm, if I have all my source files in VKBot, and config.nims outside this folder, and srcDir in .nimble file is defined "VKBot", but nimble doesn't detect config.nims. But if I put my config.nims into VKBot dir, nimble detects it |
11:55:45 | couven92 | And those people writing Python services or python HTTPS clients |
11:55:59 | dom96 | couven92: We could also just embed the C source code for SQLite |
11:56:05 | cheatfate | C# adepts using microsoft ssl |
11:56:28 | cheatfate | but python using openssl, go using its own implementation, rust uses its own ssl |
11:56:48 | cheatfate | python https clients using openssl |
11:57:38 | cheatfate | only microsoft and couple of c# adepts which don't want to be cross-platform |
11:59:34 | couven92 | cheatfate, do you want me to introduce an openssl defined just so that you can escape the evilness of SecureChannel on Windows? |
12:01:53 | cheatfate | couven92, do you know that some years ago, when SSL was version 1 i think, and when US crypto export restrictions was tough, Internet Explorer used weak 56bit DES for not US installations? |
12:02:51 | cheatfate | that's one of the reasons why mozilla, chrome and everybody else except microsoft prefer to use opensource crypto implementations |
12:02:53 | couven92 | No, I didn't. Before my (computer science) time... |
12:03:54 | cheatfate | There only one thing used from whole windows security by opensource ssl implementations |
12:04:37 | cheatfate | its system PRNG, and you know, it used only to seed opensource prng implementation |
12:05:10 | cheatfate | so i prefer to stay with openssl implementation, or make my own |
12:05:29 | cheatfate | but not use microsoft's implementation |
12:06:19 | cheatfate | couven92, i have made pure nim connection to windows com |
12:06:36 | cheatfate | so i can now obtain installation path of vs2017 |
12:07:31 | couven92 | great! Let's make a vswhere.nim file in tools/vccexe ? |
12:08:24 | cheatfate | i thought you already made it too |
12:09:49 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
12:10:01 | * | zachcarter quit (Quit: zachcarter) |
12:10:53 | Tiberium | still no luck with config.nims hmm |
12:10:54 | dom96 | I think that the vast majority of people won't mind using the MS SSL implementation. A lot of them will appreciate the lack of errors. |
12:11:14 | dom96 | And openssl will always be available anyway. |
12:11:22 | dom96 | To switch using a compiler flag |
12:12:52 | couven92 | dom96, cheatfate, I am doing a when defined(openssl) statement to decide whether to load MS SSL or OpenSSL, is that okay? |
12:13:41 | cheatfate | couven92, it will be easy to adopt sync stuff, but what with async? |
12:14:29 | dom96 | couven92: Sure that would be fine. But maybe we could even create a `sslImplementation` (or similar) value define. So that you can write -d:sslImplementation:openssl? |
12:14:29 | couven92 | uhm... baby steps mister! I'll have a look when the sync stuff is complete... And implement async if necessary |
12:15:10 | couven92 | dom96, yeah I can do that... Both maybe? |
12:15:29 | dom96 | I'd rather have one. |
12:15:46 | couven92 | agreed, sslImplementation it is then |
12:15:50 | dom96 | Otherwise we'll have to support both which will be double the work :) |
12:16:08 | cheatfate | couven92, there so many semi-finished modules inside of stdlib... |
12:16:46 | couven92 | don't worry cheatfate, I'll make async a prio no.1 once the basic stuff works |
12:16:59 | cheatfate | couven92, its better to start with async |
12:17:04 | cheatfate | who cares about sync |
12:17:15 | cheatfate | let `sync` users use openssl |
12:17:19 | * | zachcarter joined #nim |
12:18:25 | * | dddddd joined #nim |
12:18:39 | couven92 | cheatfate, I'll have to experiment a lot and I have to read a lot of the MSDN documentation... So I'll do what is easier at the starts and then work my way through it |
12:18:58 | dom96 | Yeah, start with sync it will be easier to get working. |
12:19:15 | couven92 | But, I know C# has both async and sync SslStreams, so if they can do it, we can as well! |
12:20:12 | cheatfate | couven92, c#'s async is a little different form nim's async, and also windows async is a lot different from unix async |
12:20:40 | couven92 | I was talking about principle here! |
12:21:16 | cheatfate | i'm too |
12:22:16 | couven92 | cheatfate, but back to vswhere, no I haven't done that yet, so go ahead... vsdiscover has a TODO comment about half-way through the file where you can integrate vswhere... |
12:23:11 | * | kunev quit (Ping timeout: 240 seconds) |
12:23:32 | couven92 | oh, sorry, that's vccdiscover.nim, https://github.com/nim-lang/Nim/pull/5575 |
12:23:52 | * | Snircle joined #nim |
12:23:56 | cheatfate | couven92, i dont care about vswhere, i have made poc and want to say to you, that this is possible and easy |
12:24:14 | * | kunev joined #nim |
12:25:20 | couven92 | ah, okay... Great! That confirms also my suspicions |
12:25:51 | cheatfate | suspicions? |
12:26:32 | couven92 | that is was possible and easy. I thought so as well, I just haven't had time to do it yet |
12:39:09 | Tiberium | gdb says "No symbol table is loaded. Use the "file" command." in VSCode. Do I need to compile my program with some specific arguments? |
12:39:40 | dom96 | --debugger:native |
12:45:41 | Tiberium | dom96, thanks |
12:51:39 | * | yglukhov joined #nim |
12:54:01 | FromGitter | <rsirres> Hey guys |
12:54:08 | FromGitter | <rsirres> what do think about crystal lang ? |
12:56:40 | dom96 | I haven't used it but it looks like a nice language, especially if you like Ruby syntax. |
12:57:45 | dom96 | I wouldn't consider using it until they support Windows natively though. |
12:59:58 | * | dmi0 joined #nim |
13:03:08 | * | yglukhov quit (Ping timeout: 260 seconds) |
13:04:52 | zachcarter | looks like a native replacement for ruby |
13:05:10 | zachcarter | and what dom96 said about windows |
13:07:11 | Tiberium | What are downsides of having a "{.procvar.}" proc? |
13:07:19 | Tiberium | performance, something else? |
13:10:26 | dom96 | Nothing AFAIK |
13:10:38 | dom96 | Using map etc. may have some performance downsides though |
13:10:43 | * | BitPuffin|osx quit (Ping timeout: 260 seconds) |
13:12:18 | Tiberium | dom96, I have a table that looks like {"string": proc}, will it cause some performance downside over if's? |
13:14:51 | dom96 | what are you using instead of if's? |
13:15:14 | dom96 | Oh. You're dispatching the function to call via a hash map? |
13:15:17 | Tiberium | yeah |
13:15:32 | dom96 | hrm, not sure. |
13:15:45 | dom96 | Probably. Would be interesting to benchmark it. |
13:16:14 | niv | how's an anon proc implemented underneath? just a function pointer? |
13:16:14 | Tiberium | but *maybe* I should use if's, with if's I can have multi-word commands without for loop |
13:17:52 | dom96 | Tiberium: Use a case statement if you can |
13:18:02 | dom96 | niv: Yeah, I think so. |
13:18:07 | Tiberium | dom96, ah, forgot about it :D |
13:18:10 | dom96 | niv: Did you see my issue on your websockets repo? |
13:18:42 | niv | performance most likely depends on what is wrapping your branching code, i.e. how many other code pathes it hits and how much non-sequential memory access it does |
13:18:55 | niv | dom96: i got the email and i felt guilty, as it's quite an old ticket. i will get around to it |
13:19:26 | dom96 | niv: no need to feel guilty. My projects likely have far older issues... |
13:19:56 | niv | im having a hard time context switching into nim at the moment so getting back into it will require some free time |
13:20:34 | niv | your suggestions seemed sane and fine though, obviously. i just dont want to break some parts of the api needlessly for people already using it |
13:22:04 | dom96 | yeah, I understand. Best thing to do is tag the current commit and emphasise the breaking change. |
13:22:18 | niv | sure :) |
13:22:23 | dom96 | or you could even deprecate the current API and offer a new version |
13:22:27 | dom96 | But that would be more work |
13:23:33 | niv | well, either way, i'll have to think carefully on how to shape a new api, if needed. i don't want to go through that a few times |
13:24:23 | dom96 | sure |
13:25:21 | niv | are you using it in production somewhere? or is your interest more academic? |
13:28:19 | dom96 | I will be using it in production soon |
13:28:40 | dom96 | Adding real-time shared scores to picheta.me/snake/ |
13:29:04 | niv | that's cute :) |
13:29:07 | dom96 | I will feature that on the new Nim site too I think :) |
13:29:23 | niv | oh, there'll be a new site? is that the blog you were thinking about? |
13:29:39 | dom96 | It will be a redesign of nim-lang.org |
13:29:45 | dom96 | The news will become a blog |
13:30:27 | dom96 | If you want to check out what we have so far or help out https://github.com/nim-lang/website :) |
13:31:27 | niv | smooth plug, but i can't really invest time right now in any serious capacity |
13:31:43 | niv | is it deployed/browsable somewhere? |
13:34:36 | dom96 | afraid not |
13:46:29 | * | shashlick quit (Ping timeout: 260 seconds) |
13:47:12 | * | shashlick joined #nim |
13:48:16 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
13:53:29 | * | dmi0 quit (Ping timeout: 260 seconds) |
14:03:42 | Tiberium | assume I have an Flags* = enum A, B, C, D and set of this flags - {A, B} Can I add this set to my object? I tried type SomeObj = flags: set[Flags], but it says it expects ordinal types |
14:03:53 | Tiberium | Is there a way to add this set to object? |
14:12:58 | krux02 | Tiberium, well you have a syntax error |
14:13:05 | Tiberium | krux02, I know |
14:13:24 | * | BitPuffin|osx joined #nim |
14:13:31 | Tiberium | just field of the object |
14:13:32 | Tiberium | flags*: set[Flags] |
14:13:41 | krux02 | how about type SomeObj = object\n flags: set[Flags] |
14:15:33 | Tiberium | krux02, ah, it was because I'm trying to set type of the field earlier, than enum is defined |
14:15:36 | Tiberium | but error message confused me |
14:15:43 | Tiberium | https://glot.io/snippets/eobjw62xd1 |
14:17:38 | krux02 | well for some reason it does work when you change the order of the two types in the types section |
14:18:05 | krux02 | I always thought the types section was, so you could have types referencing each other |
14:18:12 | krux02 | but hey |
14:19:02 | Tiberium | krux02, I mean the error message is confusing |
14:19:09 | Tiberium | it didn't said "Flags is undefined" |
14:20:02 | krux02 | well error messages are not the best in Nim |
14:20:12 | krux02 | but for me they work, so you can get used to them |
14:41:56 | * | gangstacat quit (Quit: Ĝis!) |
14:45:36 | Tiberium | type mismatch: got VKAPI but expected VKAPI = object am I doing something wrong? |
14:47:19 | Tiberium | added "ref object" instead of "object", works now |
14:47:33 | Tiberium | ah no |
14:47:54 | Tiberium | ah |
14:47:55 | Tiberium | nvm |
14:50:01 | * | gangstacat joined #nim |
15:00:06 | * | couven92 quit (Ping timeout: 240 seconds) |
15:00:41 | * | couven92 joined #nim |
15:06:29 | * | yglukhov joined #nim |
15:09:02 | * | gokr joined #nim |
15:19:22 | * | yglukhov quit (Remote host closed the connection) |
15:21:17 | * | Trustable joined #nim |
15:25:35 | * | vendethiel joined #nim |
15:42:26 | * | def-pri-pub joined #nim |
16:12:08 | * | couven92 quit (Ping timeout: 258 seconds) |
16:27:15 | * | BitPuffin quit (Remote host closed the connection) |
16:29:30 | * | BitPuffin joined #nim |
16:34:10 | * | brson joined #nim |
16:52:51 | * | yglukhov joined #nim |
17:04:51 | * | yglukhov quit (Remote host closed the connection) |
17:05:39 | * | mcc joined #nim |
17:06:58 | * | Jesin quit (Quit: Leaving) |
17:07:21 | mcc | quick silly question: how do i get max/min values for eg int16, uint32 etc |
17:07:26 | mcc | from the nim standard library |
17:12:20 | mcc | not finding it in the docs |
17:15:11 | * | brson quit (Ping timeout: 246 seconds) |
17:19:41 | zachcarter | http://imgur.com/a/FnUN1 |
17:20:50 | * | Tiberium quit (Remote host closed the connection) |
17:21:05 | krux02 | zachcarter, looks cool so far |
17:21:09 | * | Tiberium joined #nim |
17:21:40 | krux02 | I have no idea how far of what you actually want to get it is away, but it is cool |
17:23:48 | zachcarter | thaanks |
17:23:52 | zachcarter | krux02: |
17:24:00 | zachcarter | https://github.com/fragworks/frag |
17:25:19 | zachcarter | still quite far off from where the project needs to be to support the types of games I’d like folks to be able to create with them |
17:25:22 | zachcarter | but every day, getting a little closer |
17:27:03 | krux02 | cool |
17:27:24 | krux02 | I kind of struggle with mud that prevents me from getting anything done |
17:27:34 | krux02 | you know when there is a lot of friction |
17:27:39 | zachcarter | yeah |
17:27:54 | * | sz0 joined #nim |
17:28:04 | krux02 | I hate that my editor dos not proper error highlighting |
17:28:13 | zachcarter | :/ |
17:28:31 | krux02 | and wheneven I mention that it does not work, the answer is: It does work |
17:28:44 | krux02 | and I say: that doesn't help because it doesn't |
17:28:55 | krux02 | and then the maintenance of nim-mode in my editor is basically dead |
17:28:59 | krux02 | so I have to take that over |
17:29:05 | krux02 | I am no emacs-lisp developer |
17:29:15 | krux02 | so I had to learn that language too, and the emacs api |
17:29:33 | krux02 | and the horrible state, that the nim mode is written in |
17:29:52 | krux02 | maybe it's just me not understanding the language properly |
17:30:04 | * | brson joined #nim |
17:30:33 | FromGitter | <TiberiumPY> do you always use terminal? |
17:30:38 | FromGitter | <TiberiumPY> maybe you can use GUI IDE |
17:30:43 | FromGitter | <TiberiumPY> like VSCode |
17:31:19 | * | krux02_ joined #nim |
17:31:27 | * | krux02_ quit (Client Quit) |
17:31:57 | krux02 | I use a "gui ide", I use emacs |
17:32:08 | krux02 | I tested VSCode, it doesn't work either |
17:32:18 | Tiberium | hm |
17:32:29 | Tiberium | it does for me, it just pulls errors from nimsuggest |
17:32:33 | Tiberium | but not autocompletion |
17:32:45 | Tiberium | I think there's no IDE's for Nim with smart auto-completion |
17:32:52 | krux02 | Tiberium, but I guess you don't do the main file that includes everything pattern |
17:33:25 | Tiberium | krux02, it doesn't include, but import |
17:33:37 | krux02 | import is no problem, include is the problem |
17:33:43 | Tiberium | ah |
17:33:55 | Tiberium | I use them only in plugins |
17:34:03 | Tiberium | to not type same imports every time for each plugin |
17:34:18 | krux02 | when you include, your file does not start at the beginning it starts where it is included from |
17:34:37 | Tiberium | ah |
17:34:39 | Tiberium | debugging? |
17:34:54 | krux02 | debugging in emacs is quite bad |
17:35:00 | krux02 | I gave up on it |
17:35:10 | krux02 | it has this fancy debugger that nobody understands |
17:35:31 | krux02 | it makes it especially hard, because I am not debugging a languaged that gdb knows about |
17:35:51 | krux02 | I started writing python scripts to let gdb know more about nim |
17:35:59 | krux02 | but it appears thit this is no easy task at all |
17:37:17 | * | Matthias247 joined #nim |
17:37:27 | krux02 | I got so far, that I could actually bundle a python-gdb script in the executable that would then be seen and executed by gdb |
17:37:30 | * | couven92 joined #nim |
17:37:44 | krux02 | and this script then tells gdb about the string type |
17:39:05 | Tiberium | wow |
17:40:29 | Tiberium | is there anything like PEP8 in Python for Nim? |
17:40:33 | Tiberium | coding standarts |
17:41:04 | krux02 | what is PEP8? |
17:41:11 | cheatfate | Tiberium, https://nim-lang.org/docs/nep1.html |
17:41:21 | Tiberium | cheatfate, thanks |
17:41:36 | Tiberium | krux02, pep8 is a style guide for Python |
17:42:03 | krux02 | ok |
17:42:09 | krux02 | I just found out about it |
17:42:44 | krux02 | well sadly because nim is with semantic whitespace, autoformat does not quite work |
17:43:01 | krux02 | maybe it does, when it doesn't alternate the whatespace |
17:43:20 | krux02 | bun in my emacs indent-region just destroyed everything |
17:44:12 | krux02 | not everything but the semantic blocks |
17:44:31 | krux02 | I used to really like go-fmt |
17:44:39 | krux02 | for c++ there is clang-format |
17:44:50 | Tiberium | what does "{.pure.}" do for enums? |
17:45:07 | krux02 | Tiberium, probably nothing |
17:45:16 | Tiberium | krux02, "Non-pure enum values should use camelCase whereas pure enum values should use PascalCase." |
17:45:28 | Tiberium | what's the difference? |
17:46:30 | krux02 | https://nim-by-example.github.io/types/enums/ |
17:47:28 | Tiberium | ah |
17:47:32 | Tiberium | qualification |
17:47:32 | Tiberium | thanks |
17:47:59 | krux02 | could be more specific, but pure let's enums be a bit more like Java and non-pure like C |
17:49:37 | Tiberium | how to create an empty table? |
17:49:44 | Tiberium | {}.toTable() doesn't do the trick |
17:49:55 | def-pri-pub | It should be in the `newTable` |
17:50:17 | def-pri-pub | Or new `newTableRef` |
17:50:25 | krux02 | reactormonk, can you review the pull request of nim-mode |
17:50:34 | krux02 | Tiberium, try it with just declaring it |
17:50:43 | krux02 | var myTable : <tableType> |
17:50:50 | def-pri-pub | (They're in the `tables` module BTW) |
17:50:51 | Tiberium | krux02, i want to have a default value for my proc |
17:50:55 | Tiberium | def-pri-pub, I know :) |
17:51:35 | Tiberium | so {}.newTable() |
17:52:06 | def-pri-pub | I would just do `newTable()` |
17:52:31 | Tiberium | it says "cannot instantiate 'A' and 'B' |
17:52:43 | Tiberium | Error: cannot instantiate: 'A' proc newTable*[A, B](initialSize=64): TableRef[A, B] |
17:52:44 | krux02 | don't use the ref type |
17:52:48 | krux02 | just use the Table type |
17:52:56 | Tiberium | I use it |
17:52:57 | def-pri-pub | What's wrong with Ref? |
17:53:07 | def-pri-pub | Tiberium: You need to specify some types |
17:53:18 | def-pri-pub | My bad, I should have explained better |
17:53:20 | Tiberium | def-pri-pub, proc callMethod* (api: VkApi, methodName: string, params: Table = newTable(), token: string = ""): JsonNode = |
17:53:29 | def-pri-pub | e.g. `var table = newTableRef[string, int]()` |
17:53:34 | Tiberium | ah |
17:53:39 | krux02 | I don.t get why people are obsessed with these ref types |
17:53:45 | def-pri-pub | Yeah, it's a template. |
17:53:55 | def-pri-pub | Refs are a little safer IIRC |
17:54:09 | krux02 | I would only need a ref type if I would actually share the ownership of a single instance of a table with multiple threads |
17:54:18 | krux02 | but that means I would have to do manual locking |
17:54:21 | krux02 | so I would not do it |
17:54:27 | krux02 | so I don't use table ref types |
17:54:33 | krux02 | jus Table[A,B] |
17:54:50 | krux02 | refs are not a little safer |
17:55:10 | krux02 | refs are just a bit more garbage collection heavy |
17:55:32 | Tiberium | krux02, but how to create a default non-ref value for table? in proc declaration |
17:55:52 | krux02 | Tiberium, is the result a ref type? |
17:55:58 | krux02 | a table type i mean |
17:56:00 | * | Nobabs27 joined #nim |
17:56:10 | Tiberium | krux02, no, I didn't use ref yet |
17:56:25 | Tiberium | I need to read docs to know why ref's are needed exactly :) |
17:56:40 | krux02 | Tiberium, it's not documented in nim |
17:57:01 | Tiberium | krux02, my proc returns non-ref JsonNode |
17:58:07 | krux02 | Tiberium, normally when you do not use ref types, your declarations of variables already contain an empty instance of that type |
17:58:17 | krux02 | for objects all values are 0 |
17:58:19 | * | rauss joined #nim |
17:58:38 | krux02 | so all you would need to do is to append to it |
17:58:41 | krux02 | I think |
17:58:54 | krux02 | the only exception here are seq and string types |
17:58:54 | Tiberium | krux02, so it's better to use ref's everywhere or just values? |
17:59:07 | Tiberium | I have two objects |
17:59:09 | krux02 | Tiberium, it's better to use values everywhere |
17:59:12 | Tiberium | ah |
17:59:13 | Tiberium | thanks |
17:59:41 | Tiberium | I didn't knew that a language compiling to C can be used without pointers/ pointers to pointers/ etc... |
17:59:44 | krux02 | just remember that values have copy semantic |
18:00:06 | krux02 | so when you assign a value type to another variable you get a copy, not a reference to the same thing |
18:00:14 | Tiberium | krux02, I understand that |
18:00:19 | Tiberium | I don't need references for now :) |
18:00:21 | krux02 | but function parameters and return values are hidden references |
18:00:37 | krux02 | so you do not need to wory about a lot of copying types |
18:01:15 | krux02 | they are not the garbage collected ref type, they are more like a hidden pointer |
18:01:34 | Tiberium | krux02, thanks a lot for answering! |
18:02:07 | Tiberium | I've got another question: what's the reliable way to get the amount of used memory (RAM)? I mean how much real RAM is used |
18:02:12 | Tiberium | in linux or nim itself |
18:02:21 | krux02 | htop |
18:02:38 | krux02 | (command line) |
18:04:11 | Tiberium | krux02, so 6600 RES means it uses 6mb's of ram? |
18:05:21 | * | yglukhov joined #nim |
18:05:47 | krux02 | well I have no I idea my htop tells me units in M |
18:06:18 | Tiberium | krux02, mine does too |
18:06:20 | Tiberium | for big apps |
18:06:27 | Tiberium | but for my app it's 6.6 mb it seems |
18:06:53 | krux02 | seems legit |
18:08:55 | Tiberium | by the way, so far I used only one 3rd party nimble package - strfmt, and one macro from stackoverflow |
18:09:13 | Tiberium | in python I would've used like 3 3rd party packages |
18:09:33 | Tiberium | for example, httpclient in Nim is really simpler than urllib in Python (stdlib) |
18:11:54 | dom96 | mcc: high/low IIRC |
18:12:22 | krux02 | Tiberium, I just found out about strfmt, I really like it |
18:12:36 | Tiberium | krux02, I use it basically for interp :) |
18:12:40 | krux02 | I nicely avoids creating unnecessary temporary strings |
18:13:35 | Tiberium | and about Nim's stdlib: as I undestand, stdlib is split in many modules because this allows to make programs more optimized? |
18:13:45 | Tiberium | like optimize memory/ space usage |
18:14:26 | dom96 | It's nothing to do with that. It's to make the stdlib easier to develop. |
18:14:52 | Tiberium | dom96, that's good too |
18:26:01 | * | Tiberium quit (Remote host closed the connection) |
18:27:19 | FromGitter | <TiberiumPY> oh my god, I just renewed |
18:27:33 | FromGitter | <TiberiumPY> I just deleted my project |
18:27:42 | FromGitter | <TiberiumPY> Rebooting into Windows |
18:28:12 | dom96 | what now? |
18:28:21 | FromGitter | <TiberiumPY> Live usb |
18:28:28 | FromGitter | <TiberiumPY> To restore it |
18:31:56 | FromGitter | <TiberiumPY> I just wanted to init a git repo inside Vscode, and it added all files including nimcache, so I pressed "revert" button, and VSCode asked "discard all changes?" Which sounded like "remove all changes" in Russian. I thought it would just delete files from git repo, NOT FROM MY HDD |
18:33:01 | * | dddddd quit (Remote host closed the connection) |
18:36:32 | dom96 | And that's why I always use git through my terminal :) |
18:38:36 | * | yglukhov quit (Ping timeout: 240 seconds) |
18:38:43 | FromGitter | <TiberiumPY> I really hope I will restore them |
18:40:02 | dom96 | To be honest, that seems like a VS code bug to me |
18:40:41 | mcc | dom96: thanks |
18:46:17 | * | arnetheduck quit (Ping timeout: 256 seconds) |
18:49:00 | FromGitter | <TiberiumPY> Ok, my live cd is ready, let's hope for the best |
18:59:27 | * | nsf quit (Quit: WeeChat 1.7) |
19:02:42 | * | couven92 quit (Quit: Client Disconnecting) |
19:04:33 | * | Jesin joined #nim |
19:05:55 | * | krux02 quit (Remote host closed the connection) |
19:33:23 | FromGitter | <TiberiumPY> Yaaay |
19:33:27 | FromGitter | <TiberiumPY> I recovered them |
19:36:12 | * | yglukhov joined #nim |
19:44:04 | dom96 | That's good :) |
19:46:19 | * | libman joined #nim |
19:53:44 | * | Tiberium joined #nim |
19:57:01 | * | BitPuffin quit (Ping timeout: 260 seconds) |
20:09:36 | * | yglukhov quit (Ping timeout: 240 seconds) |
20:27:57 | def-pri-pub | I need some help with working in the JS target. |
20:28:20 | def-pri-pub | I'm trying to port what I wrote for the linux game jam over to JavaScript & HTML5 |
20:29:13 | def-pri-pub | I used my stopwatch library. (https://gitlab.com/define-private-public/stopwatch). It uses 64 bit integers by default. |
20:29:57 | def-pri-pub | For the js backend, I had it return the number of nanoseconds using the `performance.now()` function. I've having Nim's compiled Js thrown an "Overflow error." |
20:31:00 | def-pri-pub | Does Nim's JS backend use the Int64 type if someone specifies a Nim integers as 64 bit? |
20:33:44 | def-pri-pub | Because I'm represetning my time deltas as 64 bit integetrs, but I'm guessing that the Nim compiler put them down to 32 bit when it transpiled it to Js |
20:33:45 | stisa | def-pri-pub not sure, probably related to https://github.com/nim-lang/Nim/issues/4714 |
20:34:08 | def-pri-pub | Thanks |
20:34:32 | def-pri-pub | Crap, I might have to lower the resolution of `stopwatch`'s JS resolution |
20:42:23 | * | Sentreen quit (Ping timeout: 258 seconds) |
20:42:40 | Tiberium | is there any real implementation of case_token macro example? or it's easy to do even if I'm a newbie? |
20:43:40 | dom96 | stisa: Hey. I made some improvements to your jswebsockets package: https://github.com/stisa/jswebsockets/pull/1 |
20:49:16 | def-pri-pub | JS Web sockets for Nim?! (http://i.imgur.com/DXkLvT2.gif) |
20:53:21 | dom96 | Yeah, they work too :) |
20:56:05 | * | Sentreen joined #nim |
20:58:34 | Araq | Tiberium: there is my lexim project. hardly tested though. |
20:58:59 | Tiberium | Araq, https://github.com/Araq/lexim found it |
21:02:57 | * | mcc quit (Quit: Connection closed for inactivity) |
21:06:24 | Tiberium | Araq, ah, it fails with the same error as https://github.com/Araq/lexim/issues/1 :( |
21:07:35 | Araq | well try the example first |
21:08:13 | Tiberium | Araq, ah it works |
21:08:17 | Tiberium | needed to compile "lexe" |
21:08:36 | Tiberium | backwards compatibility wow |
21:08:43 | Tiberium | 2 years and still works |
21:11:39 | * | def-pri-pub quit (Quit: leaving) |
21:13:50 | dom96 | Hrm, seems like Firefox's GC is pausing my game. |
21:18:04 | Tiberium | Can Nim's httpclient handle HTTP GET query parameters automatically? |
21:18:16 | Tiberium | so I can pass them as JsonNode |
21:18:26 | Tiberium | oh, I mean json object :) |
21:19:08 | Tiberium | something like: let client = newHttpClient(); let resp = client.get("https://example.com", %*{"data":1}) |
21:20:47 | * | yglukhov joined #nim |
21:20:59 | * | yglukhov quit (Remote host closed the connection) |
21:24:04 | Tiberium | ah nvm |
21:24:27 | Tiberium | ok, will do it myself probably :) |
21:26:12 | zachcarter | http://imgur.com/a/LXlIh |
21:32:09 | Tiberium | zachcarter, gif is downloading slower than Nim :) |
21:32:37 | Tiberium | zachcarter, did you compile as c++ ? |
21:32:42 | zachcarter | nope |
21:32:43 | zachcarter | C |
21:34:32 | zachcarter | why do you ask Tiberium? |
21:34:45 | Tiberium | zachcarter, just curious |
21:34:50 | zachcarter | ah okay |
21:35:15 | zachcarter | yeah C for max portability |
21:39:38 | Tiberium | what can be the reason of "TLS reference in /home/tiber/NimProjects/VKBot/src/nimcache/VKBot_vkapi.o mismatches non-TLS definition in /hom |
21:39:38 | Tiberium | e/tiber/NimProjects/VKBot/src/nimcache/stdlib_system.o section .bss" ? |
21:39:45 | Tiberium | it's gcc error |
21:40:04 | Tiberium | ah, force build helped |
21:41:32 | Tiberium | What's the best thing to use to have a key: value variable? tables? |
21:41:44 | Tiberium | size is dynamic |
21:43:09 | FromGitter | <Varriount> Tiberium: What do you mean? |
21:43:36 | Tiberium | Varriount: I mean what's the best container for dynamic key: value variable? |
21:43:44 | Tiberium | Tables? |
21:44:36 | FromGitter | <Varriount> Well, tables are usually the best when you want... A table of values |
21:45:10 | demi- | heh |
21:45:22 | federico3 | how can access a socket's protocol field? It belongs to SocketImpl: https://nim-lang.org/docs/net.html |
21:46:35 | * | Vladar quit (Quit: Leaving) |
21:48:00 | dom96 | You can't. It's not exported. |
21:48:44 | federico3 | I'm confused by repr: it manages to print the field name and value |
21:50:29 | Tiberium | I came up to this (to have query parameters for get request): https://glot.io/snippets/eobwexiin6 |
21:50:50 | Tiberium | yes, url then has additional "&" on the end, but it's fine (all websites understand it) |
21:52:45 | Tiberium | I don't know better way to create a query :) |
21:53:09 | * | Sentreen quit (Ping timeout: 240 seconds) |
21:54:58 | cheatfate | Tiberium, do not forget to url-encode items you added |
21:55:04 | Tiberium | cheatfate, I did |
21:55:20 | Tiberium | cheatfate, cgi.encodeUrl |
21:55:23 | Tiberium | for both key and value |
21:56:28 | cheatfate | Tiberium, yeah i see now, but anyway if you can avoid json package usage - avoid it |
21:56:37 | cheatfate | its too memory angry |
21:56:55 | Tiberium | cheatfate, but httpclient itself uses json, and web api that I'm using uses json too :( |
21:57:24 | Tiberium | ah wait |
21:57:30 | Tiberium | httpclient doesn't |
21:57:31 | Tiberium | how? |
21:57:41 | Tiberium | ah |
21:57:51 | cheatfate | httpclient don't using json |
21:57:58 | Tiberium | it converts json body to string, but I can't do that with query parameters |
21:58:31 | Tiberium | ah, I see, it's somehow implemented in newHttpHeaders |
21:59:11 | Tiberium | openarray[tuple[key: string, val: string]]) it's the trick, wow :) |
21:59:50 | cheatfate | Tiberium, the best way to learn nim is to browsing nim's stdlib and nim's packages... |
22:00:08 | Tiberium | cheatfate, I'm starting to think so |
22:02:33 | * | dddddd joined #nim |
22:02:33 | demi- | some of the API calls in the posix module are less than desirable, was working with `gethostname` earlier today and the usage of that API is pretty gross would PRs to make that less horrible to use be acceptable? |
22:02:42 | * | zachcarter quit (Read error: Connection reset by peer) |
22:03:22 | * | zachcarter joined #nim |
22:04:28 | cheatfate | demi-, posix module is for declarations |
22:04:34 | FromGitter | <Varriount> demi: Sure, although I believe (I may be wrong) that Posix is for low-level API wrapping |
22:04:53 | cheatfate | maybe try to look at getHostAddr |
22:05:22 | cheatfate | oops |
22:05:29 | cheatfate | getAddrInfo |
22:06:14 | cheatfate | nativesockets.getAddrInfo |
22:06:15 | demi- | never-the-less, the interface for `gethostname` is awful, since there isn't a way to allocate a cstring nicely |
22:06:22 | * | Sentreen joined #nim |
22:06:34 | Araq | there is. |
22:06:53 | demi- | oh? i only saw interfaces for cstringArray |
22:06:54 | Araq | var foo = "nim string here"; takesCstring(foo) |
22:07:12 | Araq | the conversion from string to cstring is implicit even. |
22:07:49 | cheatfate | demi-, but you need to remember about internation names and convert it using punycode.nim |
22:07:55 | cheatfate | international |
22:08:00 | Tiberium | how can I set KeyVal* = openarray[tuple[key: string, val: string]] to empty value? |
22:08:47 | demi- | based on the way that `gethostname` works, it modifies the cstring inplace, which casues you to lose whatever was after that to some void? like does that memory get cleaned up automatically or is it leaked? |
22:09:16 | demi- | so you need to pre-allocate the buffer with something like `var foo = " ".repeat(1024)` |
22:09:29 | cheatfate | var foo = newStringOfCap(1024) |
22:12:19 | cheatfate | also gethostname returns up to HOST_NAME_MAX characters |
22:12:21 | FromGitter | <brechtm> Is it possible to forward declare a type? |
22:12:45 | demi- | so if a null character gets inserted into the string somewhere before the last char of the string, what happens to the rest of that string? |
22:13:58 | cheatfate | demi-, what can be happens with block of memory allocated via `malloc()`? |
22:14:05 | cheatfate | nothing |
22:14:42 | cheatfate | nim string can hold 0x00 bytes inside |
22:15:00 | demi- | ok, thanks |
22:15:26 | cheatfate | demi-, but some `echo` will not show it to you... |
22:15:33 | cheatfate | demi-, so you need some better `echo` |
22:15:37 | demi- | yeah |
22:17:28 | dom96 | brechtm: no. Put your types in the same type section |
22:17:31 | Tiberium | KeyVal* = openarray[tuple[key: string, val: string]] var test: KeyVal doesn't work |
22:18:02 | cheatfate | Tiberium, sometimes you need to read the manual too, `openarray` has limits |
22:18:21 | cheatfate | https://nim-lang.org/docs/manual.html#types-open-arrays |
22:18:34 | Tiberium | I just want to have a default value for KeyVal |
22:19:11 | Tiberium | so if user doesn't provide it to my func, it wouldn't do something |
22:19:38 | Tiberium | wait |
22:19:43 | cheatfate | openarrays can be used only as procedure arguments |
22:19:49 | Tiberium | it worked??? |
22:19:58 | Tiberium | proc callMethod* (api: VkApi, methodName: string, params: KeyVal = [], token: string = ""): JsonNode = |
22:20:42 | * | FromGitter quit (Remote host closed the connection) |
22:20:43 | * | BlaXpirit quit (Quit: Bye) |
22:20:58 | * | FromGitter joined #nim |
22:21:32 | * | BlaXpirit joined #nim |
22:29:04 | * | littleli left #nim (#nim) |
22:31:16 | * | vlad1777d quit (Quit: Leaving) |
22:45:27 | * | yglukhov joined #nim |
22:49:28 | * | yglukhov quit (Ping timeout: 240 seconds) |
23:01:03 | * | libman quit (Quit: Connection closed for inactivity) |
23:13:03 | * | Trustable quit (Remote host closed the connection) |
23:27:09 | * | Matthias247 quit (Read error: Connection reset by peer) |
23:39:15 | Tiberium | How can I assing multiple cookies to http request? |
23:39:17 | Tiberium | httpclient |
23:41:14 | * | brson quit (Quit: leaving) |
23:42:02 | * | nsf joined #nim |
23:44:48 | * | hcorion joined #nim |
23:45:27 | dom96 | Set multiple Set-Cookie headers I guess |
23:46:18 | hcorion | Hi All! Does anybody know how I might go about getting the maximum size of an enum? Like for generating a random number to cast to the enum's type |
23:49:13 | FromGitter | <Varriount> hcorion: sizeof? |
23:49:40 | FromGitter | <barcharcraz> Can our enums have holes? |
23:49:48 | FromGitter | <barcharcraz> Also probably high() |
23:49:50 | FromGitter | <Varriount> Although, you probably want high(enumType) instead |
23:51:30 | hcorion | Ah, more like ord high (enumType), cool thanks |
23:54:36 | Tiberium | dom96, doesn't work. I call it like client.headers = newHttpHeaders({"Set-Cookie":"...", "Set-Cookie":"..."}) |
23:54:44 | Tiberium | only last cookie is being processed |
23:55:03 | dom96 | client.headers["Set-Cookie"] = ... |
23:55:08 | dom96 | does setting them like that twice work? |
23:55:38 | dom96 | That is a bug in any case, please report it |