00:23:32 | * | asdflkj_ quit (Ping timeout: 272 seconds) |
00:23:37 | * | Tanger quit (Ping timeout: 256 seconds) |
00:24:22 | * | asdflkj_ joined #nim |
00:31:18 | * | Generic2 joined #nim |
00:32:00 | * | abm quit (Read error: Connection reset by peer) |
00:46:39 | * | asdflkj_ quit (Quit: WeeChat 2.8) |
00:46:55 | * | asdflkj_ joined #nim |
00:47:36 | * | j is now known as jess |
00:54:06 | * | Tanger joined #nim |
00:57:46 | * | vicfred quit (Quit: Leaving) |
01:13:06 | * | njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
01:13:27 | * | njoseph joined #nim |
02:15:07 | * | vsantana joined #nim |
02:20:53 | FromDiscord | <Varriount> How much forethought was given to the design of fusion's API? |
02:28:56 | * | mwbrown quit (Ping timeout: 272 seconds) |
02:33:43 | * | mwbrown joined #nim |
02:37:39 | FromDiscord | <ElegantBeef> Probably not much 😄 |
02:37:40 | FromDiscord | <Hi02Hi> does anyone know why some langs have immutable strings? i cant see any benefits over having mutable strings but an immutable variable |
02:42:48 | FromDiscord | <claude> some languages only have references, when your strings are immutable you can intern them etc |
02:56:35 | FromDiscord | <Hi02Hi> intern? |
02:56:42 | FromDiscord | <Varriount> Cache them |
02:57:15 | * | giaco joined #nim |
03:00:24 | FromDiscord | <Varriount> @Hi02Hi With a mutable string implementation, you either have to do one of the following:↵ - Keep track of all locations in memory the string's address is held at.↵ - Represent strings as double pointers (a pointer to a pointer of string data).↵ - Copy the string on assignment (make sure there is only ever one reference to it in memory. |
03:02:47 | FromDiscord | <Varriount> This is because the location a string's data is held at can change, if the string is reallocated (which is often done when adding to the string). |
03:03:58 | FromDiscord | <Varriount> The location an immutable string's data is held at is constant, so none of the above is needed. |
03:06:02 | FromDiscord | <Varriount> As an example, I believe that (from a very simplified point of view) Python's lists use double pointers, while the strings use single pointers. |
03:07:48 | FromDiscord | <Varriount> @ElegantBeef Did I miss anything? |
03:07:53 | FromDiscord | <ElegantBeef> About? |
03:08:12 | * | Generic2 quit (Quit: Generic2) |
03:08:15 | FromDiscord | <Varriount> Mutable vs immutable strings |
03:08:23 | FromDiscord | <ElegantBeef> I'm not that smart to know anything |
03:17:17 | * | vicfred joined #nim |
03:23:45 | FromDiscord | <ElegantBeef> What's the proper way around this? https://play.nim-lang.org/#ix=2PA5 |
03:26:41 | FromDiscord | <flywind> related https://github.com/nim-lang/Nim/issues/7831 |
03:26:42 | FromDiscord | <ElegantBeef> Proper minification https://play.nim-lang.org/#ix=2PA6 |
03:27:22 | FromDiscord | <flywind> It seems that closure iterators don't support openarray/varargs. |
03:29:04 | Prestige | Well that's interesting |
03:30:02 | * | a_chou joined #nim |
03:43:56 | * | asdflkj_ quit (Ping timeout: 240 seconds) |
03:51:10 | FromDiscord | <ElegantBeef> Isnt this a better solution? https://play.nim-lang.org/#ix=2PA8 |
04:13:00 | * | pbb quit (Remote host closed the connection) |
04:14:25 | * | pbb joined #nim |
04:31:42 | ForumUpdaterBot | New thread by Halloleo: Exception hierarchy, see https://forum.nim-lang.org/t/7513 |
04:33:42 | ForumUpdaterBot | New thread by Halloleo: Defects and CatchableErrors, see https://forum.nim-lang.org/t/7514 |
04:35:49 | FromGitter | <offbeat-stuff> Hi I have a list of constanst of form vkErrorName |
04:37:06 | * | a_chou quit (Remote host closed the connection) |
04:37:15 | FromGitter | <offbeat-stuff> if want to genCode like this ` ⏎ proc error(x: VkResult)= # type of these error ⏎ ⏎ ``` case x ⏎ of vkErrorName: echo "[Vk Error] Name"``` ⏎ ... [https://gitter.im/nim-lang/Nim?at=602b4bfb7ba8124e546a5928] |
05:04:41 | * | sz0 quit (Quit: Connection closed for inactivity) |
05:24:42 | FromGitter | <offbeat-stuff> Hi This fails to compile https://play.nim-lang.org/#ix=2PAq ⏎ Saying that error can only be done at compile time |
05:33:40 | FromGitter | <offbeat-stuff> Here I set it up for the playground ⏎ https://play.nim-lang.org/#ix=2PAr |
05:44:30 | * | haxscramper joined #nim |
05:45:51 | ForumUpdaterBot | New thread by Halloleo: Access to the lines numbers in the trace of an exception, see https://forum.nim-lang.org/t/7515 |
05:48:32 | * | sz0 joined #nim |
05:48:45 | FromDiscord | <haxscramper> In reply to @Varriount "How much forethought was": For pattern matching we have an RFC that was discussed on and off for a couple of months, and other libraries are not that big, but they do have quite clean API in my opinion, because fusion is designed to be an "extended stdlib" and so some standard of quality is expected still |
05:49:28 | FromDiscord | <haxscramper> In reply to @ElegantBeef "Probably not much 😄": So that is not correct, at least for the fusion parts I'm familliar with |
05:52:17 | * | vicfred quit (Quit: Leaving) |
05:53:09 | FromDiscord | <PizzaFox> is there not a way to combine two `Table`s? |
05:55:31 | FromDiscord | <haxscramper> there is `merge` for count tables, but for regular ones I'm afraid you would have to add elements one-by-one |
05:59:16 | * | avanderneut quit (Read error: Connection reset by peer) |
06:02:32 | * | j-james joined #nim |
06:05:17 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
06:19:41 | * | ddevault_ joined #nim |
06:19:48 | * | ddevault quit (Ping timeout: 260 seconds) |
06:21:25 | * | ddevault_ is now known as ddevault |
06:23:53 | FromGitter | <awr1> has generated Nim C code ever discovered gcc/clang/etc. compiler bugs |
06:37:05 | haxscramper | Most likely no, gcc/clang are really stable compilers |
06:39:56 | haxscramper | Is there a way to show sink inference annotations like with `--expandArc`? |
06:46:24 | FromDiscord | <Gaz> What does doAssert do? |
06:47:03 | * | j-james quit (Quit: WeeChat 3.0) |
06:53:58 | FromDiscord | <haxscramper> Same as `assert` but is always turned on |
06:54:21 | FromDiscord | <haxscramper> Regular `assert` can be disabled with `--assertions:off` |
07:04:13 | FromDiscord | <impbox> hmm what's a nice way to take say three (or more) seqs A,B,C, and produce all possible combinations of them. A1,B1,C1, A1,B1,C2, A1,B2,C1, etc... |
07:05:29 | FromDiscord | <impbox> I think maybe that's what zip does? |
07:08:46 | FromDiscord | <impbox> `A = @[a1,a2,a3]; B = @[b1,b2,b3]; C = @[c1,c2]; ` and I want to get `@[a1,b1,c1], @[a1,b1,c2], @[a1,b2,c1], @[a1,b2,c2], @[a1,b3,c1] ... etc` |
07:11:59 | FromDiscord | <haxscramper> For getting all permutations we have https://nim-lang.org/docs/algorithm.html#nextPermutation%2CopenArray%5BT%5D , though you probably need to loop through all possible index combinations |
07:13:12 | FromDiscord | <haxscramper> which we don't have built-in stdlib iterator for |
07:13:26 | FromDiscord | <impbox> ok, thanks, i'll implement one |
07:19:11 | * | Tanger quit (Quit: Leaving) |
07:34:25 | * | wasted_youth2 quit (Quit: Leaving) |
07:44:55 | * | teasea quit (Quit: teasea) |
07:45:18 | * | teasea joined #nim |
07:47:36 | FromDiscord | <Varriount> timotheecour: is there anything regarding my commentary on isAdmin[0] that I should know?↵[0] https://github.com/nim-lang/Nim/pull/17012#issuecomment-778834934 |
07:57:51 | haxscramper | `fusion/smartptrs` does not allow creation of the new shared/unique pointers from existing ones - I think this should be allowed too, especially considering this would allow to hook up desctructors to C libraries, which IMO is kind of useful. Right now creating unique pointer from pointer creates `UniquePtr[ptr T]` and destructor is not recognized. |
07:58:43 | haxscramper | And in general it does not make much sense to create unique pointer to pointer, so adding overload for `newUniquePtr(p: sink ptr T)` make sense to me |
08:21:20 | haxscramper | Also now we have **four** different set implementations in stdlib - built-in `set`, `IntSet`, `PacketSet[T]` and `HashSet[T]` |
08:21:30 | * | PMunch joined #nim |
08:42:03 | FromDiscord | <mratsim> what's a packedset? |
08:43:06 | haxscramper | https://nim-lang.github.io/Nim/packedsets.html |
08:43:07 | haxscramper | > The packedsets module implements an efficient Ordinal set implemented as a sparse bit set. |
08:43:16 | haxscramper | Identical to `set[T]` but for larger ordinals |
08:44:37 | FromDiscord | <mratsim> it's identical to intsets not to set |
08:44:52 | haxscramper | You can add arbitrary ordinals to `IntSet`? |
08:44:53 | haxscramper | |
08:45:00 | FromDiscord | <Gaz> In reply to @haxscramper "Same as `assert` but": So what does assert do? |
08:45:28 | haxscramper | IIRC you can't add any ordinal to `IntSet`, at least without casting to `int` first |
08:45:40 | FromDiscord | <haxscramper> In reply to @Gaz "So what does assert": https://nim-lang.org/docs/assertions.html#assert.t%2Cuntyped%2Cstring |
08:45:44 | FromDiscord | <mratsim> In reply to @haxscramper "You can add arbitrary": it's basically a copy of intset, look at the datastructures |
08:46:07 | FromDiscord | <mratsim> replace "int" by "T" |
08:46:26 | haxscramper | yes I know it is implemented similarly internally, but this does not mean two different modules are the same etc. |
08:46:38 | haxscramper | But `IntSet` is/should-be deprecated then |
08:46:42 | FromDiscord | <mratsim> we're missing as an actual packed set that is not sparse https://github.com/mratsim/constantine/blob/master/constantine/elliptic/ec_endomorphism_accel.nim#L148-L181 |
08:46:49 | FromDiscord | <mratsim> packed set is misleading |
08:54:09 | FromDiscord | <mratsim> raised an issue: https://github.com/nim-lang/Nim/issues/17057 |
09:08:56 | * | vsantana quit (Ping timeout: 240 seconds) |
09:21:13 | * | wasted_youth2 joined #nim |
09:32:59 | FromDiscord | <tomck> Hello↵Setting --gc=arc for some reason removes deepCopy, which means i can't compile any libs which use deepCopy (e.g. parsetoml)↵any mention of this / workarounds? |
09:35:42 | FromDiscord | <ElegantBeef> `--deepcopy:on|off` |
09:40:46 | FromDiscord | <tomck> ah - any reason why this is off on arc builds |
09:40:52 | FromDiscord | <tomck> (edit) "builds" => "builds?" |
09:41:31 | FromDiscord | <tomck> sent a code paste, see https://play.nim-lang.org/#ix=2PB9 |
09:41:48 | FromDiscord | <tomck> sent a code paste, see https://play.nim-lang.org/#ix=2PBa |
09:42:04 | FromDiscord | <tomck> same error for `--deepcopy=on` (with = instead of 🙂 |
09:42:08 | FromDiscord | <tomck> (edit) "🙂" => ": )" |
09:46:09 | FromDiscord | <Solitude> whats your nim version? |
09:46:32 | FromDiscord | <tomck> 1.3.5 |
09:46:40 | FromDiscord | <Solitude> its in 1.4.0 |
09:46:49 | FromDiscord | <tomck> a h |
09:46:50 | FromDiscord | <Solitude> why are you on old devel? |
09:47:10 | FromDiscord | <tomck> err i needed a compiler fix for something a while back, never upgraded further |
09:50:22 | FromDiscord | <Clyybber> Intset is nothing more than an alias to PackedSet[int] |
09:52:08 | * | abm joined #nim |
09:58:21 | FromDiscord | <Gaz> sent a long message, see https://paste.rs/qm3 |
09:58:27 | FromDiscord | <Gaz> (edit) "http://ix.io/2PBg" => "http://ix.io/2PBf" |
09:58:38 | FromDiscord | <ElegantBeef> Yes we use type inference in Nim |
09:59:20 | FromDiscord | <ElegantBeef> It'd be more correct to do `let name = readlineStuffHere` |
09:59:33 | FromDiscord | <ElegantBeef> Since you will probably not have any need to mutate name |
10:08:52 | * | Vladar joined #nim |
10:10:19 | * | pietroppeter joined #nim |
10:47:39 | * | quadrassel4321 joined #nim |
10:47:47 | * | quadrassel4321_ joined #nim |
10:48:00 | * | quadrassel4321_ quit (Client Quit) |
10:48:09 | FromDiscord | <haxscramper> sent a long message, see http://ix.io/2PBw |
10:48:16 | * | quadrassel4321 quit (Client Quit) |
10:48:27 | FromDiscord | <haxscramper> Also, should `xmltree` from fusion be preferred over the one in stdlib? (`IIRC` parsehtml was moved from stdlib to fusion, but I'm not sure about other XML-related parts) |
10:48:37 | * | quadrassel4321 joined #nim |
10:53:01 | FromDiscord | <haxscramper> In reply to @haxscramper "I'm writing fusion article": Maybe there is some rawsugar library on nimble already (or maybe some library has helpers like that) |
11:02:26 | FromDiscord | <iWonderAboutTuatara> So I have a question about using the compiler output |
11:02:48 | FromDiscord | <iWonderAboutTuatara> When trying to run the c output manually, it says it can't find nimbase.h |
11:02:54 | FromDiscord | <iWonderAboutTuatara> where is it? |
11:03:07 | FromDiscord | <iWonderAboutTuatara> and is there any way to make a dependencyless output file? |
11:03:17 | FromDiscord | <iWonderAboutTuatara> of c or cpp |
11:03:27 | FromDiscord | <iWonderAboutTuatara> alternatively can I make stdin work with nimjs |
11:25:03 | FromDiscord | <Yardanico> @iWonderAboutTuatara nimbase.h is in <your nim directory>/lib |
11:25:14 | FromDiscord | <Yardanico> and yes, you can make stdin work with nimjs, you just need to wrap a bit of nodejs specific code |
11:46:04 | FromDiscord | <tomck> How do closures work in arc? |
11:46:37 | FromDiscord | <tomck> Can i explicitly move a ref into a closure? I'm getting a segfault, looks like my data is being freed b/c it doesn't see the closure as a shared owner |
11:47:52 | FromDiscord | <tomck> sent a code paste, see https://play.nim-lang.org/#ix=2PBP |
11:48:17 | FromDiscord | <tomck> I'm expecting myData to have the refcount incremented when my anonymous proc is created on line 3, instead i just get a segfault |
11:48:20 | FromDiscord | <tomck> works with normal gc |
11:48:35 | FromDiscord | <tomck> also works with orc, hmm |
11:49:41 | qwr | weird, the difference between orc and arc should be that arc may leak cycles, not segfaults (sounds like bug) |
11:50:09 | FromDiscord | <tomck> interesting, ok - any workarounds you're aware of? |
11:50:32 | FromDiscord | <tomck> i can't just manually increment the refcount since my callback might not be called, so that'd leak memor |
11:50:38 | qwr | you found workaround (orc) ;) |
11:50:48 | FromDiscord | <tomck> rip |
11:51:17 | FromDiscord | <tomck> how does nim determine what vars get captured? just by analysing the anonymous function? or is there some syntax to specify a capture? |
11:51:43 | FromDiscord | <tomck> e.g. in c++ you can specify a capture `[myData]() { std::cout << myData[0]; }` |
11:51:51 | FromDiscord | <tomck> (edit) "e.g. in c++ you can specify a capture `[myData]() { std::cout << myData[0]; }` ... " added "in the `[myData]` part" |
11:51:55 | qwr | nim should do it automatically |
11:55:52 | PMunch | @tomck, why are you creating myData as a ref seq` |
11:55:54 | PMunch | ?* |
11:56:02 | * | Vladar quit (Remote host closed the connection) |
11:56:08 | FromDiscord | <tomck> to capture it without copying |
11:56:23 | PMunch | seqs are already references |
11:56:26 | FromDiscord | <tomck> hang on, i don't think this is a compiler bug, i think this probably should segfault in orc too |
11:56:32 | FromDiscord | <tomck> eh? seqs are value types i though |
11:56:32 | PMunch | So it won't be copied |
11:57:06 | PMunch | Well, they are, but they are len, cap, and data where data is a reference |
11:57:20 | PMunch | So it will only copy three times sizeof(int) |
11:57:44 | FromDiscord | <tomck> hmmm, not sure that's true https://play.nim-lang.org/#ix=2PBS |
11:58:06 | FromDiscord | <tomck> looks like it's copying the seq, as in a full copy of all the elements in the seq |
11:58:12 | PMunch | That's because Nim detects that you want a copy of it |
11:58:25 | PMunch | Ah, I see what you mean |
11:58:34 | FromDiscord | <tomck> do you mean captures are refs by default |
11:58:37 | PMunch | You want to have a reference to the same sequence from multiple places |
11:58:42 | FromDiscord | <tomck> yes |
11:59:59 | * | Vladar joined #nim |
12:01:37 | PMunch | I mean the example you shared could just access the global variable and you'd be fine |
12:02:26 | FromDiscord | <tomck> myData falls out of scope in my real code |
12:02:43 | FromDiscord | <Zachary Carter> https://play.nim-lang.org/#ix=2PBW there |
12:03:02 | PMunch | But now b is a pointer |
12:03:08 | FromDiscord | <Zachary Carter> no one said that was against the rules |
12:03:14 | PMunch | Which won't be picked up by the ARC |
12:03:19 | FromDiscord | <Zachary Carter> well then just box it |
12:03:39 | FromDiscord | <Zachary Carter> or pass it as a var seq |
12:03:52 | FromDiscord | <Zachary Carter> or just use a pointer |
12:04:15 | PMunch | @tomck, how are you passing the variable in? Just letting it get captured by a closure? |
12:04:51 | PMunch | Kinda hard to tell if you're doing something weird or if this is an actual bug without seeing your code |
12:05:12 | FromDiscord | <tomck> the variable is just being captured, as in my example |
12:05:15 | FromDiscord | <tomck> it's just inside a scope |
12:05:37 | FromDiscord | <tomck> i'm trying to reproduce with a smaller example, but it doesn't segfault, so either an error with my code or it's something else that's causing it to be freed |
12:05:45 | FromDiscord | <tomck> hang on, i'll be back probably |
12:05:55 | FromDiscord | <Zachary Carter> sounds ominous |
12:08:23 | haxscramper | Is there any **C** library that could benefit from RAII-style API? I want to make exaple out of it with smart pointers and custom wrappers (and also some helper functions for `fusion/pointers` while I'm at it) |
12:08:38 | haxscramper | Just any library, only not too big/convoluted |
12:08:57 | haxscramper | To avoid coming up with completely synthetic examples |
12:10:27 | * | xet7 quit (Remote host closed the connection) |
12:11:21 | * | xet7 joined #nim |
12:11:32 | haxscramper | It might be something that already wrapped even |
12:11:50 | FromDiscord | <Zachary Carter> maybe you could do it with sdl2 / glfw3 |
12:12:00 | FromDiscord | <Zachary Carter> and just wrap like context and window creation / destruction |
12:13:51 | FromDiscord | <Zachary Carter> or I can find you another C library that has cleanup procedures for you if those don't work |
12:14:05 | haxscramper | No, those are fine probably |
12:14:55 | haxscramper | At least basic sdl2 examples look like exactly what I need - not overly verbose, but somewhat annoying with all `SDL_DestroyWindow` cals |
12:15:00 | haxscramper | calls* |
12:15:31 | * | Tanger joined #nim |
12:16:06 | haxscramper | Though I realized that I'm not sure what the benefit of `sharedPtr[T]` over `ref T` is. It avoids double dereference, but those are not **that** expensive, right? |
12:16:58 | krux02 | haxscramper, yes SDL2 works pretty nicely. |
12:17:09 | FromDiscord | <Zachary Carter> I haven't really used sharedptr but I have used uniqueptr |
12:17:22 | krux02 | the surface is I think the best type to benefit from RAII. |
12:17:43 | krux02 | program level RAII can be done with `atexit` in C as well. |
12:18:56 | krux02 | haxscramper, sharedPtr[T] is AFIK the C++ class for shared pointers |
12:20:23 | krux02 | and ref[T] technically compile to a c++ sharedPtr. But it is the pointer type that the compiler knows about unlike sharedPtr that is just a library thing. |
12:21:01 | FromDiscord | <hamidb80> https://web.eecs.utk.edu/~azh/blog/pythonstringsaremutable.html ↵damn python 😕 |
12:33:06 | FromDiscord | <tomck> ok lol i managed to reproduce |
12:33:32 | FromDiscord | <tomck> https://play.nim-lang.org/#ix=2PC2 |
12:34:26 | FromDiscord | <tomck> sent a code paste, see https://play.nim-lang.org/#ix=2PC3 |
12:36:25 | FromDiscord | <tomck> Interestingly, if you remove the first `echo` on line 29, len prints out fine?? So i'm guessing something it messing up with the captuer, or there's a dumb error i've made here |
12:37:19 | PMunch | Hmm, curious that it doesn't properly print the kind for the third element either |
12:38:31 | FromDiscord | <tomck> yeah, which is doubly weird b/c that' s in a totally separate memory block to the array len, so it's not like there's a single buffer overrun somewhere |
12:39:26 | FromDiscord | <tomck> If i wrap that whole if branch in a proc & call it, it works perfectly in this example |
12:39:27 | PMunch | I mean that might just be a bug in the stringification |
12:39:44 | FromDiscord | <tomck> unsure, i get a segfault if i try to print the 3rd element |
12:39:49 | PMunch | The body of if x == 500? |
12:39:57 | PMunch | Ooh, interesting |
12:40:44 | FromDiscord | <tomck> oh lol, ok the plot thickens↵yes, the body of x == 500 |
12:41:24 | PMunch | This definitely looks like an ARC capture bug |
12:41:57 | FromDiscord | <tomck> sent a code paste, see https://play.nim-lang.org/#ix=2PC7 |
12:41:58 | FromDiscord | <tomck> does echo write any data? |
12:42:24 | FromDiscord | <tomck> where do you want me to put this, do i just submit an issue with the code? |
12:42:37 | PMunch | It segfaults for me |
12:42:44 | PMunch | When I flip it |
12:42:47 | FromDiscord | <Rika> Did you put this through calf ribs |
12:42:47 | FromDiscord | <Rika> Ugh |
12:42:50 | FromDiscord | <Rika> Valgrind |
12:43:00 | FromDiscord | <tomck> calf ribs |
12:43:01 | PMunch | Probably just a bit of raciness with the collection |
12:43:09 | FromDiscord | <Rika> Blame the phone |
12:43:12 | FromDiscord | <tomck> oh weird, nvm then |
12:43:13 | PMunch | Haha :P |
12:43:27 | FromDiscord | <Rika> I can’t not rely on autocorrect right now because my fingers are freezing |
12:45:07 | FromDiscord | <tomck> is it cold where you are too? we've gotten an uncharacteristic 5 inches of snow |
12:46:05 | FromDiscord | <tomck> ran it through valgrind, just a single invalid read, at `colonanonymous_hH9a1MweJ3WqlrBXmvnzuag` |
12:46:23 | FromDiscord | <Rika> Try using it with debugger native |
12:46:45 | FromDiscord | <hamidb80> debugger native? |
12:46:51 | FromDiscord | <Rika> It’s above ankle height snow here right now but the snowing is heavy so I expect it to be knee height tomorrow |
12:47:10 | FromDiscord | <Rika> - -debugger:nativew |
12:47:18 | FromDiscord | <Rika> Without the w |
12:47:22 | FromDiscord | <Rika> And the space |
12:47:31 | PMunch | We've got 2" 10'.. |
12:47:50 | PMunch | Eer, wait 2' 10" |
12:47:55 | PMunch | 85cm |
12:47:56 | FromDiscord | <tomck> rip, where are you guys are getting knee height snow? |
12:47:57 | FromDiscord | <Rika> Leave me be! My fingers are dying! |
12:48:07 | FromDiscord | <tomck> @Rika same with --debugger:native |
12:48:08 | FromDiscord | <Rika> I live in a mountain basin so |
12:48:10 | PMunch | Northern Norway :P |
12:48:14 | FromDiscord | <hamidb80> here we didn't get snow in this winter. |
12:48:26 | FromDiscord | <hamidb80> (edit) "here we didn't get ... snow" added "any" |
12:48:27 | FromDiscord | <tomck> @hamidb80 there's still time |
12:49:03 | FromDiscord | <Rika> Does valgrind not look at debug data whatsoever or what |
12:50:01 | * | pietroppeter quit (Quit: Connection closed for inactivity) |
12:51:10 | * | lritter joined #nim |
12:56:56 | FromDiscord | <tomck> i have no idea how debuggers work |
12:57:36 | FromDiscord | <tomck> i'm pretty sure the 'anonymous' part means it's just segfaulting in the lambda somewhere, so it's not like it's a buffer overrun outside of the fn |
12:59:38 | * | abm quit (Quit: Leaving) |
13:14:08 | FromDiscord | <Zachary Carter> We have about 4 inches of snow in Austin TX and the world is ending |
13:14:32 | FromDiscord | <Recruit_main707> Btc reached 50k lads |
13:19:09 | * | spiderstew_ quit (Read error: Connection reset by peer) |
13:20:26 | * | spiderstew joined #nim |
13:23:14 | FromDiscord | <Zachary Carter> Does that mean I get 50k? |
13:26:31 | * | zazi[m] joined #nim |
13:29:51 | haxscramper | In the end I think tha writing standalone article for fusion is not going to be particularly interesting, mainly because there is not a lot of thing that can be made into something interesting enough. Instead it would be better to add section in new changelog that would discuss fusion - how it can be installed (because it changed in current version anyway), what modules are there and so on |
13:31:04 | haxscramper | I've just spent last couple of hours thinking of some coherent way to present all modules, but it just that - collection of good helper libraries, each one not having particular wow-effect |
13:31:20 | * | NimBot joined #nim |
14:05:11 | Clonkk[m] | What's the catch to be able to cast a ``pointer`` into a ``proc`` (assuming prototype known) |
14:05:23 | FromDiscord | <mratsim> no catch |
14:05:26 | Clonkk[m] | I get a ``expression cannot be cast to ...`` |
14:05:48 | Clonkk[m] | Oh I forgot a ``ptr`` |
14:05:52 | Clonkk[m] | Nevermind, carry on |
14:06:02 | Clonkk[m] | * Nevermind, carry on. Nothing to see here |
14:10:07 | * | xet7 quit (Remote host closed the connection) |
14:10:59 | * | xet7 joined #nim |
14:16:25 | * | xet7 quit (Remote host closed the connection) |
14:17:09 | * | xet7 joined #nim |
14:26:07 | * | xet7 quit (Remote host closed the connection) |
14:26:58 | * | xet7 joined #nim |
14:28:18 | * | xet7 quit (Remote host closed the connection) |
14:29:02 | * | xet7 joined #nim |
14:30:11 | * | abm joined #nim |
14:34:17 | planetis[m] | why is return frowned upon? what kind of optimization is not possible when using it, for example in a shortest path proc? Does it worth changing to not use return? |
14:36:17 | FromDiscord | <haxscramper> IT IS NOT FROWNED UPON |
14:36:26 | FromDiscord | <haxscramper> just some people prefer writing code differently |
14:36:35 | FromDiscord | <mratsim> i like return |
14:36:54 | FromDiscord | <Cypheriel> Pretty sure it's just semantics if anything |
14:37:09 | FromDiscord | <mratsim> There is something in embedded about only having a sigle return point in functions. |
14:37:15 | FromDiscord | <mratsim> (edit) "sigle" => "single" |
14:38:12 | FromDiscord | <mratsim> but if it's not imposed by some kind of standards like MISRA, i preffer to use early return to exit out of a function if some preconditions are not met (like having elements in a sequence for example before doing work on it). |
14:43:29 | * | xet7 quit (Remote host closed the connection) |
14:43:37 | planetis[m] | ok thank you, because changing it to the other style, gives me ptsd from the days we were writing algoriths in paper in a shitty pascal inspired lang without break or return |
14:44:09 | planetis[m] | that thappened in school not in my imagination |
14:44:17 | * | xet7 joined #nim |
14:45:31 | * | xet7 quit (Remote host closed the connection) |
14:50:30 | * | waleee-cl joined #nim |
14:52:18 | * | xet7 joined #nim |
15:01:01 | FromDiscord | <zetashift> I sometimes program in Scala, which does not have an explicit return/break/continue mechanism |
15:02:08 | FromDiscord | <zetashift> I don't mind the use return to exit early out of a function if a precondition is not met, it's almost the only time I use return like that. |
15:07:34 | ForumUpdaterBot | New thread by Serge: Nlftk : FLTK for Nim : how do you associate a callback to a button? , see https://forum.nim-lang.org/t/7516 |
15:09:34 | * | xace quit (Ping timeout: 272 seconds) |
15:11:15 | * | xace joined #nim |
15:12:59 | saem | I replicated likely the same capture bug last night. I need to bisect the commits and see if I can find culprit though I suspect it's not a direct cause but more exposed issues elsewhere sort of situation. |
15:20:47 | * | xet7 quit (Remote host closed the connection) |
15:21:22 | * | xet7 joined #nim |
15:22:45 | FromDiscord | <Rika> @planetis NRVO cannot be easily done by the compiler if you use return i believe? |
15:23:25 | FromDiscord | <Rika> (and yes it can produce some observable differences |
15:23:28 | FromDiscord | <Rika> in speed) |
15:26:57 | FromDiscord | <mratsim> I have never seen the codegen difference between NRVO and no NRVO. |
15:26:57 | * | xet7 quit (Remote host closed the connection) |
15:29:01 | * | xet7 joined #nim |
15:30:10 | * | xet7 quit (Remote host closed the connection) |
15:32:02 | * | xet7 joined #nim |
15:32:42 | * | xet7 quit (Remote host closed the connection) |
15:33:57 | * | xet7 joined #nim |
15:34:20 | * | xet7 quit (Remote host closed the connection) |
15:41:16 | * | qwertfisch quit (Ping timeout: 240 seconds) |
15:56:19 | * | qwertfisch joined #nim |
16:00:01 | * | himup[m] quit (Quit: Idle for 30+ days) |
16:02:07 | * | tane joined #nim |
16:07:09 | * | xace quit (Ping timeout: 264 seconds) |
16:07:47 | * | xace joined #nim |
16:09:16 | * | xet7 joined #nim |
16:26:02 | * | xet7 quit (Remote host closed the connection) |
16:26:39 | * | xet7 joined #nim |
16:38:03 | federico3 | https://vlang.io/ V's landing page provide a good overview of its features without having to dig around the website |
16:38:41 | haxscramper | for god's sake |
16:38:43 | FromDiscord | <mratsim> so much white, my eyes ... |
16:39:06 | FromDiscord | <mratsim> why is their doom still on the front page? Such a lie |
16:39:24 | federico3 | I guess you use dark backgrounds? |
16:39:26 | haxscramper | The whole idea of this website is to advertise as much as possible |
16:39:35 | haxscramper | SHoving everything the could |
16:39:55 | * | asdflkj_ joined #nim |
16:39:58 | haxscramper | I would rather compare to rust/go/D/Qt |
16:39:59 | FromDiscord | <konsumlamm> even the features that aren't even implemented |
16:40:13 | FromDiscord | <mratsim> yes I use darker UI |
16:40:25 | FromDiscord | <Rika> the is v still fast page is a good idea prolly |
16:40:32 | federico3 | I'm aware of the exaggerations and so on, but I'm talking about the layout where viewers can scroll and get a good overview. It's quite welcoming |
16:41:21 | FromDiscord | <mratsim> so you want this on the landing page? https://nim-lang.org/features.html |
16:42:40 | * | xet7 quit (Remote host closed the connection) |
16:42:55 | federico3 | yes, but with more info (and possibly less empty space) |
16:43:08 | FromDiscord | <mratsim> Maybe just above recent articles we can put a link "Nim features" or get even more targeted "Nim for the Python dev" "Nim for the team lead" "Nim for the C dev" "Nim for the Rust dev". |
16:43:13 | * | xet7 joined #nim |
16:43:36 | FromDiscord | <mratsim> "Nim for the Ada dev" "Nim for the correctness conscious dev" |
16:43:46 | FromDiscord | <mratsim> "Nim for the gamedev". |
16:44:01 | FromDiscord | <mratsim> That would allow us to get stats on where do people come from |
16:44:09 | FromDiscord | <mratsim> and also target the message depending on the demography. |
16:44:12 | federico3 | +1 |
16:44:32 | FromDiscord | <haxscramper> https://nim-lang.org/learn.html has this, but needs restructuring |
16:44:44 | Prestige | Nim for Noobs would be good too, imo. The defaults docs are not super friendly |
16:44:44 | FromDiscord | <haxscramper> Right now it all split into multiple pages |
16:44:55 | FromDiscord | <mratsim> learn should be a Call To Action below as well. |
16:45:58 | FromDiscord | <mratsim> "learn Nim now" and maybe a playground link example. |
16:46:07 | * | xet7_ joined #nim |
16:46:08 | Yardanico | Prestige: did you check nim basics? |
16:46:09 | * | xet7 quit (Remote host closed the connection) |
16:46:21 | Yardanico | https://narimiran.github.io/nim-basics/ imo this is "nim for noobs" you want :P |
16:47:29 | Prestige | It's pretty good but I think people these days are intimidated by having to read a page with so much text that they have to scroll. I think there's a go site that has tiny single-page examples that was done well |
16:47:34 | Prestige | just my 2 cents |
16:48:15 | * | xet7_ quit (Excess Flood) |
16:48:44 | * | xet7_ joined #nim |
16:50:45 | Prestige | I think https://www.learn-golang.org/ is what I saw before |
16:54:18 | FromDiscord | <Goel> As a noob i prefer a Tutorial with lot of short chapters to study instead of a monolithic single page (and most Tutorial and guides in fact are just like that, split in 30+ simple chapters) |
16:54:35 | Prestige | Yeah, I agree |
16:59:01 | * | evbo joined #nim |
16:59:23 | * | evbo quit (Remote host closed the connection) |
17:00:11 | * | fputs joined #nim |
17:05:30 | asdflkj_ | me three |
17:05:40 | FromDiscord | <gollark> I mostly learn things by writing simple things in them using example code, manuals and in Nim's case the big table of stdlib functions. |
17:06:01 | FromDiscord | <gollark> The manual seems to be missing some things though, like slices. |
17:06:58 | Clonkk[m] | http://ssalewski.de/nimprogramming.html is also super useful I think |
17:20:09 | FromDiscord | <no name fits> Thanks Clonk |
17:20:46 | * | a_chou joined #nim |
17:30:06 | FromDiscord | <JSGRANT> In reply to @Clonkk "http://ssalewski.de/nimprogramming.html is also sup": That's more a general-purpose introduction to 'programming' in Nim; Also find it super-useful just not as a general introduction to Nim. lol |
17:31:08 | FromDiscord | <JSGRANT> It's been a GREAT reference to figure out how I want to structure my book / lesson-plan that I eventually want to make a video-course around |
17:34:29 | FromDiscord | <JSGRANT> In reply to @Goel "As a noob i": This is actually the only issue I really have with that link I replied to. It's a freakin' tome. Would benefit a lot I think by being split up in pages even though there are already proper chapters. |
17:44:39 | * | fputs quit (Remote host closed the connection) |
17:45:52 | * | natrys joined #nim |
17:51:32 | * | al1ranger joined #nim |
17:52:28 | * | fputs joined #nim |
18:09:45 | * | al1ranger quit (Quit: Leaving) |
18:32:24 | FromDiscord | <iWonderAboutTuatara> @Yardanico FOUND IT |
18:32:32 | FromDiscord | <iWonderAboutTuatara> oops sorry for caps |
18:32:38 | FromDiscord | <Yardanico> found wat |
18:32:38 | FromDiscord | <iWonderAboutTuatara> didn't realize I was on capslock |
18:32:40 | FromDiscord | <Yardanico> 🤔 |
18:32:42 | FromDiscord | <iWonderAboutTuatara> nimbase.h |
18:32:52 | FromDiscord | <iWonderAboutTuatara> I still get a bunch of errors when I try to compile though |
18:32:57 | FromDiscord | <Yardanico> for example? |
18:33:04 | FromDiscord | <Yardanico> you might need to provide additional flags to the linker |
18:33:06 | FromDiscord | <Yardanico> check the json file |
18:33:41 | FromDiscord | <iWonderAboutTuatara> https://paste.myst.rs/xk7ssdz0 |
18:33:47 | FromDiscord | <Yardanico> @iWonderAboutTuatara nim saves the json file in the nimcache folder with all the compilation commands |
18:33:55 | FromDiscord | <Yardanico> oh, this |
18:34:00 | FromDiscord | <iWonderAboutTuatara> oh I see, what do I do with it? |
18:34:10 | FromDiscord | <Yardanico> check the json file to see how it compiles stuff |
18:34:18 | FromDiscord | <iWonderAboutTuatara> and run those commands? |
18:34:18 | FromDiscord | <Yardanico> also there's a way to create nim c files automatically |
18:34:19 | FromDiscord | <Yardanico> niminst |
18:34:21 | FromDiscord | <Yardanico> not sure if it still works |
18:34:26 | FromDiscord | <iWonderAboutTuatara> niminst? |
18:34:29 | FromDiscord | <Yardanico> https://github.com/nim-lang/niminst |
18:34:56 | FromDiscord | <iWonderAboutTuatara> oh I see |
18:35:12 | FromDiscord | <iWonderAboutTuatara> I was hoping I'd be able to make a standalone c file that compiles using a regular compile command |
18:35:13 | FromDiscord | <Yardanico> https://nim-lang.org/docs/niminst.html |
18:35:16 | FromDiscord | <iWonderAboutTuatara> for submission to a contest |
18:35:21 | FromDiscord | <iWonderAboutTuatara> but that doesn't seem to be possible |
18:35:37 | FromDiscord | <Yardanico> you might be able to do it with some tools |
18:35:45 | FromDiscord | <Yardanico> but are you sure that things like that are allowed on the contest? :D |
18:35:55 | FromDiscord | <iWonderAboutTuatara> yeah |
18:36:00 | FromDiscord | <iWonderAboutTuatara> the site just doesn't accept nim files |
18:36:05 | FromDiscord | <Yardanico> yeah that's sad |
18:36:12 | FromDiscord | <iWonderAboutTuatara> it's unfortunate |
18:36:21 | FromDiscord | <iWonderAboutTuatara> there's beena proposal on codeforces to support nim for a while not |
18:36:27 | FromDiscord | <iWonderAboutTuatara> but they haven't and probably won't be implmeneting it |
18:36:29 | FromDiscord | <Yardanico> yes |
18:36:55 | FromDiscord | <haxscramper> too much power |
18:37:23 | FromDiscord | <Yardanico> I think there are tools like that |
18:37:48 | FromDiscord | <Yardanico> even sqlite does amalgamation (to combine all of sqlite in a single file) |
18:38:18 | FromDiscord | <Yardanico> it would be useful for some things I guess, I know contest sites that don't accept nim too |
18:47:21 | * | a_chou quit (Ping timeout: 264 seconds) |
18:47:47 | FromDiscord | <mratsim> "cat .c" 😛 |
18:47:57 | FromDiscord | <mratsim> just remove the include for nimbase.h |
18:48:30 | FromDiscord | <mratsim> The pakku package manager for archlinux has some kind of trick to package pakku as C files as well |
18:56:26 | FromDiscord | <Varriount> In reply to @mratsim "The pakku package manager": pakku? |
18:56:38 | FromDiscord | <Yardanico> yes |
18:56:40 | FromDiscord | <Yardanico> aur helper in nim |
18:57:02 | FromDiscord | <Yardanico> https://github.com/kitsunyan/pakku |
18:57:56 | FromDiscord | <Varriount> Eh, 123 stars, not bad |
18:59:30 | FromDiscord | <Yardanico> if you want to check most starred nim projects - https://github.com/search?o=desc&q=language%3Anim+stars%3A%3E5&s=stars&type=Repositories |
18:59:41 | FromDiscord | <Yardanico> second most starred nim repo is this https://media.discordapp.net/attachments/371759389889003532/811310849334575114/unknown.png |
18:59:44 | FromDiscord | <Yardanico> :) |
19:00:53 | FromDiscord | <haxscramper> How I can declare array with enum and immediately fill it with key-value pairs? Something like `const mapping: array[Enum, string] = { key: "val" } `. Actual code is here - https://play.nim-lang.org/#ix=2PEE - I know that `{ : }` is an array of different size, but IIRC there was a way to make initialization directly |
19:00:58 | FromDiscord | <haxscramper> Using brace-init syntax |
19:02:08 | FromDiscord | <Yardanico> arrays use [] |
19:02:58 | FromDiscord | <Yardanico> or you want to partially init an array ? |
19:03:07 | FromDiscord | <haxscramper> Yes, partially init |
19:03:21 | FromDiscord | <Yardanico> hm, not really know if that's possible in this case |
19:03:31 | FromDiscord | <Yardanico> without doing separately for each line |
19:08:10 | FromDiscord | <iWonderAboutTuatara> is there any way to get js to work with stdin? |
19:08:24 | FromDiscord | <iWonderAboutTuatara> the site accepts js but compilation fails because it relies on stdin |
19:08:46 | FromDiscord | <carpal> se parlo italiano qualcuno mi capisce? |
19:10:46 | ForumUpdaterBot | New thread by Jan0sc: .mjs import behaviour in node.js, see https://forum.nim-lang.org/t/7517 |
19:11:48 | FromDiscord | <Yardanico> @carpal if you want italian, there's #italiano :P |
19:11:55 | FromDiscord | <carpal> hahaha |
19:12:04 | FromDiscord | <Yardanico> @iWonderAboutTuatara yes, but you need to wrap a bit of nodejs stuff |
19:12:18 | FromDiscord | <carpal> I was only trying to see if there were italian people |
19:12:20 | FromDiscord | <Yardanico> and I wouldn't recommend using the JS backend because then you'll be at loss w.r.t to performance |
19:12:42 | FromDiscord | <Yardanico> in this case |
19:14:31 | * | a_chou joined #nim |
19:15:22 | FromDiscord | <hamidb80> In reply to @Yardanico "if you want to": the Q & A section hurts me https://media.discordapp.net/attachments/371759389889003532/811314797324140604/unknown.png |
19:15:31 | FromDiscord | <Yardanico> that's the point :D |
19:24:54 | FromDiscord | <Varriount> In reply to @iWonderAboutTuatara "the site accepts js": What part is relying on stdin? |
19:30:11 | FromDiscord | <iWonderAboutTuatara> the judge uses stdin |
19:30:16 | FromDiscord | <iWonderAboutTuatara> and I'm reading from stdin etc |
19:30:26 | FromDiscord | <Varriount> In reply to @Yardanico "second most starred nim": I am not ashamed to say it, that is too much power for me. |
19:30:43 | FromDiscord | <iWonderAboutTuatara> In reply to @Yardanico "<@!284835054633353226> yes, but you": how do I do this? |
19:30:49 | FromDiscord | <iWonderAboutTuatara> performance isn't too important for me yet |
19:31:03 | FromDiscord | <Yardanico> I did it in the past, you can just use importjs + jsffi + emit (to emit JS code directly) |
19:31:12 | FromDiscord | <iWonderAboutTuatara> oh I see |
19:31:14 | FromDiscord | <iWonderAboutTuatara> that works? |
19:32:17 | FromDiscord | <Yardanico> well why wouldn't it? |
19:32:26 | FromDiscord | <Yardanico> when compiling to JS you can interface with any JS code |
19:32:32 | FromDiscord | <Yardanico> or, at the worst case, emit JS code directly |
19:32:34 | FromDiscord | <Yardanico> (edit) "at" => "in" |
19:33:13 | FromDiscord | <Yardanico> btw, for those who haven't seen it - my lightweight read-only static html frontend for the nim forum - https://forum.my-toolbox.xyz/ |
19:33:23 | FromDiscord | <Yardanico> might be useful in some cases I guess |
19:33:40 | FromDiscord | <Yardanico> it's something like nitter but for nim forum :P |
19:38:03 | Prestige | Nice |
19:38:12 | FromDiscord | <Yardanico> source code is in https://github.com/Yardanico/kuforum/ (it's really simple, I just copied the types from the nim forum and do the same thing nim forum does client-side) |
19:43:15 | * | abm quit (Ping timeout: 246 seconds) |
20:14:37 | FromDiscord | <enimatek> so i bought one of those M1 macbooks but doing a `brew install nim` doesnt work also building it from source (through brew) doesnt work, is this still in the works, i noticed that there is an issue on the github about building the source on M1, which is possible, but i'd like to use brew as a base |
20:15:46 | * | letto quit (Quit: Konversation terminated!) |
20:16:12 | FromDiscord | <Yardanico> it should work on latest devel |
20:16:22 | FromDiscord | <Yardanico> https://github.com/nim-lang/Nim/issues/16211 |
20:16:27 | * | letto joined #nim |
20:16:36 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/811330207810060288/unknown.png |
20:16:37 | FromDiscord | <Yardanico> try this |
20:17:09 | FromDiscord | <enimatek> yes, but through brew is not supported yet? thought maybe this was also possible |
20:17:48 | FromDiscord | <Yardanico> well, isn't brew for stable versions? |
20:18:00 | FromDiscord | <Yardanico> anyway, you might want to contact brew maintainers about that |
20:19:46 | FromDiscord | <enimatek> you can run it with --HEAD and it checks out the git repo and tries to build it from source |
20:20:35 | FromDiscord | <Yardanico> but you need csources_v1 and not the original csources |
20:21:18 | FromDiscord | <enimatek> hm `==> Cloning https://github.com/nim-lang/csources.git` |
20:21:26 | FromDiscord | <Yardanico> csources is not csources_v1 |
20:21:43 | FromDiscord | <enimatek> ok so it wont work |
20:21:56 | FromDiscord | <Yardanico> you can just change csources to csources_v1 in the brew build script and it should work |
20:24:25 | FromDiscord | <enimatek> ok i will look into pr's for homebrew |
20:24:44 | * | haxscramper quit (Remote host closed the connection) |
20:27:42 | * | letto quit (Quit: Konversation terminated!) |
20:28:18 | * | letto joined #nim |
21:07:13 | FromDiscord | <VVX7> anyone have a similar issue to this? https://github.com/byt3bl33d3r/OffensiveNim/issues/16 |
21:08:03 | FromDiscord | <VVX7> trying to debug why it's failing. I think it's killing the thread when the inline asm executes, but not really sure how to deal with that correctly |
21:15:31 | FromGitter | <deech> Do I understand correctly from this guide that writing a C++ binding with the C++ backend forced anyone using to also use the C++ backend? https://status-im.github.io/nim-style-guide/05_libraries.html#wrappers |
21:17:12 | FromDiscord | <Yardanico> Yes, if you need to interface with C++ libraries it's much much much easier to just use the C++ backend |
21:17:19 | FromDiscord | <Yardanico> there _are_ ways to interface with C++ from C, but they're not pretty |
21:17:41 | FromDiscord | <Yardanico> Check https://github.com/cimgui/cimgui for example (a C interface for ImGui which is C++) |
21:18:08 | FromGitter | <deech> Yes I've found that myself but my question is if I publish it is everyone who uses it forced to also use the C++ backend? |
21:18:43 | FromDiscord | <Yardanico> yes |
21:18:51 | FromDiscord | <Yardanico> because otherwise it just won't compile for them |
21:19:09 | FromGitter | <deech> Hmm, that's not ideal, I was hoping Nim had a backend independant ABI. |
21:19:20 | FromGitter | <deech> At least for non-JS targets. |
21:19:42 | FromDiscord | <Yardanico> Nim doesn't have it's own full-blown ABI really |
21:34:32 | * | quadrassel4321 quit (Quit: Leaving) |
21:44:24 | krux02 | @deech: It has nothing to do with ABI. When you wrap (or explain) a c++ library to nim, the generated code needs to include the c++ header files as well, therefore compile with a compiler that understands it. |
21:44:50 | * | lritter quit (Quit: Leaving) |
21:45:33 | krux02 | Some c++ libraries have a header that is C compatible, therefore the library compiles with c++, but the header works on C and C++. |
21:45:40 | krux02 | Pretty neat isn't it? |
21:46:00 | krux02 | ok, that is an exageration |
21:55:09 | FromGitter | <deech> krux02, by C compatible header to do you mean all the C++ functions are `extern`ed? |
22:00:12 | * | PMunch quit (Quit: leaving) |
22:01:29 | FromDiscord | <ache of head> !eval 10.3.floor.int.mod 2 |
22:01:32 | NimBot | Compile failed: /usercode/in.nim(1, 5) Error: undeclared field: 'floor' for type system.float64 [declared in /playground/nim/lib/system.nim(28, 3)] |
22:01:38 | FromDiscord | <ache of head> ooooh |
22:01:53 | krux02 | @deech pretty much, yes |
22:02:34 | krux02 | can be done through a top level "extern C {" |
22:06:32 | FromDiscord | <Solitude> !eval import math; 0.3.floor.int.mod 2 |
22:06:34 | NimBot | Compile failed: /usercode/in.nim(1, 27) Error: expression 'mod(int(floor(0.3)), 2)' is of type 'int' and has to be used (or discarded) |
22:15:51 | FromDiscord | <ache of head> oh nice |
22:31:13 | ForumUpdaterBot | New thread by Geekrelief: Composing templates / macros?, see https://forum.nim-lang.org/t/7518 |
22:44:34 | FromDiscord | <no name fits> I'm not sure where this sort of question fits, but how do you guys schedule the stuff you need to learn, and how do you deal with feeling like you're learning too slowly or afraid you're wasting your time? |
22:54:00 | * | natrys quit (Ping timeout: 246 seconds) |
22:54:27 | * | natrys joined #nim |
22:56:00 | * | tane quit (Quit: Leaving) |
23:04:56 | * | a_chou quit (Ping timeout: 240 seconds) |
23:13:10 | FromDiscord | <Hi02Hi> wdym by learning too slowly?↵if you are tired, get rest↵if you arent understanding, thats fine, ask questions↵the way i learn is by making little snippets of code, bc using newfound knowledge makes it stick |
23:14:27 | FromDiscord | <Hi02Hi> even if its 25 lines of code, i can get plenty of bugs, and that makes me learn more than the docs could say |
23:14:57 | FromDiscord | <Hi02Hi> also, nice pfp |
23:15:39 | saem | When it comes to learning I'd recommend spaced repetition and forced recall (a very particular form of practice). Personally I found the online course "learning how to learn" really useful. |
23:32:37 | FromDiscord | <no name fits> https://www.coursera.org/learn/learning-how-to-learn this thing? |
23:32:47 | FromDiscord | <no name fits> In reply to @Hi02Hi "also, nice pfp": ty |
23:40:40 | * | jess quit (Quit: brb) |
23:41:41 | * | jess joined #nim |
23:45:27 | * | natrys quit (Ping timeout: 246 seconds) |
23:53:14 | * | abm joined #nim |