00:04:53 | * | Tanger quit (Ping timeout: 272 seconds) |
00:06:27 | * | disbot joined #nim |
00:07:22 | * | disruptek joined #nim |
00:07:42 | * | bunbunbunbunny quit (Ping timeout: 256 seconds) |
00:09:37 | * | tane quit (Quit: Leaving) |
00:10:32 | FromDiscord | <exelotl> https://play.nim-lang.org/#ix=2dAd |
00:11:16 | FromDiscord | <exelotl> bunbunbunbunny: basically made my own container where the length is derived from the enum, and you can't change it. |
00:12:14 | * | letto_ joined #nim |
00:12:20 | FromDiscord | <exelotl> maybe you could do `type VariantList* = distinct seq[Option[CmpVariant]]` |
00:12:21 | FromDiscord | <Elegant Beef> any clues why replace isnt working on `\n\e`? |
00:12:45 | FromDiscord | <exelotl> (if you don't care about storing the `ann` alongside the list) |
00:13:41 | * | letto quit (Ping timeout: 265 seconds) |
00:13:57 | FromDiscord | <exelotl> if you were to do it with a distinct type it might be easier cause you could {.borrow.} most of the procs such as `len`, `[]` and `[]=` |
00:14:48 | FromDiscord | <exelotl> to save implementing them yourself |
00:16:52 | FromDiscord | <exelotl> but yeah basically: if you want arrays of different lengths, you're best off using seqs. if you want to enforce some rules such as "length stays fixed at runtime and it can only be certain lengths", you're best off making a custom type for it. |
00:31:58 | * | filcuc quit (Quit: Konversation terminated!) |
00:52:20 | * | rockcavera quit (Remote host closed the connection) |
00:58:44 | * | zahary quit (Quit: Leaving.) |
00:58:47 | FromDiscord | <flywind> I find why get overflow error yesterday.My line is too long.Though I don't know why so many empty space maybe owe to vscode. |
00:59:14 | FromDiscord | <flywind> |
00:59:14 | FromDiscord | <flywind> https://cdn.discordapp.com/attachments/371759389889003532/685652746103423108/unknown.png |
01:39:41 | * | sealmove quit (Quit: WeeChat 2.7.1) |
01:52:49 | * | rockcavera joined #nim |
01:55:08 | * | jjido quit (Quit: Connection closed for inactivity) |
01:58:50 | * | Zectbumo quit (Remote host closed the connection) |
02:08:38 | * | NimBot joined #nim |
02:28:39 | * | krux02 quit (Remote host closed the connection) |
02:40:00 | * | Hideki_ joined #nim |
02:44:26 | * | Hideki_ quit (Ping timeout: 258 seconds) |
02:47:55 | * | Zectbumo joined #nim |
02:49:39 | * | abm quit (Quit: Leaving) |
02:55:15 | * | chemist69 quit (Ping timeout: 272 seconds) |
02:56:51 | FromDiscord | <mfiano> How do I pass an object by reference? |
02:57:08 | * | chemist69 joined #nim |
02:58:24 | disruptek | anything that consumes more than 3*float bytes is by-reference automatically. |
02:59:07 | disruptek | 3*sizeof(float), i should say. |
03:00:05 | FromDiscord | <exelotl> huh I remember hearing about that... but semantically it always has to act like a copy though right, so what trickery is used? |
03:01:17 | FromDiscord | <exelotl> oh wait, I'm being dumb, you can't mutate arguments |
03:01:36 | FromDiscord | <exelotl> I should be talking about code at 4am |
03:02:09 | disruptek | i mean, you're not dumb. there be dragons from time to time. |
03:02:28 | FromDiscord | <exelotl> *I shouldn't |
03:02:47 | disruptek | ar4q says not to use refs. i tend to say, "have you tried using a ref?" |
03:03:15 | disruptek | because i've hit too many scenarios where it magically solves subtle problems like with inheritance, etc. |
03:03:34 | disruptek | it's a simply fear of the unknown on my part. |
03:04:01 | disruptek | but certainly, the intention is for non-refs to replace refs in most cases. |
03:04:12 | FromDiscord | <mfiano> I can't get an object with 4 f64's to pass by reference |
03:04:25 | FromDiscord | <mfiano> keep getting type mismatch |
03:04:37 | disruptek | !paste |
03:04:41 | disruptek | ~paste |
03:04:42 | disbot | paste: 11a frowned-upon behavior in chat; please use a service such as https://play.nim-lang.org/ or http://ix.io/ or https://gist.github.com/ and supply us a URL instead. -- disruptek |
03:05:08 | FromDiscord | <mfiano> I'm just trying stuff randomly on stream with a couple other people right now...no real code |
03:05:35 | disruptek | are you mfiano there? |
03:05:48 | FromDiscord | <mfiano> mfiano where? |
03:05:49 | disruptek | i'm just about to stream but i'll watch you instead. |
03:06:01 | disruptek | twitch? |
03:06:14 | FromDiscord | <mfiano> I don't use that really |
03:06:21 | disruptek | oh, what do you use? |
03:06:24 | FromDiscord | <mfiano> Are you on irc or gitter? |
03:06:30 | disruptek | yep. |
03:06:37 | FromDiscord | <mfiano> which? |
03:06:40 | disruptek | irc. |
03:07:00 | * | mfiano joined #nim |
03:07:38 | FromDiscord | <Varriount> He's actually a hallucination embedded in your mind. |
03:11:14 | FromDiscord | <exelotl> @mfiano right so your problem most likely is, your regular object is allocated on the stack, but ref objects are allocated on the heap |
03:12:52 | FromDiscord | <exelotl> you can't pass a non-ref object to a procedure that expects a ref. Because the object will be deallocated as soon as it goes out of scope. Which would be disastrous if the procedure tried to (for example) store the ref somewhere for later. |
03:13:49 | FromDiscord | <exelotl> so the solution is to create a ref object, allocate it, and then pass the newly allocated object to the procedure |
03:14:15 | * | muffindrake quit (Ping timeout: 272 seconds) |
03:14:57 | FromDiscord | <Elegant Beef> So im using GLFW and the setKeyCallback takes in a GLFWKeyFun which is a type that equals a proc, doesnt that mean it should take any proc that matches that signature? |
03:16:33 | * | muffindrake joined #nim |
03:19:56 | FromDiscord | <Elegant Beef> ah the pragmas also had to match |
03:24:18 | * | dadada quit (Ping timeout: 258 seconds) |
03:26:12 | * | dadada joined #nim |
03:26:36 | * | dadada is now known as Guest11315 |
03:32:51 | * | Zectbumo quit (Remote host closed the connection) |
03:48:25 | leorize | shashlick: did you manage to make a docker image? |
03:52:45 | disruptek | ~stream |
03:52:45 | disbot | stream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek |
04:06:51 | FromDiscord | <mfiano> Why is the compiler throwing away line 24 on the assumption that it is not mutating `v`? Works if a bind it to `result`, but not like this? https://play.nim-lang.org/#ix=2dAR |
04:07:00 | FromDiscord | <mfiano> Why is the compiler throwing away line 24 on the assumption that it is not mutating `v`? Works if I bind it to `result`, but not like this? https://play.nim-lang.org/#ix=2dAR |
04:08:57 | * | Guest11315 is now known as dadada |
04:09:35 | dadada | when trying to write a brand new macro I hit this error early on |
04:09:45 | dadada | https://play.nim-lang.org/#ix=2dAS |
04:09:55 | dadada | Error: internal error: getTypeDescAux(tyProxy) |
04:10:07 | dadada | is this a bug in the compiler, or did I do something wrong there? |
04:11:34 | dadada | when you put dumpTree: around it, there's no error, so it should be possible to parse this |
04:18:58 | dadada | nevermind, this was my fault |
04:19:54 | dadada | although I think this shouldn't be labeled as an "internal error" maybe?! |
04:23:20 | dadada | disruptek: /me is watching you all the time now! |
04:32:01 | * | rockcavera quit (Remote host closed the connection) |
04:38:31 | shashlick | @leorize nope not yet |
05:05:48 | FromDiscord | <mfiano> I'm not sure why this is segfaulting |
05:05:53 | FromDiscord | <mfiano> Maybe a bug in the compiler... |
05:19:05 | FromDiscord | <Varriount> @mfiano feel free to post a link to the code |
05:21:00 | FromDiscord | <Elegant Beef> @mfiano the original issue is the proc has a return type, in what you posted it was returning a vec2 but not discarding |
05:40:14 | * | okcy joined #nim |
05:40:31 | * | okcy quit (Client Quit) |
05:40:48 | * | okcy joined #nim |
05:42:30 | FromDiscord | <mfiano> https://play.nim-lang.org/#ix=2dB3 |
05:51:56 | * | silvernode joined #nim |
05:55:28 | FromDiscord | <Elegant Beef> For what you're doing something like this makes more sense |
05:55:28 | FromDiscord | <Elegant Beef> https://play.nim-lang.org/#ix=2dBc |
05:55:28 | FromDiscord | <Elegant Beef> @mfiano |
05:56:29 | kungtotte | Why bother with making it a pointer and dereferencing it? You'll accomplish the same thing with a var parameter |
05:56:36 | FromDiscord | <Elegant Beef> Oh i know |
05:57:06 | FromDiscord | <Elegant Beef> What they were doing is quite weird so i just solved it one wacky way π |
05:58:49 | kungtotte | I think this is more along the lines of what they were trying to accomplish: https://play.nim-lang.org/#ix=2dBd |
05:59:19 | FromDiscord | <Elegant Beef> Yea but doesnt change the "but why" aspect |
06:00:07 | kungtotte | That's an issue we can't solve in code ;) |
06:00:17 | FromDiscord | <mfiano> I'm trying to mutate a var with a chain of mutating procs using UCS |
06:00:26 | FromDiscord | <mfiano> it works for the first one, but not with a chain |
06:00:31 | FromDiscord | <Elegant Beef> Ah the vect is just a placholder |
06:09:46 | leorize | shashlick: do you still want me to build you a version? |
06:12:02 | FromDiscord | <mfiano> So if I change the return type of `rand()` to `Vec2` instead of `var Vec2`, it doesn't segfault, but only works if I call `echo rand(v2, 2f32, 5f32)` and it fails with a chain such as `echo rand(v2, 2f32, 5f32).rand(0f32, 5f32)`. It's trying to get chaining working without using unsafe pointers or compiler segfaults that I'm trying to figure out. |
06:12:14 | FromDiscord | <mfiano> @Elegant Beef |
06:12:52 | FromDiscord | <Elegant Beef> kungtotte had a solution for you |
06:13:38 | FromDiscord | <mfiano> Oh sigh...I missed that whole message. Let me inspect |
06:16:47 | FromDiscord | <mfiano> I see, so he is mutating the vec instead of `result` in `rand()`. Can someone explain to me why it segfaults if you don't do this? I'm new and hoping to avoid the problem in the future |
06:17:14 | FromDiscord | <Elegant Beef> well in your last example you dont intialize the result which is one problem |
06:17:20 | shashlick | If you get time, will certainly appreciate it |
06:17:51 | shashlick | I don't know if users downloaded v0.5.1 but never know |
06:20:13 | FromDiscord | <Elegant Beef> Yea, i dont know why the one way works but not the other |
06:21:35 | FromDiscord | <mfiano> Would it be a compiler bug to report that it segfaults? |
06:21:59 | FromDiscord | <Elegant Beef> Uhh im too much of a twit to answer that |
06:22:00 | FromDiscord | <mfiano> I wouldnt expect a segfault without unsafe code anyway |
06:22:06 | * | narimiran joined #nim |
06:22:47 | kungtotte | It will segfault whenever you muck around with references as well, even though they're safe (unlike pointers) |
06:23:25 | FromDiscord | <Elegant Beef> How the hell does one call builtin commands like "compgen" |
06:23:40 | FromDiscord | <Elegant Beef> built in shell commands* |
06:23:58 | kungtotte | I don't know a whole lot about the compiler internals but I think that if you make the return value a var type it needs to set aside some memory for it which doesn't happen unless you do it like I do (reference the original vec which was already there) |
06:24:36 | FromDiscord | <mfiano> Ok thanks |
06:25:31 | kungtotte | I don't really understand why you're making the code so complicated though :) |
06:26:10 | FromDiscord | <Elegant Beef> I guess doing `a.b().c().d().e()` is more functional like, but still weird to me |
06:26:11 | leorize | shashlick: how can I build it? |
06:26:19 | leorize | just clone latest master? |
06:26:51 | FromDiscord | <mfiano> Right, I forgot we live in an age where "worse is better" has ruined us |
06:28:39 | kungtotte | You don't need the 'var' qualifier in your procedure definition. This works too: https://play.nim-lang.org/#ix=2dBi (also swapped the first parameter to be called _ since you're explicitly not doing anything with it) |
06:29:55 | kungtotte | Also if you swap it from float32 to just 'float' you don't need the ugly f32 suffixes to make Nim understand what to do: https://play.nim-lang.org/#ix=2dBj |
06:30:31 | FromDiscord | <mfiano> Ok thanks! |
06:31:05 | FromDiscord | <mfiano> So this isn't passsing by value? |
06:32:20 | FromDiscord | <mfiano> Because it sure seems like it now. |
06:32:23 | kungtotte | It passes some things by value and others by reference, but it passes things immutably by default. You only add the 'var' declaration if you need to mutate the thing |
06:32:51 | FromDiscord | <mfiano> `echo v2` returns 0,0. I specifically want to mutate that allocated memory as it was before. |
06:34:07 | kungtotte | OK, then you need the var qualifiers on both the input and the output Vec2 |
06:34:22 | kungtotte | https://play.nim-lang.org/#ix=2dBk |
06:35:04 | * | dadada quit (Ping timeout: 255 seconds) |
06:35:55 | * | dadada joined #nim |
06:36:16 | FromDiscord | <mfiano> That's what I thought. Sorry for being such a newb. This is the first time I'm actually trying to write Nim code after just reading NIA for a couple months. I never had to distinguish between values and references in any language before. Appreciate all the help |
06:36:19 | * | dadada is now known as Guest60452 |
06:36:39 | FromDiscord | <Elegant Beef> What language are you from? |
06:36:48 | FromDiscord | <mfiano> So, I suppose I wasn't too far off in my original paste. Just forgot to assign the slots of vec in the function and set the result |
06:36:52 | FromDiscord | <mfiano> Common Lisp |
06:37:47 | * | actuallybatman quit (Ping timeout: 260 seconds) |
06:38:41 | * | actuallybatman joined #nim |
06:41:45 | * | Hideki_ joined #nim |
06:45:34 | shashlick | @leorize: yep - just checkout latest master, nimble test - should run all tests as well and give you a binary as well |
06:46:38 | * | Hideki_ quit (Ping timeout: 265 seconds) |
06:53:25 | silvernode | Is there a way in nim to listen for a key to be pressed? Like if I had a menu that said Press 1? |
06:53:35 | silvernode | instead of typing the key and then pressing enter |
06:53:46 | FromDiscord | <Elegant Beef> Could use something like SDL or GLFW |
06:53:54 | silvernode | Basically Event handling |
06:54:10 | FromDiscord | <Elegant Beef> Yea both those can easily handle inputs |
06:54:26 | FromDiscord | <Elegant Beef> Be it mouse,keyboard or gamepad |
06:54:50 | silvernode | but can nim do this on it's own? |
06:55:36 | FromDiscord | <Elegant Beef> I think so, it requires either reading from the file that is keyboard on mouse, or doing something with the stdin |
06:55:46 | FromDiscord | <Elegant Beef> keyboard or mouse* |
06:56:06 | FromDiscord | <Elegant Beef> Assuming you're on linux, the file thing would work |
06:56:13 | * | SunDwarf quit (Ping timeout: 255 seconds) |
06:57:47 | leorize | silvernode: you're doing it on the terminal, right? |
06:57:52 | leorize | terminal.getch() |
07:00:14 | * | silvernode quit (Ping timeout: 256 seconds) |
07:00:21 | * | SunDwarf joined #nim |
07:07:40 | leorize | shashlick: do I have to update my nimterop? |
07:14:24 | * | solitudesf joined #nim |
07:21:15 | shashlick | don't think so |
07:25:41 | leorize | the answer was yes :P |
07:25:52 | leorize | my nimterop got a ton of assertions error |
07:26:16 | leorize | so I decided to do what a sensible nimble user would do: wipe their nimble dir because you can't trust it |
07:26:30 | leorize | got everything working now, running the tests atm |
07:31:34 | * | s4mu3lbk joined #nim |
07:32:03 | shashlick | awesome |
07:32:27 | shashlick | just completed a major refactor of the plugin system |
07:32:50 | shashlick | lqdev should perhaps like it a bit more |
07:33:01 | * | circ-user-tbRTC joined #nim |
07:33:09 | shashlick | and now plugins are much smaller in size since code isn't duplicated |
07:54:19 | leorize | shashlick: pm-ed |
07:59:13 | * | solitudesf quit (Ping timeout: 255 seconds) |
08:00:00 | * | gmpreussner_ quit (Quit: kthxbye) |
08:04:29 | * | nsf joined #nim |
08:04:52 | * | gmpreussner joined #nim |
08:10:05 | FromDiscord | <Rika> what's the termios of nim? |
08:11:42 | leorize | terminal.nim? |
08:12:16 | FromDiscord | <Rika> wait, theres a termios.nim too in stdlib |
08:12:17 | FromDiscord | <Rika> lmao |
08:12:20 | FromDiscord | <Rika> okay thanks |
08:13:01 | * | Trustable joined #nim |
08:24:02 | * | Trustable quit (Remote host closed the connection) |
08:26:41 | * | narimiran quit (Ping timeout: 265 seconds) |
08:28:22 | * | okcy quit (Quit: Quit) |
08:49:36 | * | zahary joined #nim |
09:19:20 | * | zahary quit (Quit: Leaving.) |
09:22:11 | * | zahary joined #nim |
09:33:16 | * | alexander92 joined #nim |
09:33:56 | alexander92 | morning! |
09:39:47 | * | dddddd quit (Ping timeout: 260 seconds) |
09:41:27 | * | lbart quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
09:51:34 | * | krux02 joined #nim |
09:52:13 | * | lbart joined #nim |
09:52:17 | * | jjido joined #nim |
10:06:47 | * | nsf quit (Quit: WeeChat 2.7) |
10:08:04 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzzβ¦) |
10:08:06 | * | narimiran joined #nim |
10:09:43 | * | chemist69 quit (Ping timeout: 272 seconds) |
10:10:27 | * | chemist69 joined #nim |
10:19:44 | FromDiscord | <Rika> is there a point of me trying to rewrite linenoise in nim xd |
10:19:56 | alexander92 | wow |
10:19:59 | alexander92 | why :) |
10:20:15 | FromDiscord | <Rika> dunno really |
10:20:19 | FromDiscord | <Rika> wanted to extend it |
10:20:27 | FromDiscord | <Rika> but it's pretty complicated to understand |
10:22:48 | alexander92 | hm, but do you target only linux? |
10:23:16 | alexander92 | i am all for it if you find it a cool exercise |
10:23:46 | alexander92 | but you'll probably need to understand much of https://github.com/antirez/linenoise after that anyway :) or to limit a bit your scope |
10:24:08 | alexander92 | but it could be a good purely learning thing |
10:25:19 | FromDiscord | <Rika> so far i've written up to completions |
10:25:38 | FromDiscord | <Rika> but i'm unsure of how to read stdin w/o needing an enter |
10:26:46 | alexander92 | hm, what kind of app do you write |
10:27:02 | * | Zectbumo joined #nim |
10:27:10 | FromDiscord | <Rika> still the linenoise port |
10:27:20 | * | jjido joined #nim |
10:30:53 | alexander92 | but what i mean is |
10:30:56 | alexander92 | what do you use it for |
10:31:11 | alexander92 | like, do you wrtie a repl or other console app |
10:31:24 | FromDiscord | <Rika> i'm just writing it |
10:31:36 | FromDiscord | <Rika> i have no use for it yet, i'm just gonna extend it (maybe) |
10:31:54 | alexander92 | okk |
10:34:52 | * | clemens3 quit (Quit: reboot) |
10:35:07 | FromDiscord | <Rika> ah, it's the linenoiseRaw thing that allows for reading stdin w/o pressing enter or smth |
10:36:31 | FromDiscord | <mfiano> Where in the manual are the semantics of module imports described? |
10:38:57 | * | lritter joined #nim |
10:41:59 | FromDiscord | <Rika> ;; wtf is cvec in linenoise completions struct ;;;;; |
10:42:04 | FromDiscord | <Rika> sorry, rambling |
10:42:28 | FromDiscord | <Rika> @mfiano https://nim-lang.org/docs/manual.html#modules ? |
10:43:08 | FromDiscord | <mfiano> Thanks. searching for "modules" just returned results of different modules π¦ |
10:43:21 | * | Hideki_ joined #nim |
10:45:50 | * | sealmove joined #nim |
10:46:56 | FromDiscord | <Rika> ctrl+f π |
10:47:55 | * | Hideki_ quit (Ping timeout: 260 seconds) |
10:48:08 | FromDiscord | <mfiano> Yeah i searched throw a couple results until I gave up and checked the index to find `import` not even listed lol |
10:48:15 | FromDiscord | <mfiano> err through |
10:48:54 | FromDiscord | <mfiano> Manual is definitely not the easiest to navigate compared to some other languages, but I like Nim too much to stop learning from something that will inevitably change given its current state π |
10:49:30 | Araq | disruptek: can you create a PR for the fix/progress on IC? |
10:55:11 | sealmove | mfiano: what do you dislike about it? the fact that it's single-paged? |
10:56:54 | FromDiscord | <Recruit_main70007> @mfiano ^ |
10:57:00 | * | Zectbumo quit (Remote host closed the connection) |
10:58:02 | FromDiscord | <Rika> i'm guessing its that you cant collapse the sidebar tree? |
10:58:29 | * | hax-scramper joined #nim |
10:59:36 | * | hax-scramper quit (Client Quit) |
10:59:51 | * | hax-scramper joined #nim |
11:17:08 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzzβ¦) |
11:25:50 | * | nsf joined #nim |
11:30:52 | * | circ-user-tbRTC quit (Remote host closed the connection) |
11:30:52 | * | s4mu3lbk quit (Remote host closed the connection) |
11:36:38 | * | narimiran quit (Ping timeout: 265 seconds) |
11:45:16 | * | s4mu3lbk joined #nim |
11:46:12 | Zevv | oi sealmove |
11:48:03 | * | Trustable joined #nim |
11:48:14 | * | Vladar joined #nim |
11:50:14 | * | Vladar quit (Read error: Connection reset by peer) |
11:50:40 | * | Vladar joined #nim |
11:52:33 | * | zahary quit (Quit: Leaving.) |
12:00:46 | * | filcuc joined #nim |
12:02:52 | * | solitudesf joined #nim |
12:04:11 | lqdev[m] | the rust docs are a breeze to navigate, compared to nim |
12:04:24 | lqdev[m] | but if you know where to look it's not that bad |
12:06:58 | * | Vladar left #nim ("Leaving") |
12:10:14 | * | filcuc quit (Ping timeout: 258 seconds) |
12:10:28 | * | filcuc joined #nim |
12:29:09 | * | Kaivo quit (Quit: WeeChat 2.7.1) |
12:38:31 | sealmove | yo Zevv |
12:40:56 | * | jjido joined #nim |
13:16:29 | Zevv | tell me, why do you keep insisting to parse yaml with npeg? :) |
13:16:46 | Zevv | life is so full of other things that are more fun then that |
13:17:07 | Zevv | likem putting a stapler against the forehead, for example |
13:18:32 | Zevv | one of the large ones, the pneumatic type |
13:19:26 | * | xet7 quit (Remote host closed the connection) |
13:20:32 | * | xet7 joined #nim |
13:20:32 | FromDiscord | <Rika> why a stapler |
13:20:43 | FromDiscord | <Rika> why not a nail gun or something |
13:23:29 | sealmove | xD |
13:23:37 | * | theelous3 quit (Read error: Connection reset by peer) |
13:24:11 | sealmove | well, I don't know any better options |
13:25:08 | sealmove | if I hand-write it then I would essentially make a parser combinator on the way, which npeg is similar to |
13:25:37 | * | clyybber joined #nim |
13:30:00 | Zevv | and why does the yaml nimble lib not help you again? |
13:30:54 | sealmove | doesn't work at CT |
13:34:17 | Zevv | oh yeah right. Shouldn't we just fix that instead |
13:35:52 | * | clemens3 joined #nim |
13:37:50 | sealmove | sure |
13:39:02 | clyybber | why would npeg not be able to parse yaml? |
13:40:57 | sealmove | https://github.com/flyx/NimYAML/issues/70 |
13:41:26 | * | clemens3 quit (Quit: reboot) |
13:42:55 | sealmove | I don't know if it's easier to build it from ground, or understand NimYAML's codebase and make it work at CT. |
13:43:53 | * | hax-scramper quit (Quit: Quit) |
13:44:07 | * | hax-scramper joined #nim |
13:49:07 | Araq | why do you need to parse yaml at compile-time? |
13:50:16 | * | rockcavera joined #nim |
13:50:33 | * | clemens3 joined #nim |
13:55:10 | sealmove | Kaitai Struct grammar input file format is a subset of YAML, then I want to make something like this possible: |
13:55:17 | sealmove | import nimitai, kaitai_struct_nim_runtime |
13:55:20 | sealmove | injectParser("gran_turismo_vol.ksy") |
13:55:22 | sealmove | let x = GranTurismoVol.fromFile("vol1.bin") |
13:56:45 | sealmove | essentially injecting in your binary a parser for any file format, given a file format grammar in Kaitai Struct syntax (which again, is a subset of YAML) |
13:58:06 | sealmove | examples here: https://formats.kaitai.io/ |
14:03:01 | * | dddddd joined #nim |
14:10:37 | * | nsf quit (Quit: WeeChat 2.7) |
14:12:23 | * | xet7 quit (Quit: Leaving) |
14:14:11 | Araq | ah I remember, ok |
14:17:36 | * | narimiran joined #nim |
14:18:50 | * | hax-scramper quit (Ping timeout: 240 seconds) |
14:19:03 | * | manuel quit (Client Quit) |
14:30:00 | * | okcy joined #nim |
14:33:01 | dom96 | It's pretty bad that I can't build choosenim on my computer anymore |
14:33:43 | clyybber | dom96: Why is that? |
14:34:29 | dom96 | https://gist.github.com/dom96/8e96ea883a32ab9ff00f3fb0cf476828 |
14:35:25 | dom96 | Guessing that nimarchive is downloading and extracting the bzip source code... |
14:35:49 | dom96 | or rather, looks like this is how nimterop works |
14:36:34 | * | okcy quit (Ping timeout: 255 seconds) |
14:36:39 | dom96 | hilarious https://gist.github.com/dom96/9ed87b496c0301267a399de32f3de165 |
14:38:15 | clyybber | lol |
14:38:54 | dom96 | this is really bad for reproducible builds |
14:39:42 | Araq | ping shashlick about it |
14:40:44 | Araq | my cycle breaker works for hamming.nim |
14:40:46 | * | okcy joined #nim |
14:41:02 | Araq | and that's pretty exciting because nothing else worked before |
14:41:54 | clyybber | Araq: but its manual. It's not a solution to cyclic graphs in general |
14:42:06 | clyybber | just in cases where you already know you don't need them anymore |
14:42:17 | clyybber | which you usually don't with arbitrary cyclic graphs |
14:45:03 | * | Hideki_ joined #nim |
14:46:01 | * | hax-scramper joined #nim |
14:47:27 | dom96 | https://github.com/nimterop/nimterop/issues/170 |
14:47:43 | dom96 | So, how can I disallow a package that can shell out to access the internet? |
14:49:08 | Araq | that's like saying "well, but you only managed to turn lead into gold, not into platinum" |
14:49:14 | * | Hideki_ quit (Ping timeout: 240 seconds) |
14:50:16 | dom96 | I'm sorry to single out shashlick's package, but IMO what it does is exactly what will cause Nimble's complexity to spiral out of control and the only way I can think of to prevent this is to disallow any and all downloads by packages. |
14:50:33 | FromDiscord | <Varriount> I thought cycle breaker was automatic? |
14:50:57 | disruptek | dom96: the problem is the power of nimscript itself. if you run it at all, you're opening up these issues. |
14:51:07 | dom96 | disruptek, I agree |
14:51:14 | Araq | nimscript cannot download stuff |
14:51:20 | clyybber | Varriount: A cycle collector is. |
14:51:28 | clyybber | But Araq changed his approach |
14:51:30 | dom96 | the problem is that nimscript can shell out to anything |
14:51:31 | disruptek | it can run an external command, eg. a script that is part of the repo. |
14:51:45 | Araq | 'nim check' cannot for example |
14:51:56 | Araq | as 'nim check' doesn't run staticExec |
14:51:57 | disruptek | nimph originally did not run nimscript at all, but people want this behavior. |
14:52:06 | clyybber | Araq: It is, but a cycle collector can deal with that, while the cycle breaker cant :) |
14:52:17 | Araq | nimscript is well prepared to prevent this from happening |
14:52:18 | disruptek | "people that cry `security` are trolls" -- paraphrased araq |
14:53:01 | dom96 | Allowing nimscript in Nimble gives people a lot of flexibility, but indeed, it's at a massive cost in complexity |
14:53:17 | * | Araq sighs |
14:53:34 | disruptek | i have come around on this. |
14:53:36 | Araq | insufficient problem analysis here we come |
14:53:42 | disruptek | i think you let nimscript do whatever it wants. |
14:53:56 | disruptek | this is the wrong place to solve this "problem". |
14:54:29 | Araq | so what's this "massive cost in complexity"? |
14:54:53 | clyybber | Its nimterops problem, not ours |
14:54:54 | Araq | and what exactly is the alternative? makefiles can run curl too |
14:55:12 | Araq | ok, so never run makefiles |
14:55:30 | dom96 | yeah, and that's why makefiles suck |
14:55:53 | Araq | feel free to disable staticExec for Nimble, it's like one line of code |
14:56:09 | Araq | I won't mind |
14:56:13 | dom96 | sure, I might do that, but ideally I would like some way to allow staticExec with no network |
14:56:58 | dom96 | and maybe provide an API in Nimble for downloading archives |
14:57:06 | clyybber | ugh |
14:57:12 | clyybber | staticExec with no network? |
14:57:16 | clyybber | how would that work |
14:57:50 | clyybber | dom96: I agree that it sucks here, but thats nimterops fault and not nimscripts |
14:57:52 | Araq | not at all, rename curl to lruc temporarily and staticExec lruc instead |
14:58:14 | dom96 | afaik on Linux at least you can set up a sandbox without a network and exec stuff in that |
14:58:44 | Araq | so then Nimble would download https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz. instead, what's the point? |
14:58:44 | clyybber | dom96: That is "massive complexity" :) |
14:58:56 | dom96 | clyybber, indeed :) |
14:59:21 | clyybber | dom96: Solution: Pull bzip into the repo or use submodules |
14:59:28 | Araq | do you complain about the download or that your precious Nimble doesn't do the download? |
14:59:38 | dom96 | Araq, lol? |
14:59:39 | Araq | because it feels like the latter |
15:00:02 | dom96 | yes, I only care that my precious application does everything |
15:00:22 | dom96 | that's why I have created nimkernel, why is nobody running all their code on that yet?! |
15:00:40 | Araq | well ok |
15:00:51 | Araq | so why would Nimble offer an API for it? |
15:01:58 | dom96 | Because Nimble could do things like only allow downloads from trusted domains |
15:02:17 | dom96 | and make it very clear that a download failed |
15:02:48 | dom96 | In this case I had to dig really deeply to understand that the website returned a 403, the niminterop script happily attempted to extract it |
15:03:18 | dom96 | I would only offer this if there really was a clear use case for it though |
15:03:29 | clyybber | dom96: Its not better though |
15:03:41 | * | xet7 joined #nim |
15:03:49 | dom96 | Just an option in case a use case presents itself after I disable all networking in Nimble |
15:03:49 | clyybber | In fact I think ideas like, package manager requirement/lockin and trusted domains are really bad |
15:04:20 | disruptek | agree. |
15:04:59 | disruptek | someone wrote recently "Downloading archives in general during build times is flaky. The user has no control over the download and may not want the internet to be accessed at all." |
15:05:44 | Araq | I agree completely but don't blame Nimscript, blame staticExec |
15:05:53 | clyybber | blame shashlick :p |
15:06:04 | disruptek | the irony is that nimterop has been a blessing and a curse not because of downloads but because of its staticExec of `nimble path`. |
15:06:33 | dom96 | clyybber, no, don't blame singular people please, it's not nice. Most of us are volunteering our time for these projects and we do our best :) |
15:06:40 | disruptek | i say make nimscript more powerful and use it in more places. |
15:06:48 | Araq | Nimscript doesn't even allow the FFI and has a limit on the number of iterations to prevent endless loops, it's a quite capable sandbox |
15:07:12 | Araq | in fact, people complain about these limitations all the time. |
15:07:20 | clyybber | dom96: It was tongue in cheek :) |
15:07:21 | dom96 | Araq, sure, I shouldn't have said that I blame nimscript. You're right, staticExec is to blame. |
15:07:24 | disruptek | shashlick's stuff is central to everything i write. i'd be nothing without his shoulders. |
15:08:08 | dom96 | Araq, but actually, disabling it in nimscript won't help. |
15:08:15 | dom96 | Nim source code can still staticExec :( |
15:08:39 | dom96 | and this could then download things at build time, in fact this might be how nimterop does it |
15:08:40 | Araq | yeah |
15:09:12 | Araq | as I said, 'nim check' and 'nimsuggest' don't run it |
15:09:29 | Araq | maybe it's time to make it opt-in during compiler runs |
15:10:02 | Araq | like --enable:staticExec |
15:10:20 | disruptek | --trust --notrust |
15:10:27 | Araq | not sure if it helps, Ormin and Lexim need it too |
15:10:38 | Araq | and they don't use nimterop |
15:10:43 | disruptek | it shouldn't be limited to staticExec; there are likely other taints, right? |
15:10:47 | dom96 | again, the ideal would be if we could sandbox it, but that's definitely not trivial |
15:11:04 | disruptek | it's not as hard as you think. |
15:11:07 | clyybber | and its not our business |
15:11:13 | disruptek | this stuff is in the vm. |
15:11:23 | Araq | we can sandbox it quite a bit but it's kind of reinventing the OS's mechanisms to do that |
15:11:28 | clyybber | exactly |
15:11:48 | dom96 | I doubt there is a cross-platform mechanism for this that works on Windows/Mac/Linux |
15:11:51 | * | aeverr joined #nim |
15:11:53 | disruptek | but a taint mode could be a middle ground. |
15:12:30 | clyybber | and what would that be? |
15:13:49 | disruptek | i'll make a pr to cherrypick the two important fixes, but the ic approach i have now is temporary, hopefully. i hate it. |
15:14:05 | Araq | disruptek: thanks |
15:14:14 | clyybber | disruptek: Did you get it working last night? |
15:14:38 | disruptek | i dunno. i think it has been working for a day or two. |
15:14:48 | disruptek | but, y'know, not for recompilation of generics. |
15:14:56 | clyybber | disruptek: I mean the toplevel statements |
15:15:04 | disruptek | oh, yeah. |
15:15:08 | clyybber | nice |
15:15:17 | disruptek | no, it's a terribly ugly approach. |
15:15:23 | clyybber | nope |
15:15:30 | clyybber | ok lets ask Araq |
15:15:39 | disruptek | too early even to review anything, honestly. |
15:15:50 | clyybber | Araq: Is it bad to use the module as a sym for toplevel statements? |
15:16:09 | disruptek | that's not the problem. |
15:16:33 | Araq | clyybber: sounds like good idea |
15:16:50 | clyybber | disruptek: boom! :p |
15:16:54 | disruptek | it's the litter across the codebase that i don't like. |
15:17:00 | clyybber | disruptek: fair enough |
15:17:18 | disruptek | and i don't want to stuff data into sqlite and then pull out an id and use it to construct a nim obj. |
15:17:35 | disruptek | leaky. |
15:19:45 | * | dom96 considers implementing lock files for Nimble today |
15:20:54 | clyybber | Araq: I want to fix the link cmd spam. I'm thinking of adding an argument to execWithEcho or the like so that we can run a command but hide it. |
15:21:00 | clyybber | Or should I just revert https://github.com/nim-lang/Nim/pull/13056 ? |
15:21:08 | * | clemens3 quit (Quit: boottesting) |
15:21:10 | shashlick | Yawn, couldn't you all let me sleep in on Saturday? |
15:21:35 | dom96 | shashlick, no better way to start a Saturday :D |
15:21:55 | shashlick | If you don't want nimterop to download from the internet, there's hundred other ways to get bzip |
15:22:21 | shashlick | Why take a bug in download so far? |
15:22:37 | dom96 | nimterop shouldn't allow downloading the source from the internet |
15:22:49 | dom96 | you should force its users to include it in the git repo or as a submodule |
15:23:34 | * | sealmove quit (Quit: WeeChat 2.7.1) |
15:24:48 | * | abm joined #nim |
15:25:04 | shashlick | Araq made the make file comment a while ago |
15:25:20 | shashlick | Part of nimterop is doing build related stuff |
15:25:30 | shashlick | Why should that be prohibited |
15:25:49 | dom96 | Did you see https://github.com/nimterop/nimterop/issues/170? |
15:26:09 | Araq | clyybber: I dunno |
15:26:27 | Araq | I added hint[Link]:off to my config |
15:26:41 | clyybber | Yeah, I know. |
15:26:56 | clyybber | But link hint shouldn't show the comand by default |
15:27:02 | clyybber | thats just insanely annoying |
15:27:12 | Araq | hmmm |
15:27:36 | Araq | the default config should have this too then |
15:27:57 | clyybber | But its still valuable to know that its linking, I guess |
15:28:10 | Araq | is it? who cares |
15:28:12 | shashlick | It only downloads the first time, after that, it is cached |
15:28:34 | clyybber | Araq: I dunno, but I had gcc hang up during linking sometimes |
15:28:39 | clyybber | that were gcc bugs tho |
15:29:10 | Araq | in an ideal world we could show "Linking" if it takes longer than 0.5s |
15:29:12 | clyybber | Araq: Or we remove linkHint and make it use hintExec? |
15:29:31 | shashlick | By your logic, we shouldn't use nimble to download dependencies during build either |
15:29:42 | * | okcy quit (Ping timeout: 268 seconds) |
15:29:59 | Araq | clyybber: just do something you consider wise |
15:30:30 | clyybber | ok |
15:32:25 | * | xet7 quit (Quit: Leaving) |
15:32:33 | Araq | shashlick: I've said it before, the whole setup is messy, ideally there is a bunch of .nim files that interface to a DLL, I don't care about C header files and their #define junk |
15:32:56 | Araq | if the .nim files are generated code, so be it |
15:32:59 | FromGitter | <melMass> Does anyone heard of a threejs wrapper for nim ? |
15:33:23 | Araq | still I want to read them, have them in the git repo and treat them as other Nim code |
15:33:53 | shashlick | Araq: nimterop isn't just about wrapping |
15:34:06 | shashlick | There's hundreds of lines of code related to build |
15:34:07 | Araq | and I want the Nim code to have 'when defined(windows)' sections, not Nim code tied to an OS |
15:34:07 | dom96 | shashlick, yes, Nimble downloading dependencies can also be flaky if github (or some other git host) fails which is why we need a central package repo eventually. |
15:34:26 | dom96 | Downloading archives from third-party websites adds to the risk |
15:34:35 | Araq | or Nim code tied to the current Gtk installation |
15:34:58 | clyybber | shashlick: Unrelated, but WDYT about seperating nimterop into different packages? |
15:35:05 | Araq | to name a different, realworld example |
15:35:39 | clyybber | s/different/multiple |
15:35:54 | shashlick | clyybber what's the point, users now have to depend on two things and nimble will have to download both |
15:35:58 | Araq | melMass: no but interfacing to JS is quite simple |
15:36:09 | clyybber | shashlick: I can only speak from my experience |
15:36:19 | clyybber | I avoid nimterop because its big and complicated to me |
15:36:23 | clyybber | And does so many things |
15:36:31 | clyybber | while I want it to just make a wrapper and be done |
15:36:41 | shashlick | dom96: if you want to install bzip2 on you system yourself, nimterop will be happy to use that |
15:36:42 | * | clemens3 joined #nim |
15:36:50 | FromGitter | <melMass> @Araq thanks I'll be the one making it then :) |
15:36:58 | FromDiscord | <Recruit_main70007> i dont know if u remember, but i asked for DllExport function in nim, does anyone remember the steam related project they sent me that used it? |
15:37:13 | shashlick | Clyybber: you can readily do that today |
15:37:14 | clyybber | Recruit_main70007: It was me |
15:37:28 | clyybber | https://github.com/xomachine/SteamForwarder |
15:37:54 | clyybber | shashlick: Generating a single wrapper file thats standalone? |
15:38:09 | shashlick | Honestly nimterop is a drop in the bucket in terms of size, if you compare with the compiler |
15:38:11 | dom96 | shashlick, why don't you include it in nimarchive as a git submodule? |
15:38:46 | clyybber | shashlick: Yeah, but I know I had a bit of a hard time getting it to work without nimble |
15:39:00 | FromDiscord | <Recruit_main70007> thanks clyybber |
15:39:01 | shashlick | Like I said, nimarchive and nimterop first use the standard install of bzip2 and other deps |
15:39:10 | shashlick | This isn't available on things like windows |
15:39:28 | shashlick | Clyybber you don't need to do it at compile time |
15:39:30 | * | melMass joined #nim |
15:40:20 | dom96 | shashlick, that in itself seems unreliable. What if the system has an old bzip2 version? |
15:40:30 | shashlick | I'm not an advocate of my way only - I've tried to make it possible to wrap like c2nim as well |
15:41:08 | shashlick | Sure then you as a user can decide to build it yourself and install it system wide |
15:41:19 | dom96 | but whatever, it still doesn't explain why using a submodule won't be possible. Just ignore it if the system already has bzip2 installed? |
15:42:23 | shashlick | That's like arguing with Stefan about using nimble instead of shell scripts and git submodules |
15:42:39 | * | hax-scramper quit (Ping timeout: 265 seconds) |
15:42:51 | melMass | Sorry if it was answered already but I had update troubles in Nim Gitter: Is it possible to use C++ namespaces with dynlib ? `dll.symAddr("MTB::loadShaders")` is not accepted |
15:42:52 | * | hax-scramper joined #nim |
15:43:01 | shashlick | What's wrong with downloading an archive versus some repo with git |
15:43:05 | dom96 | shashlick, no it isn't. Stefan's deps were Nim pckages. |
15:43:12 | Araq | melMass: beyound our control |
15:43:20 | dom96 | shashlick, what's wrong is that the HTTP server returns a 403 and the package is broken |
15:43:43 | dom96 | i just want to build choosenim, that's all, it shouldn't be this hard |
15:43:48 | melMass | @Araq so I can't use namespaces in C++ ? |
15:44:02 | shashlick | That doesn't explain away the comparison |
15:44:02 | melMass | if I want to call it from nim |
15:44:07 | Araq | I don't know, never tried to use namespaces for C++ DLLs |
15:44:19 | shashlick | Anyway, point is that you can avoid it if you want |
15:44:24 | Araq | if DLLs generally support that, so should Nim |
15:44:28 | Araq | if not then not. |
15:44:30 | shashlick | But nimterop is about making life easier for users |
15:44:58 | shashlick | Is this is a problem, it can be solved instead of telling the user, hey go and figure out the dependency yourself |
15:45:04 | melMass | @Araq it should at least using the mangled name but I failed, I'll try harder, thanks |
15:45:10 | Araq | well it hasn't made it easy for dom |
15:45:44 | shashlick | Bugs don't justify throwing everything away |
15:45:45 | dom96 | I literally cannot build this, and have no idea how to fix it. |
15:45:53 | shashlick | We routinely fix stuff |
15:46:01 | shashlick | And improve stuff |
15:46:14 | dom96 | That's true, so it seems we disagree how to fix this |
15:46:24 | dom96 | What do you propose? |
15:46:27 | clyybber | Maybe submodules are the way here |
15:46:36 | Araq | well I'm concerned about the architecture fwiw |
15:46:41 | clyybber | And nimterop can just init them if they are needed |
15:46:47 | clyybber | and if not, then not |
15:46:49 | shashlick | You are telling me to throw out a convenience cause it didn't with in one case |
15:46:49 | Araq | but I've raised my concerns before so I can shut up |
15:46:54 | dom96 | clyybber, nimble will already do that |
15:47:14 | Araq | bugfixes never fix problems in the architecture |
15:47:25 | clyybber | dom96: But nimterop has additional logic. It may not need the submodule when bzip is on the system |
15:47:42 | dom96 | clyybber, that's fine, it doesn't need to use it |
15:47:43 | FromGitter | <melMass> @Araq that't a perfect sentence to put on a tshirt |
15:48:11 | shashlick | Nimterop also supports git by the way |
15:48:32 | dom96 | Please, answer my question, how do you propose we fix this? |
15:48:34 | shashlick | But not as submodules - that would fall outside its purview |
15:48:43 | dom96 | You know my view, so tell me yours |
15:49:04 | shashlick | We find out why that url is breaking and find another reliable way to get the source |
15:49:51 | dom96 | Okay, well to me that isn't good enough |
15:50:53 | dom96 | I am effectively blocked from building choosenim because of this. If you weren't around I could be waiting for days to know how to resolve this, or worse have to dig into nimterops source code to see that I can install bzip2 myself (somehow, I would have to find out how to do so myself too) |
15:51:54 | Araq | dom96: now imagine this happens to me with 'brew' and 'apt-get' and ... do you see why I don't like package managers? |
15:52:01 | Araq | ;-) |
15:52:41 | shashlick | You all seem to make it seem like using automated tools is bad and doing things manually is better |
15:52:47 | Araq | not that it matters though, brew stopped to support my version of OSX |
15:53:36 | shashlick | It's not any more reproducible |
15:53:56 | shashlick | Using git or some central repo or any other solution |
15:54:21 | clyybber | It is more reproducable using git. |
15:54:36 | shashlick | On what basis |
15:55:00 | clyybber | on the basis, that when I clone it it works |
15:55:15 | * | clemens3 quit (Read error: No route to host) |
15:55:17 | dom96 | Araq, yes, and perhaps there is no way to avoid these problems. |
15:55:25 | shashlick | I've had many build failures where github is out to lunch |
15:55:47 | * | okcy joined #nim |
15:55:54 | clyybber | shashlick: And then you can ask every other person who has that repo cloned to give it to you |
15:56:47 | shashlick | And they will tar gz it and send it to you right |
15:56:58 | shashlick | Anyway, let me think for some time |
15:56:58 | * | okcy quit (Remote host closed the connection) |
15:57:03 | Araq | shashlick: I can follow a recipe to make cake and in the end I'll have a cake. Yet I cannot operate your cake factory. |
15:57:21 | * | clemens3 joined #nim |
15:57:24 | dom96 | Most of our packages are already in GitHub |
15:57:25 | Araq | we had the same story with build_all.sh |
15:57:59 | Araq | we had 6 instructions how to get a Nim, now we have a build_all.sh |
15:58:06 | * | okcy joined #nim |
15:58:09 | clyybber | Araq: Are you some kind of quote generator? I don't have so many walls to hang all that up |
15:58:20 | dom96 | grabbing dependencies from other websites increases the chances that something can go wrong. |
15:58:49 | shashlick | I am not married to any one approach but debating like there's only one ideal perfect way is what's wrong with the world today |
15:59:12 | disruptek | i have to take shashlick's side here, because again we're bikeshedding solutions that don't exist. |
15:59:25 | disruptek | if you have a problem with it, you know what to do. |
15:59:53 | dom96 | disruptek, huh? solutions do exist. I suggested one. |
16:00:02 | disruptek | prs welcome. |
16:00:22 | dom96 | Have nimterop enforce git submodules and disallow downloads from arbitrary URLs |
16:00:28 | Araq | shashlick: ok, fair enough, it's a valid view |
16:00:46 | dom96 | This isn't about perfection, this is about solving a very real problem that I faced today |
16:00:54 | dom96 | Which makes all of our lives easier |
16:01:04 | clyybber | no, don't enforce it |
16:01:07 | Araq | dom96: yet the problem could be the same, unclear error message, no idea how to proceed. |
16:01:29 | disruptek | write the "fix". then we can debate apples to apples. |
16:01:29 | Araq | when git submodules fail I know I'm lost too. |
16:02:11 | * | nixfreak joined #nim |
16:03:09 | okcy | because the parent repository has moved too? |
16:03:33 | clyybber | git submodules rarely fail and if they do, it tells you where |
16:03:48 | clyybber | and then you can just download some snapshot or some archive of that repo |
16:03:51 | clyybber | and put it there |
16:04:06 | clyybber | maybe thats all that needs fixing here |
16:04:16 | Araq | I had to use them in the past, I'll never use them again. That's all I know |
16:04:22 | clyybber | shashlick: Just printing out the folder where it failed to download it to? |
16:04:39 | clyybber | Araq: lol. git has been buggy with them before |
16:04:42 | clyybber | but its fine now |
16:04:43 | disruptek | Araq: at least your experience is easy to express. π |
16:04:46 | clyybber | but it used to suck |
16:05:07 | shashlick | Nimterop cannot get into the submodules business because the repo is already checked out by nimble |
16:05:34 | clyybber | Araq: OTOH mercurials subrepositories always just worked TM |
16:05:36 | shashlick | It already supports pulling from git though |
16:06:03 | Araq | clyybber: I view git like I view an OS. The less you use of it, the fewer problems you will have. |
16:06:09 | dom96 | Nimble will check out the submodules for you |
16:06:24 | clyybber | Araq: Yeah, thats fair |
16:06:53 | Araq | the alternative is to care about "signal handler safety" and symlinks pointing themselves for every single program you write. |
16:07:25 | shashlick | Yes but nimble has already checked out the repo for you |
16:07:33 | shashlick | And now nimterop is running |
16:08:00 | shashlick | You are suggesting adding submodules setup to nimterop when nimble should be the one doing it |
16:08:03 | dom96 | But you're right, a git submodule could just as easily point to a URL which does not exist or returns a 403 |
16:08:21 | shashlick | Which means it's the user's problem to do that from nimterop perspective |
16:08:33 | dom96 | yes, the user should set up a submodule |
16:08:46 | * | Vladar joined #nim |
16:10:17 | * | okcy quit (Quit: Quit) |
16:10:38 | dom96 | so yeah, we have no "solution", disruptek was right all along |
16:11:05 | Araq | we could still fix nimterop's architecture though |
16:11:20 | Araq | and with 'we' I mean 'you' |
16:12:47 | dom96 | Do you have ideas on how it could be fixed? Because I can't think of anything |
16:14:01 | dom96 | I suppose you propose that the wrapper should be generated by nimterop and then committed into git? |
16:14:06 | clyybber | Should we always show the run command with `-r` ? Or only with `--listCmds` ? |
16:14:08 | * | zahary joined #nim |
16:14:30 | Araq | dom96: exactly |
16:14:43 | shashlick | nimterop already allows you to just point to an existing source location |
16:14:58 | shashlick | so if you want to set it up some other way, it is already possible |
16:15:30 | disruptek | as i understand it, the problem nimterop solves is that it builds the wrapper on the target platform. |
16:15:31 | dom96 | shashlick, can you set up nimarchive that way so that I don't have to worry about it when building choosenim? |
16:17:27 | Araq | what existing source location? I want to do 'nimble install gtk6' and 'import gtk6' and then have Nim code that is as good as a hand written wrapper, gtk6's author might have used nimterop to build the wrapper |
16:17:45 | disruptek | but on which platform was the wrapper built? |
16:18:24 | shashlick | disruptek: wrapper author would have to check in the generated wrapper for each OS |
16:18:28 | Araq | why does it matter? c2nim translates #ifdef into 'when' |
16:18:44 | disruptek | i'm just trying to explain why nimterop works the way it does. |
16:18:44 | shashlick | Araq: you know nimterop doesn't work in that way |
16:18:51 | Araq | see that's the problem with the approach, you made it platform specific |
16:19:01 | shashlick | it is and I've argued about that as well |
16:19:09 | dom96 | if platforms are a problem then you could run nimterop for each os/cpu and then create dummy modules with `when defined(windows): import windows_gtk6 ...` etc |
16:19:26 | shashlick | somehow it is okay to run Nim and gcc at compile time but not a wrapper generator |
16:19:28 | Araq | or you diff the results and re-introduce a 'when' |
16:19:51 | Araq | shashlick: not the point |
16:19:57 | Araq | the point is this: |
16:21:31 | Araq | to generate Y.nim you need Y.h in the right version plus its deps plus nimterop in the right version. Afterwards Y.nim is self-contained. so what do you ship to your users? Y.nim, not all the stuff you needed to have around for generating Y.nim |
16:22:17 | clyybber | Araq: AFAI understood nimterop doesn't ship the Y.nim |
16:22:28 | Araq | minimize the complexity, not maximize it. |
16:22:31 | clyybber | but instead nimterop and all thats needed to make Y.h |
16:22:37 | clyybber | and that is my problem with it |
16:22:40 | * | zahary quit (Quit: Leaving.) |
16:22:59 | clyybber | but I gotta look into doing what shashlick said (using it like c2nim) before I continue talking |
16:23:05 | leorize | dom96: ah so you have to download bzip2 |
16:23:16 | leorize | that's why my nimterop crashed when I built choosenim for shashlick |
16:23:34 | shashlick | Araq: I would do that if it were possible to automate but it is not |
16:23:40 | leorize | though I just wipe my nimble dir and carry on :P |
16:23:48 | shashlick | unless you write a full preprocessor parser yourself |
16:23:49 | dom96 | leorize: why were you building choosenim for shashlick? |
16:24:01 | shashlick | even clang does not provide access to this info |
16:24:06 | leorize | he need a musl libc-based static version |
16:24:14 | shashlick | so your only alternative is to manually do that like you have with c2nim |
16:24:22 | shashlick | that alternative already exists and is well known |
16:24:28 | shashlick | nimterop takes a different approach |
16:24:39 | shashlick | it delegates the preprocessor to the preprocessor |
16:24:47 | dom96 | leorize: huh, what for? |
16:25:00 | shashlick | that does make it platform specific, it is also compiler specific |
16:25:03 | leorize | dom96: well ask the man shashlick :P |
16:25:32 | shashlick | dom96: for people who live on musl systems |
16:26:05 | dom96 | shashlick, is this what we ship? |
16:26:09 | Araq | now let's see if it would have prevented dom96's problem. Yes, it would. he would have libbizkid.nim interfacing to libbizkid.so which happens to exist on his machine. and if not, he knows how to get it |
16:27:58 | shashlick | no the CI builds all the regular binaries |
16:28:15 | shashlick | there's just one musl binary that I've not added to the CI yet |
16:28:27 | dom96 | shashlick, okay, good. So it was just for testing I assume. |
16:28:47 | leorize | shashlick: afaict the void docker image you linked could be used as a base |
16:28:48 | shashlick | Araq: dom96 is not okay with using bzip2 installed by the PM |
16:28:55 | shashlick | leorize: will do |
16:29:43 | Araq | shashlick: the complex setup would have shifted to a selected set of people, those who wrote the wrapper |
16:30:09 | Araq | now the complex setup is on every user. |
16:30:58 | Zevv | sealmove: it is an utter mess of ad hoc garbage, I'm not doing it |
16:30:59 | Araq | at the same time you're more important than ever to the Nim community so that nimterop keeps working |
16:32:01 | Araq | I mean, it's awesome you're part of the Nim community, don't get me wrong |
16:32:18 | shashlick | dom96: I posted the musl build leorize created for v0.5.1 on the releases page - did you not want to do that? |
16:32:27 | Araq | but I don't understand why you don't see how fragile your solution really is? |
16:32:53 | shashlick | Araq: I am aware of the compromises, we have discussed these before |
16:33:14 | shashlick | but it is a different approach that also allows for the c2nim style if you really want it |
16:33:28 | leorize | well I gotta say nimterop just works once you got your nimble properly setup |
16:34:03 | dom96 | shashlick, generally I would prefer to avoid having people I don't know building choosenim, it adds risk :) |
16:34:51 | shashlick | the c2nim style just isn't built in yet to run in a standalone mode seamlessly but it is possible |
16:34:55 | shashlick | it is manual work today |
16:35:03 | shashlick | and you have to do it for every single platform you want to support |
16:35:25 | shashlick | but you have to build over time, it cannot be ideal today |
16:35:49 | Araq | there is a compromise so please listen carefully |
16:35:52 | shashlick | dom96: ok will get the CI to do it |
16:35:58 | shashlick | leorize: sorry buddy |
16:37:54 | leorize | its alright :) |
16:39:20 | Araq | shashlick: how about you really ship windows/y.nim, linux/y.nim, osx/y.nim chances are high I can adapt the osx version to BSD, for example. |
16:41:09 | Araq | it's not like you really support BSD with the current approach, it's mostly "we claim it works since nobody ever tried it" |
16:43:15 | Araq | then I can 'import y', y.nim is platform specific Nim code but at least it's Nim code some other soul might have imported too |
16:43:40 | Araq | and not Nim code specific to my local machine |
16:45:05 | * | narimiran quit (Ping timeout: 258 seconds) |
16:46:12 | Araq | I mean ... how do I then do cross builds? say I build it my stuff on Linux, then I collect the .nim files my project consists of, I move to Windows, kaboom, cannot compile it on Windows |
16:51:01 | shashlick | Driving, will check soon |
16:55:11 | clyybber | why tf can't you reopen a pr you forced push to ... |
16:55:54 | zedeus | https://lwn.net/SubscriberLink/813827/5a28c7fcd5ffadbb/ |
16:58:33 | leorize | Araq-wisdom is always correct, just use less of your OS and you get less problems |
16:58:45 | shashlick | Araq: that's the beauty of the nimterop method, it will work on BSD since it is running on the target machine with the target compiler |
17:00:16 | shashlick | At the same time, it is a big claim since I've not tested it and there surely will be bugs |
17:00:39 | shashlick | But in principal, it runs the local preprocessor, local compiler, etc |
17:01:48 | * | abm quit (Quit: Leaving) |
17:02:14 | shashlick | I am not able to support cross compilation because all Nim os procs run based on the target os at compile time instead of the host os |
17:03:11 | shashlick | So your separator becomes \ on Linux when --os:windows at compile time |
17:05:20 | shashlick | I agree there's issues with reproducibility and concerns with keeping all deps together but besides vendoring everything into your own repo including nimterop, there's no way to solve it |
17:05:42 | shashlick | Then vendor Nim as well and gcc and where does it end |
17:07:07 | shashlick | These are real problems and large established communities are struggling with it |
17:11:36 | shashlick | I also see your point that compile time generated code is unique to your setup but the time and effort required for the manual editing c2nim method or the effort to setup a framework that generates N wrappers by OS x C compiler is not trivial and does not scale |
17:12:43 | shashlick | Some day perhaps we can build that - I'm not averse to it but it's time bound |
17:14:35 | * | clemens3 quit (Quit: WeeChat 2.7) |
17:18:09 | Araq | but in the meantime we get more and more machine specific Nim code... :-/ |
17:19:29 | clyybber | I find c2nim + shell scripts to work quite well |
17:19:34 | clyybber | even for huge wrappers |
17:20:52 | shashlick | So there's still c2nim for those who want it, and for those who dare, folks who want to port libs to Nim wholesale |
17:21:01 | disruptek | ftp is back, baby. |
17:21:02 | shashlick | Nothing is gating that |
17:21:21 | shashlick | I'm just moving as fast as I can and shipping a viable product as I go |
17:22:00 | disruptek | the critics are free to wrap stuff however they please. |
17:23:37 | FromDiscord | <Rika> ~~no idea why im still doing this but i'm trying out handporting linenoise to nim~~ |
17:23:48 | FromDiscord | <Rika> right now i am crying |
17:23:54 | shashlick | Wrapping libarchive such that you can nimble install it was a huge effort |
17:24:07 | clyybber | how big is libarchive? |
17:24:12 | clyybber | as in lines |
17:25:31 | shashlick | Too big since it uses a whole bunch of C libraries behind the scenes |
17:26:16 | shashlick | And nimarchive only includes bzip2, zlib and liblzma |
17:26:28 | dom96 | btw does nimarchive link statically with bzip2? |
17:27:20 | * | tane joined #nim |
17:27:31 | shashlick | It builds all those libraries, if not present, and includes the .a files in the link step |
17:28:22 | shashlick | So ya static |
17:32:09 | dom96 | that is definitely a benefit |
17:33:03 | dom96 | so how can I download/install the bzip2 source on macOS? |
17:33:06 | FromGitter | <mantielero> In FFI, how should I cast from "ptr cdouble" to seq[float]? I know c pointer and the length of the array. |
17:34:18 | shashlick | Just edit nimarchive bzlib.nim and switch http to ftp |
17:34:21 | shashlick | https://github.com/genotrance/nimarchive/blob/master/nimarchive/bzlib.nim#L23 |
17:34:30 | shashlick | ftp://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz |
17:34:58 | * | NimBot joined #nim |
17:35:13 | shashlick | Then we can look at maintaining these sources as submodules in choosenim and ensure nimarchive uses that |
17:38:34 | shashlick | In fact nimarchive is too choosey perhaps so maybe we should give the user more power there |
17:38:39 | shashlick | https://github.com/genotrance/nimarchive/blob/master/nimarchive/archive.nim#L11 |
17:38:54 | shashlick | No reason why nimarchive should be picking versions and the download method |
17:39:12 | FromDiscord | <exelotl> uuh I have a question about basic terminology |
17:39:20 | FromDiscord | <exelotl> type Foo = object |
17:39:32 | FromDiscord | <exelotl> if "Foo" is a type, what is "object" ? |
17:41:05 | FromDiscord | <Rika> object is a keyword |
17:41:06 | FromDiscord | <Rika> is it not? |
17:41:08 | FromDiscord | <exelotl> reason being, I'm making a table like this: |
17:41:08 | FromDiscord | <exelotl> https://cdn.discordapp.com/attachments/371759389889003532/685904882011602977/unknown.png |
17:41:33 | FromDiscord | <Rika> what do you mean |
17:41:43 | FromDiscord | <Rika> kind is a good word for that table |
17:42:04 | FromDiscord | <exelotl> ok, I was just wondering if there was a better word xD |
17:42:21 | FromDiscord | <Rika> are you doubting ar_q??? |
17:42:31 | FromDiscord | <Rika> wait i dont think ar_q wrote that table |
17:42:40 | FromDiscord | <exelotl> I wrote that table lol |
17:42:48 | FromDiscord | <Rika> darn |
17:43:07 | FromDiscord | <Rika> a better name for what is currently "Type" will be name |
17:43:14 | FromDiscord | <Rika> then "Kind" becomes "Type" |
17:43:34 | FromDiscord | <Rika> then the name of the TABLE would be "Types" or so |
17:44:56 | * | jjido quit (Quit: Textual IRC Client: www.textualapp.com) |
17:45:07 | FromDiscord | <exelotl> I'm pretty much happy with what I have, it's just that nim uses `kind` for any type of anything (since `type` is a reserved word and such) |
17:45:18 | lqdev[m] | @exelotl imo Type β Name, Kind β Type |
17:45:31 | FromDiscord | <exelotl> oh that works |
17:45:46 | FromDiscord | <exelotl> yeah that's perfect, thanks |
17:46:08 | shashlick | lqdev: not sure if you saw my message last night - refactored the plugin system - ptal |
17:46:14 | * | Zectbumo joined #nim |
17:46:59 | shashlick | Still need to add the ability to store user info in the plugin manager |
17:52:03 | * | krux02 quit (Remote host closed the connection) |
17:52:19 | FromDiscord | <Rika> exelotl didnt notice what i said :/ |
17:56:32 | disruptek | ~stream |
17:56:33 | disbot | stream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek |
17:59:50 | FromDiscord | <exelotl> @Rika dang sorry, I misread |
18:00:27 | FromDiscord | <exelotl> i thought you were saying to swap the "type" and "kind" headings π
|
18:03:43 | * | filcuc quit (Quit: Konversation terminated!) |
18:07:18 | clyybber | Araq: Can I merge https://github.com/nim-lang/Nim/pull/13603 ? Its not beautiful but its the best I came up with |
18:07:18 | disbot | β₯ Only print the link command when listCmd is active and fix the docs |
18:09:32 | clyybber | Basically I moved the check that timothee removed into execCmd |
18:10:17 | clyybber | And limited it to hintLinking, since doing the same for hintExecuting is a bit more controversial |
18:14:46 | * | rockcavera quit (Remote host closed the connection) |
18:27:59 | * | jholland__ joined #nim |
18:29:23 | * | nsf joined #nim |
18:32:03 | * | clemens3 joined #nim |
18:39:46 | * | gangstacat quit (Quit: Δis!) |
18:42:12 | * | gangstacat joined #nim |
18:46:43 | * | Hideki_ joined #nim |
18:51:16 | * | Hideki_ quit (Ping timeout: 255 seconds) |
18:52:37 | * | clyybber quit (Ping timeout: 255 seconds) |
18:53:54 | * | clyybber joined #nim |
18:53:57 | * | clyybber quit (Client Quit) |
18:54:10 | * | clyybber joined #nim |
18:54:23 | * | zahary joined #nim |
18:54:23 | disruptek | meth is a helluva drug. |
19:04:25 | shashlick | Araq: I think an important point you aren't aware of with nimterop and nimarchive is that it also builds all the libraries if they aren't present |
19:04:42 | shashlick | This includes cmake, configure support, build flags and other nonsense |
19:05:08 | shashlick | So it isn't just wrapping, it is also getting working c dependencies on the system |
19:05:47 | shashlick | When you want latest or a particular version cause the package manager has an older version or there's no pm like on windows installing libraries |
19:06:18 | FromDiscord | <Recruit_main70007> #offtopic discord -> bridge is dead again |
19:06:41 | shashlick | So we have to get the C headers and source to do all that anyway |
19:07:40 | clyybber | Recruit_main70007: It has been for the last few months |
19:07:48 | FromDiscord | <Recruit_main70007> oof |
19:08:19 | disruptek | zevv. |
19:08:22 | disruptek | stop cursing in nim. |
19:08:23 | Zevv | disruptek |
19:08:42 | Zevv | one can best curse in perl |
19:12:48 | FromDiscord | <Rika> How does one curse in nim |
19:13:04 | Zevv | No clue where he got that from. I typed I curse *at* nim, not *in* nim. |
19:13:25 | clyybber | Rika: Like this: |
19:13:26 | clyybber | import v |
19:13:32 | Yardanico | clyybber: xddd |
19:13:37 | clyybber | v vv v vvvvv vvv vvv vvv vv vvvvv vvvvvv |
19:13:47 | clyybber | vvv vv vvvv "uck" |
19:13:50 | Yardanico | clyybber: or emojis |
19:13:56 | Zevv | in perl it's trivial. You go like $!&@*^! |
19:14:04 | Zevv | but that joke got old fast |
19:14:18 | clyybber | Yardanico: You are joking, but there is a certain cursed fella here that uses emojis in their code |
19:14:28 | Yardanico | clyybber: I'm not, I did it myself (it's based on v lib) |
19:14:36 | Yardanico | i posted it on the forum, lemme find it |
19:14:40 | Zevv | !eval β ="π£" |
19:14:42 | NimBot | Compile failed: /usercode/in.nim(1, 1) Error: undeclared identifier: 'β ' |
19:14:45 | clyybber | Yardanico: wtf |
19:14:48 | Zevv | !eval let β ="π£" |
19:14:51 | NimBot | <no output> |
19:14:53 | clyybber | what did you bring upon this cursed land |
19:15:17 | Zevv | I wrote curses-code last week, really true |
19:15:23 | Zevv | and only old people know what that means |
19:15:54 | clyybber | well ncurses is just curses plus the n word |
19:16:00 | Zevv | ooooh |
19:16:03 | clyybber | so at least your code is not racist |
19:18:14 | Yardanico | clyybber ah wait I didn't post in on the forum sadly, but only did it locally |
19:18:26 | Yardanico | basically I replaced different number of "v" with 10 emojis |
19:18:51 | clyybber | yeah, i don't even want to see it |
19:18:54 | clyybber | :p |
19:19:35 | clyybber | Yardanico: but I'm also a bit curious |
19:19:39 | clyybber | is it a snippet? |
19:20:00 | Yardanico | oh I think I have it locally |
19:20:05 | clyybber | ah ok |
19:20:10 | disruptek | ~stream |
19:20:10 | disbot | stream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek |
19:20:13 | clyybber | maybe its better this way |
19:20:16 | clyybber | lol |
19:20:38 | Yardanico | clyybber: one thing is that I couldn't get imports to work (when they're written the v-way or emoji-way) |
19:21:14 | clyybber | hmm |
19:24:23 | Yardanico | clyybber: https://github.com/Yardanico/nim-emojify |
19:24:30 | Yardanico | instead of vify proc I have emojify proc |
19:24:34 | Yardanico | and the module is called "emojify" |
19:25:15 | Yardanico | https://i.imgur.com/Prllle3.png |
19:25:16 | disruptek | is leorize asleep? |
19:25:39 | leorize | i'm here disruptek, being busy |
19:25:52 | disruptek | okay π |
19:35:44 | FromDiscord | <Bawbby> that emojify is cool and cursed |
19:41:49 | clyybber | Yardanico: I am bound to make an issue |
19:41:58 | clyybber | I am sorry. Don't actually delete it tho |
19:43:00 | clyybber | dammit |
19:43:11 | clyybber | now I opened the most stupid issue on the original repo |
19:43:30 | clyybber | dammnit, there are no issues |
19:44:21 | Yardanico | clyybber: i've enabled them in the repo |
19:44:29 | Yardanico | they're not enabled by default in forks on github |
19:46:16 | clyybber | ah |
19:46:18 | clyybber | I see |
20:00:10 | Yardanico | hmm, is it a bug that "$+:$+:$+$." doesn't work with scanf? |
20:00:24 | Yardanico | (it's supposed to match a string like "0xasd:0xgdg:0xfggd" |
20:08:26 | disruptek | ~stream |
20:08:26 | disbot | stream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek |
20:08:41 | * | shadwick joined #nim |
20:08:49 | * | Vladar quit (Quit: Leaving) |
20:09:49 | shadwick | Hi all -- When using `nim doc ..`, is there a syntax to link to a standard lib module? I.e. "See `streams <streams.html>`_.", but specifically generating it to nim-lang.org as it's not a project module? |
20:14:27 | * | zahary quit (Quit: Leaving.) |
20:38:49 | * | lritter quit (Ping timeout: 255 seconds) |
20:42:22 | * | nsf quit (Quit: WeeChat 2.7) |
20:46:35 | * | zahary joined #nim |
20:47:26 | * | narimiran joined #nim |
20:49:06 | leorize | shadwick: substitute streams.html with the full link to it |
20:49:14 | leorize | the documentation syntax is RST |
20:49:38 | shadwick | Ah ok. I just wasn't sure if there was a shorthand syntax instead of pasting the full URL |
20:49:41 | shadwick | Thanks |
20:52:36 | FromDiscord | <Kiloneie> Is Patreon asking an actual picture of me or the hell is the cover picture supposed to be ? |
20:53:23 | Yardanico | @Kiloneie if you only plan to use it to donate to other people it doesn't matter I think |
20:53:29 | Yardanico | actually I think it doesn't matter at all |
20:54:02 | FromDiscord | <Kiloneie> imma just strech a thumbnail D: |
20:54:09 | FromDiscord | <Kiloneie> no time right now xD |
20:56:46 | * | shadwick quit (Remote host closed the connection) |
21:05:11 | FromDiscord | <Kiloneie> where is nim's official logo located it's source ? |
21:05:33 | Yardanico | You mean https://github.com/nim-lang/assets ? |
21:06:44 | FromDiscord | <Kiloneie> yes thank you |
21:07:16 | * | abm joined #nim |
21:13:32 | FromDiscord | <Kiloneie> https://youtu.be/uZ7jdkx4pKE |
21:14:02 | FromDiscord | <Kiloneie> Here is my just made Patreon page for everyone to ignore :P: https://www.patreon.com/Kiloneie?fan_landing=true |
21:17:05 | FromDiscord | <Kiloneie> Now im off to get wasted |
21:21:57 | FromDiscord | <Elegant Beef> Briefly watching that video, i think you need to up your voice volume whilst no longer recording keystroke audio |
21:28:01 | FromDiscord | <Elegant Beef> or do the voice over after recording |
21:28:17 | * | krux02 joined #nim |
21:29:33 | * | xet7 joined #nim |
21:32:01 | * | muffindrake quit (Quit: muffindrake) |
21:47:25 | FromDiscord | <Kiloneie> Imma use my spare membrane keyboard for the next one i guess |
21:50:50 | FromDiscord | <Kiloneie> Adding 2 books to elevate my mic didnt do a thing..., my settings in obs are the same as last time and yet i had to up the volume by 10 db in post... |
21:51:02 | FromDiscord | <Elegant Beef> What's your mic? |
21:53:22 | * | narimiran quit (Ping timeout: 265 seconds) |
21:55:24 | * | muffindrake joined #nim |
21:56:44 | * | Trustable quit (Remote host closed the connection) |
21:57:45 | * | dddddd quit (Remote host closed the connection) |
22:04:04 | FromDiscord | <Kiloneie> A 110β¬ usb mic from like 10 years ago, mc crypt usb-s1 |
22:05:05 | FromDiscord | <Elegant Beef> Yea i've also got a usb mic, got a monitor arm though, so it's fairly good quality assuming i drop the volume of it and put it a few cm from my face |
22:05:13 | FromDiscord | <Elegant Beef> Samson meteor, it's pretty good |
22:05:25 | FromDiscord | <Elegant Beef> Extremely sensitive though |
22:08:38 | * | clyybber quit (Quit: WeeChat 2.7.1) |
22:08:47 | FromDiscord | <Kiloneie> Yeah, i wanted to get a mic arm a while ago but i couldnt find anything cheap that would fit my mic |
22:25:45 | lqdev[m] | disruptek: how do you display a notification using dbus? |
22:26:01 | disruptek | see my xs repo for examples. |
22:26:03 | disruptek | !repo xs |
22:26:04 | disbot | https://github.com/disruptek/xs -- 9xs: 11xstreamstartup.com 15 1β 0π΄ |
22:26:15 | disruptek | ie. the bot. |
22:26:23 | disruptek | it's solitudesf's code, basically. |
22:27:02 | * | s4mu3lbk quit (Read error: Connection reset by peer) |
22:27:46 | disruptek | a simplified example that is arguably more instructive: http://ix.io/2dGG/nim |
22:31:49 | FromDiscord | <exelotl> Man reStructured tables are horrible... Found myself writing HTML tables instead |
22:33:07 | * | letto_ quit (Ping timeout: 255 seconds) |
22:35:08 | * | zahary quit (Quit: Leaving.) |
22:35:25 | * | solitudesf quit (Ping timeout: 265 seconds) |
22:38:31 | * | letto_ joined #nim |
22:38:49 | Araq | no idea what you mean, they are fine |
22:38:57 | Araq | same as markdown tables iirc |
22:46:57 | FromDiscord | <exelotl> I want to put some URLs in a cell in the first column |
22:48:25 | * | Hideki_ joined #nim |
22:50:02 | * | clyybber joined #nim |
22:51:11 | clyybber | Araq: Can I merge https://github.com/nim-lang/Nim/pull/13603 ? |
22:51:12 | disbot | β₯ Only print the link command when listCmd is active and fix the docs |
22:53:18 | * | Hideki_ quit (Ping timeout: 265 seconds) |
22:53:32 | Araq | ok |
22:55:26 | * | dwdv joined #nim |
22:56:28 | disruptek | ~notes is https://gist.github.com/disruptek/41100bf20978de9a3cff55b23fcfe44e |
22:56:29 | disbot | notes: 11https://gist.github.com/disruptek/41100bf20978de9a3cff55b23fcfe44e |
22:59:48 | lqdev[m] | leorize: this file doesn't want to be highlighted at all with nim.nvim https://github.com/liquid600pgm/pomod/blob/master/src/pomod.nim |
23:00:05 | lqdev[m] | all I get is the error message `nimsuggest instance for project /home/daknus/Coding/Nim/pomod/src stopped with exitcode: 1` |
23:07:24 | * | lbart quit (Read error: Connection reset by peer) |
23:07:31 | * | lbart joined #nim |
23:07:53 | * | disruptek quit (Quit: Bye) |
23:07:58 | * | nsf joined #nim |
23:08:14 | * | disruptek joined #nim |
23:11:26 | leorize | lqdev[m]: does nim check crashes on it? |
23:16:34 | lqdev[m] | yes |
23:16:35 | lqdev[m] | or, it fails |
23:16:50 | lqdev[m] | because my lib uses nimterop to pull the header and staticExec is forbidden in the vm |
23:17:07 | lqdev[m] | the same thing, however, does not happen with euwren.nim |
23:18:31 | leorize | well if it crashes, open an issue on the compiler tracker |
23:18:35 | leorize | nim check crashes |
23:18:44 | leorize | usually get things fix faster than telling that it's a nimsuggest bug, sadly |
23:19:01 | shashlick | lqdev: highlighting should work if you compile once |
23:19:03 | * | mal`` quit (Quit: Leaving) |
23:19:15 | shashlick | Cause nimterop caches it for nimsuggest or check mode |
23:19:36 | lqdev[m] | shashlick: problem is, it doesn't work after compiling once |
23:20:00 | lqdev[m] | I can compile it all day I want but nim check always fails |
23:20:10 | shashlick | Ya then the code generated is broken in some way |
23:20:43 | shashlick | What does Nim check complain about |
23:20:58 | lqdev[m] | tons of undeclared identifiers for symbols imported from C |
23:21:55 | shashlick | How can I reproduce - which os |
23:22:13 | shashlick | Presume you compiled once before running Nim check |
23:22:27 | shashlick | And have the latest version blah blah |
23:23:11 | lqdev[m] | yes |
23:23:15 | lqdev[m] | os: linux |
23:23:18 | * | actuallybatman quit (Quit: Lost terminal) |
23:23:30 | lqdev[m] | might not be the lastest version of nimterop, let me update |
23:24:42 | lqdev[m] | naw updating nimterop did not help |
23:24:52 | lqdev[m] | so it's latest installed via `nimble install nimterop` |
23:24:56 | lqdev[m] | nim 1.0.6 |
23:27:52 | shashlick | Which wrapper file is erroring |
23:30:54 | disruptek | leorize: what should i add to the bot's radio feature tonight? |
23:30:59 | lqdev[m] | it's coming from 2 files, https://github.com/liquid600pgm/rapid/blob/master/src/rapid/lib/soundio.nim and https://github.com/liquid600pgm/rapid/blob/master/src/rapid/lib/oggvorbis.nim |
23:31:35 | * | mal`` joined #nim |
23:32:48 | FromDiscord | <mfiano> Is there a way to not have the compiler discard code that is not assigned to anything and is purely for side-effects. I get expression `'foo' is of type 'var bar' and has to be discarded` unless i echo it or assign it to a variable. it's a proc that takes in a var to mutate it, and i want to just use the mutated var later, but the compiler errors here and it doesn't get any farther. |
23:33:05 | disruptek | no. use `discard`. |
23:33:25 | FromDiscord | <mfiano> discard what? |
23:33:38 | lqdev[m] | `discard someCallOrExpression` |
23:34:13 | lqdev[m] | it's a statement. |
23:34:16 | shashlick | Lqdev just tried and both wrappers compile and check fine |
23:34:19 | lqdev[m] | https://nim-lang.org/docs/manual.html#statements-and-expressions-discard-statement |
23:34:47 | FromDiscord | <mfiano> oof |
23:35:11 | FromDiscord | <mfiano> Looks like I'm going to have to macro out of this then. Writing performance sensitive code so lots of mutation |
23:35:24 | disruptek | then don't return anything. |
23:35:27 | lqdev[m] | shashlick: wait. so you're telling me I have to compile the wrapper itself, and not my project? |
23:36:02 | lqdev[m] | but running `nim check` on the wrappers is fine |
23:36:09 | lqdev[m] | even when not compiled |
23:36:11 | shashlick | no that's not needed |
23:36:20 | FromDiscord | <mfiano> disruptek, not an option if I want to chain mutations i don't think |
23:36:22 | shashlick | nim check without compile is checking nothing |
23:36:22 | clyybber | mfiano: Don't return a thing then. Modifiy the var parameter. Or use {.discardable.} |
23:36:30 | shashlick | with compile, it is checking the cached code |
23:36:33 | lqdev[m] | this only occurs on files that use the wrappers |
23:36:59 | * | mal`` quit (Ping timeout: 260 seconds) |
23:37:00 | disruptek | please don't use .discardable. |
23:37:07 | disruptek | discard is a great feature that prevents bugs. |
23:37:35 | lqdev[m] | shashlick: try to `nim check` this https://github.com/liquid600pgm/rapid/blob/master/src/rapid/audio/device.nim |
23:37:42 | shashlick | Ok I need to head out but which files are erroring |
23:38:01 | shashlick | Also, enable cDebug to see what the wrappers are generating |
23:38:36 | shashlick | Maybe some stuff is missing and the symbols are getting flagged in the consuming module |
23:38:52 | clyybber | disruptek: Some people *want* to shoot themselves |
23:38:56 | clyybber | in the foot that is |
23:39:35 | disruptek | i *want* to shoot some people, too. |
23:39:46 | disruptek | i mean, let's face it. |
23:39:51 | disruptek | some people /need/ to be shot. |
23:40:02 | lqdev[m] | shashlick: no code except some .compile pragmas is generated during `nim check`, it seems |
23:40:19 | disruptek | i think bot hackery tonight. |
23:43:17 | disruptek | clyybber: btw, there are several kinds of toplevel stmts that aren't stmtlists. fun. |
23:43:53 | clyybber | oh |
23:44:31 | FromDiscord | <mfiano> How can I check if 2 instances of an object have identical values for all of their members? |
23:44:39 | disruptek | x == y |
23:46:33 | FromDiscord | <mfiano> How can I check if an instance is the same object in memory as another var? |
23:47:28 | lqdev[m] | `addr x == addr y` |
23:48:28 | FromDiscord | <mfiano> Thanks |
23:49:56 | lqdev[m] | if the objects are `ref` then you can just do `x == y`, and compare whether fields are the same using `x[] == y[]` |
23:54:48 | clyybber | disruptek: Whats your opinion on: https://github.com/nim-lang/Nim/pull/13603 |
23:54:49 | disbot | β₯ Only print the link command when listCmd is active and fix the docs |
23:55:16 | clyybber | IMO the link command should only be shown when --listCmd is used |
23:56:12 | * | Zectbumo quit (Remote host closed the connection) |
23:56:25 | clyybber | But do you think its useful to show that its linking without showing --listCmd ? |
23:56:32 | clyybber | Like before timothees PR |
23:57:08 | clyybber | just showing `Hint: [Link]` or something |
23:57:23 | clyybber | Or should it just not be shown normally. |
23:57:25 | * | mal`` joined #nim |
23:59:14 | leorize | disruptek: the `!tune` thing doesn't seem to work :( |
23:59:39 | * | tane quit (Quit: Leaving) |
23:59:42 | shashlick | lqdev is the wrapper generating anything in Nim c |