00:02:34 | FromDiscord | <Tristan> nevermind, just saw the `ord` keyword. |
00:07:53 | Yardanico | @Tristan if you're actually translating it into proper Nim code, you would use something like a set of enum type |
00:08:11 | Yardanico | (in C with ORing enum values people usually specify more than 1 enum value) |
00:08:36 | leorize | yep, sets are the way to go when translating to Nim |
00:08:47 | leorize | much simpler and more flexible |
00:09:56 | disrupteq | sets my loins a quiverin'. |
00:12:21 | * | rnrwashere quit (Remote host closed the connection) |
00:12:38 | * | rnrwashere joined #nim |
00:14:29 | FromDiscord | <Simula> is there a way to pass an empty seq to a proc that expects a `seq[string]`? |
00:15:08 | Yardanico | myproc(@[]) |
00:15:42 | Yardanico | ah sorry |
00:15:55 | FromDiscord | <Simula> `Error: type mismatch: got <seq[empty]>` |
00:16:16 | Yardanico | either pass newSeq[string]() or create it like "var data: seq[string]" and pass that |
00:16:30 | Yardanico | why not have a default value for that seq though? |
00:16:56 | FromDiscord | <Simula> it's a seq of error strings. i'm overloading the proc for when there are errors and also no errors |
00:17:18 | Yardanico | well, seq is a runtime thing, maybe you want arrays? |
00:17:56 | FromDiscord | <Simula> this is a runtime thing :P |
00:18:01 | FromDiscord | <Simula> it's validating html forms |
00:18:15 | FromDiscord | <Simula> unless i misunderstand |
00:18:33 | Yardanico | ah, then seqs are fine, I just mistunderstood your "overloading" thing :P |
00:18:43 | Yardanico | I thought you're actually overloading the proc with different implementations |
00:19:35 | FromDiscord | <Simula> nope. the overload just calls the original with an empty seq |
00:19:59 | Yardanico | well I just meant that you can provide the default value for your proc to be an empty seq |
00:20:02 | Yardanico | proc myproc(a: seq[string] = @[]) |
00:20:13 | Yardanico | so when you call it like myproc() it uses an empty seq |
00:21:27 | FromDiscord | <Simula> oh duh, just saw that lol |
00:23:22 | krux02 | Simula: myProc((seq[string])@[]) |
00:23:29 | krux02 | Simula: myProc(seq[string](@[])) |
00:25:36 | Yardanico | too lispy :P |
00:37:50 | * | krux02_ joined #nim |
00:40:22 | * | krux02 quit (Ping timeout: 246 seconds) |
00:53:24 | * | rnrwashere quit (Remote host closed the connection) |
01:04:15 | * | Guest67311 quit (Ping timeout: 250 seconds) |
01:11:23 | * | enthus1ast joined #nim |
01:11:37 | * | sealmove joined #nim |
01:12:59 | * | disrupteq quit (Ping timeout: 246 seconds) |
01:26:59 | * | SenasOzys quit (Remote host closed the connection) |
01:38:42 | * | dadada joined #nim |
01:39:06 | * | dadada is now known as Guest36417 |
01:39:14 | * | dwdv quit (Ping timeout: 246 seconds) |
01:57:10 | * | Guest36417 quit (Ping timeout: 250 seconds) |
02:04:01 | * | dadada joined #nim |
02:04:24 | * | dadada is now known as Guest54744 |
02:14:10 | * | rnrwashere joined #nim |
02:14:32 | * | disrupteq joined #nim |
02:15:56 | * | enthus1ast quit (Ping timeout: 240 seconds) |
02:27:16 | * | Guest54744 quit (Ping timeout: 256 seconds) |
02:33:59 | * | dadada__ joined #nim |
02:34:18 | * | chemist69_ joined #nim |
02:36:54 | * | chemist69 quit (Ping timeout: 240 seconds) |
02:37:50 | * | rnrwashere quit (Remote host closed the connection) |
02:39:05 | * | rnrwashere joined #nim |
02:53:54 | * | disrupteq quit (Quit: Lost terminal) |
02:55:23 | * | opal quit (Ping timeout: 240 seconds) |
02:57:24 | * | dadada__ quit (Ping timeout: 250 seconds) |
02:59:34 | * | opal joined #nim |
03:00:26 | * | ehmry quit (Ping timeout: 246 seconds) |
03:04:02 | * | dadada joined #nim |
03:04:04 | * | ehmry joined #nim |
03:04:25 | * | dadada is now known as Guest26181 |
03:17:16 | * | endragor joined #nim |
03:27:44 | * | Guest26181 quit (Ping timeout: 246 seconds) |
03:31:10 | * | krux02_ quit (Remote host closed the connection) |
03:34:04 | * | dadada__ joined #nim |
03:37:27 | FromDiscord | <Winton> https://mega.nz/#F!4xNjBCYK!ebtr4LFxe3Ilssh1Z-4mgQ!M4kXBCyC who is encouraged to create an emulator server |
03:37:53 | FromDiscord | <Winton> transcribe this code from java to nim |
03:49:57 | FromDiscord | <Bawbby> what is this zcore? |
03:55:52 | FromDiscord | <Winton> > what is this zcore? |
03:55:53 | FromDiscord | <Winton> @Bawbby is an emulator created in Java, for a 2D MMORPG game based on Flash Player |
03:56:01 | * | muffindrake quit (Ping timeout: 246 seconds) |
03:56:32 | FromDiscord | <Winton> really this emulator is version 2 there are other versions 3 created in C # and JS |
03:57:22 | * | dadada__ quit (Ping timeout: 256 seconds) |
03:57:52 | FromDiscord | <Winton> |
03:57:52 | FromDiscord | <Winton> https://cdn.discordapp.com/attachments/371759389889003532/691495905207123979/79100511_104293074400117_1801959606415523840_n.png |
03:58:19 | * | muffindrake joined #nim |
04:02:30 | FromDiscord | <Bawbby> is there a project page for this somewhere? |
04:04:04 | * | dadada joined #nim |
04:04:27 | * | dadada is now known as Guest70543 |
04:06:22 | FromDiscord | <Winton> yes |
04:06:45 | FromDiscord | <Winton> > is there a project page for this somewhere? |
04:06:45 | FromDiscord | <Winton> @Bawbby https://www.facebook.com/EternityLandsPS |
04:08:31 | FromDiscord | <Winton> https://github.com/thalysmarciobn/AQWorlds-Emulator |
04:09:12 | FromDiscord | <Winton> this is a half-discontinued project since they migrated it to C# |
04:18:36 | * | bgammill joined #nim |
04:18:40 | bgammill | hi all |
04:27:49 | * | Guest70543 quit (Ping timeout: 264 seconds) |
04:33:10 | * | sleepyqt joined #nim |
04:34:06 | * | dadada__ joined #nim |
04:34:15 | * | nsf joined #nim |
04:39:27 | FromDiscord | <Winton> Hi π |
04:49:27 | * | rnrwashere quit (Remote host closed the connection) |
04:57:23 | * | dadada__ quit (Ping timeout: 250 seconds) |
05:04:09 | * | dadada joined #nim |
05:04:33 | * | dadada is now known as Guest72832 |
05:06:36 | * | rockcavera quit (Remote host closed the connection) |
05:09:40 | * | bgammill quit (Quit: leaving) |
05:25:29 | * | rnrwashere joined #nim |
05:27:43 | * | Guest72832 quit (Ping timeout: 250 seconds) |
05:30:18 | * | rnrwashere quit (Ping timeout: 256 seconds) |
05:34:03 | * | dadada__ joined #nim |
05:34:21 | * | NimBot joined #nim |
05:42:03 | FromGitter | <awr1> hello |
05:57:11 | * | dadada__ quit (Ping timeout: 250 seconds) |
06:02:00 | * | andinus joined #nim |
06:04:07 | * | dadada joined #nim |
06:04:30 | * | dadada is now known as Guest22694 |
06:19:53 | * | narimiran joined #nim |
06:27:34 | * | Guest22694 quit (Ping timeout: 240 seconds) |
06:33:03 | FromGitter | <gogolxdong> full stack Nim project has been launched http://cloudfastnet.com/ |
06:33:46 | FromGitter | <gogolxdong> [email protected] / test for testing |
06:34:02 | * | dadada__ joined #nim |
06:37:15 | FromGitter | <gogolxdong> There is 21944 loc in HTML+ php for the original project, and 7357 loc in Nim for now. |
06:37:54 | * | endragor quit (Remote host closed the connection) |
06:38:07 | * | silvernode joined #nim |
06:38:12 | silvernode | How is everyone? |
06:38:54 | silvernode | I am still working on my space game, I made some more progress yesterday with the help of a friend. |
06:47:55 | * | endragor joined #nim |
06:49:13 | leorize | gogolxdong: it looks nice, was it made with karax? |
06:50:47 | FromGitter | <gogolxdong> karax + prologue |
06:53:54 | * | silvernode quit (Ping timeout: 265 seconds) |
06:57:46 | * | dadada__ quit (Ping timeout: 265 seconds) |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:03:59 | * | dadada joined #nim |
07:04:24 | * | dadada is now known as Guest67294 |
07:05:17 | * | gmpreussner joined #nim |
07:10:17 | Guest67294 | gogolxdong: Nim is reducing the loc for you? nice :-) |
07:10:36 | * | Guest67294 is now known as dadada |
07:13:29 | euantor | leorize: perfect, thanks |
07:42:04 | FromDiscord | <Benumbed> GDIT, the AMQP spec has as self-referential data structure which is making my life a living hell trying to map it out in Nim |
07:43:22 | leorize | self referential? wdym? |
07:44:04 | FromDiscord | <Benumbed> let me paste this crazy into something, sec |
07:44:39 | FromDiscord | <Benumbed> https://play.nim-lang.org/#ix=2f1X |
07:45:12 | FromDiscord | <Benumbed> Notice how `FieldTableValue` has a field named `tableVal` which has a type of `FieldTable` |
07:45:21 | FromDiscord | <Benumbed> (near the bottom of `FieldTableValue` |
07:45:47 | FromDiscord | <Benumbed> FieldTable is an OrderedTable whose keys are `FieldTableValue` type |
07:46:01 | FromDiscord | <Benumbed> because AMQP specifies that field-tables can contain field-tables |
07:46:18 | FromDiscord | <Benumbed> Maybe I have just overthought my way into a corner |
07:47:38 | FromDiscord | <Benumbed> And I have tried to forward declare `FieldTableValue` but that doesn't work, I think because forward decls don't work with recursive structures in Nim |
07:47:45 | FromDiscord | <Benumbed> (I read something like that in the manual I think?) |
07:50:06 | sealmove | this is not a problem in general in nim |
07:50:10 | sealmove | just use ref |
07:51:16 | FromDiscord | <Benumbed> Sorry, it's late here and I'm tired, can you expand a bit on what you mean by use ref? |
07:52:46 | sealmove | oh well, for starters use one type section |
07:52:55 | sealmove | type |
07:53:07 | sealmove | FieldTable* = ref OrderedTable[string, FieldTableValue] |
07:53:17 | sealmove | FieldTableValue* = ref object |
07:53:54 | sealmove | you need to use one type section when doing self-referential structures |
07:54:08 | FromDiscord | <Benumbed> I completely forgot you can nest multiple typedefs under the type keyword... *facepalm* |
07:54:22 | leorize | sealmove: use OrderedTableRef :P |
07:54:44 | * | PMunch joined #nim |
07:55:07 | FromDiscord | <Benumbed> Thank you sealmove, I was losing my mind over here |
07:55:11 | sealmove | np |
08:05:32 | * | Vladar joined #nim |
08:16:40 | * | Zevv left #nim (#nim) |
08:22:45 | * | dddddd quit (Remote host closed the connection) |
08:42:16 | PMunch | Haha, someone opened a "Thank you" issue in my termstyle repo :) |
08:46:20 | FromGitter | <Vindaar> <3 |
08:51:53 | * | couven92 joined #nim |
09:21:53 | * | krux02 joined #nim |
09:31:24 | * | pbb quit (Ping timeout: 246 seconds) |
09:35:59 | FromGitter | <alehander92> morning |
09:44:30 | PMunch | Morning |
09:55:28 | * | pbb joined #nim |
09:57:53 | FromDiscord | <Lantos> morning |
10:04:43 | * | clemens3 quit (Quit: quit) |
10:06:20 | * | clemens3 joined #nim |
10:07:24 | * | dadada quit (Ping timeout: 256 seconds) |
10:08:44 | * | andinus quit (Quit: ERC (IRC client for Emacs 26.3)) |
10:12:00 | * | dadada joined #nim |
10:12:24 | * | dadada is now known as Guest34231 |
10:13:51 | * | Guest34231 is now known as dadada |
10:16:27 | * | dwdv joined #nim |
10:44:00 | dadada | should deepCopy work inside a macro? I'm not using it to copy a NimNode (where I would use copy()), but for something else and I get Error: cannot generate code for: mDeepCopy |
10:44:12 | Araq | use copyTree() instead |
10:47:37 | dadada | do you mean copyNimTree() there's no copyTree() showing up in the documentation's search, and may I remind you what I want to copy IS NOT a NimNode, but a custom ref object |
10:52:17 | Araq | oh ok |
10:55:47 | dadada | Araq: much like this: https://play.nim-lang.org/#ix=2f2l |
11:00:27 | Araq | don't use 'ref object' then if you don't want ref semantics |
11:00:54 | Araq | or use: var copy = newT(); copy[] = orig[] |
11:05:13 | PMunch | What's the best RSA library for Nim atm? |
11:05:33 | dadada | ok, I already had a manual copy proc as workaround in place, but then learned about deepCopy, so wanted to use the more idiomatic solution (which I thought deepCopy to be), now that I learned that deepCopy doesn't work in macros, I'm going back to my earlier solution... But still, I'm curious why it doesn't work |
11:07:23 | Araq | deepCopy is for "Pass value over to different thread" |
11:07:44 | Araq | since the VM doesn't support threads, it never supported deepCopy either |
11:11:02 | * | clyybber joined #nim |
11:17:07 | krux02 | Araq: regarding the the revert of my pr https://github.com/nim-lang/Nim/pull/13712 |
11:17:08 | disbot | β₯ fix #13417 |
11:17:55 | krux02 | it would have been nicer if you would have complained about it in the review process that the copy isn't acceptable. After all I even marked it in a comment in the code that you saw. |
11:18:50 | krux02 | That is the comment I am talking about: # arrays will deep copy here (pretty bad). |
11:22:18 | Araq | krux02, I regard as "not even bothering krux02" as nice |
11:22:34 | Araq | I saw the comment but wasn't aware of its implications |
11:22:47 | Araq | I thought only edge cases are affected |
11:22:55 | krux02 | well yes |
11:23:01 | Araq | and today is release day so I'm rushing it |
11:23:02 | krux02 | the regression is a constructed edge case |
11:23:15 | Araq | as I still know no other way of how to do a release |
11:23:35 | Araq | :-P |
11:24:02 | Araq | clyybber, your templates are the bomb |
11:24:09 | krux02 | well I can open you a performance regression that was introduced by reverting my PR. |
11:24:31 | krux02 | you want that? |
11:24:38 | dadada | yeah, release day! :P thanks Araq for all the work you do |
11:24:55 | Araq | no, I want a decent fix, krux02 but not for 1.2. |
11:25:09 | krux02 | what do you see as a decent fix. |
11:25:21 | Araq | first class open array support for temporaries |
11:26:20 | Araq | alternatively an optimization in the backend so that it takes address of arrays instead of copying them around |
11:26:36 | Araq | would have helped for our base64 fixes too |
11:27:33 | dadada | Araq: which clyybber templates are the bomb? |
11:27:38 | krux02 | Well, you can contract me to do it. I am offering you to do it. Not for free though. |
11:28:17 | Araq | the one in injectdestructor.nim, dadada, can't replace them with a proc and get the same logic |
11:29:01 | dadada | we need a curated list somewhere of the best nim modules/templates/macros, so that it's easier for people (especially those new to Nim) to find, learn and use them |
11:29:33 | krux02 | https://github.com/VPashkov/awesome-nim |
11:29:37 | Araq | krux02, I lack the money, we can put bounties on it though |
11:29:39 | krux02 | first list I found |
11:30:13 | krux02 | After all I spok with zahary at fosdem, he said the payment just continued. |
11:30:29 | krux02 | so you should be able to pay me. |
11:31:27 | clyybber | Araq: Which templates? |
11:32:12 | PMunch | No one have any suggestions for RSA libraries? |
11:32:47 | clyybber | Oh, seen the answer now |
11:32:54 | clyybber | Thanks :) |
11:32:56 | krux02 | dadada, the curated list I just set you is probably outdated and not the best. But it is a start. |
11:33:05 | FromGitter | <sheerluck> a release day! a release day! |
11:34:09 | krux02 | I think nim-awesome should be forked to github.com/nim-lang to make it more official. |
11:34:51 | dadada | krux02: thanks, there's also https://github.com/nim-lang/Nim/wiki/Curated-Packages |
11:34:58 | FromDiscord | <Recruit_main707> hello, let me explain the situation, there is a community for creating rocket league bots, (as i have mentioned here before), and i made some python intermediate bridge to connect Nim (and any executable really) to the game, and i was wondering if it is worth it getting it into nimble, (because you need to have rocket league installed to use it) what do you think? |
11:36:05 | FromDiscord | <Recruit_main707> (not only the python bridge, but the tiny framework i made in Nim for connecting to it and sending receiving data) |
11:36:18 | PMunch | Sure, why not |
11:37:16 | FromDiscord | <Recruit_main707> its just that if there is no one to use it (which is probably the situation) i can avoid having to do it :p |
11:37:23 | jken | Anyone here good with opengl and willing to tell me where I am going wrong setting up glVertexAttribPointer for my vertex data? |
11:37:24 | krux02 | Recruit_main707: How does it work. Does rocket league have any robot interface? is it a hack to read values out of the running executable? Or is it hard screen reading with image recognition? |
11:37:43 | FromDiscord | <Rika> i have a feeling its the middle one |
11:38:26 | FromDiscord | <Recruit_main707> krux02, at first the community started with reading values, but we actually got psyonix to support us officially and now the framework comes with rocket league |
11:38:31 | krux02 | Could be fun to program a team of rocket league players. |
11:38:46 | FromDiscord | <Recruit_main707> its only offline though |
11:38:48 | FromDiscord | <Rika> oh wow so its both the 1st and middle |
11:38:59 | FromDiscord | <Rika> why the python bridge though |
11:39:37 | FromDiscord | <Recruit_main707> bc they only support certain languages officially and i have no experience with flatbuffers (nor any faster language to develop the bridge) |
11:39:41 | krux02 | you don't need to be online to let AI play against each other if you can download other people's AI from the internet. |
11:40:13 | FromDiscord | <Rika> time to deconstruct the python library then π |
11:40:16 | FromDiscord | <Recruit_main707> ye, ofc, they have a cool gui with a bunch of bots by "default" |
11:41:00 | krux02 | I really thik AI programming is interesting. |
11:41:04 | FromDiscord | <Recruit_main707> https://tenor.com/view/it-just-works-tod-todd-howard-%d1%82%d0%be%d0%b4%d0%b4%d0%b3%d0%be%d0%b2%d0%b0%d1%80%d0%b4-fallout-skyrim-gif-14803660 |
11:42:17 | FromDiscord | <Recruit_main707> krux02: for now, most bots (and best ones) are hardcoded, but people are trying to use ML too |
11:42:53 | FromGitter | <sheerluck> Recruit_main707 there's russian chars in your url |
11:43:05 | jken | This isn't runnable, but the important bits are here. Anyone see my flaw? https://play.nim-lang.org/#ix=2f2y |
11:43:18 | krux02 | yea I think hardcodod bots can always be defeated by finding a weakness/exploat in the strategy. |
11:43:32 | jken | I think my stride and offset calculations for glVertexAttribArray are wrong but I can't figure out why |
11:44:03 | krux02 | jken, they are always wrong, because that is a very error prone process. |
11:44:48 | krux02 | That is why I wrote my project here: https://github.com/krux02/opengl-sandbox |
11:45:01 | krux02 | never ever write glVertexattribArray manually anymore. |
11:45:12 | krux02 | just feed it typed object and it will work. |
11:45:54 | jken | I am not sure what you mean by that krux02, could you elaborate? |
11:46:34 | krux02 | I wrote a project because I didn't like the error prone-ness of glVertexAttribArray and other low level opengl functions. |
11:47:00 | krux02 | they are low level, but they also expect you to set a lot of parameters correctly. A job that could be done easily by a human. |
11:47:12 | krux02 | But I also didn't want to use a game engine. |
11:47:28 | krux02 | I thought game engines are too restrictive |
11:48:10 | krux02 | sorry I mean "A job that could be done easily by a computer. It is very error prone when a human does it. |
11:48:46 | krux02 | So I tried to figure out how these parameters could be automatically infered by the context and types. |
11:49:04 | krux02 | just rinse and repead and this is what I ended up with: https://github.com/krux02/opengl-sandbox/blob/master/examples/hello_shapes.nim |
11:50:28 | krux02 | here is an example of how I call a shader program: https://github.com/krux02/opengl-sandbox/blob/master/examples/hello_shapes.nim#L210 |
11:51:39 | krux02 | paremeters like vertexOffset and baseVertex are still set explicitly, since I wanted to experiment with a single buffer for all meshes. |
11:52:08 | krux02 | (that part might be automated at some point too) |
11:53:47 | krux02 | and if you look in the attributes block, where I set a_vertex a_normal a_color, this block enables all attributes, provides attribute input variables in the shader, passes the attributes to the shader and tells opengl how to treat the input data. |
11:54:07 | krux02 | like I said, never ever call glVertexattribArray manually again |
11:54:35 | jken | looks like i have alot to learn |
11:54:54 | krux02 | this project is maximum metaprogramming in Nim. |
11:55:20 | krux02 | But I really have to reactivate it. I didn't touch it for quite some time, because I was too busy in working on the Nim compiler. |
11:56:55 | krux02 | this project is the reason I even started to learn Nim. It would simply not be possible in other programming languages. |
11:57:19 | dadada | since you seem to be an expert in this domain krux02, why would you use OpenGL over Vulkan for new projects? |
11:57:31 | Yardanico | well Vulkan seems to be much more verbose :P |
11:59:17 | krux02 | for me, OpenGL is just what I know better. |
11:59:46 | krux02 | but there are good reasons to take OpenGL over Vulkan. |
12:00:09 | krux02 | I can write you a hello triangle in basically 5 lines of code in OpenGL 1.0. |
12:01:10 | krux02 | The fixed function pipeline of OpenGL 1.0 is really great for individuals to get something to the screen without too much hassle in any direction. |
12:02:10 | krux02 | Yea, it is marked as "deprecated", but it is well specified, breadly implemented, and a lot of code relies on its existence. In other words, it won't go away. |
12:02:40 | Yardanico | well yeah, there's already a OpenGL->Vulkan implementation being worked on in Mesa |
12:02:42 | krux02 | Not saying immediate mode is "fast", I am just saying you get things faster done. |
12:02:54 | krux02 | Yardanico, yes |
12:02:54 | Yardanico | so even after vendors stop implementing OpenGL it'll be supported :P |
12:03:10 | krux02 | yes |
12:03:16 | Araq | if OSX deprecates OpenGL they might remove it some day. Not saying that's a good thing |
12:03:19 | krux02 | it will probably the other way araoud |
12:03:40 | Araq | but operating systems are not required to implement "standard X" at all, that's not how it works |
12:04:02 | Yardanico | there's already MoltenVK for Metal->Vulkan, and MoltenGL too (but it's proprietary) |
12:04:09 | FromDiscord | <Generic> I really dislike the opengl api with all of this binding stuff, it makes some many thing so cumbersome |
12:04:17 | Yardanico | and MoltenGL is for OpenGL ES though |
12:04:33 | krux02 | on OSX your choice is OpenGL from 10 years ago, or proprietary Metal (not Vulkan). |
12:05:07 | krux02 | yea this binding in OpenGL is horrible. |
12:05:27 | Yardanico | well MoltenVK works "quite well" so that you can even play Vulkan games :P or even play windows DX9/10/11 games with DXVK (DirectX) -> Vulkan -> Metal |
12:05:45 | clyybber | vulkan is awesome |
12:06:03 | krux02 | as far as I know MoltenVK isn't a full Vulkan implementation, because Metal doesn't support it. |
12:06:06 | clyybber | quite verbose but a much better debugging experience compared to opengl |
12:06:06 | FromDiscord | <Recruit_main707> no nim vulkan yet right? |
12:06:13 | Yardanico | there are libs for vulkan in nim |
12:06:16 | Yardanico | but they're bindings mostly |
12:06:19 | clyybber | Recruit_main707: I made bindings |
12:06:25 | clyybber | And I'm making an engine |
12:06:27 | jken | turns out all my troubles were because my Vertex type was a ref object |
12:06:36 | krux02 | bindings should not be a problem. |
12:06:52 | Yardanico | @Recruit_main707 when you want to find something implemented in Nim, search for it like that: https://github.com/search?q=language%3Anim+vulkan |
12:07:39 | FromDiscord | <Recruit_main707> cool, can i download them with nimble? |
12:07:50 | Yardanico | well yeah, ofc |
12:07:58 | Yardanico | most nim projects have a .nimble file, but not all :P |
12:08:05 | FromDiscord | <Recruit_main707> nice |
12:08:15 | Yardanico | clyybber's one doesn't, but you can just copy that single vulkan.nim file in your project |
12:08:48 | FromDiscord | <Recruit_main707> thats enough |
12:08:57 | Yardanico | NimGL seems to have Vulkan bindings too - https://github.com/nimgl/nimgl/blob/master/src/nimgl/vulkan.nim |
12:10:11 | clyybber | Oh, yeah |
12:10:17 | clyybber | Do you need nimble? |
12:10:26 | clyybber | I should probably publish it.. |
12:10:59 | FromDiscord | <Recruit_main707> me? i personally dont if its just one file, but it would be nice to have it in nimble nevertheless |
12:11:35 | clyybber | yeah |
12:27:15 | * | rockcavera joined #nim |
12:40:47 | clyybber | Araq: Should we maybe mark byaddr and thinout as experimental? |
12:41:01 | clyybber | So as to reserve the right to remove them |
12:42:07 | * | dadada quit (Ping timeout: 256 seconds) |
12:47:00 | Araq | thinout is opt-in via -d:nimThinout |
12:47:17 | Araq | and byaddr is a separate 'std' import |
12:47:26 | Araq | and 'std' is really 'experimental' |
12:47:28 | Araq | :D |
12:48:52 | * | dadada joined #nim |
12:49:15 | * | dadada is now known as Guest25620 |
12:51:08 | FromDiscord | <Rika> so `monotimes` is experimental? |
12:52:19 | PMunch | What is thinout? |
12:55:23 | * | sleepyqt_ joined #nim |
12:57:56 | * | lritter joined #nim |
12:58:47 | Araq | Rika: no. |
12:59:01 | * | sleepyqt quit (Ping timeout: 264 seconds) |
12:59:15 | Araq | I wasn't entirely serious but new modules start in std/ so that you don't have to update your import paths as they ripe |
12:59:55 | clyybber | Ok, cool |
13:01:39 | FromDiscord | <Rika> i see |
13:02:47 | * | Kaivo joined #nim |
13:03:10 | * | noonien quit (Quit: Connection closed for inactivity) |
13:11:48 | * | dddddd joined #nim |
13:17:40 | * | rnrwashere joined #nim |
13:21:50 | * | rnrwashere quit (Ping timeout: 250 seconds) |
13:42:36 | * | zacharycarter joined #nim |
13:48:39 | FromDiscord | <Generic> does byaddr work with the js backend? |
14:01:42 | FromDiscord | <Recruit_main707> i dont think so |
14:01:58 | FromDiscord | <Rika> is there a reason the `do:` syntax is totally undocumented |
14:02:40 | Yardanico | it is? lol |
14:02:44 | Yardanico | didn't notice :P |
14:03:26 | FromDiscord | <Rika> i tried searching everywhere lmao |
14:04:10 | solitudesf | https://nim-lang.org/docs/manual_experimental.html#do-notation |
14:04:58 | Yardanico | well, how it is experimental though? :P |
14:05:30 | FromDiscord | <Rika> ah its in experimental lmao |
14:05:50 | FromGitter | <kaushalmodi> use the `=>` from sugar; it's nice |
14:05:52 | FromGitter | <kaushalmodi> https://scripter.co/notes/nim/#do-notation |
14:06:08 | FromDiscord | <Rika> => doesnt allow me to do blocks of code π |
14:06:21 | FromGitter | <kaushalmodi> hmm |
14:07:05 | clyybber | use do then |
14:07:19 | FromDiscord | <Rika> the heck do you mean, i already amm |
14:07:20 | FromDiscord | <Rika> am |
14:10:20 | clyybber | kk |
14:15:08 | * | tefter quit (Ping timeout: 250 seconds) |
14:19:07 | * | clyybber quit (Quit: WeeChat 2.7.1) |
14:20:10 | FromGitter | <awr1> nimterop AST2 looks interesting |
14:24:09 | FromGitter | <awr1> does set[T] work with cligen? |
14:25:12 | FromGitter | <awr1> or is it seqs only |
14:30:04 | disruptek | cligen works with enums, if that's your question. i dunno if it knows how to constitute sets. |
14:37:28 | Yardanico | i like that you can do stuff like fs.setPosition(ePhoff + (if eClass == 1: 0x20 else: 0x38) * i) :P |
14:38:47 | disruptek | please no. |
14:39:40 | disruptek | i guess my idOrSig pr misses some corners. |
14:40:46 | disruptek | also, we should have it add the module name to tmpBase. |
14:45:26 | * | noonien joined #nim |
14:45:29 | * | natrys joined #nim |
14:46:32 | * | tane joined #nim |
14:50:46 | disruptek | is 1.2 a thing? |
14:52:34 | narimiran | disruptek: it will be soon ;) |
14:56:49 | Yardanico | is there a way to force C compiler to keep an unused string constant (nim const) in binary in release mode? |
14:57:17 | * | endragor quit (Remote host closed the connection) |
14:57:43 | lqdev[m] | are `osproc.Process`es closed automatically when the program quits? |
15:03:39 | FromDiscord | <Recruit_main707> can i create a pointer that points to an specific address? |
15:03:50 | FromDiscord | <Rika> addr (the object) doesnt work? |
15:03:51 | Yardanico | well, that would be a pointer to pointer, why not? |
15:04:02 | Yardanico | ah, I understand what you mean |
15:04:36 | Yardanico | Well, a pointer is basically a number which is an adress containing the thing pointer points to :P |
15:07:05 | * | drewr joined #nim |
15:11:27 | FromDiscord | <Recruit_main707> i want to do something like this https://play.nim-lang.org/#ix=2f3d |
15:12:00 | solitudesf | just cast it |
15:13:12 | Yardanico | @Recruit_main707 Addr is the address for which you want a pointer? |
15:13:12 | FromDiscord | <Recruit_main707> cast[ptr int]([the_number])? |
15:13:17 | Yardanico | yes |
15:13:48 | Yardanico | but if you cast an incorrect address and then try to access it - probably you'll get a segfault :) |
15:15:16 | FromDiscord | <Recruit_main707> risk it 4 the biscuit |
15:17:31 | FromGitter | <kennymalac> Hello all, trying to generate a cffi for mongo-c-driver, and I have this error when trying to generate for bson: |
15:17:32 | FromGitter | <kennymalac> Error: unhandled exception: getters.nim(103, 14) `name[0] != '_' and name[^1] != '_'` Identifier '_bson_context_t' (nskType) contains leading/trailing underscores '_' [AssertionError] [AssertionError] |
15:17:45 | FromGitter | <kennymalac> how do I handle this? nim doesn't allow leading underscores for type names... |
15:17:55 | FromGitter | <kennymalac> so *bson*context_t does not work |
15:20:41 | Yardanico | well, why do you need underscores in types names in Nim? |
15:20:59 | Yardanico | can't you just strip them or something like that? |
15:21:18 | FromGitter | <kennymalac> the cffi autogen is generating from the C type names in the header file |
15:22:42 | FromGitter | <kennymalac> proc onSymbol*(sym: var Symbol) {.exportc, dynlib.} = β β ```sym.name = sym.name.replace(re"_[_]+", "_").strip(chars = {'_'})``` β β seems like a workaround [https://gitter.im/nim-lang/Nim?at=5e78d441e2b4467c36f3f663] |
15:23:12 | FromGitter | <kennymalac> lol gitter.im removes the _ in the regex |
15:23:20 | FromGitter | <alehander92> use `` |
15:23:23 | FromGitter | <alehander92> for code snippets |
15:25:05 | FromGitter | <kennymalac> ` proc onSymbol*(sym: var Symbol) {.exportc, dynlib.} = β β ```sym.name = sym.name.replace(re"_[_]+", "_").strip(chars = {'_'})```` [https://gitter.im/nim-lang/Nim?at=5e78d4d1238b385efc9e43e9] |
15:27:32 | Yardanico | is this a new regression in devel with arc? when trying to do "echo repr fileobj" with |
15:27:40 | Yardanico | --gc:arc I get this: |
15:27:45 | Yardanico | /home/dian/stuff/nim-cephei/cephei.nim(107, 13) Error: ambiguous call; both repr_v2.repr(x: ref T or ptr T) [declared in /home/dian/.nim/lib/system/repr_v2.nim(106, 6)] and repr_v2.repr(x: ptr T) [declared in /home/dian/.nim/lib/system/repr_v2.nim(102, 6)] match for: (File) |
15:30:50 | shashlick | awr1: has been really challenging but a lot of fun |
15:31:50 | Yardanico | https://github.com/nim-lang/Nim/issues/13731 |
15:31:52 | disbot | β₯ A regression (?) with --gc:arc and repr ; snippet at 12https://play.nim-lang.org/#ix=2f3n |
15:32:08 | disruptek | Yardanico: repr wasn't supported in arc and then maybe it was and now maybe it isn't again. |
15:32:19 | Yardanico | well, still worth to make an issue :P |
15:33:20 | disruptek | okay, but note that it's basically code smell to use it at runtime. |
15:33:31 | Yardanico | well, repr is for debugging, isn't it? |
15:33:35 | Yardanico | at runtime |
15:34:25 | disruptek | debugging, yes. |
15:35:01 | * | endragor joined #nim |
15:39:07 | FromGitter | <kennymalac> how come nimterop is telling me |
15:39:07 | FromGitter | <kennymalac> #Type '_bson_value_t' skipped β β # Type 'bson_type_t' skipped |
15:39:17 | FromGitter | <kennymalac> and then subsequently saying bson_type_t is not defined, lol |
15:39:58 | * | endragor quit (Ping timeout: 256 seconds) |
15:40:18 | FromDiscord | <Rika> underscore |
15:40:27 | FromDiscord | <Rika> ah |
15:40:32 | FromDiscord | <Rika> the 2nd one i see |
15:40:33 | FromDiscord | <Rika> hm |
15:40:39 | FromDiscord | <Rika> maybe bug lol |
15:41:14 | shashlick | it has nested structs which nimterop doesn't support yet |
15:41:32 | shashlick | https://github.com/mongodb/libbson/blob/master/src/bson/bson-types.h#L275 |
15:41:53 | shashlick | ast2 will support it soon |
15:42:00 | FromGitter | <kennymalac> OK so what do I do about this |
15:42:02 | FromGitter | <kennymalac> as a workaround |
15:42:30 | shashlick | use c2nim to convert it and then add it to a cOverride section before your cimport |
15:42:43 | Deuns | euantor: same openbsd (-current), one can build nimble, the other can't open "std/options" :p |
15:42:52 | Deuns | everything is fine... |
15:42:54 | FromGitter | <kennymalac> ah alright |
15:43:05 | euantor | Deuns: Yeah, I'm not sure why at the minute |
15:43:24 | euantor | I'm setting up a clean OpenBSD 6.6 VM at the moment so I can test ona clean system |
15:43:39 | shashlick | kennymalac: https://github.com/nimterop/nimterop/issues/137 |
15:43:41 | disbot | β₯ Issues with nested structs ; snippet at 12https://play.nim-lang.org/#ix=2f3q |
15:44:39 | FromGitter | <kennymalac> mkay is there an example that does this somewhere? or how to do this ? thanks |
15:47:40 | FromGitter | <kennymalac> my guess is I just run c2nim and then take the proc definitions and put it in a cOverride block? |
15:47:59 | shashlick | copy/paste that struct into a.h, c2nim a.h - it might complain about some stuff, fix it in the a.h and rerun till you get it working |
15:48:24 | shashlick | let nimterop do all the other stuff, only hand-wrap this one struct with c2nim |
15:49:02 | axion | I think I'm about ready to give up on my first Nim project. Wrote a ton of code and can't figure out how to get rid of recursive module errors without shoving thousands of lines in 1 file. |
15:50:36 | disruptek | ~stream |
15:50:36 | disbot | stream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek |
15:50:43 | disruptek | today i think i'll just talk about musical lyrics. |
15:50:51 | disruptek | while i spelunk the compiler. |
15:51:25 | leorize | lqdev[m]: no |
15:53:09 | leorize | axion: well if you want recursive modules you gotta have a good reason to argue with Araq :P |
15:53:46 | Araq | not really. recursive module deps are blocked by IC |
15:53:50 | axion | I've been trying for 2 days now to structure the modules in this project in a way that will work. Nothing I try is working. I'm just not experienced enough to figure this out |
15:54:14 | Araq | apart from that it's basically an accepted RFC |
15:54:29 | disruptek | so put thousands of lines in a file. |
15:54:36 | disruptek | there are worse problems to have in life. |
15:54:38 | * | nsf quit (Quit: WeeChat 2.7) |
15:55:05 | Araq | maybe we'll make the import with a {.cyclic.} so that's explicit |
15:55:06 | leorize | axion: worst case scenario, use `include` to make a thousand lines file from multiple files |
15:55:24 | shashlick | axiom: can you share your code, we can make suggestions |
15:56:05 | axion | `include` may work, though it's all generics that would be duplicated. not sure if the compiler will warn/error |
15:56:31 | leorize | ofc it will :) |
15:56:46 | leorize | the idea is that you make your thousand line file with a ton of includes, like the compiler :P |
15:57:06 | axion | I can share what I have so far, though far from complete. |
15:57:10 | axion | Give me a moment please |
15:59:38 | axion | https://github.com/mfiano/origin.nim |
15:59:39 | FromGitter | <kennymalac> @shashlick possible to reference types that will be later defined? for instance, using uint32_t which gets generated from cinterop |
16:03:15 | FromGitter | <kennymalac> oh nevermind those are C types |
16:03:15 | FromGitter | <kennymalac> hmmm |
16:04:02 | FromGitter | <kennymalac> found it https://github.com/CoryNull/nim-bgfx/blob/master/bgfx/types.nim#L7 :) |
16:04:15 | leorize | axion: please inherit from either CatchableError or Defect :) |
16:05:17 | axion | I don't know what that means yet. I'm a complete newbie and taking one step at a time. A lot about this project can be improved I'm sure, but my focus is on organization right now. |
16:06:07 | leorize | so what's your problem rn? |
16:07:03 | axion | It's a bit hard to explain but |
16:08:26 | FromGitter | <kennymalac> now I get a very unhelpful error, lol |
16:08:27 | FromGitter | <kennymalac> /home/kenster/.choosenim/toolchains/nim-1.0.2/lib/core/macros.nim(1765, 43) Error: string literal expected |
16:09:13 | axion | The user is intended to import the main origin module only, which imports and exports the public API for them. One of those modules is common.nim which contains all the types and common operations for all the other modules. I don't want to export this module though, because it also contains internal stuff, like macros for internal use. I can't split them out into other files without recursive module |
16:09:15 | axion | errors. Additionally, the types aren't even exported by the main origin.nim module because they are in common. |
16:10:20 | FromGitter | <kennymalac> trying out 1.0.6 |
16:11:12 | * | natrys quit (Quit: natrys) |
16:11:42 | FromDiscord | <Rika> you can `import module except` |
16:12:01 | FromDiscord | <Rika> and `export module except` too afaik |
16:13:39 | axion | I can't import common.nim from origin.nim because common.nim needs to be imported from each other file and a circularity arises when trying to compile them |
16:13:50 | axion | It's all a big mess right now...been trying to find a way to fix it |
16:14:20 | FromDiscord | <Rika> theres a way to strategically place imports to avoid circularity |
16:14:24 | FromGitter | <kennymalac> okay upgrading didn't help, lol |
16:15:08 | FromGitter | <kennymalac> but line 1765 in macros.nim doesn't exist it only seems to go up to line 1665 |
16:15:30 | shashlick | kennymalac: that's not an error in nim |
16:15:36 | shashlick | that's an error in the generated code |
16:15:47 | FromGitter | <alehander92> Araq thanks for `.emit` |
16:15:49 | FromGitter | <alehander92> works well |
16:15:50 | axion | Rika: Probably. I feel like I'll get it in a few more weeks of trial and error. |
16:16:07 | shashlick | kennymalac: can you post your wrapper somewhere, i can look at it |
16:16:38 | FromDiscord | <Rika> axion theres a tutorial for how in the manual |
16:16:43 | FromGitter | <kennymalac> sure |
16:16:51 | FromDiscord | <Rika> first section of the manual |
16:17:17 | shashlick | also, cOverride will insert your override at the right location so it can refer to other stuff created by nimterop before this symbol |
16:17:33 | shashlick | but you need to make sure your override works by itself |
16:17:39 | shashlick | i.e. is valid Nim |
16:17:52 | FromDiscord | <Rika> https://play.nim-lang.org/#ix=2f3u ok so this doesnt seem to agree with me, is there a reason why? i know this is bad design, but im not keen on adding `.int` to the middle of 170 lines |
16:18:19 | FromDiscord | <Rika> because i have to do this manually, since all of these values are arbitrary |
16:18:29 | FromDiscord | <Rika> (i'm conforming to game values) |
16:19:05 | axion | "About this document"? |
16:19:46 | FromDiscord | <Rika> i mean the first part of the manual |
16:19:48 | FromDiscord | <Rika> there are 3 parts |
16:19:59 | FromDiscord | <Rika> https://nim-lang.org/docs/manual.html#modules |
16:20:02 | FromDiscord | <Rika> or am i mistaken |
16:20:05 | FromDiscord | <Rika> i think im thinking of something else |
16:20:11 | FromDiscord | <Rika> nonetheless ive sent the link |
16:20:45 | axion | Yeah I have read that. My problem is more domain specific due to the dependencies and generics used. |
16:21:10 | FromDiscord | <Rika> might need include then |
16:22:04 | FromGitter | <kennymalac> https://github.com/ParadigmInteractive/libmongonim @shashlick |
16:22:50 | solitudesf | @Rika, https://play.nim-lang.org/#ix=2f3v |
16:22:57 | solitudesf | a workaround |
16:23:18 | solitudesf | your version doesnt work because there converter doesnt get used. |
16:23:57 | solitudesf | wait, but should it?.. |
16:24:29 | FromDiscord | <Rika> those are my thoughts |
16:24:44 | disruptek | creepy. |
16:24:55 | disruptek | what card am i holding up? |
16:24:57 | solitudesf | no, its right, it shouldn't get used |
16:25:10 | FromDiscord | <Rika> why not? |
16:25:39 | solitudesf | youre calling this proc `proc `[]=`[I: Ordinal; T, S](a: T; i: I; x: S)` |
16:25:58 | solitudesf | its fully generic so it obviously doesnt call converter |
16:26:09 | * | endragor joined #nim |
16:26:42 | axion | Rika: I can't do that because it's intended for things in different modules to have the same such as consts and types |
16:26:49 | axion | same names* |
16:27:17 | axion | I think I need a break. Hurting my brain. Going to watch tv or something. |
16:28:19 | shashlick | kennymalac: trying |
16:29:02 | FromGitter | <kennymalac> cool |
16:29:45 | FromDiscord | <Rika> solitudesf, darn, okay |
16:30:16 | * | clemens3 quit (Quit: laterz) |
16:31:00 | solitudesf | just use your custom []= if you want to do wacky shit |
16:31:09 | * | endragor quit (Ping timeout: 258 seconds) |
16:34:07 | FromDiscord | <Rika> okay |
16:34:15 | shashlick | kennymalac: just change your cOverride uint32_t to just uint32 |
16:34:19 | shashlick | no need to declare those |
16:39:09 | * | clemens3 joined #nim |
16:39:12 | * | clemens3 quit (Client Quit) |
16:39:33 | * | clemens3 joined #nim |
16:40:16 | FromGitter | <kennymalac> oh okay |
16:41:04 | shashlick | Why did you have to override the enum |
16:41:36 | FromGitter | <alehander92> axion |
16:41:42 | FromGitter | <alehander92> hm https://github.com/mfiano/origin.nim/blob/master/src/origin/mat4.nim#L406 |
16:41:50 | FromGitter | <kennymalac> it complained about bson_type_t not being defined shashlick |
16:41:51 | FromGitter | <alehander92> i dont know algebra much |
16:42:02 | FromGitter | <alehander92> but isnt there a way to somehow loop over a pattern here |
16:42:09 | FromGitter | <kennymalac> oh weird, it compiles without it |
16:42:09 | FromGitter | <alehander92> it seems very easy to make a mistake |
16:42:43 | FromGitter | <alehander92> and the "loop" can still generate the same code |
16:42:54 | shashlick | Cool beans |
16:43:21 | FromGitter | <alehander92> might be closer to math defs otherwise tho so maybe i am wrong |
16:43:36 | FromGitter | <kennymalac> how would you debug the string literal expected? |
16:43:58 | axion | alehander92: Sure there is, but the overhead in doing so is not ideal. It could be a macro, but I'm trying to write this in an educational form without magic hidden behind tons of macros |
16:46:52 | * | Trustable joined #nim |
16:48:12 | axion | The only macro I will eventually have are matrix accessors, like M02 -> m[8], so it reads just like you'd read it in a math text. I'm actually going for verbosity here because math should be written as it would be on paper |
16:49:25 | FromGitter | <alehander92> hm, maybe |
16:49:41 | FromGitter | <alehander92> it's bit subjective thing but for educational purposes it makes sense |
16:50:05 | shashlick | kennymalac: did you change bson_subtype to bson_subtype_t in your override |
16:50:08 | shashlick | that's one failure |
16:50:24 | shashlick | same with bson_oid_t |
16:51:07 | euantor | so `nim dump` dumps a bunch of paths to stderr that look right, but they're unfortunately not full paths :( |
16:51:14 | shashlick | okay i'm down to the string literal error now |
16:52:22 | shashlick | here's how you debug that |
16:52:29 | shashlick | first `nim c bson.nim > a.txt` |
16:52:45 | shashlick | then open a.txt and see the nimterop/toast command line at the top |
16:52:53 | shashlick | run that on the command line with the -k flag |
16:53:26 | shashlick | basically you haven't declared your dynlib="bson" <= what is bson there |
16:54:23 | shashlick | change dynlib="bson" -> dynlib = "bsonLPath" |
16:54:26 | shashlick | and it works |
16:54:49 | FromGitter | <kennymalac> oh okay nice |
16:55:03 | FromGitter | <kennymalac> I did bson so I could get rid of this error from mongo: ERROR: bson/bson.h: No such file or directory |
16:55:23 | shashlick | here's your final wrapper - http://ix.io/2f3M/nim |
16:55:24 | FromGitter | <kennymalac> looks like it still errors |
16:56:44 | FromGitter | <kennymalac> hmm that link doesn't load for me |
16:57:00 | FromGitter | <kennymalac> should I make the output dir go to build/bson ? would that fix it? |
16:59:02 | shashlick | it isn't the output dir |
16:59:52 | FromGitter | <kennymalac> okay now the link works, it was my internet |
16:59:55 | FromGitter | <kennymalac> yeah nevermind |
17:00:05 | shashlick | try https://pastebin.com/s8AXP9SN |
17:04:10 | * | rnrwashere joined #nim |
17:05:46 | FromGitter | <kennymalac> so how to get bson.h loading from bson/bson.h as required by mongoc.h? |
17:06:06 | * | endragor joined #nim |
17:08:23 | * | rnrwashere quit (Remote host closed the connection) |
17:09:39 | shashlick | Oh you are onto the next one |
17:09:52 | shashlick | Use cIncludeDir |
17:10:02 | shashlick | See the nimarchive/archive wrapper |
17:10:12 | shashlick | How it refers to lzma, zlib, etc |
17:10:14 | * | endragor quit (Ping timeout: 240 seconds) |
17:10:41 | shashlick | If you include bson.nim then bsonPath will exist |
17:11:28 | FromGitter | <kennymalac> the reason I split them into two seprate files is having both getHeaders in the same file causes a compile time error |
17:11:31 | FromGitter | <kennymalac> probably a bug |
17:12:56 | FromGitter | <kennymalac> I think two headers from the same git repo fails |
17:13:47 | FromGitter | <kennymalac> so I don't think I can import it |
17:14:19 | FromGitter | <kennymalac> nvm, I can because it's not exported |
17:14:30 | FromGitter | <kennymalac> the conflicts that is |
17:16:46 | FromGitter | <kennymalac> ah this is confusing |
17:17:55 | * | ccreat joined #nim |
17:19:01 | * | ccreat left #nim (#nim) |
17:29:43 | * | rnrwashere joined #nim |
17:32:15 | shashlick | What's up |
17:32:55 | FromGitter | <kennymalac> I see I have to override the cmake values for the bson lib dir |
17:34:30 | * | rnrwashere quit (Remote host closed the connection) |
17:34:49 | * | rnrwashere joined #nim |
17:41:49 | * | natrys joined #nim |
17:54:46 | * | rnrwashere quit (Remote host closed the connection) |
17:59:13 | * | Guest25620 is now known as dadada |
18:01:37 | * | rnrwashere joined #nim |
18:01:44 | shashlick | if required that is |
18:02:21 | * | sleepyqt_ quit (Ping timeout: 265 seconds) |
18:02:38 | disruptek | !last zedeus |
18:02:39 | disbot | zedeus joined 12#nim-offtopic 5 days ago and last spoke 75 days ago |
18:02:46 | disruptek | where is he? |
18:02:48 | disruptek | sick? |
18:02:55 | zedeus | hello |
18:03:03 | disruptek | are you on stream? |
18:03:09 | disruptek | ~stream |
18:03:09 | disbot | stream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek |
18:03:15 | zedeus | nope, i'll have a look |
18:03:27 | disruptek | just realized i hadn't seen you in awhile. |
18:03:46 | FromGitter | <zetashift> 75 days ago surely is wrong no? |
18:04:14 | FromGitter | <alehander92> irc=>gitter doesnt get the color codes |
18:04:15 | zedeus | just been busy trying not to get infected :) |
18:04:30 | FromGitter | <alehander92> its probably 5 days |
18:04:42 | disruptek | yeah. |
18:04:47 | disruptek | get a real client. |
18:05:50 | Yardanico | quassel :P |
18:05:55 | dadada | let's say I want a sequence with many different types in it, where I don't know the composition at compile-time, Nim provides one way to do this through the Any type that can basically wrap any type you can use in Nim, but there's one complication here, when you eventually want to use the original object/type at runtime, you've to use the Any.kind field to determine the correct method (I mean proc) to do it |
18:06:01 | dadada | (something like getString() or getInt()), this works best I assume for builtin types like int, but what if you're dealing with custom objects, or maybe objects that users of your library will later define, what I mean is there's no generalized way of casting the type that is wrapped inside the Any into its original form (that I can see), has someone done any work to simplify dealing with this? |
18:06:26 | disruptek | yes, see the json module. |
18:06:32 | Yardanico | yeah, json is the way :P |
18:07:56 | dadada | I imagine there's some overhead involved with JSON, I'd prefer to find a way that works without it |
18:08:13 | Yardanico | as long as you're not decoding/encoding, not really |
18:08:15 | disruptek | let us know what you come up with. |
18:08:43 | Yardanico | json just uses an object variant with different fields |
18:08:50 | * | rnrwashere quit (Remote host closed the connection) |
18:09:11 | Yardanico | https://github.com/nim-lang/Nim/blob/version-1-0/lib/pure/json.nim#L156 |
18:09:17 | * | rnrwashere joined #nim |
18:17:17 | dadada | I may be mistaken here, but json can't preserve reference/pointers to objects? This can be done with Any getPointer and manual casting. I'll definitely try to come up with something. |
18:19:21 | disruptek | i think you're missing the point. |
18:19:45 | FromGitter | <alehander92> guys |
18:21:43 | dadada | alehander92: hello |
18:21:52 | FromGitter | <alehander92> yea |
18:21:58 | FromGitter | <alehander92> i want to talk about error types |
18:22:09 | * | btop joined #nim |
18:22:14 | FromGitter | <alehander92> its fun to talk about them |
18:22:17 | Yardanico | oh no |
18:24:03 | * | btop quit (Client Quit) |
18:24:04 | * | btop_ joined #nim |
18:34:30 | FromGitter | <alehander92> oh no |
18:39:04 | * | rnrwashere quit (Remote host closed the connection) |
18:47:58 | disruptek | what did we decide about shadowing with new type names? it'd be better to have a warning? |
18:48:08 | disruptek | ie. same name, new type |
18:53:16 | * | rnrwashere joined #nim |
18:56:29 | * | couven92 quit (Ping timeout: 265 seconds) |
18:58:58 | FromGitter | <alehander92> is this in the spec |
19:02:48 | * | MarderIII joined #nim |
19:08:44 | * | NimBot joined #nim |
19:12:34 | * | dadada quit (Ping timeout: 240 seconds) |
19:15:32 | * | dadada joined #nim |
19:15:43 | * | opal quit (Ping timeout: 240 seconds) |
19:16:21 | * | dadada is now known as Guest29670 |
19:18:11 | * | Guest29670 is now known as dadada |
19:18:51 | * | opal joined #nim |
19:32:12 | FromDiscord | <Recruit_main707> i am having an issue with passing pointers by value: https://play.nim-lang.org/#ix=2f4H (full error if you run the code) |
19:34:25 | leorize | well I'm seeing a crash which makes sense? |
19:34:38 | disruptek | weak symbol names? |
19:34:56 | FromDiscord | <Recruit_main707> ?? |
19:35:18 | leorize | so what's the problem? it's supposed to crash like that, at least with your snippet |
19:35:34 | FromDiscord | <Recruit_main707> then what am i doing wrong? |
19:35:52 | leorize | the value you hardcoded in there doesn't exists |
19:36:12 | leorize | pointers point to a place in the program's memory |
19:36:18 | Araq | how do you know that 0x8832205C is a valid address? |
19:37:03 | FromDiscord | <Recruit_main707> how can i know if they are valid addresses? |
19:37:12 | leorize | ... you can't |
19:37:58 | leorize | what are you trying to do? |
19:38:25 | FromDiscord | <Recruit_main707> here, making sure that variable is at a certain memory location |
19:38:39 | leorize | I'm sorry, but that's not how it works |
19:38:51 | FromDiscord | <Recruit_main707> this is just a demo |
19:38:54 | leorize | the OS assigns you the memory, you don't get to do that |
19:39:20 | FromDiscord | <Recruit_main707> in practice, i am trying to access a variable of another process |
19:39:26 | FromDiscord | <Recruit_main707> by reference |
19:39:29 | leorize | well but if what you mean is to convert an arbitary value into a pointer, then yes, that's how |
19:40:01 | leorize | you still can't do it like that, sadly |
19:40:15 | leorize | unless you have access to the program's address space |
19:40:34 | FromDiscord | <Recruit_main707> my code is injected in the process |
19:40:45 | leorize | sure, then that's how |
19:41:33 | FromDiscord | <Recruit_main707> ok, so ill have to keep trying |
19:41:37 | FromDiscord | <Recruit_main707> thank you |
20:03:01 | * | rnrwashere quit (Remote host closed the connection) |
20:17:18 | * | Vladar quit (Quit: Leaving) |
20:23:48 | * | PMunch quit (Quit: leaving) |
20:37:48 | * | filcuc joined #nim |
21:12:00 | * | filcuc quit (Ping timeout: 250 seconds) |
21:15:54 | * | narimiran quit (Ping timeout: 240 seconds) |
21:17:42 | * | endragor joined #nim |
21:20:11 | * | natrys quit (Ping timeout: 250 seconds) |
21:22:25 | * | endragor quit (Ping timeout: 264 seconds) |
21:27:17 | * | MarderIII quit (Quit: Leaving) |
21:33:46 | * | natrys joined #nim |
21:33:46 | * | natrys quit (Client Quit) |
21:45:01 | * | rnrwashere joined #nim |
21:53:54 | rockcavera | Is there a proc to check if a string is a valid ipv4 or ipv6? |
21:55:37 | leorize | no |
21:56:42 | leorize | though there's this: |
21:56:50 | leorize | !packages validateip |
21:56:51 | disbot | https://github.com/Akito13/nim-validateip -- 9validateip: 11Checks if a provided string is actually a correct IP address. Supports detection of Class A to D of IPv4 addresses. |
21:57:28 | rockcavera | thanks |
22:00:48 | axion | What am I doing wrong here? I'm confused why it's returning -1: https://play.nim-lang.org/#ix=2f5t |
22:04:19 | shashlick | -1 or 0 = |
22:04:43 | axion | ? |
22:06:08 | * | Trustable quit (Remote host closed the connection) |
22:06:20 | * | solitudesf quit (Ping timeout: 246 seconds) |
22:08:32 | lqdev[m] | is there a way for sending data in to a process progressively? eg. I want to send some PNG files to the stdin of an ffmpeg Process, but I don't have them all at once. instead, they come in slowly, rendered from Blender |
22:08:35 | * | filcuc joined #nim |
22:08:56 | disruptek | !repo asynctools |
22:08:56 | disbot | https://github.com/cheatfate/asynctools -- 9asynctools: 11Various asynchronous tools for Nim language 15 53β 12π΄ |
22:09:15 | axion | Hmm. I was expecting `or` to short circuit and not evaluate later terms. I'll have to think of the proper way to do this. I'm too used to FP style it seems. |
22:12:39 | FromGitter | <kaushalmodi> axion: in your example, you are using a type name `char` as var name |
22:13:43 | FromGitter | <kaushalmodi> also `find` returns int and `or` would be to OR bools |
22:14:08 | axion | gah, in lisp everything that isn't false is truthy |
22:15:20 | FromGitter | <kaushalmodi> this is a compiled lang |
22:15:27 | axion | so is common lisp |
22:15:30 | FromGitter | <kaushalmodi> true != 1 |
22:21:50 | FromDiscord | <Rika> this is a lang that doesnt have a concept of truthy |
22:22:46 | leorize | axion: only true means true in Nim |
22:22:52 | axion | I noticed. I'm fighting every step of the way trying to write as expressive and efficient code as I am used to. It's not easy to write Nim without lots of boilerplate, whether in the form of macros or runtime branching |
22:23:26 | FromDiscord | <mratsim> WHat? |
22:23:27 | leorize | instead of that, try this: `char in "xyzw"` |
22:23:27 | axion | I think a blog post is in order, as other Lispers have been asking me how my progress has been. |
22:23:49 | FromDiscord | <Rika> theres a balance between expressive and less error prone perhaps |
22:24:18 | FromDiscord | <mratsim> in my experience, only very few language were more expressive than Nim (i.e. Haskell) but they had oother issues |
22:24:29 | axion | If I wanted less error prone I'd use a dependently typed language or a static Lisp like Carp, which Nim is not. |
22:24:45 | FromDiscord | <Rika> dependently typed language? |
22:25:26 | FromDiscord | <Rika> maybe what you mean instead of expressive is terse |
22:26:19 | FromDiscord | <mratsim> Nim can do dependent typing |
22:27:30 | FromGitter | <zetashift> I like the fact that only true means true in Nim and I don't find that it impairs it's expressiveness. Maybe your view of expressive code is different then what Nim thinks? |
22:28:29 | FromDiscord | <mratsim> https://github.com/mratsim/constantine/blob/master/constantine/arithmetic/finite_fields.nim#L32-L38 |
22:28:29 | FromDiscord | <mratsim> https://github.com/mratsim/constantine/blob/master/constantine/arithmetic/bigints.nim#L58-L75 |
22:28:29 | FromDiscord | <mratsim> |
22:28:29 | FromDiscord | <mratsim> ^ this is using dependant typing |
22:28:30 | FromDiscord | <mratsim> |
22:28:33 | FromDiscord | <mratsim> And I'm also modeling algebraic concept of groups, fields and number theory: https://github.com/mratsim/constantine/blob/master/constantine/tower_field_extensions/abelian_groups.nim#L38-L44 |
22:29:13 | FromDiscord | <Rika> is there dependent typing in functions? |
22:29:50 | FromDiscord | <mratsim> This is an example: https://github.com/mratsim/Arraymancer/pull/413#issuecomment-586924873 |
22:29:52 | disbot | β₯ WIP: Add dbscan clustering method ; snippet at 12https://play.nim-lang.org/#ix=2bWh |
22:30:09 | FromDiscord | <mratsim> "Alternative 2 typedesc dispatch" |
22:31:51 | FromDiscord | <mratsim> Nimcrypto is entirely based on typedesc dispatch: https://github.com/cheatfate/nimcrypto/blob/master/nimcrypto/hash.nim#L68 |
22:32:18 | axion | dependent types can have the return type depend on information only known at runtime. |
22:32:23 | * | lritter quit (Ping timeout: 260 seconds) |
22:32:28 | axion | In order to typecheck the compiler has to verify that the types work out for every possible value though |
22:32:40 | axion | (Which means dep-typed langs tend to be rather picky about the allowed values you can construct) |
22:33:01 | FromDiscord | <mratsim> pretty sure Idris doesn't allow that |
22:33:19 | FromDiscord | <Rika> `I`dris or `l`dris? |
22:33:28 | FromDiscord | <mratsim> Is there runtime dependant type? Isn't that just an interface or polymorphism? |
22:33:39 | FromDiscord | <mratsim> Idris with i |
22:33:51 | FromDiscord | <Rika> i think you misunderstood them |
22:34:50 | axion | Depends how dependent the types have gotten I suppose. |
22:35:19 | axion | The entire point of curry-howard is that every program you write is a proof of something, itβs just without the rich specification of dependent types the particular properties youβre "proving" are more or less trivial. |
22:37:01 | leorize | can I have some examples? |
22:37:11 | leorize | this sounds interesting |
22:37:29 | rayman22201 | Of all the criticisms of Nim that I have heard, I never thought I would hear "Nim is not expressive enough"... only the most hard core lisp person could come up with with that lol |
22:37:36 | FromDiscord | <Rika> lmaooo |
22:37:41 | FromDiscord | <Rika> or maybe the haskeller |
22:37:47 | axion | I would read "The Little Typer" or "Type-Driven Development in Idris". It's a pretty complex subject to say the least if you aren't familiar with proof assistants already |
22:38:12 | FromDiscord | <Rika> sounds like something that would be nice tbh but sounds like a pain to implement |
22:38:13 | FromDiscord | <mratsim> Coq is a bit too much for first contact π |
22:38:23 | FromDiscord | <mratsim> Z" would be a step in that direction |
22:38:26 | FromDiscord | <mratsim> Z3 |
22:38:37 | FromDiscord | <mratsim> F* is using Z3 for their dependent type system AFAIK |
22:39:24 | FromDiscord | <mratsim> currently Nim is a collection of typedesc and static cobbled together, it kind of works but it's easy to trigger "Cannot instantiate T" |
22:39:35 | FromDiscord | <Recruit_main707> leorize: got it to work, sleep() function was crashing my program, so i can only burn cpu |
22:39:57 | FromDiscord | <mratsim> besides the cannot instantiate or the straight up crash I didn't see any type-level bug though. |
22:42:15 | * | couven92 joined #nim |
22:47:07 | axion | rayman22201: "expressive" means that it's easy to write code that's intutitive, both for the compiler and a human. The addition of un-needed boilerplate code, not being able to share names between consts/procs for example, or wrongly choosing a reserved keyword because there's no context-sensitive shadowing (god, i can't count how many times i tried using `out` etc), that goes against it. |
22:48:20 | axion | But you're right. I've been using Lisp for a couple decades so I am quite hardcore :) |
22:51:43 | FromDiscord | <Rika> un-needed boilerplate code -> example? |
22:52:04 | FromDiscord | <Rika> not being able to share names between consts/procs for example -> with UFCS, this is impossible i'm pretty sure |
22:52:15 | FromDiscord | <Rika> actually, probably is possible |
22:52:23 | FromDiscord | <Rika> i've just not thought of it that much |
22:52:48 | FromDiscord | <Rika> wrongly choosing a reserved keyword because there's no context-sensitive shadowing -> this is prolly easy to implement |
22:54:18 | FromDiscord | <mratsim> const and proc and modules can have the same name though? |
22:54:33 | rayman22201 | Reserved keyword sharing would be hard b/c of the way the Nim lexer works afaik. Nim is very much a classical lang and not a lisp in this regard. |
22:54:40 | rayman22201 | shadowing* |
22:54:44 | FromDiscord | <mratsim> I think keyword are actually hard because they are parser level |
22:54:52 | FromDiscord | <Rika> huh, i see |
22:55:19 | FromDiscord | <mratsim> The "block" keyword is super annoying in particular |
22:55:29 | FromDiscord | <Rika> why so? |
22:55:34 | FromDiscord | <mratsim> In blockchain everything is a block ... |
22:55:41 | FromDiscord | <mratsim> in our codebase it's blck or blk |
22:55:41 | FromDiscord | <Rika> ooh |
22:55:44 | FromDiscord | <Rika> ouch |
22:55:53 | FromDiscord | <Rika> i've seen most people use blk |
22:57:31 | shashlick | axiom: appreciate the struggle, i had similar challenges with python lists to nim, etc. but nim != lisp so some mental flexibility is warranted |
22:57:36 | rayman22201 | axion, it seems to me that you really want Nim to be a lisp. for better or worse it is not. Nim is a "classic" statically typed language that happens to have an expansive macro system. |
22:57:47 | FromDiscord | <mratsim> oh yeah, the list comprehensions :/ |
22:58:14 | * | dadada quit (Ping timeout: 240 seconds) |
22:58:54 | FromDiscord | <Rika> oh i had no issues with list comprehensions |
22:59:06 | FromDiscord | <Rika> just converted them to mapIt and filterIt |
22:59:08 | axion | Yeah reserved keywords are by far the most annoying thing for me so far. In Lisp, we can annotate the parser to tell it to look in a different symbol table on a per module-basis, and fully qualify the originals if we want them back |
22:59:50 | rayman22201 | axion, slightly off topic, but I think I found your blog https://www.michaelfiano.com/. I'm curious how your transition to racket went? Since you came to our corner of the internet, I'm guessing you had some issues there too? |
23:00:49 | leorize | axion: well you can use Nim's keywords as identifier |
23:00:58 | FromDiscord | <Rika> axion, i mean you can use backticks to use them |
23:01:00 | leorize | it's just not really pretty |
23:01:03 | axion | rayman22201: That was years ago. I wrote about my transition back to Common Lisp a post or two later, mostly because it generates efficient machine code. |
23:01:10 | FromDiscord | <Rika> just, 2 extra characters aint worth it |
23:04:36 | * | dadada joined #nim |
23:04:59 | * | dadada is now known as Guest80189 |
23:05:27 | rayman22201 | ah. I saw the update about moving back to CL, but I didn't see the reasoning. |
23:06:43 | axion | rayman22201: and no, I don't want Nim to be a Lisp. Infact the reason I'm learning Nim is because I've grown tired of the ecosystem, and the people surrounding it. I wrote about it a few days ago here, but in short, there is no collaboration and requires a very specific set of tools that only really work with Emacs, which I also dislike. I wanted to join the world of more traditional compiled |
23:06:45 | axion | languages...just going through some growing pains. |
23:07:37 | leorize | I'd say try not to focus too much on the efficient part rn |
23:07:41 | leorize | write code that looks good |
23:07:46 | leorize | then make it run got |
23:07:48 | leorize | good* |
23:08:33 | leorize | I'm certain that you know the basics, so whatever you designed will not be horrendously slow |
23:08:33 | axion | Oh and I'm not. I'm trying to write code that expresses my ideas but having a hard time learning how to do trivial tasks. |
23:08:48 | leorize | learn some Nim idioms :) |
23:09:15 | disruptek | ^ |
23:09:16 | leorize | instead of `find(string, char) >= 0`, use `contains(char, string)` or `char in string` :) |
23:09:27 | axion | My only resources have been the manual and the tutorials and NIA. I read all them, and going back and forth between them every day, and some things still don't click with me. |
23:10:02 | leorize | you forgot that you have #nim as a huge resource :) |
23:10:04 | rayman22201 | I understand. :-) You are definitely giving up some "cosmic superpowers" that only a lisp (or Haskell maybe) can provide. But I do hope you stick around. We always need more smart people. |
23:10:18 | FromDiscord | <Rika> leorize, `contains(string, char)` |
23:10:29 | leorize | ah, yea |
23:11:27 | axion | leorize: Yeah and tbh it was the biggest help by far. The documentation is pretty hard to navigate with Ctrl+F as a single page, there is only one years-old published book, and the community is still quite small, but I'm hoping all of that will change sometime. |
23:11:32 | FromDiscord | <Rika> other than the ecosystem, what's worse in Lisp vs Nim? |
23:12:16 | * | rnrwashere quit (Remote host closed the connection) |
23:12:31 | leorize | we got the man power for writing code, we just lack the man power writing documentation :p |
23:13:04 | leorize | @Rika: I'd say the parenthesis but Lisp users will kill me :) |
23:13:29 | FromDiscord | <Rika> axi0n's gonna i bet |
23:13:44 | axion | Rika: Aside the ecosystem/community? The tooling and editor lock-in. The language itself is fine in all respects if you ask me. |
23:14:28 | FromDiscord | <Rika> huh interesting |
23:14:35 | shashlick | What about the tooling |
23:15:04 | * | rnrwashere joined #nim |
23:15:36 | axion | Well, CL is built for interactive compilation from the ground up, and so requires extensive introspection support. You basically run a server in CL, and a client in the editor listens and responds to events. The only editor worth using for this is Emacs. |
23:15:37 | FromDiscord | <Rika> oh also for those who actually decide on nim functionality, what's the reason for declaring that there is no "truthiness" and everything that needs a bool must need a bool? |
23:15:57 | axion | LSP is not good enough for Lisp. It doesn't cover everything that the language has to offer |
23:16:29 | leorize | @Rika: because it's stupid |
23:17:31 | rayman22201 | lol, partially, but it's also about taste. some people prefer truthiness to be more strict. |
23:17:38 | axion | leorize: You don't even see the parentheses or type them for that matter in Lisp with proper tooling. That's the biggest complaint to outsiders that never work with CL |
23:17:49 | leorize | I'd say that it's an artifact of C's weak typing |
23:18:12 | FromDiscord | <Rika> C's weakly typed? |
23:18:27 | rayman22201 | yes. very much so |
23:18:39 | FromDiscord | <Rika> guess i havent worked with it enough |
23:18:42 | * | tane quit (Quit: Leaving) |
23:21:23 | leorize | axion: "proper tooling" :P |
23:21:29 | leorize | you mean emacs :p |
23:21:56 | axion | I mean the dozen or so plugins for it that aren't yet mature enough on other platforms |
23:22:15 | leorize | though I'll admit that I've never written any lisp other than some for emacs to install plugins |
23:22:24 | rayman22201 | I like Nim's boolean behavior. I think it prevents bugs. I have seen plenty of C bugs from throwing incorrect things into a boolean expression... |
23:22:49 | * | couven92 quit (Remote host closed the connection) |
23:22:59 | axion | leorize: regarding your `find` suggestion. I need to find the position of a character in one of 3 different strings, or false if not present in any of them. |
23:23:15 | * | couven92 joined #nim |
23:23:19 | axion | not a simple boolean expression |
23:23:33 | FromDiscord | <Rika> are they in a seq or array |
23:23:40 | axion | static strings |
23:23:59 | * | couven92 quit (Client Quit) |
23:24:19 | FromDiscord | <Rika> you'll still need find then |
23:24:22 | FromDiscord | <Rika> also |
23:24:49 | leorize | axion: for i in [ConstString1, ConstString2]: result = find(i, char); if result != -1: break |
23:24:53 | FromDiscord | <Rika> maybe use an Option, then return none if not found then a some if found |
23:25:16 | FromDiscord | <Rika> maybe i'm thinking too weirdly lmao π |
23:25:23 | axion | Also, I didn't mean to sound like I was so upset with Nim above if I came off to be. It's just frustrating learning a new language after decades of using a very unorthodox language _exclusively_ every day. I love Nim so far. |
23:25:40 | rayman22201 | not crazy, I would use an Option for this too |
23:25:49 | * | filcuc quit (Quit: Konversation terminated!) |
23:25:54 | FromDiscord | <Rika> you sounded very annoyed yeah but that's to be expected really |
23:26:03 | leorize | I'd vote for Option[Natural] :) |
23:26:12 | * | rnrwashere quit (Remote host closed the connection) |
23:26:22 | FromDiscord | <Rika> somehow i never experienced this phase, though i came from python |
23:26:49 | leorize | python is nowhere near the weirdness of lisp :P |
23:26:59 | rayman22201 | axion, yay, good to hear we haven't lost you π |
23:27:02 | FromDiscord | <Rika> exactly why i said `though` π |
23:27:19 | * | krux02 quit (Remote host closed the connection) |
23:27:21 | * | uvegbot quit (Remote host closed the connection) |
23:28:14 | * | Guest80189 quit (Ping timeout: 246 seconds) |
23:29:41 | * | krux02 joined #nim |
23:29:51 | * | uvegbot joined #nim |
23:29:53 | shashlick | axion I was asking about Nim tooling but guess I read your comment wrong |
23:30:10 | * | luis_ joined #nim |
23:30:36 | leorize | he was complaining about lisp |
23:31:44 | axion | Yeah, Nim's tooling is excellent. Particular props to leorize for his great vim support. But, `nim`, `nimsuggest`, `nimble`, etc are also great |
23:33:06 | leorize | I'm glad I freed you from the emacs abomination |
23:33:10 | axion | At face value, ignoring any subtle bugs that may exist, Nim's tooling is perfect. |
23:33:32 | leorize | you'll find the situtation reversed here, emacs tooling for nim is kinda bad :P |
23:34:11 | axion | I noticed. I tried to Nim in Emacs when I was deciding to switch to Nim and still in "lisp mode". I'm glad I didn't base my decision of of that :) |
23:34:32 | * | dadada__ joined #nim |
23:35:01 | axion | Though to be honest, I've read the manual 3 times in the last 2 years and been keeping an eye on it since back then. Only recently actually started writing code though. |
23:39:25 | axion | My only real complaint with Nim is something that can't be fixed because it's not a Lisp. |
23:39:32 | axion | So I'll just have to get used to it |
23:42:34 | axion | In Lisp, writing macros is no different than writing any other code, because Lisp code is already in AST form. Code in a macro is the same as code outside of a macro. In Nim, it's much more tedious and forces me to switch contexts. But it is what it is. A lot of languages don't even have macros to this degree anyway. So no real complaint...just more work to get the same job done. |
23:43:32 | * | luis_ quit (Ping timeout: 260 seconds) |
23:45:18 | FromDiscord | <Rika> argh! i keep on forgetting i cant use linenoise on windows |
23:52:40 | FromDiscord | <treeform> Hey guys, is there a way to pin the main thread - the thread you start with to a CPU? `pinToCpu` takes a thread object, but how do it get for the main thread? |
23:53:57 | FromDiscord | <treeform> I am starting a work q of threads, I would like to keep main thread on 0th core, while create work threads for the rest of the cores and pin all of the threads. Is doing that smart or stupid? |
23:57:59 | * | dadada__ quit (Ping timeout: 246 seconds) |
23:58:33 | leorize | that's stupid imo |