00:02:18 | * | sz0 quit (Quit: Connection closed for inactivity) |
00:24:30 | * | MJCaley quit (Quit: MJCaley) |
00:45:51 | * | MJCaley joined #nim |
01:35:14 | * | SenasOzys__ quit (Read error: Connection reset by peer) |
01:35:16 | * | marenz__ quit (Ping timeout: 272 seconds) |
01:35:36 | * | SenasOzys joined #nim |
01:35:55 | * | radagast quit (Quit: radagast) |
01:42:25 | * | kalkin- quit (Remote host closed the connection) |
01:42:50 | * | kalkin- joined #nim |
01:43:21 | * | skelett quit (Read error: Connection reset by peer) |
01:43:29 | skrylar | varriount: did you ever have time to look over the sheet for miglayout and comment on it? |
01:43:45 | * | skelett joined #nim |
01:44:36 | * | SunDwarf quit (Remote host closed the connection) |
01:44:52 | * | SunDwarf joined #nim |
01:49:23 | * | vlad1777d quit (Ping timeout: 268 seconds) |
02:00:49 | * | user0 joined #nim |
02:00:59 | * | user0 is now known as radagast |
02:02:01 | radagast | Is there a forum where they review your algorithms and give you suggestions? |
02:02:24 | FromGitter | <zacharycarter> stackoverflo0w |
02:02:37 | radagast | Other than that? |
02:02:53 | FromGitter | <zacharycarter> if your implementation is written in Nim, you could always ask on the nim forums |
02:04:23 | skrylar | that might be programmer overflow, zacharycarter |
02:04:29 | FromGitter | <zacharycarter> truth |
02:04:39 | skrylar | if its a general algorithm question they tend to move it to compsci/math/programmer |
02:06:29 | FromGitter | <zacharycarter> Hrm, I need to spend some time over the holidays on this task scheduling system |
02:07:08 | skrylar | naughty dog also isn't relying on a GC, something to keep in mind |
02:07:19 | skrylar | if you use their system you have to account for that, unless you're just doing one-thread tasklets |
02:07:30 | skrylar | admittedly, one-thread fibers can get you very far |
02:07:34 | * | chemist69 quit (Ping timeout: 272 seconds) |
02:08:54 | FromGitter | <zacharycarter> yeah I think the shared memory approach you suggested the other day is probably the right approach, I just need to gain a better understanding of how to implement it |
02:20:36 | * | chemist69 joined #nim |
02:21:35 | skrylar | zacharycarter: depends on your model |
02:21:42 | skrylar | unity/godot style stuff is heavy on dynamic allocation |
02:22:01 | skrylar | i think the really old games, mayeb a few AAA ones, just sit down and go "we have a limit of N objects" and just preallocate them |
02:22:14 | skrylar | Starcraft had a global sprite limit (if you ran out of sprites, marines couldn't shoot) |
02:22:55 | FromGitter | <zacharycarter> didn't know that but it makes sense |
02:23:58 | skrylar | i don't know what Overwatch uses, but they coudl use similar. There's at most 16 people, and a very low numer of persistant elements |
02:24:13 | skrylar | So the whole game state without graphics is probably under 100kb, would definitely fit in a single block |
02:24:52 | skrylar | things like Minecraft or maybe Stardew Valley are where you start getting hosed. |
02:30:19 | FromGitter | <zacharycarter> right - lots of state to manage and pass around |
02:41:46 | FromGitter | <Varriount> skrylar: hm? |
02:42:18 | GitDisc | <awr> How do you import a C preprocessor variable into Nim? |
02:43:35 | FromGitter | <Varriount> awr: What are you trying to accomplish? |
02:44:09 | GitDisc | <awr> trying to get the GCC version |
02:44:26 | GitDisc | <awr> i think I'm gonna try this |
02:44:33 | GitDisc | <awr> {.emit: "int gccMajor = __GNUC__;".} |
02:44:34 | GitDisc | <awr> var gccMajor {.importc.}: cint |
02:48:30 | skrylar | const something {.importc: "__GNUC__".}? |
02:48:51 | FromGitter | <Varriount> That would probably be best |
02:48:53 | skrylar | never tried importing a constant, but i see no reason for it to be impossible |
02:49:22 | skrylar | Varriount: http://www.migcalendar.com/miglayout/mavensite/docs/cheatsheet.pdf |
02:50:04 | FromGitter | <Varriount> skrylar: Might behave oddly if it isn't bound to a variable. Macros have no types. |
02:50:19 | skrylar | true |
02:50:36 | GitDisc | <awr> const won't work without an assignment |
02:50:59 | FromGitter | <Varriount> Skrylar: The best test of such things is to apply it to real-world examples. |
02:50:59 | GitDisc | <awr> an assignment inside nim, I mean |
02:51:24 | skrylar | varriount: some java people use and recommend that. |
02:51:38 | skrylar | it's partly implemented in nim, just becoming a time suck to deal with all the edge features |
02:51:44 | FromGitter | <Varriount> "How would I use this to implement Slack/Windows Explorer/Chrome" |
02:53:07 | skrylar | awr: assign it to soem random value? the generated C code isn't going to use the value |
02:53:27 | FromGitter | <Varriount> skrylar: Well, it looks like a decent layout. |
02:54:37 | skrylar | there are some other options but trying to understand simplex-based engines was difficult |
02:54:54 | GitDisc | <awr> i set it to 0, didn't work |
02:55:04 | GitDisc | <awr> the emit and var works |
02:55:06 | * | radagast quit (Quit: radagast) |
02:55:21 | skrylar | just never ever write to the var :) |
02:56:17 | GitDisc | <awr> lol |
02:56:24 | * | radagast joined #nim |
03:05:04 | FromGitter | <Ajusa> I am trying to concat the nimbase.h and my generate main.c file, and then trying to run with gcc, but I am getting a few errors that I don't know how to solve. ⏎ ⏎ ```undefined reference to `setStackBottom' ⏎ undefined reference to `systemInit000'``` [https://gitter.im/nim-lang/Nim?at=5a39d35f232e79134d6ea0c6] |
03:07:32 | FromGitter | <gogolxdong> How to new a table to add any type of key:value combination? |
03:13:42 | FromGitter | <Quelklef> what? |
03:13:58 | FromGitter | <Quelklef> are you trying to make an untyped table or something? |
03:14:21 | FromGitter | <gogolxdong> or pointer something |
03:14:35 | FromGitter | <Quelklef> er, what for |
03:15:00 | FromGitter | <Quelklef> sounds like you're trying to circumvent type safety |
03:15:03 | FromGitter | <Quelklef> which is questionable |
03:16:52 | FromGitter | <gogolxdong> As a parameter passed in ,it will be added with key:value pairs of many type,like string:string string:int string:float |
03:18:11 | FromGitter | <Quelklef> Do something like |
03:19:02 | FromGitter | <Quelklef> ```type KeyType = string | int ⏎ type ValType = string | int | float``` ⏎ ⏎ Then parameterize the table with `[KeyType, ValType]`. [https://gitter.im/nim-lang/Nim?at=5a39d6a6a2be466828c1d8e7] |
03:19:19 | FromGitter | <Quelklef> is probably what you want |
03:19:32 | FromGitter | <gogolxdong> ok,that's kind of work around. |
03:19:47 | FromGitter | <Quelklef> would it be better in your situation to create a container type? |
03:19:50 | FromGitter | <Quelklef> like, a C union |
03:19:58 | FromGitter | <Quelklef> that'd feel weird |
03:20:01 | FromGitter | <Quelklef> What's the context? |
03:20:36 | FromGitter | <gogolxdong> I put translating a bunch of PHP API to Nim |
03:20:54 | FromGitter | <Quelklef> Ah. Well, sounds like a lot of it's gonna be workarounds then |
03:21:34 | FromGitter | <Quelklef> If there's no abstraction that you can make for this, |
03:21:55 | FromGitter | <Quelklef> That is, if there's no new datatype you can make that makes sense abstractly and works well in the code, |
03:22:18 | FromGitter | <Quelklef> I'd say just emulate a C union |
03:23:41 | FromGitter | <Quelklef> unless you don't actually need to be aware of their types, in which case use the `KeyType` / `ValType` |
03:24:13 | FromGitter | <ephja> type classes are compile time only |
03:24:16 | FromGitter | <ephja> https://nim-lang.org/docs/manual.html#types-object-variants ? |
03:24:52 | FromGitter | <Quelklef> right, so good if he doesn't need to be aware of type, ye? |
03:31:29 | * | MJCaley quit (Quit: MJCaley) |
03:36:13 | * | astronavt joined #nim |
03:43:16 | FromGitter | <Ajusa> I am still trying to get one compilable file output from Nim. I even tried using the C++ backend output, but I get the same error. I looked it up, and the last time someone else had the same request as me Araq said no :P |
03:44:07 | skrylar | it might be possible to do something like a unity build, although i haven't tried and unity builds don't *always* work |
03:44:25 | skrylar | for instance if a file does a local #define and doesn't undo it, then unity builds can bork |
03:45:54 | FromGitter | <Ajusa> Unity as in Unity 3d? |
03:46:22 | skrylar | no, unity builds mean you have one file that just #includes the other .c files |
03:46:27 | skrylar | sqlite calls it an amalgamation |
03:46:36 | skrylar | its equivalent to cat'ing the C files together |
03:47:45 | FromGitter | <Ajusa> I basically did that by hand (I believe) and I got a few errors of things being undefined. I have heard of amalgamation before, thanks for expanding on that |
03:48:11 | skrylar | that was a linker error. it means you didn't get the file (or library) which included the symbols |
03:49:38 | FromGitter | <Ajusa> I have the main.c and the nimbase.h, what else could I need? |
03:50:30 | skrylar | ls nimcache/*.c |
03:53:08 | * | dddddd quit (Remote host closed the connection) |
03:53:51 | FromGitter | <Ajusa> Okay, so I have main.c and stdlib_system.c |
03:56:26 | FromGitter | <Ajusa> `````` |
03:56:55 | FromGitter | <Ajusa> that is the error I am getting now. |
03:57:16 | FromGitter | <Ajusa> actually never mind, it compiled! |
03:58:17 | * | zama quit (Ping timeout: 255 seconds) |
03:58:46 | FromGitter | <Ajusa> any way to make the final c file smaller? My actual code is 2kb, but the stdlib_system is 115kb. ⏎ I realize that this may be a stupid question. |
03:59:25 | * | zama joined #nim |
04:00:26 | FromGitter | <gogolxdong> initTablestring,Node () as https://nim-lang.org/docs/manual.html#types-object-variants implied , assignment becomes tricky , like ``` ⏎ var secretIdNode = Node(kind: nkString,strVal: secretId) ⏎ paramTable["SecretId"]= secretIdNode ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=5a39e059a2be466828c1fbfa] |
04:03:20 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a39e08c03838b2f2a16d16b] |
04:03:20 | FromGitter | <gogolxdong> hints me type mismatch |
04:13:02 | * | BitPuffin|osx joined #nim |
04:20:17 | * | marchon joined #nim |
04:20:38 | marchon | Hello there new friends. |
04:21:10 | marchon | After reading a couple of articles about nim - I would like to use it to prototype a project. |
04:21:33 | marchon | I am struggling with a couple of things, and was hoping to get some pointers. |
04:22:10 | marchon | I would like a crossplatform app that uses a traybar for user interaction. |
04:22:44 | marchon | The stat is UI elements seems rough around the edges. |
04:23:45 | marchon | It seems like I should be trying to use sciter / in theory. but can quite figure out where to start. |
04:25:00 | marchon | I prototyped what I wanted for a traybar app on osx with rumps. |
04:25:01 | marchon | https://github.com/jaredks/rumps |
04:25:23 | marchon | but do know see that there is a py2nim convertor. |
04:25:49 | marchon | should I try to hand code that converstion myself, or use one of the python wrapper methods to try to call it? |
04:28:49 | * | kalkin-- joined #nim |
04:30:25 | marchon | any thoughts? |
04:32:35 | * | kalkin- quit (Ping timeout: 265 seconds) |
04:42:09 | * | radagast quit (Ping timeout: 248 seconds) |
04:55:36 | * | astronavt quit (Quit: Leaving...) |
04:56:42 | * | marchon quit (Quit: marchon) |
04:58:16 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
05:17:56 | * | marchon joined #nim |
05:20:19 | * | marchon left #nim (#nim) |
05:42:28 | * | SenasOzys quit (Ping timeout: 240 seconds) |
06:01:39 | * | nsf joined #nim |
06:06:28 | * | SenasOzys joined #nim |
06:13:40 | * | nyeaa joined #nim |
06:41:56 | * | Elronnd joined #nim |
07:08:34 | * | solitudesf joined #nim |
07:10:48 | * | jjido joined #nim |
07:19:06 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
07:21:39 | * | skrylar quit (Remote host closed the connection) |
07:24:13 | * | jjido joined #nim |
07:52:25 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
07:55:57 | FromGitter | <mratsim> The codebase is small so maybe try porting it? |
07:57:30 | FromGitter | <mratsim> Or you can fork the repo and replace functionalities by Nim little by little until everything is replaced: https://github.com/yglukhov/python, https://github.com/jboy/nim-pymod |
08:06:40 | * | SenasOzys quit (Remote host closed the connection) |
08:07:18 | * | SenasOzys joined #nim |
08:08:45 | * | PMunch joined #nim |
08:19:54 | * | Zardos quit (Quit: Page closed) |
08:20:29 | * | Zardos joined #nim |
08:24:09 | * | Vladar joined #nim |
08:25:14 | * | claudiuinberlin joined #nim |
08:25:28 | * | gokr quit (Ping timeout: 240 seconds) |
08:28:37 | * | couven92 joined #nim |
08:39:08 | * | floppydh joined #nim |
08:41:39 | * | gokr joined #nim |
08:44:20 | GitDisc | <awr> wow slurp() and gorge() are really awesome |
08:44:22 | GitDisc | <awr> but uh |
08:44:27 | GitDisc | <awr> what's the story behind their names? |
08:47:43 | FromGitter | <gogolxdong> How to fetch the value of Node in Table[string,Node] which Node defines as manual instructs ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a3a23afba39a53f1a8139bd] |
08:51:07 | * | kalkin-- quit (Quit: Leaving) |
08:51:17 | GitDisc | <awr> oh a few other langauges (perl 6?) call their readFile string function "slurp()" |
08:53:32 | FromGitter | <alehander42> @gogolxdong what do you call "the value of Node" |
08:54:02 | FromGitter | <alehander42> you can define a `$` function if you want to just get some representation of each object |
08:56:05 | FromGitter | <gogolxdong> I have considered `$` ,even define such a operator still face to fetch the value of Node like C union mechanism. |
08:56:53 | FromGitter | <alehander42> well yeah, that's the point of a variant, you have to define what happens in each branch |
08:57:32 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a3a25fb03838b2f2a180042] |
08:58:28 | FromGitter | <gogolxdong> like this pseudocode |
08:58:33 | FromGitter | <alehander42> so, if you define a `$` method, you'll be able to just `var v = $value` |
08:58:40 | FromGitter | <alehander42> but I am not sure what you want to do |
08:58:49 | FromGitter | <alehander42> if you want to do something different with ints and floats |
08:59:05 | FromGitter | <alehander42> then having a case or if would be needed anyway |
09:01:46 | FromGitter | <gogolxdong> yeah,this pseudocode is invalid |
09:02:31 | FromGitter | <alehander42> I know, ok, what you want to do in of nkInt: |
09:03:02 | * | gmpreussner quit (Ping timeout: 255 seconds) |
09:04:57 | * | gmpreussner joined #nim |
09:05:39 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a3a27e3540c78242de7c981] |
09:07:14 | FromGitter | <gogolxdong> ```code paste, see link``` ⏎ ⏎ this works [https://gitter.im/nim-lang/Nim?at=5a3a28425355812e57f909fd] |
09:07:16 | FromGitter | <alehander42> that wouldn't make sense, as all those fields are different types |
09:07:40 | FromGitter | <alehander42> yes, well, exactly, just move this to a function and you have your `$` which you can reuse later |
09:17:25 | * | Arrrr joined #nim |
09:30:47 | * | radagast joined #nim |
09:37:26 | * | couven92 quit (Ping timeout: 260 seconds) |
09:49:46 | FromGitter | <mratsim> @awr I think it's usual name in some foreign world (JavaScript tooling?) But yeah I agree that's so weird. |
09:52:26 | * | yglukhov joined #nim |
09:52:39 | * | yglukhov quit (Remote host closed the connection) |
09:52:55 | * | yglukhov joined #nim |
09:55:37 | * | geocar joined #nim |
09:58:52 | * | PMunch_ joined #nim |
10:00:18 | * | skrylar joined #nim |
10:00:57 | * | PMunch quit (Ping timeout: 256 seconds) |
10:02:43 | * | PMunch_ is now known as PMunch |
10:04:09 | * | SenasOzys quit (Ping timeout: 265 seconds) |
10:08:03 | FromGitter | <gogolxdong> @Araq Is there an example of your libcurl to fetch the curl result? I've checked the c version from many blogs bug don't quite get it. |
10:08:14 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a3a368e5355812e57f9557f] |
10:10:18 | Araq | don't use libcurl, use the standard library |
10:14:04 | * | SenasOzys joined #nim |
10:14:20 | FromGitter | <gogolxdong> Please shed more light, didn't get a clue how to. |
10:15:24 | * | Yardanico joined #nim |
10:16:23 | * | jjido joined #nim |
10:20:47 | FromGitter | <andreaferretti> there is an `httpclient` module in the standard library |
10:21:09 | * | Zardos quit (Quit: Page closed) |
10:21:44 | FromGitter | <gogolxdong> Yes, I just got it . |
10:21:49 | FromGitter | <gogolxdong> thanks |
10:33:16 | * | def- quit (Quit: -) |
10:35:59 | * | def- joined #nim |
10:46:18 | skrylar | gogolxdong getting data from libcurl requires setting a callback |
10:46:51 | skrylar | https://gist.github.com/Skrylar/9c735f4a6e50c5778e02054ac1a8cfe0 |
10:47:24 | skrylar | i'm fully aware that i could probably use movemem to copy the data out |
10:52:42 | * | PMunch_ joined #nim |
10:54:21 | * | PMunch quit (Ping timeout: 264 seconds) |
10:58:17 | * | PMunch_ quit (Ping timeout: 265 seconds) |
11:03:32 | skrylar | balls. gettype{impl,inst} isn't giving me the ast for a type in a macro |
11:03:48 | * | marenz__ joined #nim |
11:04:14 | niv | hello. what's the cleanest way to have a string "enum" that can be used in case (somestring) of ..? |
11:05:19 | * | PMunch joined #nim |
11:08:54 | niv | nvm, found my answer in strutils |
11:09:23 | skrylar | ah the good old gettype(gettype(x)[1]) :\ |
11:16:37 | skrylar | mratsim: well, slight poop. turns out macros-as-pragmas don't work on object fields |
11:17:09 | FromGitter | <mratsim> Yes they don't there is a feature request for custom pragmas for types and object fields |
11:17:23 | skrylar | i would be happy with go tags tbh |
11:17:50 | FromGitter | <mratsim> https://github.com/nim-lang/Nim/issues/6696#issuecomment-346831813 |
11:18:44 | skrylar | flatpack doesn't really need pragmas, as long as you never re-order fields or delete old ones it will work fine |
11:19:28 | * | jjido quit (Ping timeout: 240 seconds) |
11:19:40 | skrylar | well flatbuffers |
11:22:03 | skrylar | well, with a (non-standard) adapter module you could probably get away with no pragmas in a flatbuffer |
11:22:09 | * | arthurz quit (Ping timeout: 248 seconds) |
11:22:30 | * | arthurz joined #nim |
11:22:35 | skrylar | stuff the schema as a json or a flatbuffer in a separate sbox field, then have a scanner compare the two and build a converter |
11:27:15 | FromGitter | <data-man> Hi! ⏎ How to list only directories? I have tried to use walkDirRec("./", {pcDir}) but it doesn't work. |
11:29:44 | skrylar | mratsim: https://github.com/Skrylar/skflatbuffers/issues/2 |
11:34:42 | * | Yardanico quit (Read error: Connection reset by peer) |
11:39:05 | * | Yardanico joined #nim |
11:40:35 | skrylar | mratsim: hoboy. was just thinking about a memory allocator, mmaped file, and this silliness, you could sorta achieve a generic ACID blob module |
11:41:21 | * | craigger quit (Ping timeout: 248 seconds) |
11:43:31 | * | PMunch quit (Ping timeout: 256 seconds) |
11:43:45 | skrylar | the real question is, does anyone actually need transactional binary files -_- probably, no |
11:44:02 | * | PMunch joined #nim |
11:45:09 | radagast | What is a good data structure, for strings, to be used by a text editor? Rope? Trie? |
11:45:18 | skrylar | gap buffers |
11:46:39 | skrylar | ropes are really handy if you are Sublime Text and are doing multiple carets, or splicing a LOT of text, but most edits are around one point and gap buffers solve that simply |
11:46:50 | skrylar | https://www.finseth.com/craft/ relevant |
11:47:29 | radagast | >https://www.finseth.com/craft/ Thanks! I actually have this page loaded in my browser |
11:55:15 | FromGitter | <data-man> @radagast ⏎ https://en.wikipedia.org/wiki/Piece_table |
12:09:24 | * | Yardanico quit (Read error: Connection reset by peer) |
12:09:37 | * | xkapastel quit (Quit: Connection closed for inactivity) |
12:09:45 | * | craigger joined #nim |
12:10:04 | * | Ne0t0N joined #nim |
12:12:07 | * | Yardanico joined #nim |
12:21:37 | FromGitter | <alehander42> oh I started using strformat |
12:21:47 | FromGitter | <alehander42> so much better than `% [..]` everywhere |
12:21:52 | Yardanico | :) |
12:22:26 | FromGitter | <alehander42> still `%` seems good for some multiline templates |
12:24:54 | Araq | '%' is for runtime stuff, fmt"" is resolved at compile-time |
12:25:31 | Araq | btw there is also strutils.format |
12:25:50 | Araq | echo format("$#: $#", a, b) # no need for $s |
12:26:18 | Araq | echo fmt"{a}: {b}" is much shorter though |
12:27:16 | FromGitter | <alehander42> I know `%` happens on runtime, but I usually don't need dynamic templates (I just use it to join strings with expressions) |
12:27:34 | Araq | now if only typing of output instructions would be a bottleneck for me ... |
12:27:35 | * | Snircle joined #nim |
12:28:52 | * | jjido joined #nim |
12:29:14 | FromGitter | <alehander42> :D it's bottleneck in reading usually. |
12:29:15 | Araq | yay after VS-Code update it cannot find my git.exe anymore, fun |
12:29:32 | * | Ne0t0N quit (Quit: Page closed) |
12:29:33 | Araq | but it's "faster" now |
12:29:47 | Araq | at starting up |
12:30:16 | Araq | I only start it once though and need its git integration ... |
12:31:19 | Yardanico | Araq, can https://github.com/nim-lang/Nim/issues/4218 be finally closed? I think everything from it is implemented in current Nim |
12:35:39 | Araq | sure, done |
12:38:30 | * | floppydh quit (Quit: WeeChat 2.0) |
12:40:10 | * | floppydh joined #nim |
12:47:08 | * | arthurz quit (Ping timeout: 255 seconds) |
12:47:20 | * | arthurz joined #nim |
12:50:33 | * | Arrrr1 joined #nim |
12:50:33 | * | Arrrr quit (Disconnected by services) |
12:50:40 | * | Arrrr1 quit (Client Quit) |
13:04:34 | * | skrylar quit (Remote host closed the connection) |
13:14:03 | * | freevryheid joined #nim |
13:14:09 | * | jjido quit (Ping timeout: 264 seconds) |
13:14:11 | * | freevryheid is now known as fvs |
13:15:42 | fvs | hi, any "nearest neighbor" algos in nim? Need to find closest P(x,y) to point cluster. |
13:16:09 | Yardanico | fvs, well they aren't hard to port from python usually |
13:16:41 | * | Yardanico quit (Read error: Connection reset by peer) |
13:17:58 | FromGitter | <data-man> @fvs: See closestPoint in the basic2d package |
13:19:46 | * | Yardanico joined #nim |
13:23:29 | fvs | data-man: thanks, closestPoint looks like it runs a brute-force search, not viable for huge point clusters. |
13:31:05 | fvs | hmm, found this: http://rosettacode.org/wiki/K-d_tree - I'll try porting the c verison. |
13:32:08 | * | dddddd joined #nim |
13:38:08 | * | dddddd quit (Ping timeout: 240 seconds) |
13:50:14 | FromGitter | <mratsim> @fvs cool! @Stefansalewski also started a port of rtree which are also used for geocoordinates algorithm |
13:51:46 | FromGitter | <mratsim> @dom96 @araq, I think there is an opportunity for "1 year in Nim" blog article. Should we open a RFC for subject ideas? |
13:52:38 | FromGitter | <mratsim> @fvs I'll add you there as soon as you have a GitHub repo: https://github.com/nim-lang/needed-libraries/issues/77 |
13:53:18 | * | Jesin quit (Quit: Leaving) |
13:53:19 | * | dddddd joined #nim |
14:00:06 | FromGitter | <zacharycarter> fvs: there are a lot of good algorithms for detecting nearest neighbors in a graph |
14:00:06 | * | yglukhov quit (Read error: Connection reset by peer) |
14:00:19 | * | yglukhov joined #nim |
14:00:33 | FromGitter | <zacharycarter> I guess it depends mostly on your requirements as to which you'd want to use |
14:07:02 | fvs | mratsim: i made a start on the gdal geospatial library: https://github.com/freevryheid/nim-gdal. Only vector funcs atm. |
14:07:25 | FromGitter | <RedBeard0531> In a proc that takes a non-var seq, is it possible to get the address of elements in the seq? I assume `unsafeAddr someImmutableSeq[0]` will return the address of the temporary T that is returned by [], which is no good. This is necessary in order to do a simd load of the data. |
14:08:45 | FromGitter | <zacharycarter> I don't think you can use unsafeaddr on non-pointers |
14:08:51 | FromGitter | <mratsim> `unsafeAddr yourseq[10]` |
14:09:06 | FromGitter | <mratsim> Will get the address of the 11th elements. |
14:09:16 | FromGitter | <zacharycarter> @mratsim he said non-var seq though |
14:09:31 | FromGitter | <mratsim> Yes. It works. |
14:09:35 | * | FromGitter * RedBeard0531 goes off to double check the codegen... |
14:09:45 | FromGitter | <zacharycarter> `````` |
14:09:52 | Yardanico | but seq is copied, no? |
14:09:57 | FromGitter | <zacharycarter> does not compile for me |
14:10:16 | FromGitter | <mratsim> For non-var primitive types it wouldn't but seq are managed by GC they always have an address |
14:10:19 | FromGitter | <zacharycarter> what's the difference between addr and unsafeaddr |
14:10:38 | Yardanico | with unsafeaddr you can take an adress of a "let" variable for example |
14:10:40 | FromGitter | <zacharycarter> because ⏎ ⏎ ```let foo = @[1,2,3] ⏎ ⏎ echo repr unsafeaddr foo[0]``` [https://gitter.im/nim-lang/Nim?at=5a3a6f605355812e57faa5a6] |
14:10:41 | FromGitter | <zacharycarter> compiles |
14:10:41 | FromGitter | <mratsim> addr won't give you an address of non-var. |
14:10:42 | Yardanico | or non-var variables in procs |
14:10:53 | FromGitter | <zacharycarter> ah okay thank you for the clarification |
14:11:32 | FromGitter | <mratsim> unsafeAddr cannot get you addresses of let on the stack (int, float, etc) |
14:15:28 | FromGitter | <RedBeard0531> @mratsim that worked. Thanks! Is that because seq[] is a compiler magic and the compiler knows not to create the return value rvalue if it is passed to unsafeAddr? |
14:15:56 | FromGitter | <RedBeard0531> Because otherwise the types just don't line up... |
14:15:59 | FromGitter | <mratsim> @RedBeard0531 @Yardanico addr and unsafeAddr are magic, it doesn't copy. It says instead of returning this, give me its address. |
14:16:14 | Yardanico | I was talking not about addr copying |
14:16:26 | Yardanico | I was talking about copying if you pass something to proc :) |
14:16:37 | Yardanico | I know that addr gives an address |
14:16:38 | FromGitter | <RedBeard0531> arguments are never copied |
14:16:59 | FromGitter | <mratsim> ^ |
14:17:14 | FromGitter | <RedBeard0531> (if the copy is expensive) |
14:17:37 | FromGitter | <RedBeard0531> ints and such are passed by copy because it is dumb not to |
14:22:53 | FromGitter | <RedBeard0531> I was curious the limits to this. Tuples up to 3 ints are passed by copy. Tuples with 4 ints or more are passed by (implicit) ptr. |
14:23:53 | * | couven92 joined #nim |
14:24:34 | floppydh | I'm using a "table-literal" like this: `const A = { "ASD": 10 }` now I'm trying to do `if "ASD" in A: ...` yet it fails compiling - any pointers? |
14:25:03 | * | yglukhov quit (Remote host closed the connection) |
14:25:33 | * | PMunch quit (Ping timeout: 264 seconds) |
14:28:08 | Yardanico | floppydh, did you import tables? |
14:28:19 | Yardanico | ah |
14:28:23 | Yardanico | you didn't even use them :) |
14:28:36 | Yardanico | table-literal is just a [(key, val)] |
14:29:06 | Yardanico | if you want to actually use tables - use "tables" module |
14:29:16 | Yardanico | {} is just a shortcut |
14:29:35 | FromGitter | <RedBeard0531> @Araq you may want to consider dropping the threshold for reference passing to anything over 2 ints (16bytes) on non-windows x86_64 since the c compiler will pass by reference implicitly. From page 21 of the ABI: "If the size of the aggregate exceeds two eightbytes and the first eightbyte isn’t SSE or any other eightbyte isn’t SSEUP, the whole argument ⏎ is passed in memory." |
14:29:35 | FromGitter | ... https://software.intel.com/sites/default/files/article/402129/mpx-linux64-abi.pdf |
14:29:36 | Yardanico | floppydh, https://nim-lang.org/docs/manual.html#statements-and-expressions-table-constructor |
14:29:58 | floppydh | Yardanico: thanks |
14:33:17 | Araq | RedBeard0531: I increased the threshold recently because it helps clang's optimizer |
14:34:23 | radagast | Why is incremental GC better than deferred ref counting (or vice versa)? |
14:36:28 | FromGitter | <RedBeard0531> @Araq: interesting. As long as there's a reason for the discrepancy, that seems fine. It only affects tuples with exactly 3 ints anyway. |
14:36:36 | floppydh | Yardanico: can't have a const Table tho? |
14:40:18 | Yardanico | floppydh, you can |
14:41:11 | floppydh | Yardanico: `const mymap = { ... }.newTable` => invalid type for const: TableRef |
14:41:17 | Yardanico | floppydh, yes |
14:41:21 | Yardanico | you need to use toTable instead |
14:41:35 | Yardanico | you can't have const references (newTable creates a reference to a table) |
14:41:51 | floppydh | Yardanico: true, thanks |
14:42:03 | * | PMunch joined #nim |
14:42:14 | FromGitter | <zacharycarter> radagast - maybe read the comments here : https://news.ycombinator.com/item?id=11759762 |
14:42:21 | * | yglukhov joined #nim |
14:42:30 | * | yglukhov quit (Remote host closed the connection) |
14:42:34 | FromGitter | <zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a3a76da1a4e6c822330e1db] |
14:47:45 | FromGitter | <mratsim> "It is well known" sounds like a reasoning by authority (not discussing the conclusion but source). |
14:48:31 | FromGitter | <mratsim> 1) This doesn't discuss the trade-off of latency/max-pause vs throughput. |
14:48:37 | Araq | mratsim: the JVM and .NET started with reference counting and moved to tracing GCs. |
14:48:39 | FromGitter | <mratsim> +* |
14:49:00 | Araq | latency with simple RC is unbounded |
14:49:34 | FromGitter | <mratsim> I only believe in benchmarks :P. |
14:49:52 | Araq | so run koch boot -d:release vs koch boot -d:release --gc:markAndSweep |
14:50:32 | Yardanico | btw - https://blog.canya.com.au/2017/12/20/canya-acquires-majority-stake-in-bountysource-adds-over-46000-users/ |
14:51:45 | Araq | mratsim: for your use case RC should win though, you want to reuse that 300MB blobs as soon as possible ;-) |
14:53:30 | FromGitter | <mratsim> Btw I tried debugging the allocation/deallocation SIGSEGV yesterday, but it is really hard to isolate. Will continue in the evening. |
14:57:56 | FromGitter | <RedBeard0531> Is --gc:markAndSweep precise with heap objects? Meaning does it avoid scanning strings or seq[int] and similar for pointers? |
14:58:54 | Araq | of course |
15:00:20 | FromGitter | <RedBeard0531> just checking. I was a bit thrown by your comment the other day that one of the things you wanted to get out of the llvm backend was a precise GC. I guess that just refers to the stack? |
15:03:44 | * | fvs left #nim ("ERC (IRC client for Emacs 25.3.1)") |
15:10:04 | * | yglukhov joined #nim |
15:11:12 | Araq | yes |
15:11:45 | floppydh | I somehow fail to have a proc allocate the return type of a var of a non-ref object type ... |
15:12:23 | floppydh | along `proc foo: var Bar = new(result)` where `Bar` is just a normal object |
15:12:39 | Araq | don't use 'var' here |
15:12:55 | floppydh | I want to return a ref tho |
15:13:04 | Yardanico | it would return a ref |
15:14:04 | floppydh | so I can use `ref Bar` but that requires me to deref it to access members? |
15:14:46 | Araq | that's not how the language works, read the tutorials at least |
15:15:32 | * | sz0 joined #nim |
15:17:28 | * | Jesin joined #nim |
15:18:14 | FromGitter | <zacharycarter> I wonder why - https://github.com/pragmagic/nimue4 were seemingly abandoned in favor of the godot bindings |
15:18:24 | FromGitter | <mratsim> result will be constructed directly in the assignee `let your car: Bar = foo()` won't copy even if it's a non-ref object. |
15:18:48 | FromGitter | <mratsim> yourvar* |
15:20:02 | FromGitter | <data-man> Will try to ask again. ⏎ How to list only directories? I have tried to use walkDirRec("./", {pcDir}) but it doesn't work. ⏎ Is this my mistake or a bug in the implementation? |
15:20:06 | * | yglukhov quit (Remote host closed the connection) |
15:20:13 | floppydh | mratsim: don't follow |
15:20:39 | floppydh | I read the `Reference and pointer types` section in tut1 and am not any wiser |
15:21:05 | floppydh | I assume I could define a `type BarRef = ref Bar` and that would work |
15:21:06 | Araq | zacharycarter: UE4 doesn't work well on mobile and has bugs in its UI subsystem |
15:21:16 | floppydh | but I'm not trying to do that |
15:21:25 | Yardanico | floppydh, what you're trying to do? |
15:22:03 | FromGitter | <zacharycarter> Araq: gotcha |
15:22:30 | floppydh | Yardanico: I have a `type Bar = object` from another module, now I want a proc that constructs a Bar and returns a ref to it, so I can use it in further `proc doSomeWithbar(b: var Bar)` calls |
15:22:34 | FromGitter | <zacharycarter> @data-man : ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a3a803a03838b2f2a1a0c49] |
15:22:41 | FromGitter | <zacharycarter> says directories are ignored |
15:22:54 | FromGitter | <zacharycarter> https://nim-lang.org/docs/os.html#walkDirRec.i,string |
15:23:10 | Yardanico | floppydh, you don't need to have a "var Bar" if you have a ref variable |
15:23:14 | Yardanico | ah |
15:23:20 | FromGitter | <mratsim> @floppydh don't use new, you don't need to worry about passing it as a var. |
15:23:21 | Yardanico | then you would need to use "ref Bar" |
15:23:31 | Yardanico | or better - create "type BarRef = ref Bar" |
15:23:32 | floppydh | mratsim: oh I see, let me try |
15:23:40 | floppydh | Yardanico: I'm trying not to do that |
15:24:37 | FromGitter | <mratsim> `proc initBar(): Bar = Bar(field1: value)` |
15:24:44 | floppydh | mratsim: type mismatch got `ref Bar` but expected one of `var Bar` |
15:25:03 | floppydh | I guess I would need to change the signature of the doSomeWithBar procs to `ref Bar` too |
15:25:15 | * | yglukhov_ joined #nim |
15:25:34 | FromGitter | <mratsim> I don't think you need ref. |
15:25:34 | Araq | data-man: it's a bit weird but 'filter' is only used for traversal, not for 'yield'. Probably it shouldn't support 'filter' at all |
15:26:20 | FromGitter | <mratsim> `proc useBar(a: var Bar)= ...` |
15:26:39 | floppydh | mratsim: I do because the doSomeWithBar proc changes bar - now I get: "for a 'var' type a variable needs to be passed, but initBar() is immutable" |
15:27:04 | FromGitter | <mratsim> No you don't, assign it to a var. |
15:27:08 | floppydh | I'm basically doing `doSomeWithBar(newBar())` |
15:27:14 | floppydh | I don't want to do that tho |
15:27:26 | floppydh | I guess I could write a template |
15:27:33 | floppydh | its in a unittest thing |
15:27:33 | FromGitter | <mratsim> But you can't modify something that has no address. |
15:27:53 | floppydh | which is why I want my newBar to return a var/ref :3 |
15:28:47 | FromGitter | <mratsim> Assign it first, then modify it then check if your test passed no? That would mimics how your library is used I suppose. |
15:28:57 | floppydh | yes |
15:29:54 | floppydh | so we conclude that it's not possible without putting it in a var first? |
15:30:28 | FromGitter | <mratsim> `var tmp = initBar(); doSthWithBar(tmp); check: tmp == ...` (I'm on mobile so I sert new lines) |
15:30:31 | floppydh | just trying to match what seems to be a conceptual misunderstanding of mine |
15:30:34 | FromGitter | <RedBeard0531> @floppydh: does doSomeWithBar() modify its argument in a way that the caller is expected to see? If not, don't take Bar by var. |
15:30:56 | Araq | mutate(4) vs var x = 4; mutate(x) |
15:30:57 | floppydh | RedBeard0531: it does |
15:31:27 | Araq | you cannot modify the number 4 |
15:31:30 | floppydh | its: mutate(newIntThatReturnsARef(4)) vs var x = 4; mutate(x) |
15:32:23 | FromGitter | <data-man> @zacharycarter @Araq Thanks. That is, there is no way to get a list of dirs by std procs. |
15:32:28 | floppydh | so `var T` is not a valid return type? |
15:32:42 | Araq | data-man: sure there is, os.walkDir |
15:32:46 | FromGitter | <mratsim> But after your mutate since nothing owns newIntThatreturnsARef(4) what can you do with it? |
15:33:07 | Araq | 'var T' is a valid return type, it opens a view into some existing data structure |
15:33:26 | Araq | it's never valid as a return type for a constructor though |
15:33:38 | floppydh | I, think I, see |
15:34:27 | floppydh | mratsim: sure, nothing, but you get my use-case I'm just trying to save a stmt :P |
15:35:11 | FromGitter | <mratsim> You will have the same issue in any language actually, you can mutate a variable (change its value), you can't mutate a value (mutate(4)) of Araq. |
15:35:40 | FromGitter | <mratsim> In hardware term you can mutate what a memory location holds |
15:36:42 | FromGitter | <data-man> @Araq: os.walkDir is not recursive :( |
15:36:43 | floppydh | mratsim: that's not what I'm doing tho, I'm calling a function that I expect to return a reference, because mutate expects reference-semantics, not value-semantics |
15:37:07 | FromGitter | <mratsim> var deals with that for you. |
15:37:35 | FromGitter | <mratsim> value vs reference in Nim is only relevant for assignment/copy. |
15:37:51 | floppydh | mratsim: ah |
15:38:11 | FromGitter | <mratsim> If you declare a variable as var, and pass it to a var parameter Nim will pass a hidden pointer for you. |
15:38:39 | FromGitter | <mratsim> So you're worrying too much ;) |
15:38:47 | FromGitter | <RedBeard0531> @floppydh: it is technically possible to do what you want but it is probably a bad idea. I take no responsibility if this formats your harddrive: ```proc foo(a: var int) = discard ⏎ proc bar(): int = 4 ⏎ proc badIdea(a:int): var int = (unsafeAddr a)[] ⏎ ⏎ foo(badIdea(bar())) ... [https://gitter.im/nim-lang/Nim?at=5a3a8406a2be466828c54f57] |
15:41:55 | FromGitter | <data-man> @Araq: Maybe to add one more parameter to walkDirRec? Or one more flag. |
15:42:25 | FromGitter | <mratsim> Oh @floppydh if you understood (and have the time), it would be great if you add it to Nim wiki on GitHub because I suppose others who'll come to Nim from languages that worry about ByVal/ByRef might find it valuable. |
15:44:01 | * | couven92 quit (Ping timeout: 248 seconds) |
15:47:20 | * | safvav712t85 quit (*.net *.split) |
15:51:38 | floppydh | mratsim: sure, don't think I fully understood it tho, might have the time in the future to revisit, I'll see what I can do |
16:02:05 | * | safvav712t85 joined #nim |
16:05:23 | * | Senketsu quit (Remote host closed the connection) |
16:07:48 | * | Senketsu joined #nim |
16:29:24 | * | Arrrr joined #nim |
16:29:24 | * | Arrrr quit (Changing host) |
16:29:24 | * | Arrrr joined #nim |
16:33:43 | * | PMunch quit (Ping timeout: 265 seconds) |
16:36:35 | FromGitter | <nitely> According to the manual "Constants cannot be of type ptr, ref, var or object", and yet objects *seem* to work (object variants do not). So, which is it? can or can not be a const? |
16:38:07 | FromGitter | <nitely> I could as well just use a tuple, but I'm curious about it |
16:41:16 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
16:43:21 | FromGitter | <nitely> https://play.nim-lang.org/?gist=5f4c92ab7b54ea08e80e626f69e68bd3 |
16:43:46 | Yardanico | nitely: this is fixed in devel |
16:43:51 | Yardanico | constants can be of type "object" |
16:44:00 | Yardanico | https://github.com/nim-lang/Nim/blob/3d69c1bd0b877b36a4568860274c362c5cbae6fb/doc/manual/stmts.txt#L202 |
16:44:21 | * | claudiuinberlin joined #nim |
16:44:26 | * | claudiuinberlin quit (Client Quit) |
16:44:45 | Yardanico | always check devel to see if it has the same error or not :) |
16:44:51 | FromGitter | <nitely> ah, awesome! thanks |
16:44:57 | FromGitter | <nitely> will do |
16:45:41 | Yardanico | btw Crystal is finally able to compile/run hello world on windows - https://github.com/crystal-lang/crystal/pull/5339 |
16:48:12 | Arrrr | mmm |
16:51:41 | FromGitter | <alehander42> I am still not sure what took them so long |
16:52:04 | Arrrr | Someone with free time and knowledge it seems |
16:52:43 | FromGitter | <alehander42> hm, it appeared in 2014, I somehow assumed it started 2009 or something |
17:06:11 | GitDisc | <NopeDK> I am trying to interface with a binary with the Nim code as a shared library this it imports. I keep getting SIGSEGV when I attempt to access an extern struct field that is a pointer to an array of structs. I tried to declare it as both with and without "incompleteStruct", tried declaring the field as both "ptr Worker" and "UncheckedArray[Worker]". In the first I can't compile and in the second it <message clipped> |
17:06:31 | * | zahary_ quit (Quit: Connection closed for inactivity) |
17:10:09 | euantor | @Yardanico: Still half of their stdlib doesn't work though I believe |
17:10:24 | Yardanico | euantor, yes, they just ported the things needed to run hello world :) |
17:10:39 | euantor | Do they still have compilation issues too due to how they use LLVM? Last time I heard they were using insane amounts of memory to compile |
17:10:53 | Yardanico | well I don't know about that, never used crystal personally :) |
17:11:37 | euantor | I think they had an issue on their repository saying that building Crystal itself was impossible on 32 bit machines and took ages on 64 bit |
17:11:43 | euantor | Might be making it up though |
17:12:31 | FromGitter | <alehander42> yep, I was doing a benchmark once, and while debug mode worked quickly, release mode took forever |
17:12:39 | FromGitter | <alehander42> not sure about the memory tho |
17:12:46 | * | Trustable joined #nim |
17:14:21 | euantor | https://github.com/crystal-lang/crystal/issues/4864 |
17:14:28 | euantor | ^ Kind of explains a bit of the issue |
17:15:56 | euantor | https://github.com/crystal-lang/crystal/issues/4341 |
17:19:43 | GitDisc | <NopeDK> Code example for my problem: https://pastebin.com/Bf6gJUpw |
17:34:39 | FromGitter | <zacharycarter> NopeDK - do you have your C code handy? |
17:34:47 | FromGitter | <zacharycarter> and if so, can you also share it? |
17:36:29 | * | claudiuinberlin joined #nim |
17:41:25 | * | nsf quit (Quit: WeeChat 1.9.1) |
17:59:46 | GitDisc | <NopeDK> zacharycarter, https://github.com/NopeDK/Nimgi and https://github.com/unbit/uwsgi |
18:04:04 | GitDisc | <NopeDK> Just a tiny project to get started with Nim properly xD Just need to get past the C interfacing issues... |
18:05:04 | * | floppydh quit (Quit: WeeChat 2.0) |
18:13:25 | FromGitter | <zacharycarter> Hrm I'm trying to produce a shared library from uwsgi and not having much luck :/ |
18:17:49 | GitDisc | <NopeDK> What I did was compile uwsgi as a core build (no plugins), compile corerouter and http as plugins. Compile the Nim code as per the cfg and move the library file into the uwsgi folder and rename it to nimgi_plugin.so |
18:20:49 | * | Trustable quit (Remote host closed the connection) |
18:22:50 | * | safvav712t85 quit (Ping timeout: 260 seconds) |
18:28:41 | * | Arrrr quit (Ping timeout: 256 seconds) |
18:30:14 | * | Vladar quit (Quit: Leaving) |
18:33:40 | * | yglukhov_ quit (Remote host closed the connection) |
18:36:24 | * | yglukhov joined #nim |
18:39:08 | GitDisc | <NopeDK> I have updated the repo with new files and instructions on how I use them. |
18:41:03 | * | yglukhov quit (Ping timeout: 248 seconds) |
18:41:11 | * | benoliver999 quit (Quit: ZNC - http://znc.in) |
18:50:15 | * | benoliver999 joined #nim |
18:53:41 | * | foo_ quit (Ping timeout: 268 seconds) |
18:58:30 | GitDisc | <NopeDK> zacharycarter, I have added a script that should handle the necessary installation if you are on Linux (and have the equivalent of "build-essentials", "gcc" and "python" installed already) |
19:00:14 | FromGitter | <zacharycarter> NopeDK: cool - thank you for doing that. I'll have a look this evening for sure |
19:03:16 | GitDisc | <NopeDK> Thank you for being willing to help |
19:15:37 | * | foo_ joined #nim |
19:30:35 | * | yglukhov joined #nim |
19:32:52 | FromGitter | <RedBeard0531> What is the best way to serve up a local copy of the devel docs? I tried just using a static http server in doc/html, but the search functionality doesn't work. Is there a server compiled somwhere? |
19:34:57 | * | yglukhov quit (Ping timeout: 240 seconds) |
19:37:50 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
19:38:04 | Yardanico | RedBeard0531: use devdocs.io maybe? :) and about search - it just uses js |
19:38:33 | * | yglukhov joined #nim |
19:38:57 | Yardanico | or wait |
19:39:08 | Yardanico | ah yes |
19:39:19 | Yardanico | it just downloads theindex.html from the server and uses js to search in it |
19:40:15 | * | Vladar joined #nim |
19:41:10 | * | fvs joined #nim |
19:41:40 | dom96 | wassup guys? |
19:41:54 | FromGitter | <RedBeard0531> @Yardanico but that is for master not devel |
19:42:05 | FromGitter | <RedBeard0531> I wanted to show someone strformat :) |
19:42:52 | fvs | while waiting for a native version, here's a wrapper for a kd-tree lib: https://github.com/freevryheid/nim-kdtree |
19:42:54 | Yardanico | but I think devel uses the same search function |
19:43:28 | Yardanico | you just need to generate it |
19:44:04 | Yardanico | buildIndex |
19:44:14 | Yardanico | "nim buildIndex" |
19:45:13 | Yardanico | hmm wait |
19:46:02 | * | yglukhov quit (Read error: Connection reset by peer) |
19:46:38 | * | yglukhov joined #nim |
19:52:28 | FromGitter | <ephja> badger badger badger badger badger badger badger badger |
19:54:51 | Yardanico | ? |
19:55:11 | * | BitPuffin|osx quit (Ping timeout: 248 seconds) |
19:59:13 | * | claudiuinberlin joined #nim |
20:11:49 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
20:18:28 | * | foo_ quit (Ping timeout: 265 seconds) |
20:27:47 | FromGitter | <mratsim> @Araq regarding the bug reported yesterday, it’s too difficult to investigate reproduce. While narrowing down a test case, I needed to keep some very rare conditions in my code otherwise it just disappeared: ⏎ ⏎ 1) the times module, ⏎ 2) a let variable that goes unused, ⏎ 3) a function that returns a constant instead of just a constant, ... [https://gitter.im/nim-lang/Nim?at=5a3ac7c3540c78242deb5954] |
20:28:16 | * | nsf joined #nim |
20:31:01 | FromGitter | <mratsim> So giving up for now. Plus it was only happening when benchmarking different implementations of the same algorithm so I can just use one that never triggers this bug. |
20:31:22 | FromGitter | <zacharycarter> there's a discord for Nim right? |
20:31:25 | * | yglukhov quit (Remote host closed the connection) |
20:31:25 | FromGitter | <zacharycarter> does anyone have a link? |
20:32:21 | Yardanico | yep |
20:32:38 | Yardanico | one sec |
20:32:41 | FromGitter | <zacharycarter> thx |
20:33:18 | Yardanico | https://discord.gg/ezDFDw2 |
20:33:21 | FromGitter | <zacharycarter> thank you |
20:42:09 | * | vivus joined #nim |
20:46:14 | * | claudiuinberlin joined #nim |
21:00:45 | * | Yardanico quit (Read error: Connection reset by peer) |
21:08:54 | * | MollyTheSizzler_ joined #nim |
21:17:58 | * | MollyTheSizzler_ quit (Quit: Page closed) |
21:19:01 | * | vlad1777d_ joined #nim |
21:23:34 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:32:28 | GitDisc | <Calinou> here I am, the world record holder on the Nim snake game |
21:35:15 | * | foo_ joined #nim |
21:37:04 | * | yglukhov joined #nim |
21:39:51 | * | foo_ quit (Client Quit) |
21:40:26 | FromGitter | <mratsim> I bow to your supremacy |
21:43:01 | * | claudiuinberlin joined #nim |
21:54:24 | GitDisc | <Knob Ed> |
21:58:06 | GitDisc | <NopeDK> Is there any fast way to update a Nim installation in place? |
22:04:52 | GitDisc | <Calinou> if it's compiled from source, yes, `git pull && ./koch boot -d:release && ./koch nimble -d:release && ./koch nimsuggest -d:release` |
22:05:06 | GitDisc | <Calinou> (this works if the `bin` directory in the Git clone is in the `PATH` environment variable) |
22:06:49 | * | xkapastel joined #nim |
22:08:16 | GitDisc | <NopeDK> Darn, only got the csources version. Oh well, time to start the download |
22:10:37 | * | Vladar quit (Quit: Leaving) |
22:19:13 | * | solitudesf quit (Ping timeout: 248 seconds) |
22:20:10 | FromGitter | <mratsim> or just use choosenim |
22:20:25 | FromGitter | <mratsim> then update is just `choosenim update devel` |
22:20:47 | * | nsf quit (Quit: WeeChat 1.9.1) |
22:21:21 | GitDisc | <NopeDK> Got an open issue on choosenim, doesn't work on arm |
22:21:37 | GitDisc | <NopeDK> Would have loved to use it though |
22:29:00 | * | Jesin quit (Quit: Leaving) |
22:34:08 | GitDisc | <treeform> Wow so many new people from discord. Hey guys. |
22:37:32 | * | claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com) |
22:38:44 | Calinou | I'm also on IRC (and technically Gitter, but I never check there) :) |
22:45:31 | * | drs joined #nim |
23:21:10 | GitDisc | <treeform> D has this blog post about name mangling ( https://news.ycombinator.com/item?id=15970052 ), but I just don't get it. One of the comment says "Hashing + lookup seems much less error prone." ? It seems like it is? What does nim do? |
23:22:52 | * | nyeaa quit (Quit: leaving) |
23:30:31 | FromGitter | <RedBeard0531> There are definitely advantages to a reversible name-mangling scheme |
23:56:08 | FromGitter | <zacharycarter> I've been trying to convert all the godot users to Nim :P |
23:56:50 | FromGitter | <zacharycarter> to me anyway - it seems like the best language available for writing gameplay code |