00:29:30 | FromDiscord | <Jakraes> I can't find the exponent character anywhere in the documentation, does anyone know how to write an exponent? |
00:29:38 | FromDiscord | <Jakraes> Turns out e is base 10 |
00:29:44 | FromDiscord | <Jakraes> And I can't find anything else |
00:32:32 | FromDiscord | <Elegantbeef> You want a base 2 exponent? |
00:32:56 | FromDiscord | <Jakraes> Yup |
00:33:09 | FromDiscord | <Elegantbeef> so then just `val shl exponent` \:D |
00:33:34 | FromDiscord | <Elegantbeef> !eval 2 shl 3 |
00:33:36 | NimBot | Compile failed: /usercode/in.nim(1, 3) Error: expression '16' is of type 'int literal(16)' and has to be used (or discarded) |
00:33:45 | FromDiscord | <Elegantbeef> !eval echo 2 shl 3 |
00:33:48 | NimBot | 16 |
00:33:54 | FromDiscord | <Jakraes> Nice, thank you! |
00:37:05 | FromDiscord | <Elegantbeef> Though that's not actually exponent, i think it might be what you want \:D |
00:37:42 | FromDiscord | <Elegantbeef> though there are bit literals like `0b10000` |
00:54:55 | FromDiscord | <Jakraes> Oh boy how do I work with that? |
00:55:10 | FromDiscord | <Jakraes> I just made an exponent function but I assume it's much much slower than bit literals |
00:55:48 | FromDiscord | <Elegantbeef> The bit literal does as it looks sets a specific set of bits to on |
00:55:59 | FromDiscord | <Elegantbeef> Well show the code and might be able to suggest improvements if interested |
00:57:15 | FromDiscord | <Jakraes> I've never worked with bits and what not, although my teacher scraped a bit of bit shifting but I didn't understand anything |
00:57:25 | FromDiscord | <Jakraes> https://media.discordapp.net/attachments/371759389889003532/874818755220373504/Screenshot_9.png |
00:57:44 | FromDiscord | <Jakraes> It only works with ints but yeah, it's what I need it for |
00:58:50 | FromDiscord | <undersquire> why dont u use result instead of final |
00:58:52 | FromDiscord | <Elegantbeef> To summarize bits when talking about ints it works just like base 10 in that `213` is (3 \ 10^0) + (1 \ 10^1) + (2\ \ 10^2) |
00:59:49 | FromDiscord | <Elegantbeef> So with a `0b1010` it's `(0 2^0) + (1 2^1) + (0 2^2) + (1 2^3)` or `10` |
01:00:22 | FromDiscord | <Elegantbeef> I just mentioned the bit literal due to not knowing if this was for values at runtime or compile time |
01:01:40 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3vBv |
01:02:25 | FromDiscord | <Elegantbeef> Secondly your exponent doesnt work properly `assert 10.exponent(0) == 1` fails |
01:03:27 | FromDiscord | <Jakraes> Oh yeah I could definitely use result |
01:04:07 | FromDiscord | <Jakraes> Oh so bits are read backwards? |
01:04:23 | FromDiscord | <Elegantbeef> Finally math(just realized this myself) does have `^` so you can just do `import std/math` to get `10^10` to work |
01:04:25 | FromDiscord | <Elegantbeef> They're read the same as base 10 on most systems |
01:04:50 | FromDiscord | <Elegantbeef> Right to left though stored opposite |
01:05:38 | FromDiscord | <Jakraes> Yeah that's much better, perhaps I could even use `` instead of exponent as the name of the proc |
01:06:22 | FromDiscord | <Jakraes> Oh damn, it has? I found it odd that it was lacking that but I guess it just didn't have an explicit name, thank you once again! |
01:49:31 | * | arkurious quit (Quit: Leaving) |
02:03:44 | FromDiscord | <gogolxdong (liuxiaodong)> How to convert seq to varargs? |
02:04:32 | FromDiscord | <Elegantbeef> varargs accepts a single entry, an array or a seq |
02:09:38 | FromDiscord | <leorize> varargs is just openArray with some extra sugar |
02:53:50 | * | rockcavera quit (Remote host closed the connection) |
03:01:54 | * | flynn quit (Remote host closed the connection) |
03:03:02 | * | flynn joined #nim |
03:13:50 | FromDiscord | <gogolxdong (liuxiaodong)> Is it possible to db.exec(sql"INSERT INTO tables VALUES(?,?,?,?,?)" , row[0..4]) |
03:18:51 | FromDiscord | <retkid> Do you think I could combine elixir and nim for projects |
03:19:11 | FromDiscord | <retkid> Idk if they’ll play well |
03:20:58 | FromDiscord | <Elegantbeef> Depends on what you're after |
04:06:02 | * | supakeen quit (Quit: WeeChat 3.2) |
04:06:30 | * | supakeen joined #nim |
04:17:02 | FromDiscord | <hamidb80> hey |
04:17:47 | FromDiscord | <hamidb80> assume a `someObj` is a ref object |
04:20:41 | FromDiscord | <hamidb80> sent a code paste, see https://play.nim-lang.org/#ix=3vCb |
04:20:57 | FromDiscord | <Elegantbeef> The former |
04:21:12 | FromDiscord | <hamidb80> ? |
04:21:24 | FromDiscord | <Elegantbeef> `subObj1` |
04:21:54 | FromDiscord | <Jakraes> So uhm, quick question, rand from random stays the same when compiled, is there a way to fix that? |
04:22:04 | FromDiscord | <hamidb80> ok thanks |
04:22:05 | FromDiscord | <Elegantbeef> call `randomize()` |
04:22:26 | FromDiscord | <Elegantbeef> You can also provide a seed that will randomize specifically |
04:23:08 | FromDiscord | <Jakraes> Yeah I thought of a seed but I assumed there was an easier way |
04:23:19 | FromDiscord | <hamidb80> what is the logic behind calling `randomize` proc before generating random number? i dont get it |
04:23:35 | FromDiscord | <Elegantbeef> without it the seed is `0` so it's not random |
04:24:32 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3vCd |
04:24:45 | FromDiscord | <Elegantbeef> It'll output the same everytime, insert a randomize before it, it'll magically be different |
04:25:16 | FromDiscord | <hamidb80> +1 |
04:28:31 | FromDiscord | <ChikinNug> Whats the preferred paradigm of nim? |
04:30:37 | FromDiscord | <Elegantbeef> Procedural is what it tends towards |
04:32:44 | FromDiscord | <ChikinNug> thanks |
04:44:25 | FromDiscord | <hamidb80> sent a code paste, see https://play.nim-lang.org/#ix=3vCg |
04:45:58 | FromDiscord | <hamidb80> seems like `cpp` generates different code |
04:46:18 | FromDiscord | <hamidb80> im on js backend |
04:46:28 | FromDiscord | <hamidb80> (edit) "im on" => "using" |
04:47:24 | FromDiscord | <hamidb80> got it https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-importcpp-pragma |
04:54:06 | madprops | not sure why the docs say "Instead of using map and filter, consider using the collect macro from the sugar module." |
05:06:58 | madprops | oh I see now |
05:07:14 | madprops | it allows for more elaborate functions |
05:10:42 | FromDiscord | <Elegantbeef> prestige where are you, i need to know how to know if a window should be floating?! |
05:15:57 | FromDiscord | <vegai> do nim developers typically use nim as a scripting and/or configuration language, or do you use something else instead? |
05:16:50 | FromDiscord | <Elegantbeef> Many use nimscript for configuring their projects, and yes nim is pretty easy to use for one off scripts |
05:27:07 | FromDiscord | <Elegantbeef> Ah nvm i found it, it's the same logic that i gave you forever ago, size is the only concern |
05:27:37 | FromDiscord | <Elegantbeef> Though you do have some X memory leaks due to not calling `XFree` on the stuff you `XAlloc` |
05:47:13 | FromDiscord | <codic> iirc you sayit's a float if it's a dialog, utility, toolbar or one more (I think it was splash screen) window |
05:47:42 | FromDiscord | <codic> from the _NET_WM_WINDOW_TYPE |
05:47:45 | FromDiscord | <codic> oh nvm you found your answer |
05:47:48 | FromDiscord | <codic> yeah writing wms is really fun |
05:48:12 | FromDiscord | <codic> reparenting ended up to be a silly rabbit hole so I'm going to take the KatriaWM route and just draw window decorations as separate windows by hand |
06:14:15 | FromDiscord | <vegai> right, thanks |
06:35:58 | * | crem quit (Quit: WeeChat 3.0) |
06:37:36 | * | Vladar joined #nim |
06:37:41 | * | crem joined #nim |
06:44:24 | * | max22- joined #nim |
07:41:53 | * | PMunch joined #nim |
08:16:58 | FromDiscord | <gogolxdong (liuxiaodong)> Is there any proc like `builtin_bswap16` |
09:39:21 | FromDiscord | <enthus1ast> how do you publish the html docs of your project through github? do you create a link in the readme.md that points to the\: https://htmlpreview.github.io/?https://github.com/..... ? |
09:40:42 | FromDiscord | <enthus1ast> i could do this manually and create a gh-pages branch and copy the docs over but it would be nice to just have them in the master branch |
09:51:23 | FromDiscord | <windowsboy111> guys, what do you think about mixing languages together such as injecting literal C code into nim↵↵wouldn't it be a bad idea |
09:51:29 | FromDiscord | <proud linux user> is there any differnece in using let over var for immutable variables?? |
09:51:52 | FromDiscord | <Rika> Var isn’t immutable |
09:51:54 | FromDiscord | <windowsboy111> I think they are faster...? |
09:52:01 | FromDiscord | <Rika> No difference in speed |
09:52:02 | FromDiscord | <windowsboy111> (edit) "they" => "immutables" |
09:52:11 | FromDiscord | <windowsboy111> huh really, ok |
09:52:16 | FromDiscord | <Rika> In reply to @windowsboy111 "guys, what do you": You can already do this via the emit pragma |
09:52:25 | FromDiscord | <windowsboy111> In reply to @Rika "You can already do": yes I am talking about emit pragma |
09:52:52 | FromDiscord | <Rika> In reply to @windowsboy111 "huh really, ok": There probably is a difference but it is negligible or not reliably better |
09:53:20 | FromDiscord | <Rika> In reply to @windowsboy111 "yes I am talking": Okay so I don’t understand what you mean then |
09:53:22 | FromDiscord | <windowsboy111> and `const` is much faster (if used correctly) right? |
09:53:32 | FromDiscord | <windowsboy111> since it's compile time |
09:53:39 | FromDiscord | <windowsboy111> and the compiler copy and paste the values |
09:53:44 | FromDiscord | <Rika> You trade memory and binary size for speed |
09:53:56 | FromDiscord | <Rika> And compile time of course |
09:54:00 | FromDiscord | <proud linux user> In reply to @Rika "Var isn’t immutable": i mean variables that dont change |
09:54:14 | FromDiscord | <proud linux user> ohyes thankyou |
09:54:31 | FromDiscord | <Rika> Then there is no noticeable difference other than you aren’t stopped by the compiler when you change a var |
09:56:48 | FromDiscord | <proud linux user> and i noticed that danger is slower than reelase on arm64/android |
09:57:19 | FromDiscord | <windowsboy111> In reply to @richard stallmen(crazy GNU guy) "and i noticed that": you mean when you run the program or when you compile? |
09:58:16 | FromDiscord | <proud linux user> when you run |
09:59:22 | FromDiscord | <proud linux user> sent a code paste, see https://play.nim-lang.org/#ix=3vDq |
09:59:24 | FromDiscord | <proud linux user> danger(^) |
10:00:23 | FromDiscord | <proud linux user> my phone is getting slower :( |
10:07:16 | FromDiscord | <windowsboy111> <https://pypi.org/project/nim4py> what the hell is this |
10:09:29 | FromDiscord | <proud linux user> sent a code paste, see https://play.nim-lang.org/#ix=3vDt |
10:09:36 | FromDiscord | <proud linux user> you didnt read descriptioj windozeboy |
10:11:20 | FromDiscord | <proud linux user> <https://pypi.org/project/py2nim> and this is a total bruh project |
10:11:34 | FromDiscord | <proud linux user> embed python inside nim and call python in runtime |
10:16:07 | FromDiscord | <retkid> In reply to @Elegantbeef "Depends on what you're": Looking for a strong language that’s fast and similar enough to nim that I can use it to makeup for any shortcomings from Jim’s small community |
10:16:51 | FromDiscord | <retkid> In reply to @richard stallmen(crazy GNU guy) "embed python inside nim": That’s the worst thing |
10:17:05 | FromDiscord | <proud linux user> ohyes agreed |
10:17:07 | FromDiscord | <Rika> In reply to @retkid "Looking for a strong": Doesn’t exist |
10:17:18 | FromDiscord | <proud linux user> In reply to @retkid "Looking for a strong": who is jim |
10:17:20 | FromDiscord | <Rika> Unless you’re happy to use Lisp |
10:17:24 | FromDiscord | <proud linux user> bruh |
10:17:49 | FromDiscord | <retkid> In reply to @Rika "Unless you’re happy to": I was thinking about elixr or crystal |
10:17:53 | FromDiscord | <Rika> Or if you think Go and Rust are “similar enough” |
10:18:09 | FromDiscord | <retkid> Rust is the obvious answer |
10:18:18 | FromDiscord | <retkid> Imo |
10:18:34 | FromDiscord | <Rika> Rust is the furthest language from Nim I would almost say |
10:18:45 | FromDiscord | <Rika> Actually no |
10:18:46 | FromDiscord | <proud linux user> farthest? |
10:18:46 | FromDiscord | <Rika> Zig is |
10:18:48 | FromDiscord | <retkid> I haven’t tried to learn rust |
10:18:54 | FromDiscord | <proud linux user> good |
10:19:06 | FromDiscord | <retkid> I’ve heard Rust is cool tho |
10:19:09 | FromDiscord | <Rika> Rust has good practices |
10:19:15 | FromDiscord | <Rika> And cool ideas |
10:19:27 | FromDiscord | <Rika> But I will never be able to get over the borrow checker |
10:19:36 | FromDiscord | <retkid> https://media.discordapp.net/attachments/371759389889003532/874960230985920522/image0.png |
10:19:40 | FromDiscord | <retkid> I hate this |
10:19:45 | FromDiscord | <Rika> Hate what |
10:19:54 | FromDiscord | <retkid> Just |
10:20:04 | FromDiscord | <retkid> The way you have to think to write this |
10:20:13 | FromDiscord | <retkid> It’s like Java and C fucked |
10:20:18 | FromDiscord | <retkid> Or something |
10:20:24 | FromDiscord | <proud linux user> owu |
10:20:28 | FromDiscord | <Rika> I dunno |
10:20:51 | FromDiscord | <Rika> If you want a Nim that is big then it would be easier to help make Nim big than to search for a similar language to Nim that is already big |
10:21:25 | FromDiscord | <proud linux user> so nim is not big? |
10:21:29 | FromDiscord | <retkid> I just want something that can work with it |
10:21:33 | FromDiscord | <retkid> Nim is pretty big |
10:22:11 | FromDiscord | <proud linux user> not like c++ :) |
10:23:30 | FromDiscord | <retkid> That’s like saying “oh my town of people is pretty big, 30,000 people or so” |
10:23:33 | FromDiscord | <retkid> Then you go |
10:23:39 | FromDiscord | <retkid> “NOT TOKYO BIG” |
10:37:21 | FromDiscord | <retkid> :nimRawr: |
10:38:21 | FromDiscord | <gogolxdong (liuxiaodong)> Is there any bech32 library ? |
10:45:56 | FromDiscord | <retkid> There really are very few languages like nim |
10:51:43 | FromDiscord | <tbrekalo> Anyone using nimlsp with nvim-coc? ↵I have issues getting it to work |
10:55:35 | FromDiscord | <Paupi woodberg> Am i the only teen here that is new to nim😭 |
10:59:21 | emery | Paupi woodberg: better nim than python |
11:02:57 | FromDiscord | <Rika> In reply to @tbrekalo "Anyone using nimlsp with": i cant at least try to help debug, what's the issue |
11:05:15 | * | PMunch quit (Remote host closed the connection) |
11:08:06 | FromDiscord | <exelotl> In reply to @retkid "": unreachable more like unreadable amirite |
11:09:53 | * | PMunch joined #nim |
11:10:19 | * | PMunch quit (Read error: Connection reset by peer) |
11:10:53 | * | PMunch joined #nim |
11:11:07 | * | PMunch quit (Read error: Connection reset by peer) |
11:14:24 | FromDiscord | <tbrekalo> In reply to @Rika "i cant at least": I did the standard setup form coc github page and it simply does not work |
11:18:29 | * | rockcavera joined #nim |
11:18:29 | * | rockcavera quit (Changing host) |
11:18:29 | * | rockcavera joined #nim |
11:20:45 | FromDiscord | <Rika> semantic highlighting is independent of the completion plugin |
11:20:53 | FromDiscord | <tbrekalo> ye; just realized that |
11:21:38 | FromDiscord | <tbrekalo> what do you recommend to add to my vimrc? |
11:22:04 | FromDiscord | <Rika> check :messages |
11:22:38 | FromDiscord | <tbrekalo> Sorry, I do not understand what you mean |
11:24:01 | FromDiscord | <Rika> do the command `:messages` when you open a nim file |
11:34:57 | * | PMunch joined #nim |
11:43:02 | FromDiscord | <tbrekalo> nothing happens |
11:45:02 | * | PMunch quit (Ping timeout: 258 seconds) |
11:46:01 | FromDiscord | <Rika> Strange |
11:46:36 | FromDiscord | <Rika> When you do “:hl” and scroll do you see any entries with “Nim” on them |
11:46:58 | FromDiscord | <tbrekalo> I know that this exists: https://github.com/alaviss/nim.nvim But I would like to have a pure nvim-coc setup |
11:47:01 | nrds | <prestigebot99> itHub: 7"Nim plugin for NeoVim" |
11:47:06 | FromDiscord | <Rika> Oh |
11:47:10 | FromDiscord | <Rika> I misunderstood |
11:47:11 | * | PMunch joined #nim |
11:47:25 | FromDiscord | <Rika> Nim on LSP has no semantic highlighting implemented |
11:47:31 | FromDiscord | <Rika> As of now |
11:47:44 | FromDiscord | <tbrekalo> Ugh; Guess I'll stick to VS Code for nim stuff |
11:47:55 | FromDiscord | <Rika> Why not just use the plugin? |
11:48:08 | FromDiscord | <Rika> What’s so repulsive about using the plugin |
11:48:23 | FromDiscord | <Rika> I’ve never actually understood why people don’t want to use the plugin |
11:48:51 | FromDiscord | <Rika> If you took the opportunity to switch to neovim why not use the plugin for it… |
11:49:18 | FromDiscord | <tbrekalo> I use neovim 80% of the time |
11:49:45 | FromDiscord | <Rika> Well then that makes even less sense to me |
11:50:02 | FromDiscord | <tbrekalo> But; ugh.. just feel lazy setting it up for nim |
11:50:07 | FromDiscord | <Rika> Okay |
11:50:09 | FromDiscord | <Rika> You do you |
11:50:11 | FromDiscord | <tbrekalo> I'll give it a tray |
11:50:14 | FromDiscord | <tbrekalo> (edit) "tray" => "try" |
11:51:10 | * | arkurious joined #nim |
11:51:29 | * | PMunch quit (Ping timeout: 248 seconds) |
11:58:19 | FromDiscord | <retkid> In reply to @emery "Paupi woodberg: better nim": You’d rather people use nim than py as their first language |
11:58:26 | FromDiscord | <retkid> Mine was Bash |
11:58:59 | FromDiscord | <retkid> Still don’t know how to do anything in bash but that’s because thank god I don’t need to use it often |
11:59:57 | FromDiscord | <retkid> When you think in bash you’ve gone down the wrong path |
12:02:09 | FromDiscord | <konsumlamm> In reply to @retkid "Looking for a strong": D is pretty similar, albeit not much bigger |
12:02:18 | FromDiscord | <proud linux user> albeit ? |
12:02:23 | FromDiscord | <proud linux user> where is this cominf from |
12:02:32 | FromDiscord | <proud linux user> all be it? |
12:02:34 | FromDiscord | <proud linux user> ???? |
12:04:37 | FromDiscord | <zetashift> In reply to @Rika "If you want a": Factsss |
12:05:10 | FromDiscord | <zetashift> In reply to @tbrekalo "Anyone using nimlsp with": I just use it with lspconfig |
12:05:19 | FromDiscord | <retkid> In reply to @konsumlamm "D is pretty similar,": was thinking about D but isn't it a microsoft baby |
12:05:32 | * | PMunch joined #nim |
12:05:37 | FromDiscord | <zetashift> It isn't...at all ahaha |
12:05:50 | FromDiscord | <tbrekalo> In reply to @zetashift "I just use it": You have semantic highlight? |
12:05:56 | FromDiscord | <retkid> oh sorrt haha\ |
12:06:01 | * | supakeen quit (Quit: WeeChat 3.2) |
12:06:05 | FromDiscord | <retkid> sent a code paste, see https://play.nim-lang.org/#ix=3vE8 |
12:06:05 | FromDiscord | <retkid> thats pretty cool |
12:06:12 | FromDiscord | <retkid> but uh |
12:06:24 | FromDiscord | <retkid> h |
12:06:26 | FromDiscord | <retkid> (edit) "h" => "eh" |
12:06:31 | * | supakeen joined #nim |
12:06:40 | FromDiscord | <zetashift> In reply to @tbrekalo "You have semantic highlight?": I use alaviss nim.nvim for highlighting, lspconfig only handles the diagnostics |
12:06:43 | * | max22- quit (Ping timeout: 268 seconds) |
12:07:03 | FromDiscord | <tbrekalo> In reply to @zetashift "I use alaviss nim.nvim": thanks 👍🏽 |
12:08:56 | FromDiscord | <Rika> sent a code paste, see https://play.nim-lang.org/#ix=3vE9 |
12:10:57 | FromDiscord | <proud linux user> sent a code paste, see https://play.nim-lang.org/#ix= |
12:11:44 | FromDiscord | <konsumlamm> In reply to @richard stallmen(crazy GNU guy) "where is this cominf": dunno, look it up |
12:12:54 | * | djanatyn joined #nim |
12:14:50 | FromDiscord | <haxscramper> If I understand correctly, nim forum update bot is routed via old IRC (freenode) and then to discord? |
12:15:10 | FromDiscord | <haxscramper> It wasn't transferred when we moved to libera chat |
12:16:36 | FromDiscord | <Rika> yes |
12:17:09 | PMunch | Has Nimble started being more strict about underscores in names? |
12:17:36 | PMunch | I've had ast_pattern_matching in the NimLSP project listed as astpatternmatching, but that apparently fails now.. |
12:19:00 | FromDiscord | <proud linux user> try camel? |
12:38:54 | PMunch | It's easy to fix, I was just wondering what had actually changed |
12:45:45 | FromDiscord | <PsychoClay> how do i compare 2 types? |
13:19:26 | FromDiscord | <@bracketmaster-5a708063d73408ce4> can I pass strings by address in Nim? |
13:24:01 | FromDiscord | <exelotl> they are passed by address already, where possible |
13:29:45 | PMunch | If you need to pass it in a way that you can modify the string then use `var string` as the type |
13:29:59 | PMunch | ie: https://play.nim-lang.org/#ix=3vEA |
13:31:42 | FromDiscord | <System64 ~ Flandre Scarlet> Do you know how can I install the portaudio library globally on my system please? |
13:34:09 | PMunch | nimble install portaudio? |
13:39:20 | FromDiscord | <System64 ~ Flandre Scarlet> I installed NordAudio but |
13:39:54 | FromDiscord | <System64 ~ Flandre Scarlet> https://media.discordapp.net/attachments/371759389889003532/875010638668243045/unknown.png |
13:40:01 | FromDiscord | <System64 ~ Flandre Scarlet> It says that |
13:44:58 | FromDiscord | <System64 ~ Flandre Scarlet> So I can't compile |
13:49:03 | FromDiscord | <tbrekalo> Have few questions about nim object semantics. If i define object with: `type MyType = object` I cannot create a pointer to object of that type later in the code? I am wondering is there a feature like `std::unique_ptr<T>` in nim. Where I want to transfer ownership of some heap allocated memory and not have to worry about deleting it manually once it is out of scope |
13:49:39 | FromDiscord | <Rika> regular objects are stack allocated |
13:49:51 | FromDiscord | <Rika> you can make a pointer to it, but its not "safe" |
13:50:08 | FromDiscord | <Rika> nim will have destructors in the future |
13:50:11 | FromDiscord | <Rika> --gc:arc |
13:50:25 | FromDiscord | <System64 ~ Flandre Scarlet> aren't objects already reference type already? |
13:50:39 | FromDiscord | <Rika> `type A = object` are not reference types |
13:51:06 | FromDiscord | <tbrekalo> But they are always copied along with their content? |
13:51:40 | FromDiscord | <Rika> depending on size |
13:51:50 | FromDiscord | <Rika> if the object is of sufficient size, theyre passed by pointer |
13:51:55 | * | xet7 joined #nim |
13:52:09 | FromDiscord | <Rika> or if the function requires a `var` param. |
13:52:15 | FromDiscord | <System64 ~ Flandre Scarlet> this is automatic? |
13:52:16 | FromDiscord | <Rika> yes |
13:52:22 | FromDiscord | <System64 ~ Flandre Scarlet> Oh alright |
13:52:26 | FromDiscord | <tbrekalo> Like if an object is larger than let's say 16 bytes, if I pass it to a function it's pass by pointer? Ain't that a bit fuzzy? |
13:52:31 | FromDiscord | <Rika> yes |
13:52:45 | FromDiscord | <Rika> it doesnt matter since the parameter is immutable |
13:53:08 | FromDiscord | <Rika> and if you're using `unsafeAddr` you're doing something unsafe anyway |
13:53:32 | FromDiscord | <Rika> so it really doesnt matter; as ive said above `var` parameters are always passed by ptr |
13:53:49 | FromDiscord | <tbrekalo> but if I do it like `proc doStuff(obj: var LargType)` same applies? I manually have to make a copy if I want to modify it |
13:54:05 | FromDiscord | <tbrekalo> Ok; thanks @Rika 👍🏽 |
13:54:08 | FromDiscord | <Rika> obj is always by ptr in that case |
13:54:22 | FromDiscord | <tbrekalo> Thanks |
13:55:04 | FromDiscord | <Rika> if it were obj: sometype then obj can be either copied or by ptr depending on if `sizeof sometype > (sizeof float) 2` |
13:55:07 | FromDiscord | <Rika> (edit) "float)" => "float) " |
13:55:36 | FromDiscord | <levovix> In reply to @System64 "Do you know how": As I know, on Windows, you cannot. You should download portaudio, compile it, then passL "-LC:/path/to/.lib/directory" |
13:58:03 | FromDiscord | <tbrekalo> So there's no way of stealing a content of an object? Like If I have a very large string and I pass it to a constructor of an object the member will have a copy of a string instead of just taking a memory pointer from it? |
13:59:57 | FromDiscord | <Rika> In reply to @tbrekalo "So there's no way": there's probably `lent` to help, i dont really recall |
14:00:29 | FromDiscord | <Rika> https://nim-lang.org/docs/destructors.html#move-semantics |
14:01:03 | * | xet7_ joined #nim |
14:01:16 | * | xet7 quit (Read error: Connection reset by peer) |
14:02:50 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @levovix "As I know, on": to dll or lib? and how can I do it with Nim? |
14:04:55 | FromDiscord | <levovix> sent a code paste, see https://play.nim-lang.org/#ix=3vES |
14:05:53 | * | PMunch quit (Quit: Leaving) |
14:06:27 | FromDiscord | <System64 ~ Flandre Scarlet> hummmmm is PortAudio GPL or smth?↵I know statically linking libs can bring licencing issues |
14:10:00 | FromDiscord | <levovix> seems like it isn't GPL: https://github.com/PortAudio/portaudio/blob/master/LICENSE.txt |
14:10:18 | * | xet7_ quit (Ping timeout: 258 seconds) |
14:12:41 | FromDiscord | <gerwy> is it possible to make selenium work with nim? By python bridge or maybe bindings for JS? |
14:13:08 | FromDiscord | <System64 ~ Flandre Scarlet> I'll gotta try that then |
14:13:19 | FromDiscord | <gerwy> i see that someone tried to do it but it doesn't seem like its finished |
14:20:39 | FromDiscord | <gerwy> oh i found webdriver++ which i guess could work for me but its c++ so i have no idea how to use it |
14:20:47 | FromDiscord | <gerwy> but its just a header |
14:21:46 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @levovix "to lib, because linking": Doesn't work https://media.discordapp.net/attachments/371759389889003532/875021174051065886/unknown.png |
14:28:10 | FromDiscord | <levovix> sent a code paste, see https://play.nim-lang.org/#ix=3vEV |
14:30:41 | FromDiscord | <System64 ~ Flandre Scarlet> Still have the same error |
14:32:11 | * | max22- joined #nim |
14:33:30 | FromDiscord | <System64 ~ Flandre Scarlet> https://media.discordapp.net/attachments/371759389889003532/875024127700922398/unknown.png |
14:34:51 | FromDiscord | <levovix> hmm |
14:34:55 | FromDiscord | <levovix> try to use full path to home directory, instead of ~ |
14:37:18 | FromDiscord | <System64 ~ Flandre Scarlet> IT WORKS! |
14:55:30 | * | notchris_ is now known as notchris |
15:05:40 | FromDiscord | <levovix> Why ref object is invalid type for const? |
15:06:20 | FromDiscord | <levovix> Why can't the compiler calculate the value at compile time, then allocate memory at runtime and copy value into? |
15:11:44 | nrds | <Prestige99> Seems odd to me - if you want that, I'd create a const for the value, then have `let foo = myConst` I guess? |
15:14:07 | FromDiscord | <levovix> The problem is that the type is declared as a ref object and all functions work with it as a reference |
15:14:25 | nrds | <Prestige99> I suppose I would need to see an example of what you're trying to accomplish |
15:20:07 | FromDiscord | <planetis> there is halonium\: https://github.com/halonium/halonium↵(@gerwy) |
15:22:28 | FromDiscord | <haxscramper> In reply to @levovix "Why ref object is": https://github.com/nim-lang/Nim/pull/15528 |
15:25:01 | FromDiscord | <levovix> thanks, it's good that it may be added to Nim |
15:26:26 | FromDiscord | <planetis> tbrekalo\: you can use a ref string or a copy on write implementation of strings |
15:30:33 | FromDiscord | <⃟⃟> what is the difference between var and let |
15:31:30 | FromDiscord | <levovix> let makes variable immutable |
15:52:50 | FromDiscord | <gerwy> In reply to @planetis "there is halonium\: https://github.com/halonium/hal": Broooo what?? |
15:53:24 | FromDiscord | <gerwy> 1. Why there is so much things already made for nim thats insane↵2. You know so much about nim and its projects its amazing |
15:59:57 | FromDiscord | <System64 ~ Flandre Scarlet> Is it normal it crashes at this line? (well it catches an exception at least) https://media.discordapp.net/attachments/371759389889003532/875045886495981628/unknown.png |
16:02:09 | FromDiscord | <Rika> well what exception was raised? |
16:03:35 | FromDiscord | <⃟⃟> what about let and const |
16:04:47 | FromDiscord | <System64 ~ Flandre Scarlet> https://media.discordapp.net/attachments/371759389889003532/875047093499224124/unknown.png |
16:07:05 | FromDiscord | <Rika> likely means that what getDeviceInfo returned is nil |
16:10:09 | FromDiscord | <levovix> In reply to @⃟⃟ "what about let and": const is evaluated at compile time |
16:10:19 | FromDiscord | <System64 ~ Flandre Scarlet> > outputParameters.device = getDefaultOutputDevice()↵Returns -1 |
16:10:27 | FromDiscord | <System64 ~ Flandre Scarlet> I checked with echo |
16:29:40 | FromDiscord | <System64 ~ Flandre Scarlet> I have a pointer to a buffer (so an array)↵How can I read that in a for loop please? |
16:30:45 | FromDiscord | <Unaimend> Whats the right way to convert `seq[char` to `string`? |
16:31:18 | FromDiscord | <Unaimend> https://play.nim-lang.org/#ix=3vG3 |
16:31:25 | FromDiscord | <Unaimend> This does not work as intented |
16:31:31 | FromDiscord | <tbrekalo> What's the practice for having implementation/private types/functions in nim packages? |
16:31:47 | FromDiscord | <Unaimend> (edit) "intented" => "intended" |
16:33:37 | FromDiscord | <haxscramper> Put type definitions in the `private/` directory of a package |
16:33:53 | FromDiscord | <haxscramper> If you need to use type only in a single module don't export it |
16:34:19 | FromDiscord | <levovix> sent a code paste, see https://play.nim-lang.org/#ix=3vG4 |
16:34:49 | FromDiscord | <haxscramper> In reply to @Unaimend "Whats the right way": `echo cast[string](test)` or `test.join("")` |
16:35:06 | FromDiscord | <haxscramper> First is faster but relies on implementation details |
16:43:38 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=3vG9 |
16:43:53 | FromDiscord | <Unaimend> In reply to @haxscramper "`echo cast[string](test)` or `test.join("")`": Thank you |
16:45:57 | FromDiscord | <levovix> sent a code paste, see https://paste.rs/sUV |
16:46:58 | FromDiscord | <Yardanico> In reply to @System64 "I meant I want": just cast your pointer to an UncheckedArray and loop over each index |
16:47:20 | FromDiscord | <System64 ~ Flandre Scarlet> can't I just do echo p[index]? |
16:47:36 | FromDiscord | <Yardanico> nim has a strict type system unlike C - a pointer is not an array |
16:48:13 | FromDiscord | <System64 ~ Flandre Scarlet> and what is the latest line for? Converting to unchecked array? |
16:48:37 | FromDiscord | <Yardanico> no, my solution is different from the one levovix is proposing |
16:49:13 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3vGd |
16:49:41 | FromDiscord | <tbrekalo> Can you have enum aliases in nim? Like you want to have two enum values sharing the same int value? |
16:49:52 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3vGe |
16:50:09 | FromDiscord | <Yardanico> instead of `char` you can use a more appropriate type if needed |
16:51:59 | FromDiscord | <levovix> In reply to @tbrekalo "Can you have enum": from Nim's standart library https://media.discordapp.net/attachments/371759389889003532/875058976587395112/unknown.png |
16:52:32 | FromDiscord | <levovix> (edit) "standart" => "standard" |
16:53:03 | FromDiscord | <tbrekalo> In reply to @levovix "from Nim's standard library": thanks |
16:58:40 | FromDiscord | <undersquire> how does the Nim {.magic.} work lol |
16:58:50 | FromDiscord | <undersquire> (edit) "Nim" => "pragma" |
17:00:11 | FromDiscord | <Yardanico> In reply to @undersquire "how does the pragma": {.magic.} means it's a compiler magic and the implementation is in the compiler itself |
17:00:23 | FromDiscord | <undersquire> Lol why define bool in the stdlib then |
17:00:34 | FromDiscord | <undersquire> why not just define bool, true, and false in the compiler |
17:04:32 | FromDiscord | <tbrekalo> Good question |
17:05:49 | FromDiscord | <undersquire> using {.magic.} just adds complexity as it can be confusing as to where and how thats implemented |
17:06:37 | FromDiscord | <undersquire> also why doesnt the stdlib's `basic_types.nim` file contain floats too? it defines all int types as well as bool, but not floats even though they are basic types |
17:06:43 | FromDiscord | <undersquire> (edit) "also why doesnt the stdlib's `basic_types.nim` file contain floats too? it defines all int types as well as bool, but not floats even though they are basic types ... " added "(just curious)" |
17:06:54 | FromDiscord | <konsumlamm> stuff like `if` has tocknow about `bool` though |
17:07:01 | FromDiscord | <konsumlamm> (edit) "tocknow" => "to know" |
17:07:06 | FromDiscord | <undersquire> and it should |
17:07:09 | FromDiscord | <undersquire> (edit) "and it should ... " added "via the compiler" |
17:07:15 | FromDiscord | <konsumlamm> so it can't just be defined in the stdlib |
17:07:40 | FromDiscord | <codic> the benefit of defining it in system is docs also |
17:07:45 | FromDiscord | <undersquire> yeah thats what im saying, types like bool and int should just be defined by the compiler |
17:07:52 | FromDiscord | <undersquire> In reply to @codic "the benefit of defining": docs on ints XD |
17:08:19 | FromDiscord | <konsumlamm> In reply to @undersquire "yeah thats what im": i'm pretty sure they are, that's what `{.magic.}` means |
17:08:49 | FromDiscord | <levovix> In reply to @undersquire "docs on ints XD": why not?) |
17:08:53 | FromDiscord | <undersquire> sent a code paste, see https://paste.rs/1yN |
17:08:53 | FromDiscord | <undersquire> XD |
17:09:27 | FromDiscord | <undersquire> In reply to @undersquire "but they are also": this just seems kinda pointless XD, its just redefining builtin types |
17:10:48 | FromDiscord | <levovix> not, it insn't REdefinig builtin types |
17:11:09 | * | xet7 joined #nim |
17:11:21 | FromDiscord | <levovix> it IS defining it) |
17:11:29 | FromDiscord | <undersquire> its defining them using the defined types in the compiler |
17:11:36 | * | vicfred joined #nim |
17:11:48 | FromDiscord | <undersquire> why not have the compiler just define them directly lol idk it just seems weird |
17:14:26 | FromDiscord | <levovix> so, not all builtin types defined with {.magic.} https://media.discordapp.net/attachments/371759389889003532/875064623529873488/unknown.png |
17:14:42 | FromDiscord | <haxscramper> It is better for type to have a concrete PSym that is bound to declaration |
17:14:54 | FromDiscord | <undersquire> and also how are sequences compiler defined, they are heap allocated arrays those should be code defined imo |
17:14:55 | FromDiscord | <haxscramper> Otherwise type handling would have even more edge cases |
17:15:21 | FromDiscord | <undersquire> In reply to @haxscramper "Otherwise type handling would": i didnt mean all types, just basic types like int, float, and bool |
17:15:25 | FromDiscord | <haxscramper> In reply to @undersquire "and also how are": They require some additional ccgen support, as well as strings |
17:15:32 | FromDiscord | <undersquire> oh |
17:16:03 | FromDiscord | <undersquire> cause u could write ur own sequence implemention using create and delete |
17:16:04 | FromDiscord | <haxscramper> In reply to @undersquire "i didnt mean all": And? It is still edge casing some types |
17:16:16 | FromDiscord | <undersquire> In reply to @haxscramper "And? It is still": yeah ig |
17:16:47 | FromDiscord | <haxscramper> And there are not just floats, we also have ptr, ref, int, float, double cXXX types, common strings and string arrays ... etc |
17:17:02 | FromDiscord | <undersquire> ref are just pointers that are tracked by the compiler |
17:17:07 | FromDiscord | <undersquire> (edit) "ref are just pointers that are tracked by the compiler ... " added "right?" |
17:17:22 | FromDiscord | <undersquire> aka they must point to a value |
17:17:37 | FromDiscord | <undersquire> In reply to @haxscramper "And there are not": yeah ik about strings, those are not primitives |
17:17:55 | FromDiscord | <haxscramper> In reply to @undersquire "ref are just pointers": yes. But they are magic types as well https://github.com/nim-lang/Nim/blob/version-1-4/lib/system.nim#L41 |
17:17:59 | FromDiscord | <undersquire> (edit) "strings, those" => "strings but they" |
17:18:18 | FromDiscord | <haxscramper> And there are some types that are really magic, like `typed` |
17:19:00 | FromDiscord | <undersquire> idk i just thought it was kinda weird to redefine builtin types that could just be compiler implemented keywords |
17:19:23 | FromDiscord | <haxscramper> again, this would make things more complicated |
17:19:28 | FromDiscord | <undersquire> how |
17:20:18 | FromDiscord | <levovix> > It is better for type to have a concrete PSym that is bound to declaration |
17:20:21 | FromDiscord | <haxscramper> because now semcheck has to operate on some separate concept of "built-in" type rather than having everything as a `PType`. Or `PType` must be a discriminant with different branches |
17:20:43 | FromDiscord | <konsumlamm> In reply to @undersquire "idk i just thought": again, it's no redefinition, it's the definition |
17:21:04 | FromDiscord | <haxscramper> sempass just finds type and registers it |
17:21:22 | FromDiscord | <haxscramper> Some special codegen support does not mean it has to be removed from declaration |
17:21:26 | FromDiscord | <undersquire> ah so it has to do with how the compiler was built? |
17:21:34 | FromDiscord | <haxscramper> yes, of course, what else? |
17:21:58 | FromDiscord | <haxscramper> like, what else can there possibly be to explain why core language definitions are made on one way |
17:21:59 | FromDiscord | <haxscramper> or another |
17:22:08 | FromDiscord | <haxscramper> of course it is an implementation detail |
17:22:11 | FromDiscord | <undersquire> idk lol |
17:22:26 | FromDiscord | <undersquire> ive just never seen that done b4 |
17:22:46 | FromDiscord | <undersquire> (edit) "ive just never seen that done b4 ... " added "thats all" |
17:23:03 | FromDiscord | <haxscramper> also - you can put docs on built-in types |
17:23:14 | FromDiscord | <undersquire> yeah XD |
17:23:39 | FromDiscord | <haxscramper> but that is a minor point, just writing rst document with a table is almost as good |
17:24:11 | FromDiscord | <undersquire> ye if I made a full blown language I would just manually write the docs for the few builtin types |
17:25:47 | FromDiscord | <undersquire> also what is the difference between `addr` and `unsafeAddr`? they have the same definition in stdlib and they seem to do the same thing |
17:26:30 | FromDiscord | <haxscramper> `unsafeAddr` allso to take address where it is "not safe" - like `const`, `let` (because they are immutable) |
17:26:53 | FromDiscord | <undersquire> A |
17:26:55 | FromDiscord | <undersquire> (edit) "A" => "Ah" |
17:26:55 | FromDiscord | <haxscramper> But they are virtually the same, https://github.com/nim-lang/RFCs/issues/369 |
17:27:05 | FromDiscord | <undersquire> so you cannot take an addr of a const? |
17:27:12 | FromDiscord | <undersquire> (edit) "const?" => "const or let without using unsafeAddr?" |
17:27:22 | FromDiscord | <haxscramper> correct |
17:27:28 | FromDiscord | <undersquire> ah ok that makes more sense |
17:27:41 | FromDiscord | <undersquire> I also saw some issue or request to merge the two somewhere |
17:27:48 | FromDiscord | <haxscramper> I linked it |
17:27:51 | FromDiscord | <undersquire> oh is that the issue |
17:28:03 | FromDiscord | <undersquire> yeah |
17:28:06 | FromDiscord | <undersquire> taht one |
17:59:02 | FromDiscord | <tbrekalo> how do you debug failed nimble tests? |
17:59:10 | FromDiscord | <tbrekalo> gdb or? |
18:34:42 | * | max22- quit (Ping timeout: 272 seconds) |
18:41:19 | FromDiscord | <System64 ~ Flandre Scarlet> About PortAudio, is it normal my callback does nothing? https://media.discordapp.net/attachments/371759389889003532/875086491909521438/message.nim |
18:42:15 | FromDiscord | <System64 ~ Flandre Scarlet> it should print "ABC" in the console but it does nothing |
18:42:52 | FromDiscord | <System64 ~ Flandre Scarlet> (I use the NordAudio binding- |
18:42:55 | FromDiscord | <System64 ~ Flandre Scarlet> (edit) "binding-" => "binding)" |
18:45:45 | FromDiscord | <ajusa> Is it possible to kill a process and then get the output that it wrote? |
18:50:03 | FromDiscord | <Elegantbeef> @ajusa\: terminate then read the stdout |
18:53:07 | FromDiscord | <ajusa> Alright, I was using `kill` and `terminate` seems to have fixed my issue 🤔 |
18:53:51 | FromDiscord | <ajusa> I also needed the `poStdErrToStdOut` option |
18:53:55 | FromDiscord | <Elegantbeef> Well on posix Kill and Terminate are different signals that behave differentyl |
19:22:27 | * | max22- joined #nim |
19:42:49 | nrds | <Prestige99> Elegantbeef thanks for the heads up about XAlloc, I'll look into it later |
19:43:16 | FromDiscord | <System64 ~ Flandre Scarlet> Okay, my game crashes with SDL audio, my game crashes with PortAudio, I think there is an UB in the graphics library |
19:50:00 | FromDiscord | <System64 ~ Flandre Scarlet> Does Nim have undefined behaviors? |
19:52:29 | FromDiscord | <Elegantbeef> In some places but mostly strides away |
19:53:12 | FromDiscord | <System64 ~ Flandre Scarlet> is it possible to enable UBs? |
19:53:27 | FromDiscord | <Elegantbeef> "enable UB" |
19:53:44 | FromDiscord | <Elegantbeef> What does that even mean |
19:54:16 | FromDiscord | <System64 ~ Flandre Scarlet> well I meant allowing Undefined Behaviors |
19:54:35 | FromDiscord | <Elegantbeef> Still doesnt make much sense, why would you want UB |
19:57:09 | FromDiscord | <System64 ~ Flandre Scarlet> Cause I m pretty sure Tilengine (yeah again) has UBs or smth cause I tried with SDL audio, crash, portaudio, crash↵So pretty sure its this lib |
20:08:44 | FromDiscord | <konsumlamm> arr you sure that you understand what UB is? |
20:10:11 | * | Pyautogui joined #nim |
20:10:38 | FromDiscord | <System64 ~ Flandre Scarlet> yeah a behavior not defined in the program |
20:11:21 | FromDiscord | <konsumlamm> in particular, it's behaviour that the compiler may addume never occurs |
20:11:59 | FromDiscord | <konsumlamm> (edit) "addume" => "assume" |
20:12:22 | FromDiscord | <konsumlamm> so it's not something you should ever want to "enable" |
20:12:26 | FromDiscord | <System64 ~ Flandre Scarlet> so its compiler s fault? |
20:14:39 | FromDiscord | <Elegantbeef> I think you're looking for someone to blame and not point at yourself |
20:14:49 | FromDiscord | <konsumlamm> In reply to @System64 "so its compiler s": what is? |
20:15:06 | FromDiscord | <Paupi woodberg> Hey y'all! |
20:15:42 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @konsumlamm "what is?": No its not that↵I tried with both portaudio and SDL audio, crash |
20:17:42 | FromDiscord | <System64 ~ Flandre Scarlet> So I am thinking ah maybe its cause of the Tilengine lib |
20:17:58 | FromDiscord | <konsumlamm> "enabling UB" (whatever that is) won't help with that, it'd only make things worse |
20:18:42 | * | stkrdknmibalz joined #nim |
20:19:51 | FromDiscord | <konsumlamm> the compiler assumes that invoking UB never happens, if things using UB happen to work, it's only by chance, you have no guarantees that it also works for other compilers, for other versions, for other platforms or at other times |
20:20:39 | FromDiscord | <konsumlamm> (edit) "the compiler assumes that invoking UB never happens, if things using UB happen to work, it's only by chance, you have no guarantees that it also works for other compilers, for other ... versions,when" added "compiler" | "compilerversions, for other platforms or ... atanother" added "when running it" | "other" => "another" |
20:20:43 | FromDiscord | <System64 ~ Flandre Scarlet> it works in C but not Nim |
20:21:05 | FromDiscord | <konsumlamm> if it's because of UB, refer to the above |
20:21:06 | FromDiscord | <Elegantbeef> Then your nim bindings are wrong |
20:21:50 | FromDiscord | <System64 ~ Flandre Scarlet> Ah its cause of my bindings? |
20:22:02 | FromDiscord | <Elegantbeef> Well if it works in C it's probably |
20:22:48 | FromDiscord | <System64 ~ Flandre Scarlet> The weird thing is it only crashes when I have both Audio Callback and Raster Callback |
20:25:26 | FromDiscord | <System64 ~ Flandre Scarlet> but yeah I can try with regular C |
20:32:00 | FromDiscord | <System64 ~ Flandre Scarlet> if it works with C, it should work with Nim |
20:32:10 | FromDiscord | <System64 ~ Flandre Scarlet> or every lang |
20:49:53 | FromDiscord | <dain> something of an open ended question: in dynamic interpreted languages I'm used to just fucking around in the repl or notebooks, trying out different throwaway iterations of code to see what works. once im happy with it I'll put it into a proper module. it seems difficult to do this sort of haphazard experimentation in a statically typed language. is there a comparable way of doing this in nim? ( people said the other day that the secret rep |
20:50:17 | FromDiscord | <dain> (edit) "something of an open ended question: in dynamic interpreted languages I'm used to just fucking around in the repl or notebooks, trying out different throwaway iterations of code to see what works. once im happy with it I'll put it into a proper module. it seems difficult to do this sort of haphazard experimentation in a statically typed ... language." added "compiled" |
20:50:27 | FromDiscord | <Elegantbeef> inim exists |
20:51:07 | FromDiscord | <Elegantbeef> I dont know though i've never really done the haphazard stuff, i've just made a file and tested in there |
20:51:36 | FromDiscord | <haxscramper> Wandbox/playground is a thing as well |
20:52:04 | FromDiscord | <haxscramper> Or `entr | nim c --cc:tcc` |
20:52:51 | FromDiscord | <dain> In reply to @haxscramper "Or `entr | nim": ohh I hadn't thought of that |
20:54:42 | FromDiscord | <dain> that's like what I do for pdfs |
20:56:04 | FromDiscord | <haxscramper> Yes. I personally do this even for interpreted languages, because it is hard to do a quick clean tests in repl due to accumulated state |
20:57:04 | FromDiscord | <dain> I often do a half way thing in python where I run a module with `python -i` |
20:57:18 | FromDiscord | <dain> so it runs the module then drops into interactive session |
20:57:30 | FromDiscord | <dain> so I can play with the functions |
21:00:57 | * | Pyautogui quit (Quit: Connection closed) |
21:01:22 | * | Pyautogui joined #nim |
21:06:49 | Pyautogui | How do you add a social networking thing to the list on the website? |
21:07:12 | Pyautogui | Is there a repo I can pull request? |
21:07:18 | FromDiscord | <Elegantbeef> Make a PR here |
21:07:18 | FromDiscord | <Elegantbeef> https://github.com/nim-lang/website |
21:07:20 | nrds | <prestigebot99> itHub: 7"Code for the official Nim programming language website" |
21:07:30 | Pyautogui | Thanks |
21:16:25 | * | Vladar quit (Quit: Leaving) |
21:22:51 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Elegantbeef "Then your nim bindings": The thing is it seems to work in Danger mode |
21:26:21 | FromDiscord | <Yardanico> In reply to @System64 "The thing is it": because "danger" means "disable all possible runtime checks" which is not what you want for debugging |
21:26:32 | FromDiscord | <Yardanico> if something works in danger but not in release, it usually means there's something wrong with your code |
21:26:46 | FromDiscord | <Elegantbeef> hello yard |
21:26:49 | FromDiscord | <Yardanico> hallo |
21:26:54 | FromDiscord | <Yardanico> using matrix? |
21:26:59 | FromDiscord | <Elegantbeef> Yes |
21:27:33 | FromDiscord | <Elegantbeef> I'd reason you have something wrong with your bindings causing this issue, considering it works with C |
21:28:24 | FromDiscord | <System64 ~ Flandre Scarlet> But C doesn't have runtime checks too, it does? |
21:28:31 | FromDiscord | <dain> In reply to @Yardanico "if something works in": no it just means your code is _exciting_ |
21:28:43 | FromDiscord | <Yardanico> In reply to @System64 "But C doesn't have": that's the thing with C - it doesn't |
21:28:51 | FromDiscord | <Yardanico> but that doesn't mean that you would _want_ code like that yourself |
21:29:18 | FromDiscord | <Elegantbeef> But it doesnt matter if it does or not, if you enable danger it works, something is wrong |
21:31:23 | Pyautogui | bundle install is giving an error. how am I supposed to install jekyll? |
21:32:09 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=3vHi |
21:32:27 | FromDiscord | <Yardanico> and how are you passing the callback itself? |
21:33:16 | FromDiscord | <Elegantbeef> Depending on your bundle version you'll have to update it but just dont pusuh it |
21:33:16 | FromDiscord | <Elegantbeef> Depending on your bundle version you'll have to update it but just dont push it |
21:33:18 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=3vHj |
21:34:14 | FromDiscord | <System64 ~ Flandre Scarlet> and even with a named proc it crashes |
21:35:06 | FromDiscord | <Yardanico> maybe tLN_SetLayerPosition actually returns an error which you don't check? |
21:36:33 | FromDiscord | <System64 ~ Flandre Scarlet> Ah maybe, let's check that |
21:37:36 | * | xet7 quit (Remote host closed the connection) |
21:40:27 | FromDiscord | <System64 ~ Flandre Scarlet> it returns true or false |
22:02:40 | * | Pyautogui quit (Quit: Connection closed) |
22:04:25 | * | Pyautogui joined #nim |
22:08:26 | * | Pyautogui quit (Client Quit) |
22:09:02 | * | Pyautogui joined #nim |
22:23:35 | Pyautogui | Does anyone have suggestions for getting around "https://github.com/nim-lang/Nim/issues/17139"? |
22:23:50 | Pyautogui | I am on an Intel Mac with Big Sur. |
22:23:58 | Pyautogui | Nim 1.5.1 |
22:25:06 | FromDiscord | <undersquire> wait 1.5.1 is out? |
22:25:27 | FromDiscord | <undersquire> In reply to @Pyautogui "Does anyone have suggestions": this link goes nowhere |
22:25:28 | Pyautogui | No, the devel. |
22:25:34 | FromDiscord | <undersquire> ah ok |
22:26:01 | Pyautogui | For me it goes to this issue https://github.com/nim-lang/Nim/issues/17139. |
22:26:08 | Pyautogui | nim compiler flag --asm fails on arm64 macs #17139 |
22:26:15 | Pyautogui | Same with intel. |
22:26:22 | FromDiscord | <undersquire> ok there we go it went to it |
22:26:23 | Pyautogui | At least for me |
22:26:39 | FromDiscord | <undersquire> You are on an intel mac or a M1 mac? |
22:26:43 | Pyautogui | Intel |
22:27:07 | Pyautogui | 2015 MacBook Air, Clang 12.0.0 |
22:27:26 | FromDiscord | <undersquire> is clang the issue? |
22:27:29 | FromDiscord | <undersquire> or nim |
22:27:46 | FromDiscord | <undersquire> it seems to be a clang issue, try updating your clang to the latest if you can |
22:27:51 | Pyautogui | It is giving an error " |
22:27:51 | Pyautogui | : error: unsupported argument '-acdl=/Users/ramirosenstock/.cache/nim/a_d/stdlib_system.nim.c.asm' to option 'Wa,' |
22:27:52 | Pyautogui | Error: execution of an external compiler program 'clang -Wa,-acdl=/Users/ramirosenstock/.cache/nim/a_d/stdlib_digitsutils.nim.c.asm -g -fverbose-asm -masm=intel -c -w -ferror-limit=3 -I'/Users/ramirosenstock/.choosenim/toolchains/nim-#devel/lib' -I/Users/ramirosenstock/r -o /Users/ramirosenstock/.cache/nim/a_d/stdlib_digitsutils.nim.c.o |
22:27:52 | Pyautogui | /Users/ramirosenstock/.cache/nim/a_d/stdlib_digitsutils.nim.c' failed with exit code: 1" |
22:28:36 | FromDiscord | <undersquire> Let me try that flag and see if I get any errors |
22:29:19 | FromDiscord | <undersquire> yeah I am getting the same issue, Im not sure if there is any fix for it atm |
22:30:02 | Pyautogui | Got it. I'll try to find a workaround. Maybe compile manually. |
22:30:16 | Pyautogui | The output C, I mean |
22:30:46 | FromDiscord | <undersquire> yeah that seems to be the only solution atm |
22:33:53 | * | flynn quit (Read error: Connection reset by peer) |
22:35:01 | * | flynn joined #nim |
22:37:23 | * | Pyautogui quit (Quit: Connection closed) |
22:43:34 | FromDiscord | <ynfle (ynfle)> Is there some way to write a concept for tuple where all the fields are of type `SomeNumber` but of any combination and length? |
22:45:23 | * | Pyautogui joined #nim |
22:46:31 | * | Pyautogui quit (Client Quit) |
22:47:15 | FromDiscord | <exelotl> @undersquire Nim releases always use even numbers, so 1.5 is a development version, 1.6 will be the next release. |
22:56:01 | * | Pyautogui joined #nim |
22:56:33 | FromDiscord | <undersquire> Oh ok |
22:56:58 | FromDiscord | <undersquire> I also saw a post on 2.0, when do u think 2.0 will release? (or is it going to go to 1.6 and 1.8 first) |
22:57:05 | FromDiscord | <undersquire> (edit) "to" => "through" |
22:57:39 | Pyautogui | I think 1.6 is the next one. |
22:57:45 | Pyautogui | I do not know about 1.8 |
22:59:39 | FromDiscord | <undersquire> this post i found io2.print("Hello, world!") |
22:59:49 | FromDiscord | <undersquire> (edit) "io2.print("Hello, world!")" => "https://forum.nim-lang.org/t/7983" |
23:01:28 | FromDiscord | <ynfle (ynfle)> I don't think 2.0 needs 1.6, 1.8, 1.10, etc. I think it's just gonna come when a new major release is ready |
23:02:19 | FromDiscord | <undersquire> ye |
23:05:50 | FromDiscord | <konsumlamm> the next release will be 1.6, but after that, nobody knows |
23:12:30 | * | Pyautogui quit (Ping timeout: 268 seconds) |
23:12:30 | * | max22- quit (Remote host closed the connection) |
23:36:37 | FromDiscord | <Ayy Lmao> How do you do FFI with a cpp function within a namespace without using the header? |