00:01:53 | * | dktb36 joined #nim |
00:02:25 | * | dktb36 left #nim (#nim) |
00:02:29 | * | dktb36 joined #nim |
00:08:19 | * | dktb36 quit (Quit: Page closed) |
00:14:16 | * | stefanos82 quit (Quit: Quitting for now...) |
00:14:30 | FromGitter | <kayabaNerve> krux02: Selling of MC never really settled really ⏎ ⏎ HTC VIVE FTW |
00:14:45 | FromGitter | <kayabaNerve> BTW, I like := |
00:15:21 | FromGitter | <kayabaNerve> It's explicit, doesn't interfere with anything, have an accidental way to be enabled... I don't get why it's so hated. Feel free to fill me in though |
00:35:28 | * | leorize quit (Ping timeout: 256 seconds) |
00:44:45 | * | thomasross joined #nim |
01:15:59 | * | BitPuffin quit (Remote host closed the connection) |
01:24:25 | * | find0x90 joined #nim |
01:42:27 | * | jamesroseman joined #nim |
01:47:47 | * | leorize joined #nim |
01:55:29 | * | leorize quit (Ping timeout: 260 seconds) |
01:57:12 | * | endragor joined #nim |
02:01:52 | * | find0x90 quit (Quit: find0x90) |
02:05:59 | * | find0x90 joined #nim |
02:07:38 | * | find0x90 quit (Client Quit) |
02:40:45 | * | vivus quit (Quit: Leaving) |
03:09:21 | * | dddddd quit (Remote host closed the connection) |
03:12:10 | FromDiscord | <2vg> Is it impossible for Nim's current GC to implement a lock free queue? |
03:12:10 | FromDiscord | <2vg> Have anyone implemented it? |
03:24:57 | cornfeedhobo | i am just getting started, so pardon the silly question, but what does the asterisk signify when defining an object? e.g. Foobar* = object |
03:29:00 | cornfeedhobo | does it mean every attribute in the object is exported? |
03:29:32 | FromGitter | <Quelklef> My understanding is that I means that the object itself is exported |
03:29:38 | FromGitter | <Quelklef> field are also exported via `*` |
03:29:53 | FromGitter | <Quelklef> ```type MyObj* = object ⏎ exported*: int ⏎ hidden: int``` [https://gitter.im/nim-lang/Nim?at=5b4c113195e03e3d7b511bf5] |
03:43:07 | FromGitter | <Varriount> 2vg: Do you mean, does the GC use a lock-free queue, or can it support the use of a lock-free queue |
03:44:52 | * | benjikun joined #nim |
03:45:23 | benjikun | https://stackoverflow.com/questions/51354244/using-the-standard-module-parsexml-how-do-i-parse-xml-through-a-plain-strings |
03:45:26 | benjikun | can anyone help me with this? |
03:45:29 | benjikun | newbie |
03:51:22 | * | leorize joined #nim |
03:59:40 | * | rockcavera joined #nim |
04:00:49 | CodeVance | I need to convert a cstring to a array of cuchar |
04:01:53 | CodeVance | kayabaNerve nimble install nimspice XP |
04:02:06 | CodeVance | @kayabaNerve |
04:21:46 | FromDiscord | <2vg> Varriount: can it support the use of a lock-free queue. |
04:21:47 | FromDiscord | <2vg> for example, msqueue |
04:35:30 | * | xylef joined #nim |
04:45:01 | FromGitter | <kayabaNerve> CodeVance: What's up with the ping? |
04:45:23 | CodeVance | you said you like := |
04:46:02 | FromGitter | <kayabaNerve> Yeah. In Python. Do you also offer `while line := file.readLine():`? |
04:46:22 | FromGitter | <kayabaNerve> I've heard of nimspice. Macros to improve the language, right? Just like spice? |
04:46:38 | FromGitter | <kayabaNerve> And cstring to array of cuchar? Can't you cast the addr of string[0] |
04:46:38 | CodeVance | like sugar |
04:46:41 | CodeVance | spice |
04:47:34 | CodeVance | I'm not really familar with C but I'm guessing |
04:48:07 | CodeVance | I'm trying to convert a font through using freetype and freeimage into a bitmap |
04:48:17 | CodeVance | I still have a lot to learn :( |
04:49:00 | * | xylef quit (Quit: WeeChat 2.2) |
04:49:20 | * | donlzx quit (Remote host closed the connection) |
04:49:43 | FromGitter | <kayabaNerve> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b4c23e7c02eb83d7c7aae47] |
04:49:54 | FromGitter | <kayabaNerve> You do have to use ptr array but that compiles and prints e |
04:51:59 | CodeVance | The other thing is I can't cast it to a bound array |
04:52:06 | CodeVance | I don't know the length beforehand |
04:52:39 | FromGitter | <kayabaNerve> array[0 |
04:53:21 | FromGitter | <kayabaNerve> https://github.com/kayabaNerve/Ember/blob/master/src/Wallet/PrivateKey.nim#L24 |
04:53:24 | * | Lord_Nightmare quit (Ping timeout: 260 seconds) |
04:53:51 | FromGitter | <kayabaNerve> https://github.com/kayabaNerve/Ember/blob/master/src/lib/RNG.nim#L5 |
04:54:08 | FromGitter | <kayabaNerve> I mean, it's not memory safe... Maybe use a seq? |
04:54:20 | FromGitter | <CodeDoes> I don't care for memory safety |
04:54:25 | FromGitter | <kayabaNerve> DUN DUN DUN |
04:54:31 | FromGitter | <CodeDoes> What is memory safety? |
04:54:36 | FromGitter | <CodeDoes> Its a small program |
04:54:43 | FromGitter | <CodeDoes> It shouldn't have to matter |
04:55:57 | FromGitter | <CodeDoes> Thanks btw |
04:56:53 | * | donlzx joined #nim |
05:00:14 | * | Lord_Nightmare joined #nim |
05:01:57 | * | jamesroseman quit (Ping timeout: 240 seconds) |
05:11:27 | * | brainproxy quit (Ping timeout: 240 seconds) |
05:22:08 | * | nsf joined #nim |
05:22:08 | * | brainproxy joined #nim |
05:33:37 | * | jamesroseman joined #nim |
05:38:38 | * | jamesroseman quit (Ping timeout: 244 seconds) |
05:40:01 | * | xylef joined #nim |
06:21:26 | FromGitter | <alehander42> ah raww pointers :D |
06:21:41 | FromGitter | <kayabaNerve> @alehander42 so cute, right? |
06:21:49 | FromGitter | <kayabaNerve> Mine just threw a segfault! |
06:21:56 | FromGitter | <kayabaNerve> I hear it's normal at his age though |
06:31:41 | * | def- quit (Quit: -) |
06:33:08 | * | def- joined #nim |
07:12:40 | * | Vladar joined #nim |
07:21:46 | * | jamesroseman joined #nim |
07:26:35 | * | jamesroseman quit (Ping timeout: 240 seconds) |
07:34:30 | * | Amun_Ra quit (Quit: brb) |
07:36:09 | * | Amun_Ra joined #nim |
07:55:58 | * | PMunch joined #nim |
08:04:32 | * | ftsf joined #nim |
08:04:42 | * | ftsf quit (Client Quit) |
08:39:53 | * | ng0 joined #nim |
09:01:12 | * | jamesroseman joined #nim |
09:06:32 | * | jamesroseman quit (Ping timeout: 268 seconds) |
09:11:31 | * | Vladar quit (Quit: Leaving) |
09:17:42 | * | brainproxy quit (Read error: Connection reset by peer) |
09:19:21 | * | brainproxy joined #nim |
09:20:58 | FromGitter | <mratsim> @tim-st regarding your question for this https://github.com/status-im/nim-rocksdb/blob/840d470eb9f0bd8115d26ee66017d4bc20197c7e/rocksdb.nim#L138, I’m not sure, it suppose it depends if addr emptyString[0] now returns nil or not |
09:23:03 | FromGitter | <mratsim> @kaushalmodi for https://github.com/FedeOmoto/bignum I think the dev only passed c2nim on GMP include file. Alternatively you can use this: https://github.com/status-im/nim-decimal |
09:27:22 | FromGitter | <tim-st> @mratsim ok, I think line138 works, but not line122 |
09:39:33 | PMunch | Is there a way to accept from 0..3 varargs but not more, with a compile-time check? |
09:44:48 | FromGitter | <tim-st> when you want a compileTime check I assume your varargs[T] can be static[varargs[T]] and then do a len check |
09:44:59 | FromGitter | <tim-st> with `when` |
09:48:23 | * | krux02 joined #nim |
09:52:16 | FromGitter | <tim-st> proc test(v: static[varargs[int]]) = ⏎ when v.len > 3: ⏎ ⏎ ```{.fatal: "v.len > 3".}``` ⏎ ... [https://gitter.im/nim-lang/Nim?at=5b4c6ad0866e0c6b15b05f0b] |
09:53:00 | PMunch | Well, I don't really need the information in it to be static |
09:53:07 | PMunch | Only the count |
09:55:58 | FromGitter | <tim-st> Seems that varargs[T] cannot be static without `[t1, t2,...]` is it a bug? |
09:58:36 | FromGitter | <tim-st> yes: https://github.com/nim-lang/Nim/issues/1083 |
10:00:59 | FromGitter | <mratsim> @PMunch: static: assert args.len > 3 or args.arity? |
10:02:29 | FromGitter | <tim-st> isnt `assert` checked at runtime? |
10:02:41 | FromGitter | <tim-st> yes, just tested t |
10:02:43 | FromGitter | <tim-st> *it |
10:03:19 | FromGitter | <tim-st> ah together with static it works |
10:03:24 | FromGitter | <tim-st> good to know :) |
10:04:50 | PMunch | mratsim, oh nice. Thanks |
10:05:50 | PMunch | Hmm, I get I "Can't evaluate on compile-time" error |
10:07:15 | FromGitter | <mratsim> mmm, seems like arity doesn’t exist for varargs |
10:07:40 | FromGitter | <mratsim> and static requires everythign to be known at compile-time |
10:08:20 | FromGitter | <mratsim> also since varargs can also match seq, arity is not always known at compile-time |
10:10:32 | FromGitter | <mratsim> @PMunch you wrap that in a macro that accepts varargs\[untyped\] and do the count within the macro |
10:12:22 | PMunch | Yeah that's what I was thinking as well |
10:12:33 | PMunch | I was just wondering if there was a built in way |
10:12:59 | FromGitter | <mratsim> —> Feature request ;) I would find that useful as well |
10:14:57 | * | xylef quit (Ping timeout: 240 seconds) |
10:17:14 | FromGitter | <tim-st> isnt static[varargs[T]] exactly the same as static[openArray[T]] ? |
10:17:37 | FromGitter | <mratsim> no, varargs can match foo(1, 2, 3, 4) |
10:17:43 | FromGitter | <tim-st> besides the way you call it |
10:17:55 | FromGitter | <tim-st> the docs say it's internally translated to an array |
10:17:56 | FromGitter | <Varriount> Also, varargs allows conversion procedures |
10:18:42 | FromGitter | <mratsim> yes AST wise it’s transformed into an array, or a pointer (if input was a seq) |
10:19:07 | krux02 | I recommend to use openArray entirely, no varargs. |
10:19:12 | FromGitter | <tim-st> so if calling it like an array is ok `static[openArray[T]]` already works together with static assert |
10:19:33 | krux02 | with openarray the conversion to an array is more visible |
10:19:42 | FromGitter | <tim-st> yes, think so too |
10:19:48 | krux02 | the the syntax overhead is minimal |
10:20:44 | krux02 | also, with openArray it is obvious how to pass a seq/array |
10:24:22 | krux02 | Araq: can you merge gdb pretty printers now? https://github.com/nim-lang/Nim/pull/8263 |
10:24:24 | * | BitPuffin joined #nim |
10:24:44 | krux02 | I would like the have the gdb start script available on my other development branches as well. |
10:28:05 | * | stefanos82 joined #nim |
10:44:03 | * | xet7 joined #nim |
10:49:21 | * | jamesroseman joined #nim |
10:53:57 | * | jamesroseman quit (Ping timeout: 240 seconds) |
10:57:00 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
10:59:46 | * | xylef joined #nim |
11:04:15 | * | dddddd joined #nim |
11:05:17 | FromGitter | <Varriount> krux02: Nice work on the GDB stuff! Any other improvements in the works? |
11:14:09 | Araq | krux02: why would I merge it? you didn't fix what I remarked |
11:19:33 | stefanos82 | Araq, out of curiosity: has anyone ever tested the generated code with a fuzzer to check how secured it is? |
11:20:59 | Araq | not sure what that means. |
11:21:15 | * | nsf quit (Quit: WeeChat 2.1) |
11:22:23 | stefanos82 | Araq: to check the security of the C or C++ code Nim generates. |
11:22:31 | stefanos82 | for instance, with this program http://lcamtuf.coredump.cx/afl/ |
11:25:47 | * | jamesroseman joined #nim |
11:28:28 | krux02 | Araq: That is interesting I was sure I did make the change, but probably the push failed or something |
11:30:30 | krux02 | Araq: one question to NI |
11:30:35 | * | jamesroseman quit (Ping timeout: 240 seconds) |
11:31:52 | krux02 | yes NI is probably what long is in C |
11:32:04 | krux02 | but int is still the name it is referred to in nim |
11:32:35 | krux02 | I think the closed C type would be intptr_t but that is from stdint.h and it is optionally defined |
11:36:06 | Araq | ah so there are Nim names |
11:36:14 | Araq | maybe the code should say that then |
11:36:19 | Araq | *these are |
11:38:33 | krux02 | Araq you have a point though. When I just say "this is an int" it might be confusing |
11:38:40 | krux02 | because the type mapping isn't complete |
11:38:49 | krux02 | many types are mapped, many are not |
11:39:06 | krux02 | so it is always a mix of nim names and generated names in the C backend. |
11:39:14 | krux02 | I just try to map to nim names where I can |
11:39:59 | krux02 | but the int might be very confusing, because the same you you mixed it up, a person might mix up the type `int` that comes from the c namespace and the type `int` that comes from the nim namespace. |
11:40:03 | PMunch | Hmm, just updated to the latest devel and I can't create global static variables any more? |
11:40:27 | krux02 | PMunch, that is intended |
11:40:29 | FromGitter | <mratsim> like let foo {.compileTime.} = 1? |
11:40:36 | PMunch | I had a static: var that a macro added things to before a final macro did something with it. But now Nim just complains that it's not possible |
11:40:40 | krux02 | it was discussed in the past to enable fast compilation (cache) |
11:40:51 | * | endragor quit (Remote host closed the connection) |
11:40:58 | FromGitter | <mratsim> @PMunch use var foo {.compileTime.} instead |
11:41:08 | PMunch | Oh nice |
11:41:17 | PMunch | Can I do the same with types? |
11:41:34 | PMunch | Nope.. |
11:41:35 | FromGitter | <mratsim> types are always created at compile-time though |
11:41:44 | FromGitter | <mratsim> ah you mean type alias? |
11:42:07 | krux02 | just changing the way how you create global static variables won't save you from the general change that global static variables are about to disappear from Nim |
11:43:23 | PMunch | Yeah I have this: type defTuple = tuple[handler: NimNode, kind: NimNode] |
11:43:29 | PMunch | Which before was in my static block |
11:43:38 | krux02 | PMunch, why don't you use const and initialize it with a {.compileTime.} proc? |
11:43:43 | FromGitter | <mratsim> you can declare it outside |
11:43:46 | PMunch | I guess you won't be able to use it anyways.. |
11:43:56 | FromGitter | <mratsim> you can |
11:44:10 | PMunch | krux02, but why? |
11:44:19 | PMunch | And how can I make this macro still work then.. |
11:44:28 | krux02 | which macro? |
11:44:50 | FromGitter | <mratsim> I don’t mind changing static: var foo ==> var foo {.compileTime.} but global compile time variable are useful |
11:45:12 | krux02 | I know they are useful |
11:45:15 | FromGitter | <mratsim> @PMunch, declare the type outside of the static block: https://github.com/mratsim/Arraymancer/blob/master/src/nn_dsl/dsl_types.nim#L14 |
11:45:36 | PMunch | krux02, a small macro I made to more easily create X event loops: http://ix.io/1hmP/ |
11:46:02 | PMunch | http://ix.io/1hmP/Nim if you would like syntax highlighting |
11:47:23 | FromGitter | <mratsim> @PMunch, maybe you can find some inspiration here: https://github.com/status-im/nimbus/blob/4b5eada3222fbfa5780602b42ad27816990aca4d/nimbus/vm/interpreter_dispatch.nim#L18 |
11:47:35 | FromGitter | <mratsim> it used to be a static block |
11:49:25 | PMunch | Well it works fine to just annotate my variable as compileTime, but if what krux02 says is true, and compile-time global variables won't be possible in the future it will completely break how the macro works.. |
11:51:22 | FromGitter | <mratsim> I’d like more info on that as well. ⏎ ⏎ That would mean that Table\[Foo, NimNode\], tuple\[bar, baz: NimNode\] can only exist within a macro scope |
11:51:48 | Araq | not true, read the RFC |
11:52:04 | Araq | but you need to use the macrocache API |
11:52:45 | * | xylef quit (Ping timeout: 256 seconds) |
11:55:13 | PMunch | Which one? |
11:55:28 | FromGitter | <mratsim> this I suppose: https://github.com/nim-lang/Nim/issues/7874#issuecomment-395686265 |
11:56:40 | * | Vladar joined #nim |
12:00:11 | * | cspar joined #nim |
12:00:25 | PMunch | Right.. |
12:13:03 | krux02 | Araq: can you close this: https://github.com/nim-lang/Nim/issues/6528#issuecomment-405222296 |
12:13:18 | krux02 | I think it is clear the openArray won't become a concept in the near future |
12:15:28 | * | fvs` joined #nim |
12:25:05 | PMunch | How do I set a compilation option in the nim.cfg? |
12:34:22 | * | floppydh joined #nim |
12:36:28 | dom96 | Same way as you do on the command line |
12:38:16 | PMunch | I couldn't get it to work.. |
12:39:41 | PMunch | nim.cfg(1, 21) Error: expected identifier, but got: : |
12:40:03 | PMunch | And nim.cfg is just a single line: -d:chronicles_sinks:textlines |
12:40:56 | Araq | -d:chronicles_sinks=textlines |
12:42:31 | krux02 | Araq: what should I do for the gdb type map? |
12:42:51 | krux02 | should I prefix the names with "nim::"? |
12:43:31 | Araq | I would prefix the C names with "c." |
12:43:44 | Araq | or without the dot, 'cint' is clear. |
12:44:06 | krux02 | well I have no influence on the C names |
12:44:18 | krux02 | I have only influence on the names for nim types |
12:45:58 | PMunch | Araq, nim.cfg(1, 21) Error: expected identifier, but got: = |
12:46:46 | Araq | well either this is about debugging Nim code or it's about something else. |
12:46:59 | Araq | seems like it's about something else. |
12:50:41 | krux02 | Araq: gdb is about debugging C programs, but it supports lots of other things for higher level languages, such as collections. |
12:51:01 | krux02 | I lot of things could also be done with emitting the right kind of debug information |
12:51:48 | krux02 | so gdb thinks all the time it is debugging a c program |
12:52:24 | krux02 | and there are regular expressions for types that say, "ah! i know this type, it is a type defined in the Nim programming languages, and this is how it is called and these are the children" |
12:56:57 | krux02 | but this type map is totally incomplete. Therefore it will always be a hybrid of types that are already properly mapped and types that a raw C type names |
12:57:13 | krux02 | and I can asy, it is pretty good already. |
13:03:32 | * | endragor joined #nim |
13:05:55 | FromGitter | <alehander42> I have some logic that analyses with python c types and tries to construct a reps |
13:06:04 | FromGitter | <alehander42> Of the original nim type |
13:06:20 | FromGitter | <alehander42> Representation * |
13:07:24 | krux02 | alehander42: I have that, too‽ |
13:07:58 | FromGitter | <alehander42> Then why |
13:08:09 | FromGitter | <alehander42> Ops, phone gutter is hard |
13:08:19 | FromGitter | <alehander42> Gitter * ugh |
13:08:43 | krux02 | then use irc |
13:08:50 | krux02 | it's much better |
13:08:57 | FromGitter | <alehander42> Ok I was under the impression that you can't map some types |
13:09:00 | FromGitter | <alehander42> Back |
13:09:13 | Yardanico | krux02, it's just that gitter website sucks on mobile devices |
13:09:17 | krux02 | (I have no idea, I am just claiming) |
13:09:23 | Araq | krux02: nim produces .ndi files |
13:09:59 | FromGitter | <narimiran> PMunch: no need for `-` in .cfg, you just need to have e.g. `define:"blas=cblas"` |
13:10:00 | FromGitter | <alehander42> Btw I remember nim could emit some info mapping hashes to signatures |
13:10:16 | FromGitter | <alehander42> And this was very useful for some debugging purposes |
13:10:42 | krux02 | Araq: what are the ndi files doing? |
13:11:00 | FromGitter | <alehander42> Is it under a flag |
13:11:18 | FromGitter | <narimiran> i get why there isn't seq-unpacking, but can we have array-unpacking please? |
13:11:35 | Yardanico | you can write a simple macro, in fact I already have it :) |
13:11:50 | Yardanico | it works for both seqs/arrays |
13:11:54 | Yardanico | and tuples probably too |
13:12:02 | FromGitter | <narimiran> i'm still afraid of macros! |
13:13:23 | Yardanico | https://gist.github.com/Yardanico/b6fee43f6da8a3bbf0fe048063357115 |
13:13:52 | * | jamesroseman joined #nim |
13:14:21 | Araq | http://www.codersnotes.com/notes/something-rotten-in-the-core/ |
13:14:22 | krux02 | Araq, I see, I just looked at the ndi file |
13:14:28 | krux02 | looks usable |
13:15:47 | krux02 | I am just not sure how I can gather all generated ndi files |
13:15:57 | krux02 | it looks like the information is a bit scattered |
13:17:14 | Araq | nimcache/*.ndi |
13:18:16 | Araq | but to answer your question, use 'system.int' then, that's clearly a Nim thing |
13:18:57 | * | jamesroseman quit (Ping timeout: 248 seconds) |
13:18:59 | krux02 | Araq: i just did exactly that. |
13:19:06 | krux02 | and thanks |
13:19:30 | FromGitter | <alehander42> @miran macros are easy, if you write the destructure |
13:19:42 | FromGitter | <alehander42> One youll start to love them |
13:20:14 | PMunch | Thanks @narimiran, this works: define:"chronicles_sinks=textlines" |
13:23:46 | FromGitter | <narimiran> @alehander42 heh, i might take a dive into macros on my holidays.... |
13:24:42 | PMunch | They're quite addictive once you get started :P |
13:30:05 | * | Vladar quit (Quit: Leaving) |
13:32:14 | FromGitter | <tim-st> When I try to `spawn` a proc in a loop it tells me it's not gc safe, what's the definition of that? |
13:32:40 | FromGitter | <tim-st> (it opens files) |
13:33:35 | Yardanico | maybe it accesses some global variables |
13:33:37 | Yardanico | maybe it changes them |
13:33:44 | * | cspar quit (Ping timeout: 260 seconds) |
13:34:14 | FromGitter | <tim-st> I call a local proc dunno what goes on behind in stdlib |
13:34:42 | FromGitter | <tim-st> it seems `htmlparser.loadHtml` cannot be spawn |
13:36:19 | * | endragor quit (Remote host closed the connection) |
13:37:39 | Araq | tim-st: that's a stdlib bug then, I think |
13:38:55 | FromGitter | <tim-st> Are there any procs that never can be spawn? |
13:38:58 | * | mike_oalian joined #nim |
13:39:22 | FromGitter | <tim-st> the spawned proc openes a file, maybe this is not good |
13:41:22 | krux02 | Araq: I think the gdb pretty printers are ready to merge |
13:41:30 | krux02 | I will not use the ndi files for now. |
13:41:38 | krux02 | That can be a later pull request. |
13:41:41 | * | Vladar joined #nim |
13:42:35 | krux02 | And I think if if wouldn't be a better idea to put the ndi contend into a section of the binary, because the nimcache directory is not always available. |
13:48:30 | * | PMunch quit (Quit: Leaving) |
13:52:58 | FromGitter | <tim-st> the compiler says `htmlparser.untilElementEnd` is the root of the problem and not gc safe |
13:59:42 | * | nixfreak joined #nim |
14:00:25 | nixfreak | Has anyone created or no of decentralized apps made using nim ? |
14:01:14 | Araq | http://www.codersnotes.com/notes/command-and-vector-processors/ |
14:01:57 | Araq | nixfreak: what's a decentralized app? a married bachelor? |
14:03:22 | * | nsf joined #nim |
14:03:30 | * | jamesroseman joined #nim |
14:05:28 | nixfreak | decentralize - meaning the app and data are local but connect to multiple nodes , no centralize server |
14:06:25 | nixfreak | https://github.com/DavidJohnstonCEO/DecentralizedApplications#definition-of-a-dapp |
14:06:54 | nixfreak | using p2p protocols like ipfs (interplanetary file system) |
14:16:02 | Araq | pretty sure an app can't be decentralized, a system can be, but it's probably hair splitting. |
14:16:27 | Araq | p2p protocols in Nim? No idea. |
14:17:02 | krux02 | Araq: I just read your article about the Amiga. |
14:17:39 | krux02 | The amiga surely was cool. But using every bit and hack on a system for the last bit of performance surely doesn't make very portable applications. |
14:18:10 | krux02 | the programs would run on the Amiga, but future hardware would have struggle running it, because it isn't exactly the same. |
14:18:50 | krux02 | and you can't always upgrade a system by adding more hardware, but keeping everything they ever put in in the past. |
14:20:08 | krux02 | I like to write my application in OpenGL, even if it is not maximum performance, when I can be (relatively) sure that a new Hardware chip for rendering won't break the program. |
14:25:50 | Araq | it's not about "the last bit of performance", it is about control. not to be confused with "controls". http://www.codersnotes.com/notes/controls/ |
14:26:10 | * | TheLemonMan joined #nim |
14:26:12 | Araq | it's an excellent blog. |
14:26:58 | TheLemonMan | A brief publicity stunt, if you like microbenchmarks give this a try https://github.com/LemonBoy/criterion.nim :) (it's also my first piece of nim beside the work on the compiler so feel free to criticize it) |
14:27:27 | FromGitter | <mratsim> @nixfreak, @gogolxdong is using Nim and IPFS |
14:27:30 | * | TheLemonMan quit (Client Quit) |
14:30:04 | Yardanico | ipfs looks cool btw, but it's only about decentralization (not about anonymity) which is cool anyway |
14:31:40 | FromGitter | <mratsim> I think Swarm is getting a lot of mind share now: https://swarm-guide.readthedocs.io/en/latest/, there are PR in Go, I couldn’t find a C implementation for bzz (the swarm CLI client) |
14:33:33 | nixfreak | @mratism do you know how gogolxdong is calling ipfs from nim? |
14:34:05 | krux02 | Araq: OpenGL is horrible in your term of "controls" it is full of controls and maks simple things incredibly hard. |
14:34:23 | krux02 | that is why I am developing my `opengl |
14:34:29 | krux02 | sandbox |
14:34:37 | krux02 | (I need a new name for that) |
14:34:46 | krux02 | to make use of the GPU simpler. |
14:35:09 | krux02 | But there are a few key elements in the OpenGL pipeline that make it very portable. |
14:35:43 | krux02 | one of them is that the shaders that are executed on th GPU are defined in a high level language (kind of). |
14:35:57 | krux02 | There is no assembly instruction set to run on the gpu. |
14:36:28 | * | mike_oalian quit (Quit: mike_oalian) |
14:36:46 | krux02 | then a compiler in the gpu driver can compile the shader to explicit GPU instructions that can eveb be different for every revision of the GPU. |
14:38:00 | krux02 | so unlike CPU that all need to be compatible with old instruction sets GPU can come up with a completely new instruction set on every new GPU and it will just work (if they provide a working shader compiler in the driver) |
14:39:02 | krux02 | All I want to do is take away controls, and provide control. |
14:39:15 | Araq | :-) |
14:41:02 | FromGitter | <mratsim> @nixfreak check the conversion from this day, not sure if it will help you much but that’s a starter: https://irclogs.nim-lang.org/02-05-2018.html |
14:41:16 | FromGitter | <mratsim> conversation* |
14:41:45 | krux02 | Araq: can you now merge the gdb pretty printer branch? |
14:41:49 | nixfreak | @mratsim I just had a look at his repos didn't find anything , thanks for the link |
14:42:03 | FromGitter | <mratsim> because he is using it for work |
14:42:17 | * | donzx joined #nim |
14:45:02 | * | donlzx quit (Ping timeout: 276 seconds) |
14:45:56 | nixfreak | https://gist.github.com/gogolxdong/aa58f6f52cba398389c9a71aa53ac1b4 -- > I see he's trying to compile a merkel tree |
15:06:40 | krux02 | http://www.codersnotes.com/notes/the-lost-program/ |
15:06:42 | krux02 | I like this |
15:07:43 | * | FromGitter quit (Remote host closed the connection) |
15:07:51 | * | FromGitter joined #nim |
15:09:12 | krux02 | maybe that story is true. Maybe inventing a programming language is like making a flat map of the world without distortions. |
15:10:00 | krux02 | and when you make a new map, the map will have less distorion in the area that you come from, but more in the areas that you don't care about |
15:10:56 | * | miran joined #nim |
15:11:10 | FromDiscord | <treeform> that is a good analagy |
15:13:10 | FromGitter | <Quelklef> Any way to pass arguments to `nimble test`? |
15:13:20 | FromGitter | <Quelklef> `--noNimblePath` is breaking an import for some reason |
15:13:21 | krux02 | nimble test arg |
15:13:23 | krux02 | maybe? |
15:13:30 | FromGitter | <Quelklef> Nope, doesn't seem to work |
15:13:53 | krux02 | Quelklef: did you try to read the source of nimble? |
15:14:06 | FromGitter | <Quelklef> I can |
15:14:15 | krux02 | reading the source code of something often reveals a lot of information that unlike documentation is never outdated |
15:14:25 | FromGitter | <Quelklef> I figured that since there's no documented way, and `nimble test <stuff>` seems to be a noop, there's no way |
15:14:29 | FromGitter | <Quelklef> Ah, I'll look |
15:14:44 | FromGitter | <Quelklef> but rather I was looking for any solution to get `nimble test` to run without `--noNimble Path` |
15:16:28 | krux02 | the more I work with nimble the less I like it. It seems to be a constant source of issues. |
15:16:44 | FromGitter | <Quelklef> Yikes |
15:16:53 | FromGitter | <Quelklef> I like it because I like(d) how `nimble test` is set up |
15:17:30 | krux02 | I used CMake and Sbt (scala), and I hate both |
15:17:41 | krux02 | so nimble is still above them |
15:18:29 | krux02 | cmake just circumvents explaining you how it works, and gives you thousands of controls |
15:18:42 | FromGitter | <Quelklef> I wonder if I should just make a `test.sh` in `tests/` |
15:18:44 | krux02 | and sbt well it has a nice default config |
15:18:51 | krux02 | so no config at all, and you can build your project |
15:18:59 | krux02 | just by putting things in the right folder |
15:20:24 | krux02 | but as soon as you have to do anything in the sbt files, it is like cmake. It just circumvents successfully to give you relevant information and then givets you thousands of controls that you don't want to know about. |
15:20:51 | FromGitter | <Quelklef> Which ones do you like? |
15:21:32 | krux02 | the build system of Go |
15:22:10 | FromGitter | <Quelklef> echhhhh |
15:22:12 | FromGitter | <Quelklef> Go is so weird |
15:22:40 | dom96 | krux02: what issues are you having with Nimble? |
15:23:26 | FromGitter | <Quelklef> I wonder how Go would have panned out if it weren't a Google project |
15:25:47 | krux02 | dom96: I did not intent to trigger you. But there are a few issues. |
15:26:25 | krux02 | for example releasing a package and bumping the version is too much of a hassle. |
15:27:01 | krux02 | I would like that just uploading on github or bitbucket alone would be enough |
15:27:09 | krux02 | no official packages list. |
15:27:37 | dom96 | So you'd rather everyone specifies the Git URL? |
15:28:02 | krux02 | go allows to import a packgae from an url, so that github isn't a must for packages. |
15:28:31 | krux02 | yes git url |
15:28:41 | Yardanico | isn't it already possible to use git url's? |
15:28:45 | Yardanico | or only github urls? |
15:29:04 | krux02 | Yardanico, you need to be in the packages list |
15:29:15 | krux02 | I would like to make the central packages list obsolete. |
15:29:24 | dom96 | Nope |
15:29:25 | krux02 | A completely decentralized packages manager. |
15:29:32 | dom96 | You can use git/hg URLs |
15:29:43 | dom96 | The package list is currently completely optional |
15:30:04 | krux02 | but it is required for nimble search, isn't it? |
15:30:37 | dom96 | Of course |
15:30:57 | dom96 | How does Go's search work? |
15:31:08 | krux02 | well you just go to github and search there |
15:31:31 | dom96 | Mmmhm |
15:31:42 | dom96 | So Nimble already wins :P |
15:31:51 | FromGitter | <vendethiel> People often talk about Go's package system as the worst "feature" of the language... |
15:32:43 | dom96 | There are plenty of features that Nimble is still missing, but I really don't agree that this is an issue. |
15:32:48 | krux02 | dom96: https://gowalker.org/ |
15:32:58 | Araq | my nimble still says "what?" from time to time |
15:34:26 | krux02 | vendethiel: go's package system doesn't solve versioning for you at all |
15:34:42 | krux02 | it always take the master of the project |
15:34:57 | krux02 | and some people just can't deal with that |
15:35:02 | dom96 | So write a nimwalker.org website |
15:35:41 | Araq | yeah, we need an NP complete graph dependency solver, when has that ever failed us? |
15:35:42 | Yardanico | dom96, isn't that the same as nimble.directory ? |
15:35:49 | Yardanico | "Go Walker is a server that generates Go projects API documentation on the fly for the projects on GitHub." |
15:35:56 | dom96 | "for projects on GitHub" |
15:36:04 | Yardanico | yeah, but that can be easily changed |
15:36:04 | dom96 | so it probably scans GitHub for Go projects |
15:36:14 | krux02 | yes it does |
15:36:21 | Yardanico | the thing is - not all nim packages follow nimble project structure |
15:36:27 | Yardanico | because you're not required to |
15:36:28 | FromGitter | <vendethiel> Araq: if your dep manager isn't even a potent SAT solver, can it even manage? |
15:36:40 | FromGitter | <tim-st> is it normal that when I use spawn in a loop and sync that it uses big amounts of increasing ram? |
15:37:05 | Araq | tim-st: maybe :-) |
15:37:49 | krux02 | Yardanico, that is the next criticism about nimble |
15:37:56 | FromGitter | <tim-st> ah, ok, maybe the for loop runs over all files reads it in memory or at least a bit and saves this in a thread pool which used like 800mb ram |
15:38:00 | krux02 | the wonky project structure definition |
15:38:11 | Yardanico | krux02, the thing is - Nim didn't have a ONE FORCED project structure |
15:38:12 | Araq | vendethiel: here is a good rule of thumb: stay away from graphs. ;-) |
15:38:13 | Yardanico | go has AFAIK |
15:38:16 | krux02 | I would really like to have i root.nimble |
15:38:22 | krux02 | or nimble.nimble |
15:38:28 | Araq | krux02: it's not wonky at all IMO. |
15:38:38 | Araq | took some time to understand its ways though. |
15:38:41 | dom96 | What's wonky about it? |
15:38:46 | krux02 | it feels wonky for me, but I am not very deep into nimble |
15:39:06 | * | Trustable joined #nim |
15:40:05 | krux02 | dom96: look at this project here https://github.com/krux02/turnt-octo-wallhack |
15:40:12 | krux02 | it is my project (dead by now) |
15:40:21 | krux02 | it did not follow any project structure at all |
15:40:31 | krux02 | it doesn't have a project file |
15:40:34 | krux02 | there is just a main |
15:40:45 | krux02 | and still everything just works |
15:40:58 | krux02 | it is even on gowalker |
15:41:02 | krux02 | https://gowalker.org/github.com/krux02/turnt-octo-wallhack/particles |
15:41:11 | krux02 | I didn't do anything to make this work |
15:41:25 | krux02 | it is simply a very robust system that you can't screw up |
15:41:34 | FromGitter | <tim-st> another question: when I use shared memory like a table and I write k, v in parallel can something bad happen, when I know that each v is unique for each k when threads write at same time? |
15:41:37 | krux02 | or at least it is very compatible with my way of thinking about a project |
15:41:56 | krux02 | tim-st: yous |
15:41:57 | * | FromGitter quit (Read error: Connection reset by peer) |
15:41:58 | krux02 | yes |
15:42:06 | * | FromGitter joined #nim |
15:42:08 | FromGitter | <tim-st> does it work without locking? or can I get this SIG memory issues? |
15:42:14 | dom96 | krux02: When you can write "import <git_url>" then that's possible |
15:42:19 | dom96 | But Nim doesn't support this |
15:43:42 | krux02 | tim-st: you have shared memory that you want to write to. of course you need to lock. |
15:43:58 | krux02 | you can't expect a write operation to be atomic |
15:44:27 | FromGitter | <tim-st> krux02: ah ok of course, so internally it could break at 50% memory written |
15:44:28 | krux02 | the only think that you can do from multiple threads without locking is pure read access. |
15:44:43 | FromGitter | <tim-st> ok, thanks |
15:44:43 | krux02 | but as soon as one thread is allowd to write to it, locking is necessary. |
15:44:49 | krux02 | even for the readers |
15:45:02 | FromGitter | <tim-st> ok, thanks! |
15:45:08 | krux02 | because you don't want have written values |
15:45:09 | FromGitter | <tim-st> makes sense |
15:46:03 | FromGitter | <tim-st> or can a language define atomic operations? |
15:46:10 | krux02 | tim-st: but try to avoid writing to shared memory. |
15:46:23 | krux02 | locking is something that can easiliy fuck up. |
15:46:31 | FromGitter | <tim-st> I think I avoid spawn at all, it wasnt much quicker |
15:46:47 | FromGitter | <tim-st> used betwenn 2% and 40% cpu 90% it was at 5% |
15:47:05 | krux02 | multithreading shouldn't be your first address for performance boost anyway |
15:47:22 | FromGitter | <tim-st> yes, I know, but I have 20k files to parse |
15:47:24 | krux02 | try to optimize your loop and memory locality |
15:47:39 | krux02 | you can do a lot of optimizations single threaded. |
15:48:16 | krux02 | a lock is just another name for bottleneck |
15:48:35 | krux02 | so when you do spawn plus a bottleneck, there isn't much performance gain. |
15:48:37 | FromGitter | <tim-st> I think my code is not bad, my wiki parser parses wikipedia in like 30mins where the official php parser would need many days |
15:49:00 | krux02 | that is reasonable fast |
15:49:14 | krux02 | but to be fair, php isn't make for that |
15:49:17 | Araq | start with osproc.execProcesses() |
15:49:28 | FromGitter | <tim-st> also java's parser isnt much faster |
15:49:37 | Araq | and then move from multiple processes to multiple threads when required |
15:49:38 | krux02 | if I understand php correctly it is just a templating engine for html |
15:49:46 | dom96 | If you have 20k files then running your parser in parallel is super trivial |
15:49:54 | dom96 | just spawn multiple processes like Araq said |
15:50:11 | krux02 | tim-st: you should really beat java performance |
15:50:11 | Araq | omg, no, it's an OOP language like many others, including unique quirks. tons of quirks. |
15:50:13 | FromGitter | <tim-st> is there an example of multiple processes? |
15:50:25 | krux02 | Java has a big disadvantage becaues it can't use memory efficient data structures. |
15:51:08 | dom96 | tim-st: just build your parser and then launch multiple processes using bash or batch or powershell (or nimscript) |
15:51:20 | FromGitter | <tim-st> well I could compile one exe and pass by cmd line which ranges it should process |
15:51:32 | FromGitter | <tim-st> but that seems a bit hacky |
15:51:34 | dom96 | indeed |
15:51:35 | Araq | no, use execProcesses() to launch them |
15:51:48 | FromGitter | <tim-st> ok, thanks |
15:51:59 | dom96 | You have files. You should just launch `parser.exe file1`, `parser.exe file2` etc. |
15:52:18 | FromGitter | <tim-st> I have 20k should I start 20k processes? |
15:52:23 | FromGitter | <tim-st> processes are expensive |
15:52:32 | Araq | execProcesses() damn it. |
15:52:35 | dom96 | no |
15:52:35 | FromGitter | <tim-st> my whole system has ~160 |
15:52:41 | Araq | it handles all of that |
15:52:48 | dom96 | You should start <number_of_cores> at a time |
15:52:57 | FromGitter | <tim-st> ok, thanks |
15:54:34 | Araq | ok, let's reinvent execProcesses() |
15:54:46 | krux02 | Araq: what is up with AppVeyor? |
15:54:57 | krux02 | my PR is still pending |
15:55:44 | Araq | http://www.codersnotes.com/notes/disassembling-jak/ |
15:56:08 | Araq | krux02: probably a hickup |
15:56:36 | krux02 | I already read about GOAL |
16:01:28 | nixfreak | pretty sweet INim 0.3.0 Nim Compiler Version 0.18.0 [MacOSX: amd64] at /usr/local/bin/nim |
16:01:42 | krux02 | Because I heared about GOAL I was looking for a substitute that was open source. |
16:01:51 | krux02 | And that substitute for me is Nim. |
16:02:09 | krux02 | I think without reading about GOAL I would not have landed here. |
16:03:02 | * | jamesroseman quit (Ping timeout: 276 seconds) |
16:06:23 | * | floppydh quit (Quit: WeeChat 2.1) |
16:08:38 | * | jamesroseman joined #nim |
16:13:51 | krux02 | dom96: I am sorry I really didn't want to trigger you with nimble. The problem is that currently I cant frame it precisely what I don't like about nimble. It is more a feeling of what I don't like, not something concrete. |
16:14:10 | * | jamesroseman quit (Ping timeout: 264 seconds) |
16:14:42 | krux02 | I remember for vim there were many package managers around to manage your plugins. Some with more features some with fewere features. |
16:14:51 | dom96 | Please gather your feelings. It's incredibly frustrating to see you telling others that you dislike Nimble and that you're not able to explain why that is. |
16:15:12 | krux02 | They all worked, but they didn't nail thear job precisely. |
16:15:41 | dom96 | And keep in mind that Nimble is further away from v1.0 than Nim is. |
16:15:57 | krux02 | And then there was the package manager https://github.com/junegunn/vim-plug |
16:16:18 | krux02 | simple easy to use. and plugin management seems to be solved once and for all. |
16:16:37 | krux02 | vim plug just nailed the plugin management for vim |
16:18:39 | krux02 | and nimble doesn't feel like vim plug, it feels like emacs M-x list-packages |
16:18:41 | * | jamesroseman joined #nim |
16:19:55 | FromGitter | <tim-st> I like nimble, it's easy to use like `pip`, the only thing I miss is easy devel code support, but maybe that already exists |
16:20:18 | FromGitter | <tim-st> sometimes @ head works, sometimes not |
16:20:35 | dom96 | `nimble install pkg@#head` |
16:20:40 | dom96 | That will always work |
16:20:48 | krux02 | dom96: not on zsh |
16:20:53 | FromGitter | <tim-st> hm, ok, I thought a few days ago I tried it and it failed |
16:21:04 | FromGitter | <tim-st> and the other day it worked for another package |
16:21:05 | dom96 | Yes, you may need to escape it for some shell's |
16:21:07 | FromGitter | <kaushalmodi> @tim-st You can `nimble install` *any* git repo, from any branch/tag |
16:21:18 | krux02 | this @# is really confusing zsh |
16:21:26 | FromGitter | <kaushalmodi> That package doesn't ever need to be a registered nimble package |
16:21:32 | dom96 | For me, if I paste it into my terminal it gets automatically escaped by zsh |
16:21:42 | krux02 | yea for you |
16:21:51 | dom96 | Yes, for me. |
16:22:02 | FromGitter | <tim-st> ok, will have a look from now if it always works like that :D |
16:22:30 | krux02 | so you adapted your zshrc to work better with nimble? |
16:22:34 | dom96 | No? |
16:23:09 | dom96 | It works for me. Maybe it's thanks to oh-my-zsh, or the fact that I use a mac. |
16:23:18 | dom96 | So I don't know if it works for every zsh user |
16:23:25 | krux02 | I use grml |
16:23:26 | FromGitter | <kaushalmodi> For example (related to devel code and nimble), `nimble install https://github.com/kaushalmodi/bignum` works (fetched devel-compatible version of bignum) even though the official nimble version fails on devel |
16:23:56 | nixfreak | make sure you put the ~/.nimble/bin path in order to launch your nim binaries from nimble |
16:24:04 | * | jamesroseman quit (Ping timeout: 260 seconds) |
16:24:21 | FromGitter | <tim-st> @kaushalmodi ok, thanks |
16:24:35 | * | donzx quit (Quit: Leaving) |
16:25:08 | krux02 | dom96: I tested the pkg@#head again, and I don't have issues, but my memory tells me that I had to quote it |
16:25:43 | FromGitter | <kaushalmodi> krux02: May be this is off-topic, but what's the problem with M-x list-packages |
16:26:45 | FromGitter | <kaushalmodi> I always use the Emacs package management solution in positive light, but in one of your comments above it sounded that you didn't quite like it.. so curious |
16:27:53 | ldlework | everone should use straight.el |
16:27:59 | ldlework | please stop using package.el |
16:28:08 | ldlework | (for the sake of the ecosystem) |
16:28:32 | FromGitter | <kaushalmodi> ldlework: Huh? |
16:28:41 | * | jamesroseman joined #nim |
16:28:52 | FromGitter | <kaushalmodi> Is there a different Gitter room for offtopic chat? |
16:30:09 | FromGitter | <kaushalmodi> ldlework, krux02: If you guys can use Gitter, I'd love the discuss the trouble you are having with package.el at https://gitter.im/KaushalModi/Lobby |
16:30:10 | dom96 | Yeah, it's called nim-twitch or something |
16:30:21 | ldlework | kaushalmodi, i wasn't making a comment about off-topicness |
16:30:30 | FromGitter | <kaushalmodi> ldlework: I know |
16:30:47 | ldlework | oh ok |
16:30:47 | FromGitter | <kaushalmodi> I didn't want to discuss off topic stuff here as Emacs users are in minority here :P |
16:30:58 | krux02 | kaushalmodi: emacs package management is ok. It works, but it was weird to get used to in my subjective perspective. |
16:30:59 | ldlework | kaushalmodi, #emacs on freenode irc is probably the best place |
16:31:11 | ldlework | emacs package management was terrible for ever |
16:31:18 | ldlework | then it got a package management system |
16:31:21 | ldlework | then someone invented use-package |
16:31:36 | ldlework | then someone invented straight.el which is a pure package manager like Nix |
16:31:36 | FromGitter | <kaushalmodi> Is there a web-accessible way to access #you-name-it IRC? |
16:31:37 | krux02 | in vim plug I just put the packages I wint in the init script and then there are a few commands that not only do verything, but they are also very visual in what they are doing |
16:31:51 | ldlework | kaushalmodi, webchat.freenode.net |
16:32:04 | dzho | @kaushalmodi or irccloud |
16:32:07 | ldlework | krux02: use-package does the same thing |
16:32:20 | krux02 | kaushalmodi you can use irc from within emacs |
16:32:25 | ldlework | lol true |
16:33:27 | FromGitter | <kaushalmodi> krux02: couldn't.. whatever ports are needed for that are blocked |
16:33:30 | FromGitter | <kaushalmodi> (work) |
16:33:49 | * | jamesroseman quit (Ping timeout: 256 seconds) |
16:33:54 | krux02 | did you block the ports on your own? |
16:34:23 | krux02 | I recommend hexchat for IRC |
16:34:27 | * | dorelix quit (Ping timeout: 240 seconds) |
16:34:30 | FromGitter | <kaushalmodi> no |
16:34:33 | FromGitter | <kaushalmodi> work sysadmins |
16:34:42 | FromGitter | <kaushalmodi> anyways on webchat, I get "#emacs Cannot join channel (+r) - you need to be identified with services" |
16:34:56 | krux02 | yes you need to get an account on freenode |
16:35:02 | FromGitter | <kaushalmodi> hmm |
16:35:15 | krux02 | that account is then valid for all freenode channels |
16:35:29 | miran | i have an account, but i couldn't pass through the blocked ports, FWIW |
16:35:30 | krux02 | that is spammer protection |
16:36:37 | nixfreak | is nimrod.vim a good script for indentation? |
16:36:45 | krux02 | no idea |
16:37:06 | krux02 | do indentation manually |
16:37:09 | krux02 | isn.t that bad |
16:37:44 | Demos[m] | I think the emacs mode has good electric indent support |
16:38:07 | krux02 | a good hint for indenting is when the last line ended on a : or = or when the last line opened more braces than it closed |
16:38:39 | * | jamesroseman joined #nim |
16:38:46 | krux02 | Demos[m]: if my good you mean that it freezes the editor for several seconds and than screws up half of the document |
16:39:05 | Demos[m] | hey man I havent used it in a while |
16:39:19 | krux02 | I turn off electric indent mode in emacs |
16:39:26 | krux02 | because I don't know how to fix it |
16:39:29 | krux02 | too complicated |
16:39:40 | krux02 | but without electric indent mode, emacs is still very good to use |
16:39:49 | krux02 | it still does indent in the next line and so on |
16:39:58 | Demos[m] | yeah it' |
16:40:00 | krux02 | it just stops trying to reindent the entire document |
16:40:01 | Demos[m] | it's quite different from how most editors do it |
16:40:22 | Demos[m] | probably based off like some teletype from 1975 |
16:40:33 | krux02 | yea it's not an xml document describing stuff |
16:40:51 | Demos[m] | I always have to run indent-buffer to get it to indent the whole document |
16:40:53 | Demos[m] | idk though |
16:41:26 | ldlework | I have been writing a ton of elisp lately |
16:41:37 | ldlework | Well more like aggressively iterating a small bit of elisp |
16:41:53 | Demos[m] | nice |
16:42:07 | FromGitter | <kaushalmodi> Seems like too much work creating freenode account.. why can't I see a "create new account" link.. will have to postpone that offtopic chat until later |
16:42:11 | krux02 | I like align-regexp it does help indenting the whitespace after the first written character |
16:43:04 | Araq | somewhat related. |
16:43:08 | ldlework | my modeline is pretty beautiful now: https://i.imgur.com/TeqJqXI.png |
16:43:17 | * | dorelix joined #nim |
16:43:25 | krux02 | kaushalmodi: you forget that IRC is a substitute for the web |
16:43:32 | Araq | in nimpretty I noticed that Nim has an -erm- let's say suboptimal 'object' syntax |
16:43:35 | * | jamesroseman quit (Ping timeout: 240 seconds) |
16:43:41 | krux02 | you do everything within IRC even account creation |
16:44:00 | Araq | you can indent after ':', '=' and some keywords like 'type' |
16:44:17 | Araq | but that 'object' line doesn't end in a keyword |
16:44:26 | Araq | because it can be 'object of Foobar' |
16:45:02 | Araq | yes. we're are talking about syntax. bikeshed ahead. |
16:45:19 | krux02 | if we are talking about syntex |
16:45:54 | Araq | I think we might allow for 'type Foo = object of Bar:' with the colon in order to solve this glitch |
16:46:10 | krux02 | I think I got used to most of Nim syntax quirks by now, but it was confusing to me that almost all blocks of code were introduced by `:`, execpt function definition that was an `=` sign |
16:46:57 | krux02 | I would like to allow this, too: ``proc fobar(a,b: int) -> int:`` |
16:47:04 | miran | please don't change `=` to `:` |
16:47:11 | Araq | oh that is consistent with 'const' and 'var' though, <keyword> stuff : type = body |
16:47:52 | Araq | and your solution would just enable more pointless fights ;-) |
16:48:02 | krux02 | yea |
16:48:26 | krux02 | but the syntax that I am suggesting is not my invention |
16:48:42 | * | jamesroseman joined #nim |
16:48:45 | krux02 | I recently found out it is the syntax of python, and I liked it. |
16:48:57 | krux02 | (python has pointless type annotations) |
16:49:01 | miran | is there any performance benefits of declaring `var foo` outside of a loop, insted of `let foo` inside of it? |
16:49:07 | Araq | (guess what, I know) |
16:49:23 | Araq | miran: usually it's optimized to the same code |
16:49:52 | krux02 | well it isn't that important though. I got used to it. |
16:50:15 | Araq | I like it better this way ;-) |
16:50:25 | * | endragor joined #nim |
16:50:27 | miran | Araq: thanks, i thought that might be the case |
16:50:45 | Araq | the arrow makes more sense if you deal with types only (T, T) -> T |
16:51:08 | Araq | but once parameter names enter the picture it's not as nice. |
16:51:25 | miran | agreed |
16:52:09 | Araq | hmm maybe I allowed 'object of Foo []' for consistency with tuples, can't remember |
16:52:15 | krux02 | I am actually often confused on when to use -> and when to use => |
16:52:35 | Araq | I don't use neither. |
16:52:40 | FromGitter | <kaushalmodi> krux02: I'd think you'd mostly want => |
16:52:46 | Araq | but -> is for types, => for code |
16:52:57 | krux02 | yea I know |
16:53:40 | krux02 | I am not proposing to change anything here, but somehow I want => for types. I don't know why |
16:53:45 | * | jamesroseman quit (Ping timeout: 265 seconds) |
16:54:08 | * | Sentreen quit (Quit: WeeChat 1.6) |
16:54:15 | miran | if we're bikeshedding about nim's syntax, i'm still wanting to see `case foo of:` syntax instead of `case foo` and then "of" on each line :) |
16:54:49 | krux02 | I really liked lambda expressions when I was programming in scala. But now that I know that they are no as fast as loops, I use loops most of the time |
16:54:49 | Araq | no, we're bikeshedding about 'object of Foo <indentation>' only |
16:55:07 | * | endragor quit (Remote host closed the connection) |
16:55:08 | krux02 | but I am still thinging in all these terms of functional programming |
16:55:26 | miran | oh, so there is offtopic even in bikeshed, ouukaay :P |
16:55:49 | krux02 | map, filter, flatMap, slide |
16:56:11 | * | Sentreen joined #nim |
16:56:26 | krux02 | I don't know what I should think about an optional : for object definitons |
16:56:33 | miran | krux02: looping is faster than map/filter? in nim? |
16:56:38 | Demos[m] | well I want ⦂ for type |
16:56:44 | Demos[m] | but we can't get everything we want :D |
16:56:49 | krux02 | it wouldn't help nimpretty would it, I mean nimpretty would still need to detect the old syntax |
16:57:00 | Araq | I want generic .compilerProcs |
16:57:10 | Araq | krux02: nimpretty could patch it though. |
16:57:20 | * | jamesroseman joined #nim |
16:57:20 | * | Sentreen quit (Client Quit) |
16:57:25 | Araq | and then other tools can use the simpler rules |
16:58:01 | krux02 | not sure about it. |
16:58:04 | miran | speaking of nim tools (offtopic bikeshedding, part 2), could we get some warnings about unused imports? |
16:58:34 | krux02 | I am not sure if I want to use nimpretty in the first place. I have the feeling it will destroy my nicely aligned ascii art |
16:58:35 | Araq | miran: not anytime soon, the compiler doesn't track that at all |
16:59:27 | Araq | krux02: that's the best part of it. clear code is readable on its own merits, not because it's aligned with the statements that happen to follow it |
16:59:39 | * | Sentreen joined #nim |
16:59:57 | * | stefanos82 quit (Quit: Quitting for now...) |
16:59:58 | krux02 | well I like alignment |
17:00:07 | krux02 | I like aligned comments |
17:00:15 | krux02 | I like aligned type definitions |
17:00:31 | krux02 | I like aligned arguments and aligned commata |
17:00:39 | Araq | foo(a, b, c) |
17:00:48 | Araq | ba( x, y, z) |
17:01:13 | Araq | that's what you do, some random coincidence is exploited by you to make it "Look nice" |
17:01:20 | * | endragor joined #nim |
17:01:29 | * | Sentreen quit (Client Quit) |
17:01:46 | * | endragor quit (Remote host closed the connection) |
17:01:47 | * | Sentreen joined #nim |
17:03:21 | krux02 | http://ix.io/1hoY |
17:04:36 | krux02 | Araq: or this http://ix.io/1hp0 |
17:04:52 | krux02 | alignment here is acutally very important for readability |
17:05:33 | dom96 | That lack of whitespace in the argument list though :/ |
17:05:33 | krux02 | some things are just easier to process visally when they are aligned |
17:05:47 | krux02 | dom96: yes |
17:05:54 | krux02 | there could be more alignment :P |
17:06:17 | dom96 | well, I just mean 1 space after punctuation |
17:07:06 | krux02 | dom96: I think i did it, because the line became too long |
17:07:24 | krux02 | it is 90 characters |
17:07:28 | krux02 | already too wide |
17:07:39 | krux02 | but putting stuff on the next line I also didn't want to do |
17:07:58 | FromGitter | <amscotti> @Yardanico Sorry, just seeing your msg now. The Nim track was never enabled before as it’s been in beta in V1 of Exercism. I do think we are at the point to take the track out of Beta but I'm not sure what is needed for this beside setting `active` to `true`. |
17:08:21 | Araq | yeah, all terrible ascii art alignment code. but cool Nim allows it. |
17:08:56 | krux02 | Araq: ``go fmt`` does alignment for you. |
17:09:10 | Araq | but not in your style. |
17:09:34 | krux02 | that is true |
17:09:46 | krux02 | but this is aligned by go fmt https://golang.org/src/go/build/build.go?s=11872:14733#L367 |
17:10:09 | Demos[m] | clang-format does alignment in almost any style |
17:10:35 | Demos[m] | I don't like alignment since I program using flexable width fonts |
17:10:45 | krux02 | Araq: you can't denie it, alignment is something people care about. |
17:10:46 | Demos[m] | so I can't even tell if things are aligned anyways |
17:10:53 | miran | krux02: IMO, rather to have 2 characters "too wide" line, than no whitspace after punctuation |
17:11:15 | Araq | that style is "pretend it's a table and give up when it isn't", which is totally unconvincing. |
17:11:29 | Araq | code is not stored in tables. |
17:11:40 | FromDiscord | <exelotl> I like some alignment but this is too much `proc alloc* (size: Natural ): pointer` |
17:11:50 | Demos[m] | I just want to be able to add some format command to a git hook and forget about it tbh |
17:11:53 | * | jjido joined #nim |
17:12:26 | krux02 | Demos[m] or on saving the document. |
17:12:30 | krux02 | that is what I did in go |
17:12:38 | krux02 | every save the document was autoformated. |
17:12:42 | Demos[m] | yeah that works for me too |
17:13:15 | Demos[m] | sometimes I want to delay in c++ since I use lots of different editors at once (because *something* breaks every editor) |
17:13:16 | krux02 | I really liked that I could just add {} to mark a block, then go fmt did take over to indent or deindent the code |
17:13:53 | Demos[m] | yeah that can be really nice when you move control flow around |
17:14:09 | krux02 | seems trivial, but in c++ code you don't see in all editors when you accidently mix up spaces and tabs. |
17:15:33 | krux02 | so it is a big deal when there is a tool that automatically ensures the right indentation style. |
17:15:37 | Araq | I don't understand your position. so you live with go fmt even if it would destroy your ascii art, but can't adopt nimpretty because it would destroy your ascii art. double standard. |
17:16:17 | krux02 | well go fmt would at least preserve some of the alignment that I made |
17:16:21 | krux02 | not all of it |
17:17:23 | Demos[m] | in the end I think it's a LOT of effort to make these tools sutable for every style |
17:17:54 | Araq | that only means "go fmt" produces different results for identical ASTs, which is against "the one true style everything should look like" |
17:18:01 | Demos[m] | I just care that there is one |
17:18:12 | Demos[m] | (it also makes codegeneration easier (esp given the filter that has a {} style) |
17:18:26 | Demos[m] | since you can generate an unholy mess and then just format it |
17:18:34 | Araq | (but I agree with it, this "one true style" idea is quite terrible) |
17:20:28 | krux02 | does nim still allow the {} syntax? |
17:21:22 | krux02 | Demos[m] I think the {} syntax for code generation doesn't really matter for Nim, nim has macros. |
17:21:43 | krux02 | Go needs code generation, and that makes Go suck. |
17:24:42 | Araq | krux02: no, it doesn't. |
17:24:49 | Araq | removed that feature. |
17:25:39 | krux02 | were you scared that people actually used it? |
17:25:50 | krux02 | btw https://github.com/nim-lang/Nim/pull/8263 finally went through CI |
17:26:05 | krux02 | you can merge it (please) |
17:29:14 | krux02 | and last question: do you agree to split the create procs like I did is this PR https://github.com/nim-lang/Nim/pull/8337 |
17:29:42 | Araq | no, stop it. the create procs need to die. |
17:35:53 | fvs` | github down? |
17:36:50 | fvs` | ^^ angry pink unicorn |
17:38:31 | FromGitter | <rayman22201> Github definitely down: https://status.github.com/messages |
17:40:07 | FromGitter | <rayman22201> @Vindaar, if you are online, thanks for your explanations about the regex stuff! Makes a lot of sense now. I was afk this weekend longer than I expected (Stupid real life getting in the way of Nim :-P) |
17:40:24 | FromGitter | <Quelklef> holy moly |
17:41:30 | FromGitter | <Quelklef> is github being down worrisome |
17:41:34 | FromGitter | <Quelklef> feels worrisome to me |
17:42:15 | miran | why? |
17:43:14 | FromGitter | <Quelklef> because it's github! It's a monolith of stability in my life |
17:43:21 | FromGitter | <Quelklef> Also the last time I remember it being down was a big deal |
17:43:29 | FromGitter | <Quelklef> when it and a bunch of other big sites dropped |
17:44:14 | miran | that was amazon's fault, if we're thinking about the same thing (when "half of the internet" was down) |
17:44:32 | FromGitter | <Quelklef> Was it? I thought it was a ddos |
17:44:34 | FromGitter | <Quelklef> What happened? |
17:44:49 | miran | but even after that - the world returned back to normal quite soon. no reason to think this time would be different |
17:45:03 | FromGitter | <Quelklef> still slightly shaking |
17:45:29 | krux02 | Araq: when the create procs should die, then how is shared memory supposed to be allocateds |
17:46:03 | krux02 | Quelklef: github is down from time to time |
17:46:10 | krux02 | it's not the most stable system in the world |
17:46:19 | krux02 | and it won't be the last time |
17:46:34 | FromGitter | <Quelklef> Guess I just hadn't seen it before |
17:47:04 | krux02 | it's no that often though, and usually back online in no time. |
17:48:15 | FromGitter | <rayman22201> good thing git is decentralized :-P |
17:48:16 | miran | nim is back up |
17:48:21 | miran | oops, git |
17:48:30 | FromGitter | <Quelklef> magical |
17:48:35 | Araq | ugh, I feel stupid |
17:48:52 | Araq | cast[ptr NimSeqV2[T]](addr x).len = newLen is all it takes for what I need to do |
17:49:04 | Araq | one line of code... |
17:56:42 | FromGitter | <xmonader> Guys!! anyone successfully used libui ? I can't get anything to compile? |
17:56:54 | FromGitter | <xmonader> not with dynamic linking against the one my system even |
17:57:07 | * | DarkArctic joined #nim |
17:57:31 | FromGitter | <Quelklef> Can you give the error? |
17:57:41 | krux02 | Araq: By the way I tried to use lineinfo for symbol disabiguation |
17:57:45 | krux02 | doesn.t work at all |
17:57:50 | krux02 | I need the id |
17:58:54 | FromGitter | <xmonader> @Quelklef ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b4cdcde95e03e3d7b57306a] |
17:59:10 | * | PMunch joined #nim |
17:59:53 | krux02 | miran: git is always online. I think on the Linux kernel people still send patches by mail. |
17:59:55 | FromGitter | <Quelklef> `nim c -r "/home/striky/wspace/nim-tictactoe/src/nim_tictactoe.nim" d:useLibUiDll` |
18:00:02 | FromGitter | <xmonader> weird the examples in nim works fine... don't know why mine doesnt work |
18:00:04 | FromGitter | <Quelklef> did you mean `nim -d:useLibUiDll c -r "/home/striky/wspace/nim-tictactoe/src/nim_tictactoe.nim"` |
18:00:16 | FromGitter | <Quelklef> Arguments after `-r` are passed to the nim file |
18:00:19 | FromGitter | <xmonader> does the order of the switch matter? |
18:00:24 | FromGitter | <Quelklef> And it's `d:...` not `-d:...` |
18:00:29 | Araq | yes! |
18:00:31 | FromGitter | <xmonader> oops! thanks @Quelklef |
18:00:32 | miran | krux02: true :) i meant github, of course |
18:00:39 | FromGitter | <Quelklef> Sure |
18:01:10 | FromGitter | <xmonader> I copied it from the github https://github.com/nim-lang/ui#static-vs-dynamic-linking |
18:01:24 | Araq | lol no idea if you're serious or not. "send patches by mail" |
18:02:01 | krux02 | I am |
18:02:05 | krux02 | they do it |
18:02:33 | FromGitter | <xmonader> @Quelklef removing the nimcache directory and just reruning it works .. |
18:02:57 | FromGitter | <Quelklef> Problem solved then |
18:03:33 | FromGitter | <xmonader> yeah, but it's weird to that nimcache can really mess it up -_- |
18:03:49 | FromGitter | <Quelklef> ehhhhh |
18:03:56 | krux02 | I was just searching for an example of "patch by mail" and I found this: https://lkml.org/lkml/2012/7/6/495 |
18:04:04 | krux02 | Linus, charming as always |
18:04:05 | FromGitter | <Quelklef> I'm not super surprised |
18:04:27 | FromGitter | <Quelklef> it seems like the kind of thing that's useful but'd sometimes break things |
18:04:51 | Araq | that was 6 years ago. |
18:05:05 | krux02 | yea |
18:05:07 | krux02 | https://lkml.org/lkml/2018/7/10/1227 |
18:05:14 | krux02 | this is a patch by mail |
18:05:37 | krux02 | I think the actual patch file is hidden, because that is the web view of the mail, but the actual mail contained the patch |
18:08:24 | krux02 | emacs has a builtin command to format a patch and send it by mail |
18:08:40 | krux02 | providing a much better workflow than any github web api. |
18:09:12 | krux02 | Araq: can we talk again about the symID thing? |
18:09:52 | krux02 | thank you for merging nim_gdb.py |
18:09:55 | Araq | well it's an API, you can build a tool on top of it |
18:10:09 | krux02 | well, I can't |
18:10:19 | krux02 | because the api is not exposed |
18:10:34 | Araq | the github web API is exposed. |
18:10:41 | Araq | now ... back to symid |
18:10:55 | krux02 | last time I asked you to merget the PR, you said I could simply use lineinfo for disambiguation, but that doesn't work at all. |
18:11:21 | krux02 | ah github api you mean. Yes. |
18:11:29 | Araq | but the IDs don't work well either, unless you like long C compile times. |
18:11:49 | krux02 | well I am not generating C code :P |
18:11:54 | krux02 | I am generating glsl code |
18:12:55 | krux02 | currently I don't care that much about compile times |
18:13:03 | PMunch | Oops, nimble.directory seems to be down |
18:13:19 | krux02 | the slowest part in the compilation chain is the macro that generates the glsl code |
18:13:26 | krux02 | compiling the glsl code is almost instant. |
18:13:28 | PMunch | I just get this when I try to enter it: http://ix.io/1hps |
18:16:53 | krux02 | Araq: the symId is an easy fix that works now until macros can provide non ambiguous symbol names for code generation. |
18:17:32 | Araq | can't you append a gensym()ed name to create a non-ambiguous name? |
18:17:51 | krux02 | what do you mean? |
18:18:00 | krux02 | I am not creating the sym |
18:18:20 | krux02 | I am writing a glsl backend for Nim in a macro. |
18:19:34 | Araq | so where does the sym come from? |
18:20:07 | krux02 | from items |
18:20:31 | krux02 | wait, I try to reproduce something, but the ast is very different than it was before |
18:20:46 | krux02 | can it be that a typed macro does not inline a for loop anymore? |
18:22:16 | Araq | that wasn't changed |
18:22:53 | Araq | but I doubt this transformation was done reliably as for loop elimination is not even part of semantic checking |
18:24:05 | krux02 | Araq: well that is something that might be specified, because for me the for loop is eleminated or not eleminated |
18:25:54 | krux02 | Araq: In my code the for loop is eleminated, for some reasons |
18:25:58 | krux02 | and that causes problems |
18:26:20 | krux02 | because the ..< iterator creates a local variable `i` |
18:26:28 | krux02 | and the loop variable is also usually `i` |
18:30:19 | FromGitter | <Vindaar> @rayman22201 you're welcome! Always glad if I can help someone :) |
18:31:51 | * | jjido quit (Ping timeout: 260 seconds) |
18:33:16 | FromGitter | <xmonader> any idea how do i get the sender in libui on a btn click event? |
18:33:39 | * | NimBot joined #nim |
18:34:01 | FromGitter | <xmonader> in the c version u can https://github.com/andlabs/libui/blob/master/examples/timer/main.c#L53 but in nim the signature takes proc() with no params ? |
18:39:02 | * | krux02 quit (Quit: Leaving) |
18:39:06 | Araq | krux02: it really shouldn't expand the for loop :-/ |
18:39:40 | Araq | the spec for this doesn't exist, but that is clearly wrong. |
18:40:10 | Araq | xmonader: use a closure |
18:40:29 | Araq | but I don't remember if I added closure support to libui |
18:44:54 | miran | speaking of closures - fuck them and their bottlenecking! :D |
18:45:36 | miran | just refactored something, so now i don't have closures - instant 2x speedup |
18:48:37 | * | Vladar quit (Quit: Leaving) |
18:49:59 | FromGitter | <xmonader> @Araq how exactly? it takes a procedure onclick but ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b4ce8d7582aaa6307719385] |
18:51:30 | * | nsf quit (Quit: WeeChat 2.1) |
18:51:38 | FromGitter | <xmonader> problem is i can't get the object itself ⏎ and in ui.nim ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b4ce939c02eb83d7c810306] |
18:52:54 | FromGitter | <xmonader> maybe nim gtk is a better choice to use, and i'm already familiar with gtk apis |
19:02:29 | * | Trustable quit (Remote host closed the connection) |
19:06:01 | FromGitter | <Quelklef> @Araq sorry if this is nagging, but can you get back to me on https://github.com/nim-lang/Nim/pull/8176? I've made all requested changes (locally) but haven't pushed because of the performance issue. The optimizations I can think of would obscure the code to a point that feels like a terrible tradeoff |
19:07:21 | Araq | why do we need this whitespace stripping anyway |
19:07:28 | Araq | the code was fine without it. |
19:07:44 | FromGitter | <Quelklef> I added it because the HTML my changes generate has some nesting |
19:08:01 | FromGitter | <Quelklef> and IMO it's a pain to read having it condensed in the Nim code |
19:08:07 | FromGitter | <Quelklef> But also shouldn't be expanded in the generated HTML |
19:08:16 | FromGitter | <xmonader> I got it to work! ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b4ced2095e03e3d7b57b7b9] |
19:08:50 | FromGitter | <Varriount> Araq: I've had an awesome time with Nim. It's so nice running a program and not worrying about attribute errors. :D |
19:08:54 | FromGitter | <Quelklef> I can just remove the leading whitespace if you'd like |
19:09:52 | Araq | no, I want a clean patch, the code didn't touch the whitespace before. |
19:10:19 | Araq | and shouldn't afterwards because all that changed was how the {. .} thing is rendered. |
19:10:46 | FromGitter | <Quelklef> I meant remove the leading whitespace in the string literals |
19:12:00 | Araq | oh ok. |
19:12:08 | Araq | varriount: what are attribute errors? |
19:12:16 | FromGitter | <Quelklef> Cool. Thank you sir |
19:20:07 | dom96 | Bah, the fact that toStrLit renders Nim code with 4 spaces is blasphemy |
19:24:07 | * | krux02 joined #nim |
19:27:52 | dom96 | Thankfully Nim is happy with inconsistent indentation |
19:28:35 | miran | is something like this possible to do? `let myProc = if foo == 1: myFirstProc else: mySecondProc` |
19:28:56 | Araq | if they are campatible |
19:29:20 | FromGitter | <Quelklef> @miran that should work verbatim |
19:30:10 | miran | i'm asking because i get "type mismatch: got <proc (status: var int): typed> but expected 'proc (status: var int): typed'" |
19:30:31 | PMunch | Hmm, that is a strange error.. |
19:31:00 | miran | oh i think i know what's the problem, just a sec |
19:31:55 | miran | i had some templates, i need to refactor those to procs |
19:38:51 | miran | yup, now it works! sorry for the confusion |
19:38:57 | nixfreak | anyone using nimx for a project ? |
19:48:04 | * | tiorock joined #nim |
19:48:04 | * | tiorock quit (Changing host) |
19:48:04 | * | tiorock joined #nim |
19:48:04 | * | rockcavera quit (Killed (hitchcock.freenode.net (Nickname regained by services))) |
19:48:04 | * | tiorock is now known as rockcavera |
20:09:21 | * | arecacea1 quit (Read error: Connection reset by peer) |
20:09:45 | * | arecacea1 joined #nim |
20:17:26 | FromGitter | <mratsim> @nixfreak: nimx is used in Reel Valley, a 5 star Android, iOS and Facebook game written in pure Nim |
20:28:34 | * | miran quit (Ping timeout: 264 seconds) |
20:35:51 | skrylar | on the GUI front, also did some work on porting tablelayout to nim. |
20:36:40 | skrylar | https://github.com/EsotericSoftware/tablelayout its completely API agnostic, good for grids. |
20:41:50 | skrylar | (for the imgui fans, i really have no idea how you guys do layouts. only vaguely familiar with identity caching and such) |
20:52:44 | * | PMunch quit (Quit: leaving) |
20:54:41 | * | Sentreen quit (Quit: WeeChat 1.6) |
20:54:55 | * | Sentreen joined #nim |
20:57:17 | * | FromGitter quit (Remote host closed the connection) |
20:57:17 | * | oprypin quit (Quit: Bye) |
20:57:37 | * | FromGitter joined #nim |
20:57:44 | * | oprypin joined #nim |
20:58:01 | * | xylef joined #nim |
21:13:13 | * | Sentreen quit (Quit: WeeChat 1.6) |
21:13:30 | * | Sentreen joined #nim |
21:23:03 | * | Sentreen quit (Quit: WeeChat 1.6) |
21:23:22 | * | Sentreen joined #nim |
21:31:54 | FromGitter | <Varriount> Araq: In Python, attribute errors are what happen when you try to access an attribute an object doesn't have. |
21:35:46 | FromGitter | <xmonader> Anyone up? |
21:47:43 | FromGitter | <xmonader> Two more chapters in nimdays book https://xmonader.github.io/nimdays tictactoe, minmax, libui |
21:53:05 | * | jamesroseman quit (Ping timeout: 248 seconds) |
22:01:17 | * | rockcavera quit (Read error: Connection reset by peer) |
22:01:32 | * | rockcavera joined #nim |
22:01:33 | * | rockcavera quit (Changing host) |
22:01:33 | * | rockcavera joined #nim |
22:03:37 | FromGitter | <kaushalmodi> woh! Thanks @xmonader! |
22:07:10 | FromGitter | <xmonader> Didn't want to go on vacation with drafts on my laptop :) @kaushalmodi hope they're up to your expectations |
22:08:39 | * | nixfreak quit (Ping timeout: 252 seconds) |
22:08:54 | FromGitter | <kaushalmodi> *my* expectations? :P They are awesome! I have never coded a GUI so looking forward to trying out your tutorial. |
22:09:11 | FromGitter | <kaushalmodi> *They (your tutorials) |
22:13:43 | FromGitter | <xmonader> Thanks for your kind words, I'm no GUI expert too, this is the most complex gui thing i ever created https://github.com/xmonader/helloed/tree/master/src |
22:14:48 | FromGitter | <xmonader> I used to work on PIDA ide development and I was doing my own text editor in parallel too, GTK+ 2 and python |
22:26:56 | skrylar | i wouldn't call myself an expert, but i do seem to be working on a lot of foundations for guis these days <.< |
22:27:13 | * | cspar joined #nim |
22:29:17 | FromGitter | <xmonader> @skrylar like what? |
22:29:59 | skrylar | xmonader: table layout (generic layout component for any api), cobweb (FRP event routing for the events), nfltk (FLTK binding), glib/gobject |
22:30:52 | FromGitter | <xmonader> that's very interesting! i was actually searching for table layout for libui but i guess it's not gonna be added |
22:31:27 | FromGitter | <xmonader> I'd love to give fltk a try |
22:31:52 | skrylar | araq doesn't maintain libui anymore because it's well, not a great lib |
22:32:09 | skrylar | i also had a binding for it (bottlecap) but didn't publish it iirc, because i came to the same conclusion. it doesn't scale |
22:32:30 | FromGitter | <xmonader> it's annoying andlabs don't want to provide docs for it |
22:32:50 | Araq | well I'm willing to maintain it further if I would see the merit. |
22:32:53 | skrylar | if you aren't working on macs and don't mind the uglies, fltk is quite robust |
22:33:24 | Araq | as far as I'm concerned, the libui code should be ported to Nim, as a dependency it's tough |
22:33:28 | FromGitter | <xmonader> @Araq how about `lcl` instead |
22:33:47 | Araq | and then the problem with the lack of good event handling remains |
22:34:09 | skrylar | cobweb is shaping up, although current revision is closure-heavy |
22:34:14 | Araq | 'lcl'? lazarus' API? |
22:34:14 | FromGitter | <xmonader> @skrylar no macs, but i'm spoiled with Qt already :D |
22:34:22 | FromGitter | <xmonader> @Araq yea! |
22:34:40 | skrylar | lcl is in turn a wrapper around qt/winapi isn't it |
22:34:59 | Araq | wrapping that would be a ton of work and then you don't have their excellent UI builder. |
22:35:17 | skrylar | at least with gtk3 we can snarf glade |
22:35:21 | FromGitter | <xmonader> It'd be a really killer feature for nim if that happens |
22:35:35 | Araq | it's easier to "draw" the forms in Lazarus and call into Nim code |
22:36:00 | Araq | I've done that in the past |
22:36:28 | FromGitter | <xmonader> @Araq did u create a library in lazarus and linked against it in Nim? |
22:36:32 | FromGitter | <xmonader> in pascal* |
22:37:00 | skrylar | there were people wanting to sponsor a Qt binding at one point, although doing such things is an extreme pain |
22:37:02 | Araq | no, I linked the .o files produced by Nim into a lazarus project. worked. |
22:37:29 | FromGitter | <xmonader> very nice maybe should try that |
22:37:39 | Araq | could also turn the .o files into a static library. |
22:47:20 | * | fvs quit (Ping timeout: 276 seconds) |
22:48:20 | Araq | skrylar: checkout out what Trustable is building. a native widget set for Windows and Linux iirc |
22:48:47 | Araq | I mean comparable to how wxWidgets does it |
22:48:49 | skrylar | nimx? |
22:49:00 | Araq | no, not nimx. |
22:50:38 | skrylar | i feel like people have mentioned trustable to me on several occasions but it wasn't very far along |
22:51:59 | skrylar | i did a fun thing in go once, which had an unusual API. although i then learned unusual APIs are weird to deal with |
22:52:26 | skrylar | you could just make button objects and shove them where buttons should be, the backend turned that in to a command button, menu item or tool button depending on context |
23:00:41 | * | xet7 quit (Quit: Leaving) |
23:03:06 | * | jamesroseman joined #nim |
23:04:04 | Araq | skrylar: what I would do if I had the time, develop yet-another terminal emulator. however I would extend the escape sequences to "draw line/pixel/rect/whatever" primitives |
23:04:25 | skrylar | isn't that basically curses |
23:04:46 | Araq | no, it would offer a real canvas |
23:04:55 | Araq | with pixels and shit. |
23:05:26 | Araq | also needs some simple API to hand mouse cursor data to the client program. |
23:06:00 | skrylar | that just sounds like Processing or SDL tbh |
23:06:01 | Araq | I guess it would be a mixture of a terminal emulator and Wayland |
23:06:19 | Araq | yes "Just like", except |
23:06:29 | Araq | 1. it runs all command line apps out of the box. |
23:06:54 | Araq | 2. the canvas state is persistent just like the text in the terminal persists when the program dies. |
23:08:32 | skrylar | speaking of. |
23:08:56 | skrylar | bleh. should look in to processingjs and compare it to raylib. i saw some AI stuff using processing ot test visualizations and i wouldn't mind an easy way to do visualizations in nim |
23:09:15 | skrylar | nanovg and opengl do pretty well at it |
23:12:45 | * | jamesroseman quit (Ping timeout: 256 seconds) |
23:24:52 | krux02 | skrylar, I really hope to replace processing with my rendering library. But it isn't ready yet to replace it and it needs a new name. |
23:25:14 | krux02 | Thanks to apple andthing bith OpenGL is now badly framed |
23:32:51 | skrylar | i think one is meant to use vulkan going forward |
23:44:54 | * | jamesroseman joined #nim |
23:45:06 | benjikun | I'm trying to use the asyncHttpClient in `httpclient` and I'm having no luck |
23:45:13 | benjikun | are there any other examples other than the one on the docs? |
23:45:41 | FromGitter | <mratsim> dom96 chat app from his Nim in Action book |
23:47:43 | benjikun | That uses asyncnet |
23:50:19 | * | jamesroseman quit (Ping timeout: 260 seconds) |