00:00:03 | * | macsek1911[m] quit (Remote host closed the connection) |
00:00:03 | * | zacharycarter[m] quit (Remote host closed the connection) |
00:00:03 | * | xomachine[m] quit (Remote host closed the connection) |
00:00:05 | * | jaens[m] quit (Read error: Connection reset by peer) |
00:00:08 | * | xylef quit (Remote host closed the connection) |
00:00:13 | * | serialdev[m] quit (Remote host closed the connection) |
00:00:15 | * | dyce[m] quit (Remote host closed the connection) |
00:00:23 | * | syntonym[m] quit (Remote host closed the connection) |
00:00:23 | * | ArchieTMichaKrzy quit (Remote host closed the connection) |
00:00:23 | * | codevance[m] quit (Remote host closed the connection) |
00:00:23 | * | TheKing[m] quit (Remote host closed the connection) |
00:00:26 | * | Miguelngel[m] quit (Read error: Connection reset by peer) |
00:00:27 | * | notbot[m] quit (Read error: Connection reset by peer) |
00:00:28 | * | zielmicha[m] quit (Remote host closed the connection) |
00:00:30 | * | TheManiac[m] quit (Read error: Connection reset by peer) |
00:00:31 | * | exothermic[m] quit (Remote host closed the connection) |
00:00:32 | * | MrAxilus[m] quit (Read error: Connection reset by peer) |
00:00:32 | * | yglukhov[m] quit (Read error: Connection reset by peer) |
00:00:32 | * | endes[m] quit (Remote host closed the connection) |
00:00:33 | * | narimiran[m] quit (Read error: Connection reset by peer) |
00:00:34 | * | stisa[m] quit (Read error: Connection reset by peer) |
00:00:34 | * | petersjt014[m] quit (Remote host closed the connection) |
00:00:34 | * | pqflx3[m] quit (Remote host closed the connection) |
00:00:34 | * | blarghz[m] quit (Remote host closed the connection) |
00:00:34 | * | k0mpjut0r quit (Remote host closed the connection) |
00:00:34 | * | Connor[m] quit (Remote host closed the connection) |
00:00:35 | * | sg-james[m] quit (Write error: Connection reset by peer) |
00:00:35 | * | Demos[m] quit (Remote host closed the connection) |
00:00:36 | * | toofly[m] quit (Read error: Connection reset by peer) |
00:00:36 | * | monofuel[m] quit (Read error: Connection reset by peer) |
00:00:36 | * | hohlerde quit (Read error: Connection reset by peer) |
00:00:36 | * | bitstoppa[m] quit (Remote host closed the connection) |
00:00:37 | * | spymasterd[m] quit (Read error: Connection reset by peer) |
00:00:38 | * | planetis[m] quit (Read error: Connection reset by peer) |
00:00:38 | * | sendell[m] quit (Remote host closed the connection) |
00:00:38 | * | gh0st[m] quit (Remote host closed the connection) |
00:00:38 | * | GitterIntegratio quit (Write error: Connection reset by peer) |
00:02:17 | * | eddylu quit (Quit: Page closed) |
00:08:08 | * | dyce[m] joined #nim |
00:20:20 | * | Connor[m] joined #nim |
00:20:20 | * | Demos[m] joined #nim |
00:20:21 | * | xylef joined #nim |
00:20:21 | * | TheKing[m] joined #nim |
00:20:21 | * | ArchieT[m] joined #nim |
00:20:21 | * | codevance[m] joined #nim |
00:20:22 | * | sendell[m] joined #nim |
00:20:22 | * | gh0st[m] joined #nim |
00:20:23 | * | GitterIntegratio joined #nim |
00:20:23 | * | notbot[m] joined #nim |
00:20:23 | * | k0mpjut0r joined #nim |
00:20:23 | * | serialdev[m] joined #nim |
00:20:28 | * | bitstoppa[m] joined #nim |
00:20:28 | * | TheManiac[m] joined #nim |
00:20:28 | * | zacharycarter[m] joined #nim |
00:20:28 | * | spymasterd[m] joined #nim |
00:20:28 | * | blarghz[m] joined #nim |
00:20:29 | * | exothermic[m] joined #nim |
00:20:29 | * | endes[m] joined #nim |
00:20:29 | * | xomachine[m] joined #nim |
00:20:29 | * | jaens[m] joined #nim |
00:20:29 | * | sg-james[m] joined #nim |
00:20:29 | * | narimiran[m] joined #nim |
00:20:29 | * | stisa[m] joined #nim |
00:20:29 | * | yglukhov[m] joined #nim |
00:20:29 | * | hohlerde joined #nim |
00:20:29 | * | zielmicha[m] joined #nim |
00:20:29 | * | toofly[m] joined #nim |
00:20:29 | * | Miguelngel[m] joined #nim |
00:20:29 | * | petersjt014[m] joined #nim |
00:20:30 | * | pqflx3[m] joined #nim |
00:20:30 | * | macsek1911[m] joined #nim |
00:20:30 | * | syntonym[m] joined #nim |
00:20:30 | * | MrAxilus[m] joined #nim |
00:20:31 | * | planetis[m] joined #nim |
00:20:31 | * | monofuel[m] joined #nim |
00:40:03 | * | zachcarter joined #nim |
01:00:03 | * | vlad1777d quit (Ping timeout: 245 seconds) |
01:25:35 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
01:56:44 | * | abm quit (Quit: Leaving) |
02:08:30 | * | krux02 quit (Remote host closed the connection) |
02:31:28 | * | rockcavera is now known as Guest51187 |
02:31:28 | * | tiorock joined #nim |
02:31:28 | * | Guest51187 quit (Killed (cherryh.freenode.net (Nickname regained by services))) |
02:31:28 | * | tiorock is now known as rockcavera |
02:44:52 | * | theelous3_ quit (Ping timeout: 250 seconds) |
03:02:44 | * | kapil____ joined #nim |
03:07:41 | * | banc quit (Quit: ZNC - http://znc.in) |
03:22:17 | * | leorize joined #nim |
03:26:34 | * | banc joined #nim |
03:31:21 | * | mwbrown joined #nim |
03:43:30 | * | dddddd quit (Remote host closed the connection) |
03:53:21 | FromGitter | <seruum> Does anyone know any working examples of starting a process and then sending data into stdin from the calling program? It seems straight forward, but I can't seem to get it to work. It works when using the console, but not when starting it from another process. Thanks |
03:57:20 | leorize | seruum: https://ptpb.pw/03j1/nim |
03:57:29 | leorize | that's the function I use to call dmenu |
03:57:32 | leorize | hope that helps |
04:02:52 | * | zachcarter quit (Ping timeout: 250 seconds) |
04:05:02 | ldlework | leorize: have you seen rofi? |
04:13:42 | xace | leorize: how do you read this like: "result = some string readLine outp" i read it as "result = some(string(readLine(outp)))" |
04:13:54 | leorize | yep, that's how |
04:14:47 | leorize | the command call syntax allows omitting unneeded paren, so I prefer it :) |
04:15:05 | FromGitter | <seruum> @leorize: That worked! I suspect it is because you are using streams vs. pipes. |
04:20:24 | FromGitter | <seruum> Darn. It appears that streams are not available asynchronously. |
04:44:55 | * | leorize quit (Quit: WeeChat 2.2) |
04:45:18 | * | leorize joined #nim |
05:03:43 | * | leorize quit (Quit: WeeChat 2.2) |
05:05:25 | * | leorize joined #nim |
05:08:19 | * | Ven`` joined #nim |
05:23:18 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
05:27:28 | * | nsf joined #nim |
07:06:06 | FromGitter | <gogolxdong> How to take addressing from global variables? |
07:07:02 | FromGitter | <gogolxdong> global constant variables have no address right? only use let or var? |
07:12:33 | * | Vladar joined #nim |
07:46:17 | leorize | `const` are compile-time only, they don't have addresses |
07:50:32 | FromGitter | <gogolxdong> global var or let is unsafe address, and has to be initialized in the scope of proc. |
07:51:27 | * | zakora joined #nim |
07:57:41 | leorize | global `var` can be considered safe I think |
07:57:41 | leorize | they won't go anywhere, and you can modify them |
07:57:41 | leorize | not so much for `let` |
08:37:37 | * | floppydh joined #nim |
08:38:06 | * | vqrs quit (Ping timeout: 276 seconds) |
08:47:53 | * | vqrs joined #nim |
08:52:27 | Araq | unsafeAddr could work on 'const' but I'm not sure |
08:57:16 | * | Vladar quit (Remote host closed the connection) |
09:03:43 | * | zakora quit (Quit: WeeChat 2.2) |
09:06:50 | FromGitter | <alehander42> @mratsim nicely documented, why do you need a JIT (or you're just interestedd) |
09:08:34 | * | zakora joined #nim |
09:17:20 | * | LyndsySimon_ joined #nim |
09:17:50 | * | fowl_ joined #nim |
09:18:01 | * | msmorgan__ joined #nim |
09:18:44 | * | sz0_ joined #nim |
09:23:53 | * | hlt joined #nim |
09:25:12 | * | planetis[m] quit (*.net *.split) |
09:25:13 | * | codevance[m] quit (*.net *.split) |
09:25:13 | * | ArchieT[m] quit (*.net *.split) |
09:25:13 | * | sz0 quit (*.net *.split) |
09:25:13 | * | FromGitter quit (*.net *.split) |
09:25:13 | * | fowl quit (*.net *.split) |
09:25:14 | * | LyndsySimon quit (*.net *.split) |
09:25:14 | * | m712 quit (*.net *.split) |
09:25:14 | * | EastByte quit (*.net *.split) |
09:25:15 | * | msmorgan_ quit (*.net *.split) |
09:25:15 | * | hogeland quit (*.net *.split) |
09:25:15 | * | fowl_ is now known as fowl |
09:25:16 | * | hlt is now known as m712 |
09:25:20 | * | sz0_ is now known as sz0 |
09:25:21 | * | LyndsySimon_ is now known as LyndsySimon |
09:25:39 | * | FromGitter joined #nim |
09:27:52 | * | hogeland joined #nim |
09:31:14 | * | ArchieT[m] joined #nim |
09:32:01 | * | EastByte joined #nim |
09:32:14 | * | codevance[m] joined #nim |
09:32:30 | * | planetis[m] joined #nim |
09:35:36 | * | dddddd joined #nim |
10:07:16 | Araq | anybody around for a language design discussion? |
10:08:38 | FromGitter | <mratsim> @alehander42 interested but I will also probably need it for optimized small matrix multiplication and potentially convolutions. |
10:08:43 | FromGitter | <mratsim> @Araq, available |
10:09:34 | * | abm joined #nim |
10:11:45 | * | ng0 joined #nim |
10:11:46 | FromGitter | <mratsim> However I’d like to introduce a cache for the jit-ted proc but I don’t know what key to use. A string? maybe “instantiationInfo” but that prevents using it at 2 different places? The AST? |
10:14:00 | Araq | you compute a signature from the AST or parts of it |
10:14:02 | FromGitter | <alehander42> Araq, always up for lang discussions (but probably too opionated :D) |
10:14:14 | Araq | everything else will be too slow. |
10:14:46 | Araq | keep in mind that simple codegen is an AST walk, so if you use an AST walk for the "cache" you don't save anything |
10:14:48 | * | vlad1777d joined #nim |
10:14:58 | Araq | now... here is my problem |
10:15:11 | FromGitter | <alehander42> @mratsim ah I see, interestin |
10:16:11 | Araq | the problem is: when does the compiler know type T has an non-default destructor/=/sink? |
10:16:48 | Araq | we don't attach these "type bound operations" to the type syntactically |
10:17:24 | Araq | so potentially the `=destroy` could be declared long after the T was used |
10:18:19 | FromGitter | <alehander42> Nim can't do a prepass for all those declarations because of macros? |
10:18:43 | * | dom96_w joined #nim |
10:18:54 | Araq | yes. |
10:19:44 | Araq | also... even with such a prepass it means these ops need to be in the same module where T is declared in but I think that's ok |
10:20:00 | FromGitter | <alehander42> but what is the exact problem? that macros can define new similar procs? |
10:20:25 | * | Vladar joined #nim |
10:24:25 | FromGitter | <alehander42> you can just forbid this for such "type-bound" procs ⏎ or you can require `{.macroTypeBound: A.}` for the definition, and invoke the macro somehow immediately after type sections(probably impossible?) |
10:26:35 | Araq | well we don't have such a prepass yet and it's much work, so I thought about introducing the notion of an "extended type section" that would end with the first proc `=` declaration |
10:27:14 | Araq | proc =destroy needs to come first, then potentially =sink and then '=' |
10:29:38 | Araq | but then Nim encourages types sections to to declare multiple types at once so the *first* proc `=` declaration cannot end an "extended type section" |
10:30:59 | FromGitter | <alehander42> so it woyuld be like |
10:31:41 | FromGitter | <alehander42> type A = .. B = .. ⏎ ⏎ #default indent, not inside type section, but after it ⏎ ⏎ proc =sink ... [https://gitter.im/nim-lang/Nim?at=5bfbcb8dcfa682348d87ac6d] |
10:32:20 | FromGitter | <mratsim> I think that’s reasonable to declare the sink, assignment and destroy proc in the same file as the type section |
10:32:50 | Araq | mratsim: thanks, and as I said, there is no way around this restriction. |
10:33:04 | FromGitter | <mratsim> in C++ you have to do the same anyway |
10:33:37 | FromGitter | <mratsim> now it would be nice to be able to declare all the types then all the destroys. |
10:33:53 | FromGitter | <alehander42> I think if proc-s have to be a part of a type section, it's more obvious if they are in the same block |
10:33:56 | FromGitter | <mratsim> instead of having to interleave |
10:34:47 | FromGitter | <mratsim> oh right it would be OK if you could have “proc” in type, (and maybe base methods) but that might complicate the parser. |
10:35:20 | Araq | the parser would be fine, but we don't want yet-another way to write Nim code |
10:35:23 | FromGitter | <alehander42> e.g. something like type section macros can be applied here too: giving the syntax to "connect" the procs with the definition, ⏎ +: extensible mechanism, no special = rule, ⏎ -: probably complicated |
10:46:29 | Araq | what are type section macros again? |
10:51:25 | FromGitter | <yglukhov> Araq: methods are the same question, aren't they? and with those you can't get away with "reasonable to be defined in the same file" :) |
10:57:08 | Araq | methods are not lifted, different problem. |
10:58:03 | Araq | by "lift" I mean "automatically constructed for all the object's fields and arrays yada yada" |
10:59:13 | FromGitter | <yglukhov> well one crazy way to think about it is: assume that everything has a "user-defined" =, =destroy. generate missing impls at the end of the build. =) |
11:00:31 | FromGitter | <yglukhov> it sounds crazy if done naively. but maybe there's some clever optimization possible :) |
11:01:45 | * | kapil____ quit (Quit: Connection closed for inactivity) |
11:03:20 | Araq | hmmm |
11:08:07 | FromGitter | <alehander42> Araq, type section macros just let you define a custom macro which expands one of its results in the type section and the other one right after it https://github.com/nim-lang/Nim/issues/9139 |
11:10:09 | FromGitter | <alehander42> (my original motivation was e.g. defining variant types and different constructors / helpers for them without an additional macro invocation) |
11:10:57 | Araq | alehander42: ok but this would just be a syntax variant of "write the type bound ops in the object declaration" |
11:13:11 | FromGitter | <alehander42> yeah, you're right. but on the other hand you have "ok, these proc-s don't look like they are directly connected to the type section, but you have to remember a special rule, that they *must* be right after it" |
11:13:51 | * | dom96_w quit (Changing host) |
11:13:51 | * | dom96_w joined #nim |
11:14:22 | FromGitter | <alehander42> which is probably fine, if the compiler helps with a good error message |
11:16:12 | * | Notkea joined #nim |
11:17:09 | FromGitter | <xmonader> anyone uses jwt with nim? specially against es384? |
11:27:13 | FromGitter | <yglukhov> @alehander42 i've been using nim-jwt for google play, dunno if that's es384. |
11:31:18 | * | kapil____ joined #nim |
11:34:27 | FromGitter | <xmonader> @yglukhov Ah I'm trying your library! great job |
11:39:51 | FromGitter | <mratsim> @Araq, do you perhaps already have an AST hasher that can be used with Tables? |
11:41:13 | * | Yardanico quit (Quit: No Ping reply in 180 seconds.) |
11:41:24 | * | Lord_Nightmare quit (Quit: ZNC - http://znc.in) |
11:41:50 | Araq | mratsim: there is compiler/sighashes.nim for proc prototypes and types in general |
11:42:08 | FromGitter | <mratsim> ah, I was looking into astalgo |
11:42:18 | FromGitter | <mratsim> seems like there is a lot of YAML stuff in there as well |
11:42:32 | * | Yardanico joined #nim |
11:43:22 | Araq | there is also compiler/treetab.nim, hardly used |
11:43:30 | FromGitter | <xmonader> @yglukhov I found a quick fix for the es384 issue i'll send u a PR |
11:45:04 | * | Lord_Nightmare joined #nim |
11:47:47 | * | NimBot joined #nim |
11:48:22 | FromGitter | <mratsim> the treetab.hashTree is similar to SigHashes.hashTree, just using “Hash” instead of MD5 which is a better fit for Nim tables |
11:49:25 | FromGitter | <mratsim> My only grip is that “a + b” will have a different hash than “c + d” but I cn probably hash the types of symbols instead of plain idents. |
11:50:19 | FromGitter | <mratsim> Now I’m not too sure how compile-time JIT cache works with run-time code genertion :P |
11:51:15 | * | PMunch joined #nim |
11:51:34 | FromGitter | <mratsim> I will probably generate `var foo {.global.} = mycodegen()` |
11:52:59 | FromGitter | <mratsim> and the foo identifier is taken from a compile-time table that depends on the AST of the generator. |
11:54:02 | leorize | Araq: https://github.com/nim-lang/Nim/pull/9797 <-- all tests passed :) |
12:02:55 | Araq | wow what a nice clean patch that is now... |
12:03:04 | FromGitter | <yglukhov> @xmonader sure, go ahead |
12:03:26 | Araq | leorize: any opinion on the =destroy declaration order design? |
12:03:43 | Araq | it's what blocks most progress wrt destructors etc |
12:04:07 | * | Vladar quit (Remote host closed the connection) |
12:15:50 | leorize | it's all fine as long as I don't have to write additional decls/pragmas in the type section |
12:17:20 | * | floppydh quit (Quit: WeeChat 2.3) |
12:17:59 | FromGitter | <yglukhov> Araq: is it currently limited to anywhere in the file where the type is defined? |
12:20:30 | * | floppydh joined #nim |
12:22:19 | * | theelous3_ joined #nim |
12:34:47 | Araq | currently it's just broken |
12:42:18 | FromGitter | <cooldome> IMO, type bound operations should be defined with a type. Possibly in the object itself. |
12:42:57 | FromGitter | <cooldome> Not sure how easy or difficult it is. |
12:43:51 | FromGitter | <yglukhov> @cooldome how would that look like? |
12:46:10 | FromGitter | <yglukhov> Araq: do you intend to allow those anywhere in the file where the type is defined? |
12:46:10 | * | Notkea quit (Read error: Connection reset by peer) |
12:46:23 | * | Notkea joined #nim |
12:46:51 | FromGitter | <yglukhov> Can't think of a case where this wouldn't be enough. |
12:50:14 | FromGitter | <cooldome> Next to declarations of object fields, type bound operations should be implemented. Needs some parser/semantic work of course. I am thinking out loud, I don't know how much work it is. but sounds like right approach. |
12:50:18 | * | zachcarter joined #nim |
12:54:23 | * | zakora quit (Quit: WeeChat 2.2) |
12:58:17 | * | Perkol joined #nim |
12:59:26 | Perkol | If I compile program with re module, will PCRE be linked statically or dynamically? |
13:00:34 | FromGitter | <xmonader> @yglukhov can you check https://github.com/yglukhov/nim-jwt/pull/1 |
13:00:53 | * | nif quit (Ping timeout: 245 seconds) |
13:01:02 | * | nif joined #nim |
13:01:43 | FromGitter | <xmonader> @perkol it'll use dlopen `i believe` if you want to statically build against re use this https://github.com/kaushalmodi/hello_musl |
13:02:55 | * | sknebel quit (Remote host closed the connection) |
13:03:25 | * | sknebel joined #nim |
13:15:28 | Perkol | I'm building on win |
13:18:12 | Araq | cooldome: the parser extension would be pretty trivial |
13:19:16 | * | zachcarter quit (Ping timeout: 250 seconds) |
13:21:35 | Araq | but then we get into C++ "2 different decls" hell |
13:22:05 | Araq | in the object we would have proc `=destroy`(self: var T) |
13:22:34 | Araq | and then in the module body the same with a '= body' part. |
13:23:05 | Araq | we cannot have the boy part within the object because then type bound ops cannot use helper procs and templates |
13:23:16 | Araq | *the body part |
13:25:20 | * | Perkol quit (Ping timeout: 250 seconds) |
13:28:01 | * | Perkol joined #nim |
13:29:23 | Araq | and tbh, declareAssignments(T) is an obvious candidate for a macro |
13:29:46 | Araq | it would suck if the language couldn't do this. |
13:31:06 | Araq | these sinks, assignments and destructors are easily generated, they all follow a common pattern |
13:34:28 | dom96_w | I don't think placing procs inside a type section would be a good idea (that's what the suggestion is right?) |
13:37:33 | Perkol | In nim/bin folder there is pcre.dll, pcre3.dll and pcre32.dll what's the difference? |
13:41:52 | Araq | dom96_w: right |
13:46:27 | * | xace quit (Ping timeout: 252 seconds) |
13:53:19 | * | Perkol quit (Remote host closed the connection) |
13:54:16 | FromGitter | <narimiran> @Perkol, differences are 2 and 29, respectively |
13:54:47 | FromGitter | <narimiran> (hopefully, one day i'll be able to resist such answers. sorry) |
13:57:00 | * | xace joined #nim |
13:57:37 | Notkea | hi, what's the cost/complexity of a slicing operation on a seq? |
13:57:42 | FromGitter | <alehander42> they are all prime numbers :O |
13:58:10 | FromGitter | <narimiran> eeerrmm, 32 is prime number? |
13:58:11 | PMunch | Notkea, pretty much the same as a memcpy IIRC |
13:58:42 | PMunch | Or does Nim have some special handling for seq slicing into non-mutable values? |
13:59:35 | FromGitter | <narimiran> hey PMunch, did you submit your lightning talk for fosdem? |
14:00:27 | PMunch | Yeah, but I think I might've messed it up slightly |
14:01:05 | PMunch | There was a short and a long description field, and I filled in the first but not the second (was planning on filling it out later). But never got time to fill it out. Not sure if that was required for lightning talks though.. |
14:03:15 | Araq | Notkea: it copies unless you use the newer toOpenArray() |
14:06:17 | Notkea | does it give a view of the original seq? |
14:06:59 | Notkea | (found this https://github.com/nim-lang/Nim/issues/5753) |
14:13:41 | Araq | toOpenArray does, yes |
14:14:38 | Notkea | thanks |
14:19:07 | FromGitter | <Lite5h4dow> any chance there is a ternary operator in nim? |
14:20:23 | FromGitter | <narimiran> @Lite5h4dow you can do `let a = if b > 5: "big" else: "small"` |
14:23:12 | FromGitter | <Lite5h4dow> ok |
14:23:40 | FromGitter | <Lite5h4dow> looks clean enough fro me |
14:24:42 | FromGitter | <narimiran> it can also be multiline, if that's cleaner in your case |
14:30:29 | FromGitter | <Lite5h4dow> less lines & easy to read = clean |
14:46:34 | * | PMunch quit (Remote host closed the connection) |
14:58:50 | FromGitter | <mratsim> the ternary generated in Nim C code are anything but clean :P |
15:01:36 | * | ng0 quit (Remote host closed the connection) |
15:02:41 | * | ng0 joined #nim |
15:03:52 | * | vlad1777d quit (Ping timeout: 268 seconds) |
15:31:44 | * | kapil____ quit (Quit: Connection closed for inactivity) |
15:34:23 | * | krux02 joined #nim |
15:35:15 | * | stefanos82 joined #nim |
15:47:45 | * | Ven`` joined #nim |
15:48:12 | * | Ven`` quit (Read error: Connection reset by peer) |
15:48:29 | * | Ven`` joined #nim |
15:54:09 | * | narimiran joined #nim |
15:55:40 | * | zakora joined #nim |
16:03:43 | * | vlad1777d joined #nim |
16:07:03 | * | Trustable joined #nim |
16:28:38 | * | Ven`` quit (Ping timeout: 250 seconds) |
16:42:40 | * | Ven`` joined #nim |
16:46:40 | * | dom96_w quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
16:50:42 | * | druonysus joined #nim |
17:04:26 | * | zakora quit (Quit: WeeChat 2.2) |
17:05:25 | * | dom96_w joined #nim |
17:08:35 | * | dom96_w quit (Changing host) |
17:08:35 | * | dom96_w joined #nim |
17:12:02 | * | kapil____ joined #nim |
17:12:47 | * | Ven`` quit (Ping timeout: 240 seconds) |
17:18:47 | * | Vladar joined #nim |
17:20:33 | * | Ven`` joined #nim |
17:25:56 | * | floppydh quit (Quit: WeeChat 2.3) |
17:35:21 | * | nsf quit (Quit: WeeChat 2.3) |
17:39:42 | FromGitter | <iffy> Can I call `NimMain` multiple times? Or should I be careful and only call it once? |
17:47:55 | bozaloshtsh | does anyone use emacs with nim-mode and full nimsuggest/etc support? |
17:48:15 | bozaloshtsh | I tried some time ago and it would randomly freeze all the time, wondering if it's gotten better now. |
17:55:55 | Araq | bozaloshtsh: ask krux02 |
17:58:38 | krux02 | bozaloshtsh, I use emacs, but I am sorry to tell you, nimsuggest is unusable, I have the same amount of freezes. |
17:58:51 | krux02 | I eventually turned nimsuggest off. |
18:00:15 | krux02 | bozaloshtsh, here is the issue: https://github.com/nim-lang/nim-mode/issues/159 |
18:00:40 | krux02 | pleas post that it is still unusable. Maybe yuutayamade will fix it. But I honestly doubt it. |
18:01:05 | krux02 | I also tried to fix the nimsuggest integration, but the code is too complex for me to just fix it. |
18:01:16 | krux02 | it uses too many features of the language at once |
18:06:10 | * | craigger quit (Quit: bye) |
18:06:19 | krux02 | I just checked out latest activity in nim-mode. It seems there was some activity. |
18:06:22 | * | craigger joined #nim |
18:06:25 | krux02 | Maybe it is worth checking it out again. |
18:06:53 | krux02 | my issue about a frozen emacs was closed, but I doubt that it was fixed properly. |
18:07:30 | * | jjido joined #nim |
18:11:52 | * | dom96_w quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:15:39 | * | Ven`` quit (Ping timeout: 268 seconds) |
18:21:14 | * | Ven`` joined #nim |
18:26:45 | * | Ven`` quit (Ping timeout: 268 seconds) |
18:32:43 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
18:34:51 | * | leorize quit (Quit: WeeChat 2.2) |
18:35:10 | * | leorize joined #nim |
18:36:19 | * | ng0 joined #nim |
18:37:38 | * | Trustable quit (Remote host closed the connection) |
18:40:49 | * | PMunch joined #nim |
19:14:13 | * | zachk joined #nim |
19:15:29 | * | zachk quit (Changing host) |
19:15:29 | * | zachk joined #nim |
19:17:48 | FromGitter | <Lite5h4dow> how does one have a listener in thier program. i want to be listening for a command while the program if functioning |
19:17:52 | FromGitter | <Lite5h4dow> how do you do that? |
19:18:22 | FromGitter | <Lite5h4dow> if i understand correctly i need to use a thread? but im not sure |
19:18:40 | Araq | that's what I would use |
19:19:46 | FromGitter | <Lite5h4dow> alright thanks araq <3 |
19:20:48 | FromGitter | <Lite5h4dow> do you guys know of an alternative to sleep? |
19:21:02 | Xe | please see a doctor |
19:21:09 | FromGitter | <Lite5h4dow> xD |
19:21:09 | Xe | </s> |
19:21:13 | FromGitter | <Lite5h4dow> no i meant in nim |
19:21:29 | FromGitter | <Lite5h4dow> you got me |
19:21:33 | FromGitter | <Lite5h4dow> > .< |
19:22:31 | FromGitter | <Lite5h4dow> i want the program to be able to respond between intervals |
19:23:16 | FromGitter | <Lite5h4dow> however by default it has nothing to do, except wait for a time interval |
19:23:26 | FromGitter | <Lite5h4dow> at which point it does something |
19:23:43 | FromGitter | <Lite5h4dow> but with this new function im adding i need it to be able to do things between these periods |
19:23:48 | FromGitter | <zetashift> https://nim-lang.org/docs/os.html#sleep%2Cint or asyncSleep? |
19:23:57 | FromGitter | <zetashift> should be enough no? |
19:24:28 | FromGitter | <Lite5h4dow> asyncSleep? |
19:25:10 | FromGitter | <Lite5h4dow> i want it to be able to do something between intervals |
19:25:32 | FromGitter | <Lite5h4dow> dosent sleep literally stop the program for a certain period of time |
19:25:33 | FromGitter | <Lite5h4dow> ? |
19:26:54 | FromGitter | <zetashift> https://nim-lang.org/docs/asyncdispatch.html#sleepAsync%2C |
19:27:10 | FromGitter | <zetashift> sleepAsync* sorry I should go to sleep (ha) |
19:27:19 | FromGitter | <Lite5h4dow> xD |
19:27:58 | FromGitter | <Lite5h4dow> 10/10 ign |
19:28:06 | FromGitter | <Lite5h4dow> ill give it a try |
19:28:08 | FromGitter | <zetashift> no for real tho, good night y'all |
19:28:16 | FromGitter | <Lite5h4dow> night @zetashift |
19:56:48 | FromGitter | <matrixbot> `rad_wagon` Hey all! I'm just starting to learn nim and I'm having a bit of confusion with the compiler error `template/generice instantiation from here` What does that mean, exactly ? ⏎ ⏎ Here is a pastebin of my code, it is happening on lines 14 and 16: https://pastebin.com/SSBQXyxZ |
19:57:37 | FromGitter | <mratsim> it helps you follow the template/generic proc that ended up triggering your compilation error |
19:58:51 | FromGitter | <mratsim> btw this is wrong: let ignored: seq = toSeq(lines(f)), seq is not a concrete type |
19:59:25 | FromGitter | <matrixbot> `rad_wagon` Ah, ok. I thought seq was just a way to make an iterable an array |
19:59:34 | FromGitter | <mratsim> it should be either `let ignored = toSeq(lines(f))` or `let ignored: seq[string] = toSeq(lines(f))` |
19:59:55 | FromGitter | <mratsim> it’s only concrete when it’s a seq of something |
20:00:55 | FromGitter | <mratsim> non-concrete types can only exist while in the compiler but you cannot assign them (i.e. store them in CPU memory) |
20:01:39 | FromGitter | <mratsim> i.e. let a: seq = foo(), you don’t know if it’s a seq of int, float, string, etc |
20:05:22 | FromGitter | <matrixbot> `rad_wagon` Works perfectly now. Thanks for the clarification! |
20:06:33 | FromGitter | <Lite5h4dow> the documentation in the nim site for asynchdispatch is going over my head |
20:18:13 | narimiran | https://nim-lang.org/blog/2018/11/26/advent-of-nim.html |
20:18:58 | narimiran | it doesn't matter if you're just starting with nim or if you're experienced — AoC is great fun for everybody! |
20:22:49 | * | nsf joined #nim |
20:34:19 | * | Vladar quit (Remote host closed the connection) |
20:34:26 | FromGitter | <Lite5h4dow> is anyone free to explain how i would use a thread? |
20:34:41 | * | jjido quit (Quit: going, gone.) |
20:36:10 | FromGitter | <Lite5h4dow> i dont understand it. im so used to doing one thing at a time that im starting to get confused |
20:42:11 | FromDiscord_ | <treeform> Here dom96, says that httpclient does not support pipelining but supports persistent connections: https://github.com/nim-lang/Nim/issues/7413#issuecomment-376197554 |
20:42:25 | FromDiscord_ | <treeform> Does any one have an example on how to make persistent connections work? |
20:44:02 | dom96 | Have you tried just reading from the body future stream forever? |
20:49:18 | FromDiscord_ | <treeform> How do I send it new requests? I don't really care about the output, only sending it requests which are log lines. |
20:50:01 | FromDiscord_ | <treeform> I am trying to integrate https://logdna.com/ |
20:53:52 | dom96 | oh, you just call one of the `request` procs on the same HttpClient instance. |
20:54:29 | FromDiscord_ | <treeform> but I have to make sure the old request has finished? |
20:54:45 | FromDiscord_ | <treeform> And send the keep-alive header myself? |
20:56:29 | dom96 | keep-alive is on by default for http/1.1 IIRC |
20:56:52 | dom96 | as for your first question: yes, that might be the case, but if so that's a bug (might already be reported) |
21:02:48 | * | nsf quit (Quit: WeeChat 2.3) |
21:27:34 | * | narimiran quit (Remote host closed the connection) |
21:30:13 | * | Trustable joined #nim |
21:30:32 | * | Trustable quit (Remote host closed the connection) |
22:28:41 | * | stefanos82 quit (Quit: Quitting for now...) |
22:41:43 | * | kapil____ quit (Quit: Connection closed for inactivity) |
22:42:39 | * | jjido joined #nim |
22:54:15 | * | jjido_ joined #nim |
22:55:15 | * | jjido quit (Read error: No route to host) |
22:57:08 | * | sz0 quit (Quit: Connection closed for inactivity) |
22:57:36 | FromGitter | <zacharycarter> @Lite5h4dow - parallelism is complex |
22:57:59 | FromGitter | <zacharycarter> i'm a n00b |
23:01:19 | FromGitter | <zacharycarter> but - http://web.mit.edu/6.005/www/fa15/classes/19-concurrency/ - I found useful |
23:02:13 | FromGitter | <zacharycarter> should read up to chapter 23 |
23:04:05 | FromGitter | <zacharycarter> then get into nim specifics imo |
23:04:50 | FromGitter | <mratsim> What are nnkHiddenStdConv, I get a lot of those when parsing typed statements. |
23:14:54 | * | jjido_ quit (Ping timeout: 246 seconds) |
23:17:21 | * | jjido joined #nim |
23:30:29 | * | vlad1777d quit (Remote host closed the connection) |
23:31:58 | * | theelous3_ quit (Ping timeout: 272 seconds) |
23:32:30 | * | vlad1777d joined #nim |